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

[Microproject] describe: pluralize tag/commit count messages

From
ABAntoni Borowski <antekborowski11@gmail.com>
Date
Oct 13, 2026, 20:43 UTC
Message-ID
<20261013204351.428800-1-antekborowski11@gmail.com>

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
Next: Jeff King
Message 1 of 8 in “[Microproject] describe: pluralize tag/commit count messages”
  1. Antoni BorowskiOct 13, 2026
  2. Jeff KingOct 14, 2026
  3. Junio C HamanoOct 14, 2026
  4. [Microproject] describe: do not translate --debug outputAntoni Borowski, Oct 16, 2026
  5. Junio C HamanoOct 16, 2026
  6. [Microproject v2] describe: do not translate --debug outputAntoni Borowski, Oct 16, 2026
  7. Junio C HamanoNov 7, 2026
  8. Junio C HamanoNov 7, 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.