diff options
author | metamuffin <metamuffin@disroot.org> | 2024-04-01 17:34:04 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-04-01 17:34:04 +0200 |
commit | 976c8c7cc4a0ab859e3e785a9dbae0ab8057274c (patch) | |
tree | f1103f7336b1ba8af070487a0e3a06ffec1292ab /client-web/source/locale/mod.ts | |
parent | 45529def628fd1562bef262312649b428bbdb0f7 (diff) | |
download | keks-meet-976c8c7cc4a0ab859e3e785a9dbae0ab8057274c.tar keks-meet-976c8c7cc4a0ab859e3e785a9dbae0ab8057274c.tar.bz2 keks-meet-976c8c7cc4a0ab859e3e785a9dbae0ab8057274c.tar.zst |
translate settings and to german
Diffstat (limited to 'client-web/source/locale/mod.ts')
-rw-r--r-- | client-web/source/locale/mod.ts | 7 |
1 files changed, 6 insertions, 1 deletions
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 }, } |