diff --git a/Models/ThemeConfig/LayoutConfig.ts b/Models/ThemeConfig/LayoutConfig.ts index 8fc718764..36e4fa34c 100644 --- a/Models/ThemeConfig/LayoutConfig.ts +++ b/Models/ThemeConfig/LayoutConfig.ts @@ -79,7 +79,7 @@ export default class LayoutConfig { } const context = this.id this.credits = json.credits - this.language = json.mustHaveLanguage ?? ( official ? ["en"] : []) + this.language = json.mustHaveLanguage ?? Object.keys(json.title) this.usedImages = Array.from( new ExtractImages(official, undefined).convertStrict( json, diff --git a/UI/Base/LinkToWeblate.ts b/UI/Base/LinkToWeblate.ts index 646c57f83..914854d6c 100644 --- a/UI/Base/LinkToWeblate.ts +++ b/UI/Base/LinkToWeblate.ts @@ -35,6 +35,11 @@ export default class LinkToWeblate extends VariableUiElement { this.SetClass("enable-links hidden-on-mobile") } + /** + * Creates the url to Hosted weblate + * + * LinkToWeblate.hrefToWeblate("nl", "category:some.context") // => "https://hosted.weblate.org/translate/mapcomplete/category/nl/?offset=1&q=context%3A%3D%22some.context%22" + */ public static hrefToWeblate(language: string, contextKey: string): string { if (contextKey === undefined || contextKey.indexOf(":") < 0) { return undefined