forked from MapComplete/MapComplete
More work on the custom theme generator, add aed template, move bookcases to json template
This commit is contained in:
parent
146552e62c
commit
560c8e1567
34 changed files with 1048 additions and 590 deletions
|
@ -23,7 +23,7 @@ export default class Translation extends UIElement {
|
|||
} else {
|
||||
Translation.forcedLanguage = lang; // This is a very dirty hack - it'll bite me one day
|
||||
rtext = el.InnerRender();
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < parts.length - 1; i++) {
|
||||
combined.push(parts[i]);
|
||||
combined.push(rtext)
|
||||
|
@ -65,6 +65,9 @@ export default class Translation extends UIElement {
|
|||
this.translations = translations
|
||||
}
|
||||
|
||||
public replace(a, b) {
|
||||
return this.Subs({a: b});
|
||||
}
|
||||
|
||||
public R(): string {
|
||||
return new Translation(this.translations).Render();
|
||||
|
@ -74,5 +77,5 @@ export default class Translation extends UIElement {
|
|||
return new Translation(this.translations)
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -643,7 +643,7 @@ export default class Translations {
|
|||
}),
|
||||
bookkinds: new T({
|
||||
nl: "Wat voor soort boeken heeft dit boekenruilkastje?",
|
||||
en: "What kind of books can be found in this public bookcase"
|
||||
en: "What kind of books can be found in this public bookcase?"
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -974,10 +974,17 @@ export default class Translations {
|
|||
}
|
||||
|
||||
public static W(s: string | UIElement): UIElement {
|
||||
if (s instanceof UIElement) {
|
||||
return s;
|
||||
if (typeof (s) === "string") {
|
||||
return new FixedUiElement(s);
|
||||
}
|
||||
return new FixedUiElement(s);
|
||||
return s;
|
||||
}
|
||||
|
||||
public static WT(s: string | Translation): Translation {
|
||||
if (typeof (s) === "string") {
|
||||
return new Translation({en: s});
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
public static CountTranslations() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue