Git development
 help / color / mirror / Atom feed
* [Outreachy] Introduction: Okhuomon Ajayi, microproject in delta-islands.c
@ 2026-10-13 14:25 Okhuomon Ajayi
  2026-10-13 16:49 ` [Outreachy PATCH] delta-islands: use Q_() for island count Okhuomon Ajayi
  2026-10-13 20:13 ` [Outreachy] Introduction: Okhuomon Ajayi, microproject in delta-islands.c Usman Akinyemi
  0 siblings, 2 replies; 8+ messages in thread
From: Okhuomon Ajayi @ 2026-10-13 14:25 UTC (permalink / raw)
  To: git

Hello everyone,

My name is Okhuomon Ajayi, you can call me Okhuomon. I'm an Outreachy
applicant for the December 2026 round and I'd like to contribute to
Git. I have cloned and built Git from source and gone through the
General Microproject Information page and the MyFirstContribution
tutorial.

For my microproject I intend to work on the "Fix improper pluralization
to use ngettext()" idea. In delta-islands.c the progress message
"Marked %d islands, done." is marked with _() although the number is a
count, so I plan to convert it to Q_() with singular and plural forms.
I found it with:

    git grep '[^Q]_("[^"]*%[id]' -- '*.c'

I searched the list archive for delta-islands and for ngettext/Q_
patches and did not find anyone working on this message. Please let me
know if I missed something.

Thanks,
Okhuomon

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Outreachy PATCH] delta-islands: use Q_() for island count
  2026-10-13 14:25 [Outreachy] Introduction: Okhuomon Ajayi, microproject in delta-islands.c Okhuomon Ajayi
@ 2026-10-13 16:49 ` Okhuomon Ajayi
  2026-10-13 18:00   ` Junio C Hamano
  2026-10-13 20:30   ` [Outreachy PATCH v2] " Okhuomon Ajayi
  2026-10-13 20:13 ` [Outreachy] Introduction: Okhuomon Ajayi, microproject in delta-islands.c Usman Akinyemi
  1 sibling, 2 replies; 8+ messages in thread
From: Okhuomon Ajayi @ 2026-10-13 16:49 UTC (permalink / raw)
  To: git
  Cc: christian.couder, usmanakinyemi202, siddharthasthana31,
	kaartic.sivaraam, Okhuomon Ajayi

The progress message "Marked %d islands, done." is marked for
translation with _(), which gives translators a single form for
every count. It reads wrongly when only one island is marked, and
languages with more than two plural forms cannot translate it
correctly.

Use Q_() with a singular and a plural form so the right one is
picked from island_counter.

Found with:

    git grep '[^Q]_("[^"]*%[id]' -- '*.c'

Signed-off-by: Okhuomon Ajayi <okhuomonajayi54@gmail.com>
---
 delta-islands.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/delta-islands.c b/delta-islands.c
index e71a7e1c05..c1c0f992f5 100644
--- a/delta-islands.c
+++ b/delta-islands.c
@@ -496,7 +496,9 @@ void load_delta_islands(struct repository *r, int progress)
 	free_remote_islands(ild.remote_islands);
 
 	if (progress)
-		fprintf(stderr, _("Marked %d islands, done.\n"), island_counter);
+		fprintf(stderr, Q_("Marked %d island, done.\n",
+				   "Marked %d islands, done.\n", island_counter),
+			island_counter);
 }
 
 void propagate_island_marks(struct repository *r, struct commit *commit)
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Outreachy PATCH] delta-islands: use Q_() for island count
  2026-10-13 16:49 ` [Outreachy PATCH] delta-islands: use Q_() for island count Okhuomon Ajayi
@ 2026-10-13 18:00   ` Junio C Hamano
  2026-10-13 19:44     ` Okhuomon Ajayi
  2026-10-13 20:30   ` [Outreachy PATCH v2] " Okhuomon Ajayi
  1 sibling, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2026-10-13 18:00 UTC (permalink / raw)
  To: Okhuomon Ajayi
  Cc: git, christian.couder, usmanakinyemi202, siddharthasthana31,
	kaartic.sivaraam

Okhuomon Ajayi <okhuomonajayi54@gmail.com> writes:

