1.0.8 • Published 2 years ago

node-translation-scripts v1.0.8

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

Node Translation Scripts

i18n translation cli scripts

CLI

-h - help

Validate

--validate - Validates reference language against other translations

-r or --refLanguagePath - Path to root of directory with reference language

-t or --translationPaths - Paths to root of directories with translations delimited by comma

Export

--export - Exports translation data to specified languages

-r or --refLanguagePath - Path to root of directory with reference language

-t or --translationPaths - Paths to root of directories with translations delimited by comma

-k or --keepOriginalTranslations - Determines whether original translations should be preserved or not

-o or --outputPath - Path to output directory

-i or --includeReferenceLanguage - Include reference language

Import

--import - Imports translated data to specified directory

-i or --inputPath - Path to directory with translated files

-o or --outputPath - Path to output directory

-r or --referenceLanguage - Reference language (won't be imported)

-d or --dry - Dry run

Example

{
  ...
  "scripts": {
    "validate-translations": "node-translation-scripts --validate -r \"./public/locales/en/\" -t \"./public/locales/cs/\"",
    "validate-translations:dry": "node-translation-scripts --validate -r \"./public/locales/en/\" -t \"./public/locales/cs/\" --dry",
    "export-translations": "node-translation-scripts --export -r \"./public/locales/en/\" -t \"./public/locales/cs/\" -o \"./export/translations/\" -k -i",
    "import-translations": "node translation-scripts --import -i \"./export/translations\" -o \"./public/locales/\" -r \"en\""
  }
  ...
}
1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago