Skip to content

fix(ubuntu_localizations): use fallback if locale is 'POSIX' or 'und'#476

Merged
d-loose merged 3 commits intocanonical:mainfrom
d-loose:handle-undefined-locale
Apr 11, 2025
Merged

fix(ubuntu_localizations): use fallback if locale is 'POSIX' or 'und'#476
d-loose merged 3 commits intocanonical:mainfrom
d-loose:handle-undefined-locale

Conversation

@d-loose
Copy link
Member

@d-loose d-loose commented Apr 10, 2025

If Intl.defaultLocale is initialized with und (undefined) or POSIX localizing a DateTime with DateFormat (and possibly other things) will throw an exception. See ubuntu/app-center#1659 for more details.

A simple workaround has been suggested here.

@d-loose d-loose requested a review from ashuntu April 10, 2025 14:33
Co-authored-by: ashuntu <ashton.nelson@canonical.com>
@d-loose d-loose requested a review from ashuntu April 11, 2025 08:25
Copy link
Contributor

@jpnurmi jpnurmi left a comment

Choose a reason for hiding this comment

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

Doing the fixup in findSystemLocale().then() would avoid unnecessarily calling findSystemLocale() when a specific locale is selected in the installer. 😉

@d-loose
Copy link
Member Author

d-loose commented Apr 11, 2025

Thanks :)

Copy link
Contributor

@jpnurmi jpnurmi left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@d-loose d-loose merged commit 240cdc0 into canonical:main Apr 11, 2025
8 of 10 checks passed
@d-loose d-loose deleted the handle-undefined-locale branch April 11, 2025 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants