-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Remove in-app language pref #21542
Remove in-app language pref #21542
Conversation
📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/per-app-language-prefs #21542 +/- ##
===============================================================
Coverage 39.48% 39.48%
===============================================================
Files 2117 2117
Lines 99464 99464
Branches 15296 15296
===============================================================
Hits 39269 39269
Misses 56714 56714
Partials 3481 3481 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 @nbradbury !
I have reviewed this PR as per the instructions (also tested it), everything works as expected, this is a good clean-up, we're almost there! 🎉
I have left few questions (❓) and a couple of suggestions (💡) for you to consider. I am going to approve this PR anyway, since none is blocking. I am NOT going to merge this PR yet to give you some time to apply any of my suggestions. However, feel free to ignore them and merge the PR yourself.
EXTRAS
- Question (❓): On Cleanup LocaleManager #21541 I left a comment about this val split and via your reply here I understood that this might also be removed in this PR and prior us merging to
trunk
, thus no point discussing back then. But, if that won't happen, can we discuss that once more, so I undertand why the Java code got transformed to this version of Kotlin code. 🙏 - Suggestion (💡): I am not trying to be pedantic here, honestly I don't want to, please take this with a grain of salt; when creating a commit message, please consider providing a reason for a change (commit description), that is, in addition to describing what this commit does, which you do do (commit title). I am only asking that, because it would make me more effective in reviewing the changes as I would understand the why of the change in detail, the reasoning behind that, not only the how (example). 🙏
WordPress/src/main/java/org/wordpress/android/util/PerAppLocaleManager.kt
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/util/PerAppLocaleManager.kt
Show resolved
Hide resolved
That's a very fair comment, I'll do this going forward. |
Apologies, I dropped the ball on that one. I just corrected it in 6c20c6a. |
Quality Gate passedIssues Measures |
Oh, awesome, thanks Nick, so all the below got somehow added during the Java-to-Kotlin conversion automagically? 🤔 😨
|
It did, surprisingly! |
This PR removes the in-app language shared preference, so we now rely on the system's per-app language preference. I also removed the various calls to
setLocale
throughout the app since that's now handled by the system.Note that for now
LocaleManager.getLanguage()
simply callsPerAppLocaleManager
to get the current language code. This was to avoid replacing all the calls toLocaleManager.getLanguage()
throughout the app. I will address that in a subsequent PR because I didn't want to make this one any larger than it is.Also note that there's still more cleanup to do, but once this PR is merged I think we're good to merge the feature branch and I can handle the remaining cleanup separately.