feat: add Russian localization and independent STT languages
CI / Typecheck, tests, lint (push) Canceled after 0s
CI / Standalone (mac-arm64) (push) Canceled after 0s
CI / Standalone (linux-x64) (push) Canceled after 0s
CI / Standalone (windows-x64) (push) Canceled after 0s

This commit is contained in:
2026-10-25 17:18:44 +03:00
parent b277ee3e0f
commit a50ca4b867
93 changed files with 3261 additions and 904 deletions
+8 -1
View File
@@ -233,6 +233,10 @@ export const ROLE_SLOT: Readonly<Record<ModelRole, ModelSlotName>> = {
export interface GeneralSettings {
/** Auto-update the app (default ON). Mechanism ships in a later wave. */
autoUpdate?: boolean;
/** Absent = browser/system language (English for unsupported languages). */
language?: "en" | "ru";
/** Independent dictation language; absent = browser/system language. */
sttLanguage?: "en" | "ru";
}
/** Agent settings — everything about the non-conversation machinery. */
@@ -377,7 +381,7 @@ export interface UserSettings {
* prompts default off — hence their absence here. */
export interface FactorySettings {
version: number;
general: Required<GeneralSettings>;
general: GeneralSettings & { autoUpdate: boolean };
appearance: {
mode: "dark" | "light";
background: string | null;
@@ -441,6 +445,9 @@ function sanitizeGeneral(raw: Record<string, unknown>): GeneralSettings {
const out: GeneralSettings = {};
const autoUpdate = boolOrDrop(raw.autoUpdate);
if (autoUpdate !== undefined) out.autoUpdate = autoUpdate;
for (const key of ["language", "sttLanguage"] as const) {
if (raw[key] === "en" || raw[key] === "ru") out[key] = raw[key];
}
return out;
}