* [Microproject] describe: pluralize tag/commit count messages
@ 2026-10-13 20:43 Antoni Borowski
2026-10-14 9:29 ` Jeff King
0 siblings, 1 reply; 3+ messages in thread
From: Antoni Borowski @ 2026-10-13 20:43 UTC (permalink / raw)
To: git; +Cc: Antoni Borowski, Junio C Hamano, Josh Poimboeuf, Jeff King
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Microproject] describe: pluralize tag/commit count messages
2026-10-13 20:43 [Microproject] describe: pluralize tag/commit count messages Antoni Borowski
@ 2026-10-14 9:29 ` Jeff King
2026-10-14 17:36 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Jeff King @ 2026-10-14 9:29 UTC (permalink / raw)
To: Antoni Borowski; +Cc: git, Junio C Hamano, Josh Poimboeuf
On Tue, Oct 13, 2026 at 10:43:51PM +0200, Antoni Borowski wrote:
> 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.
OK. The patch looks obviously correct, though I do find it a little
funny that we bother to translate these debug messages in the first
place.
I wonder if there is even really value in keeping "--debug" here at all.
But that is a somewhat bigger change.
The patch here seems OK to me in the meantime (and totally fine for a
microproject).
-Peff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Microproject] describe: pluralize tag/commit count messages
2026-10-14 9:29 ` Jeff King
@ 2026-10-14 17:36 ` Junio C Hamano
0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2026-10-14 17:36 UTC (permalink / raw)
To: Jeff King; +Cc: Antoni Borowski, git, Josh Poimboeuf
Jeff King <peff@peff.net> writes:
> OK. The patch looks obviously correct, though I do find it a little
> funny that we bother to translate these debug messages in the first
> place.
>
> I wonder if there is even really value in keeping "--debug" here at all.
> But that is a somewhat bigger change.
>
> The patch here seems OK to me in the meantime (and totally fine for a
> microproject).
Yeah, but a microproject that convincingly argues that output from
the "--debug" option should not even be translated and undoes _()
would make a much better case to see how a new person works well ;-).
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-14 17:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-13 20:43 [Microproject] describe: pluralize tag/commit count messages Antoni Borowski
2026-10-14 9:29 ` Jeff King
2026-10-14 17:36 ` Junio C Hamano
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.