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]: The story/topic completion text does not update after the app language is changed. #5024

Open
seanlip opened this issue Jun 7, 2023 · 4 comments
Labels
bug End user-perceivable behaviors which are not desirable. good first issue This item is good for new contributors to make their pull request. Impact: Low Low perceived user impact (e.g. edge cases). Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet.

Comments

@seanlip
Copy link
Member

seanlip commented Jun 7, 2023

Describe the bug
After selecting a language and navigating back to the options menu, the sidenav still shows the stories/topic completion in the old language.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the Options menu, e.g. from the sidenav.
  2. Click on "App Language".
  3. Click on the Arabic option.
  4. Return to the Options menu.
  5. Click on the hamburger dropdown to open the sidenav. Notice that everything is in Arabic except for the "0 Stories Completed | 3 Topics in Progress" text.
  6. Return to the homepage. The "0 Stories Completed | 3 Topics in Progress" text is fixed and now appears in Arabic.
  7. Click back into Options > "App Language" and select English.
  8. Return to the Options menu.
  9. Click on the hamburger dropdown to open the sidenav. Notice that the "0 Stories Completed | 3 Topics in Progress" text now appears in Arabic, whereas everything else appears in English.

Expected behavior

  • In Step 5, the "0 Stories Completed | 3 Topics in Progress" text should also be translated to Arabic.
  • In Step 9, the "0 Stories Completed | 3 Topics in Progress" text should remain in English.

Demonstration
Screenshot_20230607-205707
Screenshot_20230607-205645

Environment

  • Device/emulator being used: Moto device
  • Android or SDK version (e.g. Android 5 or SDK 21): Android 8
  • App version (you can get this through system app settings or via the admin controls menu in-app): 0.11-beta-8c81c98d8b
@seanlip seanlip added bug End user-perceivable behaviors which are not desirable. Impact: Low Low perceived user impact (e.g. edge cases). Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet. labels Jun 7, 2023
@BenHenning
Copy link
Sponsor Member

I think this also affects dialogs from what I've seen back when implementing the internationalization work. I think the issue splits into two different problem areas:

  • Dialogs
  • The navigation drawer (which I believe is not a dialog)

Dialogs have a separate context from the activity that they're hosted in, so I'm not quite sure how we ensure that they receive the correctly initialized context upon a recreation. Perhaps we need some custom work in an InjectableDialogFragment base class?

The navigation drawer one is a bit more confusing to me because it should just be using the same context as the host activity (which would be recreated upon a language change) when selecting language. Resource selection is quite complicated in Android, however, so it's possible a different resources object is being used for these strings in particular (maybe the application context's resources?).

@adhiamboperes adhiamboperes added the good first issue This item is good for new contributors to make their pull request. label Oct 28, 2023
@aryanmishra29
Copy link

Hi @adhiamboperes, I am unable to reproduce this BUG because the App Language Option Leads to an empty activity.
Video Description
Oppia_AppLangBUG.webm

@adhiamboperes
Copy link
Collaborator

Hi @adhiamboperes, I am unable to reproduce this BUG because the App Language Option Leads to an empty activity. Video Description Oppia_AppLangBUG.webm

This is due to #5106. If you're unable to run bazel, could you try to repro a different issue?

@aryanmishra29
Copy link

Sure @adhiamboperes.

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. good first issue This item is good for new contributors to make their pull request. Impact: Low Low perceived user impact (e.g. edge cases). Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet.
Development

No branches or pull requests

4 participants