summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels De Graef <nielsdegraef@gmail.com>2018-01-22 17:57:49 +0100
committerNiels De Graef <nielsdegraef@gmail.com>2018-01-22 17:57:49 +0100
commit81e63b25bb073d26cbb0a0573ca5e9bf880e47bf (patch)
treecbf643adb06688bc1c8d840f138a5de542563e72
parenta57acdd03799d64b15a2126369f0379dd0d25745 (diff)
downloadgnome-contacts-81e63b25bb073d26cbb0a0573ca5e9bf880e47bf.tar.gz
Window: do the ngettext thing properly this time.
Again, big thanks to Piotr Drąg for his feedback.
-rw-r--r--src/contacts-window.vala9
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"));