apps-android-commons icon indicating copy to clipboard operation
apps-android-commons copied to clipboard

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

Open u7452206 opened this issue 2 years ago • 5 comments
trafficstars

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.

u7452206 avatar Oct 25 '23 11:10 u7452206

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

nicolas-raoul avatar Oct 26 '23 10:10 nicolas-raoul

Yes, finish pulling from main branch

u7452206 avatar Oct 26 '23 11:10 u7452206

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

u7452206 avatar Oct 29 '23 01:10 u7452206

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

rohit9625 avatar Feb 18 '24 14:02 rohit9625

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 :-)

nicolas-raoul avatar Mar 27 '24 08:03 nicolas-raoul