From 0f58b68d9af662b1c3ee9246c2ee53a22a66c2cd Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 13 Nov 2023 15:27:27 +0100 Subject: [PATCH] wait #6470 @1.5 --- js/quiz.l10n.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/js/quiz.l10n.js b/js/quiz.l10n.js index 0973749..1279e30 100644 --- a/js/quiz.l10n.js +++ b/js/quiz.l10n.js @@ -6,16 +6,12 @@ function QuizL10n(quiz) { QuizL10n.prototype = { __: function (str, replace = {}) { - if (this.quiz.data.translations) { - if (this.quiz.data.translations[str] !== undefined && this.quiz.data.translations[str] != null) { - str = this.quiz.data.translations[str]; - } - } else if (this.quiz.data.l10n[str] !== undefined && this.quiz.data.l10n[str] != null) { + if (this.quiz.data.l10n[str] !== undefined && this.quiz.data.l10n[str] != null) { str = this.quiz.data.l10n[str]; } - for(const k in replace) { - str = str.replace(':'+k,replace[k]) + for (const k in replace) { + str = str.replace(':' + k, replace[k]) } return str; -- 2.39.5