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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

ivy/i18n - LOCALE_ID does not get replaced when provided in the app.module #16626

Open
bboehm86 opened this issue Jan 10, 2020 · 0 comments
Open

ivy/i18n - LOCALE_ID does not get replaced when provided in the app.module #16626

bboehm86 opened this issue Jan 10, 2020 · 0 comments
Labels

Comments

@bboehm86
Copy link

@bboehm86 bboehm86 commented Jan 10, 2020

馃悶 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Yes. Without ivy enabled it works as before.

Description

When using Ivy and providing a LOCALE_ID in the app.module.ts (e.g. "en-US") and building/serving the app with a different i18nLocale (e.g. "de-DE") set in the angular.json file, the LOCALE_ID will always be the provided one of the app.module.ts (so "en-US"). The rest is ok (eg <html lang="de-DE"> and the translations...)

(When not providing a LOCALE_ID in the app.module.ts it does work correctly!)

馃敩 Minimal Reproduction

  1. Clone https://github.com/bboehm86/bug-angular-locale-id-build & npm install

  2. Run yarn start -c de (or yarn build -c de)

  3. Check the served site printing the current LOCALE_ID -> "en-US" but it should be "de-DE" as it was set in the angular.json for the de configuration

  4. Open the tsconfig.app.json and change "enableIvy": true to "enableIvy": false

  5. Run yarn start -c de (or yarn build -c de) again

  6. Check the served site printing the current and correct LOCALE_ID -> "de-DE"

馃敟 Exception or Error

馃實 Your Environment


Angular CLI: 9.0.0-rc.8
Node: 12.13.1
OS: linux x64

Angular: 9.0.0-rc.8
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.0-rc.8
@angular-devkit/build-angular     0.900.0-rc.8
@angular-devkit/build-optimizer   0.900.0-rc.8
@angular-devkit/build-webpack     0.900.0-rc.8
@angular-devkit/core              9.0.0-rc.8
@angular-devkit/schematics        9.0.0-rc.8
@angular/localize                 9.0.0-rc.0
@ngtools/webpack                  9.0.0-rc.8
@schematics/angular               9.0.0-rc.8
@schematics/update                0.900.0-rc.8
rxjs                              6.5.4
typescript                        3.6.4
webpack                           4.41.2

Anything else relevant?
If the change was intend it would be nice to mention it in the Update Guide :-)

@clydin clydin added the type: docs label Jan 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can鈥檛 perform that action at this time.