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

Re: [PATCH] remote: use plural-only message for diverged branch status

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 16, 2026, 17:06 UTC
Message-ID
<xmqqms07putp.fsf@gitster.g>
In-Reply-To
<75c85249-1cff-425a-8e77-98d55215c324@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
Show 25 quoted lines
> On 15/03/2026 02:08, Junio C Hamano wrote:
>> Phillip Wood <phillip.wood123@gmail.com> writes:
>> 
>>> There can be more than one form of the plural string though. The gettext
>>> manual has the following example of the Polish translation of "file" for
>>> different numbers of files [1]
>>>
>>> 	1 plik
>>> 	2,3,4 pliki
>>> 	5-21 plików
>>> 	22-24 pliki
>>> 	25-31 plików
>>>
>>> ngettext() handles that correctly, translating a single string without
>>> an associated count will not.
>> 
>> That is a very interesting example, and a valid reason to have me
>> retract the #leftoverbits that led to the patch being discussed.
>> 
>> But wouldn't that lead to an awkward conclusion, i.e., hits from
>> "git grep '[^Q]_("[^"]*%[id]' \*.c" are potential bugs that need to
>> be updated to use ngettext().
>
> I think it does - maybe we should suggest fixing these as a miroproject 
> for GSoC and Outreachy? It certainly looks like there are plenty of them.

That would be great. It needs a bit of thinking, the required change for each of them is quite small, and there are tons of them. An ideal candidate for a microproject.

Adding it to the list of microproject ideas is a good #leftoverbits as well.

Show 20 quoted lines
>
> Thanks
>
> Phillip
>
>> Of course, we need to exclude messages like "the error code %d was
>> returned" and "you have a bug on line %d", but there seem to be real
>> errors in randomly selected hits from the "git grep" output, e.g.,
>> 
>> add-patch.c:						 _("Split into %d hunks."),
>> archive-zip.c:		return error(_("path too long (%d chars, SHA1: %s): %s"),
>> builtin/checkout.c:	    die(_("'%s' matched multiple (%d) remote tracking branches"),
>> builtin/credential-store.c:		die_errno(_("unable to get credential storage lock in %d ms"), timeout_ms);
>> builtin/describe.c:				_("found %i tags; gave up search at %s\n"),
>> builtin/fsck.c:		fprintf_ln(stderr, _("Checking connectivity (%d objects)"), max);
>> 
>> You can notice that I started from 'a' and stopped very early in 'b'
>> ;-).
>> 
>> Thanks.
Previous: Phillip WoodNext: Kaartic Sivaraam
Message 8 of 9 in “remote: use plural-only message for diverged branch status”
  1. remote: use plural-only message for diverged branch statusHarald Nordgren via GitGitGadget, Mar 14, 2026
  2. Harald NordgrenMar 14, 2026
  3. Junio C HamanoMar 14, 2026
  4. Junio C HamanoMar 14, 2026
  5. Phillip WoodMar 14, 2026
  6. Junio C HamanoMar 15, 2026
  7. Phillip WoodMar 16, 2026
  8. Junio C HamanoMar 16, 2026
  9. Kaartic SivaraamMar 25, 2026

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.