[Outreachy PATCH v2] delta-islands: use Q_() for island count

From
Okhuomon Ajayi <hidden>
Date
2026-10-13 20:30:54
Reply to
Okhuomon Ajayi, 2026-10-13
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 <redacted>
---
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
Thread (8 messages) 8 messages, 3 authors, last reply 25d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help