diff options
author | Danilo Šegan <danilo@src.gnome.org> | 2004-03-24 08:18:02 +0800 |
---|---|---|
committer | Danilo Šegan <danilo@src.gnome.org> | 2004-03-24 08:18:02 +0800 |
commit | 7c70ddcc35a65e1078a7789832e5209a7a2e4a5b (patch) | |
tree | 75dd3c44ad9d0eeb512969116852bb765fba1bd5 /addressbook | |
parent | 6f309e984bbfd7b5376dd38637a55dd46d307c92 (diff) | |
download | gsoc2013-evolution-7c70ddcc35a65e1078a7789832e5209a7a2e4a5b.tar.gz gsoc2013-evolution-7c70ddcc35a65e1078a7789832e5209a7a2e4a5b.tar.zst gsoc2013-evolution-7c70ddcc35a65e1078a7789832e5209a7a2e4a5b.zip |
Use ngettext for handling plural forms throughout (fixes bug 53464).
svn path=/trunk/; revision=25168
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/ChangeLog | 8 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-model.c | 5 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-gui-util.c | 7 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-vcard-control.c | 8 |
4 files changed, 17 insertions, 11 deletions
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 <dsegan@gmx.net> + + * 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 <toshok@ximian.com> [ 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); |