[PATCH V5] mercurial: add debugextensions command (issue4676)

timeless timeless at gmail.com
Fri Sep 25 03:20:43 CDT 2015


Piotr wrote:
>> > +  show informations about active extensions
>> information
>
> Changed all "informations" to information in PATCH V6:P

:)

>> this should have _():
>> > +                    fm.plain(' (%s!)\n' % lasttestedversion)

a better example here for why there should be something is for
Spanish, where _('%s!') should be translated as 'ยก%s!'. (No, there's
no es.po at this time.)

>> a localization could use ` [%s]`, or need RTL markers, or various other
>> things.

>> Also, I'm really suspicious of putting the ()s into the individual
>> messages, instead of in a container.

The main takeaway here is that the ()s should only appear in an outer
message (possibly without _() annotations), as '%s (%s)' % (name,
state) -- this at least reduces the likelihood of a localization
messing things up (the odds of this are actually pretty high, and we
only have 12!).

>> a RTL language might want "[%s] foo" instead of "foo (%s)", which is
>> probably not possible w/ your current scheme.
>> normally this would be done as:
>> state=_("untested!")
>> fm.write('name', _("%s (%s)") % (name, state))

> From mpm respond i understood this localization issue is not important at
> the moment, so in PATCH V6 i leave this as it was.

mpm of course owns this project, and I can certainly clean this stuff
up later. But, I speak from many years of experience dealing w/ bad
localizations, and from having written tools to detect bad
localization practices.

I just sent another patch to fix another case of a localizer (Chinese
in this case) messing things up because the wrong pieces were put
within the scope of translation.

I'm offering the feedback, because there's some value in understanding
how localization works (and mostly, how it doesn't work).

anyway. don't worry about it. as I noted, I can clean this stuff up later.


More information about the Mercurial-devel mailing list