Add difficulty and length overviews to climbing areas and crags
This commit is contained in:
parent
ad5174d0da
commit
df4923d8bf
3 changed files with 461 additions and 191 deletions
|
@ -220,6 +220,11 @@ function MergeTranslation(source: any, target: any, language: string, context: s
|
|||
const sourceV = source[key];
|
||||
const targetV = target[key]
|
||||
if (typeof sourceV === "string") {
|
||||
if(targetV === undefined){
|
||||
target[key] = source[key];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (targetV[language] === sourceV) {
|
||||
// Already the same
|
||||
continue;
|
||||
|
@ -240,7 +245,7 @@ function MergeTranslation(source: any, target: any, language: string, context: s
|
|||
}
|
||||
if (typeof sourceV === "object") {
|
||||
if (targetV === undefined) {
|
||||
throw "MergingTranslations failed: source object has a path that does not exist anymore in the target: " + context
|
||||
target[language] = sourceV;
|
||||
} else {
|
||||
MergeTranslation(sourceV, targetV, language, context + "." + key);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue