diff --git a/.po2tl.sh b/.po2tl.sh index feab1f5..63c0671 100755 --- a/.po2tl.sh +++ b/.po2tl.sh @@ -17,15 +17,19 @@ for file in ./translations-*.po; do stats=$(msgfmt --statistics ${file} 2>&1) numdone=$(echo ${stats%* translated*}) if [[ $numdone -le 5680 ]]; then + echo -e "\x1B[36mSKIPPING $file since it has less than 5680 strings translated\x1B[0m" continue fi if (( $(date -d $(awk '/PO-Revision-Date/{print $2}' ${file}) +%s) < $CI_PREV_BUILD_STARTED )); then + echo -e "\x1B[36mSKIPPING $file since it hasn't been changed since last CI\x1B[0m" continue fi + echo -e "\x1B[36mBUILDING $file \x1B[0m" 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}/* + echo "\t$(PATH=$(pwd)/renpy:${PATH} RENPY_DIR=$(pwd)/renpy python3 rttk-queerscriptors/mo2tl.py $(pwd)/game-source game.mo ${lang})" + echo "\t$(zip "${lang}.zip" game-source/game/tl/${lang}/*)" mv "${lang}.zip" "/var/www/queer/build/${CI_REPO_NAME}/${lang}.zip" + echo -e "\e[32mFINISHED $file\e[0m" done