xliff-reconcile
v1.0.34
Published
Reconcile xliff and resource files
Downloads
7
Readme
xliff-reconcile
This is an npm cli tool to sync the i18n xliff 1.2 files generated by Angular's i18n tool and java resource files. This idea was born from the need for translators whose process works with java resource files and not xliff. The 3 states that we will deal with are:
- new
- needs-translation: meaning strings that have been updated within the Angular project
- translated: the string has been synced to the resource file and is waiting for the translation. Note: this seems to be an odd choice, but we are limited by the tools that we use to sync the translations
- final: strings that have been translated via the resource file and merged back into the xliff file
The app will read the xliff file and resource file for a given language. 'new' strings will be added to the java resource file if not already there and set to 'x-in-translation'. For 'needs-translation' strings, the value in the resource file will be set to blank and the state set to 'x-in-translation'. For strings with state already set to 'x-in-translation', if a value exists in the resource file, it will be set in the xliff file.
Supports xliff 1.2 files and java resource files with utf-8 encoding.
The flow to publish is basically:
npm version patch
npm run build
npm publish