Re: [PATCH] remote.c: specify correct plural form in "commit diverge" message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 3, 2016 at 11:48 AM, Jeff King <peff@xxxxxxxx> wrote:
> On Tue, May 03, 2016 at 11:43:41AM +0700, Duy Nguyen wrote:
>
>> On Tue, May 3, 2016 at 11:20 AM, Jeff King <peff@xxxxxxxx> wrote:
>> > Note that I do not think the singular case can ever trigger with your
>> > new code. We know that both "ours" and "theirs" are non-zero to get to
>> > this message, which means "ours + theirs" must be at least 2 (barring
>> > negative commit counts, of course :) ).
>> >
>> > So you could probably replace the Q_() with just a _().
>>
>> Problem is there are languages with more than one plural form (and the
>> winner is Arabic with six(!) forms [1]). So even if singular form is
>> never used, I think we still should stick to Q_().
>
> Neat, I didn't know Q_() could handle that (I guess you are stuck
> specifying only the two cases in the untranslated form, but the PO files
> can do magic in the backend).
>
> It would be nice if there were some way to mark it as "this string will
> never be shown", or "will always be >= 2" as a hint for translators. I
> guess those can go in a specially-formatted comment.

Yep, that's the only way I know. But it's probably not good for this
purpose. Imagine if the code is moved around a bit and this exact
string can take n == 1 (probably not given the "x _and_ y commits"
pattern) then we need to tell all translators (optional hints are not
enough) to translate the "n < 2" part or empty string can be printed.
And at least in _() case, empty string is an indication of
untranslated messages, the translator would just translate anyway so
he/she can identify new messages easier.

On the practical side, since
this string has been here for a long time, it's been already
translated in all supported languages (except it.po), hinting now
won't help much (besides it.po)
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]