summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-09-29 15:56:01 +0200
committerArne Schwabe <arne@rfc2549.org>2014-09-29 15:56:01 +0200
commit74fd1488417bdca2008fbdad3b29f1ab9a5bd9be (patch)
tree9faf56d4cd6234bd797fd64eb44edaa8ac41409c
parente0238be87de1b7690fd969e70ab0e29d25851652 (diff)
clean up fetch translations script
-rwxr-xr-xmain/misc/fetchtranslations.sh13
1 files changed, 4 insertions, 9 deletions
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