]> _ Git - fluidbook-toolbox-quiz.git/commitdiff
wait #6439 @0:30
authorsoufiane <soufiane@cubedesigners.com>
Wed, 8 Nov 2023 09:49:32 +0000 (10:49 +0100)
committersoufiane <soufiane@cubedesigners.com>
Wed, 8 Nov 2023 09:49:32 +0000 (10:49 +0100)
js/quiz.l10n.js

index 1180af3760c18492ae7e58d25e698061c324c09b..09737495bd17e0a82678e2566e6cc0476320720d 100644 (file)
@@ -6,7 +6,11 @@ function QuizL10n(quiz) {
 
 QuizL10n.prototype = {
     __: function (str, replace = {}) {
-        if (this.quiz.data.l10n[str] !== undefined && this.quiz.data.l10n[str] != null) {
+        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) {
             str = this.quiz.data.l10n[str];
         }