1.1.0 • Published 3 years ago

@keen.io/translations-cli v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@keen.io/translations-cli

Known Vulnerabilities

CLI allowing to merge translations jsons into one.

Installing

Can be installed globally with yarn:

yarn global @keen.io/translations-cli

or npm:

npm install -g @keen.io/translations-cli

Examples

After installation can be run with command:

keen-translations <SOURCE_DIR> <TARGET_FILE>

To run it, two arguments need to be set, SOURCE_DIR and TARGET_FILE. The script will take translations from TARGET_FILE(api call or json file) and merge it with translations locally, available in SOURCE_DIR. In the end in terminal diff between the files will be printed and in SOURCE_DIR new file will be created with two files merged(output.json);

Example:

keen-translations explorer/public/locales/en https://cdn.jsdelivr.net/npm/@keen.io/dashboard-creator@next/dist/locales/en/translation.json
keen-translations explorer/public/locales/en dashboard-creator/public/locales/en/translation.json