4 ROOT=$(git rev-parse --show-toplevel)
5 DST=`mktemp -d`/wl-lokalizacja
7 MANAGE=$ROOT/wolnelektury/manage.py
12 for langdir in $ROOT/wolnelektury/locale/*; do
13 lang=`basename $langdir`
15 cp -v ${ROOT}/wolnelektury/locale/${lang}/LC_MESSAGES/django.po $DST/${lang}/wolnelektury.po
18 for appdir in $ROOT/apps/*; do
19 app=`basename $appdir`
20 if [ -d $ROOT/apps/$app/locale ]; then
21 for langdir in $ROOT/apps/$app/locale/*; do
22 lang=`basename $langdir`
24 cp -v ${ROOT}/apps/${app}/locale/${lang}/LC_MESSAGES/django.po $DST/${lang}/${app}.po
29 for langdir in $ROOT/locale-contrib/*/; do
30 lang = `basename $langdir`
32 cp -v "${langdir}LC_MESSAGES/django.po" "${DST}/$lang/contrib.po"
35 cp -v ${ROOT}/wolnelektury/static/js/locale.js $DST/locale.js.txt
36 cp -v ${ROOT}/apps/infopages/fixtures/infopages.json $DST/infopages.json
38 ${0}-json.py $DST/infopages.json
44 echo "Generate po for WL"
45 $MANAGE makemessages --all
51 echo "Generate po for app $i"
52 ( cd $i; $MANAGE makemessages --all;
58 pybabel extract -F "$ROOT/babel.cfg" -o "$ROOT/locale-contrib/django.pot" \
59 "`python -c 'import os,allauth; print os.path.dirname(allauth.__file__)'`"
64 PACK=`pwd`/wl-lokalizacja.zip
65 ( cd $DST; cd ..; zip -r $PACK wl-lokalizacja; )