daniel-sc / ng-extract-i18n-merge

Extract and merge i18n xliff translation files for angular projects.
MIT License
170 stars 18 forks source link

Same translation duplicated multiple times with different descriptions should be in different entries #70

Closed ramoncarreras closed 1 year ago

ramoncarreras commented 1 year ago

Describe the bug

If I have the same translation duplicated multiple times with different descriptions.

When I run the ng extract-i18n command, I would expect to get one entry for each translation because I want the translator to treat them differently as they are in different contexts and have different descriptions.

Setup/Configuration

You can see an example with the issue here:

https://github.com/ramoncarreras/ng-extract-i18n-merge-issue

Check the app.component.ts file.

Expected behavior

Create one entry for each translation because I want the translator to treat them differently as they are in different contexts and have different descriptions.

Screenshots

image

Version (please complete the following information):

Angular CLI: 16.0.3
Node: 18.15.0
Package Manager: npm 9.6.7
OS: darwin arm64

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

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1600.3
@angular-devkit/build-angular   16.0.3
@angular-devkit/core            16.0.3
@angular-devkit/schematics      16.0.3
@schematics/angular             16.0.3
rxjs                            7.8.1
typescript                      5.0.4
ramoncarreras commented 1 year ago

After investigating a little bit more, I have found the issue comes from Angular: https://github.com/angular/angular/issues/49564