On Wed, Apr 29, 2009 at 2:18 PM, Trey Roessig <[email protected]> wrote:
> On Wed, Apr 29, 2009 at 11:46 AM, Steve Borho <[email protected]> wrote:
>>> +        if sumlen and len(lines[0].rstrip()) > sumlen:
>>> +            resp = Confirm(_('Commit'), [], self,
>>> +                           _('The summary line length of %i is greater 
>>> than'
>>> +                             ' %i.  Would you like to continue?' %
>>
>> The gettext wrapper _() should only go around the string.
>
> Just to be sure I understand, you'd want to see
>
>  _("This is my value: %i") % val
>
> instead of
>
>  _("This is my value: %i" % val)
>
> Correct?  No problem at all.  May I ask why?

the _() function is doing a string lookup for translation.  The only sane way
to do translations is to perform them before variable substitutions.

I noticed that one of these slipped by me in a previous patch in your
word wrap function.

--
Steve Borho

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to