-
Notifications
You must be signed in to change notification settings - Fork 26
/
getlangs
executable file
·55 lines (45 loc) · 1.01 KB
/
getlangs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
languages=(
'ar::ar_AR'
'bg::bg_BG'
'da::da_DK'
'de::de_DE'
'es::es_ES'
'en-nz::en_NZ'
'fa::fa_IR'
'fr::fr_FR'
'he::he_IL'
'hu::hu_HU'
'it::it_IT'
'ja::ja_JA'
'nl::nl_NL'
'nb::nb_NO'
'pl::pl_PL'
'pt-br::pt_BR'
'pt::pt_PT'
'ro::ro_RO'
'ru::ru_RU'
'sv::sv_SE'
'tr::tr_TR'
'zh-cn::zh_CN'
)
exts=( po mo )
mkdir -p "languages"
if [ -d languages ]
then
cd languages
for ext in "${exts[@]}"
do :
rm -rf "*.${ext}"
done
fi
for index in "${languages[@]}" ; do
KEY="${index%%::*}"
LOCALE="${index##*::}"
#url="https://translate.wordpress.org/projects/wp-plugins/codepress-admin-columns/stable/${KEY}/default/export-translations/"
url="https://translate.wordpress.org/projects/wp-plugins/codepress-admin-columns/stable/${KEY}/default/export-translations/?format="
for ext in "${exts[@]}"; do
curl $url$ext --silent --output codepress-admin-columns-$LOCALE.$ext &
done
done
wait