From e67abde6f74b8a8a3d541907fdd4dc6ed29dca91 Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Fri, 16 Dec 2016 17:02:23 +0100 Subject: [PATCH] Pull all catalogs and push back to git. --- ci/txpull.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/ci/txpull.sh b/ci/txpull.sh index 8e5c760e3..cddc543ef 100755 --- a/ci/txpull.sh +++ b/ci/txpull.sh @@ -11,5 +11,21 @@ git config --global http.sslVerify false export QT_SELECT=5 tx pull --force --source --all git add --verbose lang/calamares*.ts -git commit --author='Calamares CI ' --message='Automatic merge of Transifex translations' | true +git commit --author='Calamares CI ' --message='[core] Automatic merge of Transifex translations' | true + +for MODULE_DIR in `find src/modules -maxdepth 1 -mindepth 1 -type d`; do + FILES=(${MODULE_DIR}/*.py) + if [ ${#FILES[@]} -gt 0 ]; then + MODULE_NAME=$(basename ${MODULE_DIR}) + if [ -d ${MODULE_DIR}/lang ]; then + # Convert PO files to MO files + for POFILE in `find . -name "*.po"` ; do + msgfmt -o ${POFILE/.po/.mo} $POFILE + done + git add --verbose ${MODULE_DIR}/lang/* + git commit --author='Calamares CI ' --message="[${MODULE_NAME}] Automatic merge of Transifex translations" | true + fi + fi +done + git push --set-upstream origin master