managing translations
Ian Bicking <[email protected]> Sat, 15 Nov 2008 14:49:36 -0600
| Newsgroups | gmane.comp.python.formencode |
|---|---|
| Message-ID | <[email protected]> |
So, I think there's some out-of-date things with translations, and some patches to apply. I don't know much about translations, but here's a script I made to get the .pot file generated, and refresh .mo files from the .po files. Can someone tell me if this is the right way to do it? (I also committed it, as yet un-run, at http://svn.colorstudy.com/FormEncode/trunk/regen-lang) Ian ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ FormEncode-discuss mailing list FormEncode-discuss-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/formencode-discuss
regen-lang
(text/plain, 653 B)
#!/bin/sh
case "$1"
in
mo)
echo "Regenerating all .mo files"
for F in `find . -name '*.po'` ; do
DEST="`basename $F .po`.mo"
echo msgfmt "$F" -o "$DEST"
done
;;
gettext)
FILES="formencode/api.py formencode/compound.py formencode/fieldstorage.py
formencode/foreach.py formencode/national.py formencode/schema.py
formencode/validators.py"
echo pygettext $FILES --output=formencode/i18n/FormEncode.pot
;;
*)
echo "Error: unknown command $1"
echo "Usage: `basename $0` mo | gettext"
exit 2
;;
esac