Add the degraded threshold value to the translation key in toolbar

pull/1/head
yflory 4 years ago
parent 86e50e0477
commit 18e995f63a

@ -8,7 +8,6 @@ define([
var Cursor = {};
var DEGRADED = AppConfig.degradedLimit || 8;
console.log(DEGRADED);
var convertToUint8 = function (obj) {
var l = Object.keys(obj).length;

@ -212,6 +212,7 @@ MessengerUI, Messages) {
var $editUsersList = $('<div>', {'class': 'cp-toolbar-userlist-others'})
.appendTo($editUsers);
var degradedLimit = Config.degradedLimit || 8;
if (!online) {
$('<em>').text(Messages.userlist_offline).appendTo($editUsersList);
numberOfEditUsers = '?';
@ -219,8 +220,7 @@ MessengerUI, Messages) {
} else if (metadataMgr.isDegraded() === true) {
numberOfEditUsers = Math.max(metadataMgr.getChannelMembers().length - 1, 0);
numberOfViewUsers = '';
Messages.toolbar_degraded = "Too many editors are present in the pad. The userlist has been disabled to improve performances"; // XXX
$('<em>').text(Messages.toolbar_degraded).appendTo($editUsersList);
$('<em>').text(Messages._getKey('toolbar_degraded', [degradedLimit])).appendTo($editUsersList);
}
// Update the buttons

Loading…
Cancel
Save