@narando/lint-i18n
v0.36.0
Published
Lint your locale files
Keywords
Readme
@narando/lint-i18n
A script to parse language locales and find not matching translation keys. This can be used to test your locale files at your cli tool
Usage
You need to have nodejs and npm installed.
$ npm -g i @narando/lint-i18nCommands
-V, --version output the version number
-d, --dir [directory] specify locales folder [./app/locales] (default: "./app/locales")
-h, --help output usage informationExample
This example is made with the fixtures which are used at the tests.
Commandline:
$ lint-i18n --dir ./tests/fixtures/locales/notEqualLocalesOutput:
Found 3 missing translation keys for language en_US:
ns2:text5
ns2:text6
ns2:text7Commandline:
$ lint-i18n --dir ./tests/fixtures/locales/equalLocalesOutput:
Yeahy! No keys are missing!