Fix tests

This commit is contained in:
Pieter Vander Vennet 2022-10-04 14:23:19 +02:00
parent 218cf3b151
commit 9193b0db2f
2 changed files with 6 additions and 1 deletions

View file

@ -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