José de Paula Eufrásio Júnior schrieb: > > * How I i18n it? The messages, I mean.
You need this: http://svn.formencode.org/FormEncode/branches/gettext-enabled/ http://trac.turbogears.org/turbogears/ticket/1136 If your language is not translated yet (see the i18n dir in Formencode svn) than please consider to volunteer a translation: Basically you have to do: svn co http://svn.formencode.org/FormEncode/branches/gettext-enabled/ cd gettext-enabled/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 msgfmt.py <lang>/LC_MESSAGES/FormEncode.po TEST send the PO and MO files to: [EMAIL PROTECTED] DONE see also http://docs.python.org/lib/node738.html Optionally you can also add a test of your language to tests/test_i18n.py: ne = formencode.validators.NotEmpty() [...] def _test_lang(language, notemptytext): formencode.api.set_stdtranslation(languages=[language]) try: ne.to_python("") except formencode.api.Invalid, e: assert str(e) == notemptytext formencode.api.set_stdtranslation() #set back to defaults def test_de(): _test_lang("de", u"Bitte einen Wert eingeben") add: def test_<lang>(): _test_lang("<lang>", u"<translation of Not Empty Text in the language <lang>") -- Greg --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

