aboutsummaryrefslogtreecommitdiff
path: root/client-web/source
diff options
context:
space:
mode:
Diffstat (limited to 'client-web/source')
-rw-r--r--client-web/source/locale.ts3
-rw-r--r--client-web/source/preferences/decl.ts4
2 files changed, 3 insertions, 4 deletions
diff --git a/client-web/source/locale.ts b/client-web/source/locale.ts
index 09849cc..9812972 100644
--- a/client-web/source/locale.ts
+++ b/client-web/source/locale.ts
@@ -1,7 +1,6 @@
+import { LANGS } from "./preferences/decl.ts";
import { PREFS } from "./preferences/mod.ts";
-export const LANGS = ["en", "de"]
-
const translations: { [key: string]: string } = {}
export async function init_locale() {
diff --git a/client-web/source/preferences/decl.ts b/client-web/source/preferences/decl.ts
index ab57f0e..b72462a 100644
--- a/client-web/source/preferences/decl.ts
+++ b/client-web/source/preferences/decl.ts
@@ -4,7 +4,7 @@
Copyright (C) 2024 metamuffin <metamuffin.org>
*/
-import { LANGS } from "../locale.ts";
+export const LANGS = ["en", "de"]
export function hex_id(len = 8): string {
if (len > 8) return hex_id() + hex_id(len - 8)
@@ -17,7 +17,7 @@ const optional = <T>(a: T): T | undefined => a
export const PREF_DECLS = {
username: { type: string, default: "guest-" + hex_id(), allow_url: true },
- language: { type: string, possible_values: LANGS, default: "system", allow_url: true },
+ language: { type: string, possible_values: ["system", ...LANGS], default: "system", allow_url: true },
/* MEDIA */
rnnoise: { type: bool, default: true, allow_url: true },