Skip to content

Merges XLIFF 1.2/2.0 files. Usable for Angular i18n automation.

License

Notifications You must be signed in to change notification settings

gergely-gyorgy-both/xliff-simple-merge

 
 

Repository files navigation

npm Coverage Status Language grade: JavaScript

XLIFF Simple Merge

This program automates the merging of XLIFF files (version 1.2 and 2.0). New translations from the input file (e.g. "messages.xlf") are merged into the destination file (e.g "messages.fr-FR.xlf"), while keeping exising translations intact. Removed translations will be removed in the input file.

This can be used as post-processing to angular i18n extraction, to update translations files.

Angular users: It is recommended to not use this program directly but the custom angular tooling: ng-extract-i18n-merge

Usage

Either install via npm i -g xliff-simple-merge or run directly with npx xliff-simple-merge.

Options:
  -i, --input-file <inputFile>              input file/merge origin
  -d, --destination-file <destinationFile>  merge destination
  -o, --output-file <outputFile>            output file, if not provided "merge destination" is overwritten
  --no-match-fuzzy                          prevent fuzzy matching of similar units with changed id
  --no-collapse-whitespace                  prevent collapsing of multiple whitespaces when comparing translations sources
  --no-reset-translation-state              prevent (re-)setting the translation state to new/initial for new/changed units
  --no-replace-apostrophe                   prevent replacing of apostrophes (') with "&apos;"
  --debug                                   enable debug output
  -h, --help                                display help for command

About

Merges XLIFF 1.2/2.0 files. Usable for Angular i18n automation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.5%
  • JavaScript 1.5%