{"thread":{"id":"66824","subject":"[GSoC PATCH] add-patch: use Q_() for split hunk translation","startedAt":"2026-11-10T19:38:03Z","lastAt":"2026-11-10T19:38:03Z","messageCount":1,"participants":["aeron-gh"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"558136","messageId":"20261110193804.76958-1-agab0323@gmail.com","threadId":"66824","inReplyTo":null,"subject":"[GSoC PATCH] add-patch: use Q_() for split hunk translation","fromName":"aeron-gh","fromEmail":"agab0323@gmail.com","sentAt":"2026-11-10T19:38:03Z","receivedAt":"2026-11-10T19:38:03Z","isPatch":true,"sender":{"key":"agab0323@gmail.com","avatar":null},"body":"The \"Split into %d hunks.\" message uses _(), which provides\nthe same translation for every number. The Polish translation\nshows \"2 skrawków\", but the correct form is \"2 skrawki\".\nNumbers 2 and 5 need different plural forms.\n\nUse Q_() with singular and plural forms, passing\nsplittable_into as the count. This lets translators provide\nthe correct plural forms while keeping the English output\nunchanged.\n\nSigned-off-by: aeron-gh <agab0323@gmail.com>\n---\nThis patch is part of my GSoC 2027 microproject. Mahmoud\nannounced this issue in March, but no patch followed:\nhttps://lore.kernel.org/git/CAC5WPUdYxm-7Pjq4oAddLKXjSa7B0YdK8ashyeR9vhCQt+wvPA@mail.gmail.com/\n\n add-patch.c | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/add-patch.c b/add-patch.c\nindex f27edcbe8d..4e75e2ceda 100644\n--- a/add-patch.c\n+++ b/add-patch.c\n@@ -1942,7 +1942,9 @@ static size_t patch_update_file(struct add_p_state *s,\n \t\t\t} else if (!split_hunk(s, file_diff,\n \t\t\t\t\t     hunk - file_diff->hunk)) {\n \t\t\t\tcolor_fprintf_ln(stdout, s->cfg.header_color,\n-\t\t\t\t\t\t _(\"Split into %d hunks.\"),\n+\t\t\t\t\t\t Q_(\"Split into %d hunk.\",\n+\t\t\t\t\t\t    \"Split into %d hunks.\",\n+\t\t\t\t\t\t    splittable_into),\n \t\t\t\t\t\t (int)splittable_into);\n \t\t\t\trendered_hunk_index = -1;\n \t\t\t}\n-- \n2.56.0\n\n\n"}]}