From 87684c0f779386951931ef8c39eb14177567cd03 Mon Sep 17 00:00:00 2001
From: Nikos Kouremenos <kourem@gmail.com>
Date: Sat, 3 Sep 2005 16:37:01 +0000
Subject: [PATCH] we only use ngettext() where we have %d [eg. counted
 entities]. Thanks Nikolai

---
 src/groupchat_window.py | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/src/groupchat_window.py b/src/groupchat_window.py
index 85f2847bea..ff300e3b11 100644
--- a/src/groupchat_window.py
+++ b/src/groupchat_window.py
@@ -138,17 +138,15 @@ def on_groupchat_window_delete_event(self, widget, event):
 				if gajim.gc_connected[self.account][room_jid]:
 					names.append(gajim.get_nick_from_jid(room_jid))
 
-			if len(names): # if one or more rooms connected
-				pritext = i18n.ngettext(
-					'Are you sure you want to leave room "%s"?',
-					'Are you sure you want to leave rooms "%s"?',
-					len(names), names[0], ', '.join(names))
-			
-				sectext = i18n.ngettext(
-			'If you close this window, you will be disconnected from this room.',
-			'If you close this window, you will be disconnected from these rooms.',
-					len(names))
+			rooms_no = len(names)
+			if rooms_no >= 2: # if we are in many rooms
+				pritext = _('Are you sure you want to leave rooms "%s"?') % ', '.join(names)
+				sectext = _('If you close this window, you will be disconnected from this room.')
+			elif rooms_no == 1: # just in one room
+				pritext = _('Are you sure you want to leave room "%s"?') % names[0]
+				sectext = _('If you close this window, you will be disconnected from these rooms.')
 			
+			if rooms_no > 0:
 				dialog = dialogs.ConfirmationDialogCheck(pritext, sectext,
 					_('Do not ask me again') )
 			
-- 
GitLab