Add message catalog builds to CI, and run all tests from a runner script to enable test/build addition purely from the source tree.

This commit is contained in:
Dave Page
2017-03-31 12:13:30 -04:00
parent 08ff9d7422
commit b6fa5f5b33
2 changed files with 42 additions and 0 deletions

15
ci/update_messages.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
echo "################################################################################"
echo "Extracting, merging and compiling strings..."
echo "################################################################################"
echo
. $WORKSPACE/pgadmin-venv/bin/activate
cd $WORKSPACE/web
pybabel extract -F babel.cfg -o pgadmin/messages.pot pgadmin || { echo 'Failed to extract messages from the source code.' ; exit 1; }
pybabel update -i pgadmin/messages.pot -d pgadmin/translations || { echo 'Failed to update message catalogs from the template.' ; exit 1; }
pybabel compile -d pgadmin/translations || { echo 'Failed to compile the message catalogs.' ; exit 1