Author: asterix Date: 2007-08-06 11:59:14 +0200 (Mon, 06 Aug 2007) New Revision: 8453
Modified: trunk/src/common/connection_handlers.py Log: show room jid in error messages when unable to join it.
Modified: trunk/src/common/connection_handlers.py =================================================================== --- trunk/src/common/connection_handlers.py 2007-08-06 09:13:06 UTC (rev 8452) +++ trunk/src/common/connection_handlers.py 2007-08-06 09:59:14 UTC (rev 8453) @@ -1698,19 +1698,21 @@ 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 @@ 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))