forked from Softcatala/LanguageToolAndroidService
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathi18n_update.sh
executable file
·21 lines (18 loc) · 894 Bytes
/
i18n_update.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
# Based on https://github.com/languagetool-org/languagetool-community-website/blob/master/i18n_update.sh
# Transifex username and password
USERNAME=jordimash
PASSWORD=`cat ~/.transifex_password`
# list of languages in the same order as on https://www.transifex.com/projects/p/languagetool/:
for lang in en ast be br ca zh da nl eo fr gl de el_GR it pl ru sl es tl uk ro sk cs sv is lt km pt_PT pt_BR fa
do
SOURCE=downloaded.tmp
curl --user $USERNAME:$PASSWORD https://www.transifex.com/api/2/project/languagetool/resource/lt-for-android/translation/$lang/?file >$SOURCE
localLang=$lang
if [ $lang = 'pt_PT' ]; then
# special case: if this is named pt_PT it never becomes active because we use "lang=xx" links
# in the web app that don't contain the country code:
localLang=pt
fi
cp $SOURCE CorrectorSoftcatala/src/main/res/values-$localLang/strings.xml
done