Skip to content

vojtechportes/node-translation-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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\""
  }
  ...
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published