X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/e194da857835c3bd9dcbdc9faf39189b6ec514d3..b9dc6590aa12ae1b04e11dbb57684c5630c1e3bd:/scripts/save-locale-pack?ds=inline diff --git a/scripts/save-locale-pack b/scripts/save-locale-pack index 87a2ed3a4..69bc9e517 100755 --- a/scripts/save-locale-pack +++ b/scripts/save-locale-pack @@ -2,7 +2,7 @@ ME=$0 ROOT=$(git rev-parse --show-toplevel) -MANAGE=$ROOT/wolnelektury/manage.py +MANAGE=$ROOT/manage.py LOCALIZED=$1 if [ ! -d "$LOCALIZED" ]; then @@ -17,8 +17,8 @@ load_lang() for pofile in "$LOCALIZED/$L/"*.po; do app=`basename "$pofile" .po` echo $app - if [ "$app" = "wolnelektury" ]; then - cp -v "$pofile" "$ROOT/wolnelektury/locale/$L/LC_MESSAGES/django.po" + if [ "$app" = "contrib" ]; then + cp -v "$pofile" "$ROOT/wolnelektury/locale-contrib/$L/LC_MESSAGES/django.po" else cp -v "$pofile" "$ROOT/apps/$app/locale/$L/LC_MESSAGES/django.po" fi @@ -34,7 +34,11 @@ else done fi +cp -v ${ROOT}/apps/infopages/fixtures/infopages.json "$LOCALIZED/infopages.json" ${0}-json.py "$LOCALIZED/infopages.json" $LNG +if [ ! "$?" = 0 ]; then + exit 1; +fi cp -v "$LOCALIZED/infopages.json" ${ROOT}/apps/infopages/fixtures/infopages.json cp -v "$LOCALIZED/locale.js.txt" ${ROOT}/wolnelektury/static/js/locale.js @@ -42,5 +46,4 @@ for i in $ROOT/apps/*; do cd $i; env PYTHONPATH=$ROOT ${VIRTUAL_ENV}/bin/django-admin.py compilemessages --settings=wolnelektury.settings done -cd $ROOT/wolnelektury -env PYTHONPATH=$ROOT ${VIRTUAL_ENV}/bin/django-admin.py compilemessages --settings=wolnelektury.settings +pybabel compile -D django -d $ROOT/wolnelektury/locale-contrib