Description
π bug report
Affected Package
The issue is caused by package @angular/localizeIs this a regression?
Yes, the previous version in which this bug was not present was: Angular v8Description
Xliff1TranslationParser assumes there's only one <file>
element in .xlf
file. When there's more of them, the this.bundle
is overridden.
Usually it's true for extracted files, but somehow in our app we managed to generate file with few <file>
attributes (it may be related to xliffmerge, but happened only for one language so far).
However while using angular 8 it used to work without any issues. While building the app using angular 9 we get warnings: No translation found for "<<id>>" ("<<msg>>")
. Resulting in missing translations.
Would be good if Angular 9 either support multiple <files>
or throw an exception so we can see the cause easily.
π¬ Minimal Reproduction
https://github.com/kamilchlebek/angular-xliff-issue
Steps:
ng build --localize
π₯ Exception or Error
No translation found for "5085648050787544850" ("child works!").
...
π Your Environment
Angular Version:
Angular CLI: 9.0.4
Node: 10.16.0
OS: linux x64
Angular: 9.0.4
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router
Ivy Workspace: Yes
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.900.4
@angular-devkit/build-angular 0.900.4
@angular-devkit/build-optimizer 0.900.4
@angular-devkit/build-webpack 0.900.4
@angular-devkit/core 9.0.4
@angular-devkit/schematics 9.0.4
@ngtools/webpack 9.0.4
@schematics/angular 9.0.4
@schematics/update 0.900.4
rxjs 6.5.4
typescript 3.7.5
webpack 4.41.2