From 2c87f6110e928b6e30d611908f057b3951c2619a Mon Sep 17 00:00:00 2001 From: Angen Date: Sat, 11 Sep 2021 09:23:56 +0000 Subject: [PATCH] Fix translation of "%(unit)s can't be controlled' Message is translated correctly. Issue was sprintf replaced %(unit)s before message was going to be translated so string was never found in dictionary. Introduced in b97d251322 Differential revision: D4254 Patch by: @Ceres Based on code by: @nwtour Reviewer: @Angen This was SVN commit r25916. --- binaries/data/mods/public/simulation/helpers/Commands.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/binaries/data/mods/public/simulation/helpers/Commands.js b/binaries/data/mods/public/simulation/helpers/Commands.js index 68a8dfedae..90df730f79 100644 --- a/binaries/data/mods/public/simulation/helpers/Commands.js +++ b/binaries/data/mods/public/simulation/helpers/Commands.js @@ -973,9 +973,9 @@ function notifyOrderFailure(entity, player) cmpGUIInterface.PushNotification({ "type": "text", "players": [player], - "message": sprintf(markForTranslation("%(unit)s can't be controlled."), { - "unit": cmpIdentity.GetGenericName() - }), + "message": markForTranslation("%(unit)s can't be controlled."), + "parameters": { "unit": cmpIdentity.GetGenericName() }, + "translateParameters": ["unit"], "translateMessage": true }); }