[pacman-dev] [PATCH] Pluralize callback string
In English, this string only has it plural form. However, we need to use the pluralized translation as some languages can have multiple plural formats. Signed-off-by: Allan McRae <allan@archlinux.org> --- Is "UNUSED STRING" clear enough? src/pacman/callback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pacman/callback.c b/src/pacman/callback.c index 695e38d..8d138bf 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -418,8 +418,8 @@ void cb_question(alpm_question_t *question) alpm_question_select_provider_t *q = &question->select_provider; size_t count = alpm_list_count(q->providers); char *depstring = alpm_dep_compute_string(q->depend); - colon_printf(_("There are %zd providers available for %s:\n"), count, - depstring); + colon_printf(_n("UNUSED STRING %zd %s\n", "There are %zd providers available for %s:\n", count), + count, depstring); free(depstring); select_display(q->providers); q->use_index = select_question(count); -- 2.3.5
On Tue, Apr 14, 2015 at 5:48 AM, Allan McRae <allan@archlinux.org> wrote:
In English, this string only has it plural form. However, we need to use the pluralized translation as some languages can have multiple plural formats.
Signed-off-by: Allan McRae <allan@archlinux.org> ---
Is "UNUSED STRING" clear enough? Does the next one become "UNUSED STRING 2" then? :)
Why not just write it the correct way, even though we know this can never be <1? For one, that ensures running without message catalogs is always going to show the right thing; two, it seems a whole lot easier on the translator since strings that make sense will show up for msgid and msgid_plural. "There is %zd provider available for %s:\n"
src/pacman/callback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/pacman/callback.c b/src/pacman/callback.c index 695e38d..8d138bf 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -418,8 +418,8 @@ void cb_question(alpm_question_t *question) alpm_question_select_provider_t *q = &question->select_provider; size_t count = alpm_list_count(q->providers); char *depstring = alpm_dep_compute_string(q->depend); - colon_printf(_("There are %zd providers available for %s:\n"), count, - depstring); + colon_printf(_n("UNUSED STRING %zd %s\n", "There are %zd providers available for %s:\n", count), + count, depstring); free(depstring); select_display(q->providers); q->use_index = select_question(count); -- 2.3.5
Am 14.04.2015 12:48, schrieb Allan McRae:
In English, this string only has it plural form. However, we need to use the pluralized translation as some languages can have multiple plural formats.
Signed-off-by: Allan McRae <allan@archlinux.org> ---
Is "UNUSED STRING" clear enough?
src/pacman/callback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/pacman/callback.c b/src/pacman/callback.c index 695e38d..8d138bf 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -418,8 +418,8 @@ void cb_question(alpm_question_t *question) alpm_question_select_provider_t *q = &question->select_provider; size_t count = alpm_list_count(q->providers); char *depstring = alpm_dep_compute_string(q->depend); - colon_printf(_("There are %zd providers available for %s:\n"), count, - depstring); + colon_printf(_n("UNUSED STRING %zd %s\n", "There are %zd providers available for %s:\n", count), + count, depstring); free(depstring); select_display(q->providers); q->use_index = select_question(count);
Well, if you bother to ask (allways a good idea) - "string" is a pretty much straight-forward technical term in English, but it will sound awkward in other languages I use (German, Spanish). Perhaps a less technical term like "sentence" or "expression" would be preferable. And I don't see the need for capitalizing this message. Devs are required to produce clear, lucid, translatable output. But we will allways remain with this different-gramars-working-differently problem. When you are done with your work, you should should shovel the problem over upon the shoulders of the different l10n-teams.
participants (3)
-
Allan McRae
-
Dan McGee
-
Matthias Gorissen