Split translation strings between multiple domains

This breaks translation processing; multi-domain support needs to be added to
Flask-Babel. The changes made here put the "important" strings that are used
most often into the priority domain, and split the content from different
sub-urls into separate domains. Multi-domain support will be implemented such
that translations for a specific request are pulled both from the domain which
corresponds to the request url and the priority domain.

This does mean that there may be duplication of translation strings between
domains, but that is unavoidable (and the translators prefer working with
smaller resource files).
This commit is contained in:
str4d
2013-07-13 11:01:05 +00:00
parent 177aecb55c
commit f9c88aa795
15 changed files with 51 additions and 21 deletions

View File

@ -1,8 +1,14 @@
#!/bin/sh
. ./babel/translation.vars
. ./translation.vars
TZ=UTC ./pybabel extract --msgid-bugs-address="http://trac.i2p2.de" \
if [ ! -e $POTDIR ]; then
mkdir $POTDIR
fi
for domain in $(ls $BABELCFG); do
TZ=UTC ./pybabel extract --msgid-bugs-address="http://trac.i2p2.de" \
--project=$PROJECT \
--version=$VERSION \
-F $BABELCFG \
-o $POTFILE $PROJDIR
-F $BABELCFG/$domain \
-o $POTDIR/$domain.pot $PROJDIR
done