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
|
||||
project_identifier: rancher-ui
|
||||
base_path: /source
|
||||
base_path: /translations
|
||||
preserve_hierarchy: false
|
||||
|
||||
files:
|
||||
- source: "/translations/en-us.yaml"
|
||||
dest: "/ui.yaml"
|
||||
translation: "/translations/%locale%.yaml"
|
||||
ignore:
|
||||
- "*.md"
|
||||
- source: en-us.yaml
|
||||
dest: /ui.yaml
|
||||
translation: '%locale%.yaml'
|
||||
type: yaml
|
||||
update_option: update_as_unapproved
|
||||
languages_mapping:
|
||||
locale:
|
||||
de-DE: de-de
|
||||
en-US: en-us
|
||||
es-ES: es-es
|
||||
fa-IR: fa-ir
|
||||
fr-FR: fr-fr
|
||||
it-IT: it-it
|
||||
ja-JP: ja-jp
|
||||
hu-HU: hu-hu
|
||||
ko-KR: ko-kr
|
||||
nb-NO: nb-no
|
||||
nl-NL: nl-nl
|
||||
pt-BR: pt-br
|
||||
ru-RU: u-ru
|
||||
uk-UA: uk-ua
|
||||
ru-RU: ru-ru
|
||||
sv-SE: sv-se
|
||||
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