From 18e995f63a8a75a145b389099d02160db8567ddd Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 19 Mar 2021 17:08:11 +0100 Subject: [PATCH] Add the degraded threshold value to the translation key in toolbar --- www/common/outer/cursor.js | 1 - www/common/toolbar.js | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/www/common/outer/cursor.js b/www/common/outer/cursor.js index 371a4565e..95b2b34c6 100644 --- a/www/common/outer/cursor.js +++ b/www/common/outer/cursor.js @@ -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; diff --git a/www/common/toolbar.js b/www/common/toolbar.js index c42aa36cb..aafc356a5 100644 --- a/www/common/toolbar.js +++ b/www/common/toolbar.js @@ -212,6 +212,7 @@ MessengerUI, Messages) { var $editUsersList = $('
', {'class': 'cp-toolbar-userlist-others'}) .appendTo($editUsers); + var degradedLimit = Config.degradedLimit || 8; if (!online) { $('').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 - $('').text(Messages.toolbar_degraded).appendTo($editUsersList); + $('').text(Messages._getKey('toolbar_degraded', [degradedLimit])).appendTo($editUsersList); } // Update the buttons