[Zope3-dev] i18n, unicode, and the underline

Gary Poster gary@modernsongs.com
Thu, 10 Apr 2003 18:19:10 -0400


Barry Warsaw wrote:
> Actually, pygettext is based on tokenize
 > ...snip...

Cool!  Thanks for the info.

>> ...snip...
>>Or is this too much DWIM ("Do what I mean")?
> 
> 
> I don't think you want to import the source code to extract the
> translatable strings.  There can be side effects and dependencies on
> imports that can cause you headaches.  A separate textual scanning
> process is probably going to be more robust in the long term.

Yeah, I thought a bit about the dependecies but then thought that since 
zcml forces "everything" (that is, at least the zcml's current 
definition of the important "everything") to load it might be ok...but I 
see what you mean: it does seem kinda shaky.

As far as shortening _(u"...") to _("..."), that is my vote, at least. :-)

Thanks

Gary