question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ng-xi18n: Merge/Update Existing Translations File (XLIFF)

See original GitHub issue

Bug 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:closed
  • Created 6 years ago
  • Reactions:19
  • Comments:16 (2 by maintainers)

github_iconTop GitHub Comments

33reactions
martinroobcommented, Aug 20, 2017

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)

24reactions
napalm684commented, Jun 2, 2017

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Hashnode Post

No results found