Ivy doesn't pick up translation files
See original GitHub issueš bug report
Affected Package
probably @angular/localize
Is this a regression?
in comparison to v8, yes
Description
Iām not sure is it a bug or problem with my configuration. Iām testing new translation features from v9 and set up a small application following this guide https://next.angular.io/guide/i18n#merge-the-completed-translation-file-into-the-app
I donāt have any error but the compiler says that translation is missed for all string, despite the fact that I provided xlf-file with translation.
Another interesting observation is that string ids are different from the specified in xlf-files, even the string with the fixed id resetButton has another id "resetButtonā878de3ad44e634ecaf219427d948689bd975e1afā1029122298839770722" in the message.
It looks like ids change every build and thatās probably the reason why compuler is unable to find translations, but itās only my gues
š¬ Minimal Reproduction
Hereās the test application Iām playing with https://github.com/fetis/ng9translation
Try ng serve -c=ru to see the problem. The locale is set to Russian but none of the strings are translated.
The same result for ng build --prod or ng build -c=ru
š Your Environment
Angular Version: Angular CLI: 9.0.0-rc.7 Node: 12.4.0 OS: darwin x64
Angular: 9.0.0-rc.7 ⦠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.7 @angular-devkit/build-angular 0.900.0-rc.7 @angular-devkit/build-optimizer 0.900.0-rc.7 @angular-devkit/build-webpack 0.900.0-rc.7 @angular-devkit/core 9.0.0-rc.7 @angular-devkit/schematics 9.0.0-rc.7 @angular/localize 9.0.0-rc.0 @ngtools/webpack 9.0.0-rc.7 @schematics/angular 9.0.0-rc.7 @schematics/update 0.900.0-rc.7 rxjs 6.5.3 typescript 3.6.4 webpack 4.41.2
Issue Analytics
- State:
- Created 4 years ago
- Comments:10

Top Related StackOverflow Question
I had the same problem. It turned out that
ng addadded some old rc0 version of @angular/localize. Upgrading to rc7 fixed the issue for me. Also it seemed to work with xlf2 format, even with the old @angular/localize version.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.