Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG][Blocked]: Audio language name showing two times #5133

Open
Vishwajith-Shettigar opened this issue Aug 14, 2023 · 20 comments
Open

[BUG][Blocked]: Audio language name showing two times #5133

Vishwajith-Shettigar opened this issue Aug 14, 2023 · 20 comments
Assignees
Labels
bug End user-perceivable behaviors which are not desirable. Impact: Low Low perceived user impact (e.g. edge cases). Work: Low Solution is clear and broken into good-first-issue-sized chunks.

Comments

@Vishwajith-Shettigar
Copy link
Collaborator

Vishwajith-Shettigar commented Aug 14, 2023

Describe the bug

Audio language shows two times English, But one should display Spanish

Steps To Reproduce

  1. go toHome
  2. Select Ratios and proportion Topic
  3. click on "what is a Ratio ?"
  4. click on continue
  5. tap on audio
  6. select Audio language

Expected Behavior

Audio language list should display hindi, English, and Spanish.

Screenshots/Videos

WhatsApp Image 2023-08-14 at 10 27 08 AM (1)

What device/emulator are you using?

Pixel XL(emulator)

Which Android version is your device/emulator running?

No response

Which version of the Oppia Android app are you using?

Additional Context

No response

@Vishwajith-Shettigar Vishwajith-Shettigar added bug End user-perceivable behaviors which are not desirable. triage needed labels Aug 14, 2023
@Vishwajith-Shettigar
Copy link
Collaborator Author

Can I work on this ?

@adhiamboperes
Copy link
Collaborator

Can I work on this ?

Could you please describe your proposed solution?

@Vishwajith-Shettigar
Copy link
Collaborator Author

Vishwajith-Shettigar commented Aug 14, 2023

Can I work on this ?

Could you please describe your proposed solution?

when I logged language code for second "English" option it shows "es" so in
app/src/main/java/org/oppia/android/app/player/audio/LanguageDialogFragment.kt
file we can add conditional statement for Spanish language

@adhiamboperes
Copy link
Collaborator

when I logged language code for second "English" option it shows "es" so in app/src/main/java/org/oppia/android/app/player/audio/LanguageDialogFragment.kt file we can add conditional statement for Spanish language

The language selection logic is unfortunately not as straightfoward.

The list of languages displayed is usually based on the languages supported by Oppia, and the user's device configuration. I suspect that the reason that we may be seeing "English" on the list twice, is a bug in the language list/ fallback language logic in the AudioViewModel. It appears that the fallback language, English, is added to the list without verifying whether the languages list already contains that language code.

@adhiamboperes adhiamboperes added Impact: Low Low perceived user impact (e.g. edge cases). Work: Low Solution is clear and broken into good-first-issue-sized chunks. labels Aug 15, 2023
@adhiamboperes adhiamboperes added this to the 1.0 Global availability milestone Aug 15, 2023
@Vishwajith-Shettigar
Copy link
Collaborator Author

when I logged language code for second "English" option it shows "es" so in app/src/main/java/org/oppia/android/app/player/audio/LanguageDialogFragment.kt file we can add conditional statement for Spanish language

The language selection logic is unfortunately not as straightfoward.

The list of languages displayed is usually based on the languages supported by Oppia, and the user's device configuration. I suspect that the reason that we may be seeing "English" on the list twice, is a bug in the language list/ fallback language logic in the AudioViewModel. It appears that the fallback language, English, is added to the list without verifying whether the languages list already contains that language code.

As I got to know ,there is no language name for language code es.

@adhiamboperes
Copy link
Collaborator

As I got to know ,there is no language name for language code es.

Sure. The Oppia app currently doesn't have inbuilt support for the Spanish language

@Vishwajith-Shettigar
Copy link
Collaborator Author

Vishwajith-Shettigar commented Aug 16, 2023

As I got to know ,there is no language name for language code es.

Sure. The Oppia app currently doesn't have inbuilt support for the Spanish language

Hey what am trying to say is, when I click on English(Third option) it starts saying spanish, so my proposed solution is displaying Spanish option instead of English(Third option). I tried the same and it worked.

@adhiamboperes
Copy link
Collaborator

As I got to know ,there is no language name for language code es.

Sure. The Oppia app currently doesn't have inbuilt support for the Spanish language

