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
+15 -12
View File
@@ -1,4 +1,6 @@
"use client";
import { useI18n } from "@/components/i18n";
/**
* THE MINIMAL HOME (owner, 2026-10-06 — the no-graph home, take two):
@@ -24,6 +26,7 @@ import { ChainTableOverlay } from "@/components/chain-table.tsx";
import { GraphCostControl } from "@/components/graph-view.tsx";
import { NotesImportErrors, useNotesImport } from "@/components/notes-import.tsx";
import { Hint } from "@/components/ui/hint";
import { countLabel } from "@/src/core";
import type { ChatSummary, GraphCostSummary, GraphSnapshot } from "@/src/core";
/** The quiet centered summary — a pure body (props in, markup out) so
@@ -42,6 +45,7 @@ export function KnowledgeSummary({
practiceSessions: number;
importedNotes: number;
}) {
const { t, language } = useI18n();
const empty =
propositions === 0 && chains === 0 && teachSessions === 0 && practiceSessions === 0 && importedNotes === 0;
return (
@@ -52,29 +56,28 @@ export function KnowledgeSummary({
list) rides after the same parting. */}
<div className="flex flex-col gap-1">
<p className="font-ui text-sm text-muted-foreground">
{propositions} {propositions === 1 ? "proposition" : "propositions"}
{countLabel(language, propositions, "proposition", "propositions")}
</p>
<p className="font-ui text-sm text-muted-foreground">
{chains} {chains === 1 ? "chain" : "chains"}
{countLabel(language, chains, "chain", "chains")}
</p>
</div>
<div className="h-4" aria-hidden="true" />
<div className="flex flex-col gap-1">
<p className="font-ui text-sm text-muted-foreground">
{teachSessions} {teachSessions === 1 ? "teaching session" : "teaching sessions"}
{countLabel(language, teachSessions, "teaching session", "teaching sessions")}
</p>
<p className="font-ui text-sm text-muted-foreground">
{practiceSessions} {practiceSessions === 1 ? "practice session" : "practice sessions"}
{countLabel(language, practiceSessions, "practice session", "practice sessions")}
</p>
</div>
<div className="h-4" aria-hidden="true" />
<p className="font-ui text-sm text-muted-foreground">
{importedNotes} {importedNotes === 1 ? "imported note" : "imported notes"}
{countLabel(language, importedNotes, "imported note", "imported notes")}
</p>
{empty && (
<p className="pt-2 font-ui text-xs text-muted-foreground/70">
Nothing here yet — import notes to begin building the graph.
</p>
{t("Nothing here yet — import notes to begin building the graph.")}</p>
)}
</div>
);
@@ -93,6 +96,7 @@ export function MinimalHome({
onPracticeSelectionChange?: (nodes: { id: string; name: string; statement: string }[]) => void;
onChainSelectClose?: () => void;
}) {
const { t } = useI18n();
const [snapshot, setSnapshot] = useState<GraphSnapshot | null>(null);
const [costs, setCosts] = useState<GraphCostSummary | null>(null);
const [chats, setChats] = useState<ChatSummary[]>([]);
@@ -167,7 +171,7 @@ export function MinimalHome({
<div className="lh-no-drag lh-wco-floating absolute right-2 top-2 z-10 flex max-w-[calc(100%-5.5rem)] flex-col items-end gap-2">
<div className="flex min-w-0 items-start gap-2">
<div className="graph-chrome-fade-in shrink-0 rounded-xl border bg-card/85 px-1 py-[3px] shadow-lg backdrop-blur">
<Hint label="Every reasoning chain" side="bottom">
<Hint label={t("Every reasoning chain")} side="bottom">
<button
type="button"
onClick={() => setChainsOpen(true)}
@@ -175,12 +179,11 @@ export function MinimalHome({
className="flex h-7 items-center gap-1.5 rounded-lg px-2.5 text-xs text-muted-foreground transition-colors hover:bg-accent"
>
<ListTreeIcon className="size-3" />
Chains
</button>
{t("Chains")}</button>
</Hint>
</div>
<div className="shrink-0 rounded-xl border bg-card/85 px-1 py-[3px] shadow-lg backdrop-blur">
<Hint label="Import notes into the graph" side="bottom">
<Hint label={t("Import notes into the graph")} side="bottom">
<button
type="button"
disabled={importing}
@@ -189,7 +192,7 @@ export function MinimalHome({
className="flex h-7 items-center gap-1.5 rounded-lg px-2.5 text-xs text-muted-foreground transition-colors hover:bg-accent disabled:opacity-50"
>
<UploadIcon className="size-3" />
{importing ? "Importing…" : "Import notes…"}
{importing ? t("Importing…") : t("Import notes…")}
</button>
</Hint>
</div>