On Wed, Apr 29, 2009 at 2:37 PM, Germán Póo-Caamaño <[email protected]> wrote:
> On Wed, 2009-04-29 at 14:23 -0500, Steve Borho wrote:
>> 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.
>
> On the other hand, sometimes is useful add a comment for translators
> (before the _()).  It may give the a clue about what is supposed to be
> the variable.
>
> The way a variable is located in a sentence may be constructed different
> in a different language (i.e. right-to-left written).

So they can move the variable subst (%s) within the translated string?

--
Steve

------------------------------------------------------------------------------
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