Hey what am trying to say is, when I click on English(Third option) it starts saying spanish, so my proposed solution is displaying Spanish option instead of English(Third option). I tried the same and it worked.

You mean reading out Spanish? Do you mind doing a screen recording of the issue that you are describing?

@Vishwajith-Shettigar
Copy link
Collaborator Author

Vishwajith-Shettigar commented Aug 17, 2023

As I got to know ,there is no language name for language code es.

Sure. The Oppia app currently doesn't have inbuilt support for the Spanish language

Hey what am trying to say is, when I click on English(Third option) it starts saying spanish, so my proposed solution is displaying Spanish option instead of English(Third option). I tried the same and it worked.

You mean reading out Spanish? Do you mind doing a screen recording of the issue that you are describing?

Here is screen recording

spanishoppia.webm

@Vishwajith-Shettigar
Copy link
Collaborator Author

Can I make a pull request ?

@adhiamboperes
Copy link
Collaborator

Can I make a pull request ?

I am not convinced that your proposal will fix the problem. Could you please refer to my comment on what I think the problem is, and address it along those lines?

@Vishwajith-Shettigar
Copy link
Collaborator Author

Vishwajith-Shettigar commented Aug 18, 2023

Can I make a pull request ?

I am not convinced that your proposal will fix the problem. Could you please refer to my comment on what I think the problem is, and address it along those lines?

Have you watched screen recording !?

@vaibhavmehrotraa
Copy link

Hey! here is my proposed solution to the problem, Since you said its a logical error in the (AudioViewModel.kt) file I propose adding a check if English(defaultLanguage) is already present in the "languages" list and only if it is not already present do we add it. If you think this will work then assign me this bug

@adhiamboperes
Copy link
Collaborator

adhiamboperes commented Sep 26, 2023

Hey! here is my proposed solution to the problem, Since you said its a logical error in the (AudioViewModel.kt) file I propose adding a check if English(defaultLanguage) is already present in the "languages" list and only if it is not already present do we add it. If you think this will work then assign me this bug

This does not identify the root of the problem.

I think it is worth noting that this does not repro in the Playstore version(0.11), or a local build with production assets, so the issue might be with the dev assets or the supported langauge filtering code.

Either way we also need tests in AudioFragmentTest to ensure this never happens in production.

@adhiamboperes
Copy link
Collaborator

adhiamboperes commented Sep 26, 2023

In the dev assets, es is one of the available voiceovers, but android does not support it, so it falls back to English. In the AudioViewModel, we are extracting all available voice over languages without filtering the unsupported language codes.

The fix to this issue is to exclude any unsupported languages from the list.

@adhiamboperes
Copy link
Collaborator

@vaibhavmehrotraa are you still working on this? If not please let us know so that we can reassign it.

@Vishwajith-Shettigar
Copy link
Collaborator Author

I would like to work on this issue, if @vaibhavmehrotraa is not into it.

@neeldoshii
Copy link

Screenshot_2023-10-18-00-30-35-61_943a62cb4c6fb83e010e1c2e82766a17

is the issue fixed? I am not seeing repeated currently. I think the issue needs to be closed.

@Vishwajith-Shettigar
Copy link
Collaborator Author

Vishwajith-Shettigar commented Oct 18, 2023

Screenshot_2023-10-18-00-30-35-61_943a62cb4c6fb83e010e1c2e82766a17

is the issue fixed? I am not seeing repeated currently. I think the issue needs to be closed.

Please check first page of "what is a Ratio?" lesson.

@adhiamboperes adhiamboperes changed the title [BUG]: Audio language name showing two times [BUG][Blocked]: Audio language name showing two times Dec 4, 2023
@adhiamboperes
Copy link
Collaborator

This is blocked on implementation details. In the ongoing audio project, we are planning to move the AudioLanguage functionality to the TranslationController, which would simplify the filtering needed to solve this issues. In https://github.com/oppia/oppia-android/pull/5178/files, we were forced to manually add the hi-en language code support, which is both brittle and inelegant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug End user-perceivable behaviors which are not desirable. Impact: Low Low perceived user impact (e.g. edge cases). Work: Low Solution is clear and broken into good-first-issue-sized chunks.
Development

Successfully merging a pull request may close this issue.

5 participants