forked from MapComplete/MapComplete
Fix: fix #2346
This commit is contained in:
parent
3d4eb321b2
commit
0fdf9448a9
2 changed files with 14 additions and 11 deletions
|
|
@ -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"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue