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
+6 -2
View File
@@ -1,4 +1,7 @@
"use client";
import { countLabel } from "@/src/core";
import { useI18n } from "@/components/i18n";
import { useState } from "react";
import { ChevronRightIcon } from "lucide-react";
@@ -21,9 +24,10 @@ export interface GraphContextData {
}
export function GraphContextCard({ data }: { data: GraphContextData }) {
const { t, language } = useI18n();
const [open, setOpen] = useState(false);
const { propositions = [], chains = [] } = data ?? {};
const noun = (n: number, one: string, many: string) => `${n} ${n === 1 ? one : many}`;
const noun = (n: number, one: string, many: string) => countLabel(language, n, one, many);
return (
<div data-testid="graph-context-card" className="my-1">
<button
@@ -33,7 +37,7 @@ export function GraphContextCard({ data }: { data: GraphContextData }) {
className="flex w-full cursor-pointer items-center gap-2 rounded-lg border border-dashed border-border/70 px-3 py-2 text-left text-xs text-muted-foreground transition-colors hover:text-foreground"
>
<ChevronRightIcon aria-hidden="true" className={cn("size-3.5 shrink-0 transition-transform", open && "rotate-90")} />
<span className="font-medium">Graph context</span>
<span className="font-medium">{t("Graph context")}</span>
<span className="min-w-0 flex-1 truncate">
{noun(propositions.length, "proposition", "propositions")}
{chains.length > 0 ? ` · ${noun(chains.length, "chain", "chains")}` : ""}