add dict for cc to renpy names
This commit is contained in:
parent
342fb87589
commit
f887e70f00
25
.po2tl.sh
Executable file
25
.po2tl.sh
Executable file
|
@ -0,0 +1,25 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
declare -A langnames=( ["es_491"]="spanish" ["pt_BR"]="brazilian_portuguese" ["ru"]="russian" ["pl"]="polish" )
|
||||||
|
|
||||||
|
for file in ./translations-*.po; do
|
||||||
|
file2=${file%.po}
|
||||||
|
langcc=${file2#\.\/translations\-}
|
||||||
|
if [[ -z ${langnames[$langcc]} ]]; then
|
||||||
|
lang=${langnames[$langcc]}
|
||||||
|
else
|
||||||
|
lang=$langcc
|
||||||
|
fi
|
||||||
|
|
||||||
|
stats=$(msgfmt --statistics $${file} 2>&1)
|
||||||
|
numdone=$(echo ${stats%* translated*})
|
||||||
|
if [ $numdone -le 5680 ]
|
||||||
|
then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
msgfmt "$file" -o game.mo
|
||||||
|
PATH=$(pwd)/renpy:${PATH} RENPY_DIR=$(pwd)/renpy python3 rttk-queerscriptors/mo2tl.py $(pwd)/game-source game.mo ${lang}
|
||||||
|
zip "${lang}.zip" game-source/game/tl/${lang}/*
|
||||||
|
mv "${lang}.zip" "/var/www/queer/build/${CI_REPO_NAME}/${lang}.zip"
|
||||||
|
done
|
|
@ -7,23 +7,7 @@ pipeline:
|
||||||
- git clone https://lab.encryptionin.space/Queerscriptors/rttk-queerscriptors.git
|
- git clone https://lab.encryptionin.space/Queerscriptors/rttk-queerscriptors.git
|
||||||
- git clone https://lab.encryptionin.space/Queerscriptors/renpy.git
|
- git clone https://lab.encryptionin.space/Queerscriptors/renpy.git
|
||||||
- git clone -b game ${CI_REPO_REMOTE} ./game-source
|
- git clone -b game ${CI_REPO_REMOTE} ./game-source
|
||||||
- >
|
- bash .po2tl.sh
|
||||||
for file in ./translations-*.po; do
|
|
||||||
file2=$${file%.po}
|
|
||||||
langcc=$${file2#\.\/translations\-}
|
|
||||||
if [ "$langcc" = "es_419" ]; then langcc="esla"; fi
|
|
||||||
stats=$(msgfmt --statistics $${file} 2>&1)
|
|
||||||
numdone=$(echo $${stats%* translated*})
|
|
||||||
echo $stats $numdone
|
|
||||||
if [ $numdone -le 5680 ]
|
|
||||||
then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
msgfmt "$file" -o game.mo
|
|
||||||
PATH=$(pwd)/renpy:$${PATH} RENPY_DIR=$(pwd)/renpy python3 rttk-queerscriptors/mo2tl.py $(pwd)/game-source game.mo $${langcc}
|
|
||||||
zip "$${langcc}.zip" game-source/game/tl/$${langcc}/*
|
|
||||||
mv "$${langcc}.zip" "/var/www/queer/build/${CI_REPO_NAME}/$${langcc}.zip"
|
|
||||||
done
|
|
||||||
volumes:
|
volumes:
|
||||||
- /var/www/queer/build/${CI_REPO_NAME}:/var/www/queer/build/${CI_REPO_NAME}
|
- /var/www/queer/build/${CI_REPO_NAME}:/var/www/queer/build/${CI_REPO_NAME}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue