we only use ngettext() where we have %d [eg. counted entities]. Thanks Nikolai

This commit is contained in:
Nikos Kouremenos 2005-09-03 16:37:01 +00:00
parent faab65d973
commit 87684c0f77
1 changed files with 8 additions and 10 deletions

View File

@ -138,17 +138,15 @@ class GroupchatWindow(chat.Chat):
if gajim.gc_connected[self.account][room_jid]: if gajim.gc_connected[self.account][room_jid]:
names.append(gajim.get_nick_from_jid(room_jid)) names.append(gajim.get_nick_from_jid(room_jid))
if len(names): # if one or more rooms connected rooms_no = len(names)
pritext = i18n.ngettext( if rooms_no >= 2: # if we are in many rooms
'Are you sure you want to leave room "%s"?', pritext = _('Are you sure you want to leave rooms "%s"?') % ', '.join(names)
'Are you sure you want to leave rooms "%s"?', sectext = _('If you close this window, you will be disconnected from this room.')
len(names), names[0], ', '.join(names)) elif rooms_no == 1: # just in one room
pritext = _('Are you sure you want to leave room "%s"?') % names[0]
sectext = i18n.ngettext( sectext = _('If you close this window, you will be disconnected from these rooms.')
'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))
if rooms_no > 0:
dialog = dialogs.ConfirmationDialogCheck(pritext, sectext, dialog = dialogs.ConfirmationDialogCheck(pritext, sectext,
_('Do not ask me again') ) _('Do not ask me again') )