summaryrefslogtreecommitdiffstats
path: root/src/pacman/callback.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-07-27 22:50:43 +0200
committerDan McGee <dan@archlinux.org>2010-07-27 22:50:43 +0200
commite7d5803f07c11882685e2a65b5638fd385804d22 (patch)
tree29976b95ccdd0691f9aa2a4bf81bdc041feeffd2 /src/pacman/callback.c
parentddc4130c978decc5b2498b24d3b20e0c4efbc3cf (diff)
downloadpacman-e7d5803f07c11882685e2a65b5638fd385804d22.tar.gz
pacman-e7d5803f07c11882685e2a65b5638fd385804d22.tar.xz
Use the plural features of gettext
Gettext has this whole 'Plural-Form' thing that until now we haven't taken advantage of. Given that not all languages have the same plural form rules as English, take advantage of it by defining a new _n() macro which will normally define to ngettext(), and adjust a few messages as an example of how to use. There are surely other places where we do singular/plural logic without me having noticed, so further patches are welcome to fix those up too. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/callback.c')
-rw-r--r--src/pacman/callback.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 23804d7c..3696d3cd 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -283,11 +283,16 @@ void cb_trans_conv(pmtransconv_t event, void *data1, void *data2,
namelist = alpm_list_add(namelist,
(char *)alpm_pkg_get_name(i->data));
}
- printf(_(":: the following package(s) cannot be upgraded due to "
- "unresolvable dependencies:\n"));
+ printf(_n(
+ ":: The following package cannot be upgraded due to unresolvable dependencies:\n",
+ ":: The following packages cannot be upgraded due to unresolvable dependencies:\n",
+ alpm_list_count(namelist)));
list_display(" ", namelist);
- *response = noyes(_("\nDo you want to skip the above "
- "package(s) for this upgrade?"));
+ printf("\n");
+ *response = noyes(_n(
+ "Do you want to skip the above package for this upgrade?",
+ "Do you want to skip the above packages for this upgrade?",
+ alpm_list_count(namelist)));
alpm_list_free(namelist);
}
break;