Translation sync, move new question to the bottom

This commit is contained in:
Pieter Vander Vennet 2021-07-18 18:02:17 +02:00
parent 0e9e1f8796
commit bd89e66aca
44 changed files with 1343 additions and 961 deletions

View file

@ -212,6 +212,7 @@ function generateTranslationsObjectFrom(objects: { path: string, parsed: { id: s
}
function MergeTranslation(source: any, target: any, language: string, context: string = "") {
for (const key in source) {
if (!source.hasOwnProperty(key)) {
continue
@ -220,6 +221,9 @@ function MergeTranslation(source: any, target: any, language: string, context: s
const targetV = target[key]
if (typeof sourceV === "string") {
if(targetV === undefined){
if(typeof target === "string"){
throw "Trying to merge a translation into a fixed string at "+context+" for key "+key;
}
target[key] = source[key];
continue;
}