Enable all languages in translators mode

This commit is contained in:
Pieter Vander Vennet 2022-04-03 03:00:45 +02:00
parent 86d9047e5e
commit a037d04577
3 changed files with 25 additions and 8 deletions

View file

@ -6,8 +6,8 @@ import {QueryParameters} from "../../Logic/Web/QueryParameters";
export default class Locale {
public static showLinkToWeblate: UIEventSource<boolean> = new UIEventSource<boolean>(false);
public static language: UIEventSource<string> = Locale.setup();
public static showLinkToWeblate: UIEventSource<boolean> = new UIEventSource<boolean>(false);
private static setup() {
const source = LocalStorageSource.Get('language', "en");
@ -20,6 +20,13 @@ export default class Locale {
QueryParameters.GetQueryParameter("language", undefined, "The language to display mapcomplete in. Will be ignored in case a logged-in-user did set their language before. If the specified language does not exist, it will default to the first language in the theme."),
true
)
QueryParameters.GetBooleanQueryParameter("fs-translation-mode",false,"If set, will show the translation buttons")
.addCallbackAndRunD(tr => {
console.log("Query parameter for translation mode is", tr)
Locale.showLinkToWeblate.setData(Locale.showLinkToWeblate.data || tr);
})
}
return source;
}