> The progress message "Marked %d islands, done." is marked for
> translation with _(), which gives translators a single form for
> every count. It reads wrongly when only one island is marked, and
> languages with more than two plural forms cannot translate it
> correctly.
>
> Use Q_() with a singular and a plural form so the right one is
> picked from island_counter.

Nicely written.

>
> Found with:
>
>     git grep '[^Q]_("[^"]*%[id]' -- '*.c'

I am not sure of the value in this, though.  You certainly do not
mean to say that you updated all of the ones that you found with the
above.  You are not inviting others to do the same grep and "fix"
any of the hits, as the pattern gives too many false positives
(i.e., not all %d are about number of things, like the line number a
parser has found the error it is reporting at), and without warning
that, it would not be helpful to these others.

> Signed-off-by: Okhuomon Ajayi <okhuomonajayi54@gmail.com>
> ---
>  delta-islands.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/delta-islands.c b/delta-islands.c
> index e71a7e1c05..c1c0f992f5 100644
> --- a/delta-islands.c
> +++ b/delta-islands.c
> @@ -496,7 +496,9 @@ void load_delta_islands(struct repository *r, int progress)
>  	free_remote_islands(ild.remote_islands);
>  
>  	if (progress)
> -		fprintf(stderr, _("Marked %d islands, done.\n"), island_counter);
> +		fprintf(stderr, Q_("Marked %d island, done.\n",
> +				   "Marked %d islands, done.\n", island_counter),
> +			island_counter);

The change itself looks sensible to me.

Thanks.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Outreachy PATCH] delta-islands: use Q_() for island count
  2026-10-13 18:00   ` Junio C Hamano
@ 2026-10-13 19:44     ` Okhuomon Ajayi
  2026-10-13 20:33       ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Okhuomon Ajayi @ 2026-10-13 19:44 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: git, christian.couder, usmanakinyemi202, siddharthasthana31,
	kaartic.sivaraam

On Tue, Oct 13, 2026 at 7:00 PM Junio C Hamano <gitster@pobox.com> wrote:

> I am not sure of the value in this, though.  You certainly do not
> mean to say that you updated all of the ones that you found with the
> above.  You are not inviting others to do the same grep and "fix"
> any of the hits, as the pattern gives too many false positives
> (i.e., not all %d are about number of things, like the line number a
> parser has found the error it is reporting at), and without warning
> that, it would not be helpful to these others.

You are right, I will remove it from the commit message and send a v2.

> The change itself looks sensible to me.

Thank you for the review.

Okhuomon

Okhuomon

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Outreachy] Introduction: Okhuomon Ajayi, microproject in delta-islands.c
  2026-10-13 14:25 [Outreachy] Introduction: Okhuomon Ajayi, microproject in delta-islands.c Okhuomon Ajayi
  2026-10-13 16:49 ` [Outreachy PATCH] delta-islands: use Q_() for island count Okhuomon Ajayi
@ 2026-10-13 20:13 ` Usman Akinyemi
  2026-10-13 20:32   ` Okhuomon Ajayi
  1 sibling, 1 reply; 8+ messages in thread
From: Usman Akinyemi @ 2026-10-13 20:13 UTC (permalink / raw)
  To: Okhuomon Ajayi; +Cc: git

>
> I searched the list archive for delta-islands and for ngettext/Q_
> patches and did not find anyone working on this message. Please let me
> know if I missed something.
>
> Thanks,
> Okhuomon
Hello Okhuomon,

Thanks for your interest in the Git project, I saw that you already
sent the patch.
>
Usman.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Outreachy PATCH v2] delta-islands: use Q_() for island count
  2026-10-13 16:49 ` [Outreachy PATCH] delta-islands: use Q_() for island count Okhuomon Ajayi
  2026-10-13 18:00   ` Junio C Hamano
@ 2026-10-13 20:30   ` Okhuomon Ajayi
  1 sibling, 0 replies; 8+ messages in thread
From: Okhuomon Ajayi @ 2026-10-13 20:30 UTC (permalink / raw)
  To: git
  Cc: gitster, christian.couder, usmanakinyemi202, siddharthasthana31,
	kaartic.sivaraam, Okhuomon Ajayi

