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

Angular localize/i18n since v14 release can't locate en-US locale even if it exists #23334

Closed
MitchellCash opened this issue Jun 9, 2022 · 1 comment · Fixed by #23335
Closed
Assignees
Labels
area: devkit/build-angular freq1: low Only reported by a handful of users who observe it rarely severity5: regression type: bug/fix

Comments

@MitchellCash
Copy link

Which @angular/* package(s) are the source of the bug?

localize

Is this a regression?

Yes

Description

Running a simple Angular project with the localize package with a source locale of en-US and any number of translation languages throws a warning:

Locale data for 'en-US' cannot be found. Using locale data for 'en'.

This can even be seen in Angular's own example localized app found here https://angular.io/guide/i18n-example (StackBlitz: https://angular.io/generated/live-examples/i18n/stackblitz.html).

I forked this StackBlitz project and dropped all of the @angular/* packages back to v13 and the warning disappears so it looks like a clear regression.

Please provide a link to a minimal reproduction of the bug

Your own example: https://angular.io/generated/live-examples/i18n/stackblitz.html

Please provide the exception or error you saw

Locale data for 'en-US' cannot be found.  Using locale data for 'en'.

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 14.0.1
Node: 16.14.2
Package Manager: npm 7.17.0 
OS: linux x64

Angular: 14.0.1
... animations, cli, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1400.1
@angular-devkit/build-angular   14.0.1
@angular-devkit/core            14.0.1
@angular-devkit/schematics      14.0.1
@schematics/angular             14.0.1
rxjs                            7.5.5
typescript                      4.7.3

Anything else?

No response

@alan-agius4 alan-agius4 transferred this issue from angular/angular Jun 9, 2022
@alan-agius4 alan-agius4 added type: bug/fix freq1: low Only reported by a handful of users who observe it rarely severity5: regression area: devkit/build-angular and removed comp: i18n labels Jun 9, 2022
@alan-agius4 alan-agius4 self-assigned this Jun 9, 2022
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jun 9, 2022
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jun 9, 2022
Pre version 14, the locale for `en-US` was `en-US-POSIX`. now in version 14, this has changed to `en-US`.

List of all available locales https://github.com/unicode-org/cldr-json/blob/7033ea9b03aad6ef9cc64057d9cb88fec3fecc53/cldr-json/cldr-core/availableLocales.json#L64

Closes angular#23334
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jun 9, 2022
Pre version 14, the locale for `en-US` was `en-US-POSIX`. now in version 14, this has changed to `en-US`.

List of all available locales https://github.com/unicode-org/cldr-json/blob/7033ea9b03aad6ef9cc64057d9cb88fec3fecc53/cldr-json/cldr-core/availableLocales.json#L64

Closes angular#23334
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jun 9, 2022
Pre version 14, the locale for `en-US` was `en-US-POSIX`. now in version 14, this has changed to `en-US`.

List of all available locales https://github.com/unicode-org/cldr-json/blob/7033ea9b03aad6ef9cc64057d9cb88fec3fecc53/cldr-json/cldr-core/availableLocales.json#L64

Closes angular#23334
clydin pushed a commit that referenced this issue Jun 9, 2022
Pre version 14, the locale for `en-US` was `en-US-POSIX`. now in version 14, this has changed to `en-US`.

List of all available locales https://github.com/unicode-org/cldr-json/blob/7033ea9b03aad6ef9cc64057d9cb88fec3fecc53/cldr-json/cldr-core/availableLocales.json#L64

Closes #23334
clydin pushed a commit that referenced this issue Jun 9, 2022
Pre version 14, the locale for `en-US` was `en-US-POSIX`. now in version 14, this has changed to `en-US`.

List of all available locales https://github.com/unicode-org/cldr-json/blob/7033ea9b03aad6ef9cc64057d9cb88fec3fecc53/cldr-json/cldr-core/availableLocales.json#L64

Closes #23334

(cherry picked from commit 1f66ede)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: devkit/build-angular freq1: low Only reported by a handful of users who observe it rarely severity5: regression type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants