feat: add Russian localization and independent STT languages
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { useI18n } from "@/components/i18n";
|
||||
import type { Phase3 } from "@/src/core";
|
||||
|
||||
/**
|
||||
@@ -39,6 +42,7 @@ const CHIP_LABEL: Record<Phase3, string> = {
|
||||
* at all, so it is part of the drag surface instead of a carved-out
|
||||
* target. */
|
||||
export function PhaseChip({ phase }: { phase: Phase3 }) {
|
||||
const { t } = useI18n();
|
||||
return (
|
||||
<span
|
||||
data-testid="phase-chip"
|
||||
@@ -46,7 +50,7 @@ export function PhaseChip({ phase }: { phase: Phase3 }) {
|
||||
aria-hidden="true"
|
||||
className="pointer-events-none flex shrink-0 select-none items-center text-xs font-medium uppercase tracking-wide text-muted-foreground"
|
||||
>
|
||||
{CHIP_LABEL[phase]}
|
||||
{t(CHIP_LABEL[phase])}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
@@ -60,11 +64,12 @@ export function PhaseChip({ phase }: { phase: Phase3 }) {
|
||||
* after the start).
|
||||
*/
|
||||
export function PhaseDivider({ phase, nodeCount }: { phase: Phase3; nodeCount?: number }) {
|
||||
const { t } = useI18n();
|
||||
if (phase === "probe") return null;
|
||||
const label =
|
||||
phase === "plan" && nodeCount
|
||||
? `Plan · ${nodeCount} node${nodeCount === 1 ? "" : "s"}`
|
||||
: CHIP_LABEL[phase];
|
||||
? t("Plan · {v0} node{v1}", { v0: nodeCount, v1: nodeCount === 1 ? "" : "s" })
|
||||
: t(CHIP_LABEL[phase]);
|
||||
return (
|
||||
<div className="my-4 flex w-full items-center gap-3" data-testid={`phase-divider-${phase}`}>
|
||||
<span className="h-0 flex-1 border-t-2 border-dotted border-border/50" aria-hidden />
|
||||
|
||||
Reference in New Issue
Block a user