The progress message "Marked %d islands, done." is marked for
translation with _(), which gives translators a single form for
every count. It reads wrongly when only one island is marked, and
languages with more than two plural forms cannot translate it
correctly.

Use Q_() with a singular and a plural form so the right one is
picked from island_counter.

Signed-off-by: Okhuomon Ajayi <okhuomonajayi54@gmail.com>
---
Changes since v1:
- Removed the "Found with" git grep paragraph from the commit
  message, as suggested by Junio. No code was changed.

 delta-islands.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/delta-islands.c b/delta-islands.c
index e71a7e1c05..c1c0f992f5 100644
--- a/delta-islands.c
+++ b/delta-islands.c
@@ -496,7 +496,9 @@ void load_delta_islands(struct repository *r, int progress)
 	free_remote_islands(ild.remote_islands);
 
 	if (progress)
-		fprintf(stderr, _("Marked %d islands, done.\n"), island_counter);
+		fprintf(stderr, Q_("Marked %d island, done.\n",
+				   "Marked %d islands, done.\n", island_counter),
+			island_counter);
 }
 
 void propagate_island_marks(struct repository *r, struct commit *commit)
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Outreachy] Introduction: Okhuomon Ajayi, microproject in delta-islands.c
  2026-10-13 20:13 ` [Outreachy] Introduction: Okhuomon Ajayi, microproject in delta-islands.c Usman Akinyemi
@ 2026-10-13 20:32   ` Okhuomon Ajayi
  0 siblings, 0 replies; 8+ messages in thread
From: Okhuomon Ajayi @ 2026-10-13 20:32 UTC (permalink / raw)
  To: Usman Akinyemi; +Cc: git

On Tue, Oct 13, 2026 at 9:13 PM Usman Akinyemi
<usmanakinyemi202@gmail.com> wrote:

> Thanks for your interest in the Git project, I saw that you already
> sent the patch.

Thank you, yes i sent a patch already and junio replied to it i just
sent a v2 patch
> >
> Usman.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Outreachy PATCH] delta-islands: use Q_() for island count
  2026-10-13 19:44     ` Okhuomon Ajayi
@ 2026-10-13 20:33       ` Junio C Hamano
  0 siblings, 0 replies; 8+ messages in thread
From: Junio C Hamano @ 2026-10-13 20:33 UTC (permalink / raw)
  To: Okhuomon Ajayi
  Cc: git, christian.couder, usmanakinyemi202, siddharthasthana31,
	kaartic.sivaraam

Okhuomon Ajayi <okhuomonajayi54@gmail.com> writes:

> On Tue, Oct 13, 2026 at 7:00 PM Junio C Hamano <gitster@pobox.com> wrote:
>
>> I am not sure of the value in this, though.  You certainly do not
>> mean to say that you updated all of the ones that you found with the
>> above.  You are not inviting others to do the same grep and "fix"
>> any of the hits, as the pattern gives too many false positives
>> (i.e., not all %d are about number of things, like the line number a
>> parser has found the error it is reporting at), and without warning
>> that, it would not be helpful to these others.
>
> You are right, I will remove it from the commit message and send a v2.

I think is is common to have such a "not quite suited for the
permanent commit log message, but may help reviewers and others who
are reading the patch while it is still being worked on" material
under the three-dash line below your sign-off.



>
>> The change itself looks sensible to me.
>
> Thank you for the review.
>
> Okhuomon
>
> Okhuomon

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-10-13 20:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-13 14:25 [Outreachy] Introduction: Okhuomon Ajayi, microproject in delta-islands.c Okhuomon Ajayi
2026-10-13 16:49 ` [Outreachy PATCH] delta-islands: use Q_() for island count Okhuomon Ajayi
2026-10-13 18:00   ` Junio C Hamano
2026-10-13 19:44     ` Okhuomon Ajayi
2026-10-13 20:33       ` Junio C Hamano
2026-10-13 20:30   ` [Outreachy PATCH v2] " Okhuomon Ajayi
2026-10-13 20:13 ` [Outreachy] Introduction: Okhuomon Ajayi, microproject in delta-islands.c Usman Akinyemi
2026-10-13 20:32   ` Okhuomon Ajayi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox