From 74fd1488417bdca2008fbdad3b29f1ab9a5bd9be Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Mon, 29 Sep 2014 15:56:01 +0200 Subject: clean up fetch translations script --- main/misc/fetchtranslations.sh | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'main') diff --git a/main/misc/fetchtranslations.sh b/main/misc/fetchtranslations.sh index a26f28e5..c0917027 100755 --- a/main/misc/fetchtranslations.sh +++ b/main/misc/fetchtranslations.sh @@ -11,18 +11,13 @@ echo "Fetch translation archive" fetch -q http://crowdin.net/download/project/ics-openvpn.zip - -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 typeset -A langhash langhash=(zh-CN zh-rCN zh-TW zh-rTW id-ID in ca-ES ca cs-CZ cs et-EE et ja-JP ja ko-KR ko sv-SE sv uk-UA uk) langtoinclude="de es fr hu it no nl pl pt ro ru tr" + for lang in $langtoinclude ${(k)langhash} do if (( ${+langhash[$lang]} )); then @@ -31,9 +26,9 @@ do else alang=$lang-${lang:u} rlang=$lang - fi + fi - tar -xv -C src/main/res/values-$rlang/ --strip-components 3 -f ics-openvpn.zip res/values-$alang/ + tar -xv -C src/main/res/values-$rlang/ --strip-components 3 -f ics-openvpn.zip res/values-$alang/ done -rm -v ics-openvpn.zip +rm ics-openvpn.zip -- cgit v1.2.3