mirror of https://github.com/rancher/ui.git
Add the script for updating i18n files
https://github.com/rancher/rancher/issues/10078
This commit is contained in:
parent
739c4ae59c
commit
a8af73be87
21
crowdin.yml
21
crowdin.yml
|
|
@ -1,24 +1,29 @@
|
||||||
api_key_env: CROWDIN_API_KEY
|
api_key_env: CROWDIN_API_KEY
|
||||||
project_identifier: rancher-ui
|
project_identifier: rancher-ui
|
||||||
base_path: /source
|
base_path: /translations
|
||||||
preserve_hierarchy: false
|
preserve_hierarchy: false
|
||||||
|
|
||||||
files:
|
files:
|
||||||
- source: "/translations/en-us.yaml"
|
- source: en-us.yaml
|
||||||
dest: "/ui.yaml"
|
dest: /ui.yaml
|
||||||
translation: "/translations/%locale%.yaml"
|
translation: '%locale%.yaml'
|
||||||
ignore:
|
|
||||||
- "*.md"
|
|
||||||
type: yaml
|
type: yaml
|
||||||
update_option: update_as_unapproved
|
update_option: update_as_unapproved
|
||||||
languages_mapping:
|
languages_mapping:
|
||||||
locale:
|
locale:
|
||||||
de-DE: de-de
|
de-DE: de-de
|
||||||
en-US: en-us
|
en-US: en-us
|
||||||
|
es-ES: es-es
|
||||||
fa-IR: fa-ir
|
fa-IR: fa-ir
|
||||||
fr-FR: fr-fr
|
fr-FR: fr-fr
|
||||||
|
it-IT: it-it
|
||||||
ja-JP: ja-jp
|
ja-JP: ja-jp
|
||||||
|
hu-HU: hu-hu
|
||||||
|
ko-KR: ko-kr
|
||||||
|
nb-NO: nb-no
|
||||||
|
nl-NL: nl-nl
|
||||||
pt-BR: pt-br
|
pt-BR: pt-br
|
||||||
ru-RU: u-ru
|
ru-RU: ru-ru
|
||||||
uk-UA: uk-ua
|
sv-SE: sv-se
|
||||||
zh-CN: zh-hans
|
zh-CN: zh-hans
|
||||||
|
zh-TW: zh-hant
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# cd to app root
|
||||||
|
CWD=$(dirname $0)
|
||||||
|
if [[ `basename $(pwd)` = 'scripts' ]]; then
|
||||||
|
cd ../
|
||||||
|
else
|
||||||
|
cd `dirname $CWD`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! "${CROWDIN_API_KEY}" ]]; then
|
||||||
|
echo Please setup CROWDIN_API_KEY
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker run -e CROWDIN_API_KEY \
|
||||||
|
-e PROJECT_IDENTIFIER=rancher-ui \
|
||||||
|
-v $(pwd)/translations:/translations \
|
||||||
|
-v $(pwd)/crowdin.yml:/opt/translations/crowdin.yml \
|
||||||
|
loganhz/crowdin-tool:v0.0.1 \
|
||||||
Loading…
Reference in New Issue