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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not merging i18n descriptions #93

Open
co-dax opened this issue Dec 28, 2023 · 3 comments
Open

Not merging i18n descriptions #93

co-dax opened this issue Dec 28, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@co-dax
Copy link

co-dax commented Dec 28, 2023

The tool does not update "description" info in target language .xlf files when "description" part in i18n attribute is updated.
I am referring to DESCRIPTION part in the code example from below.

<div i18n="DESCRIPTION@@translation_item_id"> Some source language text... </div>

I do have the following options in angular.json file:
"includeContext": true

@co-dax co-dax added the bug Something isn't working label Dec 28, 2023
@daniel-sc daniel-sc self-assigned this Dec 31, 2023
@daniel-sc
Copy link
Owner

Hi @co-dax, I think this is covered by a unit test - can you give details on your full config and how to reproduce?

@co-dax
Copy link
Author

co-dax commented Jan 18, 2024

Hi @daniel-sc, you are right that it is covered by the unite test you mentioned above and I confirm the notes are update in the case in template translations but they are not updated when they change in .ts files as descirbed at the following link https://angular.io/guide/i18n-common-prepare#i18n-metadata-for-translation.
I am using the pattern: let title = $localize":Some notes/descriptions go here@@translation_id:The actual source text to be translated";
...and if in the pattern from above I change the part Some notes/descriptions go here then that change is not reflected in the merged file.

Please let me know if I am not clear.

@daniel-sc
Copy link
Owner

@co-dax I am slow again and still do not get your point.
The actual extraction of the i18n elements are done by the angular extract-i18n builder and should make no difference between ts and html.
Is it possible you re-used the "translation_id" at other places and did change the meaning only in one place? In this case, it is pure "luck" which meaning is picked by the extract-i18n builder..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants