File tree Expand file tree Collapse file tree 1 file changed +20
-15
lines changed Expand file tree Collapse file tree 1 file changed +20
-15
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/zsh
2
2
3
+ set -e
4
+
3
5
LANGUAGES=(ar es ru en zh-Hans nl fr de it nb pl ru es ja pt-BR vi da sv fi ro tr he sk)
4
6
5
7
argstring=" ${LANGUAGES[@]/#/ -exportLanguage } "
6
8
IFS=" " ; args=( $=argstring )
7
9
8
- xcodebuild -exportLocalizations -localizationPath xlocs $args
9
-
10
- # mkdir -p xliff
11
- # find xclocs -name '*.xliff' -exec cp {} xliff \;
12
- #
13
- # cd xliff
14
- #
15
- # foreach lang in $LANGUAGES
16
- # echo lokalise2 \
17
- # --token $LOKALISE_TOKEN \
18
- # --project-id 8069387863cdd837d11dd0.82955128 \
19
- # file upload \
20
- # --file ${lang}.xliff \
21
- # --lang-iso ${lang}
22
- # end
10
+ xcodebuild -exportLocalizations -localizationPath xclocs $args
11
+
12
+ mkdir -p xliff
13
+ find xclocs -name ' *.xliff' -exec cp {} xliff \;
14
+
15
+ cd xliff
16
+
17
+ foreach lang in $LANGUAGES
18
+
19
+ lang_iso=$( sed " s/zh-Hans/zh_Hans_CN/g; s/pt-BR/pt_BR/g" <<< " $lang" )
20
+
21
+ lokalise2 \
22
+ --token $LOKALISE_TOKEN \
23
+ --project-id 8069387863cdd837d11dd0.82955128 \
24
+ file upload \
25
+ --file ${lang} .xliff \
26
+ --lang-iso ${lang_iso}
27
+ end
You can’t perform that action at this time.
0 commit comments