[PATCH 9 of 9] scmutil: add bad character checking to checknewlabel

Wagner Bruna wagner.bruna+mercurial at gmail.com
Sat Oct 20 14:56:41 CDT 2012


Em 19-10-2012 17:18, Kevin Bullock escreveu:
> On Oct 19, 2012, at 1:41 PM, Matt Mackall wrote:
> 
>> On Fri, 2012-10-19 at 13:11 -0300, Wagner Bruna wrote:
>>>> +            raise util.Abort(_("%r cannot be used in a %s name" %
>>>> +                               (c, kind)))
>>
>>> The 'kind' became untranslated here.
>>
>> The infamous _("%s" % x). Check-code missed this because
>> of the line break.
> 
> Eep. Is changing this to `_("%s") % x` sufficient? I meant
> to do it that way to begin with, I promise...

It's not enough for the issues I raised ('tag' and 'bookmark' weren't
marked for translation in the new code; but building messages
word-by-word like that is essentially a big "no" translation-wise anyway
[1]), but it was actually committed correctly with respect to the _()
marking:

http://selenic.com/hg/rev/361ab1e2086f#l4.7

Matt mentioned check-code in a previous message, so I guess it found
that correctly.

Regards,
Wagner
1. http://www.gnu.org/software/gettext/manual/gettext.html#Preparing-Strings


More information about the Mercurial-devel mailing list