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
+13 -13
View File
@@ -1,4 +1,6 @@
"use client";
import { useI18n } from "@/components/i18n";
import { useEffect, useState } from "react";
import { createPortal } from "react-dom";
@@ -50,6 +52,7 @@ export function DeleteSessionDialog({
/** Success path — the sidebar owns navigation + list patching. */
onDeleted: (id: string, mode: ChatDeleteMode, graphRevision: number) => void;
}) {
const { t } = useI18n();
const [traces, setTraces] = useState(false);
const [busy, setBusy] = useState(false);
const backdropDismiss = useBackdropDismiss(() => {
@@ -155,16 +158,17 @@ export function DeleteSessionBody({
onClose: () => void;
onRun: () => void;
}) {
const { t } = useI18n();
return (
<div
role="dialog"
aria-modal="true"
aria-label="Delete session"
aria-label={t("Delete session")}
data-testid="delete-session-dialog"
onClick={(e) => e.stopPropagation()}
className="w-[32rem] max-w-[calc(100vw-2rem)] rounded-xl border bg-card p-5 shadow-xl"
>
<h2 className="text-sm font-semibold text-destructive">Delete session?</h2>
<h2 className="text-sm font-semibold text-destructive">{t("Delete session?")}</h2>
{/* The session name below the title in JetBrains Mono (owner,
2026-09-24): no code-block chrome — the font already says
code. Owner, 2026-10-13 polish: normal text-sm size (was
@@ -176,9 +180,7 @@ export function DeleteSessionBody({
</code>
</div>
<p className="mt-2 text-sm text-muted-foreground">
This permanently removes the session — its messages, background jobs, and extraction records. Everything
it added to the graph stays unless you check below. This cannot be undone.
</p>
{t("This permanently removes the session — its messages, background jobs, and extraction records. Everything it added to the graph stays unless you check below. This cannot be undone.")}</p>
<label
data-testid={TRACES_COPY.testid}
className="mt-4 flex cursor-pointer items-start gap-2.5 rounded-lg border border-border/60 px-4 py-3"
@@ -192,8 +194,8 @@ export function DeleteSessionBody({
className="mt-0.5 size-4 shrink-0 accent-primary"
/>
<span className="min-w-0">
<span className="block text-sm text-foreground">{TRACES_COPY.title}</span>
<span className="mt-1 block text-xs text-muted-foreground">{TRACES_COPY.body}</span>
<span className="block text-sm text-foreground">{t(TRACES_COPY.title)}</span>
<span className="mt-1 block text-xs text-muted-foreground">{t(TRACES_COPY.body)}</span>
</span>
</label>
{failure && (
@@ -202,7 +204,7 @@ export function DeleteSessionBody({
data-testid="delete-failure"
className="mt-3 rounded-sm border border-border/60 px-3 py-2 text-xs"
>
<span className="text-foreground">{failure.error}</span>
<span className="text-foreground">{t(failure.error)}</span>
<button
type="button"
data-testid="delete-retry"
@@ -210,8 +212,7 @@ export function DeleteSessionBody({
disabled={busy}
className="ml-3 text-xs text-foreground underline-offset-2 hover:underline disabled:opacity-40"
>
Try again
</button>
{t("Try again")}</button>
</div>
)}
{/* The node dialog's exact bottom row: quiet Cancel, destructive
@@ -225,8 +226,7 @@ export function DeleteSessionBody({
disabled={busy}
className="rounded-sm px-3 py-1.5 text-xs text-muted-foreground transition-colors hover:text-foreground disabled:opacity-40"
>
Cancel
</button>
{t("Cancel")}</button>
<button
type="button"
data-testid="delete-confirm"
@@ -234,7 +234,7 @@ export function DeleteSessionBody({
disabled={busy}
className="rounded-sm border border-destructive/50 bg-destructive/10 px-3 py-1.5 text-xs text-destructive transition-colors hover:bg-destructive/20 disabled:opacity-40"
>
{busy ? "Deleting…" : "Delete"}
{busy ? t("Deleting…") : t("Delete")}
</button>
</div>
</div>