Internationalisation of bzr cli

INADA Naoki songofacandy at gmail.com
Mon May 2 13:47:01 UTC 2011


On Mon, May 2, 2011 at 10:13 PM, Alexander Belchenko <bialix at ukr.net> wrote:
> INADA Naoki пишет:
>> Preceding _ means "private" by tradition. So I prefer another name
>> like "N_()" as
>> pass through function. T_() for example.
>
> In QBzr N_() means mark string for translation but don't translate it
> right now. It's different from gettext() which marks string and
> translate it.
>
> But I'm still don't understand why you guys want to invent new names
> instead of standard names "gettext" and "ngettext"?

Yes, I see. I said about shortcut name of gettext should similar to N_.
But I think gettext is enough, too. So, -0.5 on _i18n (or other names
starting with _), +0.5 on T_ (or other names similar to N_), +1 to gettext.

>> BTW, should we use ngettext?
>
> IMO, yes, we should. I known at least 2 points in the bzr code where
> ngettext should be used.

Okey, I'll add ngettext.

>> pygettext doesn't support ngettext, so my i18n-implementation
>> <lp:~songofacandy/bzr/i18n-fromhg>
>> uses both custom script ported from hg and xgettext.
>> If we will not use ngettext, I can remove dependency for xgettext.
>> It is good for users on Windows.
>
> Why not add python equivalent of ngettext then?
>
> BTW, installing gettext utility is not "impossible" task:
> http://gnuwin32.sourceforge.net/packages/gettext.htm
>
> And those utility required only for developers or packagers who need
> update/compile translations. So why bother?
>

You're right.
Users building bzr or plugins needs msgfmt but doesn't need xgettext.
Depending to external tool  is not a large problem. I'll continue to
use xgettext.

-- 
INADA Naoki  <songofacandy at gmail.com>



More information about the bazaar mailing list