diff options
author | Parménides GV <parmegv@sdf.org> | 2014-06-16 14:13:06 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2014-06-16 14:13:06 +0200 |
commit | 2a711c010c721cfa477da6bb6dfed3f508359ad5 (patch) | |
tree | 5b1bb1889d7d55bfef4504faa777b3e5fc95e02d /app/misc/fetchtranslations.sh | |
parent | d09435a9d2adb0d0cafa0b1f9f6cfe326346cbc6 (diff) |
Succesfully updated.
Diffstat (limited to 'app/misc/fetchtranslations.sh')
-rwxr-xr-x | app/misc/fetchtranslations.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/app/misc/fetchtranslations.sh b/app/misc/fetchtranslations.sh new file mode 100755 index 00000000..d92c24b5 --- /dev/null +++ b/app/misc/fetchtranslations.sh @@ -0,0 +1,38 @@ +#! /bin/sh + + +if [ "$ICSCROWDAPIKEY" != "" ] +then + echo "Generating new translation archives" + fetch -q -1 -o - http://api.crowdin.net/api/project/ics-openvpn/export?key=$ICSCROWDAPIKEY +fi + +echo "Fetch translation archive" +fetch -q http://crowdin.net/download/project/ics-openvpn.zip + +langtoinclude="ca cs de es et fr id it ja ko no nl pl ro ru sv tr uk" + +for lang in $langtoinclude +do + tar -xvf ics-openvpn.zip -C src/main res/values-$lang/ +done + +# Chinese language require zh-CN and zh-TW + +for lang in zh-CN zh-TW id +do + if [ $lang = "zh-CN" ] ; then + rlang="zh-rCN" + elif [ $lang = "zh-TW" ] ; then + rlang="zh-rTW" + elif [ $lang = "id" ] ; then + rlang="id" + fi + + echo "Fetch archive for $lang" + fetch http://crowdin.net/download/project/ics-openvpn/$lang.zip + tar -xv -C src/main/res/values-$rlang/ --strip-components 3 -f $lang.zip + rm $lang.zip +done + +rm -v ics-openvpn.zip |