Fix tests
This commit is contained in:
parent
218cf3b151
commit
9193b0db2f
2 changed files with 6 additions and 1 deletions
|
@ -79,7 +79,7 @@ export default class LayoutConfig {
|
||||||
}
|
}
|
||||||
const context = this.id
|
const context = this.id
|
||||||
this.credits = json.credits
|
this.credits = json.credits
|
||||||
this.language = json.mustHaveLanguage ?? ( official ? ["en"] : [])
|
this.language = json.mustHaveLanguage ?? Object.keys(json.title)
|
||||||
this.usedImages = Array.from(
|
this.usedImages = Array.from(
|
||||||
new ExtractImages(official, undefined).convertStrict(
|
new ExtractImages(official, undefined).convertStrict(
|
||||||
json,
|
json,
|
||||||
|
|
|
@ -35,6 +35,11 @@ export default class LinkToWeblate extends VariableUiElement {
|
||||||
this.SetClass("enable-links hidden-on-mobile")
|
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 {
|
public static hrefToWeblate(language: string, contextKey: string): string {
|
||||||
if (contextKey === undefined || contextKey.indexOf(":") < 0) {
|
if (contextKey === undefined || contextKey.indexOf(":") < 0) {
|
||||||
return undefined
|
return undefined
|
||||||
|
|
Loading…
Reference in a new issue