show nickname in invitation dialog. fixes #2899
This commit is contained in:
parent
50c1fcb7a7
commit
363c5b45b0
1 changed files with 58 additions and 52 deletions
|
@ -2240,9 +2240,15 @@ class InvitationReceivedDialog:
|
|||
xml = gtkgui_helpers.get_glade('invitation_received_dialog.glade')
|
||||
self.dialog = xml.get_widget('invitation_received_dialog')
|
||||
|
||||
#FIXME: use nickname instead of contact_jid
|
||||
pritext = _('%(contact_jid)s has invited you to group chat %(room_jid)s')\
|
||||
% {'room_jid': room_jid, 'contact_jid': contact_jid }
|
||||
#Don't translate $Contact
|
||||
pritext = _('$Contact has invited you to group chat %(room_jid)s')\
|
||||
% {'room_jid': room_jid}
|
||||
contact = gajim.contacts.get_first_contact_from_jid(account, contact_jid)
|
||||
if contact and contact.name:
|
||||
contact_text = '%s (%s)' % (contact.name, contact_jid)
|
||||
else:
|
||||
contact_text = contact_jid
|
||||
pritext = pritext.replace('$Contact', contact_text)
|
||||
|
||||
label_text = '<big><b>%s</b></big>' % pritext
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue