Internationalisation of bzr cli

Eli Zaretskii eliz at gnu.org
Fri Apr 29 07:10:25 UTC 2011


> Date: Fri, 29 Apr 2011 11:43:40 +1000
> From: Andrew Bennetts <andrew.bennetts at canonical.com>
> 
> jbowtie at amathaine.com wrote:
> > On Fri, Apr 29, 2011 at 12:16 PM, Martin Pool <mbp at canonical.com> wrote:
> > > As soon as you feel you're sufficiently on the right track, please
> > > propose your branch for merging and we can have a look in more detail.
> > >  You don't have to have i18d everything, or even one whole command,
> > > just enough to show the approach will basically work.
> > >
> > 
> > One of the issues is that docstrings don't interact well with gettext
> > - you need to monkey-patch inspect.getdoc to actually get those to
> > display correctly. Which might be where you start to see performance
> > issues.
> 
> Because getdoc strips the indentation of a multiline docstring, but we'd
> be wrapping _() around the literal string including indentation?
> 
> It seems to me that, ideally, changing the indentation of a docstring
> wouldn't affect the translations of that docstring.

Please consider also right-to-left scripts (such as Arabic, Farsi, or
Hebrew) when you design this.  And make sure you know exactly what
kind of text terminals you target for those scripts: those that are
bidi-aware (and thus the text should be output in the so-called
logical order, to be reordered for display by the terminal) or not (in
which case the text should be output in visual order, with all the
white space on the left already in it).

Many packages that use gettext ignore this issue altogether, which
makes those packages either unusable with the relevant translations,
or a grand-royal PITA for those translators who want to do a good job
for their respective locales.




More information about the bazaar mailing list