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

#5341 When the app language sets to French and OS language sets to Chinese,… #5364

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

u7452206
Copy link

Description (required)
When the app language sets to French and OS language sets to Chinese,the depiction and license both use app language now. Fixes #5341

What changes did you make and why?
In order to fix License language
In the CommonsApplicationModule.java class and in provideLicenses function,
Screen Shot 2023-10-25 at 21 16 55
the purpose of this code to change the application's language settings based on the user's language preference saved in SharedPreferences.

In order to fix depiction language
In the DepictsClient class and byLanguageOrFirstOrEmpty function, beside adding a getSavedLanguage function
Screen Shot 2023-10-25 at 21 36 47
The primary use-case for this function is when the application needs to display a label for a specific item. It first tries to display the label in the user's preferred language. If that isn't available, it displays any available label. If none are available, it displays nothing (returns an empty string). The origin code takes the context language from Locale of the phone but not the one from the app ui language.
Screen Shot 2023-10-25 at 21 48 42
Screen Shot 2023-10-25 at 21 49 06
Screen Shot 2023-10-25 at 21 49 19
Above three photos magnifications all presents taking app setting language out.

Tests performed (required)

Tested {ProdDebug} on {Pixel 2} with API level {33}.

Screenshots (for UI changes only)
Screen Shot 2023-10-25 at 20 48 13
Screen Shot 2023-10-25 at 20 48 26

Need help? See https://support.google.com/android/answer/9075928


Note: Please ensure that you have read CONTRIBUTING.md if this is your first pull request.

… the depiction and license both use French language.
@nicolas-raoul
Copy link
Member

Would you mind rebasing (or pulling) from the main branch? Thanks! :-)

@u7452206
Copy link
Author

Yes, finish pulling from main branch

Copy link
Member

@nicolas-raoul nicolas-raoul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, it works great!

There seems to be many unrelated changes, please undo them.
Please remove the logging lines that are not really necessary.

I asked for a few other things, please mark each as resolved when each is done.

Then please refresh this page to review your pull request's code.

Thanks a lot!

@u7452206
Copy link
Author

I just updated all changes requested now. Ready to review :)

@rohit9625
Copy link
Contributor

What is the status of this PR? What changes are required now?

@nicolas-raoul
Copy link
Member

I am so sorry for the delay!

@u7452206 I know this is my fault, but would you mind fixing the conflicts? Thanks for your understanding :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Depictions picker shows labels in OS language instead of app interface language
3 participants