[gnome-contacts] Window: do the ngettext thing properly this time.
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Window: do the ngettext thing properly this time.
- Date: Mon, 22 Jan 2018 16:58:42 +0000 (UTC)
commit 81e63b25bb073d26cbb0a0573ca5e9bf880e47bf
Author: Niels De Graef <nielsdegraef gmail com>
Date: Mon Jan 22 17:57:49 2018 +0100
Window: do the ngettext thing properly this time.
Again, big thanks to Piotr Drąg for his feedback.
src/contacts-window.vala | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/contacts-window.vala b/src/contacts-window.vala
index f858630..0885108 100644
--- a/src/contacts-window.vala
+++ b/src/contacts-window.vala
@@ -315,9 +315,12 @@ public class Contacts.Window : Gtk.ApplicationWindow {
set_shown_contact (null);
this.state = UiState.NORMAL;
- var msg = ngettext (_("Deleted contact %s").printf (contacts[0].individual.display_name),
- _("%d contacts deleted").printf (contacts.size),
- contacts.size);
+ string msg;
+ if (contacts.size == 1)
+ msg = _("Deleted contact %s").printf (contacts[0].individual.display_name);
+ else
+ msg = ngettext (_("%d contact deleted"), _("%d contacts deleted"), contacts.size)
+ .printf (contacts.size);
var b = new Button.with_mnemonic (_("_Undo"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]