public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Junio C Hamano <gitster@pobox.com>,
	Harald Nordgren via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Harald Nordgren <haraldnordgren@gmail.com>
Subject: Re: [PATCH] remote: use plural-only message for diverged branch status
Date: Sat, 14 Mar 2026 20:08:15 +0000	[thread overview]
Message-ID: <ca6e021e-0301-496d-8bd1-b646487ccbf6@gmail.com> (raw)
In-Reply-To: <xmqqtsuiuugy.fsf@gitster.g>

On 14/03/2026 18:38, Junio C Hamano wrote:
> 
>      remote: don't use Q_() when it is not needed
> 
>      In this code path, both ours and theirs are already known to be
>      positive integers, so ours + theirs will always be plural, never
>      using the first variant given to Q_().
> 
>      Just use _() with the plural string only.

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.

Thanks

Phillip

[1] 
https://www.gnu.org/software/gettext/manual/gettext.html#Additional-functions-for-plural-forms

  reply	other threads:[~2026-03-14 20:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-14  9:12 [PATCH] remote: use plural-only message for diverged branch status Harald Nordgren via GitGitGadget
2026-03-14  9:16 ` [PATCH] checkout: add --autostash option for branch switching Harald Nordgren
2026-03-14 16:52 ` [PATCH] remote: use plural-only message for diverged branch status Junio C Hamano
2026-03-14 18:38   ` Junio C Hamano
2026-03-14 20:08     ` Phillip Wood [this message]
2026-03-15  2:08       ` Junio C Hamano
2026-03-16 10:49         ` Phillip Wood
2026-03-16 17:06           ` Junio C Hamano
2026-03-25  4:29             ` Kaartic Sivaraam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ca6e021e-0301-496d-8bd1-b646487ccbf6@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=haraldnordgren@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox