Skip to content

In-app language preferences #2850

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

Closed
wants to merge 3 commits into from
Closed

In-app language preferences #2850

wants to merge 3 commits into from

Conversation

tonkku107
Copy link
Contributor

@tonkku107 tonkku107 commented May 15, 2024

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Following up on #2795 this PR adds a language preferences section in-app behind a feature flag.

There is no icon for it at the moment because there was no suitable icon within the design system.

There are 2 new strings that would need to be added to localazy.

I couldn't add tests on the presenter because of the access to context and I wasn't sure how to proceed with that.

Motivation and context

Users of Android 12 or older would also like to change the language per-app and it turns out some OEMs are also hiding the system per-app language preferences on 13+.

Screenshots / GIFs

image image

Tests

  • Enable the feature flag in developer settings
  • Open the new language section
  • Test switching to different languages and back to default
  • On >=13 check that the selection is also reflected on the system side
  • On <=12 check that the language settings actually work and persist

Tested devices

  • Physical
  • Emulator
  • OS version(s): 15 (beta 1.2), 12

Checklist

Copy link
Contributor

Thank you for your contribution! Here are a few things to check in the PR to ensure it's reviewed as quickly as possible:

  • Your branch should be based on origin/develop, at least when it was created.
  • There is a changelog entry in the changelog.d folder with the Towncrier format.
  • The test pass locally running ./gradlew test.
  • The code quality check suite pass locally running ./gradlew runQualityChecks.
  • If you modified anything related to the UI, including previews, you'll have to run the Record screenshots GH action in your forked repo: that will generate compatible new screenshots. However, given Github Actions limitations, it will prevent the CI from running temporarily, until you upload a new commit after that one. To do so, just pull the latest changes and push an empty commit.

@tonkku107 tonkku107 marked this pull request as ready for review May 15, 2024 12:45
@tonkku107 tonkku107 requested a review from a team as a code owner May 15, 2024 12:45
@tonkku107 tonkku107 requested review from jmartinesp and removed request for a team May 15, 2024 12:45
Copy link

codecov bot commented May 15, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 34 lines in your changes are missing coverage. Please review.

Project coverage is 73.96%. Comparing base (87bd3ee) to head (ca2dbb7).
Report is 2 commits behind head on develop.

Files Patch % Lines
...erences/impl/language/LanguageSettingsPresenter.kt 0.00% 28 Missing ⚠️
.../preferences/impl/language/LanguageSettingsView.kt 80.00% 0 Missing and 4 partials ⚠️
...tures/preferences/impl/root/PreferencesRootView.kt 75.00% 0 Missing and 1 partial ⚠️
...ries/featureflag/impl/StaticFeatureFlagProvider.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2850      +/-   ##
===========================================
- Coverage    73.99%   73.96%   -0.03%     
===========================================
  Files         1531     1536       +5     
  Lines        36526    36611      +85     
  Branches      7065     7079      +14     
===========================================
+ Hits         27028    27081      +53     
- Misses        5796     5822      +26     
- Partials      3702     3708       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jmartinesp
Copy link
Member

Thank you for the PR!

We just discussed this contribution with our product team and although the PR is quite well made we're not sure we want to support per-app language from inside the app or in older OS versions. We may come back to it later and decide to add this feature, but not right now, sorry.

@jmartinesp jmartinesp closed this May 15, 2024
@bmarty bmarty added the Z-Community-PR Issue is solved by a community member's PR label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Z-Community-PR Issue is solved by a community member's PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants