From 5d4cb7864dc3ca19669877def6c298eb96d19b16 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sat, 22 Mar 2025 14:27:25 +0100 Subject: new translation system --- client-web/source/preferences/decl.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'client-web/source/preferences/decl.ts') 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 */ -// 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 = (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 }, -- cgit v1.2.3-70-g09d2