Better handling if wikipage is missing

This commit is contained in:
Pieter Vander Vennet 2021-10-07 22:16:11 +02:00
parent a996ba2a7c
commit 54bc4f24da
2 changed files with 32 additions and 9 deletions

View file

@ -214,4 +214,12 @@ export class Translation extends BaseUIElement {
}
return allTranslations
}
static fromMap(transl: Map<string, string>) {
const translations = {}
transl.forEach((value, key) => {
translations[key] = value
})
return new Translation(translations);
}
}