show room jid in error messages when unable to join it.

This commit is contained in:
Yann Leboulanger 2007-08-06 09:59:14 +00:00
parent 262df396b2
commit 987f6fe01f
1 changed files with 7 additions and 5 deletions

View File

@ -1698,19 +1698,21 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
self.dispatch('GC_PASSWORD_REQUIRED', (room_jid, nick))
elif errcode == '403': # we are banned
self.dispatch('ERROR', (_('Unable to join group chat'),
_('You are banned from this group chat.')))
_('You are banned from group chat %s.') % room_jid))
elif errcode == '404': # group chat does not exist
self.dispatch('ERROR', (_('Unable to join group chat'),
_('Such group chat does not exist.')))
_('Group chat %s does not exist.') % room_jid))
elif errcode == '405':
self.dispatch('ERROR', (_('Unable to join group chat'),
_('Group chat creation is restricted.')))
elif errcode == '406':
self.dispatch('ERROR', (_('Unable to join group chat'),
_('Your registered nickname must be used.')))
_('Your registered nickname must be used in group chat %s.') \
% room_jid))
elif errcode == '407':
self.dispatch('ERROR', (_('Unable to join group chat'),
_('You are not in the members list.')))
_('You are not in the members list in groupchat %s.') % \
room_jid))
elif errcode == '409': # nick conflict
# the jid_from in this case is FAKE JID: room_jid/nick
# resource holds the bad nick so propose a new one
@ -1718,7 +1720,7 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
gajim.config.get('gc_proposed_nick_char')
room_jid = gajim.get_room_from_fjid(who)
self.dispatch('ASK_NEW_NICK', (room_jid, _('Unable to join group chat'),
_('Your desired nickname is in use or registered by another occupant.\nPlease specify another nickname below:'), proposed_nickname))
_('Your desired nickname in group chat %s is in use or registered by another occupant.\nPlease specify another nickname below:') % room_jid, proposed_nickname))
else: # print in the window the error
self.dispatch('ERROR_ANSWER', ('', jid_stripped,
errmsg, errcode))