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

[localization] Gracefully handle unsupported locales #28902

Merged
merged 6 commits into from
May 22, 2024

Conversation

aleqsio
Copy link
Contributor

@aleqsio aleqsio commented May 15, 2024

Why

This is a PR by @mary-ext, just linted and rebuilt.
#27403

Closes #25694

I'm unable to push changes to that fork, so made a new PR

How

Test Plan

Tested that this doesn't break working locales on web.

Checklist

@aleqsio aleqsio requested a review from EvanBacon as a code owner May 15, 2024 19:58
@expo-bot expo-bot added the bot: passed checks ExpoBot has nothing to complain about label May 15, 2024
@aleqsio aleqsio requested review from tsapeta and behenate and removed request for EvanBacon May 15, 2024 19:59
null; // using 1e5 instead of 1e4 since for some locales (like pl-PL) 1e4 does not use digit grouping
const decimalSeparator = (1.1).toLocaleString(languageTag).substring(1, 2);
const temperatureUnit = region ? regionToTemperatureUnit(region) : null;
let digitGroupingSeparator: string | null = null;
Copy link
Member

Choose a reason for hiding this comment

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

I'm not a big fan of using let/var and reassignments, but ok 🤷‍♂️

@tsapeta tsapeta changed the title Gracefully handle unsupported locales [localization] Gracefully handle unsupported locales May 16, 2024
@aleqsio aleqsio merged commit 90c2294 into main May 22, 2024
11 checks passed
@aleqsio aleqsio deleted the fix/unsupported-locale branch May 22, 2024 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: fingerprint compatible bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

getLocales crashes due to unsupported locales
5 participants