Add matrix-bot translations

This commit is contained in:
Pieter Vander Vennet 2022-06-05 03:41:53 +02:00
parent 47812c3f43
commit b78923ad6a
8 changed files with 110 additions and 16 deletions

View file

@ -49,6 +49,10 @@ export class Translation extends BaseUIElement {
return this.textFor(Translation.forcedLanguage ?? Locale.language.data)
}
public toString(){
return this.txt;
}
static ExtractAllTranslationsFrom(object: any, context = ""): { context: string, tr: Translation }[] {
const allTranslations: { context: string, tr: Translation }[] = []
for (const key in object) {
@ -286,4 +290,6 @@ export class TypedTranslation<T> extends Translation {
return Utils.SubstituteKeys(template, text, lang);
}, context)
}
}