Misleading comment for translators in gs-repo-row.c
Hi, we have a few string debate how to translate correctly.
String comments says:
/* TRANSLATORS: This string is used to construct the 'X apps
installed' sentence, describing a software repository. */
Source: https://gitlab.gnome.org/GNOME/gnome-software/-/blob/main/src/gs-repo-row.c#L158-185
I think, %u here stands for counters. Becacuse in C, %u used for unsigned decimals.
cnt_apps++;
and cnt_addon++;
also aren't software repositories.
for (guint i = 0; i < gs_app_list_length (related); i++) {
GsApp *app_tmp = gs_app_list_index (related, i);
switch (gs_app_get_kind (app_tmp)) {
case AS_COMPONENT_KIND_WEB_APP:
case AS_COMPONENT_KIND_DESKTOP_APP:
cnt_apps++;
break;
case AS_COMPONENT_KIND_FONT:
case AS_COMPONENT_KIND_CODEC:
case AS_COMPONENT_KIND_INPUT_METHOD:
case AS_COMPONENT_KIND_ADDON:
cnt_addon++;
break;
default:
break;
}
}
if (cnt_addon == 0) {
/* TRANSLATORS: This string is used to construct the 'X apps
installed' sentence, describing a software repository. */
return g_strdup_printf (ngettext ("%u app installed",
"%u apps installed",
cnt_apps), cnt_apps);
}
if (cnt_apps == 0) {
/* TRANSLATORS: This string is used to construct the 'X add-ons
installed' sentence, describing a software repository. */
return g_strdup_printf (ngettext ("%u add-on installed",
"%u add-ons installed",
cnt_addon), cnt_addon);
}
/* TRANSLATORS: This string is used to construct the 'X apps
and y add-ons installed' sentence, describing a software repository.
The correct form here depends on the number of apps. */
apps_text = g_strdup_printf (ngettext ("%u app",
"%u apps",
cnt_apps), cnt_apps);
/* TRANSLATORS: This string is used to construct the 'X apps
and y add-ons installed' sentence, describing a software repository.
The correct form here depends on the number of add-ons. */
addons_text = g_strdup_printf (ngettext ("%u add-on",
"%u add-ons",
cnt_addon), cnt_addon);
/* TRANSLATORS: This string is used to construct the 'X apps
and y add-ons installed' sentence, describing a software repository.
The correct form here depends on the total number of
apps and add-ons. */
return g_strdup_printf (ngettext ("%s and %s installed",
"%s and %s installed",
cnt_apps + cnt_addon),
apps_text, addons_text);
}
Also this part of code isn't good for translators. Because they are split sentences and GNOME have Never split sentences page about it.
/* TRANSLATORS: This string is used to construct the 'X apps
and y add-ons installed' sentence, describing a software repository.
The correct form here depends on the number of apps. */
apps_text = g_strdup_printf (ngettext ("%u app",
"%u apps",
cnt_apps), cnt_apps);
/* TRANSLATORS: This string is used to construct the 'X apps
and y add-ons installed' sentence, describing a software repository.
The correct form here depends on the number of add-ons. */
addons_text = g_strdup_printf (ngettext ("%u add-on",
"%u add-ons",
cnt_addon), cnt_addon);
/* TRANSLATORS: This string is used to construct the 'X apps
and y add-ons installed' sentence, describing a software repository.
The correct form here depends on the total number of
apps and add-ons. */
return g_strdup_printf (ngettext ("%s and %s installed",
"%s and %s installed",
cnt_apps + cnt_addon),
apps_text, addons_text);
Sorry for big copy/paste.
Edited by Ghost User