2023-01-26 19:40:03 +00:00
|
|
|
pipeline:
|
|
|
|
build:
|
|
|
|
image: debian
|
|
|
|
commands:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install -y git gettext python3 libgl1 zip
|
|
|
|
- git clone https://lab.encryptionin.space/Queerscriptors/rttk-queerscriptors.git
|
|
|
|
- git clone https://lab.encryptionin.space/Queerscriptors/renpy.git
|
|
|
|
- git clone -b game ${CI_REPO_REMOTE} ./game-source
|
|
|
|
- >
|
2023-01-26 19:45:42 +00:00
|
|
|
for file in ./translations-*.po; do
|
2023-01-26 19:40:03 +00:00
|
|
|
file2=$${file%.po}
|
2023-01-26 19:45:42 +00:00
|
|
|
langcc=$${file2#\.\/translations\-}
|
2023-01-26 19:55:21 +00:00
|
|
|
if [ "$langcc" = "es_419" ]; then langcc="esla"; fi
|
2023-01-26 19:40:03 +00:00
|
|
|
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:
|
|
|
|
- /var/www/queer/build/${CI_REPO_NAME}:/var/www/queer/build/${CI_REPO_NAME}
|
|
|
|
|