4 ROOT=$(git rev-parse --show-toplevel)
5 DST=`mktemp -d`/wl-lokalizacja
12 for appdir in $ROOT/apps/*; do
13 app=`basename $appdir`
14 if [ -d $ROOT/apps/$app/locale ]; then
15 for langdir in $ROOT/apps/$app/locale/*; do
16 lang=`basename $langdir`
18 cp -v ${ROOT}/apps/${app}/locale/${lang}/LC_MESSAGES/django.po $DST/${lang}/${app}.po
23 for langdir in $ROOT/wolnelektury/locale-contrib/*/; do
24 lang = `basename $langdir`
26 cp -v "${langdir}LC_MESSAGES/django.po" "${DST}/$lang/contrib.po"
29 cp -v ${ROOT}/wolnelektury/static/js/locale.js $DST/locale.js.txt
30 cp -v ${ROOT}/apps/infopages/fixtures/infopages.json $DST/infopages.json
32 ${0}-json.py $DST/infopages.json
39 if [ -e "$i/locale" ]; then
40 echo "Generate po for app $i"
41 ( cd $i; $MANAGE makemessages --all;
44 echo "Skipping app $i"
50 pybabel extract -F "$ROOT/babel.cfg" \
51 -o "$ROOT/wolnelektury/locale-contrib/django.pot" \
52 "`python -c 'import os,allauth; print os.path.dirname(allauth.__file__)'`"
53 pybabel update -D django -i "$ROOT/wolnelektury/locale-contrib/django.pot" \
54 -d "$ROOT/wolnelektury/locale-contrib"
59 PACK=`pwd`/wl-lokalizacja.zip
60 ( cd $DST; cd ..; zip -r $PACK wl-lokalizacja; )