This commit is contained in:
Pieter Vander Vennet 2025-04-15 16:39:18 +02:00
parent 3d4eb321b2
commit 0fdf9448a9
2 changed files with 14 additions and 11 deletions

View file

@ -165,16 +165,17 @@ export class Translation extends BaseUIElement {
* Which language will be effectively used for the given language of choice?
*/
public actualLanguage(language: string): "*" | string | undefined {
if (this.translations["*"]) {
return "*"
}
const txt = this.translations[language]
if (txt === undefined && this._strictLanguages) {
return undefined
}
if (txt !== undefined) {
return language
}
if (this._strictLanguages) {
return undefined
}
if (this.translations["*"]) {
return "*"
}
if (this.translations["en"] !== undefined) {
return "en"
}