ng-xi18n: Merge/Update Existing Translations File (XLIFF)
See original GitHub issueBug Report or Feature Request (mark with an x)
- [ ] bug report -> please search issues before submitting
- [X ] feature request
Versions.
@angular/cli: 1.0.3 node: 7.7.3 os: win32 x64 @angular/common: 4.1.3 @angular/compiler: 4.1.3 @angular/core: 4.1.3 @angular/http: 4.1.3 @angular/platform-browser: 4.1.3 @angular/platform-browser-dynamic: 4.1.3 @angular/platform-server: 4.1.3 @angular/router: 4.1.3 @angular/compiler-cli: 4.1.3 @ngtools/webpack: 1.3.3
Repro steps.
Update an html view with a new translate-able field and re-generate xlf file. None of the translations are included if they were already done and marked target state as “translated”. No way to merge with an existing locale file either.
The log given by the failure.
No Failure
Desired functionality.
The ability to re-generate a translation file by adding the new items and preserving the items that are already translated.
Mention any other details that might be useful.
N/A
Issue Analytics
- State:
- Created 6 years ago
- Reactions:19
- Comments:16 (2 by maintainers)
Top Results From Across the Web
ng-i18n-merge-files - npm
This tool supports all the translation file formats accepted by Angular (ARB, JSON, XLIFF 1.2, XLIFF 2.0, and XTB (XMB)) .
Read more >Updates to i18n translation files in Angular - xliff - Stack Overflow
Edited answer. You can use the xliffmerge tool. It can merge translation files after you've added new translations in your html. Here is...
Read more >Angular i18n update workflow - DEV Community
You can easily extract translation texts from your templates with the ... new/removed/changed texts into already translated language files.
Read more >Using xliff | Transloco Angular i18n - GitHub Pages
Recipe - Using xliff | Transloco Angular i18n. ... xliff v2 //import xliff from "xliff/esm/xliff2js"; ... The translation file (xliff v1.2):.
Read more >Ng-extract-i18n-merge NPM
Additionally, translation files are normalized (pretty print, ... format, Inferred from current setup by ng add, Any of xlf , xlif , xliff...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
Top Related Hashnode Post
No results found

xliffmerge was originally inspired by a set of cheerio and grunt tooling. But I do not think it is a good idea to integrate tooling like gulp or grunt in a modern cli based angular project. Give xliffmerge a Chance. It is easy to integrate and does what you need. The latest version has a google translate integration and can pretranslate everything for you. (ok, I am Not neutral because I am the author of xliffmerge)
@glebmachine Yep this is the exact item I found which don’t get me wrong is an option but I kind of feel like this should be built into the Angular i18n tooling. I feel it doesn’t make a ton of sense to offer tools to generate translation files under the guise they will never need maintained. Sure manual merging will work but I think we can do better overall. A plugin is certainly an option but shouldn’t be necessary for such a basic requirement. Just my two cents.