git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jeff King <peff@peff.net>
Date
May 3, 2016, 04:48 UTC
Message-ID
<20160503044805.GB32259@sigill.intra.peff.net>
In-Reply-To
<CACsJy8Bqs5dnKc=VPeuqPZ4OUWVdhYNbewWc5rs-R3FGoZuQ5g@mail.gmail.com>
On Tue, May 03, 2016 at 11:43:41AM +0700, Duy Nguyen wrote:
Show 11 quoted lines
> On Tue, May 3, 2016 at 11:20 AM, Jeff King <peff@peff.net> 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.

-Peff
Previous: Duy NguyenNext: Duy Nguyen
Message 7 of 8 in “bug: incorrect plurality of "commit" in git status”
  1. Alfonsogonzalez, Ernesto (GE Digital)May 2, 2016
  2. remote.c: specify correct plural form in "commit diverge" messageNguyễn Thái Ngọc Duy, May 3, 2016
  3. Stefan BellerMay 3, 2016
  4. Duy NguyenMay 3, 2016
  5. Jeff KingMay 3, 2016
  6. Duy NguyenMay 3, 2016
  7. Jeff KingMay 3, 2016
  8. Duy NguyenMay 3, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.