Re: FormCode i18n - TurboGears
Ian Bicking <[email protected]>
| Newsgroups | gmane.comp.python.formencode |
|---|---|
| Message-ID | <[email protected]> |
Gregor Horvath wrote: > With this FormEncode can be used: > > * with a gettext function provided in the state object > > * with a gettext function provided in the builtin namespace > > * with a translation provided in the domain FormEncode for standalone > use, just place the compiled files in > /usr/share/locale/<lang>/LC_MESSAGES/FormEncode.mo > > * without any translation (fallback in stdtrans returns the plain > string), just like now > >> Additionally _() can be used around message in validators.py etc, so >> that extraction tools work, but that's generally all it will be used >> for. If there was a tool that could actually import the module and read > > ok. Then in validators.py a dummy _ function must be added > > def _(s): return s > > > I have a working prototype of the concept working, if this is ok for you > I would make a patch and testing/finalization. Sure, sounds good to me. -- Ian Bicking | [email protected] | http://blog.ianbicking.org ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV