Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (39 sloc) 2.15 KB
{
"usage": [
" Usage:",
" translate-json [options] -l <language> (- | <input>) [<output>]",
" translate-json [options] --lang=<language> (- | <input>) [<output>]",
"",
" Options:",
" -t, --translator The translation service to use: google (default), yandex, bing.",
" -k, --api-key The API key to be used with the translation service. (Not needed for google.)",
" -p, --preserve-html-entities Preserve HTML entities in translated text. (False by default.)",
" -c, --concurrency Number of fields to translate simultaneously. (Default is 30)",
" -e, --exclude Regular expression to exclude key paths. e.g. '^(notThis|this|not.this.either)$'",
" -d, --dry-run Do not actually translate any values, prefix strings with 'zz_' to mark them.",
" -h, --help Show this screen.",
" -v, --version Show version.",
" --verbose Log more.",
"",
" Examples:",
" translate-json --lang=ru ./labels.json ./labels-ru.json",
" translate-json -d --lang=ru ./labels.json ./labels-ru.json",
" translate-json -c 60 --preserve-html-entities --lang=ru ./labels.json ./labels-ru.json",
" cat input.json | translate-json -l ru - > output.json"
],
"errors": {
"REQUIRED_PARAM_LANG": "Failed to specify a language to translate to. (--language)",
"REQUIRED_PARAM_INPUT": "Failed to specify an input file.",
"REQUIRED_PARAM_API_KEY": "You specified %s as a translator, but did not specify an API key. (Use -k)",
"INVALID_TRANSLATOR": "The translation API you specified is not valid. Please use google (default), yandex, or bing.",
"INVALID_STD_INPUT": "Could not read stdin.",
"INVALID_INPUT": "%s is not a file",
"INVALID_JSON_DOC": "%s is not a JSON document"
},
"messages": {
"SUCCESS": "Successfully wrote translated file to %s.",
"TRANSLATING": "Fetching translations for %s fields.",
"DUPLICATE_COUNT": "Optimising... found %d duplicate values to translate.",
"TRANSFORMER_CHOICE": "Using '%s' transformer."
}
}
You can’t perform that action at this time.