[PATCH STABLE] bundle2: localize "remote: "

Augie Fackler raf at durin42.com
Tue Aug 30 17:51:46 EDT 2016


On Tue, Aug 30, 2016 at 5:44 PM, Matt Mackall <mpm at selenic.com> wrote:
> On Tue, 2016-08-30 at 13:33 -0700, Gregory Szorc wrote:
>> # HG changeset patch
>> # User Gregory Szorc <gregory.szorc at gmail.com>
>> # Date 1472588883 25200
>> #      Tue Aug 30 13:28:03 2016 -0700
>> # Branch stable
>> # Node ID f7ec2b2f002750a7748dc5d0375035e181d1c3b0
>> # Parent  9a9629b9416c262ff62bbd17568fcd2a2e09b4be
>> bundle2: localize "remote: "
>>
>> We localize "remote: " everywhere else. This unlocalized use was
>> introduced in b7435117d951.

(I've dropped the patch from my queue for now.)

> Ok, this is slightly more informative than Akihiko's patch.. but I'm still not
> happy:
>
>> -        op.ui.status(('remote: %s\n' % line))
>
> See those extra parens? They were put there to defeat check-code, which reminds
> you to use _() in the first place. That is a signal to me that there was intent
> for this to NOT be translated.
>
> If you don't even mention the parens, I have to assume you didn't notice them
> and didn't consider the possibility that there was a reason for them.
>
>> +        op.ui.status('%s%s\n' % (_('remote: '), line))
>
> I'm not sure why you're doing the %s%s thing. It's more complex than necessary
> and the existing string literal is already translated elsewhere.
>
> --
> Mathematics is the supreme nostalgia of our time.
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list