From 7c70ddcc35a65e1078a7789832e5209a7a2e4a5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danilo=20=C5=A0egan?= Date: Wed, 24 Mar 2004 00:18:02 +0000 Subject: Use ngettext for handling plural forms throughout (fixes bug 53464). svn path=/trunk/; revision=25168 --- addressbook/ChangeLog | 8 ++++++++ addressbook/gui/widgets/e-addressbook-model.c | 5 +---- addressbook/gui/widgets/eab-gui-util.c | 7 +++++-- addressbook/gui/widgets/eab-vcard-control.c | 8 +++----- 4 files changed, 17 insertions(+), 11 deletions(-) (limited to 'addressbook') diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 27e23fed75..4cddb7f17f 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,11 @@ +2004-03-24 Danilo Ĺ egan + + * gui/widgets/e-addressbook-model.c (update_folder_bar_message): + Use ngettext for handling plural forms (fixes bug #53464). + * gui/widgets/eab-gui-util.c (eab_show_multiple_contacts): Likewise. + * gui/widgets/eab-vcard-control.c (pstream_load): Likewise. + + 2004-03-22 Chris Toshok [ fixes bug #53653, and a couple other instances ] diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c index ed698e3340..725c7b687d 100644 --- a/addressbook/gui/widgets/e-addressbook-model.c +++ b/addressbook/gui/widgets/e-addressbook-model.c @@ -147,11 +147,8 @@ update_folder_bar_message (EABModel *model) case 0: message = g_strdup (_("No contacts")); break; - case 1: - message = g_strdup (_("1 contact")); - break; default: - message = g_strdup_printf (_("%d contacts"), count); + message = g_strdup_printf (ngettext("%d contact", "%d contacts", count), count); break; } diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c index efa128e93a..7c9e540cbe 100644 --- a/addressbook/gui/widgets/eab-gui-util.c +++ b/addressbook/gui/widgets/eab-gui-util.c @@ -204,8 +204,11 @@ eab_show_multiple_contacts (EBook *book, 0, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, - _("Opening %d contacts will open %d new windows as well.\n" - "Do you really want to display all of these contacts?"), + ngettext("Opening %d contact will open %d new window as well.\n" + "Do you really want to display this contact?", + "Opening %d contacts will open %d new windows as well.\n" + "Do you really want to display all of these contacts?", + length), length, length); diff --git a/addressbook/gui/widgets/eab-vcard-control.c b/addressbook/gui/widgets/eab-vcard-control.c index c161333f15..7289851113 100644 --- a/addressbook/gui/widgets/eab-vcard-control.c +++ b/addressbook/gui/widgets/eab-vcard-control.c @@ -136,11 +136,9 @@ pstream_load (BonoboPersistStream *ps, const Bonobo_Stream stream, if (list && list->next) { char *message; int length = g_list_length (list) - 1; - if (length > 1) { - message = g_strdup_printf (_("and %d other contacts."), length); - } else { - message = g_strdup_printf (_("and one other contact.")); - } + message = g_strdup_printf (ngettext("and one other contact.", + "and %d other contacts.", length), + length); gtk_label_set_text (GTK_LABEL (vcard_control->label), message); g_free (message); gtk_widget_show (vcard_control->label); -- cgit v1.2.3