From 22fcd0069ae268d86acd73e3dcebce182b32911b Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 9 Jun 2023 09:52:42 +0200 Subject: [PATCH] ui: user view: fix calling order of gettext One must not call gettext on the already formatted string, as we cannot translate it for any possible value, rather the format string it self needs to be gettext'd, then the translator can position the variable template placeholders however it's correct for their language without having to care about any value this could be called with. Fixes: d057929f ("ui: user view: fix calling order of gettext") Signed-off-by: Thomas Lamprecht --- www/manager6/dc/UserView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/manager6/dc/UserView.js b/www/manager6/dc/UserView.js index fec45deb..bfbc4595 100644 --- a/www/manager6/dc/UserView.js +++ b/www/manager6/dc/UserView.js @@ -101,7 +101,7 @@ Ext.define('PVE.dc.UserView', { (rec.data['totp-locked'] || rec.data['tfa-locked-until'])), handler: function(btn, event, rec) { Ext.Msg.confirm( - gettext(Ext.String.format('Unlock TFA authentication for {0}', rec.data.userid)), + Ext.String.format(gettext('Unlock TFA authentication for {0}'), rec.data.userid)), gettext("Locked 2nd factors can happen if the user's password was leaked. Are you sure you want to unlock the user?"), function(btn_response) { if (btn_response === 'yes') {