Skip to content

fix(@ngtools/webpack): do not change user's LOCALE_ID#8604

Merged
hansl merged 1 commit into
angular:masterfrom
ocombe:fix/locale_id-compiler
Nov 23, 2017
Merged

fix(@ngtools/webpack): do not change user's LOCALE_ID#8604
hansl merged 1 commit into
angular:masterfrom
ocombe:fix/locale_id-compiler

Conversation

@ocombe
Copy link
Copy Markdown
Contributor

@ocombe ocombe commented Nov 22, 2017

We need to normalize the locale to load i18n locale data files, but we should not change the actual user's locale that we pass to the compiler.

Fixes angular/angular#20340

// This transform must go before replaceBootstrap because it looks for the entry module
// import, which will be replaced.
if (this._compilerOptions.i18nInLocale) {
if (this._compilerOptions._normalizedLocale) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is _normalizedLocale a new option in AngularCompilerOptions?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems like he’s reading from the instance but setting in the options.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Surprised that this passes build.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sorry, my mistake, fixing this!

@hansl hansl merged commit b056b1d into angular:master Nov 23, 2017
@angular-automatic-lock-bot
Copy link
Copy Markdown

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 Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Angular 5.0.x - commonly used locales with regions e.g. es-ES, fr-FR, etc are now not accepted and switched to language only e.g. es, fr

4 participants