diff options
Diffstat (limited to 'client-web/source/preferences/decl.ts')
-rw-r--r-- | client-web/source/preferences/decl.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/client-web/source/preferences/decl.ts b/client-web/source/preferences/decl.ts index 536c5c7..ab57f0e 100644 --- a/client-web/source/preferences/decl.ts +++ b/client-web/source/preferences/decl.ts @@ -3,9 +3,8 @@ which is licensed under the GNU Affero General Public License (version 3); see /COPYING. Copyright (C) 2024 metamuffin <metamuffin.org> */ -// there should be no deps to dom APIs in this file for the tablegen to work -import { LOCALES } from "../locale/mod.ts"; +import { LANGS } from "../locale.ts"; export function hex_id(len = 8): string { if (len > 8) return hex_id() + hex_id(len - 8) @@ -18,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: ["system", ...Object.keys(LOCALES)], default: "system", allow_url: true }, + language: { type: string, possible_values: LANGS, default: "system", allow_url: true }, /* MEDIA */ rnnoise: { type: bool, default: true, allow_url: true }, |