From 8529452c3c23296095c1fcc0e91f57a3dd627e3e Mon Sep 17 00:00:00 2001 From: Oliboy50 Date: Fri, 25 Aug 2023 20:24:04 +0200 Subject: [PATCH] fix(translation): tableWindow title --- velonimo.game.php | 12 +++++++----- velonimo.js | 6 ++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/velonimo.game.php b/velonimo.game.php index 97bf2cb..b5a4be7 100644 --- a/velonimo.game.php +++ b/velonimo.game.php @@ -1263,11 +1263,13 @@ function stEndRound() { } $this->notifyAllPlayers('tableWindow', '', [ 'id' => 'finalScoring', - 'title' => sprintf( - clienttranslate('Result of round %s/%s'), - $currentRound, - $howManyRounds - ), + 'title' => [ + 'str' => clienttranslate('Result of round ${currentRound}/${howManyRounds}'), + 'args' => [ + 'currentRound' => $currentRound, + 'howManyRounds' => $howManyRounds, + ], + ], 'table' => [ $headers, $previousPoints, diff --git a/velonimo.js b/velonimo.js index 45aae01..41ffad3 100644 --- a/velonimo.js +++ b/velonimo.js @@ -3276,6 +3276,12 @@ function (dojo, declare) { /////////////////////////////////////////////////// //// Reaction to cometD notifications /////////////////////////////////////////////////// + ntf_tableWindow: function (notif) { + if(typeof notif.args.title === 'object'){ + notif.args.title = this.format_string_recursive(notif.args.title.str, notif.args.title.args); + } + this.inherited(arguments); + }, setupNotifications: function () { const isReadOnly = this.isReadOnly(); [