feat: add Russian localization and independent STT languages
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
"use client";
|
||||
import { useI18n } from "@/components/i18n";
|
||||
|
||||
|
||||
/**
|
||||
* Keyboard shortcuts (shortcut wave A, 2026-09-17) — the single document-level
|
||||
@@ -151,13 +153,14 @@ export function KeyboardShortcuts() {
|
||||
* Until the settings milestone ships an editor, this is how shortcuts
|
||||
* stay discoverable. */
|
||||
function CheatSheet({ open, onClose }: { open: boolean; onClose: () => void }) {
|
||||
const { t } = useI18n();
|
||||
const backdropDismiss = useBackdropDismiss(onClose);
|
||||
if (!open) return null;
|
||||
const scopes = ["global", "chat", "graph"] as const;
|
||||
const scopeLabels: Record<(typeof scopes)[number], string> = {
|
||||
global: "Global",
|
||||
chat: "Chat",
|
||||
graph: "Graph view",
|
||||
global: t("Global"),
|
||||
chat: t("Chat"),
|
||||
graph: t("Graph view"),
|
||||
};
|
||||
return (
|
||||
<div
|
||||
@@ -170,8 +173,8 @@ function CheatSheet({ open, onClose }: { open: boolean; onClose: () => void }) {
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<div className="mb-4 flex items-baseline justify-between">
|
||||
<span className="text-sm font-medium text-card-foreground">Keyboard shortcuts</span>
|
||||
<span className="text-xs text-muted-foreground">Esc to close</span>
|
||||
<span className="text-sm font-medium text-card-foreground">{t("Keyboard shortcuts")}</span>
|
||||
<span className="text-xs text-muted-foreground">{t("Esc to close")}</span>
|
||||
</div>
|
||||
{scopes.map((scope) => {
|
||||
const actions = KEYBOARD_ACTIONS.filter((a) => a.scope === scope);
|
||||
@@ -184,9 +187,9 @@ function CheatSheet({ open, onClose }: { open: boolean; onClose: () => void }) {
|
||||
<div className="flex flex-col gap-1">
|
||||
{actions.map((a) => (
|
||||
<div key={a.id} className="flex items-center justify-between gap-4 text-sm">
|
||||
<span className="text-muted-foreground">{a.label}</span>
|
||||
<span className="text-muted-foreground">{t(a.label)}</span>
|
||||
<kbd className="rounded-md border border-border bg-background px-1.5 py-0.5 font-mono text-xs text-card-foreground">
|
||||
{formatBinding(bindingForAction(a.id))}
|
||||
{t(formatBinding(bindingForAction(a.id)))}
|
||||
</kbd>
|
||||
</div>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user