oppia / oppia-android

A free, online & offline learning platform to make quality education accessible for all.
https://www.oppia.org
Apache License 2.0
309 stars 509 forks source link

Talk back is not reading Arabic language in Audio Language dialog box #4312

Open KolliAnitha opened 2 years ago

KolliAnitha commented 2 years ago

Describe the bug Talk back is not reading Arabic language in Audio Language dialog box

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Place Values'
  2. Double tap on 'What are place values'
  3. Double tap on 'Audio' button
  4. Double tap on 'Change language' icon
  5. Audio Language dialog box appears
  6. Swipe across the various languages

Expected behavior Talk back to read all the language names including Arabic

Environment Device name: One plus Nord2 5G Android version : Android 11 App version : 0.7-alpha-d1b2827517

BenHenning commented 2 years ago

For searching context, this issue was found in 0.7-alpha (MR4).

adhiamboperes commented 1 year ago

@Vishwajith-Shettigar, could you please test and leave a comment whether this issue is still occurring in the playstore version of the app?

You could also test with the development version on the develop branch, using the fractions topic. @MohitGupta121 should be able to help in case you have any questions

MohitGupta121 commented 1 year ago

@adhiamboperes yes I think this issue is already fixed, I checked and found Talkback reading Arabic language text.

https://github.com/oppia/oppia-android/assets/76530270/e282d114-4037-4b7b-9f14-931261a90986

adhiamboperes commented 1 year ago

Hi @MohitGupta121, once you get the production assets set up, please verify this with the correct lesson per the issue description, thanks!

MohitGupta121 commented 1 year ago

@adhiamboperes yes you are right there is a issue, here is updated screen recording:

https://github.com/oppia/oppia-android/assets/76530270/de39e595-e467-4a6c-944b-fcd3f47031c6

adhiamboperes commented 2 months ago

@elin4046, you can work on this

elin4046 commented 2 months ago

Hi @adhiamboperes, this is the approach that I'm planning to take:

Issue Currently, Talkback will read the list of languages using the device's configured TTS language setting (see screenshot for this setting). For devices where this setting is not set to Arabic, this results in any Arabic words being skipped.

Screenshot 2024-07-12 at 12 38 19 PM

Additionally, the current behavior means that the other languages in the list aren't being read in their native TTS languages, which can be confusing to understand (eg. the Chinese characters for Mandarin Chinese are read in a hard-to-understand English TTS 'accent').

Proposed Approach Update AppLanguageResourceHandler::computeLocalizedDisplayName so that it returns a SpannableString instead of a String and wrap the returned string with LocaleString. By doing so, we can specify a locale that allows TalkBack to dyanmically switch to the proper TTS voice based on the language. This change would also require updating the OptionsAudioLanguageViewModel and AudioLanguageSelectionViewModel display language property to use SpannableString instead of String.

Let me know if these are the methods/files that should be updated in this fix, thanks!

adhiamboperes commented 2 months ago

Hi @elin4046, thanks for researching this. I have a few follow ups:

Do you mind trying this fix and doing a screen recording so we can see what it is like?

Additional Context The Oppia app is set up to use the device language by default, and if the device is configure in mandarin for example, most tts will be in mandarin. However, for app strings, mandarin is not one of the translated languages we currently support, and talkback relies on content descriptions to describe the app, so for untranslated strings will default to English.