Add translation keys
This commit is contained in:
parent
ed868f9c5d
commit
67e39253cf
@ -2628,19 +2628,19 @@ define([
|
|||||||
setHTML(h('p'), text)
|
setHTML(h('p'), text)
|
||||||
]);
|
]);
|
||||||
var buttons = [{
|
var buttons = [{
|
||||||
name: Messages.cancel, // XXX "later"?
|
name: Messages.friendRequest_later,
|
||||||
onClick: function () {},
|
onClick: function () {},
|
||||||
keys: [27]
|
keys: [27]
|
||||||
}, {
|
}, {
|
||||||
className: 'primary',
|
className: 'primary',
|
||||||
name: "Accept (Enter)", // XXX
|
name: Messages.friendRequest_accept,
|
||||||
onClick: function () {
|
onClick: function () {
|
||||||
todo(true);
|
todo(true);
|
||||||
},
|
},
|
||||||
keys: [13]
|
keys: [13]
|
||||||
}, {
|
}, {
|
||||||
className: 'primary',
|
className: 'primary',
|
||||||
name: "Ignore the request", // XXX
|
name: Messages.friendRequest_decline,
|
||||||
onClick: function () {
|
onClick: function () {
|
||||||
todo(false);
|
todo(false);
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
define([
|
define([
|
||||||
'jquery',
|
'jquery',
|
||||||
'/common/hyperscript.js',
|
'/common/hyperscript.js',
|
||||||
'/common/common-ui-elements.js'
|
'/common/common-ui-elements.js',
|
||||||
], function ($, h, UIElements) {
|
'/customize/messages.js',
|
||||||
|
], function ($, h, UIElements, Messages) {
|
||||||
|
|
||||||
var handlers = {};
|
var handlers = {};
|
||||||
|
|
||||||
@ -16,10 +17,10 @@ define([
|
|||||||
common.addFriendRequest(data);
|
common.addFriendRequest(data);
|
||||||
|
|
||||||
// Display the notification
|
// Display the notification
|
||||||
$(el).find('.cp-notification-dismiss').attr('title', 'IGNORE').css('display', 'flex'); // XXX
|
$(el).find('.cp-notification-dismiss').attr('title', Messages.friendRequest_dismiss).css('display', 'flex');
|
||||||
$(el).find('.cp-notification-content').addClass("cp-clickable");
|
$(el).find('.cp-notification-content').addClass("cp-clickable");
|
||||||
$(el).find('.cp-notification-content p')
|
$(el).find('.cp-notification-content p')
|
||||||
.html('New friend request: <b>'+msg.content.displayName+'</b>') // XXX
|
.html(Messages._getKey('friendRequest_notification', [msg.content.displayName])
|
||||||
.click(function () {
|
.click(function () {
|
||||||
UIElements.displayFriendRequestModal(common, data);
|
UIElements.displayFriendRequestModal(common, data);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -309,9 +309,7 @@ MessengerUI, Messages) {
|
|||||||
} else if (friendRequests[data.curvePublic]) {
|
} else if (friendRequests[data.curvePublic]) {
|
||||||
$('<button>', {
|
$('<button>', {
|
||||||
'class': 'fa fa-bell cp-toolbar-userlist-button',
|
'class': 'fa fa-bell cp-toolbar-userlist-button',
|
||||||
'title': 'Pending friend request' /*Messages._getKey('userlist_addAsFriendTitle', [ // XXX
|
'title': Messages._getKey('friendRequest_received', [name]),
|
||||||
name
|
|
||||||
])*/
|
|
||||||
}).appendTo($nameSpan).click(function (e) {
|
}).appendTo($nameSpan).click(function (e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
UIElements.displayFriendRequestModal(Common, friendRequests[data.curvePublic]);
|
UIElements.displayFriendRequestModal(Common, friendRequests[data.curvePublic]);
|
||||||
@ -327,7 +325,6 @@ MessengerUI, Messages) {
|
|||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
Common.sendFriendRequest(data, function (err, obj) {
|
Common.sendFriendRequest(data, function (err, obj) {
|
||||||
if (err || (obj && obj.error)) { return void console.error(err || obj.error); }
|
if (err || (obj && obj.error)) { return void console.error(err || obj.error); }
|
||||||
// XXX
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -950,7 +947,7 @@ MessengerUI, Messages) {
|
|||||||
var createNotifications = function (toolbar, config) {
|
var createNotifications = function (toolbar, config) {
|
||||||
var $notif = toolbar.$top.find('.'+NOTIFICATIONS_CLS).show();
|
var $notif = toolbar.$top.find('.'+NOTIFICATIONS_CLS).show();
|
||||||
var div = h('div.cp-notifications-container', [
|
var div = h('div.cp-notifications-container', [
|
||||||
h('div.cp-notifications-empty', "Nothing new here") // XXX
|
h('div.cp-notifications-empty', Messages.notifications_empty)
|
||||||
]);
|
]);
|
||||||
var pads_options = [div];
|
var pads_options = [div];
|
||||||
var dropdownConfig = {
|
var dropdownConfig = {
|
||||||
@ -962,7 +959,7 @@ MessengerUI, Messages) {
|
|||||||
};
|
};
|
||||||
var $newPadBlock = UIElements.createDropdown(dropdownConfig);
|
var $newPadBlock = UIElements.createDropdown(dropdownConfig);
|
||||||
var $button = $newPadBlock.find('button');
|
var $button = $newPadBlock.find('button');
|
||||||
$button.attr('title', Messages.mailbox_title); // XXX
|
$button.attr('title', Messages.notifications_title);
|
||||||
$button.addClass('fa fa-bell-o');
|
$button.addClass('fa fa-bell-o');
|
||||||
var $n = $button.find('.cp-dropdown-button-title').hide();
|
var $n = $button.find('.cp-dropdown-button-title').hide();
|
||||||
var $empty = $(div).find('.cp-notifications-empty');
|
var $empty = $(div).find('.cp-notifications-empty');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user