Author: pjenvey
Date: 2008-11-17 16:01:24 -0700 (Mon, 17 Nov 2008)
New Revision: 3675
Removed:
FormEncode/trunk/regen-lang
Modified:
FormEncode/trunk/docs/Validator.txt
FormEncode/trunk/setup.cfg
Log:
integrate babel, with new translator docs
Modified: FormEncode/trunk/docs/Validator.txt
===================================================================
--- FormEncode/trunk/docs/Validator.txt 2008-11-17 20:46:29 UTC (rev 3674)
+++ FormEncode/trunk/docs/Validator.txt 2008-11-17 23:01:24 UTC (rev 3675)
@@ -550,12 +550,11 @@
translation (where ``<lang>`` is you language code)::
$ svn co http://svn.formencode.org/FormEncode/trunk/``
- $ cd formencode/i18n
- $ mkdir <lang>/LC_MESSAGES
- $ cp FormEncode.pot <lang>/LC_MESSAGES/FormEncode.po
- $ emacs <lang>/LC_MESSAGES/FormEncode.po # or whatever editor you prefer
- # make the translation
- $ python msgfmt.py <lang>/LC_MESSAGES/FormEncode.po
+ $ easy_install Babel
+ $ python setup.py init_catalog -l <lang>
+ $ emacs formencode/i18n/<lang>/LC_MESSAGES/FormEncode.po # or whatever
+ # editor you prefer make the translation
+ $ python setup.py compile_catalog -l <lang>
Then test, and send the PO and MO files to [EMAIL PROTECTED]
Deleted: FormEncode/trunk/regen-lang
===================================================================
--- FormEncode/trunk/regen-lang 2008-11-17 20:46:29 UTC (rev 3674)
+++ FormEncode/trunk/regen-lang 2008-11-17 23:01:24 UTC (rev 3675)
@@ -1,23 +0,0 @@
-#!/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
Modified: FormEncode/trunk/setup.cfg
===================================================================
--- FormEncode/trunk/setup.cfg 2008-11-17 20:46:29 UTC (rev 3674)
+++ FormEncode/trunk/setup.cfg 2008-11-17 23:01:24 UTC (rev 3675)
@@ -41,3 +41,27 @@
[nosetests]
detailed-errors = 1
+
+# Babel configuration
+[compile_catalog]
+domain = FormEncode
+directory = formencode/i18n
+statistics = true
+
+[extract_messages]
+add_comments = TRANSLATORS:
+output_file = formencode/i18n/FormEncode.pot
+charset = utf-8
+msgid_bugs_address = [EMAIL PROTECTED]
+width = 80
+
+[init_catalog]
+domain = FormEncode
+input_file = formencode/i18n/FormEncode.pot
+output_dir = formencode/i18n
+
+[update_catalog]
+domain = FormEncode
+input_file = formencode/i18n/FormEncode.pot
+output_dir = formencode/i18n
+previous = true
-------------------------------------------------------------------------
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-CVS mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/formencode-cvs