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

fix issue where regional locales are not matched against our locales list #12403

Merged
merged 2 commits into from
Oct 19, 2021

Conversation

adonesky1
Copy link
Contributor

@adonesky1 adonesky1 commented Oct 19, 2021

Fixes: #12353

Explanation: Some users experience issues in onboarding if their browsers' language settings are set such that their primary language is coded regionally, and another secondary language - for which we have translations - is not. Before this PR we were not normalizing regionally coded language settings to their base (e.g. 'en-us' => 'en') if we didn't have that regional coding in our translations. This PR adds this normalization.

Manual testing steps:

  • Change the language primary language in your browser's preferences to one with regional coding (e.g. French (Switzerland), code 'fr-CH'), for which we have translations for the non-regionally coded (in this case just French (code 'fr')
  • Reload the app
  • Check that the language is set to the language you just changed it to (French if you followed step 1)

@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot
Copy link
Collaborator

Builds ready [baada80]
Page Load Metrics (397 ± 42 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint2815323968541
domContentLoaded2725213848541
load2815293978742
domInteractive2725213848541

@adonesky1 adonesky1 marked this pull request as ready for review October 19, 2021 17:00
@adonesky1 adonesky1 requested a review from a team as a code owner October 19, 2021 17:00
Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

@metamaskbot
Copy link
Collaborator

Builds ready [7102ee9]
Page Load Metrics (390 ± 42 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint2906033898742
domContentLoaded2806013788842
load2896013908842
domInteractive2806013788842

@adonesky1 adonesky1 merged commit 22378e4 into develop Oct 19, 2021
@adonesky1 adonesky1 deleted the fix-init-locale branch October 19, 2021 19:32
@github-actions github-actions bot locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect default locale
4 participants