Skip to content

fix(i18n): handle POSIX locale values in getLocale(), closes #3518#3522

Merged
chrox merged 1 commit intoreadest:mainfrom
chrox:dev
Mar 12, 2026
Merged

fix(i18n): handle POSIX locale values in getLocale(), closes #3518#3522
chrox merged 1 commit intoreadest:mainfrom
chrox:dev

Conversation

@chrox
Copy link
Copy Markdown
Collaborator

@chrox chrox commented Mar 12, 2026

When LANG=C.UTF-8, navigator.language can return 'C' which is not a valid BCP 47 tag, causing Intl.NumberFormat and toLocaleString to throw. Normalize POSIX values (C, C.UTF-8, POSIX) to 'en-US' at the source.

…3518

When LANG=C.UTF-8, navigator.language can return 'C' which is not a
valid BCP 47 tag, causing Intl.NumberFormat and toLocaleString to throw.
Normalize POSIX values (C, C.UTF-8, POSIX) to 'en-US' at the source.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chrox chrox merged commit 9b53ccc into readest:main Mar 12, 2026
6 checks passed
@chrox chrox deleted the dev branch March 12, 2026 15:36
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.

1 participant