Internationalisation of bzr cli

Jelmer Vernooij jelmer at samba.org
Thu Apr 28 20:33:44 UTC 2011


Hi Martin,

On Thu, 2011-04-28 at 22:21 +0200, Martin Ueding wrote:
> are there any plans to internationalize the bazaar command line interface?
> 
> qbzr and the bazaar explorer are completely localized I think, but the
> command line is still English only.
> 
> On the IRC channel someone told me that gettext slowed bazaar down
> badly, would that still be an issue today?
Using gettext in a naive manner would slow bzr down enough that it would
be a problem. For example, a lot of the exceptions inside bzrlib have
English descriptions that may be displayed to the user but usually
they're caught by other code before they bubble up to the UI layer. If
we called gettext every single time such an exception object was created
it would slow Bazaar down significantly.

In the case of error handling it seems most sensible to make the top
level UI layer (which displays any unhandled exceptions) take care of
calling gettext.

There are also various trace commands or verbose options that can
display things but often won't. We need to watch out to not call gettext
too early.

gettext also used to be quite heavy to import but that doesn't appear to
be an issue anymore.

> I would like to contribute, maybe I could wrap strings in the codebase
> in the gettext() function. Is there something easy I could start with?
I think the first step is probably to write up a spec on how to approach
this without slowing Bazaar down. 

Various other people have also expressed interest in i18n'ing the bzr
UI. I think it would be a great feature to have.

Cheers,

Jelmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/bazaar/attachments/20110428/a8232eeb/attachment.pgp>


More information about the bazaar mailing list