4 ROOT=$(git rev-parse --show-toplevel)
5 MANAGE=$ROOT/src/manage.py
8 if [ ! -d "$LOCALIZED" ]; then
9 echo "$0 w-lokalizacje [lang]"
17 for pofile in "$LOCALIZED/$L/"*.po; do
18 app=`basename "$pofile" .po`
20 if [ "$app" = "contrib" ]; then
21 cp -v "$pofile" "$ROOT/src/wolnelektury/locale-contrib/$L/LC_MESSAGES/django.po"
23 cp -v "$pofile" "$ROOT/src/$app/locale/$L/LC_MESSAGES/django.po"
28 if [ -n "$LNG" ]; then
31 echo "remember to update language list in this script"
32 for l in pl de en lt fr ru es uk jp it; do
37 cp -v ${ROOT}/src/infopages/fixtures/infopages.json "$LOCALIZED/infopages.json"
38 ${0}-json.py "$LOCALIZED/infopages.json" $LNG
39 if [ ! "$?" = 0 ]; then
42 cp -v "$LOCALIZED/infopages.json" ${ROOT}/src/infopages/fixtures/infopages.json
43 cp -v "$LOCALIZED/locale.js.txt" ${ROOT}/src/wolnelektury/static/js/locale.js
45 for i in $ROOT/src/*/; do
47 env PYTHONPATH=$ROOT ${VIRTUAL_ENV}/bin/django-admin.py compilemessages --settings=wolnelektury.settings
49 pybabel compile -D django -d $ROOT/src/wolnelektury/locale-contrib