Fix translations

This commit is contained in:
Pieter Vander Vennet 2021-09-22 16:31:50 +02:00
parent 1f8eca6b8b
commit 355c9384d9
6 changed files with 41 additions and 4 deletions

View file

@ -248,7 +248,11 @@ function MergeTranslation(source: any, target: any, language: string, context: s
}
if (typeof sourceV === "object") {
if (targetV === undefined) {
try{
target[language] = sourceV;
}catch(e){
throw `At context${context}: Could not add a translation in language ${language} due to ${e}`
}
} else {
MergeTranslation(sourceV, targetV, language, context + "." + key);
}