Internationalisation of bzr cli

Stephen J. Turnbull stephen at xemacs.org
Mon May 2 16:03:08 UTC 2011


Martin Pool writes:

 > > if __debug__:
 > >    _i18n = _
 > >
 > > No?
 > 
 > No.  There is some special magic behaviour in the Python repl where _
 > gets rebound during each evaluation, and this interferes with its use
 > as a variable in the code under inspection (or vice versa).

Right.  So you use _i18n() from the interpreter, that's what the
assignment is for.  In the module, however, it can be _() as Brahma
intended it to be, I am pretty sure.

 > As bzr-gtk uses _i18n() that sounds like a pretty good precedent.

When calling it by hand, the right usage is _l10n() anyway. ;-)




More information about the bazaar mailing list