From cc0f613118f349b1acd8cbbad2b34ac0b12b9843 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Thu, 15 Jun 2017 11:27:05 +0200 Subject: [PATCH] rosterview: Include fullname (or JID) in tooltip for better UX --- src/converse-rosterview.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/converse-rosterview.js b/src/converse-rosterview.js index 9f8ca5127..00e12f029 100644 --- a/src/converse-rosterview.js +++ b/src/converse-rosterview.js @@ -73,7 +73,8 @@ * loaded by converse.js's plugin machinery. */ var _converse = this._converse, - __ = _converse.__; + __ = _converse.__, + ___ = _converse.___; this.updateSettings({ allow_chat_pending_contacts: true, @@ -609,7 +610,7 @@ this.el.classList.add('pending-xmpp-contact'); this.$el.html(tpl_pending_contact( _.extend(item.toJSON(), { - 'desc_remove': __('Click to remove this contact'), + 'desc_remove': __(___('Click to remove %1$s as a contact'), item.get('fullname')), 'allow_chat_pending_contacts': _converse.allow_chat_pending_contacts }) )); @@ -617,8 +618,8 @@ this.el.classList.add('requesting-xmpp-contact'); this.$el.html(tpl_requesting_contact( _.extend(item.toJSON(), { - 'desc_accept': __("Click to accept this contact request"), - 'desc_decline': __("Click to decline this contact request"), + 'desc_accept': __(___("Click to accept the contact request from %1$s"), item.get('fullname')), + 'desc_decline': __(___("Click to decline the contact request from %1$s"), item.get('fullname')), 'allow_chat_pending_contacts': _converse.allow_chat_pending_contacts }) )); @@ -637,7 +638,7 @@ _.extend(item.toJSON(), { 'desc_status': STATUSES[chat_status||'offline'], 'desc_chat': __('Click to chat with this contact'), - 'desc_remove': __('Click to remove this contact'), + 'desc_remove': __(___('Click to remove %1$s as a contact'), item.get('fullname')), 'title_fullname': __('Name'), 'allow_contact_removal': _converse.allow_contact_removal, 'num_unread': item.get('num_unread') || 0