From 976c8c7cc4a0ab859e3e785a9dbae0ab8057274c Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 1 Apr 2024 17:34:04 +0200 Subject: translate settings and to german --- client-web/source/locale/mod.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'client-web/source/locale/mod.ts') diff --git a/client-web/source/locale/mod.ts b/client-web/source/locale/mod.ts index 4febcec..bcaf067 100644 --- a/client-web/source/locale/mod.ts +++ b/client-web/source/locale/mod.ts @@ -1,13 +1,17 @@ +import { PO_DE_DE } from "./de.ts"; import { PO_EN_US } from "./en.ts"; +import { PREF_DECLS } from "../preferences/decl.ts"; export let PO: LanguageStrings; export function init_locale(lang: string) { + if (lang == "system") lang = navigator.language PO = LOCALES[lang] } export const LOCALES: { [key: string]: LanguageStrings } = { - "en-US": PO_EN_US + "en-US": PO_EN_US, + "de-DE": PO_DE_DE, } export interface LanguageStrings { @@ -69,4 +73,5 @@ export interface LanguageStrings { grant: string, status_await_track: string, clear_prefs: string, + setting_descs: { [key in keyof typeof PREF_DECLS]: string }, } -- cgit v1.2.3-70-g09d2