Git development
 help / color / mirror / Atom feed
From: Antoni Borowski <antekborowski11@gmail.com>
To: git@vger.kernel.org
Cc: Antoni Borowski <antekborowski11@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	Josh Poimboeuf <jpoimboe@kernel.org>, Jeff King <peff@peff.net>
Subject: [Microproject] describe: pluralize tag/commit count messages
Date: Tue, 13 Oct 2026 22:43:51 +0200	[thread overview]
Message-ID: <20261013204351.428800-1-antekborowski11@gmail.com> (raw)

These two verbose messages hardcoded the English plural form
("tags"/"commits") inside _(), which is wrong both grammatically
(e.g. "found 1 tags") and for i18n, since other languages have
different plural rules than English.

Switch both to Q_() so gettext picks the correct singular/plural
form based on the count.

Signed-off-by: Antoni Borowski <antekborowski11@gmail.com>
---
 builtin/describe.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/builtin/describe.c b/builtin/describe.c
index c0abc931a5..9fbb982417 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -481,10 +481,12 @@ static void describe_commit(struct commit *cmit, struct strbuf *dst)
 				label_width, _(prio_names[t->name->prio]),
 				t->depth, t->name->path);
 		}
-		fprintf(stderr, _("traversed %lu commits\n"), seen_commits);
+		fprintf(stderr, Q_("traversed %lu commit\n",
+				   "traversed %lu commits\n", seen_commits), seen_commits);
 		if (gave_up_on) {
 			fprintf(stderr,
-				_("found %i tags; gave up search at %s\n"),
+				Q_("found %i tag; gave up search at %s\n",
+				   "found %i tags; gave up search at %s\n", max_candidates),
 				max_candidates,
 				oid_to_hex(&gave_up_on->object.oid));
 		}
-- 
2.56.0


                 reply	other threads:[~2026-10-13 20:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261013204351.428800-1-antekborowski11@gmail.com \
    --to=antekborowski11@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jpoimboe@kernel.org \
    --cc=peff@peff.net \
    /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