]> _ Git - fluidbook-toolbox-quiz.git/commitdiff
wait #6470 @1.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 13 Nov 2023 14:27:27 +0000 (15:27 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 13 Nov 2023 14:27:27 +0000 (15:27 +0100)
js/quiz.l10n.js

index 09737495bd17e0a82678e2566e6cc0476320720d..1279e306d8058f5700da7eb9c07104867b46439e 100644 (file)
@@ -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;