Skip to content

Your lightweight open-source personal agent.

fix(webui): localize the component gallery

chengyongruae5cb64e9e4e
diff --git a/webui/COMPONENTS.md b/webui/COMPONENTS.md
index 13a3424dd..5c260e513 100644
--- a/webui/COMPONENTS.md
+++ b/webui/COMPONENTS.md
@@ -13,13 +13,13 @@ Open `http://127.0.0.1:5173/gallery.html`. The gallery uses the existing Vite de
The gallery opens in **Previews**, which lists components with working examples. **All source** includes the complete source inventory and marks entries as **Preview** or **Source only**. Source-only entries link to related previews when their direct imports or callers have examples. A bookmarked source-only entry opens the source index automatically.
-Search by module name, exported name, path, or the bilingual example title. Categories separate foundation controls, shared views, conversation, settings, hosts, workbench, icons, and channel-owned interfaces. Each entry shows its source, exports, and direct references. The selected entry is kept in the URL, so it can be bookmarked or reloaded.
+Search by module name, exported name, path, or the example title in the selected language. Categories separate foundation controls, shared views, conversation, settings, hosts, workbench, icons, and channel-owned interfaces. Each entry shows its source, exports, and direct references. The selected entry is kept in the URL, so it can be bookmarked or reloaded.
The inventory is read from the current checkout. **Refresh inventory** picks up added, removed, and changed source files. Counts are source-module counts: a module can export several components, and several modules can belong to one example family. Direct references include imports, literal dynamic imports, and re-exports, including type references; they exclude tests and the gallery. Indirect plugin registration is not a direct reference, so an empty reference list does not prove that a component is unused.
All foundation controls have live examples. Shared examples cover Markdown, code, math, messages, media, thinking/tool activity, file edits, and file references. Settings examples include the provider management dialog with its search and configuration flow, model controls, capability forms, channel credentials, usage charts, and automation controls. Conversation examples include the composer, prompt navigation, activity and error states. Shell examples include conversation dialogs, mentions, host status, icons, and pane layouts. These examples mount the product components with local data and caller-owned actions.
-Change state selectors to inspect streaming, completion, disabled, missing-media, or error states where applicable. Dialog and disclosure examples preserve local drafts; their actions affect only the preview. Use the header to change theme and the language of the product components. Gallery explanations and code examples are development documentation.
+Change state selectors to inspect streaming, completion, disabled, missing-media, or error states where applicable. Dialog and disclosure examples preserve local drafts; their actions affect only the preview. Use the header to change theme and language throughout the gallery, including navigation, usage notes, and preview controls. Language changes preserve the current preview and its drafts. Component names, API values, source examples, and simulated user content keep their original text.
Feature screens that own gateway requests, session state, or host connections are indexed with their source and callers. Exercise their complete workflows in the running WebUI. The gallery does not emulate those services.
@@ -83,6 +83,6 @@ The caller decides how to persist `enabled`; the switch implements the interacti
The development entry is `gallery.html`; its UI and examples live in `src/dev/gallery/`. The Vite `componentGallery` plugin serves the source inventory only during development. The normal production build starts at `index.html` and excludes the gallery entry, inventory endpoint, and source-view data.
-Add examples to the appropriate feature file in `src/dev/gallery/`. Each example names the source modules it actually renders, describes the useful options, and contains a small usage snippet. Mount the actual component and use local state for interactions. Supply fixture data through the component's existing props. When a reusable interface owns client subscriptions or service requests, separate its presentation view from the owning adapter and use that view in production and the gallery. Combine related modules into one example rather than exposing every implementation detail as a separate control. A coverage test checks that every foundation module has an example and that all example source paths exist.
+Add examples to the appropriate feature file in `src/dev/gallery/`. Gallery translations live in `src/dev/gallery/locales/` under a development-only `gallery` namespace. Keep each locale's keys and interpolation variables aligned. Example `title`, `description`, and `options` fields are translation keys; `code` remains literal source. Use `useGalleryTranslation()` for preview interface copy and the product's existing translations for product controls. Each example names the source modules it actually renders, describes the useful options, and contains a small usage snippet. Mount the actual component and use local state for interactions. Supply fixture data through the component's existing props. When a reusable interface owns client subscriptions or service requests, separate its presentation view from the owning adapter and use that view in production and the gallery. Combine related modules into one example rather than exposing every implementation detail as a separate control. A coverage test checks that every foundation module has an example and that all example source paths exist.
Run the focused gallery and affected component tests, lint, and `bun run build`. The build type-checks the gallery source even though it does not bundle it. Inspect examples in light/dark themes and at narrow widths, exercise keyboard interaction, and verify the affected production screens through the gateway.
diff --git a/webui/browser/gallery-language.spec.ts b/webui/browser/gallery-language.spec.ts
new file mode 100644
index 000000000..7212348fd
--- /dev/null
+++ b/webui/browser/gallery-language.spec.ts
@@ -0,0 +1,118 @@
+import { expect, test } from "@playwright/test";
+
+const locales = [
+ { code: "en", label: "English", title: "Component gallery", search: "Search components", preview: "Component preview" },
+ { code: "zh-CN", label: "简体中文", title: "组件图鉴", search: "搜索组件", preview: "组件预览" },
+ { code: "zh-TW", label: "繁體中文", title: "元件圖鑑", search: "搜尋元件", preview: "元件預覽" },
+ { code: "fr", label: "Français", title: "Galerie de composants", search: "Rechercher des composants", preview: "Aperçu du composant" },
+ { code: "ja", label: "日本語", title: "コンポーネントギャラリー", search: "コンポーネントを検索", preview: "コンポーネントのプレビュー" },
+ { code: "ko", label: "한국어", title: "컴포넌트 갤러리", search: "컴포넌트 검색", preview: "컴포넌트 미리보기" },
+ { code: "es", label: "Español", title: "Galería de componentes", search: "Buscar componentes", preview: "Vista previa del componente" },
+ { code: "pt-BR", label: "Português (Brasil)", title: "Galeria de componentes", search: "Buscar componentes", preview: "Prévia do componente" },
+ { code: "vi", label: "Tiếng Việt", title: "Thư viện thành phần", search: "Tìm thành phần", preview: "Xem trước thành phần" },
+ { code: "id", label: "Bahasa Indonesia", title: "Galeri komponen", search: "Cari komponen", preview: "Pratinjau komponen" },
+];
+
+for (const locale of locales) {
+ test(`gallery switches to ${locale.code} without replacing preview state`, async ({ page }) => {
+ await page.setViewportSize({ width: locale.code === "en" || locale.code.startsWith("zh") ? 1280 : 390, height: 960 });
+ let inventoryRequests = 0;
+ page.on("request", (request) => { if (new URL(request.url()).pathname === "/__nanobot_components") inventoryRequests += 1; });
+ await page.goto("/gallery.html#component=webui%2Fsrc%2Fcomponents%2Fui%2Finput.tsx");
+ const input = page.getByRole("region", { name: "Component preview", exact: true }).getByRole("textbox").first();
+ await input.fill("Keep this draft 中文");
+ const originalInput = await input.elementHandle();
+ const code = await page.locator(".gallery-code").first().innerText();
+ const originalHash = new URL(page.url()).hash;
+
+ await page.locator(".gallery-header").getByRole("combobox").click();
+ await page.getByRole("option", { name: locale.label, exact: true }).click();
+
+ await expect(page.getByRole("heading", { name: locale.title, exact: true })).toBeVisible();
+ await expect(page.getByRole("searchbox", { name: locale.search })).toBeVisible();
+ await expect(page.getByRole("region", { name: locale.preview, exact: true }).getByRole("textbox").first()).toHaveValue("Keep this draft 中文");
+ expect(await originalInput!.evaluate((element) => element.isConnected)).toBe(true);
+ expect(new URL(page.url()).hash).toBe(originalHash);
+ await expect(page.locator(".gallery-code").first()).toHaveText(code);
+ expect(inventoryRequests).toBe(1);
+ await expect(page.locator("html")).toHaveAttribute("lang", locale.code);
+ expect(await page.evaluate(() => localStorage.getItem("nanobot.locale"))).toBe(locale.code);
+ expect(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth)).toBe(true);
+
+ await page.reload();
+ await expect(page.getByRole("heading", { name: locale.title, exact: true })).toBeVisible();
+ await expect(page.locator(".gallery-header").getByRole("combobox")).toHaveText(locale.label);
+ });
+}
+
+test("gallery localizes an existing error and retries in the selected language", async ({ page }) => {
+ await page.route("**/__nanobot_components", (route) => route.fulfill({ status: 503, body: "unavailable" }));
+ await page.goto("/gallery.html");
+ await expect(page.getByRole("alert")).toContainText("Could not load the inventory");
+ await page.locator(".gallery-header").getByRole("combobox").click();
+ await page.getByRole("option", { name: "简体中文", exact: true }).click();
+ await expect(page.getByRole("alert")).toContainText("无法加载组件目录");
+
+ await page.unroute("**/__nanobot_components");
+ await page.getByRole("button", { name: "刷新目录" }).click();
+ await expect(page.getByRole("region", { name: "组件预览", exact: true })).toBeVisible();
+ await page.getByRole("button", { name: "全部源码", exact: true }).click();
+ await page.getByRole("searchbox", { name: "搜索组件" }).fill("SettingsView");
+ await page.locator('a[href="#component=webui%2Fsrc%2Fcomponents%2Fsettings%2FSettingsView.tsx"]').click();
+ await expect(page.getByRole("heading", { name: "暂无独立预览", exact: true })).toBeVisible();
+ await page.getByRole("button", { name: "预览", exact: true }).click();
+ await expect(page.getByRole("region", { name: "组件预览", exact: true })).toBeVisible();
+});
+
+test("gallery translates model labels and existing interaction feedback in a narrow dark view", async ({ page }) => {
+ await page.setViewportSize({ width: 390, height: 960 });
+ await page.emulateMedia({ colorScheme: "dark" });
+ await page.goto("/gallery.html#component=webui%2Fsrc%2Fcomponents%2Fsettings%2Fshared%2FModelControls.tsx");
+ const preview = page.locator(".gallery-preview");
+ await expect(preview.getByText("Provider", { exact: true })).toBeVisible();
+ await expect(preview.getByText("Model", { exact: true })).toBeVisible();
+ await page.locator(".gallery-header").getByRole("combobox").click();
+ await page.getByRole("option", { name: "简体中文", exact: true }).click();
+ await expect(preview.getByText("提供商", { exact: true })).toBeVisible();
+ await expect(preview.getByText("模型", { exact: true })).toBeVisible();
+ await expect(preview.getByText("推理强度", { exact: true })).toBeVisible();
+ await expect(page.locator("html")).toHaveClass(/dark/);
+ expect(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth)).toBe(true);
+
+ await page.locator('a[href="#component=webui%2Fsrc%2Fcomponents%2Fui%2Fbutton.tsx"]').click();
+ await preview.getByRole("button", { name: "destructive", exact: true }).click();
+ await expect(preview.getByRole("status")).toHaveText("按钮点击次数:1");
+ await page.locator(".gallery-header").getByRole("combobox").click();
+ await page.getByRole("option", { name: "English", exact: true }).click();
+ await expect(preview.getByRole("status")).toHaveText("Button clicks: 1");
+});
+
+test("gallery preserves history states and subagent retries when changing language", async ({ page }) => {
+ await page.goto("/gallery.html#component=webui%2Fsrc%2Fcomponents%2Fthread%2FThreadHistoryStatus.tsx");
+ const preview = page.locator(".gallery-preview");
+ await expect(preview.getByRole("combobox", { name: "History state" })).toHaveText("loading");
+ await preview.getByRole("combobox").click();
+ await page.getByRole("option", { name: "exhausted", exact: true }).click();
+ await expect(preview.getByText("No earlier messages", { exact: true })).toBeVisible();
+
+ await page.locator(".gallery-header").getByRole("combobox").click();
+ await page.getByRole("option", { name: "简体中文", exact: true }).click();
+ await expect(preview.getByRole("combobox", { name: "历史状态" })).toHaveText("exhausted");
+ await expect(preview.getByText("没有更早的消息", { exact: true })).toBeVisible();
+ await preview.getByRole("combobox").click();
+ await page.getByRole("option", { name: "error", exact: true }).click();
+ await preview.getByRole("button", { name: "加载失败,重试" }).click();
+ await expect(preview.getByRole("combobox")).toHaveText("loading");
+ await expect(preview.getByText("重试次数:1", { exact: true })).toBeVisible();
+
+ await page.locator('a[href="#component=webui%2Fsrc%2Fcomponents%2Fthread%2FSubagentThreadView.tsx"]').click();
+ await preview.getByRole("combobox").click();
+ await page.getByRole("option", { name: "error", exact: true }).click();
+ await expect(preview.getByRole("button", { name: "加载失败,重试" })).toBeVisible();
+ await page.locator(".gallery-header").getByRole("combobox").click();
+ await page.getByRole("option", { name: "English", exact: true }).click();
+ await expect(preview.getByRole("combobox")).toHaveText("error");
+ await preview.getByRole("button", { name: "Loading failed. Retry" }).click();
+ await expect(preview.getByRole("combobox")).toHaveText("ready");
+ await expect(preview.getByText("Retries: 1", { exact: true })).toBeVisible();
+});
diff --git a/webui/browser/provider-parameters.spec.ts b/webui/browser/provider-parameters.spec.ts
index e71619cfb..20f448707 100644
--- a/webui/browser/provider-parameters.spec.ts
+++ b/webui/browser/provider-parameters.spec.ts
@@ -6,7 +6,7 @@ for (const locale of ["en", "zh-CN"]) {
await page.setViewportSize({ width, height: 900 });
await page.addInitScript((language) => localStorage.setItem("nanobot.locale", language), locale);
await page.goto("/gallery.html#component=webui%2Fsrc%2Fcomponents%2Fsettings%2Fmodels%2FProviderParameterFields.tsx");
- const preview = page.getByRole("region", { name: "Component preview" });
+ const preview = page.getByRole("region", { name: locale === "en" ? "Component preview" : "组件预览" });
const rows = preview.getByRole("button");
await expect(rows).toHaveCount(3);
diff --git a/webui/src/dev/gallery/Gallery.tsx b/webui/src/dev/gallery/Gallery.tsx
index e2d382fbe..b579a95f9 100644
--- a/webui/src/dev/gallery/Gallery.tsx
+++ b/webui/src/dev/gallery/Gallery.tsx
@@ -22,10 +22,15 @@ import { feishuWhatsAppChannelExamples } from "./channels-feishu-whatsapp";
import { linearChannelExamples } from "./channels-linear";
import { weixinChannelExamples } from "./channels-weixin";
import { foundationPath, type ComponentSource } from "./inventory";
+import { useGalleryTranslation } from "./i18n";
export const examples = [...foundationExamples, ...sharedExamples, ...settingsExamples, ...providerExamples, ...conversationExamples, ...shellExamples, ...standaloneExamples, ...remoteExamples, ...contentExamples, ...runtimeSettingsExamples,
...channelExamples, ...withChannelEntries([...feishuWhatsAppChannelExamples, ...linearChannelExamples, ...weixinChannelExamples])];
const examplesByPath = new Map(examples.flatMap((example) => example.files.map((file) => [file, example] as const)));
+const groupKeys: Record<string, string> = {
+ All: "all", "Shared views & shell": "shared", Icons: "icons", Hosts: "hosts", Settings: "settings",
+ "Settings / shared": "settingsShared", Conversation: "conversation", Foundations: "foundations", Workbench: "workbench",
+};
function selectedPath(): string {
return new URLSearchParams(window.location.hash.slice(1)).get("component") ?? `${foundationPath}button.tsx`;
@@ -33,8 +38,9 @@ function selectedPath(): string {
export function Gallery() {
const { theme, setTheme } = useTheme();
+ const { t } = useGalleryTranslation();
const [inventory, setInventory] = useState<ComponentSource[]>([]);
- const [error, setError] = useState("");
+ const [error, setError] = useState(false);
const [loading, setLoading] = useState(true);
const [reload, setReload] = useState(0);
const [query, setQuery] = useState("");
@@ -45,15 +51,15 @@ export function Gallery() {
useEffect(() => {
const controller = new AbortController();
setLoading(true);
- setError("");
+ setError(false);
void fetch("/__nanobot_components", { signal: controller.signal })
.then(async (response) => {
- if (!response.ok) throw new Error("Could not load the inventory. Check the Vite terminal and retry.");
+ if (!response.ok) throw new Error(`Inventory request failed: ${response.status}`);
const data: ComponentSource[] = await response.json();
setInventory(data);
})
- .catch((reason: unknown) => {
- if (!controller.signal.aborted) setError(reason instanceof Error ? reason.message : String(reason));
+ .catch(() => {
+ if (!controller.signal.aborted) setError(true);
})
.finally(() => { if (!controller.signal.aborted) setLoading(false); });
return () => controller.abort();
@@ -69,12 +75,23 @@ export function Gallery() {
return () => window.removeEventListener("hashchange", change);
}, []);
+ useEffect(() => { document.title = t("ui.pageTitle"); }, [t]);
+
+ const exampleTitle = (example: (typeof examples)[number]) => t(example.title, example.titleValues);
+ const groupLabel = (name: string): string => {
+ return name.startsWith("Channels / ")
+ ? t("ui.groups.channel", { channel: name.slice("Channels / ".length) })
+ : t(`ui.groups.${groupKeys[name]}`);
+ };
const previewCount = inventory.filter((item) => examplesByPath.has(item.path)).length;
const browsable = view === "previews" ? inventory.filter((item) => examplesByPath.has(item.path)) : inventory;
const groups = ["All", ...new Set(browsable.map((item) => item.group))];
const search = query.trim().toLowerCase();
- const filtered = browsable.filter((item) => (group === "All" || item.group === group)
- && `${item.path} ${item.exports.join(" ")} ${examplesByPath.get(item.path)?.title ?? ""}`.toLowerCase().includes(search));
+ const filtered = browsable.filter((item) => {
+ const example = examplesByPath.get(item.path);
+ return (group === "All" || item.group === group)
+ && `${item.path} ${item.exports.join(" ")} ${example ? exampleTitle(example) : ""}`.toLowerCase().includes(search);
+ });
const current = browsable.find((item) => item.path === selected) ?? browsable[0];
const example = current && examplesByPath.get(current.path);
const relatedExamples = current && !example ? examples.filter((item) => item.files.some((file) =>
@@ -85,19 +102,19 @@ export function Gallery() {
<header className="gallery-header">
<div className="flex min-w-0 items-center gap-3">
<img src="/brand/nanobot_icon_192.png" alt="" className="h-9 w-9" />
- <div><h1 className="text-base font-semibold">Component gallery · 组件图鉴</h1>
- <p className="text-xs text-muted-foreground">Try components and their states · 查看效果与交互状态</p></div>
+ <div><h1 className="text-base font-semibold">{t("ui.title")}</h1>
+ <p className="text-xs text-muted-foreground">{t("ui.subtitle")}</p></div>
</div>
<div className="flex flex-wrap items-center gap-4">
- <label className="flex items-center gap-2 text-xs"><span>Dark mode</span>
- <ToggleButton checked={theme === "dark"} onChange={(dark) => setTheme(dark ? "dark" : "light")} label="Dark mode" /></label>
+ <label className="flex items-center gap-2 text-xs"><span>{t("ui.darkMode")}</span>
+ <ToggleButton checked={theme === "dark"} onChange={(dark) => setTheme(dark ? "dark" : "light")} label={t("ui.darkMode")} /></label>
<LanguageSwitcher />
</div>
</header>
<div className="gallery-workspace">
- <aside className="gallery-sidebar" aria-label="Component navigation">
- <SegmentedControl value={view} ariaLabel="Inventory view" className="mb-4 w-full"
- options={[{ value: "previews", label: "Previews · 预览" }, { value: "all", label: "All source · 源码" }]}
+ <aside className="gallery-sidebar" aria-label={t("ui.navigation")}>
+ <SegmentedControl value={view} ariaLabel={t("ui.inventoryView")} className="mb-4 w-full"
+ options={[{ value: "previews", label: t("ui.previews") }, { value: "all", label: t("ui.allSource") }]}
onChange={(next) => {
setView(next);
setGroup("All");
@@ -106,67 +123,67 @@ export function Gallery() {
if (first) window.location.hash = new URLSearchParams({ component: first.path }).toString();
}
}} />
- <SearchInput type="search" aria-label="Search components" placeholder="Search name, path / 搜索组件" value={query} onChange={(event) => setQuery(event.target.value)} />
- <label className="mt-3 flex items-center gap-2 text-xs text-muted-foreground">Category
- <select aria-label="Component category" value={group} onChange={(event) => setGroup(event.target.value)}
+ <SearchInput type="search" aria-label={t("ui.search")} placeholder={t("ui.searchPlaceholder")} value={query} onChange={(event) => setQuery(event.target.value)} />
+ <label className="mt-3 flex items-center gap-2 text-xs text-muted-foreground">{t("ui.category")}
+ <select aria-label={t("ui.componentCategory")} value={group} onChange={(event) => setGroup(event.target.value)}
className="min-w-0 flex-1 rounded-control border bg-background px-2 py-2 text-foreground">
- {groups.map((item) => <option key={item} value={item}>{item}</option>)}
+ {groups.map((item) => <option key={item} value={item}>{groupLabel(item)}</option>)}
</select>
</label>
- <p className="my-3 text-xs leading-5 text-muted-foreground" role="status">{loading ? "Reading source inventory…"
- : view === "previews" ? `${filtered.length} / ${previewCount} modules with previews · 可预览组件`
- : `${filtered.length} / ${inventory.length} source modules · ${previewCount} with previews`}</p>
- <nav className="gallery-source-list" aria-label="Component sources">
+ <p className="my-3 text-xs leading-5 text-muted-foreground" role="status">{loading ? t("ui.readingInventory")
+ : view === "previews" ? t("ui.previewCount", { visible: filtered.length, total: previewCount })
+ : t("ui.sourceCount", { visible: filtered.length, total: inventory.length, previews: previewCount })}</p>
+ <nav className="gallery-source-list" aria-label={t("ui.sources")}>
{filtered.map((item) => <a key={item.path} href={`#${new URLSearchParams({ component: item.path })}`}
aria-current={current?.path === item.path ? "page" : undefined}
className={cn("block rounded-control px-3 py-2 text-sm outline-none focus-visible:ring-2 focus-visible:ring-ring",
current?.path === item.path ? "bg-sidebar-selected text-foreground" : "text-muted-foreground hover:bg-muted hover:text-foreground")}>
<span className="flex items-center justify-between gap-2"><span className="truncate">{item.name}</span>
- {view === "all" ? <span className="shrink-0 text-[10px] opacity-70">{examplesByPath.has(item.path) ? "Preview" : "Source only"}</span> : null}</span>
- <span className="block truncate text-[11px] opacity-70">{item.group}</span>
+ {view === "all" ? <span className="shrink-0 text-[10px] opacity-70">{examplesByPath.has(item.path) ? t("ui.previewBadge") : t("ui.sourceOnlyBadge")}</span> : null}</span>
+ <span className="block truncate text-[11px] opacity-70">{groupLabel(item.group)}</span>
</a>)}
{!loading && filtered.length === 0 ? <div className="space-y-3 px-3 py-5 text-sm text-muted-foreground">
- <p>No matching {view === "previews" ? "previews" : "source modules"}.</p>
- {query || group !== "All" ? <Button variant="outline" size="sm" onClick={() => { setQuery(""); setGroup("All"); }}>Clear filters</Button> : null}
- {view === "previews" ? <Button variant="ghost" size="sm" onClick={() => { setView("all"); setGroup("All"); }}>Search all source</Button> : null}
+ <p>{t(view === "previews" ? "ui.noPreviews" : "ui.noSources")}</p>
+ {query || group !== "All" ? <Button variant="outline" size="sm" onClick={() => { setQuery(""); setGroup("All"); }}>{t("ui.clearFilters")}</Button> : null}
+ {view === "previews" ? <Button variant="ghost" size="sm" onClick={() => { setView("all"); setGroup("All"); }}>{t("ui.searchAllSource")}</Button> : null}
</div> : null}
</nav>
- <Button variant="ghost" size="sm" className="mt-3 w-full" disabled={loading} onClick={() => setReload((value) => value + 1)}>Refresh inventory</Button>
+ <Button variant="ghost" size="sm" className="mt-3 w-full" disabled={loading} onClick={() => setReload((value) => value + 1)}>{t("ui.refreshInventory")}</Button>
</aside>
<main className="gallery-main">
- {error ? <div role="alert" className="rounded-control border border-destructive/30 p-4 text-sm text-destructive">{error}</div> : null}
+ {error ? <div role="alert" className="rounded-control border border-destructive/30 p-4 text-sm text-destructive">{t("ui.inventoryFailure")}</div> : null}
{current ? <article className="mx-auto max-w-5xl" key={current.path}>
- <p className="mb-2 text-xs text-muted-foreground">{current.group}</p>
- <h2 className="text-2xl font-semibold tracking-tight">{example?.title ?? current.name}</h2>
+ <p className="mb-2 text-xs text-muted-foreground">{groupLabel(current.group)}</p>
+ <h2 className="text-2xl font-semibold tracking-tight">{example ? exampleTitle(example) : current.name}</h2>
<p className="mt-3 break-all font-mono text-xs text-muted-foreground">{current.path}</p>
{example ? <>
- <p className="mt-5 text-sm leading-6 text-muted-foreground">{example.description}</p>
- <section aria-label="Component preview" className="gallery-preview mt-6"><example.Preview /></section>
- <section className="mt-8 space-y-3"><h3 className="text-sm font-semibold">Usage · 使用方法</h3>
- <p className="text-sm leading-6 text-muted-foreground">{example.options}</p><pre className="gallery-code"><code>{example.code}</code></pre>
- {example.files.length > 1 ? <p className="text-xs leading-5 text-muted-foreground">This example composes: {example.files.map((file) => file.split("/").pop()).join(", ")}</p> : null}
+ <p className="mt-5 text-sm leading-6 text-muted-foreground">{t(example.description)}</p>
+ <section aria-label={t("ui.componentPreview")} className="gallery-preview mt-6"><example.Preview /></section>
+ <section className="mt-8 space-y-3"><h3 className="text-sm font-semibold">{t("ui.usage")}</h3>
+ <p className="text-sm leading-6 text-muted-foreground">{t(example.options)}</p><pre className="gallery-code"><code>{example.code}</code></pre>
+ {example.files.length > 1 ? <p className="text-xs leading-5 text-muted-foreground">{t("ui.composedModules", { modules: example.files.map((file) => file.split("/").pop()).join(", ") })}</p> : null}
</section>
</> : <section className="mt-6 space-y-3 rounded-control border p-4">
- <h3 className="text-sm font-semibold">Source only · 暂无独立预览</h3>
- <p className="text-sm leading-6 text-muted-foreground">This entry indexes a source module. Use Previews to browse working examples. 此条目收录源码;切换到“预览”查看可操作示例。</p>
+ <h3 className="text-sm font-semibold">{t("ui.sourceOnlyTitle")}</h3>
+ <p className="text-sm leading-6 text-muted-foreground">{t("ui.sourceOnlyDescription")}</p>
{relatedExamples.length > 0 ? <div className="space-y-2">
- <p className="text-xs text-muted-foreground">Related component previews · 相关组件预览</p>
+ <p className="text-xs text-muted-foreground">{t("ui.relatedPreviews")}</p>
<ul className="space-y-2">{relatedExamples.map((item) => <li key={item.files[0]}>
- <a className="text-sm underline underline-offset-4" href={`#${new URLSearchParams({ component: item.files[0] })}`}>{item.title}</a>
+ <a className="text-sm underline underline-offset-4" href={`#${new URLSearchParams({ component: item.files[0] })}`}>{exampleTitle(item)}</a>
</li>)}</ul>
</div> : null}
</section>}
- <section className="mt-8 space-y-3"><h3 className="text-sm font-semibold">Exports · 导出</h3>
- <p className="break-words font-mono text-xs leading-6 text-muted-foreground">{current.exports.join(", ") || "Internal module"}</p>
+ <section className="mt-8 space-y-3"><h3 className="text-sm font-semibold">{t("ui.exports")}</h3>
+ <p className="break-words font-mono text-xs leading-6 text-muted-foreground">{current.exports.join(", ") || t("ui.internalModule")}</p>
</section>
- <section className="mt-8 space-y-3"><h3 className="text-sm font-semibold">Direct references · 使用位置</h3>
- <p className="text-xs leading-5 text-muted-foreground">Imports and re-exports in product source; tests and this gallery are excluded. Plugin registration may also load modules indirectly.</p>
+ <section className="mt-8 space-y-3"><h3 className="text-sm font-semibold">{t("ui.references")}</h3>
+ <p className="text-xs leading-5 text-muted-foreground">{t("ui.referencesDescription")}</p>
{current.usedBy.length ? <ul className="space-y-2">{current.usedBy.map((file) => <li key={file} className="break-all font-mono text-xs text-muted-foreground">{file}</li>)}</ul>
- : <p className="text-sm text-muted-foreground">No direct source references found.</p>}
+ : <p className="text-sm text-muted-foreground">{t("ui.noReferences")}</p>}
</section>
- <details className="mt-8 rounded-control border p-4"><summary className="cursor-pointer text-sm font-semibold">Source code · 源码</summary>
+ <details className="mt-8 rounded-control border p-4"><summary className="cursor-pointer text-sm font-semibold">{t("ui.sourceCode")}</summary>
<pre className="gallery-code mt-4 max-h-[32rem]"><code>{current.source}</code></pre></details>
- </article> : !error ? <p className="text-sm text-muted-foreground">{loading ? "Loading components…" : "No component source files found."}</p> : null}
+ </article> : !error ? <p className="text-sm text-muted-foreground">{t(loading ? "ui.loadingComponents" : "ui.noComponentFiles")}</p> : null}
</main>
</div>
</div>
diff --git a/webui/src/dev/gallery/channels-feishu-whatsapp.tsx b/webui/src/dev/gallery/channels-feishu-whatsapp.tsx
index 1c6425b0a..62622d773 100644
--- a/webui/src/dev/gallery/channels-feishu-whatsapp.tsx
+++ b/webui/src/dev/gallery/channels-feishu-whatsapp.tsx
@@ -6,6 +6,7 @@ import { WhatsAppConnectFlowView } from "../../../../nanobot/channels/whatsapp/w
import type { ChannelConnectPayload, NanobotChannelInstanceInfo } from "@/lib/types";
import { channelFeatures } from "./channel-fixtures";
import { StatePicker, type ComponentExample } from "./example";
+import { useGalleryTranslation } from "./i18n";
const connectStates = ["idle", "starting", "pending", "succeeded", "expired", "failed", "cancelled", "error"] as const;
type ConnectState = typeof connectStates[number];
@@ -20,18 +21,19 @@ function connectSnapshot(state: ConnectState): ChannelConnectPayload | null {
}
function ConnectPreview({ channel }: { channel: "feishu" | "whatsapp" }) {
+ const { t } = useGalleryTranslation();
const [state, setState] = useState<ConnectState>("pending");
const connect = connectSnapshot(state);
const props = {
connect,
busy: state === "starting",
- error: state === "error" ? "Authorization is temporarily unavailable. Try again." : null,
+ error: state === "error" ? t("previews.channelConnect.error") : null,
onStart: () => setState("pending"),
onCancel: () => setState("cancelled"),
onPoll: async () => connect,
};
return <>
- <StatePicker label={`${channel === "feishu" ? "Feishu" : "WhatsApp"} 连接状态`} value={state} options={connectStates} onChange={setState} />
+ <StatePicker label={t("previews.channelConnect.state", { channel: channel === "feishu" ? "Feishu" : "WhatsApp" })} value={state} options={connectStates} onChange={setState} />
{channel === "feishu"
? <FeishuConnectFlowView {...props} autoStart={state === "starting"} />
: <WhatsAppConnectFlowView {...props} />}
@@ -87,21 +89,22 @@ function AssistantAuthorizationPreview({ idleLabel }: FeishuConnectOptions) {
}
function FeishuAssistantsPreview() {
+ const { t } = useGalleryTranslation();
const [state, setState] = useState<AssistantState>("mixed");
const [instances, setInstances] = useState(() => assistantSnapshots("mixed"));
- const [action, setAction] = useState("");
+ const [action, setAction] = useState<{ kind: "on" | "off"; name: string } | { kind: "saved"; name: string; amount: number } | null>(null);
const feature = {
...channelFeatures.feishu,
enabled: instances.some((instance) => instance.enabled),
configured: instances.some((instance) => instance.configured),
instances,
- runtime_error: state === "failed" ? "The assistant stopped. Check its credentials before restarting." : undefined,
+ runtime_error: state === "failed" ? t("previews.feishuAssistants.error") : undefined,
};
return <>
- <StatePicker label="助手运行状态" value={state} options={assistantStates} onChange={(next) => {
+ <StatePicker label={t("previews.feishuAssistants.state")} value={state} options={assistantStates} onChange={(next) => {
setState(next);
setInstances(assistantSnapshots(next));
- setAction("");
+ setAction(null);
}} />
<FeishuAssistantsPanelView
key={state}
@@ -111,43 +114,43 @@ function FeishuAssistantsPreview() {
setInstances((current) => current.map((item) => item.id === instance.id ? {
...item, enabled, runtime_status: enabled ? "running" : "stopped",
} : item));
- setAction(`${instance.display_name}: ${enabled ? "On" : "Off"}`);
+ setAction({ kind: enabled ? "on" : "off", name: instance.display_name?.trim() || instance.name.trim() || instance.id });
}}
onSaveInstance={(instance, values) => {
setInstances((current) => current.map((item) => item.id === instance.id ? {
...item, config_values: { ...item.config_values, ...values },
configured_fields: [...new Set([...item.configured_fields, ...Object.keys(values)])],
} : item));
- setAction(`${instance.display_name}: saved ${Object.keys(values).length} preview fields`);
+ setAction({ kind: "saved", name: instance.display_name?.trim() || instance.name.trim() || instance.id, amount: Object.keys(values).length });
}}
renderConnectFlow={(options) => <AssistantAuthorizationPreview {...options} />}
/>
- {action ? <p role="status" className="mt-4 text-xs text-muted-foreground">{action}</p> : null}
+ {action ? <p role="status" className="mt-4 text-xs text-muted-foreground">{t(`previews.feishuAssistants.${action.kind}`, { name: action.name, amount: action.kind === "saved" ? action.amount : undefined })}</p> : null}
</>;
}
export const feishuWhatsAppChannelExamples: ComponentExample[] = [
{
- title: "FeishuConnectFlowView · 飞书扫码授权",
+ title: "previews.feishuConnect.title",
files: ["nanobot/channels/feishu/webui/FeishuConnectFlowView.tsx", "webui/src/components/settings/channels/ChannelQrConnectFlowView.tsx"],
- description: "查看飞书真实扫码界面,切换等待、授权成功、到期、取消与错误,体验取消和重新扫码。",
- options: "connect、busy 和 error 是已有显示状态;视图本地生成二维码。开始、取消与轮询由功能入口提供,预览回调只改变当前示例。",
+ description: "previews.feishuConnect.description",
+ options: "previews.feishuConnect.options",
code: "<FeishuConnectFlowView connect={connect} busy={busy} error={error} onStart={start} onCancel={cancel} onPoll={poll} />",
Preview: FeishuConnectionPreview,
},
{
- title: "FeishuAssistantsPanelView · 飞书助手管理",
+ title: "previews.feishuAssistants.title",
files: ["nanobot/channels/feishu/webui/FeishuAssistantsPanelView.tsx", "webui/src/components/settings/channels/ChannelInstancesPanelView.tsx"],
- description: "展示多个真实助手卡片、运行与授权状态,试用开关、高级设置、保存和添加另一个助手。",
- options: "feature 和 instances 提供助手快照;视图管理字段草稿与保存反馈。onToggleInstance、onSaveInstance 与 renderConnectFlow 由所属功能接入运行时操作。",
+ description: "previews.feishuAssistants.description",
+ options: "previews.feishuAssistants.options",
code: "<FeishuAssistantsPanelView feature={feature} showBrandLogos={false} onToggleInstance={toggle} onSaveInstance={save} renderConnectFlow={renderAuthorization} />",
Preview: FeishuAssistantsPreview,
},
{
- title: "WhatsAppConnectFlowView · WhatsApp 设备关联",
+ title: "previews.whatsappConnect.title",
files: ["nanobot/channels/whatsapp/webui/WhatsAppConnectFlowView.tsx"],
- description: "使用正式 WhatsApp 极简二维码布局,比较自动连接、关联成功、到期和错误提示,并试用关联另一个账号。",
- options: "此视图沿用自动开始和极简布局的显示规则;调用方控制状态和重试。真实自动开始、强制重试和轮询仍由连接功能入口负责。",
+ description: "previews.whatsappConnect.description",
+ options: "previews.whatsappConnect.options",
code: "<WhatsAppConnectFlowView connect={connect} busy={busy} error={error} onStart={start} onCancel={cancel} onPoll={poll} />",
Preview: WhatsAppConnectionPreview,
},
diff --git a/webui/src/dev/gallery/channels-linear.tsx b/webui/src/dev/gallery/channels-linear.tsx
index d73d98252..84648aa39 100644
--- a/webui/src/dev/gallery/channels-linear.tsx
+++ b/webui/src/dev/gallery/channels-linear.tsx
@@ -12,6 +12,7 @@ import { LinearResetConnectionView } from "../../../../nanobot/channels/linear/w
import type { LinearInstallationSummary } from "../../../../nanobot/channels/linear/webui/types";
import { channelFeatures } from "./channel-fixtures";
import { StatePicker, type ComponentExample } from "./example";
+import { useGalleryTranslation } from "./i18n";
const workspace: LinearInstallationSummary = {
organization_id: "gallery-workspace", organization_name: "Nanobot team",
@@ -32,15 +33,18 @@ function memberSnapshot(story: MemberStory): LinearMemberAccessSnapshot {
legacy_allow_all: story === "allow-all", members: story === "empty" ? [] : members,
},
loading: story === "loading" || story === "refreshing",
- error: story === "error" ? "Member directory is unavailable." : null,
+ error: story === "error" ? "previews.linearMembers.loadError" : null,
saves: story === "saving" ? { "gallery-alex": { status: "saving" } }
- : story === "save-error" ? { "gallery-alex": { status: "error", message: "Access was not confirmed." } } : {},
+ : story === "save-error" ? { "gallery-alex": { status: "error", message: "previews.linearMembers.saveError" } } : {},
};
}
function MemberList({ story = "members", disabled = false }: { story?: MemberStory; disabled?: boolean }) {
+ const { t } = useGalleryTranslation();
const [snapshot, setSnapshot] = useState(() => memberSnapshot(story));
- return <LinearMemberAccessView snapshot={snapshot} disabled={disabled}
+ return <LinearMemberAccessView snapshot={{ ...snapshot, error: snapshot.error ? t(snapshot.error) : null,
+ saves: Object.fromEntries(Object.entries(snapshot.saves).map(([id, save]) => [id, save.status === "error" ? { ...save, message: t(save.message) } : save])),
+ }} disabled={disabled}
onLoad={(force) => { if (force) setSnapshot(memberSnapshot("members")); }}
onSetAllowed={(id, allowed) => setSnapshot(current => ({ ...current,
payload: current.payload ? { ...current.payload,
@@ -51,8 +55,9 @@ function MemberList({ story = "members", disabled = false }: { story?: MemberSto
}
function MembersPreview() {
+ const { t } = useGalleryTranslation();
const [story, setStory] = useState<MemberStory>("members");
- return <><StatePicker label="成员状态" value={story}
+ return <><StatePicker label={t("previews.linearMembers.state")} value={story}
options={["members", "loading", "refreshing", "empty", "error", "saving", "save-error", "allow-all"]}
onChange={setStory} /><div className="overflow-hidden rounded-panel border border-border/70">
<MemberList key={story} story={story} /></div></>;
@@ -68,33 +73,36 @@ function connection(story: ConnectStory): ChannelConnectPayload | null {
function AuthorizationPreview() {
const { t } = useTranslation();
+ const { t: g } = useGalleryTranslation();
const [story, setStory] = useState<ConnectStory>("idle");
const connect = connection(story);
- return <><StatePicker label="授权阶段" value={story}
+ return <><StatePicker label={g("previews.linearConnect.state")} value={story}
options={["idle", "starting", "pending", "succeeded", "cancelled", "failed"]} onChange={setStory} />
- <LinearConnectFlowView connect={connect} busy={story === "starting"} error={story === "failed" ? "Authorization could not be completed." : null}
+ <LinearConnectFlowView connect={connect} busy={story === "starting"} error={story === "failed" ? g("previews.linearConnect.error") : null}
labels={linearConnectLabels(channelTranslator(t, "linear"))}
onStart={() => setStory("pending")} onCancel={() => setStory("cancelled")}
onPoll={async () => connect} />
- <p className="mt-4 text-xs text-muted-foreground">授权链接与工作区为示例数据;开始、取消只更新预览阶段。</p></>;
+ <p className="mt-4 text-xs text-muted-foreground">{g("previews.linearConnect.hint")}</p></>;
}
type ResetStory = "success" | "partial-error";
function ResetAction({ story = "success", disabled = false, onComplete }: {
story?: ResetStory; disabled?: boolean; onComplete?: () => void;
}) {
- const [feedback, setFeedback] = useState("");
+ const { t } = useGalleryTranslation();
+ const [completed, setCompleted] = useState(false);
return <><LinearResetConnectionView disabled={disabled} onReset={async () => {
await new Promise(resolve => window.setTimeout(resolve, 700));
- if (story === "partial-error") throw new Error("The channel could not be stopped. App settings were kept.");
- setFeedback("预览工作区及应用设置已清除。");
+ if (story === "partial-error") throw new Error(t("previews.linearReset.error"));
+ setCompleted(true);
onComplete?.();
- }} /><p role="status" className="mt-3 text-xs text-muted-foreground">{feedback}</p></>;
+ }} /><p role="status" className="mt-3 text-xs text-muted-foreground">{completed ? t("previews.linearReset.completed") : ""}</p></>;
}
function ResetPreview() {
+ const { t } = useGalleryTranslation();
const [story, setStory] = useState<ResetStory>("success");
- return <><StatePicker label="重置结果" value={story} options={["success", "partial-error"]} onChange={setStory} />
+ return <><StatePicker label={t("previews.linearReset.state")} value={story} options={["success", "partial-error"]} onChange={setStory} />
<ResetAction key={story} story={story} /></>;
}
@@ -104,7 +112,7 @@ function panelFeature(story: PanelStory): NanobotFeatureInfo {
if (story === "setup") return base;
return { ...base, configured: true, enabled: story === "connected" || story === "missing-scopes",
runtime_status: story === "runtime-error" ? "failed" : story === "connected" || story === "missing-scopes" ? "running" : "stopped",
- runtime_error: story === "runtime-error" ? "Linear webhook could not be started." : undefined,
+ runtime_error: story === "runtime-error" ? "previews.linearPanel.runtimeError" : undefined,
configured_fields: ["channels.linear.clientId", "channels.linear.clientSecret", "channels.linear.webhookSigningSecret", "channels.linear.publicBaseUrl"],
config_values: { ...base.config_values, "channels.linear.clientId": "gallery-linear-app", "channels.linear.publicBaseUrl": "https://nanobot.example" },
};
@@ -112,6 +120,7 @@ function panelFeature(story: PanelStory): NanobotFeatureInfo {
function PanelComposition({ story }: { story: PanelStory }) {
const { t, i18n } = useTranslation();
+ const { t: g } = useGalleryTranslation();
const [feature, setFeature] = useState(() => panelFeature(story));
const setup = channelSetup(feature, i18n.resolvedLanguage ?? i18n.language);
const fields = setup.fields ?? [];
@@ -121,41 +130,41 @@ function PanelComposition({ story }: { story: PanelStory }) {
const [visibleSecrets, setVisibleSecrets] = useState<Record<string, boolean>>({});
const [dirty, setDirty] = useState(false);
const [saved, setSaved] = useState(false);
- const [notice, setNotice] = useState<string | null>(story === "save-error" ? "Settings could not be saved. Your draft was kept." : null);
+ const [notice, setNotice] = useState<string | null>(story === "save-error" ? "previews.linearPanel.saveError" : null);
const [workspaceError, setWorkspaceError] = useState<string | null>(null);
const [loading, setLoading] = useState(story === "loading");
- const [inspectionError, setInspectionError] = useState<string | null>(story === "inspection-error" ? "Connected workspaces could not be inspected." : null);
+ const [inspectionError, setInspectionError] = useState<string | null>(story === "inspection-error" ? "previews.linearPanel.inspectionError" : null);
const [installations, setInstallations] = useState<LinearInstallationSummary[]>(story === "connected" || story === "missing-scopes"
? [story === "missing-scopes" ? { ...workspace, authorization_status: "missing_scopes", missing_scopes: ["app:mentionable"] } : workspace] : []);
const [connectStory, setConnectStory] = useState<ConnectStory>("idle");
- const [feedback, setFeedback] = useState("");
+ const [feedback, setFeedback] = useState<{ key: string; name?: string } | null>(null);
const connecting = connectStory === "pending";
const credentialsSaved = fields.filter(field => !field.optional).every(field =>
configuredFields.has(field.key) || Boolean(feature.config_values?.[field.key]?.trim()));
const save = async () => {
- if (story === "save-error") { setNotice("Settings could not be saved. Your draft was kept."); return false; }
+ if (story === "save-error") { setNotice("previews.linearPanel.saveError"); return false; }
setFeature(current => ({ ...current, config_values: { ...current.config_values, ...values } }));
setDirty(false); setSaved(true); setNotice(null); return true;
};
const connect = connection(connectStory);
- return <><LinearPanelView feature={feature} showBrandLogos={false} fields={fields} advancedFields={advancedFields}
+ return <><LinearPanelView feature={{ ...feature, runtime_error: feature.runtime_error ? g(feature.runtime_error) : undefined }} showBrandLogos={false} fields={fields} advancedFields={advancedFields}
formProps={{ values, configuredFields, visibleSecrets, compact: true,
disabled: connecting, onToggleSecret: (key) => setVisibleSecrets(current => ({ ...current, [key]: !current[key] })),
onChange: (key, value) => { setValues(current => ({ ...current, [key]: value })); setDirty(true); setSaved(false); setNotice(null); },
onFieldBlur: () => { void save(); },
}}
- state={{ busy: false, dirty, saving: false, saved, connecting, credentialsSaved, connectionGeneration: 0, notice }}
+ state={{ busy: false, dirty, saving: false, saved, connecting, credentialsSaved, connectionGeneration: 0, notice: notice ? g(notice) : null }}
workspaces={{ installations: loading || inspectionError ? null : installations,
- logos: {}, loading, inspectionError,
+ logos: {}, loading, inspectionError: inspectionError ? g(inspectionError) : null,
disconnectingId: null, notice: null, error: workspaceError }}
onSave={save} onSaveSecret={async (key) => { setConfiguredFields(current => new Set(current).add(key)); setSaved(true); }}
- onRefreshWorkspaces={async () => { setLoading(false); setInspectionError(null); setFeedback("已刷新示例工作区。"); }}
+ onRefreshWorkspaces={async () => { setLoading(false); setInspectionError(null); setFeedback({ key: "previews.linearPanel.refreshed" }); }}
onDisconnectWorkspace={async (item, onRemoved) => {
setInstallations(current => current.filter(entry => entry.organization_id !== item.organization_id));
setFeature(current => ({ ...current, runtime_status: "stopped", enabled: false }));
- onRemoved(); setFeedback(`已移除示例工作区:${item.organization_name}`);
+ onRemoved(); setFeedback({ key: "previews.linearPanel.removed", name: item.organization_name });
}} onClearWorkspaceError={() => setWorkspaceError(null)} onRequestConnection={() => setConnectStory("pending")}
- onConfigureMcp={() => setFeedback("已选择 Linear MCP 配置入口。")}
+ onConfigureMcp={() => setFeedback({ key: "previews.linearPanel.mcp" })}
renderMemberAccess={(organizationId, disabled) => <MemberList key={organizationId} disabled={disabled} />}
renderResetConnection={({ disabled, onComplete }) => <ResetAction disabled={disabled} onComplete={() => {
setInstallations([]); setConfiguredFields(new Set()); setFeature(panelFeature("setup"));
@@ -166,31 +175,32 @@ function PanelComposition({ story }: { story: PanelStory }) {
suppressSucceeded={feature.runtime_status === "running" || feature.runtime_status === "failed"}
renderActions={renderActions} onStart={() => setConnectStory("pending")} onCancel={() => setConnectStory("cancelled")}
onPoll={async () => connect} />} />
- <p role="status" className="mt-4 text-xs text-muted-foreground">{feedback}</p></>;
+ <p role="status" className="mt-4 text-xs text-muted-foreground">{feedback ? g(feedback.key, { name: feedback.name }) : ""}</p></>;
}
function PanelPreview() {
+ const { t } = useGalleryTranslation();
const [story, setStory] = useState<PanelStory>("connected");
- return <><StatePicker label="Linear 配置状态" value={story}
+ return <><StatePicker label={t("previews.linearPanel.state")} value={story}
options={["setup", "configured", "connected", "missing-scopes", "loading", "inspection-error", "save-error", "runtime-error"]}
onChange={setStory} /><PanelComposition key={story} story={story} /></>;
}
export const linearChannelExamples: ComponentExample[] = [
- { title: "LinearPanelView · Linear 配置", files: ["nanobot/channels/linear/webui/LinearPanelView.tsx"], Preview: PanelPreview,
- description: "真实 Linear 配置面板:应用信息、密钥、高级设置、工作区菜单、成员权限及浏览器授权。",
- options: "state 与 workspaces 提供快照;工作区、保存与 MCP 操作由回调接入。三个插槽组合生产所用的成员、授权和重置视图。",
+ { title: "previews.linearPanel.title", files: ["nanobot/channels/linear/webui/LinearPanelView.tsx"], Preview: PanelPreview,
+ description: "previews.linearPanel.description",
+ options: "previews.linearPanel.options",
code: "<LinearPanelView feature={feature} state={state} workspaces={workspaces} formProps={formProps} {...actions} {...composition} />" },
- { title: "LinearMemberAccessView · 成员访问", files: ["nanobot/channels/linear/webui/LinearMemberAccessView.tsx"], Preview: MembersPreview,
- description: "展开成员目录、搜索同名成员、修改权限;比较加载、刷新、空列表、保存和确认失败状态。",
- options: "snapshot 是已确认的成员状态。onLoad 与 onSetAllowed 交给频道入口;权限校验仍由网关负责。",
+ { title: "previews.linearMembers.title", files: ["nanobot/channels/linear/webui/LinearMemberAccessView.tsx"], Preview: MembersPreview,
+ description: "previews.linearMembers.description",
+ options: "previews.linearMembers.options",
code: "<LinearMemberAccessView snapshot={snapshot} onLoad={refresh} onSetAllowed={saveAccess} />" },
- { title: "LinearConnectFlowView · Linear 授权", files: ["nanobot/channels/linear/webui/LinearConnectFlowView.tsx"], Preview: AuthorizationPreview,
- description: "真实浏览器授权入口与等待提示,支持开始、取消、成功与失败阶段。",
- options: "复用 ChannelQrConnectFlowView,Linear 提供浏览器授权展示、标签与焦点处理。会话创建及轮询留在运行时入口。",
+ { title: "previews.linearConnect.title", files: ["nanobot/channels/linear/webui/LinearConnectFlowView.tsx"], Preview: AuthorizationPreview,
+ description: "previews.linearConnect.description",
+ options: "previews.linearConnect.options",
code: "<LinearConnectFlowView connect={authorization} labels={labels} busy={busy} error={error} onStart={start} onCancel={cancel} onPoll={poll} />" },
- { title: "LinearResetConnectionView · 重置连接", files: ["nanobot/channels/linear/webui/LinearResetConnectionView.tsx"], Preview: ResetPreview,
- description: "打开重置确认,查看清除与保留范围、忙碌状态和部分完成后的重试提示。",
- options: "onReset 负责运行完整撤销与清理事务;视图管理确认、错误、关闭限制与焦点恢复。",
+ { title: "previews.linearReset.title", files: ["nanobot/channels/linear/webui/LinearResetConnectionView.tsx"], Preview: ResetPreview,
+ description: "previews.linearReset.description",
+ options: "previews.linearReset.options",
code: "<LinearResetConnectionView disabled={false} onReset={resetConnection} />" },
];
diff --git a/webui/src/dev/gallery/channels-weixin.tsx b/webui/src/dev/gallery/channels-weixin.tsx
index f4f7ac8c9..4b0927559 100644
--- a/webui/src/dev/gallery/channels-weixin.tsx
+++ b/webui/src/dev/gallery/channels-weixin.tsx
@@ -15,6 +15,7 @@ import {
import { channelFeatures } from "./channel-fixtures";
import { StatePicker, type ComponentExample } from "./example";
+import { useGalleryTranslation } from "./i18n";
const scan: ChannelConnectPayload = {
session_id: "gallery-weixin",
@@ -26,6 +27,7 @@ type ConnectState = "starting" | "scan" | "verify" | "verify-error" | "connected
| "expired" | "failed" | "cancelled" | "error";
function WeixinConnectPreview() {
+ const { t } = useGalleryTranslation();
const [mode, setMode] = useState<ConnectState>("scan");
const [notice, setNotice] = useState("");
const connect: ChannelConnectPayload | WeixinVerificationPayload | null = mode === "starting" ? null
@@ -35,12 +37,12 @@ function WeixinConnectPreview() {
} : { ...scan, status: mode === "connected" ? "succeeded" : mode };
return <>
- <StatePicker label="微信连接状态" value={mode}
+ <StatePicker label={t("previews.weixinConnect.state")} value={mode}
options={["starting", "scan", "verify", "verify-error", "connected", "expired", "failed", "cancelled", "error"]}
onChange={setMode} />
<WeixinConnectFlowView connect={connect} busy={mode === "starting"} autoStart minimalPending
- error={mode === "error" ? "Connection interrupted. Try again." : null}
- onStart={() => { setMode("scan"); setNotice("已显示新的预览二维码。"); }}
+ error={mode === "error" ? t("previews.weixinConnect.error") : null}
+ onStart={() => { setMode("scan"); setNotice("previews.weixinConnect.refreshed"); }}
onCancel={() => setMode("cancelled")}
onPoll={async (params) => {
if (params?.verify_code === "123456") {
@@ -50,7 +52,7 @@ function WeixinConnectPreview() {
setMode("verify-error");
return { ...scan, challenge: "verify_code", verification_failed: true };
}} />
- <p role="status" className="mt-4 text-xs text-muted-foreground">{notice || "验证码预览输入 123456 可完成连接;其他输入会保留草稿并显示错误。"}</p>
+ <p role="status" className="mt-4 text-xs text-muted-foreground">{t(notice || "previews.weixinConnect.hint")}</p>
</>;
}
@@ -58,6 +60,7 @@ type PanelState = "unconfigured" | "running" | "auth-expired" | "saving" | "save
function WeixinPanelPreview() {
const { t, i18n } = useTranslation();
+ const { t: g } = useGalleryTranslation();
const channelTx = channelTranslator(t, "weixin");
const [mode, setMode] = useState<PanelState>("running");
const [edited, setEdited] = useState(false);
@@ -80,14 +83,14 @@ function WeixinPanelPreview() {
const runtimeError = mode === "auth-expired" ? channelTx("custom.expired", WEIXIN_AUTH_EXPIRED_MESSAGE) : undefined;
return <>
- <StatePicker label="微信面板状态" value={mode}
+ <StatePicker label={g("previews.weixinPanel.state")} value={mode}
options={["unconfigured", "running", "auth-expired", "saving", "saved", "save-error"]}
onChange={(next) => { setMode(next); setEdited(false); }} />
<WeixinPanelView feature={feature} actionKey={null} showBrandLogos={false}
primaryFields={primaryFields} advancedFields={advancedFields} fieldValues={values}
configuredFields={new Set()} secretVisibilityKey="gallery-weixin" runtimeError={runtimeError}
saving={mode === "saving" && !edited} saveState={mode === "saved" || edited ? "saved" : "idle"}
- saveError={mode === "save-error" && !edited ? "Unable to save settings. Your draft is preserved." : null}
+ saveError={mode === "save-error" && !edited ? g("previews.linearPanel.saveError") : null}
connectFlow={mode === "unconfigured" || mode === "auth-expired" ? <WeixinConnectFlowView
connect={connect} busy={false} error={null} autoStart minimalPending
suppressSucceeded={mode === "auth-expired"}
@@ -99,12 +102,12 @@ function WeixinPanelPreview() {
}
export const weixinChannelExamples: ComponentExample[] = [
- { title: "WeixinPanelView · 微信设置", files: ["nanobot/channels/weixin/webui/WeixinPanelView.tsx"],
- Preview: WeixinPanelPreview, description: "查看微信设置、高级参数、保存反馈和登录过期恢复。",
- options: "字段来自频道的真实设置契约。视图管理展开和密钥可见状态;运行时入口负责自动保存、草稿合并和登录恢复。",
+ { title: "previews.weixinPanel.title", files: ["nanobot/channels/weixin/webui/WeixinPanelView.tsx"],
+ Preview: WeixinPanelPreview, description: "previews.weixinPanel.description",
+ options: "previews.weixinPanel.options",
code: '<WeixinPanelView feature={feature} primaryFields={primary} advancedFields={advanced} fieldValues={values} saving={saving} saveState={saveState} saveError={error} connectFlow={connectFlow} onFieldChange={change} />' },
- { title: "WeixinConnectFlowView · 微信扫码与验证", files: ["nanobot/channels/weixin/webui/WeixinConnectFlowView.tsx"],
- Preview: WeixinConnectPreview, description: "比较扫码、验证码、成功、过期、取消和连接错误。",
- options: "视图接收连接快照与操作回调,并保留验证码草稿。二维码生成在浏览器中进行;授权启动、轮询暂停、刷新和取消由真实入口负责。",
+ { title: "previews.weixinConnect.title", files: ["nanobot/channels/weixin/webui/WeixinConnectFlowView.tsx"],
+ Preview: WeixinConnectPreview, description: "previews.weixinConnect.description",
+ options: "previews.weixinConnect.options",
code: '<WeixinConnectFlowView connect={connect} busy={busy} error={error} autoStart minimalPending onStart={start} onCancel={cancel} onPoll={verify} />' },
];
diff --git a/webui/src/dev/gallery/channels.tsx b/webui/src/dev/gallery/channels.tsx
index 9596668c0..751f4043c 100644
--- a/webui/src/dev/gallery/channels.tsx
+++ b/webui/src/dev/gallery/channels.tsx
@@ -10,11 +10,13 @@ import type { ChannelValidationPayload } from "@/lib/types";
import { copyTextToClipboard } from "@/lib/clipboard";
import { channelFeatures } from "./channel-fixtures";
import { StatePicker, type ComponentExample } from "./example";
+import { useGalleryTranslation } from "./i18n";
function ChannelEntryPreview({ name }: { name: string }) {
const { t, i18n } = useTranslation();
+ const { t: g } = useGalleryTranslation();
const [mode, setMode] = useState<"setup" | "configured" | "enabled" | "checking" | "error">("setup");
- return <><StatePicker label="频道配置状态" value={mode}
+ return <><StatePicker label={g("previews.channel.state")} value={mode}
options={["setup", "configured", "enabled", "checking", "error"]} onChange={setMode} />
<ChannelFormPreview key={mode} name={name} mode={mode} locale={i18n.resolvedLanguage ?? i18n.language} t={t} />
</>;
@@ -26,13 +28,14 @@ function ChannelFormPreview({ name, mode, locale, t }: {
locale: string;
t: ReturnType<typeof useTranslation>["t"];
}) {
+ const { t: g } = useGalleryTranslation();
const snapshot = channelFeatures[name];
const configured = mode !== "setup";
const [enabled, setEnabled] = useState(mode === "enabled");
const feature = { ...snapshot, configured, enabled, ready: configured, status: enabled ? "enabled" : "not_enabled",
configured_fields: configured ? snapshot.setup!.fields.filter((field) => field.kind === "secret").map((field) => field.key) : [],
runtime_status: enabled ? "running" : "stopped",
- runtime_error: mode === "error" ? "Example credentials were rejected. Update the preview values and retry." : undefined };
+ runtime_error: mode === "error" ? g("previews.channel.credentialsError") : undefined };
const setup = channelSetup(feature, locale);
const fields = setup.fields ?? [];
const requirementKeys = new Set((setup.requirements ?? []).flatMap((item) => item.alternatives.flat()));
@@ -54,27 +57,27 @@ function ChannelFormPreview({ name, mode, locale, t }: {
const [clearedSecrets, setClearedSecrets] = useState<Set<string>>(() => new Set());
const [errors, setErrors] = useState<Record<string, string>>({});
const [advancedOpen, setAdvancedOpen] = useState(false);
- const [notice, setNotice] = useState<string | null>(null);
+ const [notice, setNotice] = useState<{ key: string } | { message: string } | null>(null);
const [saved, setSaved] = useState(false);
const [checked, setChecked] = useState(false);
const advancedPanelId = useId();
const validate = () => {
const next = channelRequirementErrors(fields, setup.requirements ?? [], values, configuredFields, clearedSecrets,
- t("settings.channels.fieldRequired", { defaultValue: "Required to complete setup." }));
+ "settings.channels.fieldRequired");
setErrors(next);
if (Object.keys(next).length) {
if (advancedFields.some((field) => next[field.key])) setAdvancedOpen(true);
focusFirstChannelFieldError(next);
- setNotice(t("settings.channels.validationFailed", { defaultValue: "Check the required setup before enabling." }));
+ setNotice({ key: "settings.channels.validationFailed" });
return false;
}
setSaved(true);
- setNotice("预览配置已保存");
+ setNotice({ key: "settings.channels.savedSettings" });
return true;
};
const validation: ChannelValidationPayload | null = checked ? {
name, status: "connected", can_enable: true, requires_restart: false, missing_fields: [],
- checks: [{ id: "preview", label: "Preview configuration", status: "pass" }],
+ checks: [{ id: "preview", label: g("previews.channel.validation"), status: "pass" }],
} : null;
return <aside className={CHANNEL_SETUP_PANEL_CLASS_NAME}>
<ChannelSetupSurfaceView feature={feature} setup={setup}
@@ -82,9 +85,11 @@ function ChannelFormPreview({ name, mode, locale, t }: {
<h3 className="sr-only">{localizedChannelDisplayName(feature, t)}</h3></div>}
primaryFields={primaryFields} advancedFields={advancedFields} savedSecretFields={savedSecretFields}
availablePresets={configured ? [] : setup.presets ?? []} configuredFields={configuredFields}
- fieldValues={values} visibleSecrets={visibleSecrets} clearedSecrets={clearedSecrets} fieldErrors={errors}
+ fieldValues={values} visibleSecrets={visibleSecrets} clearedSecrets={clearedSecrets}
+ fieldErrors={Object.fromEntries(Object.entries(errors).map(([key, message]) => [key, t(message)]))}
actionPending={mode === "checking"} enabled={enabled} autoSaving={false} autoSaveState={saved ? "saved" : "idle"}
- advancedOpen={advancedOpen} advancedPanelId={advancedPanelId} validation={validation} validating={mode === "checking"} notice={notice}
+ advancedOpen={advancedOpen} advancedPanelId={advancedPanelId} validation={validation} validating={mode === "checking"}
+ notice={notice ? "key" in notice ? t(notice.key) : notice.message : null}
onAdvancedOpenChange={setAdvancedOpen}
onChangeField={(key, value) => { setValues((current) => ({ ...current, [key]: value })); setErrors({}); setSaved(false); }}
onFieldBlur={() => { setSaved(true); }}
@@ -97,8 +102,8 @@ function ChannelFormPreview({ name, mode, locale, t }: {
onCheckConnection={() => { if (validate()) setChecked(true); }}
onToggleEnabled={(next) => { if (!next || validate()) setEnabled(next); }}
onSaveConnectionSettings={() => setSaved(true)}
- onCopyCommand={() => { if (setup.command) void copyTextToClipboard(setup.command).then((ok) => setNotice(ok ? "已复制命令" : "未能复制命令")); }}
- onNotice={setNotice} />
+ onCopyCommand={() => { if (setup.command) void copyTextToClipboard(setup.command).then((ok) => setNotice({ key: ok ? "settings.channels.commandCopied" : "settings.channels.commandCopyFailed" })); }}
+ onNotice={(message) => setNotice(message ? { message } : null)} />
</aside>;
}
@@ -106,10 +111,11 @@ const genericRegistrations = registeredChannelUiContributions()
.filter(({ contribution }) => !contribution.Panel && !contribution.ConnectFlow);
export const channelExamples: ComponentExample[] = genericRegistrations.map(({ channel, webui, contribution }, index) => ({
- title: `${contribution.presentation.displayName} · 频道配置`,
+ title: "previews.channel.title",
+ titleValues: { channel: contribution.presentation.displayName },
files: [`nanobot/channels/${channel}/${webui}`, ...(index === 0 ? ["webui/src/components/settings/channels/ChannelSetupSurfaceView.tsx"] : [])],
- description: "查看真实频道配置表单与状态。",
- options: "使用频道注册定义、Python 设置契约快照和生产 ChannelSetupSurfaceView。输入、凭据显示、预设、检查与开关只更新当前预览。",
+ description: "previews.channel.description",
+ options: "previews.channel.options",
code: `<ChannelSetupSurfaceView feature={channelFeatures.${channel}} setup={setup} {...displayState} {...actions} />`,
Preview: () => <ChannelEntryPreview name={channel} />,
}));
diff --git a/webui/src/dev/gallery/content.tsx b/webui/src/dev/gallery/content.tsx
index 2ea18002b..e402daa06 100644
--- a/webui/src/dev/gallery/content.tsx
+++ b/webui/src/dev/gallery/content.tsx
@@ -6,8 +6,10 @@ import { SessionInfoPopoverView } from "@/components/thread/SessionInfoPopoverVi
import { SubagentThreadView } from "@/components/thread/SubagentThreadView";
import type { AutomationUpdatePayload, SessionAutomationJob, UIMessage } from "@/lib/types";
import { StatePicker, type ComponentExample } from "./example";
+import { useGalleryTranslation } from "./i18n";
function FilePreview() {
+ const { t } = useGalleryTranslation();
const [mode, setMode] = useState<"markdown" | "text" | "image" | "truncated" | "loading" | "error" | "route_missing">("markdown");
const [imageOpen, setImageOpen] = useState(false);
const path = mode === "image" ? "nanobot.png" : mode === "markdown" || mode === "truncated" ? "REPORT.md" : "greeting.ts";
@@ -20,7 +22,7 @@ function FilePreview() {
? '# Skills 迁移报告\n\n已完成迁移,**原文件保持不变**。\n\n## 验证结果\n\n| 项目 | 结果 |\n| --- | --- |\n| 文件数量 | 1,199 个 |\n| 校验 | SHA-256 一致 |\n\n- [x] 保留原目录\n- [x] 检查引用\n\n## 下一步\n\n打开技能目录,确认所需服务已连接。\n\n```sh\nls skills/\n```\n\n![示意图](https://example.com/chart.png)\n'
: 'export const greeting = "Hello, Nanobot";\n\nexport function greet(name: string) {\n return `${greeting}, ${name}`;\n}\n' } };
return <div className="space-y-4">
- <StatePicker label="文件预览状态" value={mode} options={["markdown", "text", "image", "truncated", "loading", "error", "route_missing"]}
+ <StatePicker label={t("previews.filePreview.state")} value={mode} options={["markdown", "text", "image", "truncated", "loading", "error", "route_missing"]}
onChange={(next) => { setMode(next); setImageOpen(false); }} />
<div className="flex h-[32rem] flex-col overflow-hidden rounded-control border">
<FilePreviewPanelView key={path} path={path} state={state} imageOpen={imageOpen} onImageOpenChange={setImageOpen}
@@ -32,19 +34,20 @@ function FilePreview() {
const localDocument = '<!doctype html><html lang="zh-CN"><meta charset="utf-8"><style>body{font-family:system-ui;padding:32px;color:#252525}h1{font-size:24px}p{line-height:1.7}code{background:#f2f2f2;padding:4px 8px;border-radius:6px}</style><h1>网页预览</h1><p>这段内容来自当前示例的本地文档。</p><p>点击顶部 <code>刷新</code> 按钮,重新显示文档;打开信息按钮查看隔离说明。</p></html>';
function WebsitePreview() {
+ const { t } = useGalleryTranslation();
const [mode, setMode] = useState<"available" | "native" | "unsupported" | "sameOrigin" | "mixedContent" | "invalid">("available");
const [revision, setRevision] = useState(0);
const url = mode === "invalid" ? null : new URL(mode === "sameOrigin" ? window.location.href : "https://example.com/preview");
return <div className="space-y-4">
- <StatePicker label="网页预览状态" value={mode} options={["available", "native", "unsupported", "sameOrigin", "mixedContent", "invalid"]} onChange={setMode} />
+ <StatePicker label={t("previews.webPreview.state")} value={mode} options={["available", "native", "unsupported", "sameOrigin", "mixedContent", "invalid"]} onChange={setMode} />
<div className="flex h-80 flex-col overflow-hidden rounded-control border">
<WebPreviewPanelView url={url} restriction={mode === "available" ? null : mode} loopback={mode === "sameOrigin"}
onRefresh={() => setRevision((value) => value + 1)}>
- <iframe key={revision} title="本地示例网页" sandbox="" referrerPolicy="no-referrer" srcDoc={localDocument}
+ <iframe key={revision} title={t("previews.webPreview.frame")} sandbox="" referrerPolicy="no-referrer" srcDoc={localDocument}
className="min-h-0 w-full flex-1 border-0 bg-white" />
</WebPreviewPanelView>
</div>
- <p role="status" className="text-xs text-muted-foreground">刷新次数:{revision}</p>
+ <p role="status" className="text-xs text-muted-foreground">{t("previews.webPreview.refreshes", { amount: revision })}</p>
</div>;
}
@@ -54,45 +57,50 @@ function exampleJobs(now: number): SessionAutomationJob[] {
payload: { message: "整理当前项目的进展、风险和下一步。" }, state: { next_run_at_ms: now + 3_600_000 },
origin: { channel: "websocket", chat_id: "gallery", session_key: "websocket:gallery" } },
{ id: "gallery-reminder", name: "代码检查", enabled: false, schedule: { kind: "cron", expr: "0 9 * * 1", tz: "Asia/Shanghai" },
- payload: { message: "检查本周变更并整理待办。" }, state: { last_status: "error", last_error: "Example provider unavailable" } },
+ payload: { message: "检查本周变更并整理待办。" }, state: { last_status: "error", last_error: "previews.session.providerError" } },
{ id: "gallery-local-trigger", name: "发布检查", enabled: true, kind: "local_trigger", schedule: { kind: "local" },
payload: { kind: "local_trigger", message: "检查发布结果。", command: 'nanobot trigger gallery-local-trigger "检查发布结果"' }, state: {} },
];
}
function SessionPreview() {
+ const { t } = useGalleryTranslation();
const [now] = useState(Date.now);
const [mode, setMode] = useState<"ready" | "loading" | "error" | "empty" | "action_error">("ready");
const [jobs, setJobs] = useState(() => exampleJobs(now));
- const [action, setAction] = useState("");
+ const [action, setAction] = useState<{ key: string; name?: string } | null>(null);
+ const displayJobs = (items: SessionAutomationJob[]) => items.map((job) => ({ ...job,
+ state: { ...job.state, last_error: job.state.last_error ? t(job.state.last_error) : undefined },
+ }));
const saveJob = (job: SessionAutomationJob, values: AutomationUpdatePayload) => {
- if (mode === "action_error") return Promise.reject(new Error("示例保存失败,请重试。"));
+ if (mode === "action_error") return Promise.reject(new Error(t("previews.session.saveError")));
const next = jobs.map((item) => item.id !== job.id ? item : { ...item,
name: values.name ?? item.name, schedule: values.schedule ?? item.schedule,
payload: { ...item.payload, message: values.message ?? item.payload.message },
});
- setJobs(next); setAction("已保存任务"); return Promise.resolve(next);
+ setJobs(next); setAction({ key: "previews.session.saved" }); return Promise.resolve(displayJobs(next));
};
return <div className="space-y-4" onClick={(event) => {
const link = event.target instanceof Element ? event.target.closest('a[href^="#/chat/"]') : null;
- if (link) { event.preventDefault(); setAction("打开示例聊天"); }
+ if (link) { event.preventDefault(); setAction({ key: "previews.session.openedChat" }); }
}}>
- <StatePicker label="会话任务状态" value={mode} options={["ready", "loading", "error", "empty", "action_error"]}
- onChange={(next) => { setMode(next); setJobs(exampleJobs(now)); setAction(""); }} />
- <SessionInfoPopoverView title="组件设计" jobs={mode === "ready" || mode === "action_error" ? jobs : []} loading={mode === "loading"} loadFailed={mode === "error"} now={now}
- onOpenCalendar={() => setAction("打开任务日历")}
+ <StatePicker label={t("previews.session.state")} value={mode} options={["ready", "loading", "error", "empty", "action_error"]}
+ onChange={(next) => { setMode(next); setJobs(exampleJobs(now)); setAction(null); }} />
+ <SessionInfoPopoverView title="组件设计" jobs={mode === "ready" || mode === "action_error" ? displayJobs(jobs) : []} loading={mode === "loading"} loadFailed={mode === "error"} now={now}
+ onOpenCalendar={() => setAction({ key: "previews.session.openedCalendar" })}
onAction={(operation, job) => {
- if (mode === "action_error") return Promise.reject(new Error("示例操作失败,请重试。"));
+ if (mode === "action_error") return Promise.reject(new Error(t("previews.session.actionError")));
const next = operation === "delete" ? jobs.filter((item) => item.id !== job.id) : jobs.map((item) => item.id !== job.id ? item
: operation === "run" ? { ...item, state: { ...item.state, pending: true } }
: { ...item, enabled: operation === "enable" });
- setJobs(next); setAction(`${operation}: ${job.name}`); return Promise.resolve(next);
+ setJobs(next); setAction({ key: `previews.session.${operation}`, name: job.name }); return Promise.resolve(displayJobs(next));
}} onEdit={saveJob} />
- <p role="status" className="text-sm text-muted-foreground">{action || "打开会话详情,试用任务查看、开关、编辑和删除。"}</p>
+ <p role="status" className="text-sm text-muted-foreground">{action ? t(action.key, { name: action.name }) : t("previews.session.hint")}</p>
</div>;
}
function SubagentPreview() {
+ const { t } = useGalleryTranslation();
const [mode, setMode] = useState<"ready" | "running" | "loading" | "error">("ready");
const [startedAt] = useState(Date.now);
const [retries, setRetries] = useState(0);
@@ -103,27 +111,27 @@ function SubagentPreview() {
...(mode === "ready" ? [{ id: "gallery-child-answer", role: "assistant" as const, content: "已核对配置:\n\n- **字段类型** 与默认值一致\n- **目录权限** 由 gateway 执行\n- UI 显示已有配置和保存结果", turnId: "gallery-child-turn", latencyMs: 4_200, createdAt: startedAt + 4_200 }] : []),
];
return <div className="space-y-4">
- <StatePicker label="子任务会话状态" value={mode} options={["ready", "running", "loading", "error"]} onChange={setMode} />
+ <StatePicker label={t("previews.subagent.state")} value={mode} options={["ready", "running", "loading", "error"]} onChange={setMode} />
<div className="max-h-96 overflow-y-auto rounded-control border py-4">
- <SubagentThreadView messages={messages} loading={mode === "loading"} error={mode === "error" ? "示例历史加载失败。" : null} isStreaming={mode === "running"}
+ <SubagentThreadView messages={messages} loading={mode === "loading"} error={mode === "error" ? t("previews.history.error") : null} isStreaming={mode === "running"}
activeTurnId={mode === "running" ? "gallery-child-turn" : null} runStartedAt={startedAt / 1000}
onRetry={() => { setRetries((value) => value + 1); setMode("ready"); }} />
</div>
- <p role="status" className="text-xs text-muted-foreground">重试次数:{retries}</p>
+ <p role="status" className="text-xs text-muted-foreground">{t("previews.history.retries", { amount: retries })}</p>
</div>;
}
export const contentExamples: ComponentExample[] = [
- { title: "FilePreviewPanelView · 文件内容", files: ["webui/src/components/FilePreviewPanelView.tsx"], Preview: FilePreview,
- description: "比较文本、图片、截断、加载和错误显示,点击图片试用缩放。", options: "state 是调用方提供的显示快照;path 决定文件类型和名称;图片打开与失败动作通过回调更新当前预览。",
+ { title: "previews.filePreview.title", files: ["webui/src/components/FilePreviewPanelView.tsx"], Preview: FilePreview,
+ description: "previews.filePreview.description", options: "previews.filePreview.options",
code: '<FilePreviewPanelView path={path} state={previewState} imageOpen={imageOpen} onImageOpenChange={setImageOpen} onImageError={reportImageError} />' },
- { title: "WebPreviewPanelView · 网页内容", files: ["webui/src/components/WebPreviewPanelView.tsx"], Preview: WebsitePreview,
- description: "查看网页标题栏、隔离说明和各类限制提示,试用刷新本地文档。", options: "运行时先决定 restriction,再提供网页内容。展示层通过 children 接收内容,通过 onRefresh 请求刷新;此示例的 iframe 使用本地 srcDoc。",
+ { title: "previews.webPreview.title", files: ["webui/src/components/WebPreviewPanelView.tsx"], Preview: WebsitePreview,
+ description: "previews.webPreview.description", options: "previews.webPreview.options",
code: '<WebPreviewPanelView url={url} restriction={restriction} loopback={loopback} onRefresh={refresh}>{frame}</WebPreviewPanelView>' },
- { title: "SessionInfoPopoverView · 会话任务", files: ["webui/src/components/thread/SessionInfoPopoverView.tsx"], Preview: SessionPreview,
- description: "查看任务列表,编辑、停用和删除任务,并切换加载和错误状态。", options: "jobs、loading、loadFailed 和 now 来自调用方;onAction 与 onEdit 返回更新后的任务快照;界面负责弹窗衔接、焦点恢复和操作反馈。",
+ { title: "previews.session.title", files: ["webui/src/components/thread/SessionInfoPopoverView.tsx"], Preview: SessionPreview,
+ description: "previews.session.description", options: "previews.session.options",
code: '<SessionInfoPopoverView title={title} jobs={jobs} loading={loading} loadFailed={failed} now={now} onAction={act} onEdit={edit} onOpenCalendar={openCalendar} />' },
- { title: "SubagentThreadView · 子任务消息", files: ["webui/src/components/thread/SubagentThreadView.tsx"], Preview: SubagentPreview,
- description: "查看子任务消息、推理活动、加载和失败状态,试用重试回调。", options: "messages 已由运行时投影;loading 和 error 复用历史加载组件;isStreaming 与 activeTurnId 决定当前活动。界面不获取任务历史。",
+ { title: "previews.subagent.title", files: ["webui/src/components/thread/SubagentThreadView.tsx"], Preview: SubagentPreview,
+ description: "previews.subagent.description", options: "previews.subagent.options",
code: '<SubagentThreadView messages={messages} loading={loading} error={error} isStreaming={running} runStartedAt={startedAt} onRetry={retry} />' },
];
diff --git a/webui/src/dev/gallery/conversation.tsx b/webui/src/dev/gallery/conversation.tsx
index 158ca5fce..1b4a08535 100644
--- a/webui/src/dev/gallery/conversation.tsx
+++ b/webui/src/dev/gallery/conversation.tsx
@@ -1,4 +1,5 @@
import { useRef, useState } from "react";
+import { useTranslation } from "react-i18next";
import { FallbackResponseSources } from "@/components/ResponseSourceBadge";
import { AgentActivityCluster } from "@/components/thread/AgentActivityCluster";
@@ -21,6 +22,7 @@ import type { StreamError } from "@/lib/nanobot-client";
import { formatToolCallTrace } from "@/lib/tool-traces";
import type { RecoveryState, SlashCommand, ToolProgressEvent, UIContextCompaction, UIMessage, WorkspaceScopePayload, WorkspacesPayload } from "@/lib/types";
import { Sample, StatePicker, type ComponentExample } from "./example";
+import { useGalleryTranslation } from "./i18n";
const createdAt = Date.UTC(2026, 0, 1, 12);
const presets: ModelPresetOption[] = [
@@ -33,9 +35,9 @@ const rounds: ComposerRoundUsage[] = [
{ id: "gallery-round-3", timestamp: createdAt + 120_000, inputTokens: 18_500, cachedTokens: 12_000, outputTokens: 1_240, generationMs: 7_200 },
];
const commands: SlashCommand[] = [
- { command: "/status", title: "会话状态", description: "查看当前会话状态", icon: "activity", lifecycle: "side_channel", acceptsArgs: false },
- { command: "/compact", title: "压缩上下文", description: "压缩当前会话上下文", icon: "archive", lifecycle: "finalize_active_turn", acceptsArgs: false },
- { command: "/help", title: "命令帮助", description: "查看可用命令", icon: "circle-help", lifecycle: "side_channel", acceptsArgs: false },
+ { command: "/status", title: "previews.composer.statusCommand", description: "previews.composer.statusDescription", icon: "activity", lifecycle: "side_channel", acceptsArgs: false },
+ { command: "/compact", title: "previews.composer.compactCommand", description: "previews.composer.compactDescription", icon: "archive", lifecycle: "finalize_active_turn", acceptsArgs: false },
+ { command: "/help", title: "previews.composer.helpCommand", description: "previews.composer.helpDescription", icon: "circle-help", lifecycle: "side_channel", acceptsArgs: false },
];
const projectScope: WorkspaceScopePayload = { project_path: "D:\\Projects\\nanobot", project_name: "nanobot", access_mode: "restricted" };
const workspaceCatalog: WorkspacesPayload = {
@@ -60,163 +62,181 @@ const longConversation: UIMessage[] = Array.from({ length: 8 }, (_, index) => [
]).flat();
function ComposerPreview() {
+ const { t } = useGalleryTranslation();
const [mode, setMode] = useState<"thread" | "hero" | "streaming" | "disabled">("thread");
const [preset, setPreset] = useState(presets[0].name);
- const [sent, setSent] = useState("");
+ const [sent, setSent] = useState<{ kind: "sent"; content: string; attachments: number } | { kind: "stopped" } | null>(null);
const [quoted, setQuoted] = useState<string | null>(null);
const selected = presets.find((option) => option.name === preset) ?? presets[0];
return <div className="space-y-4">
- <StatePicker label="输入状态" value={mode} options={["thread", "hero", "streaming", "disabled"]} onChange={setMode} />
- <Button variant="outline" size="sm" onClick={() => setQuoted("组件接收状态,并把操作交给调用方。")}>加入引用</Button>
+ <StatePicker label={t("previews.composer.state")} value={mode} options={["thread", "hero", "streaming", "disabled"]} onChange={setMode} />
+ <Button variant="outline" size="sm" onClick={() => setQuoted("组件接收状态,并把操作交给调用方。")}>{t("previews.composer.addQuote")}</Button>
<ThreadComposer disabled={mode === "disabled"} isStreaming={mode === "streaming"} variant={mode === "hero" ? "hero" : "thread"}
- inputAriaLabel="示例消息" placeholder="输入消息,或输入 / 查看命令"
+ inputAriaLabel={t("previews.composer.input")} placeholder={t("previews.composer.placeholder")}
modelLabel={selected.name} modelDetail={selected.model} modelProvider={selected.provider} modelPreset={preset}
- modelPresets={presets} onModelPresetChange={setPreset} slashCommands={commands}
+ modelPresets={presets} onModelPresetChange={setPreset} slashCommands={commands.map((command) => ({ ...command, title: t(command.title), description: t(command.description) }))}
contextUsage={{ contextTokens: 18_500, contextWindowTokens: 200_000 }} recentRoundUsage={rounds}
workspaceScope={projectScope} workspaceControlsHidden quotedContext={quoted} onQuotedContextChange={setQuoted}
- onStop={() => { setMode("thread"); setSent("已停止示例任务"); }}
- onSend={(content, attachments) => { setSent(`${content}${attachments?.length ? ` · ${attachments.length} 个附件` : ""}`); return true; }} />
- <p role="status" className="text-sm text-muted-foreground">{sent ? `提交内容:${sent}` : "试用消息提交、附件选择、模型切换和命令菜单。"}</p>
+ onStop={() => { setMode("thread"); setSent({ kind: "stopped" }); }}
+ onSend={(content, attachments) => { setSent({ kind: "sent", content, attachments: attachments?.length ?? 0 }); return true; }} />
+ <p role="status" className="text-sm text-muted-foreground">{sent?.kind === "stopped" ? t("previews.composer.stopped")
+ : sent ? t("previews.composer.sent", { content: sent.content, attachments: sent.attachments ? t("previews.composer.attachments", { amount: sent.attachments }) : "" })
+ : t("previews.composer.hint")}</p>
</div>;
}
function ModelPresetPreview() {
+ const { t } = useTranslation();
+ const { t: g } = useGalleryTranslation();
const [preset, setPreset] = useState(presets[0].name);
const [mode, setMode] = useState<"ready" | "setup" | "hero">("ready");
const [action, setAction] = useState("");
const selected = presets.find((option) => option.name === preset) ?? presets[0];
return <div className="space-y-4">
- <StatePicker label="模型控件状态" value={mode} options={["ready", "setup", "hero"]} onChange={setMode} />
- <ModelPresetBadge label={mode === "setup" ? "配置模型" : selected.name} modelPreset={preset} modelPresets={presets}
+ <StatePicker label={g("previews.modelPreset.state")} value={mode} options={["ready", "setup", "hero"]} onChange={setMode} />
+ <ModelPresetBadge label={mode === "setup" ? t("thread.composer.configureModel") : selected.name} modelPreset={preset} modelPresets={presets}
provider={selected.provider} modelDetail={selected.model} isHero={mode === "hero"} needsSetup={mode === "setup"}
- onPresetChange={setPreset} onManageModels={() => setAction("打开模型管理")}
- onClick={() => setAction("打开模型设置")} />
- <p role="status" className="text-sm text-muted-foreground">{action || `当前预设:${preset}。打开菜单或用方向键切换。`}</p>
+ onPresetChange={setPreset} onManageModels={() => setAction("previews.modelPreset.manage")}
+ onClick={() => setAction("previews.modelPreset.settings")} />
+ <p role="status" className="text-sm text-muted-foreground">{action ? g(action) : g("previews.modelPreset.hint", { preset })}</p>
</div>;
}
function UsagePreview() {
+ const { t } = useGalleryTranslation();
const [mode, setMode] = useState<"normal" | "caution" | "critical" | "rounds_only" | "sheet">("normal");
const tokens = mode === "critical" ? 192_000 : mode === "caution" ? 162_000 : 18_500;
return <div className="space-y-4">
- <StatePicker label="用量状态" value={mode} options={["normal", "caution", "critical", "rounds_only", "sheet"]} onChange={setMode} />
+ <StatePicker label={t("previews.usage.state")} value={mode} options={["normal", "caution", "critical", "rounds_only", "sheet"]} onChange={setMode} />
<ComposerUsagePopover context={mode === "rounds_only" ? null : { contextTokens: tokens, contextWindowTokens: 200_000 }}
rounds={rounds} showLabel bottomSheet={mode === "sheet"} />
- <p className="text-sm text-muted-foreground">打开用量详情,查看上下文占用、缓存和各轮生成时间。</p>
+ <p className="text-sm text-muted-foreground">{t("previews.usage.hint")}</p>
</div>;
}
function WorkspacePreview() {
+ const { t } = useTranslation();
+ const { t: g } = useGalleryTranslation();
const [scope, setScope] = useState(projectScope);
const [mode, setMode] = useState<"ready" | "disabled">("ready");
return <div className="space-y-4">
- <StatePicker label="工作目录状态" value={mode} options={["ready", "disabled"]} onChange={setMode} />
+ <StatePicker label={g("previews.workspace.state")} value={mode} options={["ready", "disabled"]} onChange={setMode} />
<div className="flex flex-wrap items-center gap-3">
<WorkspaceProjectPicker isHero scope={scope} defaultScope={projectScope} controls={workspaceCatalog.controls}
disabled={mode === "disabled"} onLoadProjects={loadExampleProjects} onChange={setScope} />
<WorkspaceAccessToggle scope={scope} isHero disabled={mode === "disabled"} onChange={setScope} />
</div>
- <p role="status" className="text-sm text-muted-foreground">{scope.project_path} · {scope.access_mode}</p>
+ <p role="status" className="text-sm text-muted-foreground">{scope.project_path} · {t(scope.access_mode === "full" ? "thread.composer.workspace.full" : "thread.composer.workspace.default")}</p>
</div>;
}
function NavigatorPreview() {
+ const { t } = useGalleryTranslation();
const [selected, setSelected] = useState("");
return <div className="space-y-4">
<div className="flex items-center gap-3"><PromptNavigator messages={prompts} onJumpToPrompt={setSelected} />
- <span className="text-sm text-muted-foreground">打开问题导航,搜索并选择问题。</span></div>
- <p role="status" className="text-sm text-muted-foreground">{prompts.find((message) => message.id === selected)?.content ?? "尚未选择问题"}</p>
+ <span className="text-sm text-muted-foreground">{t("previews.navigator.hint")}</span></div>
+ <p role="status" className="text-sm text-muted-foreground">{prompts.find((message) => message.id === selected)?.content ?? t("previews.navigator.empty")}</p>
</div>;
}
function HeaderPreview() {
+ const { t } = useTranslation();
+ const { t: g } = useGalleryTranslation();
const [theme, setTheme] = useState<"light" | "dark">("light");
const [temporary, setTemporary] = useState(false);
- const [action, setAction] = useState("");
+ const [action, setAction] = useState<{ kind: "sidebar" } | { kind: "jump"; id: string } | null>(null);
return <div className="space-y-4">
<div className="rounded-control border [--thread-header-position:relative]">
<ThreadHeader title="组件使用示例" handle={{ id: "handle_11111111111111111111111111111111", name: "gallery" }}
theme={theme} onToggleTheme={() => setTheme((value) => value === "light" ? "dark" : "light")}
- onToggleSidebar={() => setAction("切换侧栏")} temporaryChatEnabled={temporary} onTemporaryChatEnabledChange={setTemporary}
- promptNavigatorAction={<PromptNavigator messages={prompts} onJumpToPrompt={(id) => setAction(`跳转到 ${id}`)} />} />
+ onToggleSidebar={() => setAction({ kind: "sidebar" })} temporaryChatEnabled={temporary} onTemporaryChatEnabledChange={setTemporary}
+ promptNavigatorAction={<PromptNavigator messages={prompts} onJumpToPrompt={(id) => setAction({ kind: "jump", id })} />} />
</div>
- <p role="status" className="text-sm text-muted-foreground">{action || "试用标题栏操作"} · {theme} · {temporary ? "临时会话" : "普通会话"}</p>
+ <p role="status" className="text-sm text-muted-foreground">{action?.kind === "jump" ? g("previews.header.jump", { id: action.id })
+ : g(action ? "previews.header.sidebar" : "previews.header.hint")} · {t(`settings.values.${theme}`)} · {g(temporary ? "previews.header.temporary" : "previews.header.regular")}</p>
</div>;
}
function MessagesPreview() {
+ const { t } = useGalleryTranslation();
const [quoted, setQuoted] = useState("");
const [fork, setFork] = useState<number | null>(null);
return <div className="space-y-4">
<div className="max-h-[30rem] overflow-y-auto rounded-control border px-4 py-5">
<ThreadMessages messages={prompts} onQuoteSelection={setQuoted} onForkFromMessage={setFork} />
</div>
- <p role="status" className="text-sm text-muted-foreground">{quoted ? `引用:${quoted}` : fork !== null ? `从第 ${fork + 1} 个问题创建分支` : "打开消息菜单,或选中回复文字后点击引用。"}</p>
+ <p role="status" className="text-sm text-muted-foreground">{quoted ? t("previews.messages.quoted", { text: quoted }) : fork !== null ? t("previews.messages.forked", { index: fork + 1 }) : t("previews.messages.hint")}</p>
</div>;
}
function ViewportPreview() {
+ const { t } = useGalleryTranslation();
const viewport = useRef<ThreadViewportHandle>(null);
const [mode, setMode] = useState<"history" | "empty">("history");
- const [action, setAction] = useState("");
+ const [fork, setFork] = useState<number | null>(null);
return <div className="space-y-4">
- <StatePicker label="会话视图" value={mode} options={["history", "empty"]} onChange={setMode} />
+ <StatePicker label={t("previews.viewport.state")} value={mode} options={["history", "empty"]} onChange={setMode} />
<div className="flex h-[28rem] flex-col overflow-hidden rounded-control border">
<div className="shrink-0 border-b px-3 py-2"><PromptNavigator messages={mode === "history" ? longConversation : []}
onJumpToPrompt={(id) => viewport.current?.jumpToUserPrompt(id)} /></div>
<ThreadViewport ref={viewport} messages={mode === "history" ? longConversation : []} isStreaming={false}
- conversationKey={`gallery-${mode}`} conversationReady onForkFromMessage={(index) => setAction(`从问题 ${index + 1} 创建分支`)}
- emptyState={<p className="text-sm text-muted-foreground">输入消息开始会话</p>} />
+ conversationKey={`gallery-${mode}`} conversationReady onForkFromMessage={setFork}
+ emptyState={<p className="text-sm text-muted-foreground">{t("previews.viewport.empty")}</p>} />
</div>
- <p role="status" className="text-sm text-muted-foreground">{action || "滚动查看问题标记,或用导航跳转并返回底部。"}</p>
+ <p role="status" className="text-sm text-muted-foreground">{fork !== null ? t("previews.messages.forked", { index: fork + 1 }) : t("previews.viewport.hint")}</p>
</div>;
}
function HistoryPreview() {
+ const { t } = useGalleryTranslation();
const [mode, setMode] = useState<"loading" | "error" | "exhausted">("loading");
const [retries, setRetries] = useState(0);
return <div className="space-y-4">
- <StatePicker label="历史状态" value={mode} options={["loading", "exhausted", "error"]} onChange={setMode} />
+ <StatePicker label={t("previews.history.state")} value={mode} options={["loading", "exhausted", "error"]} onChange={setMode} />
<div className="relative h-20 rounded-control border">
- <ThreadHistoryStatus loading={mode === "loading"} error={mode === "error" ? "Example history unavailable" : null}
+ <ThreadHistoryStatus loading={mode === "loading"} error={mode === "error" ? t("previews.history.error") : null}
exhausted={mode === "exhausted"} onRetry={() => { setRetries((value) => value + 1); setMode("loading"); }} />
</div>
- <p role="status" className="text-sm text-muted-foreground">重试次数:{retries}</p>
+ <p role="status" className="text-sm text-muted-foreground">{t("previews.history.retries", { amount: retries })}</p>
</div>;
}
function RecoveryPreview() {
+ const { t } = useGalleryTranslation();
const [mode, setMode] = useState<"awaiting_user" | "resuming" | "failed" | "unavailable">("awaiting_user");
const [action, setAction] = useState("");
const [visible, setVisible] = useState(true);
const state: RecoveryState = { recovery_id: `gallery-recovery-${mode}`, status: mode === "unavailable" ? "failed" : mode, can_continue: mode !== "unavailable" };
return <div className="space-y-4">
- <StatePicker label="恢复状态" value={mode} options={["awaiting_user", "resuming", "failed", "unavailable"]}
+ <StatePicker label={t("previews.recovery.state")} value={mode} options={["awaiting_user", "resuming", "failed", "unavailable"]}
onChange={(value) => { setMode(value); setVisible(true); setAction(""); }} />
- {visible ? <RecoveryNotice state={state} onContinue={() => { setVisible(false); setAction("继续示例任务"); return Promise.resolve(); }}
- onDismiss={() => { setVisible(false); setAction("已关闭恢复提示"); return Promise.resolve(); }} /> : null}
- <Button variant="outline" size="sm" onClick={() => { setVisible(true); setAction(""); }}>重置预览</Button>
- <p role="status" className="text-sm text-muted-foreground">{action || "选择恢复状态,再试用继续或关闭。"}</p>
+ {visible ? <RecoveryNotice state={state} onContinue={() => { setVisible(false); setAction("previews.recovery.continued"); return Promise.resolve(); }}
+ onDismiss={() => { setVisible(false); setAction("previews.recovery.dismissed"); return Promise.resolve(); }} /> : null}
+ <Button variant="outline" size="sm" onClick={() => { setVisible(true); setAction(""); }}>{t("previews.recovery.reset")}</Button>
+ <p role="status" className="text-sm text-muted-foreground">{t(action || "previews.recovery.hint")}</p>
</div>;
}
function FallbackPreview() {
+ const { t } = useGalleryTranslation();
const [mode, setMode] = useState<"fallback" | "reauth">("fallback");
const [dismissed, setDismissed] = useState(false);
const [action, setAction] = useState("");
return <div className="space-y-4">
- <StatePicker label="模型回退状态" value={mode} options={["fallback", "reauth"]} onChange={(value) => { setMode(value); setDismissed(false); }} />
+ <StatePicker label={t("previews.fallback.state")} value={mode} options={["fallback", "reauth"]} onChange={(value) => { setMode(value); setDismissed(false); }} />
{!dismissed ? <ModelFallbackNotice model="gpt-4.1" reauthProvider={mode === "reauth" ? "openai" : undefined}
reauthProviderLabel={mode === "reauth" ? "OpenAI" : undefined} onDismiss={() => setDismissed(true)}
- onOpenSettings={() => setAction("打开模型设置")} /> : null}
- <Button variant="outline" size="sm" onClick={() => setDismissed(false)}>重新显示</Button>
- <p role="status" className="text-sm text-muted-foreground">{action || "试用模型设置入口与关闭按钮。"}</p>
+ onOpenSettings={() => setAction("previews.modelPreset.settings")} /> : null}
+ <Button variant="outline" size="sm" onClick={() => setDismissed(false)}>{t("previews.fallback.showAgain")}</Button>
+ <p role="status" className="text-sm text-muted-foreground">{t(action || "previews.fallback.hint")}</p>
</div>;
}
function CompactionPreview() {
+ const { t } = useGalleryTranslation();
const [phase, setPhase] = useState<UIContextCompaction["phase"]>("started");
- return <><StatePicker label="上下文压缩阶段" value={phase} options={["started", "succeeded", "failed", "cancelled"]} onChange={setPhase} />
+ return <><StatePicker label={t("previews.compaction.phase")} value={phase} options={["started", "succeeded", "failed", "cancelled"]} onChange={setPhase} />
<ContextCompactionNotice compaction={{ id: "gallery-compaction", phase, announce: true }} /></>;
}
@@ -228,43 +248,47 @@ const errors: Record<StreamError["kind"], StreamError> = {
};
function ErrorPreview() {
+ const { t } = useGalleryTranslation();
const [kind, setKind] = useState<StreamError["kind"]>("model_request_failed");
const [dismissed, setDismissed] = useState(false);
return <div className="space-y-4">
- <StatePicker label="消息错误类型" value={kind} options={["message_too_big", "workspace_scope_rejected", "turn_rejected", "model_request_failed"]}
+ <StatePicker label={t("previews.streamError.kind")} value={kind} options={["message_too_big", "workspace_scope_rejected", "turn_rejected", "model_request_failed"]}
onChange={(value) => { setKind(value); setDismissed(false); }} />
{!dismissed ? <StreamErrorNotice error={errors[kind]} onDismiss={() => setDismissed(true)} /> : null}
- <Button variant="outline" size="sm" onClick={() => setDismissed(false)}>重新显示</Button>
+ <Button variant="outline" size="sm" onClick={() => setDismissed(false)}>{t("previews.fallback.showAgain")}</Button>
</div>;
}
function ClusterPreview() {
+ const { t } = useGalleryTranslation();
const [status, setStatus] = useState<"running" | "done" | "error">("done");
const [expanded, setExpanded] = useState(true);
const [startedAt] = useState(Date.now);
const event: ToolProgressEvent = { call_id: "gallery-read", name: "read_file", arguments: { path: "webui/src/components/thread/ThreadComposer.tsx" },
- phase: status === "running" ? "start" : status === "error" ? "error" : "end", error: status === "error" ? "File could not be read." : undefined };
+ phase: status === "running" ? "start" : status === "error" ? "error" : "end", error: status === "error" ? t("previews.cluster.error") : undefined };
const trace = formatToolCallTrace(event) ?? "read_file()";
const messages: UIMessage[] = [
{ id: "gallery-reasoning", role: "assistant", content: "", reasoning: "先核对组件接口,再查看消息和模型控件的组合方式。", reasoningStreaming: status === "running", isStreaming: status === "running", createdAt: startedAt },
{ id: "gallery-tool", role: "tool", kind: "trace", content: trace, traces: [trace], toolEvents: [event], createdAt: startedAt + 1_000 },
];
- return <><StatePicker label="活动状态" value={status} options={["running", "done", "error"]} onChange={setStatus} />
+ return <><StatePicker label={t("previews.cluster.state")} value={status} options={["running", "done", "error"]} onChange={setStatus} />
<AgentActivityCluster messages={messages} isTurnStreaming={status === "running"} hasBodyBelow={false}
startedAtMs={startedAt} turnLatencyMs={4_800} expanded={expanded} onExpandedChange={setExpanded} /></>;
}
function SearchActivityPreview() {
+ const { t } = useGalleryTranslation();
const [status, setStatus] = useState<"running" | "done" | "error">("done");
const [target, setTarget] = useState<"web" | "x">("web");
- return <><StatePicker label="搜索状态" value={status} options={["running", "done", "error"]} onChange={setStatus} />
- <StatePicker label="搜索来源" value={target} options={["web", "x"]} onChange={setTarget} />
+ return <><StatePicker label={t("previews.search.state")} value={status} options={["running", "done", "error"]} onChange={setStatus} />
+ <StatePicker label={t("previews.search.source")} value={target} options={["web", "x"]} onChange={setTarget} />
<WebSearchRun turnActive={status === "running"} run={{ key: "gallery-search", query: "React component composition", target, status,
sources: status === "done" && target === "web" ? [{ title: "React · Passing props to a component", href: "https://react.dev/learn/passing-props-to-a-component", host: "react.dev", displayUrl: "react.dev/learn/passing-props-to-a-component" }] : [] }} /></>;
}
function ResponseSourcesPreview() {
- return <Sample label="点击回退标记查看响应时的预设、模型与供应商">
+ const { t } = useGalleryTranslation();
+ return <Sample label={t("previews.responseSources.hint")}>
<FallbackResponseSources sources={[
{ preset: "日常", model: "gpt-4.1", provider: "openai", fallback: true },
{ preset: "推理", model: "claude-sonnet-4", provider: "anthropic", fallback: true },
@@ -274,52 +298,52 @@ function ResponseSourcesPreview() {
const components = "webui/src/components/";
export const conversationExamples: ComponentExample[] = [
- { title: "ThreadComposer · 消息输入", files: ["thread/ThreadComposer"], Preview: ComposerPreview,
- description: "直接试用消息提交、附件、命令和引用,并切换忙碌与禁用状态。", options: "onSend 返回成功后清空输入;isStreaming 控制停止与排队;variant 切换会话和欢迎页样式。示例提交保存在当前预览。",
+ { title: "previews.composer.title", files: ["thread/ThreadComposer"], Preview: ComposerPreview,
+ description: "previews.composer.description", options: "previews.composer.options",
code: '<ThreadComposer onSend={send} modelPresets={presets} onModelPresetChange={setPreset} slashCommands={commands} />' },
- { title: "ModelPresetBadge · 模型预设", files: ["thread/ModelPresetBadge"], Preview: ModelPresetPreview,
- description: "打开模型菜单,体验预设切换、键盘操作和待配置状态。", options: "modelPresets 提供预设快照,modelPreset 与 onPresetChange 控制当前选择;needsSetup 显示配置入口。",
+ { title: "previews.modelPreset.title", files: ["thread/ModelPresetBadge"], Preview: ModelPresetPreview,
+ description: "previews.modelPreset.description", options: "previews.modelPreset.options",
code: '<ModelPresetBadge label={preset} modelPreset={preset} modelPresets={presets} onPresetChange={setPreset} isHero={false} />' },
- { title: "ComposerUsagePopover · 上下文用量", files: ["thread/ComposerUsagePopover"], Preview: UsagePreview,
- description: "查看上下文占用、缓存和生成时间,切换警戒状态与底部面板。", options: "context 提供上下文容量,rounds 提供各轮统计;bottomSheet 选择移动端面板。",
+ { title: "previews.usage.title", files: ["thread/ComposerUsagePopover"], Preview: UsagePreview,
+ description: "previews.usage.description", options: "previews.usage.options",
code: '<ComposerUsagePopover context={{ contextTokens: 18500, contextWindowTokens: 200000 }} rounds={rounds} showLabel />' },
- { title: "WorkspaceControls · 工作目录", files: ["thread/WorkspaceControls"], Preview: WorkspacePreview,
- description: "选择示例项目,并切换当前预览的访问模式。", options: "scope 与 onChange 控制当前选择;onLoadProjects 提供示例目录列表。真实路径解析和权限执行由 gateway 负责。",
+ { title: "previews.workspace.title", files: ["thread/WorkspaceControls"], Preview: WorkspacePreview,
+ description: "previews.workspace.description", options: "previews.workspace.options",
code: '<WorkspaceProjectPicker isHero scope={scope} defaultScope={defaultScope} controls={controls} onLoadProjects={loadProjects} onChange={setScope} />\n<WorkspaceAccessToggle scope={scope} isHero onChange={setScope} />' },
- { title: "PromptNavigator · 问题导航", files: ["thread/PromptNavigator"], Preview: NavigatorPreview,
- description: "打开问题列表,搜索历史问题并查看跳转回调。", options: "messages 提供完整消息列表,组件提取用户问题;onJumpToPrompt 接收目标消息 ID。",
+ { title: "previews.navigator.title", files: ["thread/PromptNavigator"], Preview: NavigatorPreview,
+ description: "previews.navigator.description", options: "previews.navigator.options",
code: '<PromptNavigator messages={messages} onJumpToPrompt={jumpToPrompt} />' },
- { title: "ThreadHeader · 会话标题栏", files: ["thread/ThreadHeader"], Preview: HeaderPreview,
- description: "试用侧栏、主题、临时会话和问题导航控件。", options: "title、handle、theme 与 temporaryChatEnabled 提供显示状态;各操作通过回调交给调用方。",
+ { title: "previews.header.title", files: ["thread/ThreadHeader"], Preview: HeaderPreview,
+ description: "previews.header.description", options: "previews.header.options",
code: '<ThreadHeader title="Component examples" theme={theme} onToggleTheme={toggleTheme} onToggleSidebar={toggleSidebar} />' },
- { title: "ThreadMessages · 消息列表", files: ["thread/ThreadMessages", "thread/AssistantSelectionAction"], Preview: MessagesPreview,
- description: "查看完整多轮消息组合,试用消息菜单、会话分支和选中文本引用。", options: "messages 为已投影消息;onForkFromMessage 接收用户问题索引,onQuoteSelection 接收所选回复文字。",
+ { title: "previews.messages.title", files: ["thread/ThreadMessages", "thread/AssistantSelectionAction"], Preview: MessagesPreview,
+ description: "previews.messages.description", options: "previews.messages.options",
code: '<ThreadMessages messages={messages} onForkFromMessage={forkFromMessage} onQuoteSelection={quoteText} />' },
- { title: "ThreadViewport · 会话滚动", files: ["thread/ThreadViewport", "thread/PromptRail"], Preview: ViewportPreview,
- description: "真实长会话滚动区,包含问题标记、导航跳转和返回底部。", options: "固定预览容器高度;messages 驱动历史显示,ref.jumpToUserPrompt 执行定位;emptyState 提供空会话内容。",
+ { title: "previews.viewport.title", files: ["thread/ThreadViewport", "thread/PromptRail"], Preview: ViewportPreview,
+ description: "previews.viewport.description", options: "previews.viewport.options",
code: '<div className="flex h-96 flex-col"><ThreadViewport ref={viewport} messages={messages} isStreaming={false} /></div>' },
- { title: "ThreadHistoryStatus · 历史状态", files: ["thread/ThreadHistoryStatus"], Preview: HistoryPreview,
- description: "显示加载、历史起点与失败重试状态。", options: "loading 表示正在请求,exhausted 表示没有更早消息,error 提供报错信息,onRetry 重试加载。",
+ { title: "previews.history.title", files: ["thread/ThreadHistoryStatus"], Preview: HistoryPreview,
+ description: "previews.history.description", options: "previews.history.options",
code: '<ThreadHistoryStatus loading={loading} error={error} onRetry={retry} />' },
- { title: "RecoveryNotice · 任务恢复", files: ["thread/RecoveryNotice"], Preview: RecoveryPreview,
- description: "切换中断、恢复、失败和无法继续状态,试用继续与关闭。", options: "state 为已有恢复快照;onContinue 与 onDismiss 返回 Promise。示例回调只更新当前预览。",
+ { title: "previews.recovery.title", files: ["thread/RecoveryNotice"], Preview: RecoveryPreview,
+ description: "previews.recovery.description", options: "previews.recovery.options",
code: '<RecoveryNotice state={recoveryState} onContinue={continueTask} onDismiss={dismissRecovery} />' },
- { title: "ModelFallbackNotice · 模型回退", files: ["thread/ModelFallbackNotice"], Preview: FallbackPreview,
- description: "查看回退模型与授权失效提示,试用设置入口和关闭操作。", options: "model 标识回退模型;reauthProviderLabel 显示授权到期提示;onOpenSettings 和 onDismiss 由调用方提供。",
+ { title: "previews.fallback.title", files: ["thread/ModelFallbackNotice"], Preview: FallbackPreview,
+ description: "previews.fallback.description", options: "previews.fallback.options",
code: '<ModelFallbackNotice model="gpt-4.1" onDismiss={dismiss} onOpenSettings={openModelSettings} />' },
- { title: "ContextCompactionNotice · 上下文压缩", files: ["thread/ContextCompactionNotice"], Preview: CompactionPreview,
- description: "比较压缩开始、成功、失败和取消时的显示。", options: "compaction.phase 决定提示,announce 控制屏幕阅读器播报。",
+ { title: "previews.compaction.title", files: ["thread/ContextCompactionNotice"], Preview: CompactionPreview,
+ description: "previews.compaction.description", options: "previews.compaction.options",
code: '<ContextCompactionNotice compaction={{ id: "compaction-1", phase: "succeeded", announce: true }} />' },
- { title: "StreamErrorNotice · 消息错误", files: ["thread/StreamErrorNotice"], Preview: ErrorPreview,
- description: "比较消息大小、目录权限、任务拒绝和模型请求失败的提示。", options: "error.kind 决定错误文案;onDismiss 关闭提示。",
+ { title: "previews.streamError.title", files: ["thread/StreamErrorNotice"], Preview: ErrorPreview,
+ description: "previews.streamError.description", options: "previews.streamError.options",
code: '<StreamErrorNotice error={{ kind: "message_too_big" }} onDismiss={dismiss} />' },
- { title: "AgentActivityCluster · 完整活动", files: ["thread/AgentActivityCluster"], Preview: ClusterPreview,
- description: "用真实活动容器展示推理和工具记录,切换运行、完成和失败。", options: "messages 包含已有 reasoning 和 trace 投影;isTurnStreaming 控制活动状态;expanded 可由调用方控制。",
+ { title: "previews.cluster.title", files: ["thread/AgentActivityCluster"], Preview: ClusterPreview,
+ description: "previews.cluster.description", options: "previews.cluster.options",
code: '<AgentActivityCluster messages={activityMessages} isTurnStreaming={running} hasBodyBelow={false} expanded={expanded} onExpandedChange={setExpanded} />' },
- { title: "WebSearchRun · 搜索活动", files: ["thread/activity/WebSearchRun", "thread/activity/WebActivityRow"], Preview: SearchActivityPreview,
- description: "查看搜索进度与结果来源,切换网页和 X 搜索样式。", options: "run 为搜索显示快照,包含 query、target、status 和 sources;turnActive 控制运行效果。结果站点图标由共享组件加载。",
+ { title: "previews.search.title", files: ["thread/activity/WebSearchRun", "thread/activity/WebActivityRow"], Preview: SearchActivityPreview,
+ description: "previews.search.description", options: "previews.search.options",
code: '<WebSearchRun run={searchRun} turnActive={running} />' },
- { title: "FallbackResponseSources · 响应来源", files: ["ResponseSourceBadge"], Preview: ResponseSourcesPreview,
- description: "查看历史回复使用的回退预设、模型和供应商。", options: "sources 保留响应时的模型快照,仅 fallback 为 true 的来源显示标记。",
+ { title: "previews.responseSources.title", files: ["ResponseSourceBadge"], Preview: ResponseSourcesPreview,
+ description: "previews.responseSources.description", options: "previews.responseSources.options",
code: '<FallbackResponseSources sources={[{ provider: "openai", model: "gpt-4.1", preset: "Daily", fallback: true }]} />' },
].map((example) => ({ ...example, files: example.files.map((file) => `${components}${file}.tsx`) }));
diff --git a/webui/src/dev/gallery/example.tsx b/webui/src/dev/gallery/example.tsx
index 4b6179ce4..57ae494a4 100644
--- a/webui/src/dev/gallery/example.tsx
+++ b/webui/src/dev/gallery/example.tsx
@@ -4,6 +4,7 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@
export interface ComponentExample {
title: string;
+ titleValues?: Record<string, string>;
files: string[];
description: string;
options: string;
diff --git a/webui/src/dev/gallery/foundations.tsx b/webui/src/dev/gallery/foundations.tsx
index 5db9963af..da87c0469 100644
--- a/webui/src/dev/gallery/foundations.tsx
+++ b/webui/src/dev/gallery/foundations.tsx
@@ -20,82 +20,91 @@ import { ExpandableText } from "@/components/ui/expandable-text";
import { StreamingLabelSheen } from "@/components/ui/streaming-label-sheen";
import { ImageViewport } from "@/components/ui/image-viewport";
import { Sample, type ComponentExample } from "./example";
+import { useGalleryTranslation } from "./i18n";
function Buttons() {
+ const { t } = useGalleryTranslation();
const [clicks, setClicks] = useState(0);
return <div className="space-y-6">
- <Sample label="Variants · 同一个按钮的不同样式">
+ <Sample label={t("controls.button.variants")}>
<div className="flex flex-wrap items-center gap-3">
{(["default", "secondary", "outline", "ghost", "destructive", "link"] as const).map((variant) =>
<Button key={variant} variant={variant} onClick={() => setClicks((value) => value + 1)}>{variant}</Button>)}
- <Button variant="icon" size="icon" aria-label="Add example" onClick={() => setClicks((value) => value + 1)}><Plus className="h-4 w-4" /></Button>
+ <Button variant="icon" size="icon" aria-label={t("controls.button.add")} onClick={() => setClicks((value) => value + 1)}><Plus className="h-4 w-4" /></Button>
</div>
</Sample>
- <Sample label="Sizes · 尺寸">
+ <Sample label={t("controls.button.sizes")}>
<div className="flex flex-wrap items-center gap-3">
{(["sm", "default", "control", "lg"] as const).map((size) =>
<Button key={size} size={size} variant="outline" onClick={() => setClicks((value) => value + 1)}>{size}</Button>)}
- <Button disabled>Unavailable</Button>
+ <Button disabled>{t("controls.common.unavailable")}</Button>
</div>
</Sample>
- <p role="status" className="text-sm text-muted-foreground">Button clicks: {clicks}</p>
+ <p role="status" className="text-sm text-muted-foreground">{t("controls.button.clicks", { count: clicks })}</p>
</div>;
}
function Inputs() {
+ const { t } = useGalleryTranslation();
return <div className="grid gap-5 sm:grid-cols-2">
- <Sample label="Default"><Input aria-label="Example name" placeholder="Project name" /></Sample>
- <Sample label="Search"><SearchInput aria-label="Example search" placeholder="Search projects" /></Sample>
- <Sample label="Invalid"><Input aria-label="Invalid name" aria-invalid="true" aria-describedby="gallery-input-error" defaultValue="" />
- <p id="gallery-input-error" className="text-xs text-destructive">Enter a project name.</p></Sample>
- <Sample label="Disabled"><Input aria-label="Disabled name" disabled defaultValue="Unavailable" /></Sample>
+ <Sample label={t("settings.values.default", { ns: "common" })}><Input aria-label={t("controls.input.name")} placeholder={t("controls.input.projectName")} /></Sample>
+ <Sample label={t("controls.input.search")}><SearchInput aria-label={t("controls.input.searchName")} placeholder={t("controls.input.searchProjects")} /></Sample>
+ <Sample label={t("controls.input.invalid")}><Input aria-label={t("controls.input.invalidName")} aria-invalid="true" aria-describedby="gallery-input-error" defaultValue="" />
+ <p id="gallery-input-error" className="text-xs text-destructive">{t("controls.input.required")}</p></Sample>
+ <Sample label={t("settings.values.disabled", { ns: "common" })}><Input aria-label={t("controls.input.disabledName")} disabled value={t("controls.common.unavailable")} /></Sample>
</div>;
}
function Textareas() {
+ const { t } = useGalleryTranslation();
return <div className="grid gap-5 sm:grid-cols-2">
- <Textarea aria-label="Example notes" defaultValue="Write a short note…" />
- <Textarea aria-label="Disabled notes" disabled defaultValue="Read-only preview" />
+ <Textarea aria-label={t("controls.textarea.notes")} defaultValue="Write a short note…" />
+ <Textarea aria-label={t("controls.textarea.disabledNotes")} disabled value={t("controls.textarea.readOnly")} />
</div>;
}
function Switches() {
+ const { t } = useGalleryTranslation();
const [checked, setChecked] = useState(false);
return <div className="space-y-5">
- <div className="flex items-center justify-between gap-4 text-sm"><span>Enable example</span>
- <ToggleButton checked={checked} onChange={setChecked} label="Enable example" /></div>
- <p role="status" className="text-sm text-muted-foreground">{checked ? "Enabled" : "Disabled"}</p>
+ <div className="flex items-center justify-between gap-4 text-sm"><span>{t("controls.toggle.enable")}</span>
+ <ToggleButton checked={checked} onChange={setChecked} label={t("controls.toggle.enable")} /></div>
+ <p role="status" className="text-sm text-muted-foreground">{t(checked ? "settings.values.enabled" : "settings.values.disabled", { ns: "common" })}</p>
<div className="flex gap-8">
- <ToggleButton checked disabled onChange={() => {}} label="Unavailable enabled switch" />
- <ToggleButton checked={false} disabled onChange={() => {}} label="Unavailable disabled switch" />
+ <ToggleButton checked disabled onChange={() => {}} label={t("controls.toggle.unavailableOn")} />
+ <ToggleButton checked={false} disabled onChange={() => {}} label={t("controls.toggle.unavailableOff")} />
</div>
</div>;
}
function Selects() {
+ const { t } = useGalleryTranslation();
const [value, setValue] = useState("default");
+ const labels: Record<string, string> = { default: t("settings.values.default", { ns: "common" }), fast: t("controls.select.fast") };
return <div className="flex flex-wrap items-center gap-4">
<Select value={value} onValueChange={setValue}>
- <SelectTrigger aria-label="Example model" className="min-w-40"><SelectValue /></SelectTrigger>
- <SelectContent><SelectItem value="default">Default</SelectItem><SelectItem value="fast">Fast</SelectItem>
- <SelectItem value="offline" disabled>Unavailable</SelectItem></SelectContent>
+ <SelectTrigger aria-label={t("controls.select.model")} className="min-w-40"><SelectValue /></SelectTrigger>
+ <SelectContent><SelectItem value="default">{labels.default}</SelectItem><SelectItem value="fast">{labels.fast}</SelectItem>
+ <SelectItem value="offline" disabled>{t("controls.common.unavailable")}</SelectItem></SelectContent>
</Select>
- <Select disabled value="default"><SelectTrigger aria-label="Disabled model"><SelectValue /></SelectTrigger>
- <SelectContent><SelectItem value="default">Default</SelectItem></SelectContent></Select>
- <p role="status" className="text-sm text-muted-foreground">Selected: {value}</p>
+ <Select disabled value="default"><SelectTrigger aria-label={t("controls.select.disabledModel")}><SelectValue /></SelectTrigger>
+ <SelectContent><SelectItem value="default">{labels.default}</SelectItem></SelectContent></Select>
+ <p role="status" className="text-sm text-muted-foreground">{t("controls.common.selected", { value: labels[value] })}</p>
</div>;
}
function Segments() {
+ const { t } = useGalleryTranslation();
const [value, setValue] = useState("day");
+ const options = ["day", "week", "month"].map((period) => ({ value: period, label: t(`controls.segmented.${period}`) }));
return <div className="space-y-4">
- <SegmentedControl value={value} onChange={setValue} mode="tabs" ariaLabel="Example period"
- options={[{ value: "day", label: "Day" }, { value: "week", label: "Week" }, { value: "month", label: "Month" }]} />
- <p role="status" className="text-sm text-muted-foreground">Selected period: {value}</p>
+ <SegmentedControl value={value} onChange={setValue} mode="tabs" ariaLabel={t("controls.segmented.period")} options={options} />
+ <p role="status" className="text-sm text-muted-foreground">{t("controls.segmented.selected", { value: t(`controls.segmented.${value}`) })}</p>
</div>;
}
function Comboboxes() {
+ const { t } = useGalleryTranslation();
const [query, setQuery] = useState("");
const [selected, setSelected] = useState("Alpha");
const [open, setOpen] = useState(false);
@@ -103,90 +112,96 @@ function Comboboxes() {
const select = (value: string) => { setSelected(value); setQuery(value); setOpen(false); };
const navigation = useComboboxNavigation({ open, values, selectedValue: selected, onSelect: select, onClose: () => setOpen(false) });
return <div className="max-w-sm space-y-3">
- <Input {...navigation.inputProps} aria-label="Search example options" value={query} placeholder="Type or use arrow keys"
+ <Input {...navigation.inputProps} aria-label={t("controls.combobox.search")} value={query} placeholder={t("controls.combobox.placeholder")}
onFocus={() => setOpen(true)} onChange={(event) => { setQuery(event.target.value); setOpen(true); }} />
- {open && values.length > 0 ? <div {...navigation.listProps} aria-label="Example options" className="rounded-control border p-1">
+ {open && values.length > 0 ? <div {...navigation.listProps} aria-label={t("controls.combobox.choices")} className="rounded-control border p-1">
{values.map((value) => <ComboboxOption key={value} {...navigation.getOptionProps(value)}>{value}</ComboboxOption>)}
</div> : null}
- {open && values.length === 0 ? <p role="status" className="text-sm text-muted-foreground">No matching options</p> : null}
- <p className="text-sm text-muted-foreground">Selected option: {selected}</p>
+ {open && values.length === 0 ? <p role="status" className="text-sm text-muted-foreground">{t("controls.combobox.empty")}</p> : null}
+ <p className="text-sm text-muted-foreground">{t("controls.combobox.selected", { value: selected })}</p>
</div>;
}
function Dialogs() {
+ const { t } = useGalleryTranslation();
const [open, setOpen] = useState(false);
const [name, setName] = useState("Nanobot");
const [draft, setDraft] = useState(name);
return <div className="space-y-4">
<Dialog open={open} onOpenChange={(next) => { setOpen(next); if (next) setDraft(name); }}>
- <DialogTrigger asChild><Button variant="outline">Open dialog</Button></DialogTrigger>
- <DialogContent><DialogHeader><DialogTitle>Edit example label</DialogTitle>
- <DialogDescription>Changes apply only to this preview.</DialogDescription></DialogHeader>
- <Input aria-label="Example label" value={draft} onChange={(event) => setDraft(event.target.value)} />
+ <DialogTrigger asChild><Button variant="outline">{t("controls.dialog.open")}</Button></DialogTrigger>
+ <DialogContent><DialogHeader><DialogTitle>{t("controls.dialog.edit")}</DialogTitle>
+ <DialogDescription>{t("controls.dialog.help")}</DialogDescription></DialogHeader>
+ <Input aria-label={t("controls.dialog.label")} value={draft} onChange={(event) => setDraft(event.target.value)} />
<Selects />
- <DialogFooter><DialogClose asChild><Button variant="outline">Cancel</Button></DialogClose>
- <Button onClick={() => { setName(draft); setOpen(false); }}>Save label</Button></DialogFooter>
+ <DialogFooter><DialogClose asChild><Button variant="outline">{t("settings.actions.cancel", { ns: "common" })}</Button></DialogClose>
+ <Button onClick={() => { setName(draft); setOpen(false); }}>{t("controls.dialog.save")}</Button></DialogFooter>
</DialogContent>
</Dialog>
- <p role="status" className="text-sm text-muted-foreground">Saved label: {name}</p>
+ <p role="status" className="text-sm text-muted-foreground">{t("controls.dialog.saved", { name })}</p>
</div>;
}
function Alerts() {
+ const { t } = useGalleryTranslation();
const [removed, setRemoved] = useState(false);
const [open, setOpen] = useState(false);
return <div className="space-y-4">
- <Button variant="destructive" onClick={() => setOpen(true)}>Remove example</Button>
+ <Button variant="destructive" onClick={() => setOpen(true)}>{t("controls.alert.remove")}</Button>
<AlertDialog open={open} onOpenChange={setOpen}>
- <AlertDialogContent><AlertDialogHeader><AlertDialogTitle>Remove this example?</AlertDialogTitle>
- <AlertDialogDescription>This changes only the preview state.</AlertDialogDescription></AlertDialogHeader>
- <AlertDialogFooter><AlertDialogCancel>Cancel</AlertDialogCancel>
- <AlertDialogAction onClick={() => setRemoved(true)}>Confirm removal</AlertDialogAction></AlertDialogFooter>
+ <AlertDialogContent><AlertDialogHeader><AlertDialogTitle>{t("controls.alert.confirmTitle")}</AlertDialogTitle>
+ <AlertDialogDescription>{t("controls.alert.help")}</AlertDialogDescription></AlertDialogHeader>
+ <AlertDialogFooter><AlertDialogCancel>{t("settings.actions.cancel", { ns: "common" })}</AlertDialogCancel>
+ <AlertDialogAction onClick={() => setRemoved(true)}>{t("controls.alert.confirm")}</AlertDialogAction></AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
- <p role="status" className="text-sm text-muted-foreground">{removed ? "Example removed." : "Example available."}</p>
+ <p role="status" className="text-sm text-muted-foreground">{t(removed ? "controls.alert.removed" : "controls.alert.available")}</p>
</div>;
}
function Sheets() {
- return <Sheet><SheetTrigger asChild><Button variant="outline">Open sheet</Button></SheetTrigger>
- <SheetContent><SheetTitle>Example side panel</SheetTitle><SheetDescription>Supporting controls beside the current page.</SheetDescription>
- <div className="mt-6"><Input aria-label="Panel notes" placeholder="Try editing here" /></div></SheetContent>
+ const { t } = useGalleryTranslation();
+ return <Sheet><SheetTrigger asChild><Button variant="outline">{t("controls.sheet.open")}</Button></SheetTrigger>
+ <SheetContent><SheetTitle>{t("controls.sheet.panelTitle")}</SheetTitle><SheetDescription>{t("controls.sheet.help")}</SheetDescription>
+ <div className="mt-6"><Input aria-label={t("controls.sheet.notes")} placeholder={t("controls.sheet.placeholder")} /></div></SheetContent>
</Sheet>;
}
function Popovers() {
- return <Popover><PopoverTrigger asChild><Button variant="outline">Open popover</Button></PopoverTrigger>
- <PopoverContent className="w-64 p-4"><label className="space-y-2 text-sm"><span>Quick note</span><Input aria-label="Quick note" /></label></PopoverContent>
+ const { t } = useGalleryTranslation();
+ return <Popover><PopoverTrigger asChild><Button variant="outline">{t("controls.popover.open")}</Button></PopoverTrigger>
+ <PopoverContent className="w-64 p-4"><label className="space-y-2 text-sm"><span>{t("controls.popover.note")}</span><Input aria-label={t("controls.popover.note")} /></label></PopoverContent>
</Popover>;
}
function Menus() {
+ const { t } = useGalleryTranslation();
const [density, setDensity] = useState("comfortable");
- const [action, setAction] = useState("None");
+ const [action, setAction] = useState("none");
return <div className="space-y-4">
- <DropdownMenu><DropdownMenuTrigger asChild><Button variant="outline">View options</Button></DropdownMenuTrigger>
- <DropdownMenuContent><DropdownMenuLabel>Layout</DropdownMenuLabel>
+ <DropdownMenu><DropdownMenuTrigger asChild><Button variant="outline">{t("controls.menu.view")}</Button></DropdownMenuTrigger>
+ <DropdownMenuContent><DropdownMenuLabel>{t("controls.menu.layout")}</DropdownMenuLabel>
<DropdownMenuRadioGroup value={density} onValueChange={setDensity}>
- <DropdownMenuRadioItem value="comfortable">Comfortable</DropdownMenuRadioItem>
- <DropdownMenuRadioItem value="compact">Compact</DropdownMenuRadioItem>
+ <DropdownMenuRadioItem value="comfortable">{t("controls.menu.comfortable")}</DropdownMenuRadioItem>
+ <DropdownMenuRadioItem value="compact">{t("controls.menu.compact")}</DropdownMenuRadioItem>
</DropdownMenuRadioGroup><DropdownMenuSeparator />
- <DropdownMenuItem onSelect={() => setAction("Rename")}>Rename</DropdownMenuItem>
- <DropdownMenuSub><DropdownMenuSubTrigger>More actions</DropdownMenuSubTrigger><DropdownMenuSubContent>
- <DropdownMenuItem onSelect={() => setAction("Duplicate")}>Duplicate</DropdownMenuItem>
+ <DropdownMenuItem onSelect={() => setAction("rename")}>{t("controls.menu.rename")}</DropdownMenuItem>
+ <DropdownMenuSub><DropdownMenuSubTrigger>{t("controls.menu.more")}</DropdownMenuSubTrigger><DropdownMenuSubContent>
+ <DropdownMenuItem onSelect={() => setAction("duplicate")}>{t("controls.menu.duplicate")}</DropdownMenuItem>
</DropdownMenuSubContent></DropdownMenuSub>
- <DropdownMenuItem disabled>Unavailable</DropdownMenuItem>
+ <DropdownMenuItem disabled>{t("controls.common.unavailable")}</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
- <p role="status" className="text-sm text-muted-foreground">Density: {density}. Action: {action}.</p>
+ <p role="status" className="text-sm text-muted-foreground">{t("controls.menu.status", { density: t(`controls.menu.${density}`), action: t(`controls.menu.${action}`) })}</p>
</div>;
}
function Tooltips() {
+ const { t } = useGalleryTranslation();
return <div className="flex flex-wrap items-center gap-4">
- <TooltipProvider><Tooltip><TooltipTrigger asChild><Button variant="outline">Primitive tooltip</Button></TooltipTrigger>
- <TooltipContent>Shared pointer delay and immediate keyboard focus.</TooltipContent></Tooltip></TooltipProvider>
- <HoverHint content="A composed hint with the same focus and pointer behavior."><Button variant="outline">Hover hint</Button></HoverHint>
+ <TooltipProvider><Tooltip><TooltipTrigger asChild><Button variant="outline">{t("controls.tooltip.primitive")}</Button></TooltipTrigger>
+ <TooltipContent>{t("controls.tooltip.primitiveHelp")}</TooltipContent></Tooltip></TooltipProvider>
+ <HoverHint content={t("controls.tooltip.hintHelp")}><Button variant="outline">{t("controls.tooltip.hint")}</Button></HoverHint>
</div>;
}
@@ -198,29 +213,32 @@ function TruncatedText() {
}
function Disclosures() {
- return <Disclosure summary={<span className="text-sm font-medium">Show advanced options</span>}
+ const { t } = useGalleryTranslation();
+ return <Disclosure summary={<span className="text-sm font-medium">{t("controls.disclosure.show")}</span>}
summaryClassName="rounded-control border p-3" contentClassName="space-y-3 p-3">
- <p className="text-sm text-muted-foreground">This draft survives closing and reopening.</p>
- <Input aria-label="Disclosure draft" defaultValue="Keep this draft" />
+ <p className="text-sm text-muted-foreground">{t("controls.disclosure.help")}</p>
+ <Input aria-label={t("controls.disclosure.draft")} defaultValue="Keep this draft" />
</Disclosure>;
}
function Expandable() {
+ const { t } = useGalleryTranslation();
const [expanded, setExpanded] = useState(false);
return <div className="max-w-sm space-y-3">
<ExpandableText expanded={expanded} lines={2} id="gallery-expandable" className="text-sm leading-6">
{"A longer activity description can stay compact while preserving its full text. Expand this example to read all of it, then collapse it again. The same paragraph remains mounted throughout the animation, so selection and layout do not jump between duplicate copies."}
</ExpandableText>
<Button variant="outline" size="sm" aria-expanded={expanded} aria-controls="gallery-expandable"
- onClick={() => setExpanded((value) => !value)}>{expanded ? "Show less" : "Show more"}</Button>
+ onClick={() => setExpanded((value) => !value)}>{t(expanded ? "controls.expandable.less" : "controls.expandable.more")}</Button>
</div>;
}
function StreamingLabels() {
+ const { t } = useGalleryTranslation();
const [active, setActive] = useState(true);
return <div className="space-y-4">
- <ToggleButton label="Animate label" checked={active} onChange={setActive} />
- <StreamingLabelSheen active={active}>Working through the next step…</StreamingLabelSheen>
+ <ToggleButton label={t("controls.streaming.animate")} checked={active} onChange={setActive} />
+ <StreamingLabelSheen active={active}>{t("controls.streaming.working")}</StreamingLabelSheen>
</div>;
}
@@ -232,59 +250,59 @@ function ImageViewports() {
const base = "webui/src/components/ui/";
export const foundationExamples: ComponentExample[] = [
- { title: "Button · 按钮", files: ["button"], Preview: Buttons,
- description: "One button, several appearances and sizes. 同一组件通过选项变化。",
- options: "variant changes appearance; size changes dimensions; disabled blocks interaction; onClick belongs to the caller.",
+ { title: "controls.button.title", files: ["button"], Preview: Buttons,
+ description: "controls.button.description",
+ options: "controls.button.options",
code: '<Button variant="destructive" size="sm" onClick={removeItem}>Remove</Button>' },
- { title: "Input · 输入框", files: ["input"], Preview: Inputs,
- description: "Text entry and the shared search-field variant.", options: "Use Input for regular fields and SearchInput for search. Supply a label and describe invalid input.",
+ { title: "controls.input.title", files: ["input"], Preview: Inputs,
+ description: "controls.input.description", options: "controls.input.options",
code: '<Input aria-label="Project name" value={name} onChange={event => setName(event.target.value)} />' },
- { title: "Textarea · 多行输入", files: ["textarea"], Preview: Textareas,
- description: "Multiline text using the shared focus treatment.", options: "Accepts native textarea props: value, onChange, rows and disabled.", code: '<Textarea aria-label="Notes" value={notes} onChange={event => setNotes(event.target.value)} />' },
- { title: "ToggleButton · 开关", files: ["toggle-button"], Preview: Switches,
- description: "A controlled on/off switch shared by settings, workspaces and channels.", options: "The caller owns checked and onChange. label supplies its accessible name.", code: '<ToggleButton checked={enabled} onChange={setEnabled} label="Enable feature" />' },
- { title: "Select · 选择器", files: ["select"], Preview: Selects,
- description: "A single choice with keyboard navigation and disabled options.", options: "Compose Select, SelectTrigger, SelectValue, SelectContent and SelectItem. The root owns value/onValueChange.",
+ { title: "controls.textarea.title", files: ["textarea"], Preview: Textareas,
+ description: "controls.textarea.description", options: "controls.textarea.options", code: '<Textarea aria-label="Notes" value={notes} onChange={event => setNotes(event.target.value)} />' },
+ { title: "controls.toggle.title", files: ["toggle-button"], Preview: Switches,
+ description: "controls.toggle.description", options: "controls.toggle.options", code: '<ToggleButton checked={enabled} onChange={setEnabled} label="Enable feature" />' },
+ { title: "controls.select.title", files: ["select"], Preview: Selects,
+ description: "controls.select.description", options: "controls.select.options",
code: '<Select value={value} onValueChange={setValue}>\n <SelectTrigger aria-label="Model"><SelectValue /></SelectTrigger>\n <SelectContent><SelectItem value="default">Default</SelectItem></SelectContent>\n</Select>' },
- { title: "SegmentedControl · 分段选择", files: ["segmented-control"], Preview: Segments,
- description: "A short, always-visible set of choices.", options: 'value, options and onChange are controlled. mode="tabs" adds arrow-key tab navigation.',
+ { title: "controls.segmented.title", files: ["segmented-control"], Preview: Segments,
+ description: "controls.segmented.description", options: "controls.segmented.options",
code: '<SegmentedControl value={period} onChange={setPeriod} options={[{ value: "day", label: "Day" }, { value: "week", label: "Week" }]} ariaLabel="Period" />' },
- { title: "Combobox · 搜索选择", files: ["combobox"], Preview: Comboboxes,
- description: "Searchable options with shared keyboard and pointer navigation.", options: "useComboboxNavigation supplies input/list/option props; the caller filters values and owns selection.",
+ { title: "controls.combobox.title", files: ["combobox"], Preview: Comboboxes,
+ description: "controls.combobox.description", options: "controls.combobox.options",
code: 'const nav = useComboboxNavigation({ open, values, selectedValue, onSelect, onClose });\n<Input {...nav.inputProps} aria-label="Search" />\n<div {...nav.listProps}>\n {values.map(value => <ComboboxOption key={value} {...nav.getOptionProps(value)}>{value}</ComboboxOption>)}\n</div>' },
- { title: "ControlChevron · 控件箭头", files: ["control-chevron"], Preview: () => <ControlChevron />,
- description: "The shared chevron used by selection controls.", options: "className may adjust placement. The icon is decorative; the owning control supplies its accessible name.", code: '<ControlChevron />' },
- { title: "Dialog · 对话框", files: ["dialog"], Preview: Dialogs,
- description: "A modal editor with staged changes, nested selection and focus return.", options: "The caller owns open/onOpenChange and draft/save behavior. Always provide DialogTitle and a description when useful.",
+ { title: "controls.chevron.title", files: ["control-chevron"], Preview: () => <ControlChevron />,
+ description: "controls.chevron.description", options: "controls.chevron.options", code: '<ControlChevron />' },
+ { title: "controls.dialog.title", files: ["dialog"], Preview: Dialogs,
+ description: "controls.dialog.description", options: "controls.dialog.options",
code: '<Dialog open={open} onOpenChange={setOpen}>\n <DialogTrigger asChild><Button>Edit</Button></DialogTrigger>\n <DialogContent><DialogTitle>Edit item</DialogTitle><DialogDescription>Update this item.</DialogDescription>{editor}</DialogContent>\n</Dialog>' },
- { title: "AlertDialog · 确认对话框", files: ["alert-dialog"], Preview: Alerts,
- description: "An explicit confirmation with separate cancel and action controls.", options: "Compose title, description and footer; perform the action in AlertDialogAction's handler.",
+ { title: "controls.alert.title", files: ["alert-dialog"], Preview: Alerts,
+ description: "controls.alert.description", options: "controls.alert.options",
code: '<Button onClick={() => setOpen(true)}>Remove</Button>\n<AlertDialog open={open} onOpenChange={setOpen}>\n <AlertDialogContent><AlertDialogTitle>Remove item?</AlertDialogTitle><AlertDialogDescription>This removes the item.</AlertDialogDescription><AlertDialogCancel>Cancel</AlertDialogCancel><AlertDialogAction onClick={removeItem}>Remove</AlertDialogAction></AlertDialogContent>\n</AlertDialog>' },
- { title: "Sheet · 侧边面板", files: ["sheet"], Preview: Sheets,
- description: "A modal panel attached to an edge of the viewport.", options: "SheetContent supports side. Include SheetTitle and SheetDescription.",
+ { title: "controls.sheet.title", files: ["sheet"], Preview: Sheets,
+ description: "controls.sheet.description", options: "controls.sheet.options",
code: '<Sheet><SheetTrigger asChild><Button>Details</Button></SheetTrigger><SheetContent side="right"><SheetTitle>Details</SheetTitle><SheetDescription>Additional information.</SheetDescription>{content}</SheetContent></Sheet>' },
- { title: "Popover · 浮层", files: ["popover"], Preview: Popovers,
- description: "A small interactive surface anchored to its trigger.", options: "Compose trigger and content; open/onOpenChange can be controlled. Content follows the owning dialog's portal.",
+ { title: "controls.popover.title", files: ["popover"], Preview: Popovers,
+ description: "controls.popover.description", options: "controls.popover.options",
code: '<Popover><PopoverTrigger asChild><Button>Note</Button></PopoverTrigger><PopoverContent>{editor}</PopoverContent></Popover>' },
- { title: "DropdownMenu · 菜单", files: ["dropdown-menu"], Preview: Menus,
- description: "Actions, radio choices, nested menus and disabled entries.", options: "Use onSelect for actions and a radio group for a persistent choice.",
+ { title: "controls.menu.title", files: ["dropdown-menu"], Preview: Menus,
+ description: "controls.menu.description", options: "controls.menu.options",
code: '<DropdownMenu><DropdownMenuTrigger asChild><Button>Actions</Button></DropdownMenuTrigger><DropdownMenuContent><DropdownMenuItem onSelect={rename}>Rename</DropdownMenuItem></DropdownMenuContent></DropdownMenu>' },
- { title: "Tooltip / HoverHint · 提示", files: ["tooltip", "tooltip-primitives", "hover-hint"], Preview: Tooltips,
- description: "HoverHint composes the shared tooltip primitives; tooltip.tsx is their public import surface.", options: "Use HoverHint for ordinary hints. Keep essential errors visible. Hover and keyboard focus share the product's timing rules.",
+ { title: "controls.tooltip.title", files: ["tooltip", "tooltip-primitives", "hover-hint"], Preview: Tooltips,
+ description: "controls.tooltip.description", options: "controls.tooltip.options",
code: '<HoverHint content="Add an attachment"><Button size="icon" aria-label="Add attachment"><Plus /></Button></HoverHint>' },
- { title: "TruncatedTextTooltip · 截断提示", files: ["truncated-text-tooltip"], Preview: TruncatedText,
- description: "Shows a hint only when the measured text is truncated.", options: "Supply text and a constrained width. Add tabIndex when the text itself should receive keyboard focus.",
+ { title: "controls.truncated.title", files: ["truncated-text-tooltip"], Preview: TruncatedText,
+ description: "controls.truncated.description", options: "controls.truncated.options",
code: '<TruncatedTextTooltip text={projectName} tabIndex={0} className="block max-w-48" />' },
- { title: "Disclosure · 折叠内容", files: ["disclosure"], Preview: Disclosures,
- description: "Expandable content that preserves child state while folded.", options: "Disclosure owns expansion; DisclosureContent accepts a controlled open prop for custom triggers.",
+ { title: "controls.disclosure.title", files: ["disclosure"], Preview: Disclosures,
+ description: "controls.disclosure.description", options: "controls.disclosure.options",
code: '<Disclosure summary="Advanced options"><Input aria-label="Draft" defaultValue="Preserved" /></Disclosure>' },
- { title: "ExpandableText · 文本展开", files: ["expandable-text"], Preview: Expandable,
- description: "A line-limited preview of the same mounted text.", options: "The caller owns expanded. lines sets the collapsed line count; provide an accessible toggle.",
+ { title: "controls.expandable.title", files: ["expandable-text"], Preview: Expandable,
+ description: "controls.expandable.description", options: "controls.expandable.options",
code: '<ExpandableText expanded={expanded} lines={2} className="text-sm leading-6">{description}</ExpandableText>' },
- { title: "ImageViewport · 图像视口", files: ["image-viewport"], Preview: ImageViewports,
- description: "Image-local fit, zoom, pan and pinch controls.", options: "Supply a bounded className and remount for a different image identity. Set panWithArrows=false when a gallery owns arrow navigation.",
+ { title: "controls.imageViewport.title", files: ["image-viewport"], Preview: ImageViewports,
+ description: "controls.imageViewport.description", options: "controls.imageViewport.options",
code: '<div className="flex h-80 flex-col"><ImageViewport src={url} alt={label} className="flex-1" /></div>' },
- { title: "StreamingLabelSheen · 流光文字", files: ["streaming-label-sheen"], Preview: StreamingLabels,
- description: "A shared text animation for active thinking and tool labels.", options: "active controls animation. String or number children supply the glyph overlay; reduced-motion settings are respected.",
+ { title: "controls.streaming.title", files: ["streaming-label-sheen"], Preview: StreamingLabels,
+ description: "controls.streaming.description", options: "controls.streaming.options",
code: '<StreamingLabelSheen active={running}>Working…</StreamingLabelSheen>' },
].map((example) => ({ ...example, files: example.files.map((file) => `${base}${file}.tsx`) }));
diff --git a/webui/src/dev/gallery/i18n.ts b/webui/src/dev/gallery/i18n.ts
new file mode 100644
index 000000000..0df564ca3
--- /dev/null
+++ b/webui/src/dev/gallery/i18n.ts
@@ -0,0 +1,26 @@
+import { useTranslation } from "react-i18next";
+
+import i18n, { initializeI18n } from "@/i18n";
+import { supportedLocales } from "@/i18n/config";
+
+const bundles = import.meta.glob<{ default: Record<string, unknown> }>(
+ "./locales/*/*.json",
+ { eager: true },
+);
+
+// Gallery copy is a development-only namespace; the application keeps its own bundles.
+export async function initializeGalleryI18n(): Promise<void> {
+ await initializeI18n();
+ for (const { code } of supportedLocales) {
+ for (const [path, bundle] of Object.entries(bundles)) {
+ const match = path.match(/^\.\/locales\/([^/]+)\/([^/]+)\.json$/);
+ if (match?.[2] === code) {
+ i18n.addResourceBundle(code, "gallery", { [match[1]]: bundle.default }, true, true);
+ }
+ }
+ }
+}
+
+export function useGalleryTranslation() {
+ return useTranslation("gallery");
+}
diff --git a/webui/src/dev/gallery/locales/controls/en.json b/webui/src/dev/gallery/locales/controls/en.json
new file mode 100644
index 000000000..bdb45ecac
--- /dev/null
+++ b/webui/src/dev/gallery/locales/controls/en.json
@@ -0,0 +1,500 @@
+{
+ "common": {
+ "unavailable": "Unavailable",
+ "selected": "Selected: {{value}}",
+ "savingPreview": "Saving preview values…",
+ "savedPreview": "Preview values saved",
+ "providerAction": "Provider configuration action selected",
+ "reset": "Reset preview"
+ },
+ "button": {
+ "title": "Buttons",
+ "description": "One button, several appearances and sizes. The same component changes through its options.",
+ "options": "variant changes appearance; size changes dimensions; disabled blocks interaction; onClick belongs to the caller.",
+ "variants": "Variants — different styles of the same button",
+ "sizes": "Sizes",
+ "add": "Add example",
+ "clicks": "Button clicks: {{count}}"
+ },
+ "input": {
+ "title": "Text inputs",
+ "description": "Text entry and the shared search-field variant.",
+ "options": "Use Input for regular fields and SearchInput for search. Supply a label and describe invalid input.",
+ "name": "Example name",
+ "projectName": "Project name",
+ "search": "Search",
+ "searchName": "Example search",
+ "searchProjects": "Search projects",
+ "invalid": "Invalid",
+ "invalidName": "Invalid name",
+ "required": "Enter a project name.",
+ "disabledName": "Disabled name"
+ },
+ "textarea": {
+ "title": "Multiline inputs",
+ "description": "Multiline text using the shared focus treatment.",
+ "options": "Accepts native textarea props: value, onChange, rows and disabled.",
+ "notes": "Example notes",
+ "disabledNotes": "Disabled notes",
+ "readOnly": "Read-only preview"
+ },
+ "toggle": {
+ "title": "Switches",
+ "description": "A controlled on/off switch shared by settings, workspaces and channels.",
+ "options": "The caller owns checked and onChange. label supplies its accessible name.",
+ "enable": "Enable example",
+ "unavailableOn": "Unavailable enabled switch",
+ "unavailableOff": "Unavailable disabled switch"
+ },
+ "select": {
+ "title": "Selection controls",
+ "description": "A single choice with keyboard navigation and disabled options.",
+ "options": "Compose Select, SelectTrigger, SelectValue, SelectContent and SelectItem. The root owns value/onValueChange.",
+ "fast": "Fast",
+ "model": "Example model",
+ "disabledModel": "Disabled model"
+ },
+ "segmented": {
+ "title": "Segmented choices",
+ "description": "A short, always-visible set of choices.",
+ "options": "value, options and onChange are controlled. mode=\"tabs\" adds arrow-key tab navigation.",
+ "day": "Day",
+ "week": "Week",
+ "month": "Month",
+ "period": "Example period",
+ "selected": "Selected period: {{value}}"
+ },
+ "combobox": {
+ "title": "Searchable choices",
+ "description": "Searchable options with shared keyboard and pointer navigation.",
+ "options": "useComboboxNavigation supplies input/list/option props; the caller filters values and owns selection.",
+ "search": "Search example options",
+ "placeholder": "Type or use arrow keys",
+ "choices": "Example options",
+ "empty": "No matching options",
+ "selected": "Selected option: {{value}}"
+ },
+ "chevron": {
+ "title": "Control chevron",
+ "description": "The shared chevron used by selection controls.",
+ "options": "className may adjust placement. The icon is decorative; the owning control supplies its accessible name."
+ },
+ "dialog": {
+ "title": "Dialogs",
+ "description": "A modal editor with staged changes, nested selection and focus return.",
+ "options": "The caller owns open/onOpenChange and draft/save behavior. Always provide DialogTitle and a description when useful.",
+ "open": "Open dialog",
+ "edit": "Edit example label",
+ "help": "Changes apply only to this preview.",
+ "label": "Example label",
+ "save": "Save label",
+ "saved": "Saved label: {{name}}"
+ },
+ "alert": {
+ "title": "Confirmation dialogs",
+ "description": "An explicit confirmation with separate cancel and action controls.",
+ "options": "Compose title, description and footer; perform the action in AlertDialogAction's handler.",
+ "remove": "Remove example",
+ "confirmTitle": "Remove this example?",
+ "help": "This changes only the preview state.",
+ "confirm": "Confirm removal",
+ "removed": "Example removed.",
+ "available": "Example available."
+ },
+ "sheet": {
+ "title": "Side panels",
+ "description": "A modal panel attached to an edge of the viewport.",
+ "options": "SheetContent supports side. Include SheetTitle and SheetDescription.",
+ "open": "Open sheet",
+ "panelTitle": "Example side panel",
+ "help": "Supporting controls beside the current page.",
+ "notes": "Panel notes",
+ "placeholder": "Try editing here"
+ },
+ "popover": {
+ "title": "Popovers",
+ "description": "A small interactive surface anchored to its trigger.",
+ "options": "Compose trigger and content; open/onOpenChange can be controlled. Content follows the owning dialog's portal.",
+ "open": "Open popover",
+ "note": "Quick note"
+ },
+ "menu": {
+ "title": "Dropdown menus",
+ "description": "Actions, radio choices, nested menus and disabled entries.",
+ "options": "Use onSelect for actions and a radio group for a persistent choice.",
+ "view": "View options",
+ "layout": "Layout",
+ "comfortable": "Comfortable",
+ "compact": "Compact",
+ "rename": "Rename",
+ "more": "More actions",
+ "duplicate": "Duplicate",
+ "none": "None",
+ "status": "Density: {{density}}. Action: {{action}}."
+ },
+ "tooltip": {
+ "title": "Tooltips and hints",
+ "description": "HoverHint composes the shared tooltip primitives; tooltip.tsx is their public import surface.",
+ "options": "Use HoverHint for ordinary hints. Keep essential errors visible. Hover and keyboard focus share the product's timing rules.",
+ "primitive": "Primitive tooltip",
+ "primitiveHelp": "Shared pointer delay and immediate keyboard focus.",
+ "hint": "Hover hint",
+ "hintHelp": "A composed hint with the same focus and pointer behavior."
+ },
+ "truncated": {
+ "title": "Truncated text hints",
+ "description": "Shows a hint only when the measured text is truncated.",
+ "options": "Supply text and a constrained width. Add tabIndex when the text itself should receive keyboard focus."
+ },
+ "disclosure": {
+ "title": "Collapsible content",
+ "description": "Expandable content that preserves child state while folded.",
+ "options": "Disclosure owns expansion; DisclosureContent accepts a controlled open prop for custom triggers.",
+ "show": "Show advanced options",
+ "help": "This draft survives closing and reopening.",
+ "draft": "Disclosure draft"
+ },
+ "expandable": {
+ "title": "Expandable text",
+ "description": "A line-limited preview of the same mounted text.",
+ "options": "The caller owns expanded. lines sets the collapsed line count; provide an accessible toggle.",
+ "less": "Show less",
+ "more": "Show more"
+ },
+ "imageViewport": {
+ "title": "Image viewport",
+ "description": "Image-local fit, zoom, pan and pinch controls.",
+ "options": "Supply a bounded className and remount for a different image identity. Set panWithArrows=false when a gallery owns arrow navigation."
+ },
+ "streaming": {
+ "title": "Animated labels",
+ "description": "A shared text animation for active thinking and tool labels.",
+ "options": "active controls animation. String or number children supply the glyph overlay; reduced-motion settings are respected.",
+ "animate": "Animate label",
+ "working": "Working through the next step…"
+ },
+ "markdown": {
+ "title": "Markdown replies",
+ "description": "The production streaming renderer, including tables, code and math.",
+ "options": "children is Markdown text. streaming controls incomplete content; onOpenFilePreview belongs to the screen.",
+ "state": "Markdown state"
+ },
+ "code": {
+ "title": "Code display",
+ "description": "Syntax highlighting, line numbers, clipboard copying, ANSI output and viewport-aware rows.",
+ "options": "code and language supply content; showLineNumbers, wrapLongLines and chrome control presentation. Viewport highlighting requires line numbers and unwrapped lines.",
+ "format": "Code format"
+ },
+ "math": {
+ "title": "Math formulas",
+ "description": "The shared fitting wrapper around Markdown's rendered display math.",
+ "options": "Use MarkdownText for TeX source. DisplayMath itself accepts already-rendered math nodes and scales them to the available width."
+ },
+ "message": {
+ "title": "Messages",
+ "description": "User and assistant messages, including thinking and delivery states.",
+ "options": "message is a UIMessage projected by the chat runtime. Data and network actions remain outside the renderer.",
+ "state": "Message state"
+ },
+ "activity": {
+ "title": "Agent activity",
+ "description": "Activity primitives composed into a working, completed or failed sequence.",
+ "options": "Pass text, status and controlled expansion. The gateway owns tool execution; these components render its projected state.",
+ "state": "Activity state",
+ "working": "Working",
+ "details": "Activity details",
+ "collapse": "Collapse",
+ "readError": "Could not read file",
+ "read": "Read source"
+ },
+ "files": {
+ "title": "File edits",
+ "description": "File references, line-change counts and expandable diffs.",
+ "options": "edits contains display summaries; displayMode selects summary/diff/collapsed_diff; onOpenFilePreview is supplied by the screen.",
+ "error": "Example edit could not be applied.",
+ "state": "File edit state",
+ "operation": "File operation",
+ "display": "Diff display",
+ "selected": "Selected file: {{path}}",
+ "hint": "Select a file reference to exercise its callback."
+ },
+ "media": { "study": "Color study {{count}}" },
+ "imageGallery": {
+ "title": "Image thumbnails",
+ "description": "Multi-image layout, thumbnail selection and overflow.",
+ "options": "images supplies URLs and names; size selects large or compact thumbnails, align controls alignment. Only four thumbnails are shown; the composed ImageLightbox includes all viewable images.",
+ "sixImages": "Six images",
+ "compact": "Compact thumbnails",
+ "hint": "Select a thumbnail or +2 to view all six images."
+ },
+ "imageLightbox": {
+ "title": "Full-screen image viewer",
+ "description": "Controlled full-screen viewing and image navigation.",
+ "options": "index is null when closed. The caller owns index and open callbacks; ImageLightbox composes ZoomableImage and resets the view on image changes.",
+ "open": "Open full-screen viewer",
+ "hint": "Use previous/next, ←/→ or Home/End; close with × or Escape."
+ },
+ "zoomableImage": {
+ "title": "Image zoom",
+ "description": "Single-image zoom, bounded panning and gestures.",
+ "options": "src and alt supply one image. Place it in a positioned container with a defined height; remount when changing images. Focus the viewport for +, − and 0 keyboard controls.",
+ "hint": "Zoom with +/−, double-click, Ctrl+wheel or pinch. Drag or scroll to pan after zooming; click the percentage or press 0 to reset."
+ },
+ "attachment": {
+ "title": "Attachments",
+ "description": "Image preview, video playback, file download and unavailable attachments.",
+ "options": "attachment.kind selects image, video or file. Images open ImageLightbox, videos use native controls, files use download links. Missing URLs render unavailable tiles; failed image loads also render an unavailable tile.",
+ "image": "Image",
+ "video": "Playable video",
+ "file": "Download file",
+ "unavailable": "Unavailable attachments (no URL)"
+ },
+ "fileReference": {
+ "title": "File references",
+ "description": "A file reference with a caller-owned open action.",
+ "options": "path supplies the label; onOpen supplies the action. The component does not decide workspace permissions.",
+ "select": "Select the file reference."
+ },
+ "settingsComposition": {
+ "title": "Settings composition",
+ "description": "The actual settings row/group/capability components composed with shared controls.",
+ "options": "The containing settings controller owns values and persistence. A gallery callback updates only local preview state.",
+ "preferences": "Example preferences",
+ "keepDrafts": "Keep drafts",
+ "switchHint": "A shared setting row with a controlled switch.",
+ "projectLabel": "Project label",
+ "projectName": "Settings project label",
+ "capability": "Example capability",
+ "notes": "Notes",
+ "capabilityNotes": "Capability notes",
+ "localOnly": "Local preview only"
+ },
+ "modelPickers": {
+ "title": "Model pickers",
+ "description": "Choose a provider, search for or enter a model ID, and adjust reasoning effort.",
+ "options": "The caller supplies ProviderPicker values and actions. ModelIdPicker's models can supply a fixed catalog; ReasoningEffortPicker's savedValues supplies existing options.",
+ "chooseProvider": "Choose provider",
+ "configure": "Configure {{provider}}"
+ },
+ "providerIcons": {
+ "title": "Provider icons",
+ "description": "Compare regular, compact and fill sizes, and the picker's unconfigured state.",
+ "options": "provider selects an existing icon; compact and fill control size. showBrandLogos=false uses built-in icons.",
+ "size": "Icon size"
+ },
+ "timezone": {
+ "title": "Timezone picker",
+ "description": "Search by timezone name, Chinese name or UTC offset, then view the same instant in local time.",
+ "options": "value is an IANA timezone; onChange updates the caller's value. The component provides search and keyboard navigation."
+ },
+ "textEditor": {
+ "title": "Text editor and hints",
+ "description": "Open the editor to change, save or cancel. Clear the content and save to see error feedback.",
+ "options": "SettingsTextEditor closes after onSave succeeds and shows errors on failure; SettingsHint opens on hover, focus or click.",
+ "state": "Editing state",
+ "hint": "Open the editor to change, save or cancel. Clear the content to see the error state.",
+ "instructions": "Example instructions",
+ "edit": "Edit example instructions",
+ "help": "After saving, the updated content appears below.",
+ "required": "Enter some content."
+ },
+ "removePreset": {
+ "title": "Remove model presets",
+ "description": "Delete unused model presets and view the disabled state of the preset used by the default model.",
+ "options": "This is the delete button used by ModelsSettings; the caller supplies disabled and the delete action. Provider management uses the ProvidersSettings dialog.",
+ "defaultModel": "Default model",
+ "codeAssistant": "Coding assistant",
+ "remove": "Delete {{name}}",
+ "primaryHint": "The preset used by the default model cannot be deleted.",
+ "count": "Preview presets: {{count}}"
+ },
+ "loading": {
+ "title": "Loading layouts",
+ "description": "Switch loading layouts for app, channel and skill catalogs, and view the shared status container.",
+ "options": "CatalogSkeleton's layout selects the layout. SkeletonStatus uses label for screen-reader status and marks decorative content as aria-hidden.",
+ "layout": "Catalog layout",
+ "catalog": "Loading preview catalog"
+ },
+ "sidebar": {
+ "title": "Settings navigation",
+ "description": "Select sections, handle a pending restart, and narrow the browser to view the mobile menu.",
+ "options": "activeSection and onSelectSection control selection; back, sign-out and restart actions are caller callbacks.",
+ "back": "Back to chat",
+ "logout": "Sign out",
+ "restart": "Preview restart action handled",
+ "hint": "Choose a settings section, or narrow the browser to see mobile navigation.",
+ "toggleRestart": "Toggle pending restart"
+ },
+ "providerSearch": {
+ "title": "Provider search",
+ "description": "Search providers grouped by OAuth, API key and local access, then select an entry or a custom provider.",
+ "options": "providers is the existing catalog. query is a controlled search value; onSelect and onCustom pass selection to the parent.",
+ "closed": "Search closed",
+ "custom": "Custom provider selected",
+ "hint": "Search providers, or use arrow keys to choose."
+ },
+ "requestParameters": {
+ "title": "Request parameters",
+ "description": "Edit headers, query parameters and request body; enter invalid JSON to see real validation feedback.",
+ "options": "fields selects visible entries; form holds JSON text. Headers and query parameters accept only string values; the request body accepts any JSON object values."
+ },
+ "requestAPI": {
+ "title": "Request API controls",
+ "description": "Select supported provider APIs, the default API, model overrides and fallback options.",
+ "options": "ProviderAPIControl keeps at least one API. ModelAPIControl allows null for automatic selection and shows available APIs based on provider capabilities.",
+ "providerAPI": "Provider API",
+ "modelOverride": "Model override"
+ },
+ "usage": {
+ "title": "Token usage",
+ "description": "Switch between data, empty records and unavailable states. Hover over bars for daily usage; open details for model trends.",
+ "options": "usage is a caller-supplied statistics record; timeZone defines date boundaries. The details dialog and charts only display supplied data.",
+ "state": "Usage state"
+ },
+ "overview": {
+ "title": "Settings overview",
+ "description": "View the current model, capability status and usage; select feature rows to try section navigation.",
+ "options": "settings supplies overview data; onSelectSection receives the selected settings section.",
+ "selected": "Selected section: {{section}}"
+ },
+ "web": {
+ "title": "Web search settings",
+ "description": "Switch between providers requiring no credentials, an API key or a server URL; adjust search options and try autosave.",
+ "options": "settings holds the current configuration; form holds edited values. The parent supplies save, credential visibility and provider switching actions.",
+ "unsaved": "Preview draft not saved"
+ },
+ "image": {
+ "title": "Image generation settings",
+ "description": "Toggle image generation, choose from a fixed model catalog, aspect ratios and image sizes, and expand advanced options to adjust the count.",
+ "options": "form is controlled configuration; dirty marks changes. The component reuses provider credentials; the parent implements saving."
+ },
+ "voice": {
+ "title": "Transcription settings",
+ "description": "Toggle transcription; edit the model, language, duration and upload size limits; try autosave.",
+ "options": "settings supplies provider information; the parent manages form and save callbacks."
+ },
+ "safety": {
+ "title": "Access settings",
+ "description": "Toggle local service access and default permissions; view setting rows, hints and autosave feedback.",
+ "options": "form supplies display values; onSave handles save requests. Runtime permission enforcement remains the gateway's responsibility."
+ },
+ "channelCatalog": {
+ "title": "Channel catalog and identity",
+ "description": "Switch running, starting, failed and uninstalled states; try the switch, installation entry and help menu.",
+ "options": "feature supplies installation and runtime states. The parent handles onAction and onSelect; identity, errors and help use the same channel data.",
+ "exampleChannel": "Example channel",
+ "state": "Channel state",
+ "error": "Example connection failed.",
+ "stopped": "Stopped",
+ "running": "Running",
+ "starting": "Starting",
+ "failed": "Failed",
+ "selected": "Channel settings selected",
+ "hint": "Use the switch or install button to see state changes."
+ },
+ "credentials": {
+ "title": "Channel credentials",
+ "description": "Enter credentials, reveal or hide secrets, apply connection presets, check required fields and copy a helper command.",
+ "options": "fields defines groups and controls; values and visibleSecrets are controlled. requirements defines credential combinations; preset and save callbacks update only this example.",
+ "botToken": "Bot token",
+ "tokenPlaceholder": "Example token",
+ "serverURL": "Server URL",
+ "replyMode": "Reply mode",
+ "mentions": "Mentions",
+ "allMessages": "All messages",
+ "allowFrom": "Allow from",
+ "local": "Local server",
+ "hosted": "Hosted server",
+ "required": "Enter a bot token.",
+ "checkSave": "Check and save",
+ "command": "Example command",
+ "applied": "Applied {{name}}",
+ "incomplete": "Complete the credentials.",
+ "saved": "Preview credentials saved.",
+ "hint": "Fill in credentials, toggle secret visibility, or apply a connection preset."
+ },
+ "channelValidation": {
+ "title": "Connection checks",
+ "description": "Switch between checking, success and failure; watch checks appear in sequence with an identity summary.",
+ "options": "validation supplies check records; validating controls loading. The component only displays the results.",
+ "expired": "The example token has expired.",
+ "result": "Check result"
+ },
+ "runAt": {
+ "title": "Scheduled time picker",
+ "description": "Enter a date and time, or open the calendar and choose with the mouse, arrow keys and page keys.",
+ "options": "value uses YYYY-MM-DDTHH:mm local time; onChange returns the edited value. Invalid input is shown on the existing form control."
+ },
+ "automationCalendar": {
+ "title": "Automation calendar",
+ "description": "Change months, switch schedules and history, and select successful or failed records to open results. Narrow containers automatically show an agenda.",
+ "options": "jobs and month determine calendar content. onInspect handles scheduled jobs; the caller supplies result display through renderRunDialog. The calendar does not read services.",
+ "providerError": "Example provider was unavailable.",
+ "state": "Schedule state",
+ "previousMonth": "Previous month",
+ "nextMonth": "Next month",
+ "planned": "Scheduled",
+ "recorded": "Run history",
+ "running": "Running",
+ "failed": "Failed",
+ "completed": "Completed",
+ "skipped": "Skipped",
+ "system": "System job",
+ "noEntries": "No schedules this month",
+ "more": "{{count}} more",
+ "selected": "Selected job: {{name}}",
+ "hint": "Select a run record to view its result, or choose a scheduled job."
+ },
+ "providers": {
+ "title": "Provider management",
+ "description": "View the actual provider management dialog and add-provider flow.",
+ "options": "Reuses ProvidersSettings from settings. The caller controls the catalog, forms and save callbacks; this preview changes local sample data and supports configuration, search, creation and cancellation.",
+ "invalidParameters": "Enter valid request parameter JSON; header and query parameter values must be strings.",
+ "saved": "Saved preview configuration for {{name}}",
+ "added": "Added {{name}}",
+ "signedIn": "Preview authorization set to signed in",
+ "signedOut": "Preview authorization set to signed out",
+ "builtInIcons": "Use built-in icons",
+ "brandIcons": "Use brand icons",
+ "configured": "Configured providers: {{count}}",
+ "providerAdded": "Provider added"
+ },
+ "runResult": {
+ "title": "Automation run results",
+ "description": "Open run results to compare Markdown replies, loading, retry, empty replies and missing history.",
+ "options": "result supplies loading state and the retrieved reply. The caller handles onRetry; this view does not read runtime state or request results.",
+ "state": "Run result",
+ "view": "View run result"
+ },
+ "chatBinding": {
+ "title": "Automation run chat",
+ "description": "Choose the run chat, edit instructions, confirm, switch back or cancel; compare busy jobs, loading errors and conflicts.",
+ "options": "data and job supply available chats and binding versions. The view manages the confirmation draft; the feature entry connects onSave, onSaved and onReload to data operations.",
+ "state": "Chat binding state",
+ "setChat": "Set run chat",
+ "saved": "The next run will take place in {{title}}",
+ "hint": "Choose a target chat, then confirm or edit the task instructions."
+ },
+ "about": {
+ "title": "About and version views",
+ "description": "Compare version-check states, commit links, update entries and the About page; buttons update the view with sample results.",
+ "options": "AboutSettingsView accepts composed version and support links. VersionCheckRowView displays checking/result and requests checks through onCheck. The feature entry owns actual checks and diagnostic link data.",
+ "error": "Could not get version information. Try again.",
+ "state": "Version state",
+ "selectedLink": "GitHub link selected"
+ },
+ "appearance": {
+ "title": "Appearance preferences",
+ "description": "Toggle appearance, activity display, file diffs and notification preferences; sample values appear below.",
+ "options": "The caller manages theme and preferences. onChangeBrowserNotifications delegates permission requests to the feature entry; preview callbacks only change sample switches."
+ },
+ "starInvitation": {
+ "title": "Support invitation",
+ "description": "Open the actual invitation dialog, compare saving and error states, and try postponing, the GitHub link and permanent dismissal.",
+ "options": "open, saving and error are display states. The existing StarPrompt entry owns claiming invitations and persisting preferences; the view only calls supplied actions.",
+ "state": "Invitation state",
+ "view": "View invitation",
+ "dismissed": "Never remind again selected in preview",
+ "starred": "GitHub link selected in preview"
+ }
+}
diff --git a/webui/src/dev/gallery/locales/controls/es.json b/webui/src/dev/gallery/locales/controls/es.json
new file mode 100644
index 000000000..4bf7fdddc
--- /dev/null
+++ b/webui/src/dev/gallery/locales/controls/es.json
@@ -0,0 +1,500 @@
+{
+ "common": {
+ "unavailable": "No disponible",
+ "selected": "Selección: {{value}}",
+ "savingPreview": "Guardando valores de vista previa…",
+ "savedPreview": "Valores de vista previa guardados",
+ "providerAction": "Se seleccionó la configuración del proveedor",
+ "reset": "Restablecer vista previa"
+ },
+ "button": {
+ "title": "Botones",
+ "description": "Un mismo botón con distintas apariencias y tamaños según sus opciones.",
+ "options": "variant cambia la apariencia; size cambia las dimensiones; disabled bloquea la interacción; onClick corresponde al código que lo utiliza.",
+ "variants": "Variantes — distintos estilos del mismo botón",
+ "sizes": "Tamaños",
+ "add": "Añadir ejemplo",
+ "clicks": "Clics en botones: {{count}}"
+ },
+ "input": {
+ "title": "Campos de texto",
+ "description": "Entrada de texto y la variante compartida para búsquedas.",
+ "options": "Usa Input para campos normales y SearchInput para búsquedas. Proporciona una etiqueta y explica las entradas no válidas.",
+ "name": "Nombre de ejemplo",
+ "projectName": "Nombre del proyecto",
+ "search": "Búsqueda",
+ "searchName": "Búsqueda de ejemplo",
+ "searchProjects": "Buscar proyectos",
+ "invalid": "No válido",
+ "invalidName": "Nombre no válido",
+ "required": "Introduce un nombre de proyecto.",
+ "disabledName": "Campo de nombre desactivado"
+ },
+ "textarea": {
+ "title": "Entrada multilínea",
+ "description": "Texto de varias líneas con el estilo de foco compartido.",
+ "options": "Acepta las propiedades nativas de textarea: value, onChange, rows y disabled.",
+ "notes": "Notas de ejemplo",
+ "disabledNotes": "Notas desactivadas",
+ "readOnly": "Vista previa de solo lectura"
+ },
+ "toggle": {
+ "title": "Interruptores",
+ "description": "Un interruptor controlado de encendido y apagado, compartido por ajustes, espacios de trabajo y canales.",
+ "options": "El código que lo utiliza gestiona checked y onChange. label proporciona el nombre accesible.",
+ "enable": "Activar ejemplo",
+ "unavailableOn": "Interruptor encendido no modificable",
+ "unavailableOff": "Interruptor apagado no modificable"
+ },
+ "select": {
+ "title": "Selectores",
+ "description": "Una selección única con navegación por teclado y opciones desactivadas.",
+ "options": "Combina Select, SelectTrigger, SelectValue, SelectContent y SelectItem. La raíz gestiona value/onValueChange.",
+ "fast": "Rápido",
+ "model": "Modelo de ejemplo",
+ "disabledModel": "Selector de modelo desactivado"
+ },
+ "segmented": {
+ "title": "Selección segmentada",
+ "description": "Un pequeño conjunto de opciones siempre visibles.",
+ "options": "value, options y onChange son controlados. mode=\"tabs\" añade navegación entre pestañas con las flechas.",
+ "day": "Día",
+ "week": "Semana",
+ "month": "Mes",
+ "period": "Periodo de ejemplo",
+ "selected": "Periodo seleccionado: {{value}}"
+ },
+ "combobox": {
+ "title": "Selección con búsqueda",
+ "description": "Opciones con búsqueda y navegación compartida por teclado y puntero.",
+ "options": "useComboboxNavigation proporciona propiedades de entrada, lista y opciones; el código que lo utiliza filtra los valores y gestiona la selección.",
+ "search": "Buscar opciones de ejemplo",
+ "placeholder": "Escribe o usa las flechas",
+ "choices": "Opciones de ejemplo",
+ "empty": "No hay opciones coincidentes",
+ "selected": "Opción seleccionada: {{value}}"
+ },
+ "chevron": {
+ "title": "Flecha de control",
+ "description": "La flecha compartida por los controles de selección.",
+ "options": "className permite ajustar la posición. El icono es decorativo; el control al que pertenece proporciona el nombre accesible."
+ },
+ "dialog": {
+ "title": "Diálogos",
+ "description": "Un editor modal con cambios en borrador, selección anidada y restauración del foco.",
+ "options": "El código que lo utiliza gestiona open/onOpenChange y el borrador y guardado. Incluye siempre DialogTitle y una descripción cuando sea útil.",
+ "open": "Abrir diálogo",
+ "edit": "Editar etiqueta de ejemplo",
+ "help": "Los cambios solo se aplican a esta vista previa.",
+ "label": "Etiqueta de ejemplo",
+ "save": "Guardar etiqueta",
+ "saved": "Etiqueta guardada: {{name}}"
+ },
+ "alert": {
+ "title": "Diálogos de confirmación",
+ "description": "Confirmación explícita con controles separados para cancelar y ejecutar.",
+ "options": "Combina título, descripción y pie; ejecuta la acción en el controlador de AlertDialogAction.",
+ "remove": "Eliminar ejemplo",
+ "confirmTitle": "¿Eliminar este ejemplo?",
+ "help": "Esto solo cambia el estado de la vista previa.",
+ "confirm": "Confirmar eliminación",
+ "removed": "Ejemplo eliminado.",
+ "available": "Ejemplo disponible."
+ },
+ "sheet": {
+ "title": "Paneles laterales",
+ "description": "Un panel modal unido a un borde del área visible.",
+ "options": "SheetContent admite side. Incluye SheetTitle y SheetDescription.",
+ "open": "Abrir panel lateral",
+ "panelTitle": "Panel lateral de ejemplo",
+ "help": "Controles auxiliares junto a la página actual.",
+ "notes": "Notas del panel",
+ "placeholder": "Prueba a editar aquí"
+ },
+ "popover": {
+ "title": "Paneles emergentes",
+ "description": "Una pequeña superficie interactiva anclada a su activador.",
+ "options": "Combina el activador y el contenido; open/onOpenChange pueden controlarse. El contenido sigue el portal del diálogo al que pertenece.",
+ "open": "Abrir panel emergente",
+ "note": "Nota rápida"
+ },
+ "menu": {
+ "title": "Menús desplegables",
+ "description": "Acciones, selección única, menús anidados y entradas desactivadas.",
+ "options": "Usa onSelect para acciones y un grupo de opciones excluyentes para una elección persistente.",
+ "view": "Opciones de vista",
+ "layout": "Diseño",
+ "comfortable": "Espacioso",
+ "compact": "Compacto",
+ "rename": "Renombrar",
+ "more": "Más acciones",
+ "duplicate": "Duplicar",
+ "none": "Ninguna",
+ "status": "Densidad: {{density}}. Acción: {{action}}."
+ },
+ "tooltip": {
+ "title": "Consejos y ayudas",
+ "description": "HoverHint combina las primitivas compartidas de ayuda; tooltip.tsx es su punto de importación público.",
+ "options": "Usa HoverHint para consejos normales. Mantén visibles los errores esenciales. El puntero y el foco del teclado siguen las reglas de temporización del producto.",
+ "primitive": "Ayuda básica",
+ "primitiveHelp": "Retardo compartido para el puntero y aparición inmediata con el foco del teclado.",
+ "hint": "Consejo al pasar el puntero",
+ "hintHelp": "Un consejo compuesto con el mismo comportamiento de foco y puntero."
+ },
+ "truncated": {
+ "title": "Ayuda para texto truncado",
+ "description": "Muestra una ayuda solo si el texto medido está truncado.",
+ "options": "Proporciona text y un ancho limitado. Añade tabIndex si el propio texto debe recibir el foco del teclado."
+ },
+ "disclosure": {
+ "title": "Contenido plegable",
+ "description": "Contenido desplegable que conserva el estado de sus hijos al plegarse.",
+ "options": "Disclosure gestiona la expansión; DisclosureContent acepta una propiedad open controlada para activadores personalizados.",
+ "show": "Mostrar opciones avanzadas",
+ "help": "Este borrador se conserva al cerrar y volver a abrir.",
+ "draft": "Borrador del contenido plegable"
+ },
+ "expandable": {
+ "title": "Texto desplegable",
+ "description": "Una vista previa con límite de líneas del mismo texto montado.",
+ "options": "El código que lo utiliza gestiona expanded. lines fija las líneas al plegar; proporciona un control accesible.",
+ "less": "Mostrar menos",
+ "more": "Mostrar más"
+ },
+ "imageViewport": {
+ "title": "Área de imagen",
+ "description": "Ajuste, zoom, desplazamiento y pellizco propios de cada imagen.",
+ "options": "Proporciona una className con límites y vuelve a montar si cambia la identidad de la imagen. Usa panWithArrows=false cuando una galería gestione las flechas."
+ },
+ "streaming": {
+ "title": "Etiquetas animadas",
+ "description": "Una animación de texto compartida para la reflexión activa y las etiquetas de herramientas.",
+ "options": "active controla la animación. Los hijos de tipo texto o número proporcionan la superposición de glifos; se respeta la reducción de movimiento.",
+ "animate": "Animar etiqueta",
+ "working": "Procesando el siguiente paso…"
+ },
+ "markdown": {
+ "title": "Respuestas Markdown",
+ "description": "El renderizador de producción en continuo, con tablas, código y fórmulas.",
+ "options": "children es texto Markdown. streaming controla el contenido incompleto; onOpenFilePreview corresponde a la pantalla.",
+ "state": "Estado de Markdown"
+ },
+ "code": {
+ "title": "Visualización de código",
+ "description": "Resaltado de sintaxis, números de línea, copia, salida ANSI y filas adaptadas al área visible.",
+ "options": "code y language proporcionan el contenido; showLineNumbers, wrapLongLines y chrome controlan la presentación. El resaltado del área visible exige números de línea y líneas sin ajuste.",
+ "format": "Formato del código"
+ },
+ "math": {
+ "title": "Fórmulas matemáticas",
+ "description": "El contenedor compartido que ajusta las fórmulas en bloque renderizadas por Markdown.",
+ "options": "Usa MarkdownText para código TeX. DisplayMath recibe nodos matemáticos ya renderizados y los escala al ancho disponible."
+ },
+ "message": {
+ "title": "Mensajes",
+ "description": "Mensajes del usuario y del asistente, con estados de reflexión y entrega.",
+ "options": "message es un UIMessage proyectado por el entorno de ejecución del chat. Los datos y las acciones de red quedan fuera del renderizador.",
+ "state": "Estado del mensaje"
+ },
+ "activity": {
+ "title": "Actividad del agente",
+ "description": "Primitivas de actividad combinadas en una secuencia en curso, terminada o fallida.",
+ "options": "Pasa texto, estado y expansión controlada. La pasarela ejecuta las herramientas; estos componentes renderizan su estado proyectado.",
+ "state": "Estado de actividad",
+ "working": "Procesando",
+ "details": "Detalles de actividad",
+ "collapse": "Plegar",
+ "readError": "No se pudo leer el archivo",
+ "read": "Leer código fuente"
+ },
+ "files": {
+ "title": "Cambios en archivos",
+ "description": "Referencias de archivos, recuentos de líneas modificadas y diferencias desplegables.",
+ "options": "edits contiene resúmenes para mostrar; displayMode elige summary/diff/collapsed_diff; la pantalla proporciona onOpenFilePreview.",
+ "error": "No se pudo aplicar el cambio de ejemplo.",
+ "state": "Estado del cambio de archivo",
+ "operation": "Operación de archivo",
+ "display": "Visualización de diferencias",
+ "selected": "Archivo seleccionado: {{path}}",
+ "hint": "Selecciona una referencia de archivo para probar su función de retorno."
+ },
+ "media": { "study": "Estudio de color {{count}}" },
+ "imageGallery": {
+ "title": "Miniaturas de imágenes",
+ "description": "Diseño de varias imágenes, selección de miniaturas e imágenes adicionales.",
+ "options": "images proporciona URL y nombres; size elige miniaturas grandes o compactas, align controla la alineación. Solo se muestran cuatro miniaturas; ImageLightbox incluye todas las imágenes que se pueden ver.",
+ "sixImages": "Seis imágenes",
+ "compact": "Miniaturas compactas",
+ "hint": "Selecciona una miniatura o +2 para ver las seis imágenes."
+ },
+ "imageLightbox": {
+ "title": "Visor a pantalla completa",
+ "description": "Visualización controlada a pantalla completa y navegación entre imágenes.",
+ "options": "index es null al cerrar. El código que lo utiliza gestiona index y los eventos de apertura; ImageLightbox combina ZoomableImage y restablece la vista al cambiar de imagen.",
+ "open": "Abrir visor a pantalla completa",
+ "hint": "Usa anterior/siguiente, ←/→ o Home/End; cierra con × o Escape."
+ },
+ "zoomableImage": {
+ "title": "Zoom de imagen",
+ "description": "Zoom de una imagen, desplazamiento limitado y gestos.",
+ "options": "src y alt proporcionan una imagen. Colócala en un contenedor posicionado con altura definida y vuelve a montarla al cambiar de imagen. Enfoca el área para usar +, − y 0.",
+ "hint": "Amplía con +/−, doble clic, Ctrl+rueda o pellizco. Arrastra o desplázate tras ampliar; pulsa el porcentaje o la tecla 0 para restablecer."
+ },
+ "attachment": {
+ "title": "Archivos adjuntos",
+ "description": "Vista previa de imágenes, reproducción de vídeo, descarga y adjuntos no disponibles.",
+ "options": "attachment.kind elige image, video o file. Las imágenes abren ImageLightbox, los vídeos usan controles nativos y los archivos enlaces de descarga. Sin URL, o si falla la carga de una imagen, se muestran tarjetas no disponibles.",
+ "image": "Imagen",
+ "video": "Vídeo reproducible",
+ "file": "Descargar archivo",
+ "unavailable": "Adjuntos no disponibles (sin URL)"
+ },
+ "fileReference": {
+ "title": "Referencias de archivos",
+ "description": "Una referencia de archivo cuya apertura gestiona el código que la utiliza.",
+ "options": "path proporciona la etiqueta; onOpen proporciona la acción. El componente no decide los permisos del espacio de trabajo.",
+ "select": "Selecciona la referencia de archivo."
+ },
+ "settingsComposition": {
+ "title": "Composición de ajustes",
+ "description": "Los componentes reales de filas, grupos y capacidades de ajustes, combinados con controles compartidos.",
+ "options": "El controlador de ajustes que los contiene gestiona valores y persistencia. Una función de retorno de la galería solo actualiza el estado local de la vista previa.",
+ "preferences": "Preferencias de ejemplo",
+ "keepDrafts": "Conservar borradores",
+ "switchHint": "Una fila de ajuste compartida con un interruptor controlado.",
+ "projectLabel": "Etiqueta del proyecto",
+ "projectName": "Etiqueta del proyecto en ajustes",
+ "capability": "Capacidad de ejemplo",
+ "notes": "Notas",
+ "capabilityNotes": "Notas de la capacidad",
+ "localOnly": "Solo vista previa local"
+ },
+ "modelPickers": {
+ "title": "Selección de modelos",
+ "description": "Elige un proveedor, busca o introduce un ID de modelo y ajusta el esfuerzo de razonamiento.",
+ "options": "El código que lo utiliza proporciona valores y acciones de ProviderPicker. models de ModelIdPicker puede aportar un catálogo fijo; savedValues de ReasoningEffortPicker proporciona las opciones existentes.",
+ "chooseProvider": "Elegir proveedor",
+ "configure": "Configurar {{provider}}"
+ },
+ "providerIcons": {
+ "title": "Iconos de proveedores",
+ "description": "Compara los tamaños normal, compacto y de relleno, y el estado sin configurar del selector.",
+ "options": "provider selecciona un icono existente; compact y fill controlan el tamaño. showBrandLogos=false usa iconos integrados.",
+ "size": "Tamaño del icono"
+ },
+ "timezone": {
+ "title": "Selección de zona horaria",
+ "description": "Busca por nombre de zona, nombre en chino o desfase UTC y consulta el mismo instante en hora local.",
+ "options": "value es una zona IANA; onChange actualiza el valor del código que lo utiliza. El componente ofrece búsqueda y navegación por teclado."
+ },
+ "textEditor": {
+ "title": "Editor de texto y consejos",
+ "description": "Abre el editor para modificar, guardar o cancelar. Vacía el contenido y guarda para ver el error.",
+ "options": "SettingsTextEditor se cierra tras un onSave correcto y muestra errores si falla; SettingsHint se abre al pasar el puntero, enfocar o hacer clic.",
+ "state": "Estado de edición",
+ "hint": "Abre el editor para modificar, guardar o cancelar. Vacía el contenido para ver el estado de error.",
+ "instructions": "Instrucciones de ejemplo",
+ "edit": "Editar instrucciones de ejemplo",
+ "help": "Tras guardar, el contenido actualizado aparece debajo.",
+ "required": "Introduce contenido."
+ },
+ "removePreset": {
+ "title": "Eliminar preajustes",
+ "description": "Elimina preajustes de modelo sin usar y observa el estado desactivado del que usa el modelo predeterminado.",
+ "options": "Es el botón de eliminación de ModelsSettings; el código que lo utiliza proporciona disabled y la acción. La gestión de proveedores usa el diálogo ProvidersSettings.",
+ "defaultModel": "Modelo predeterminado",
+ "codeAssistant": "Asistente de programación",
+ "remove": "Eliminar {{name}}",
+ "primaryHint": "No se puede eliminar el preajuste usado por el modelo predeterminado.",
+ "count": "Preajustes de vista previa: {{count}}"
+ },
+ "loading": {
+ "title": "Diseños de carga",
+ "description": "Cambia los diseños de carga de catálogos de apps, canales y habilidades, y observa el contenedor de estado compartido.",
+ "options": "layout de CatalogSkeleton elige el diseño. SkeletonStatus usa label para el estado del lector de pantalla y marca el contenido decorativo con aria-hidden.",
+ "layout": "Diseño del catálogo",
+ "catalog": "Cargando catálogo de vista previa"
+ },
+ "sidebar": {
+ "title": "Navegación de ajustes",
+ "description": "Selecciona secciones, gestiona un reinicio pendiente y estrecha el navegador para ver el menú móvil.",
+ "options": "activeSection y onSelectSection controlan la selección; volver, cerrar sesión y reiniciar son funciones del código que lo utiliza.",
+ "back": "Volver al chat",
+ "logout": "Cerrar sesión",
+ "restart": "Se procesó el reinicio de la vista previa",
+ "hint": "Elige una sección de ajustes o estrecha el navegador para ver la navegación móvil.",
+ "toggleRestart": "Alternar reinicio pendiente"
+ },
+ "providerSearch": {
+ "title": "Búsqueda de proveedores",
+ "description": "Busca proveedores agrupados por OAuth, clave API y acceso local; elige una entrada o un proveedor personalizado.",
+ "options": "providers es el catálogo existente. query es una búsqueda controlada; onSelect y onCustom pasan la selección al padre.",
+ "closed": "Búsqueda cerrada",
+ "custom": "Proveedor personalizado seleccionado",
+ "hint": "Busca proveedores o usa las flechas para elegir."
+ },
+ "requestParameters": {
+ "title": "Parámetros de solicitud",
+ "description": "Edita cabeceras, parámetros de consulta y cuerpo; introduce JSON no válido para ver la validación real.",
+ "options": "fields elige las entradas visibles; form guarda texto JSON. Cabeceras y parámetros de consulta solo aceptan cadenas; el cuerpo acepta cualquier valor de objeto JSON."
+ },
+ "requestAPI": {
+ "title": "API de solicitudes",
+ "description": "Selecciona las API compatibles, la predeterminada, las anulaciones por modelo y las opciones de respaldo.",
+ "options": "ProviderAPIControl conserva al menos una API. ModelAPIControl permite null para selección automática y muestra API disponibles según las capacidades del proveedor.",
+ "providerAPI": "API del proveedor",
+ "modelOverride": "Anulación por modelo"
+ },
+ "usage": {
+ "title": "Uso de tokens",
+ "description": "Alterna entre datos, registros vacíos y no disponible. Pasa el puntero por las barras para el uso diario y abre los detalles para tendencias por modelo.",
+ "options": "usage es un registro estadístico proporcionado por el código que lo utiliza; timeZone define los límites de fecha. El diálogo de detalles y los gráficos solo muestran los datos recibidos.",
+ "state": "Estado de uso"
+ },
+ "overview": {
+ "title": "Resumen de ajustes",
+ "description": "Consulta el modelo actual, las capacidades y el uso; selecciona filas de funciones para probar la navegación por secciones.",
+ "options": "settings proporciona los datos del resumen; onSelectSection recibe la sección de ajustes seleccionada.",
+ "selected": "Sección seleccionada: {{section}}"
+ },
+ "web": {
+ "title": "Ajustes de búsqueda web",
+ "description": "Alterna entre proveedores sin credenciales, con clave API o URL de servidor; ajusta la búsqueda y prueba el guardado automático.",
+ "options": "settings guarda la configuración actual y form los valores editados. El padre proporciona el guardado, la visibilidad de credenciales y el cambio de proveedor.",
+ "unsaved": "Borrador de vista previa sin guardar"
+ },
+ "image": {
+ "title": "Generación de imágenes",
+ "description": "Activa la generación, elige un modelo del catálogo fijo, la relación de aspecto y el tamaño; ajusta la cantidad en opciones avanzadas.",
+ "options": "form es una configuración controlada y dirty marca cambios. El componente reutiliza credenciales del proveedor; el padre implementa el guardado."
+ },
+ "voice": {
+ "title": "Ajustes de transcripción",
+ "description": "Activa la transcripción, edita modelo, idioma y límites de duración y tamaño de carga; prueba el guardado automático.",
+ "options": "settings proporciona información del proveedor; el padre gestiona form y las funciones de guardado."
+ },
+ "safety": {
+ "title": "Ajustes de acceso",
+ "description": "Alterna el acceso a servicios locales y los permisos predeterminados; observa filas, consejos y avisos de guardado automático.",
+ "options": "form proporciona los valores visibles; onSave procesa las solicitudes de guardado. La pasarela sigue aplicando los permisos en ejecución."
+ },
+ "channelCatalog": {
+ "title": "Catálogo e identidad de canales",
+ "description": "Alterna los estados en ejecución, iniciando, fallido y sin instalar; prueba el interruptor, la instalación y la ayuda.",
+ "options": "feature proporciona estados de instalación y ejecución. El padre gestiona onAction y onSelect; identidad, errores y ayuda usan los mismos datos del canal.",
+ "exampleChannel": "Canal de ejemplo",
+ "state": "Estado del canal",
+ "error": "Falló la conexión de ejemplo.",
+ "stopped": "Detenido",
+ "running": "En ejecución",
+ "starting": "Iniciando",
+ "failed": "Fallido",
+ "selected": "Ajustes del canal seleccionados",
+ "hint": "Usa el interruptor o el botón de instalación para ver los cambios de estado."
+ },
+ "credentials": {
+ "title": "Credenciales del canal",
+ "description": "Introduce credenciales, muestra u oculta secretos, aplica preajustes de conexión, verifica campos obligatorios y copia un comando auxiliar.",
+ "options": "fields define grupos y controles; values y visibleSecrets son controlados. requirements define combinaciones de credenciales; los preajustes y el guardado solo actualizan este ejemplo.",
+ "botToken": "Token del bot",
+ "tokenPlaceholder": "Token de ejemplo",
+ "serverURL": "URL del servidor",
+ "replyMode": "Modo de respuesta",
+ "mentions": "Menciones",
+ "allMessages": "Todos los mensajes",
+ "allowFrom": "Remitentes permitidos",
+ "local": "Servidor local",
+ "hosted": "Servidor alojado",
+ "required": "Introduce un token de bot.",
+ "checkSave": "Verificar y guardar",
+ "command": "Comando de ejemplo",
+ "applied": "Se aplicó {{name}}",
+ "incomplete": "Completa las credenciales.",
+ "saved": "Credenciales de vista previa guardadas.",
+ "hint": "Completa las credenciales, alterna la visibilidad de secretos o aplica un preajuste de conexión."
+ },
+ "channelValidation": {
+ "title": "Comprobación de conexión",
+ "description": "Alterna comprobación, éxito y fallo; observa las comprobaciones aparecer en secuencia con un resumen de identidad.",
+ "options": "validation proporciona los registros y validating controla la carga. El componente solo muestra los resultados.",
+ "expired": "El token de ejemplo ha caducado.",
+ "result": "Resultado de comprobación"
+ },
+ "runAt": {
+ "title": "Selección de hora programada",
+ "description": "Introduce fecha y hora o abre el calendario y elige con el ratón, las flechas y las teclas de página.",
+ "options": "value usa la hora local YYYY-MM-DDTHH:mm; onChange devuelve el valor editado. Los datos no válidos se indican en el control existente."
+ },
+ "automationCalendar": {
+ "title": "Calendario de automatizaciones",
+ "description": "Cambia de mes, alterna planes e historial y abre resultados de ejecuciones correctas o fallidas. Los contenedores estrechos muestran una agenda.",
+ "options": "jobs y month definen el contenido. onInspect gestiona tareas programadas; el código que lo utiliza aporta los resultados mediante renderRunDialog. El calendario no consulta servicios.",
+ "providerError": "El proveedor de ejemplo no estaba disponible.",
+ "state": "Estado de programación",
+ "previousMonth": "Mes anterior",
+ "nextMonth": "Mes siguiente",
+ "planned": "Programado",
+ "recorded": "Historial de ejecución",
+ "running": "En ejecución",
+ "failed": "Fallido",
+ "completed": "Completado",
+ "skipped": "Omitido",
+ "system": "Tarea del sistema",
+ "noEntries": "No hay tareas programadas este mes",
+ "more": "{{count}} más",
+ "selected": "Tarea seleccionada: {{name}}",
+ "hint": "Selecciona una ejecución para ver su resultado o elige una tarea programada."
+ },
+ "providers": {
+ "title": "Gestión de proveedores",
+ "description": "Consulta el diálogo real de gestión de proveedores y el proceso para añadirlos.",
+ "options": "Reutiliza ProvidersSettings de los ajustes. El código que lo utiliza controla catálogo, formularios y guardado; esta vista previa modifica datos locales de ejemplo y permite configurar, buscar, crear y cancelar.",
+ "invalidParameters": "Introduce parámetros JSON válidos; los valores de cabeceras y parámetros de consulta deben ser cadenas.",
+ "saved": "Configuración de vista previa guardada para {{name}}",
+ "added": "Se añadió {{name}}",
+ "signedIn": "Autorización de vista previa configurada con sesión iniciada",
+ "signedOut": "Autorización de vista previa configurada sin sesión",
+ "builtInIcons": "Usar iconos integrados",
+ "brandIcons": "Usar iconos de marca",
+ "configured": "Proveedores configurados: {{count}}",
+ "providerAdded": "Proveedor añadido"
+ },
+ "runResult": {
+ "title": "Resultados de automatizaciones",
+ "description": "Abre resultados para comparar respuestas Markdown, carga, reintento, respuestas vacías e historial ausente.",
+ "options": "result proporciona el estado de carga y la respuesta obtenida. El código que lo utiliza gestiona onRetry; esta vista no lee el entorno de ejecución ni solicita resultados.",
+ "state": "Resultado de ejecución",
+ "view": "Ver resultado de ejecución"
+ },
+ "chatBinding": {
+ "title": "Chat de ejecución",
+ "description": "Elige el chat, edita instrucciones, confirma, vuelve al anterior o cancela; compara tareas ocupadas, errores de carga y conflictos.",
+ "options": "data y job proporcionan chats disponibles y versiones de vinculación. La vista gestiona el borrador de confirmación; el punto de entrada conecta onSave, onSaved y onReload con las operaciones de datos.",
+ "state": "Estado del vínculo de chat",
+ "setChat": "Definir chat de ejecución",
+ "saved": "La próxima ejecución tendrá lugar en {{title}}",
+ "hint": "Elige un chat de destino y confirma o edita las instrucciones de la tarea."
+ },
+ "about": {
+ "title": "Acerca de y versión",
+ "description": "Compara estados de versión, enlaces de commits, actualizaciones y la página Acerca de; los botones muestran resultados de ejemplo.",
+ "options": "AboutSettingsView acepta una composición de enlaces de versión y soporte. VersionCheckRowView muestra checking/result y solicita comprobaciones con onCheck. El punto de entrada gestiona las comprobaciones reales y los enlaces de diagnóstico.",
+ "error": "No se pudo obtener la versión. Inténtalo de nuevo.",
+ "state": "Estado de versión",
+ "selectedLink": "Enlace de GitHub seleccionado"
+ },
+ "appearance": {
+ "title": "Preferencias de apariencia",
+ "description": "Cambia la apariencia, la actividad, las diferencias y las notificaciones; los valores de ejemplo aparecen debajo.",
+ "options": "El código que lo utiliza gestiona tema y preferencias. onChangeBrowserNotifications delega los permisos al punto de entrada; las funciones de vista previa solo cambian interruptores de ejemplo."
+ },
+ "starInvitation": {
+ "title": "Invitación de apoyo",
+ "description": "Abre la invitación real, compara guardado y errores y prueba posponer, el enlace de GitHub y no volver a recordar.",
+ "options": "open, saving y error son estados visuales. El punto de entrada StarPrompt existente gestiona la recepción de invitaciones y la persistencia de preferencias; la vista solo llama a las acciones recibidas.",
+ "state": "Estado de invitación",
+ "view": "Ver invitación",
+ "dismissed": "Se eligió no volver a recordar en la vista previa",
+ "starred": "Se eligió el enlace de GitHub en la vista previa"
+ }
+}
diff --git a/webui/src/dev/gallery/locales/controls/fr.json b/webui/src/dev/gallery/locales/controls/fr.json
new file mode 100644
index 000000000..29fb6b8c7
--- /dev/null
+++ b/webui/src/dev/gallery/locales/controls/fr.json
@@ -0,0 +1,500 @@
+{
+ "common": {
+ "unavailable": "Indisponible",
+ "selected": "Sélection : {{value}}",
+ "savingPreview": "Enregistrement des valeurs d’aperçu…",
+ "savedPreview": "Valeurs d’aperçu enregistrées",
+ "providerAction": "Action de configuration du fournisseur sélectionnée",
+ "reset": "Réinitialiser l’aperçu"
+ },
+ "button": {
+ "title": "Boutons",
+ "description": "Un même bouton, plusieurs apparences et tailles, selon ses options.",
+ "options": "variant change l’apparence ; size définit les dimensions ; disabled bloque les interactions ; onClick relève de l’appelant.",
+ "variants": "Variantes — différents styles du même bouton",
+ "sizes": "Tailles",
+ "add": "Ajouter un exemple",
+ "clicks": "Clics sur les boutons : {{count}}"
+ },
+ "input": {
+ "title": "Champs de saisie",
+ "description": "Saisie de texte et variante partagée pour la recherche.",
+ "options": "Utilisez Input pour les champs ordinaires et SearchInput pour la recherche. Fournissez un libellé et expliquez les saisies invalides.",
+ "name": "Nom d’exemple",
+ "projectName": "Nom du projet",
+ "search": "Recherche",
+ "searchName": "Recherche d’exemple",
+ "searchProjects": "Rechercher des projets",
+ "invalid": "Invalide",
+ "invalidName": "Nom invalide",
+ "required": "Saisissez un nom de projet.",
+ "disabledName": "Champ de nom désactivé"
+ },
+ "textarea": {
+ "title": "Saisie multiligne",
+ "description": "Texte multiligne avec le style de focus partagé.",
+ "options": "Accepte les propriétés natives de textarea : value, onChange, rows et disabled.",
+ "notes": "Notes d’exemple",
+ "disabledNotes": "Notes désactivées",
+ "readOnly": "Aperçu en lecture seule"
+ },
+ "toggle": {
+ "title": "Interrupteurs",
+ "description": "Un interrupteur contrôlé, partagé par les paramètres, espaces de travail et canaux.",
+ "options": "L’appelant gère checked et onChange. label fournit le nom accessible.",
+ "enable": "Activer l’exemple",
+ "unavailableOn": "Interrupteur activé non modifiable",
+ "unavailableOff": "Interrupteur désactivé non modifiable"
+ },
+ "select": {
+ "title": "Sélecteurs",
+ "description": "Un choix unique avec navigation au clavier et options désactivées.",
+ "options": "Composez Select, SelectTrigger, SelectValue, SelectContent et SelectItem. La racine gère value/onValueChange.",
+ "fast": "Rapide",
+ "model": "Modèle d’exemple",
+ "disabledModel": "Sélecteur de modèle désactivé"
+ },
+ "segmented": {
+ "title": "Choix segmentés",
+ "description": "Un petit ensemble de choix toujours visibles.",
+ "options": "value, options et onChange sont contrôlés. mode=\"tabs\" ajoute la navigation entre onglets avec les flèches.",
+ "day": "Jour",
+ "week": "Semaine",
+ "month": "Mois",
+ "period": "Période d’exemple",
+ "selected": "Période sélectionnée : {{value}}"
+ },
+ "combobox": {
+ "title": "Choix avec recherche",
+ "description": "Des options recherchables avec navigation partagée au clavier et au pointeur.",
+ "options": "useComboboxNavigation fournit les propriétés du champ, de la liste et des options ; l’appelant filtre les valeurs et gère la sélection.",
+ "search": "Rechercher dans les options d’exemple",
+ "placeholder": "Saisissez du texte ou utilisez les flèches",
+ "choices": "Options d’exemple",
+ "empty": "Aucune option correspondante",
+ "selected": "Option sélectionnée : {{value}}"
+ },
+ "chevron": {
+ "title": "Chevron de contrôle",
+ "description": "Le chevron partagé par les contrôles de sélection.",
+ "options": "className permet d’ajuster la position. L’icône est décorative ; le contrôle qui la contient fournit son nom accessible."
+ },
+ "dialog": {
+ "title": "Boîtes de dialogue",
+ "description": "Un éditeur modal avec brouillon, sélection imbriquée et restauration du focus.",
+ "options": "L’appelant gère open/onOpenChange ainsi que le brouillon et l’enregistrement. Fournissez toujours DialogTitle et une description si nécessaire.",
+ "open": "Ouvrir la boîte de dialogue",
+ "edit": "Modifier le libellé d’exemple",
+ "help": "Les modifications s’appliquent uniquement à cet aperçu.",
+ "label": "Libellé d’exemple",
+ "save": "Enregistrer le libellé",
+ "saved": "Libellé enregistré : {{name}}"
+ },
+ "alert": {
+ "title": "Confirmations",
+ "description": "Une confirmation explicite avec des commandes distinctes pour annuler et agir.",
+ "options": "Composez un titre, une description et un pied de page ; exécutez l’action dans le gestionnaire d’AlertDialogAction.",
+ "remove": "Retirer l’exemple",
+ "confirmTitle": "Retirer cet exemple ?",
+ "help": "Seul l’état de l’aperçu sera modifié.",
+ "confirm": "Confirmer le retrait",
+ "removed": "Exemple retiré.",
+ "available": "Exemple disponible."
+ },
+ "sheet": {
+ "title": "Panneaux latéraux",
+ "description": "Un panneau modal attaché à un bord de la zone d’affichage.",
+ "options": "SheetContent prend en charge side. Incluez SheetTitle et SheetDescription.",
+ "open": "Ouvrir le panneau",
+ "panelTitle": "Panneau latéral d’exemple",
+ "help": "Des commandes complémentaires à côté de la page actuelle.",
+ "notes": "Notes du panneau",
+ "placeholder": "Essayez de modifier ici"
+ },
+ "popover": {
+ "title": "Panneaux contextuels",
+ "description": "Une petite surface interactive ancrée à son déclencheur.",
+ "options": "Composez le déclencheur et le contenu ; open/onOpenChange peuvent être contrôlés. Le contenu utilise le portail de sa boîte de dialogue.",
+ "open": "Ouvrir le panneau contextuel",
+ "note": "Note rapide"
+ },
+ "menu": {
+ "title": "Menus déroulants",
+ "description": "Actions, choix exclusifs, sous-menus et entrées désactivées.",
+ "options": "Utilisez onSelect pour les actions et un groupe radio pour un choix persistant.",
+ "view": "Options d’affichage",
+ "layout": "Disposition",
+ "comfortable": "Aérée",
+ "compact": "Compacte",
+ "rename": "Renommer",
+ "more": "Autres actions",
+ "duplicate": "Dupliquer",
+ "none": "Aucune",
+ "status": "Densité : {{density}}. Action : {{action}}."
+ },
+ "tooltip": {
+ "title": "Infobulles et conseils",
+ "description": "HoverHint compose les primitives d’infobulle partagées ; tooltip.tsx est leur point d’import public.",
+ "options": "Utilisez HoverHint pour les conseils ordinaires. Gardez les erreurs essentielles visibles. Le survol et le focus clavier suivent les règles de temporisation du produit.",
+ "primitive": "Infobulle de base",
+ "primitiveHelp": "Délai partagé au pointeur et affichage immédiat au focus clavier.",
+ "hint": "Conseil au survol",
+ "hintHelp": "Un conseil composé avec le même comportement au focus et au pointeur."
+ },
+ "truncated": {
+ "title": "Texte tronqué",
+ "description": "Affiche un conseil uniquement si le texte mesuré est tronqué.",
+ "options": "Fournissez text et une largeur limitée. Ajoutez tabIndex si le texte lui-même doit recevoir le focus clavier."
+ },
+ "disclosure": {
+ "title": "Contenu repliable",
+ "description": "Un contenu dépliable qui conserve l’état des enfants une fois replié.",
+ "options": "Disclosure gère l’ouverture ; DisclosureContent accepte une propriété open contrôlée pour les déclencheurs personnalisés.",
+ "show": "Afficher les options avancées",
+ "help": "Ce brouillon est conservé après fermeture et réouverture.",
+ "draft": "Brouillon du contenu repliable"
+ },
+ "expandable": {
+ "title": "Texte dépliable",
+ "description": "Un aperçu limité en lignes du même texte maintenu dans le DOM.",
+ "options": "L’appelant gère expanded. lines définit le nombre de lignes repliées ; fournissez une commande accessible.",
+ "less": "Afficher moins",
+ "more": "Afficher plus"
+ },
+ "imageViewport": {
+ "title": "Zone d’image",
+ "description": "Commandes d’ajustement, zoom, déplacement et pincement propres à l’image.",
+ "options": "Fournissez une className délimitant la zone et remontez le composant si l’identité de l’image change. Définissez panWithArrows=false si une galerie gère les flèches."
+ },
+ "streaming": {
+ "title": "Libellés animés",
+ "description": "Une animation de texte partagée pour la réflexion et les libellés d’outils actifs.",
+ "options": "active contrôle l’animation. Les enfants de type chaîne ou nombre fournissent la superposition des glyphes ; les préférences de réduction des animations sont respectées.",
+ "animate": "Animer le libellé",
+ "working": "Traitement de l’étape suivante…"
+ },
+ "markdown": {
+ "title": "Réponses Markdown",
+ "description": "Le moteur de rendu en continu de production, avec tableaux, code et mathématiques.",
+ "options": "children est du texte Markdown. streaming contrôle le contenu incomplet ; onOpenFilePreview relève de l’écran.",
+ "state": "État du Markdown"
+ },
+ "code": {
+ "title": "Affichage de code",
+ "description": "Coloration syntaxique, numéros de ligne, copie, sortie ANSI et lignes adaptées à la zone visible.",
+ "options": "code et language fournissent le contenu ; showLineNumbers, wrapLongLines et chrome contrôlent la présentation. La coloration de la zone visible exige des numéros de ligne sans retour automatique.",
+ "format": "Format du code"
+ },
+ "math": {
+ "title": "Formules mathématiques",
+ "description": "L’enveloppe partagée qui adapte les formules en bloc rendues par Markdown.",
+ "options": "Utilisez MarkdownText pour le code TeX. DisplayMath accepte des nœuds mathématiques déjà rendus et les adapte à la largeur disponible."
+ },
+ "message": {
+ "title": "Messages",
+ "description": "Messages de l’utilisateur et de l’assistant, avec les états de réflexion et d’envoi.",
+ "options": "message est un UIMessage projeté par le runtime de chat. Les données et actions réseau restent hors du moteur de rendu.",
+ "state": "État du message"
+ },
+ "activity": {
+ "title": "Activité de l’agent",
+ "description": "Des primitives d’activité composées en une séquence en cours, terminée ou en échec.",
+ "options": "Transmettez le texte, l’état et l’ouverture contrôlée. La passerelle exécute les outils ; ces composants affichent la projection de leur état.",
+ "state": "État de l’activité",
+ "working": "Traitement en cours",
+ "details": "Détails de l’activité",
+ "collapse": "Replier",
+ "readError": "Lecture du fichier impossible",
+ "read": "Lire le code source"
+ },
+ "files": {
+ "title": "Modifications de fichiers",
+ "description": "Références de fichiers, nombre de lignes modifiées et différences dépliables.",
+ "options": "edits contient les résumés d’affichage ; displayMode choisit summary/diff/collapsed_diff ; l’écran fournit onOpenFilePreview.",
+ "error": "La modification d’exemple n’a pas pu être appliquée.",
+ "state": "État de la modification",
+ "operation": "Opération sur le fichier",
+ "display": "Affichage des différences",
+ "selected": "Fichier sélectionné : {{path}}",
+ "hint": "Sélectionnez une référence de fichier pour essayer son rappel."
+ },
+ "media": { "study": "Étude de couleur {{count}}" },
+ "imageGallery": {
+ "title": "Miniatures d’images",
+ "description": "Disposition multi-image, sélection des miniatures et images supplémentaires.",
+ "options": "images fournit les URL et les noms ; size choisit des miniatures grandes ou compactes, align définit l’alignement. Seules quatre miniatures apparaissent ; l’ImageLightbox composée inclut toutes les images consultables.",
+ "sixImages": "Six images",
+ "compact": "Miniatures compactes",
+ "hint": "Sélectionnez une miniature ou +2 pour voir les six images."
+ },
+ "imageLightbox": {
+ "title": "Visionneuse plein écran",
+ "description": "Affichage plein écran contrôlé et navigation entre images.",
+ "options": "index vaut null à la fermeture. L’appelant gère index et les rappels d’ouverture ; ImageLightbox compose ZoomableImage et réinitialise la vue au changement d’image.",
+ "open": "Ouvrir la visionneuse plein écran",
+ "hint": "Utilisez précédent/suivant, ←/→ ou Home/End ; fermez avec × ou Échap."
+ },
+ "zoomableImage": {
+ "title": "Zoom d’image",
+ "description": "Zoom sur une image, déplacement limité et gestes.",
+ "options": "src et alt fournissent une image. Placez-la dans un conteneur positionné de hauteur définie ; remontez-la au changement d’image. Placez le focus dans la zone pour les touches +, − et 0.",
+ "hint": "Zoomez avec +/−, un double-clic, Ctrl+molette ou un pincement. Faites glisser ou défiler pour déplacer l’image agrandie ; cliquez sur le pourcentage ou appuyez sur 0 pour réinitialiser."
+ },
+ "attachment": {
+ "title": "Pièces jointes",
+ "description": "Aperçu d’images, lecture vidéo, téléchargement et pièces jointes indisponibles.",
+ "options": "attachment.kind choisit image, video ou file. Les images ouvrent ImageLightbox, les vidéos utilisent les commandes natives et les fichiers des liens de téléchargement. Sans URL, ou si une image échoue à charger, la vignette est indisponible.",
+ "image": "Image",
+ "video": "Vidéo lisible",
+ "file": "Télécharger un fichier",
+ "unavailable": "Pièces jointes indisponibles (sans URL)"
+ },
+ "fileReference": {
+ "title": "Références de fichiers",
+ "description": "Une référence de fichier dont l’ouverture relève de l’appelant.",
+ "options": "path fournit le libellé ; onOpen fournit l’action. Le composant ne décide pas des permissions de l’espace de travail.",
+ "select": "Sélectionnez la référence de fichier."
+ },
+ "settingsComposition": {
+ "title": "Composition des paramètres",
+ "description": "Les véritables lignes, groupes et capacités des paramètres composés avec les contrôles partagés.",
+ "options": "Le contrôleur des paramètres englobant gère les valeurs et leur persistance. Un rappel de la galerie ne modifie que l’état local de l’aperçu.",
+ "preferences": "Préférences d’exemple",
+ "keepDrafts": "Conserver les brouillons",
+ "switchHint": "Une ligne de paramètre partagée avec un interrupteur contrôlé.",
+ "projectLabel": "Libellé du projet",
+ "projectName": "Libellé du projet dans les paramètres",
+ "capability": "Capacité d’exemple",
+ "notes": "Notes",
+ "capabilityNotes": "Notes de la capacité",
+ "localOnly": "Aperçu local uniquement"
+ },
+ "modelPickers": {
+ "title": "Sélection des modèles",
+ "description": "Choisissez un fournisseur, recherchez ou saisissez un ID de modèle, puis ajustez l’effort de raisonnement.",
+ "options": "L’appelant fournit les valeurs et actions de ProviderPicker. models de ModelIdPicker peut fournir un catalogue fixe ; savedValues de ReasoningEffortPicker fournit les options existantes.",
+ "chooseProvider": "Choisir un fournisseur",
+ "configure": "Configurer {{provider}}"
+ },
+ "providerIcons": {
+ "title": "Icônes des fournisseurs",
+ "description": "Comparez les tailles normale, compacte et remplie, ainsi que l’état non configuré du sélecteur.",
+ "options": "provider choisit une icône existante ; compact et fill contrôlent la taille. showBrandLogos=false utilise les icônes intégrées.",
+ "size": "Taille des icônes"
+ },
+ "timezone": {
+ "title": "Sélection du fuseau horaire",
+ "description": "Recherchez par nom de fuseau, nom chinois ou décalage UTC, puis affichez le même instant en heure locale.",
+ "options": "value est un fuseau IANA ; onChange met à jour la valeur de l’appelant. Le composant fournit la recherche et la navigation au clavier."
+ },
+ "textEditor": {
+ "title": "Éditeur de texte et conseils",
+ "description": "Ouvrez l’éditeur pour modifier, enregistrer ou annuler. Videz le contenu et enregistrez pour voir l’erreur.",
+ "options": "SettingsTextEditor se ferme après la réussite d’onSave et affiche une erreur en cas d’échec ; SettingsHint s’ouvre au survol, au focus ou au clic.",
+ "state": "État d’édition",
+ "hint": "Ouvrez l’éditeur pour modifier, enregistrer ou annuler. Videz le contenu pour voir l’état d’erreur.",
+ "instructions": "Consignes d’exemple",
+ "edit": "Modifier les consignes d’exemple",
+ "help": "Le contenu modifié apparaît ci-dessous après l’enregistrement.",
+ "required": "Saisissez du contenu."
+ },
+ "removePreset": {
+ "title": "Supprimer des préréglages",
+ "description": "Supprimez les préréglages inutilisés et observez le bouton désactivé pour celui du modèle par défaut.",
+ "options": "Il s’agit du bouton de suppression de ModelsSettings ; l’appelant fournit disabled et l’action de suppression. La gestion des fournisseurs utilise la boîte ProvidersSettings.",
+ "defaultModel": "Modèle par défaut",
+ "codeAssistant": "Assistant de programmation",
+ "remove": "Supprimer {{name}}",
+ "primaryHint": "Le préréglage utilisé par le modèle par défaut ne peut pas être supprimé.",
+ "count": "Préréglages d’aperçu : {{count}}"
+ },
+ "loading": {
+ "title": "Écrans de chargement",
+ "description": "Changez les dispositions de chargement des catalogues d’apps, canaux et compétences, et observez le conteneur d’état partagé.",
+ "options": "layout de CatalogSkeleton choisit la disposition. SkeletonStatus utilise label pour les lecteurs d’écran et marque le contenu décoratif avec aria-hidden.",
+ "layout": "Disposition du catalogue",
+ "catalog": "Chargement du catalogue d’aperçu"
+ },
+ "sidebar": {
+ "title": "Navigation des paramètres",
+ "description": "Sélectionnez des sections, gérez un redémarrage en attente et réduisez la largeur du navigateur pour voir le menu mobile.",
+ "options": "activeSection et onSelectSection contrôlent la sélection ; retour, déconnexion et redémarrage sont des rappels de l’appelant.",
+ "back": "Retour au chat",
+ "logout": "Se déconnecter",
+ "restart": "Action de redémarrage de l’aperçu traitée",
+ "hint": "Choisissez une section, ou réduisez la largeur du navigateur pour voir la navigation mobile.",
+ "toggleRestart": "Basculer le redémarrage en attente"
+ },
+ "providerSearch": {
+ "title": "Recherche de fournisseurs",
+ "description": "Recherchez les fournisseurs regroupés par OAuth, clé API et accès local, puis choisissez une entrée ou un fournisseur personnalisé.",
+ "options": "providers est le catalogue existant. query est une recherche contrôlée ; onSelect et onCustom transmettent la sélection au parent.",
+ "closed": "Recherche fermée",
+ "custom": "Fournisseur personnalisé sélectionné",
+ "hint": "Recherchez un fournisseur ou utilisez les flèches pour choisir."
+ },
+ "requestParameters": {
+ "title": "Paramètres des requêtes",
+ "description": "Modifiez les en-têtes, paramètres de requête et corps ; saisissez du JSON invalide pour voir la validation réelle.",
+ "options": "fields choisit les entrées visibles ; form contient le texte JSON. Les en-têtes et paramètres de requête n’acceptent que des chaînes ; le corps accepte toute valeur d’un objet JSON."
+ },
+ "requestAPI": {
+ "title": "API des requêtes",
+ "description": "Sélectionnez les API prises en charge, l’API par défaut, les remplacements par modèle et les options de repli.",
+ "options": "ProviderAPIControl conserve au moins une API. ModelAPIControl accepte null pour la sélection automatique et affiche les API disponibles selon les capacités du fournisseur.",
+ "providerAPI": "API du fournisseur",
+ "modelOverride": "Remplacement par modèle"
+ },
+ "usage": {
+ "title": "Utilisation des jetons",
+ "description": "Comparez les états avec données, vide et indisponible. Survolez les barres pour l’usage quotidien et ouvrez les détails pour les tendances par modèle.",
+ "options": "usage est un relevé statistique fourni par l’appelant ; timeZone définit les limites des dates. La boîte de détails et les graphiques affichent uniquement les données fournies.",
+ "state": "État de l’utilisation"
+ },
+ "overview": {
+ "title": "Vue d’ensemble des paramètres",
+ "description": "Consultez le modèle actuel, les capacités et l’utilisation ; sélectionnez les lignes de fonctions pour essayer la navigation par section.",
+ "options": "settings fournit les données d’ensemble ; onSelectSection reçoit la section sélectionnée.",
+ "selected": "Section sélectionnée : {{section}}"
+ },
+ "web": {
+ "title": "Paramètres de recherche web",
+ "description": "Passez entre les fournisseurs sans identifiants, avec clé API ou URL de serveur ; ajustez la recherche et essayez l’enregistrement automatique.",
+ "options": "settings contient la configuration actuelle ; form les valeurs modifiées. Le parent fournit l’enregistrement, la visibilité des identifiants et le changement de fournisseur.",
+ "unsaved": "Brouillon d’aperçu non enregistré"
+ },
+ "image": {
+ "title": "Génération d’images",
+ "description": "Activez la génération, choisissez un modèle dans un catalogue fixe, un format et une taille, puis ajustez le nombre dans les options avancées.",
+ "options": "form est une configuration contrôlée ; dirty signale les modifications. Le composant réutilise les identifiants du fournisseur ; le parent assure l’enregistrement."
+ },
+ "voice": {
+ "title": "Paramètres de transcription",
+ "description": "Activez la transcription ; modifiez le modèle, la langue et les limites de durée et de taille ; essayez l’enregistrement automatique.",
+ "options": "settings fournit les informations du fournisseur ; le parent gère form et les rappels d’enregistrement."
+ },
+ "safety": {
+ "title": "Paramètres d’accès",
+ "description": "Basculez l’accès aux services locaux et les permissions par défaut ; observez les lignes, conseils et retours d’enregistrement automatique.",
+ "options": "form fournit les valeurs affichées ; onSave traite les demandes d’enregistrement. La passerelle reste responsable de l’application des permissions à l’exécution."
+ },
+ "channelCatalog": {
+ "title": "Catalogue et identité des canaux",
+ "description": "Comparez les états en cours, démarrage, échec et non installé ; essayez l’interrupteur, l’installation et le menu d’aide.",
+ "options": "feature fournit les états d’installation et d’exécution. Le parent gère onAction et onSelect ; l’identité, les erreurs et l’aide utilisent les mêmes données du canal.",
+ "exampleChannel": "Canal d’exemple",
+ "state": "État du canal",
+ "error": "La connexion d’exemple a échoué.",
+ "stopped": "Arrêté",
+ "running": "En cours",
+ "starting": "Démarrage",
+ "failed": "Échec",
+ "selected": "Paramètres du canal sélectionnés",
+ "hint": "Utilisez l’interrupteur ou le bouton d’installation pour voir les changements d’état."
+ },
+ "credentials": {
+ "title": "Identifiants des canaux",
+ "description": "Saisissez les identifiants, affichez ou masquez les secrets, appliquez des préréglages, vérifiez les champs requis et copiez une commande d’aide.",
+ "options": "fields définit les groupes et contrôles ; values et visibleSecrets sont contrôlés. requirements définit les combinaisons d’identifiants ; les rappels de préréglage et d’enregistrement ne modifient que cet exemple.",
+ "botToken": "Jeton du bot",
+ "tokenPlaceholder": "Jeton d’exemple",
+ "serverURL": "URL du serveur",
+ "replyMode": "Mode de réponse",
+ "mentions": "Mentions",
+ "allMessages": "Tous les messages",
+ "allowFrom": "Expéditeurs autorisés",
+ "local": "Serveur local",
+ "hosted": "Serveur hébergé",
+ "required": "Saisissez un jeton de bot.",
+ "checkSave": "Vérifier et enregistrer",
+ "command": "Commande d’exemple",
+ "applied": "{{name}} appliqué",
+ "incomplete": "Complétez les identifiants.",
+ "saved": "Identifiants d’aperçu enregistrés.",
+ "hint": "Renseignez les identifiants, affichez les secrets ou appliquez un préréglage de connexion."
+ },
+ "channelValidation": {
+ "title": "Vérification de connexion",
+ "description": "Comparez vérification, réussite et échec ; observez les vérifications apparaître avec un résumé d’identité.",
+ "options": "validation fournit les résultats ; validating contrôle le chargement. Le composant ne fait que les afficher.",
+ "expired": "Le jeton d’exemple a expiré.",
+ "result": "Résultat de vérification"
+ },
+ "runAt": {
+ "title": "Sélection de l’heure planifiée",
+ "description": "Saisissez une date et une heure, ou ouvrez le calendrier pour choisir avec la souris, les flèches et les touches de page.",
+ "options": "value utilise l’heure locale au format YYYY-MM-DDTHH:mm ; onChange renvoie la valeur modifiée. Les saisies invalides sont signalées sur le contrôle existant."
+ },
+ "automationCalendar": {
+ "title": "Calendrier des automatisations",
+ "description": "Changez de mois, comparez plans et historique, puis ouvrez les résultats des exécutions réussies ou échouées. Les conteneurs étroits affichent un agenda.",
+ "options": "jobs et month définissent le calendrier. onInspect gère les tâches planifiées ; l’appelant fournit les résultats via renderRunDialog. Le calendrier ne consulte aucun service.",
+ "providerError": "Le fournisseur d’exemple était indisponible.",
+ "state": "État du calendrier",
+ "previousMonth": "Mois précédent",
+ "nextMonth": "Mois suivant",
+ "planned": "Planifié",
+ "recorded": "Historique d’exécution",
+ "running": "En cours",
+ "failed": "Échec",
+ "completed": "Terminé",
+ "skipped": "Ignoré",
+ "system": "Tâche système",
+ "noEntries": "Aucune planification ce mois-ci",
+ "more": "{{count}} de plus",
+ "selected": "Tâche sélectionnée : {{name}}",
+ "hint": "Sélectionnez une exécution pour voir son résultat, ou choisissez une tâche planifiée."
+ },
+ "providers": {
+ "title": "Gestion des fournisseurs",
+ "description": "Consultez la véritable boîte de gestion des fournisseurs et le parcours d’ajout.",
+ "options": "Réutilise ProvidersSettings des paramètres. L’appelant contrôle le catalogue, les formulaires et l’enregistrement ; cet aperçu modifie les données locales et permet configuration, recherche, création et annulation.",
+ "invalidParameters": "Saisissez des paramètres JSON valides ; les valeurs des en-têtes et paramètres de requête doivent être des chaînes.",
+ "saved": "Configuration d’aperçu enregistrée pour {{name}}",
+ "added": "{{name}} ajouté",
+ "signedIn": "Autorisation d’aperçu définie sur connecté",
+ "signedOut": "Autorisation d’aperçu définie sur déconnecté",
+ "builtInIcons": "Utiliser les icônes intégrées",
+ "brandIcons": "Utiliser les icônes de marque",
+ "configured": "Fournisseurs configurés : {{count}}",
+ "providerAdded": "Fournisseur ajouté"
+ },
+ "runResult": {
+ "title": "Résultats des automatisations",
+ "description": "Ouvrez les résultats pour comparer réponses Markdown, chargement, nouvelle tentative, réponses vides et historique manquant.",
+ "options": "result fournit l’état de chargement et la réponse récupérée. L’appelant gère onRetry ; cette vue ne lit ni le runtime ni les résultats par requête.",
+ "state": "Résultat d’exécution",
+ "view": "Voir le résultat d’exécution"
+ },
+ "chatBinding": {
+ "title": "Chat d’exécution",
+ "description": "Choisissez le chat, modifiez les consignes, confirmez, revenez au précédent ou annulez ; comparez tâches occupées, erreurs de chargement et conflits.",
+ "options": "data et job fournissent les chats et versions de liaison. La vue gère le brouillon de confirmation ; le point d’entrée de la fonction relie onSave, onSaved et onReload aux opérations de données.",
+ "state": "État de la liaison au chat",
+ "setChat": "Définir le chat d’exécution",
+ "saved": "La prochaine exécution aura lieu dans {{title}}",
+ "hint": "Choisissez un chat cible, puis confirmez ou modifiez les consignes de la tâche."
+ },
+ "about": {
+ "title": "À propos et version",
+ "description": "Comparez les états de vérification, liens de commit, mises à jour et page À propos ; les boutons affichent des résultats d’exemple.",
+ "options": "AboutSettingsView accepte la composition des liens de version et d’assistance. VersionCheckRowView affiche checking/result et demande une vérification via onCheck. Le point d’entrée gère les vérifications réelles et les liens de diagnostic.",
+ "error": "Impossible d’obtenir la version. Réessayez.",
+ "state": "État de la version",
+ "selectedLink": "Lien GitHub sélectionné"
+ },
+ "appearance": {
+ "title": "Préférences d’apparence",
+ "description": "Changez l’apparence, l’affichage d’activité, les différences et les notifications ; les valeurs d’exemple apparaissent ci-dessous.",
+ "options": "L’appelant gère le thème et les préférences. onChangeBrowserNotifications délègue les demandes d’autorisation au point d’entrée ; les rappels d’aperçu ne changent que les interrupteurs d’exemple."
+ },
+ "starInvitation": {
+ "title": "Invitation à soutenir le projet",
+ "description": "Ouvrez la véritable invitation, comparez l’enregistrement et les erreurs, puis essayez le report, le lien GitHub et le refus définitif.",
+ "options": "open, saving et error sont des états d’affichage. Le point d’entrée StarPrompt existant gère la réception des invitations et la persistance des préférences ; la vue appelle uniquement les actions fournies.",
+ "state": "État de l’invitation",
+ "view": "Voir l’invitation",
+ "dismissed": "Ne plus rappeler sélectionné dans l’aperçu",
+ "starred": "Lien GitHub sélectionné dans l’aperçu"
+ }
+}
diff --git a/webui/src/dev/gallery/locales/controls/id.json b/webui/src/dev/gallery/locales/controls/id.json
new file mode 100644
index 000000000..990adc7ca
--- /dev/null
+++ b/webui/src/dev/gallery/locales/controls/id.json
@@ -0,0 +1,500 @@
+{
+ "common": {
+ "unavailable": "Tidak tersedia",
+ "selected": "Dipilih: {{value}}",
+ "savingPreview": "Menyimpan nilai pratinjau…",
+ "savedPreview": "Nilai pratinjau tersimpan",
+ "providerAction": "Tindakan konfigurasi penyedia dipilih",
+ "reset": "Atur ulang pratinjau"
+ },
+ "button": {
+ "title": "Tombol",
+ "description": "Satu tombol dengan beragam tampilan dan ukuran yang diubah melalui opsi.",
+ "options": "variant mengubah tampilan; size mengubah dimensi; disabled memblokir interaksi; onClick disediakan oleh pemanggil.",
+ "variants": "Varian — berbagai gaya tombol yang sama",
+ "sizes": "Ukuran",
+ "add": "Tambah contoh",
+ "clicks": "Jumlah klik tombol: {{count}}"
+ },
+ "input": {
+ "title": "Kolom teks",
+ "description": "Masukan teks dan varian kolom pencarian bersama.",
+ "options": "Gunakan Input untuk kolom biasa dan SearchInput untuk pencarian. Sediakan label dan jelaskan masukan yang tidak valid.",
+ "name": "Nama contoh",
+ "projectName": "Nama proyek",
+ "search": "Pencarian",
+ "searchName": "Pencarian contoh",
+ "searchProjects": "Cari proyek",
+ "invalid": "Tidak valid",
+ "invalidName": "Nama tidak valid",
+ "required": "Masukkan nama proyek.",
+ "disabledName": "Kolom nama yang dinonaktifkan"
+ },
+ "textarea": {
+ "title": "Masukan multibaris",
+ "description": "Teks multibaris dengan gaya fokus bersama.",
+ "options": "Menerima properti textarea bawaan: value, onChange, rows, dan disabled.",
+ "notes": "Catatan contoh",
+ "disabledNotes": "Catatan yang dinonaktifkan",
+ "readOnly": "Pratinjau hanya baca"
+ },
+ "toggle": {
+ "title": "Sakelar",
+ "description": "Sakelar aktif/nonaktif terkontrol yang digunakan bersama oleh pengaturan, ruang kerja, dan kanal.",
+ "options": "Pemanggil mengelola checked dan onChange. label menyediakan nama aksesibel.",
+ "enable": "Aktifkan contoh",
+ "unavailableOn": "Sakelar aktif yang tidak dapat diubah",
+ "unavailableOff": "Sakelar nonaktif yang tidak dapat diubah"
+ },
+ "select": {
+ "title": "Pemilih",
+ "description": "Pilihan tunggal dengan navigasi keyboard dan opsi yang dinonaktifkan.",
+ "options": "Gabungkan Select, SelectTrigger, SelectValue, SelectContent, dan SelectItem. Komponen akar mengelola value/onValueChange.",
+ "fast": "Cepat",
+ "model": "Model contoh",
+ "disabledModel": "Pemilih model yang dinonaktifkan"
+ },
+ "segmented": {
+ "title": "Pilihan bersegmen",
+ "description": "Sekumpulan kecil pilihan yang selalu terlihat.",
+ "options": "value, options, dan onChange bersifat terkontrol. mode=\"tabs\" menambahkan navigasi tab dengan tombol panah.",
+ "day": "Hari",
+ "week": "Minggu",
+ "month": "Bulan",
+ "period": "Periode contoh",
+ "selected": "Periode dipilih: {{value}}"
+ },
+ "combobox": {
+ "title": "Pilihan dengan pencarian",
+ "description": "Opsi yang dapat dicari dengan navigasi keyboard dan penunjuk bersama.",
+ "options": "useComboboxNavigation menyediakan properti masukan, daftar, dan opsi; pemanggil menyaring nilai dan mengelola pilihan.",
+ "search": "Cari opsi contoh",
+ "placeholder": "Ketik atau gunakan tombol panah",
+ "choices": "Opsi contoh",
+ "empty": "Tidak ada opsi yang cocok",
+ "selected": "Opsi dipilih: {{value}}"
+ },
+ "chevron": {
+ "title": "Panah kontrol",
+ "description": "Ikon panah bersama yang digunakan oleh kontrol pemilihan.",
+ "options": "className dapat menyesuaikan posisi. Ikon hanya bersifat dekoratif; kontrol pemiliknya menyediakan nama aksesibel."
+ },
+ "dialog": {
+ "title": "Dialog",
+ "description": "Editor modal dengan perubahan sementara, pilihan bersarang, dan pengembalian fokus.",
+ "options": "Pemanggil mengelola open/onOpenChange serta perilaku draf dan penyimpanan. Selalu sediakan DialogTitle dan deskripsi bila diperlukan.",
+ "open": "Buka dialog",
+ "edit": "Edit label contoh",
+ "help": "Perubahan hanya berlaku pada pratinjau ini.",
+ "label": "Label contoh",
+ "save": "Simpan label",
+ "saved": "Label tersimpan: {{name}}"
+ },
+ "alert": {
+ "title": "Dialog konfirmasi",
+ "description": "Konfirmasi eksplisit dengan kontrol batal dan tindakan yang terpisah.",
+ "options": "Gabungkan judul, deskripsi, dan bagian bawah; jalankan tindakan dalam penangan AlertDialogAction.",
+ "remove": "Hapus contoh",
+ "confirmTitle": "Hapus contoh ini?",
+ "help": "Ini hanya mengubah status pratinjau.",
+ "confirm": "Konfirmasi penghapusan",
+ "removed": "Contoh dihapus.",
+ "available": "Contoh tersedia."
+ },
+ "sheet": {
+ "title": "Panel samping",
+ "description": "Panel modal yang menempel pada tepi area tampilan.",
+ "options": "SheetContent mendukung side. Sertakan SheetTitle dan SheetDescription.",
+ "open": "Buka panel samping",
+ "panelTitle": "Panel samping contoh",
+ "help": "Kontrol pendukung di samping halaman saat ini.",
+ "notes": "Catatan panel",
+ "placeholder": "Coba edit di sini"
+ },
+ "popover": {
+ "title": "Panel mengambang",
+ "description": "Area interaktif kecil yang ditambatkan ke pemicunya.",
+ "options": "Gabungkan pemicu dan konten; open/onOpenChange dapat dikontrol. Konten mengikuti portal dialog pemiliknya.",
+ "open": "Buka panel mengambang",
+ "note": "Catatan singkat"
+ },
+ "menu": {
+ "title": "Menu tarik-turun",
+ "description": "Tindakan, pilihan tunggal, menu bersarang, dan entri yang dinonaktifkan.",
+ "options": "Gunakan onSelect untuk tindakan dan grup radio untuk pilihan yang dipertahankan.",
+ "view": "Opsi tampilan",
+ "layout": "Tata letak",
+ "comfortable": "Renggang",
+ "compact": "Ringkas",
+ "rename": "Ubah nama",
+ "more": "Tindakan lainnya",
+ "duplicate": "Duplikasikan",
+ "none": "Tidak ada",
+ "status": "Kerapatan: {{density}}. Tindakan: {{action}}."
+ },
+ "tooltip": {
+ "title": "Tooltip dan petunjuk",
+ "description": "HoverHint menggabungkan primitif tooltip bersama; tooltip.tsx adalah jalur impor publiknya.",
+ "options": "Gunakan HoverHint untuk petunjuk biasa. Pastikan kesalahan penting tetap terlihat. Sorotan penunjuk dan fokus keyboard mengikuti aturan waktu produk.",
+ "primitive": "Tooltip dasar",
+ "primitiveHelp": "Jeda penunjuk bersama dan tampilan langsung saat mendapat fokus keyboard.",
+ "hint": "Petunjuk saat disorot",
+ "hintHelp": "Petunjuk gabungan dengan perilaku fokus dan penunjuk yang sama."
+ },
+ "truncated": {
+ "title": "Petunjuk teks terpotong",
+ "description": "Menampilkan petunjuk hanya saat pengukuran menunjukkan teks terpotong.",
+ "options": "Sediakan text dan lebar terbatas. Tambahkan tabIndex jika teks itu sendiri perlu menerima fokus keyboard."
+ },
+ "disclosure": {
+ "title": "Konten lipat",
+ "description": "Konten yang dapat diperluas dan mempertahankan status anak saat dilipat.",
+ "options": "Disclosure mengelola perluasan; DisclosureContent menerima properti open terkontrol untuk pemicu khusus.",
+ "show": "Tampilkan opsi lanjutan",
+ "help": "Draf ini tetap ada setelah ditutup dan dibuka kembali.",
+ "draft": "Draf area lipat"
+ },
+ "expandable": {
+ "title": "Teks yang dapat diperluas",
+ "description": "Pratinjau dengan batas baris dari teks yang sama dan tetap terpasang.",
+ "options": "Pemanggil mengelola expanded. lines menentukan jumlah baris saat dilipat; sediakan kontrol pengalih yang aksesibel.",
+ "less": "Tampilkan lebih sedikit",
+ "more": "Tampilkan lebih banyak"
+ },
+ "imageViewport": {
+ "title": "Area tampilan gambar",
+ "description": "Kontrol penyesuaian, zoom, geser, dan cubit untuk setiap gambar.",
+ "options": "Sediakan className dengan batas area dan pasang ulang untuk identitas gambar yang berbeda. Atur panWithArrows=false jika galeri mengelola navigasi panah."
+ },
+ "streaming": {
+ "title": "Label beranimasi",
+ "description": "Animasi teks bersama untuk proses berpikir aktif dan label alat.",
+ "options": "active mengontrol animasi. Anak berupa string atau angka menyediakan lapisan glif; pengaturan pengurangan gerakan tetap dihormati.",
+ "animate": "Animasikan label",
+ "working": "Memproses langkah berikutnya…"
+ },
+ "markdown": {
+ "title": "Balasan Markdown",
+ "description": "Perender streaming produksi, termasuk tabel, kode, dan rumus.",
+ "options": "children adalah teks Markdown. streaming mengontrol konten yang belum lengkap; onOpenFilePreview disediakan oleh layar.",
+ "state": "Status Markdown"
+ },
+ "code": {
+ "title": "Tampilan kode",
+ "description": "Penyorotan sintaks, nomor baris, penyalinan, keluaran ANSI, dan baris yang menyesuaikan area terlihat.",
+ "options": "code dan language menyediakan konten; showLineNumbers, wrapLongLines, dan chrome mengontrol tampilan. Penyorotan area terlihat memerlukan nomor baris dan baris tanpa pembungkusan.",
+ "format": "Format kode"
+ },
+ "math": {
+ "title": "Rumus matematika",
+ "description": "Pembungkus bersama untuk menyesuaikan rumus blok yang dirender Markdown.",
+ "options": "Gunakan MarkdownText untuk sumber TeX. DisplayMath menerima simpul rumus yang sudah dirender dan menskalakannya ke lebar yang tersedia."
+ },
+ "message": {
+ "title": "Pesan",
+ "description": "Pesan pengguna dan asisten, termasuk status berpikir dan pengiriman.",
+ "options": "message adalah UIMessage yang diproyeksikan oleh runtime obrolan. Data dan tindakan jaringan tetap berada di luar perender.",
+ "state": "Status pesan"
+ },
+ "activity": {
+ "title": "Aktivitas agen",
+ "description": "Primitif aktivitas digabung menjadi urutan yang sedang berjalan, selesai, atau gagal.",
+ "options": "Berikan teks, status, dan perluasan terkontrol. gateway mengelola eksekusi alat; komponen ini merender proyeksi statusnya.",
+ "state": "Status aktivitas",
+ "working": "Memproses",
+ "details": "Detail aktivitas",
+ "collapse": "Lipat",
+ "readError": "Tidak dapat membaca berkas",
+ "read": "Baca sumber"
+ },
+ "files": {
+ "title": "Perubahan berkas",
+ "description": "Referensi berkas, jumlah baris berubah, dan perbedaan yang dapat diperluas.",
+ "options": "edits berisi ringkasan tampilan; displayMode memilih summary/diff/collapsed_diff; onOpenFilePreview disediakan oleh layar.",
+ "error": "Perubahan contoh tidak dapat diterapkan.",
+ "state": "Status perubahan berkas",
+ "operation": "Operasi berkas",
+ "display": "Tampilan perbedaan",
+ "selected": "Berkas dipilih: {{path}}",
+ "hint": "Pilih referensi berkas untuk mencoba callback-nya."
+ },
+ "media": { "study": "Studi warna {{count}}" },
+ "imageGallery": {
+ "title": "Gambar mini",
+ "description": "Tata letak banyak gambar, pemilihan gambar mini, dan gambar tambahan.",
+ "options": "images menyediakan URL dan nama; size memilih gambar mini besar atau ringkas, align mengontrol perataan. Hanya empat gambar mini ditampilkan; ImageLightbox gabungan memuat semua gambar yang dapat dilihat.",
+ "sixImages": "Enam gambar",
+ "compact": "Gambar mini ringkas",
+ "hint": "Pilih gambar mini atau +2 untuk melihat keenam gambar."
+ },
+ "imageLightbox": {
+ "title": "Penampil gambar layar penuh",
+ "description": "Tampilan layar penuh terkontrol dan navigasi gambar.",
+ "options": "index bernilai null saat ditutup. Pemanggil mengelola index dan callback pembukaan; ImageLightbox menggabungkan ZoomableImage serta mengatur ulang tampilan saat gambar berubah.",
+ "open": "Buka penampil layar penuh",
+ "hint": "Gunakan sebelumnya/berikutnya, ←/→, atau Home/End; tutup dengan × atau Escape."
+ },
+ "zoomableImage": {
+ "title": "Zoom gambar",
+ "description": "Zoom gambar tunggal, geser dalam batas, dan gestur.",
+ "options": "src dan alt menyediakan satu gambar. Tempatkan dalam wadah berposisi dengan tinggi pasti; pasang ulang saat mengganti gambar. Fokuskan area gambar untuk menggunakan +, −, dan 0.",
+ "hint": "Zoom dengan +/−, klik ganda, Ctrl+roda, atau cubit. Seret atau gulir untuk menggeser setelah diperbesar; klik persentase atau tekan 0 untuk mengatur ulang."
+ },
+ "attachment": {
+ "title": "Lampiran",
+ "description": "Pratinjau gambar, pemutaran video, unduhan berkas, dan lampiran tidak tersedia.",
+ "options": "attachment.kind memilih image, video, atau file. Gambar membuka ImageLightbox, video memakai kontrol bawaan, berkas memakai tautan unduhan. URL yang tidak ada atau kegagalan memuat gambar menghasilkan ubin tidak tersedia.",
+ "image": "Gambar",
+ "video": "Video yang dapat diputar",
+ "file": "Unduh berkas",
+ "unavailable": "Lampiran tidak tersedia (tanpa URL)"
+ },
+ "fileReference": {
+ "title": "Referensi berkas",
+ "description": "Referensi berkas dengan tindakan buka yang dikelola pemanggil.",
+ "options": "path menyediakan label; onOpen menyediakan tindakan. Komponen tidak menentukan izin ruang kerja.",
+ "select": "Pilih referensi berkas."
+ },
+ "settingsComposition": {
+ "title": "Komposisi pengaturan",
+ "description": "Komponen baris, grup, dan kapabilitas pengaturan yang sebenarnya, digabung dengan kontrol bersama.",
+ "options": "Pengontrol pengaturan yang membungkusnya mengelola nilai dan penyimpanan permanen. Callback galeri hanya mengubah status pratinjau lokal.",
+ "preferences": "Preferensi contoh",
+ "keepDrafts": "Simpan draf",
+ "switchHint": "Baris pengaturan bersama dengan sakelar terkontrol.",
+ "projectLabel": "Label proyek",
+ "projectName": "Label proyek dalam pengaturan",
+ "capability": "Kapabilitas contoh",
+ "notes": "Catatan",
+ "capabilityNotes": "Catatan kapabilitas",
+ "localOnly": "Hanya pratinjau lokal"
+ },
+ "modelPickers": {
+ "title": "Pemilih model",
+ "description": "Pilih penyedia, cari atau masukkan ID model, lalu sesuaikan tingkat penalaran.",
+ "options": "Pemanggil menyediakan nilai dan tindakan ProviderPicker. models milik ModelIdPicker dapat menyediakan katalog tetap; savedValues milik ReasoningEffortPicker menyediakan opsi yang sudah ada.",
+ "chooseProvider": "Pilih penyedia",
+ "configure": "Konfigurasi {{provider}}"
+ },
+ "providerIcons": {
+ "title": "Ikon penyedia",
+ "description": "Bandingkan ukuran biasa, ringkas, dan penuh serta status pemilih yang belum dikonfigurasi.",
+ "options": "provider memilih ikon yang tersedia; compact dan fill mengontrol ukuran. showBrandLogos=false menggunakan ikon bawaan.",
+ "size": "Ukuran ikon"
+ },
+ "timezone": {
+ "title": "Pemilih zona waktu",
+ "description": "Cari berdasarkan nama zona waktu, nama Tionghoa, atau selisih UTC, lalu lihat saat yang sama dalam waktu lokal.",
+ "options": "value adalah zona waktu IANA; onChange memperbarui nilai pemanggil. Komponen menyediakan pencarian dan navigasi keyboard."
+ },
+ "textEditor": {
+ "title": "Editor teks dan petunjuk",
+ "description": "Buka editor untuk mengubah, menyimpan, atau membatalkan. Kosongkan konten lalu simpan untuk melihat pesan kesalahan.",
+ "options": "SettingsTextEditor menutup setelah onSave berhasil dan menampilkan kesalahan jika gagal; SettingsHint terbuka saat disorot, difokuskan, atau diklik.",
+ "state": "Status pengeditan",
+ "hint": "Buka editor untuk mengubah, menyimpan, atau membatalkan. Kosongkan konten untuk melihat status kesalahan.",
+ "instructions": "Instruksi contoh",
+ "edit": "Edit instruksi contoh",
+ "help": "Setelah disimpan, konten yang diperbarui muncul di bawah.",
+ "required": "Masukkan konten."
+ },
+ "removePreset": {
+ "title": "Hapus preset model",
+ "description": "Hapus preset yang tidak digunakan dan lihat status nonaktif preset yang dipakai model default.",
+ "options": "Ini adalah tombol hapus yang digunakan ModelsSettings; pemanggil menyediakan disabled dan tindakan hapus. Pengelolaan penyedia menggunakan dialog ProvidersSettings.",
+ "defaultModel": "Model default",
+ "codeAssistant": "Asisten pemrograman",
+ "remove": "Hapus {{name}}",
+ "primaryHint": "Preset yang digunakan model default tidak dapat dihapus.",
+ "count": "Jumlah preset pratinjau: {{count}}"
+ },
+ "loading": {
+ "title": "Tata letak pemuatan",
+ "description": "Ganti tata letak pemuatan katalog aplikasi, kanal, dan keterampilan, serta lihat wadah status bersama.",
+ "options": "layout milik CatalogSkeleton memilih tata letak. SkeletonStatus memakai label untuk status pembaca layar dan menandai konten dekoratif sebagai aria-hidden.",
+ "layout": "Tata letak katalog",
+ "catalog": "Memuat katalog pratinjau"
+ },
+ "sidebar": {
+ "title": "Navigasi pengaturan",
+ "description": "Pilih bagian, tangani mulai ulang tertunda, dan persempit browser untuk melihat menu seluler.",
+ "options": "activeSection dan onSelectSection mengontrol pilihan; kembali, keluar, dan mulai ulang merupakan callback pemanggil.",
+ "back": "Kembali ke obrolan",
+ "logout": "Keluar",
+ "restart": "Tindakan mulai ulang pratinjau ditangani",
+ "hint": "Pilih bagian pengaturan atau persempit browser untuk melihat navigasi seluler.",
+ "toggleRestart": "Alihkan status mulai ulang tertunda"
+ },
+ "providerSearch": {
+ "title": "Pencarian penyedia",
+ "description": "Cari penyedia menurut grup OAuth, kunci API, dan akses lokal; pilih entri atau penyedia khusus.",
+ "options": "providers adalah katalog yang ada. query adalah nilai pencarian terkontrol; onSelect dan onCustom meneruskan pilihan ke induk.",
+ "closed": "Pencarian ditutup",
+ "custom": "Penyedia khusus dipilih",
+ "hint": "Cari penyedia atau gunakan tombol panah untuk memilih."
+ },
+ "requestParameters": {
+ "title": "Parameter permintaan",
+ "description": "Edit header, parameter kueri, dan isi permintaan; masukkan JSON tidak valid untuk melihat validasi sebenarnya.",
+ "options": "fields memilih entri yang terlihat; form menyimpan teks JSON. Header dan parameter kueri hanya menerima nilai string; isi permintaan menerima nilai objek JSON apa pun."
+ },
+ "requestAPI": {
+ "title": "Kontrol API permintaan",
+ "description": "Pilih API yang didukung penyedia, API default, penggantian per model, dan opsi cadangan.",
+ "options": "ProviderAPIControl mempertahankan setidaknya satu API. ModelAPIControl mengizinkan null untuk pilihan otomatis dan menampilkan API sesuai kapabilitas penyedia.",
+ "providerAPI": "API penyedia",
+ "modelOverride": "Penggantian model"
+ },
+ "usage": {
+ "title": "Penggunaan token",
+ "description": "Ganti antara data tersedia, catatan kosong, dan tidak tersedia. Sorot batang untuk penggunaan harian; buka detail untuk tren model.",
+ "options": "usage adalah catatan statistik dari pemanggil; timeZone menentukan batas tanggal. Dialog detail dan grafik hanya menampilkan data yang diberikan.",
+ "state": "Status penggunaan"
+ },
+ "overview": {
+ "title": "Ringkasan pengaturan",
+ "description": "Lihat model saat ini, status kapabilitas, dan penggunaan; pilih baris fitur untuk mencoba navigasi bagian.",
+ "options": "settings menyediakan data ringkasan; onSelectSection menerima bagian pengaturan yang dipilih.",
+ "selected": "Bagian dipilih: {{section}}"
+ },
+ "web": {
+ "title": "Pengaturan pencarian web",
+ "description": "Ganti penyedia tanpa kredensial, dengan kunci API, atau URL server; sesuaikan pencarian dan coba penyimpanan otomatis.",
+ "options": "settings menyimpan konfigurasi saat ini; form menyimpan nilai edit. Induk menyediakan penyimpanan, visibilitas kredensial, dan pergantian penyedia.",
+ "unsaved": "Draf pratinjau belum disimpan"
+ },
+ "image": {
+ "title": "Pengaturan pembuatan gambar",
+ "description": "Aktifkan pembuatan gambar, pilih model dari katalog tetap, rasio aspek, dan ukuran; buka opsi lanjutan untuk mengatur jumlah.",
+ "options": "form adalah konfigurasi terkontrol; dirty menandai perubahan. Komponen memakai ulang kredensial penyedia; induk menerapkan penyimpanan."
+ },
+ "voice": {
+ "title": "Pengaturan transkripsi",
+ "description": "Aktifkan transkripsi, edit model, bahasa, batas durasi, dan ukuran unggahan; coba penyimpanan otomatis.",
+ "options": "settings menyediakan informasi penyedia; induk mengelola form dan callback penyimpanan."
+ },
+ "safety": {
+ "title": "Pengaturan akses",
+ "description": "Alihkan akses layanan lokal dan izin default; lihat baris pengaturan, petunjuk, dan umpan balik penyimpanan otomatis.",
+ "options": "form menyediakan nilai tampilan; onSave menangani permintaan simpan. Penegakan izin saat runtime tetap menjadi tanggung jawab gateway."
+ },
+ "channelCatalog": {
+ "title": "Katalog dan identitas kanal",
+ "description": "Ganti status berjalan, memulai, gagal, dan belum terpasang; coba sakelar, pemasangan, dan menu bantuan.",
+ "options": "feature menyediakan status pemasangan dan runtime. Induk menangani onAction dan onSelect; identitas, kesalahan, dan bantuan memakai data kanal yang sama.",
+ "exampleChannel": "Kanal contoh",
+ "state": "Status kanal",
+ "error": "Koneksi contoh gagal.",
+ "stopped": "Dihentikan",
+ "running": "Berjalan",
+ "starting": "Memulai",
+ "failed": "Gagal",
+ "selected": "Pengaturan kanal dipilih",
+ "hint": "Gunakan sakelar atau tombol pasang untuk melihat perubahan status."
+ },
+ "credentials": {
+ "title": "Kredensial kanal",
+ "description": "Masukkan kredensial, tampilkan atau sembunyikan rahasia, terapkan preset koneksi, periksa kolom wajib, dan salin perintah bantuan.",
+ "options": "fields menentukan grup dan kontrol; values dan visibleSecrets bersifat terkontrol. requirements menentukan kombinasi kredensial; callback preset dan simpan hanya memperbarui contoh ini.",
+ "botToken": "Token bot",
+ "tokenPlaceholder": "Token contoh",
+ "serverURL": "URL server",
+ "replyMode": "Mode balasan",
+ "mentions": "Sebutan",
+ "allMessages": "Semua pesan",
+ "allowFrom": "Pengirim yang diizinkan",
+ "local": "Server lokal",
+ "hosted": "Server terhosting",
+ "required": "Masukkan token bot.",
+ "checkSave": "Periksa dan simpan",
+ "command": "Perintah contoh",
+ "applied": "{{name}} diterapkan",
+ "incomplete": "Lengkapi kredensial.",
+ "saved": "Kredensial pratinjau tersimpan.",
+ "hint": "Isi kredensial, alihkan visibilitas rahasia, atau terapkan preset koneksi."
+ },
+ "channelValidation": {
+ "title": "Pemeriksaan koneksi",
+ "description": "Ganti antara memeriksa, berhasil, dan gagal; lihat pemeriksaan muncul berurutan bersama ringkasan identitas.",
+ "options": "validation menyediakan catatan pemeriksaan; validating mengontrol pemuatan. Komponen hanya menampilkan hasil.",
+ "expired": "Token contoh telah kedaluwarsa.",
+ "result": "Hasil pemeriksaan"
+ },
+ "runAt": {
+ "title": "Pemilih waktu terjadwal",
+ "description": "Masukkan tanggal dan waktu atau buka kalender lalu pilih dengan mouse, tombol panah, dan tombol halaman.",
+ "options": "value memakai waktu lokal YYYY-MM-DDTHH:mm; onChange mengembalikan nilai yang diedit. Masukan tidak valid ditampilkan pada kontrol formulir yang ada."
+ },
+ "automationCalendar": {
+ "title": "Kalender otomatisasi",
+ "description": "Ganti bulan, jadwal, dan riwayat, lalu buka hasil catatan berhasil atau gagal. Wadah sempit otomatis menampilkan agenda.",
+ "options": "jobs dan month menentukan konten kalender. onInspect menangani tugas terjadwal; pemanggil menyediakan tampilan hasil melalui renderRunDialog. Kalender tidak membaca layanan.",
+ "providerError": "Penyedia contoh tidak tersedia.",
+ "state": "Status jadwal",
+ "previousMonth": "Bulan sebelumnya",
+ "nextMonth": "Bulan berikutnya",
+ "planned": "Terjadwal",
+ "recorded": "Riwayat eksekusi",
+ "running": "Berjalan",
+ "failed": "Gagal",
+ "completed": "Selesai",
+ "skipped": "Dilewati",
+ "system": "Tugas sistem",
+ "noEntries": "Tidak ada jadwal bulan ini",
+ "more": "{{count}} lainnya",
+ "selected": "Tugas dipilih: {{name}}",
+ "hint": "Pilih catatan eksekusi untuk melihat hasilnya atau pilih tugas terjadwal."
+ },
+ "providers": {
+ "title": "Pengelolaan penyedia",
+ "description": "Lihat dialog pengelolaan penyedia yang sebenarnya dan alur penambahan.",
+ "options": "Memakai ulang ProvidersSettings dari pengaturan. Pemanggil mengontrol katalog, formulir, dan callback simpan; pratinjau ini mengubah data contoh lokal serta mendukung konfigurasi, pencarian, pembuatan, dan pembatalan.",
+ "invalidParameters": "Masukkan JSON parameter permintaan yang valid; nilai header dan parameter kueri harus berupa string.",
+ "saved": "Konfigurasi pratinjau untuk {{name}} tersimpan",
+ "added": "{{name}} ditambahkan",
+ "signedIn": "Otorisasi pratinjau diatur ke sudah masuk",
+ "signedOut": "Otorisasi pratinjau diatur ke belum masuk",
+ "builtInIcons": "Gunakan ikon bawaan",
+ "brandIcons": "Gunakan ikon merek",
+ "configured": "Jumlah penyedia terkonfigurasi: {{count}}",
+ "providerAdded": "Penyedia ditambahkan"
+ },
+ "runResult": {
+ "title": "Hasil eksekusi otomatisasi",
+ "description": "Buka hasil untuk membandingkan balasan Markdown, pemuatan, coba lagi, balasan kosong, dan riwayat yang hilang.",
+ "options": "result menyediakan status pemuatan dan balasan yang diperoleh. Pemanggil menangani onRetry; tampilan ini tidak membaca runtime atau meminta hasil.",
+ "state": "Hasil eksekusi",
+ "view": "Lihat hasil eksekusi"
+ },
+ "chatBinding": {
+ "title": "Obrolan eksekusi",
+ "description": "Pilih obrolan, edit instruksi, konfirmasi, beralih kembali, atau batalkan; bandingkan tugas sibuk, kesalahan pemuatan, dan konflik.",
+ "options": "data dan job menyediakan obrolan yang tersedia dan versi pengikatan. Tampilan mengelola draf konfirmasi; titik masuk fitur menghubungkan onSave, onSaved, dan onReload ke operasi data.",
+ "state": "Status pengikatan obrolan",
+ "setChat": "Atur obrolan eksekusi",
+ "saved": "Eksekusi berikutnya akan berlangsung di {{title}}",
+ "hint": "Pilih obrolan tujuan, lalu konfirmasi atau edit instruksi tugas."
+ },
+ "about": {
+ "title": "Tentang dan versi",
+ "description": "Bandingkan status pemeriksaan versi, tautan commit, pembaruan, dan halaman Tentang; tombol memperbarui tampilan dengan hasil contoh.",
+ "options": "AboutSettingsView menerima gabungan tautan versi dan dukungan. VersionCheckRowView menampilkan checking/result dan meminta pemeriksaan melalui onCheck. Titik masuk fitur mengelola pemeriksaan sebenarnya serta data tautan diagnostik.",
+ "error": "Tidak dapat mengambil informasi versi. Coba lagi.",
+ "state": "Status versi",
+ "selectedLink": "Tautan GitHub dipilih"
+ },
+ "appearance": {
+ "title": "Preferensi tampilan",
+ "description": "Alihkan tampilan, aktivitas, perbedaan berkas, dan notifikasi; nilai contoh muncul di bawah.",
+ "options": "Pemanggil mengelola tema dan preferensi. onChangeBrowserNotifications menyerahkan permintaan izin ke titik masuk fitur; callback pratinjau hanya mengubah sakelar contoh."
+ },
+ "starInvitation": {
+ "title": "Undangan dukungan",
+ "description": "Buka dialog undangan sebenarnya, bandingkan penyimpanan dan kesalahan, lalu coba tunda, tautan GitHub, dan jangan ingatkan lagi.",
+ "options": "open, saving, dan error adalah status tampilan. Titik masuk StarPrompt yang ada mengelola penerimaan undangan dan penyimpanan preferensi; tampilan hanya memanggil tindakan yang diberikan.",
+ "state": "Status undangan",
+ "view": "Lihat undangan",
+ "dismissed": "Jangan ingatkan lagi dipilih dalam pratinjau",
+ "starred": "Tautan GitHub dipilih dalam pratinjau"
+ }
+}
diff --git a/webui/src/dev/gallery/locales/controls/ja.json b/webui/src/dev/gallery/locales/controls/ja.json
new file mode 100644
index 000000000..e394cfec3
--- /dev/null
+++ b/webui/src/dev/gallery/locales/controls/ja.json
@@ -0,0 +1,500 @@
+{
+ "common": {
+ "unavailable": "利用不可",
+ "selected": "選択中:{{value}}",
+ "savingPreview": "プレビューの値を保存中…",
+ "savedPreview": "プレビューの値を保存しました",
+ "providerAction": "プロバイダーの設定操作を選択しました",
+ "reset": "プレビューをリセット"
+ },
+ "button": {
+ "title": "ボタン",
+ "description": "同じボタンの見た目やサイズをオプションで変更します。",
+ "options": "variant は見た目、size は寸法を変更します。disabled は操作を無効にし、onClick は呼び出し側が提供します。",
+ "variants": "バリエーション — 同じボタンの異なるスタイル",
+ "sizes": "サイズ",
+ "add": "サンプルを追加",
+ "clicks": "ボタンのクリック数:{{count}}"
+ },
+ "input": {
+ "title": "入力欄",
+ "description": "テキスト入力と共通の検索用バリエーション。",
+ "options": "通常の入力には Input、検索には SearchInput を使います。ラベルを付け、無効な入力の理由を説明してください。",
+ "name": "サンプルの名前",
+ "projectName": "プロジェクト名",
+ "search": "検索",
+ "searchName": "サンプル検索",
+ "searchProjects": "プロジェクトを検索",
+ "invalid": "無効な入力",
+ "invalidName": "無効な名前",
+ "required": "プロジェクト名を入力してください。",
+ "disabledName": "無効化された名前の入力欄"
+ },
+ "textarea": {
+ "title": "複数行入力",
+ "description": "共通のフォーカス表示を使う複数行テキスト。",
+ "options": "textarea の標準プロパティである value、onChange、rows、disabled を受け取ります。",
+ "notes": "サンプルのメモ",
+ "disabledNotes": "無効化されたメモ欄",
+ "readOnly": "読み取り専用プレビュー"
+ },
+ "toggle": {
+ "title": "スイッチ",
+ "description": "設定、ワークスペース、チャンネルで共有する制御されたオン・オフスイッチ。",
+ "options": "checked と onChange は呼び出し側が管理します。label はアクセシブルな名前を指定します。",
+ "enable": "サンプルを有効にする",
+ "unavailableOn": "操作できないオンのスイッチ",
+ "unavailableOff": "操作できないオフのスイッチ"
+ },
+ "select": {
+ "title": "選択コントロール",
+ "description": "キーボード操作と無効な選択肢に対応した単一選択。",
+ "options": "Select、SelectTrigger、SelectValue、SelectContent、SelectItem を組み合わせます。ルートが value/onValueChange を管理します。",
+ "fast": "高速",
+ "model": "サンプルのモデル",
+ "disabledModel": "無効化されたモデル選択"
+ },
+ "segmented": {
+ "title": "セグメント選択",
+ "description": "少数の選択肢を常に表示します。",
+ "options": "value、options、onChange は制御された値です。mode=\"tabs\" で矢印キーによるタブ移動を追加します。",
+ "day": "日",
+ "week": "週",
+ "month": "月",
+ "period": "サンプルの期間",
+ "selected": "選択した期間:{{value}}"
+ },
+ "combobox": {
+ "title": "検索付き選択",
+ "description": "共通のキーボード・ポインター操作を備えた検索可能な選択肢。",
+ "options": "useComboboxNavigation は入力欄、リスト、選択肢のプロパティを提供します。値の絞り込みと選択状態は呼び出し側が管理します。",
+ "search": "サンプルの選択肢を検索",
+ "placeholder": "入力するか矢印キーを使用",
+ "choices": "サンプルの選択肢",
+ "empty": "一致する選択肢はありません",
+ "selected": "選択した項目:{{value}}"
+ },
+ "chevron": {
+ "title": "コントロールの矢印",
+ "description": "選択コントロールで共有する山形の矢印。",
+ "options": "className で配置を調整できます。アイコンは装飾用で、アクセシブルな名前は所属するコントロールが提供します。"
+ },
+ "dialog": {
+ "title": "ダイアログ",
+ "description": "下書き編集、入れ子の選択、フォーカス復帰を備えたモーダルエディター。",
+ "options": "open/onOpenChange と下書き・保存の動作は呼び出し側が管理します。DialogTitle は必須で、必要に応じて説明も付けます。",
+ "open": "ダイアログを開く",
+ "edit": "サンプルのラベルを編集",
+ "help": "変更はこのプレビューだけに適用されます。",
+ "label": "サンプルのラベル",
+ "save": "ラベルを保存",
+ "saved": "保存したラベル:{{name}}"
+ },
+ "alert": {
+ "title": "確認ダイアログ",
+ "description": "キャンセルと実行を分けて明示的な確認を求めます。",
+ "options": "タイトル、説明、フッターを組み合わせ、AlertDialogAction のハンドラーで操作を実行します。",
+ "remove": "サンプルを削除",
+ "confirmTitle": "このサンプルを削除しますか?",
+ "help": "変更されるのはプレビューの状態だけです。",
+ "confirm": "削除を確定",
+ "removed": "サンプルを削除しました。",
+ "available": "サンプルは利用可能です。"
+ },
+ "sheet": {
+ "title": "サイドパネル",
+ "description": "表示領域の端に配置するモーダルパネル。",
+ "options": "SheetContent は side に対応します。SheetTitle と SheetDescription を含めてください。",
+ "open": "サイドパネルを開く",
+ "panelTitle": "サンプルのサイドパネル",
+ "help": "現在のページの横に補助コントロールを表示します。",
+ "notes": "パネルのメモ",
+ "placeholder": "ここで編集を試してください"
+ },
+ "popover": {
+ "title": "ポップオーバー",
+ "description": "トリガーに固定された小さな操作領域。",
+ "options": "トリガーと内容を組み合わせます。open/onOpenChange は制御可能です。内容は所属するダイアログのポータルに従います。",
+ "open": "ポップオーバーを開く",
+ "note": "クイックメモ"
+ },
+ "menu": {
+ "title": "ドロップダウンメニュー",
+ "description": "操作、単一選択、入れ子のメニュー、無効な項目。",
+ "options": "操作には onSelect、選択を保持する場合はラジオグループを使います。",
+ "view": "表示オプション",
+ "layout": "レイアウト",
+ "comfortable": "ゆったり",
+ "compact": "コンパクト",
+ "rename": "名前を変更",
+ "more": "その他の操作",
+ "duplicate": "複製",
+ "none": "なし",
+ "status": "表示密度:{{density}}。操作:{{action}}。"
+ },
+ "tooltip": {
+ "title": "ツールチップとヒント",
+ "description": "HoverHint は共通のツールチップ基本要素を組み合わせます。公開インポート先は tooltip.tsx です。",
+ "options": "通常のヒントには HoverHint を使います。重要なエラーは常に表示してください。ホバーとキーボードフォーカスは製品共通の表示タイミングに従います。",
+ "primitive": "基本ツールチップ",
+ "primitiveHelp": "ポインターには共通の遅延を適用し、キーボードフォーカスではすぐ表示します。",
+ "hint": "ホバーヒント",
+ "hintHelp": "同じフォーカス・ポインター動作を備えた組み合わせ式のヒントです。"
+ },
+ "truncated": {
+ "title": "省略テキストのヒント",
+ "description": "計測したテキストが省略されている場合だけヒントを表示します。",
+ "options": "text と制限した幅を指定します。テキスト自体にキーボードフォーカスを当てる場合は tabIndex を追加します。"
+ },
+ "disclosure": {
+ "title": "折りたたみ領域",
+ "description": "閉じている間も子要素の状態を保持する展開領域。",
+ "options": "Disclosure が展開を管理します。カスタムトリガーには DisclosureContent の制御された open プロパティを使えます。",
+ "show": "詳細オプションを表示",
+ "help": "閉じて開き直しても、この下書きは残ります。",
+ "draft": "折りたたみ領域の下書き"
+ },
+ "expandable": {
+ "title": "展開できるテキスト",
+ "description": "同じテキストをマウントしたまま行数を制限して表示します。",
+ "options": "expanded は呼び出し側が管理します。lines は折りたたみ時の行数です。アクセシブルな切り替え操作を用意してください。",
+ "less": "折りたたむ",
+ "more": "もっと見る"
+ },
+ "imageViewport": {
+ "title": "画像表示領域",
+ "description": "画像単位のフィット、ズーム、移動、ピンチ操作。",
+ "options": "className で領域を制限し、画像の識別情報が変わったら再マウントします。ギャラリーが矢印キー操作を管理する場合は panWithArrows=false にします。"
+ },
+ "streaming": {
+ "title": "アニメーションラベル",
+ "description": "思考中や実行中のツールラベルで共有するテキストアニメーション。",
+ "options": "active がアニメーションを制御します。文字列または数値の子要素がグリフの重ね合わせに使われ、動きを減らす設定も尊重します。",
+ "animate": "ラベルをアニメーション表示",
+ "working": "次のステップを処理中…"
+ },
+ "markdown": {
+ "title": "Markdown の返信",
+ "description": "表、コード、数式に対応した本番用ストリーミングレンダラー。",
+ "options": "children は Markdown テキストです。streaming は未完了の内容を制御し、onOpenFilePreview は画面側が提供します。",
+ "state": "Markdown の状態"
+ },
+ "code": {
+ "title": "コード表示",
+ "description": "構文強調、行番号、コピー、ANSI 出力、表示領域に応じた行描画。",
+ "options": "code と language は内容を指定し、showLineNumbers、wrapLongLines、chrome は表示を制御します。表示領域の強調には行番号と折り返しなしの行が必要です。",
+ "format": "コード形式"
+ },
+ "math": {
+ "title": "数式",
+ "description": "Markdown のブロック数式の幅を調整する共通ラッパー。",
+ "options": "TeX ソースには MarkdownText を使います。DisplayMath は描画済みの数式ノードを受け取り、利用できる幅に合わせて縮尺を調整します。"
+ },
+ "message": {
+ "title": "メッセージ",
+ "description": "思考や送信の状態を含むユーザーとアシスタントのメッセージ。",
+ "options": "message はチャット実行環境が投影する UIMessage です。データ操作とネットワーク処理はレンダラーの外側で行います。",
+ "state": "メッセージの状態"
+ },
+ "activity": {
+ "title": "エージェントの活動",
+ "description": "活動の基本要素を、処理中・完了・失敗のシーケンスに組み合わせます。",
+ "options": "テキスト、状態、制御された展開値を渡します。ツールの実行は gateway が管理し、これらのコンポーネントはその投影状態を描画します。",
+ "state": "活動の状態",
+ "working": "処理中",
+ "details": "活動の詳細",
+ "collapse": "折りたたむ",
+ "readError": "ファイルを読み取れませんでした",
+ "read": "ソースを読む"
+ },
+ "files": {
+ "title": "ファイルの変更",
+ "description": "ファイル参照、変更行数、展開可能な差分。",
+ "options": "edits は表示用の概要を持ち、displayMode は summary/diff/collapsed_diff を選びます。onOpenFilePreview は画面側が提供します。",
+ "error": "サンプルの変更を適用できませんでした。",
+ "state": "ファイル変更の状態",
+ "operation": "ファイル操作",
+ "display": "差分表示",
+ "selected": "選択したファイル:{{path}}",
+ "hint": "ファイル参照を選択してコールバックを試してください。"
+ },
+ "media": { "study": "色彩練習 {{count}}" },
+ "imageGallery": {
+ "title": "画像サムネイル",
+ "description": "複数画像の配置、サムネイルの選択、追加画像の表示。",
+ "options": "images は URL と名前、size は大きいサムネイルかコンパクト表示、align は配置を指定します。サムネイルは最大4枚で、内蔵の ImageLightbox には表示可能な全画像が含まれます。",
+ "sixImages": "6枚の画像",
+ "compact": "コンパクトなサムネイル",
+ "hint": "サムネイルまたは +2 を選ぶと、6枚すべてを表示できます。"
+ },
+ "imageLightbox": {
+ "title": "全画面画像ビューアー",
+ "description": "制御された全画面表示と画像切り替え。",
+ "options": "閉じているとき index は null です。index と開閉コールバックは呼び出し側が管理します。ImageLightbox は ZoomableImage を内蔵し、画像の変更時に表示をリセットします。",
+ "open": "全画面ビューアーを開く",
+ "hint": "前後のボタン、←/→、Home/End で切り替え、× または Escape で閉じます。"
+ },
+ "zoomableImage": {
+ "title": "画像ズーム",
+ "description": "単一画像のズーム、範囲内の移動、ジェスチャー操作。",
+ "options": "src と alt は1枚の画像を指定します。配置と高さを定めたコンテナに入れ、画像変更時に再マウントします。表示領域にフォーカスすると +、−、0 キーを使えます。",
+ "hint": "+/−、ダブルクリック、Ctrl+ホイール、ピンチでズームします。拡大後はドラッグやスクロールで移動し、倍率をクリックするか 0 キーでリセットします。"
+ },
+ "attachment": {
+ "title": "添付ファイル",
+ "description": "画像プレビュー、動画再生、ダウンロード、利用不可の添付ファイル。",
+ "options": "attachment.kind は image、video、file を選びます。画像は ImageLightbox、動画は標準コントロール、ファイルはダウンロードリンクを使います。URL がない場合や画像読み込みに失敗した場合は利用不可のタイルを表示します。",
+ "image": "画像",
+ "video": "再生可能な動画",
+ "file": "ファイルをダウンロード",
+ "unavailable": "利用できない添付ファイル(URL なし)"
+ },
+ "fileReference": {
+ "title": "ファイル参照",
+ "description": "開く操作を呼び出し側が管理するファイル参照。",
+ "options": "path はラベル、onOpen は操作を提供します。コンポーネントはワークスペースの権限を決定しません。",
+ "select": "ファイル参照を選択してください。"
+ },
+ "settingsComposition": {
+ "title": "設定の組み合わせ",
+ "description": "実際の設定行・グループ・機能コンポーネントと共通コントロールの組み合わせ。",
+ "options": "値と永続化は外側の設定コントローラーが管理します。ギャラリーのコールバックはローカルのプレビュー状態だけを更新します。",
+ "preferences": "サンプルの設定",
+ "keepDrafts": "下書きを保持",
+ "switchHint": "制御されたスイッチを備えた共通の設定行。",
+ "projectLabel": "プロジェクトラベル",
+ "projectName": "設定のプロジェクトラベル",
+ "capability": "サンプル機能",
+ "notes": "メモ",
+ "capabilityNotes": "機能のメモ",
+ "localOnly": "ローカルプレビューのみ"
+ },
+ "modelPickers": {
+ "title": "モデル選択",
+ "description": "プロバイダーを選び、モデル ID を検索・入力し、推論の強度を調整します。",
+ "options": "ProviderPicker の値と操作は呼び出し側が提供します。ModelIdPicker の models は固定カタログ、ReasoningEffortPicker の savedValues は既存の選択肢を提供できます。",
+ "chooseProvider": "プロバイダーを選択",
+ "configure": "{{provider}} を設定"
+ },
+ "providerIcons": {
+ "title": "プロバイダーアイコン",
+ "description": "通常・コンパクト・全体表示のサイズと、選択欄の未設定状態を比較します。",
+ "options": "provider は既存のアイコンを選び、compact と fill はサイズを制御します。showBrandLogos=false は組み込みアイコンを使います。",
+ "size": "アイコンのサイズ"
+ },
+ "timezone": {
+ "title": "タイムゾーン選択",
+ "description": "タイムゾーン名、中国語名、UTC オフセットで検索し、同じ時刻の現地時間を確認します。",
+ "options": "value は IANA タイムゾーンです。onChange が呼び出し側の値を更新します。検索とキーボード操作はコンポーネントが提供します。"
+ },
+ "textEditor": {
+ "title": "テキスト編集とヒント",
+ "description": "エディターを開いて変更・保存・キャンセルします。内容を空にして保存するとエラーを確認できます。",
+ "options": "SettingsTextEditor は onSave の成功後に閉じ、失敗時はエラーを表示します。SettingsHint はホバー、フォーカス、クリックで開きます。",
+ "state": "編集状態",
+ "hint": "エディターを開いて変更・保存・キャンセルできます。内容を空にするとエラー状態を確認できます。",
+ "instructions": "サンプルの指示",
+ "edit": "サンプルの指示を編集",
+ "help": "保存すると、変更した内容が下に表示されます。",
+ "required": "内容を入力してください。"
+ },
+ "removePreset": {
+ "title": "プリセットの削除",
+ "description": "未使用のモデルプリセットを削除し、既定モデルが使用中のプリセットの無効状態を確認します。",
+ "options": "ModelsSettings で使う削除ボタンです。disabled と削除操作は呼び出し側が提供します。プロバイダー管理には ProvidersSettings ダイアログを使います。",
+ "defaultModel": "既定のモデル",
+ "codeAssistant": "コーディングアシスタント",
+ "remove": "{{name}} を削除",
+ "primaryHint": "既定のモデルが使用中のプリセットは削除できません。",
+ "count": "プレビューのプリセット数:{{count}}"
+ },
+ "loading": {
+ "title": "読み込み表示",
+ "description": "アプリ、チャンネル、スキルの読み込みレイアウトを切り替え、共通の状態コンテナを確認します。",
+ "options": "CatalogSkeleton の layout はレイアウトを選びます。SkeletonStatus は label で読み上げ用の状態を伝え、装飾内容を aria-hidden にします。",
+ "layout": "カタログのレイアウト",
+ "catalog": "プレビューのカタログを読み込み中"
+ },
+ "sidebar": {
+ "title": "設定ナビゲーション",
+ "description": "項目の選択、再起動待ちの処理、ブラウザー幅を狭めたモバイルメニューを試します。",
+ "options": "activeSection と onSelectSection が選択を制御します。戻る、ログアウト、再起動は呼び出し側のコールバックです。",
+ "back": "チャットに戻る",
+ "logout": "ログアウト",
+ "restart": "プレビューの再起動操作を処理しました",
+ "hint": "設定項目を選ぶか、ブラウザー幅を狭めてモバイル用ナビゲーションを確認してください。",
+ "toggleRestart": "再起動待ちを切り替え"
+ },
+ "providerSearch": {
+ "title": "プロバイダー検索",
+ "description": "OAuth、API キー、ローカル別に検索し、項目またはカスタムプロバイダーを選択します。",
+ "options": "providers は既存のカタログです。query は制御された検索値で、onSelect と onCustom は選択を親に渡します。",
+ "closed": "検索を閉じました",
+ "custom": "カスタムプロバイダーを選択しました",
+ "hint": "プロバイダーを検索するか、矢印キーで選択してください。"
+ },
+ "requestParameters": {
+ "title": "リクエストパラメーター",
+ "description": "ヘッダー、クエリ、本文を編集します。無効な JSON を入力すると実際の検証結果を確認できます。",
+ "options": "fields は表示項目、form は JSON テキストを保持します。ヘッダーとクエリの値は文字列のみ、本文は任意の JSON オブジェクト値に対応します。"
+ },
+ "requestAPI": {
+ "title": "リクエスト API",
+ "description": "プロバイダーの対応 API、既定 API、モデル別の上書きとフォールバックを選びます。",
+ "options": "ProviderAPIControl は API を最低1つ保持します。ModelAPIControl は null で自動選択を示し、プロバイダーの能力に応じて利用可能な API を表示します。",
+ "providerAPI": "プロバイダー API",
+ "modelOverride": "モデルの上書き"
+ },
+ "usage": {
+ "title": "トークン使用量",
+ "description": "データあり・空・利用不可の状態を切り替えます。棒にホバーして日別使用量、詳細でモデル別推移を確認します。",
+ "options": "usage は呼び出し側の統計情報です。timeZone は日付の境界を定義します。詳細ダイアログとグラフは渡されたデータだけを表示します。",
+ "state": "使用量の状態"
+ },
+ "overview": {
+ "title": "設定の概要",
+ "description": "現在のモデル、機能状態、使用量を確認し、機能行で設定項目への移動を試します。",
+ "options": "settings が概要データを提供し、onSelectSection が選択した設定項目を受け取ります。",
+ "selected": "選択した項目:{{section}}"
+ },
+ "web": {
+ "title": "ウェブ検索設定",
+ "description": "認証不要・API キー・サーバー URL のプロバイダーを切り替え、検索オプションと自動保存を試します。",
+ "options": "settings は現在の設定、form は編集値を保持します。保存、認証情報の表示、プロバイダー切り替えは親が提供します。",
+ "unsaved": "プレビューの下書きは未保存です"
+ },
+ "image": {
+ "title": "画像生成設定",
+ "description": "画像生成を切り替え、固定カタログからモデル、縦横比、サイズを選び、詳細設定で枚数を調整します。",
+ "options": "form は制御された設定、dirty は変更の印です。プロバイダーの認証情報を再利用し、保存は親が実装します。"
+ },
+ "voice": {
+ "title": "文字起こし設定",
+ "description": "文字起こしを切り替え、モデル、言語、時間、アップロード容量の制限を編集して自動保存を試します。",
+ "options": "settings がプロバイダー情報を提供し、form と保存コールバックは親が管理します。"
+ },
+ "safety": {
+ "title": "アクセス設定",
+ "description": "ローカルサービスへのアクセスと既定の権限を切り替え、設定行、ヒント、自動保存の通知を確認します。",
+ "options": "form は表示値を提供し、onSave は保存要求を処理します。実行時の権限制御は引き続き gateway が担当します。"
+ },
+ "channelCatalog": {
+ "title": "チャンネル一覧と識別表示",
+ "description": "実行中・起動中・失敗・未インストールを切り替え、スイッチ、インストール、ヘルプを試します。",
+ "options": "feature はインストール状態と実行状態を提供します。onAction と onSelect は親が処理し、識別表示、エラー、ヘルプは同じチャンネルデータを使います。",
+ "exampleChannel": "サンプルチャンネル",
+ "state": "チャンネルの状態",
+ "error": "サンプルの接続に失敗しました。",
+ "stopped": "停止中",
+ "running": "実行中",
+ "starting": "起動中",
+ "failed": "失敗",
+ "selected": "チャンネル設定を選択しました",
+ "hint": "スイッチやインストールボタンで状態の変化を確認してください。"
+ },
+ "credentials": {
+ "title": "チャンネル認証情報",
+ "description": "認証情報の入力、機密値の表示・非表示、接続プリセット、必須項目の確認、補助コマンドのコピーを試します。",
+ "options": "fields はグループとコントロールを定義し、values と visibleSecrets は制御された値です。requirements は認証情報の組み合わせを定義します。プリセットと保存のコールバックはこのサンプルだけを更新します。",
+ "botToken": "ボットトークン",
+ "tokenPlaceholder": "サンプルのトークン",
+ "serverURL": "サーバー URL",
+ "replyMode": "返信モード",
+ "mentions": "メンション",
+ "allMessages": "すべてのメッセージ",
+ "allowFrom": "許可する送信者",
+ "local": "ローカルサーバー",
+ "hosted": "ホスト型サーバー",
+ "required": "ボットトークンを入力してください。",
+ "checkSave": "確認して保存",
+ "command": "サンプルコマンド",
+ "applied": "{{name}} を適用しました",
+ "incomplete": "認証情報を入力してください。",
+ "saved": "プレビューの認証情報を保存しました。",
+ "hint": "認証情報を入力し、機密値の表示を切り替えるか、接続プリセットを適用してください。"
+ },
+ "channelValidation": {
+ "title": "接続チェック",
+ "description": "確認中・成功・失敗を切り替え、順番に表示されるチェックと識別情報を確認します。",
+ "options": "validation はチェック記録を提供し、validating は読み込みを制御します。コンポーネントは表示のみを行います。",
+ "expired": "サンプルのトークンは期限切れです。",
+ "result": "チェック結果"
+ },
+ "runAt": {
+ "title": "実行日時の選択",
+ "description": "日時を入力するか、カレンダーを開いてマウス、矢印キー、ページキーで日付を選びます。",
+ "options": "value は YYYY-MM-DDTHH:mm 形式のローカル日時です。onChange は編集値を返します。無効な入力は既存のフォームコントロールに表示します。"
+ },
+ "automationCalendar": {
+ "title": "自動化カレンダー",
+ "description": "月、予定、履歴を切り替え、成功・失敗の記録から結果を開きます。幅が狭い場合は予定リストを表示します。",
+ "options": "jobs と month が内容を決めます。onInspect は予定タスクを処理し、renderRunDialog による結果表示は呼び出し側が提供します。カレンダーはサービスを読み取りません。",
+ "providerError": "サンプルのプロバイダーは利用できませんでした。",
+ "state": "予定の状態",
+ "previousMonth": "前の月",
+ "nextMonth": "次の月",
+ "planned": "予定",
+ "recorded": "実行履歴",
+ "running": "実行中",
+ "failed": "失敗",
+ "completed": "完了",
+ "skipped": "スキップ",
+ "system": "システムタスク",
+ "noEntries": "今月の予定はありません",
+ "more": "ほか {{count}} 件",
+ "selected": "選択したタスク:{{name}}",
+ "hint": "実行記録を選んで結果を見るか、予定タスクを選択してください。"
+ },
+ "providers": {
+ "title": "プロバイダー管理",
+ "description": "実際のプロバイダー管理ダイアログと追加の流れを確認します。",
+ "options": "設定の ProvidersSettings を再利用します。カタログ、フォーム、保存コールバックは呼び出し側が管理します。ローカルのサンプルデータを変更し、設定・検索・作成・キャンセルを試せます。",
+ "invalidParameters": "有効なリクエストパラメーターの JSON を入力してください。ヘッダーとクエリの値は文字列で指定します。",
+ "saved": "{{name}} のプレビュー設定を保存しました",
+ "added": "{{name}} を追加しました",
+ "signedIn": "プレビューの認証をログイン済みにしました",
+ "signedOut": "プレビューの認証を未ログインにしました",
+ "builtInIcons": "組み込みアイコンを使う",
+ "brandIcons": "ブランドアイコンを使う",
+ "configured": "設定済みプロバイダー数:{{count}}",
+ "providerAdded": "プロバイダーを追加しました"
+ },
+ "runResult": {
+ "title": "自動実行の結果",
+ "description": "結果を開き、Markdown 返信、読み込み、再試行、空の返信、履歴なしを比較します。",
+ "options": "result は読み込み状態と取得済みの返信を提供します。onRetry は呼び出し側が処理します。このビューは実行状態の読み取りや結果の取得要求を行いません。",
+ "state": "実行結果",
+ "view": "実行結果を表示"
+ },
+ "chatBinding": {
+ "title": "実行先チャット",
+ "description": "実行先チャットを選び、指示を編集・確定・元に戻す・キャンセルします。使用中、読み込みエラー、競合も比較できます。",
+ "options": "data と job は利用可能なチャットと関連付けのバージョンを提供します。ビューは確認用の下書きを管理し、機能の入口が onSave、onSaved、onReload をデータ操作に接続します。",
+ "state": "チャット関連付けの状態",
+ "setChat": "実行先チャットを設定",
+ "saved": "次の実行は {{title}} で行われます",
+ "hint": "実行先チャットを選び、タスクの指示を確認または編集してください。"
+ },
+ "about": {
+ "title": "製品情報とバージョン",
+ "description": "バージョン確認、コミットリンク、更新、製品情報を比較します。ボタンはサンプル結果で表示を更新します。",
+ "options": "AboutSettingsView はバージョンとサポートリンクの組み合わせを受け取ります。VersionCheckRowView は checking/result を表示し、onCheck で確認を要求します。実際の確認と診断リンクのデータは機能の入口が管理します。",
+ "error": "バージョン情報を取得できませんでした。再試行してください。",
+ "state": "バージョンの状態",
+ "selectedLink": "GitHub リンクを選択しました"
+ },
+ "appearance": {
+ "title": "表示設定",
+ "description": "外観、活動表示、ファイル差分、通知を切り替えます。サンプルの値は下に表示されます。",
+ "options": "テーマと設定は呼び出し側が管理します。onChangeBrowserNotifications は権限要求を機能の入口に委ね、プレビューのコールバックはサンプルのスイッチだけを変更します。"
+ },
+ "starInvitation": {
+ "title": "応援のお願い",
+ "description": "実際のダイアログを開き、保存・エラー状態、後で通知、GitHub リンク、今後表示しない操作を試します。",
+ "options": "open、saving、error は表示状態です。招待の取得と設定の永続化は既存の StarPrompt 入口が管理し、ビューは渡された操作だけを呼び出します。",
+ "state": "招待の状態",
+ "view": "招待を表示",
+ "dismissed": "プレビューで今後表示しないを選択しました",
+ "starred": "プレビューで GitHub リンクを選択しました"
+ }
+}
diff --git a/webui/src/dev/gallery/locales/controls/ko.json b/webui/src/dev/gallery/locales/controls/ko.json
new file mode 100644
index 000000000..bf8bec922
--- /dev/null
+++ b/webui/src/dev/gallery/locales/controls/ko.json
@@ -0,0 +1,500 @@
+{
+ "common": {
+ "unavailable": "사용 불가",
+ "selected": "선택: {{value}}",
+ "savingPreview": "미리보기 값 저장 중…",
+ "savedPreview": "미리보기 값을 저장했습니다",
+ "providerAction": "제공업체 설정 작업을 선택했습니다",
+ "reset": "미리보기 초기화"
+ },
+ "button": {
+ "title": "버튼",
+ "description": "같은 버튼의 모양과 크기를 옵션으로 바꿉니다.",
+ "options": "variant는 모양, size는 크기를 바꿉니다. disabled는 상호작용을 차단하며 onClick은 호출 측에서 제공합니다.",
+ "variants": "변형 — 같은 버튼의 여러 스타일",
+ "sizes": "크기",
+ "add": "예제 추가",
+ "clicks": "버튼 클릭 수: {{count}}"
+ },
+ "input": {
+ "title": "입력 필드",
+ "description": "텍스트 입력과 공통 검색 필드 변형입니다.",
+ "options": "일반 필드에는 Input, 검색에는 SearchInput을 사용합니다. 레이블을 제공하고 잘못된 입력을 설명하세요.",
+ "name": "예제 이름",
+ "projectName": "프로젝트 이름",
+ "search": "검색",
+ "searchName": "예제 검색",
+ "searchProjects": "프로젝트 검색",
+ "invalid": "잘못된 입력",
+ "invalidName": "잘못된 이름",
+ "required": "프로젝트 이름을 입력하세요.",
+ "disabledName": "비활성화된 이름 필드"
+ },
+ "textarea": {
+ "title": "여러 줄 입력",
+ "description": "공통 포커스 스타일을 사용하는 여러 줄 텍스트입니다.",
+ "options": "기본 textarea 속성인 value, onChange, rows, disabled를 받습니다.",
+ "notes": "예제 메모",
+ "disabledNotes": "비활성화된 메모",
+ "readOnly": "읽기 전용 미리보기"
+ },
+ "toggle": {
+ "title": "스위치",
+ "description": "설정, 작업 공간, 채널에서 공유하는 제어형 켜기/끄기 스위치입니다.",
+ "options": "checked와 onChange는 호출 측에서 관리합니다. label은 접근 가능한 이름을 제공합니다.",
+ "enable": "예제 활성화",
+ "unavailableOn": "조작할 수 없는 켜진 스위치",
+ "unavailableOff": "조작할 수 없는 꺼진 스위치"
+ },
+ "select": {
+ "title": "선택 컨트롤",
+ "description": "키보드 탐색과 비활성 옵션을 지원하는 단일 선택입니다.",
+ "options": "Select, SelectTrigger, SelectValue, SelectContent, SelectItem을 조합합니다. 루트가 value/onValueChange를 관리합니다.",
+ "fast": "빠름",
+ "model": "예제 모델",
+ "disabledModel": "비활성화된 모델 선택"
+ },
+ "segmented": {
+ "title": "분할 선택",
+ "description": "적은 수의 선택지를 항상 표시합니다.",
+ "options": "value, options, onChange는 제어되는 값입니다. mode=\"tabs\"는 방향키를 사용한 탭 탐색을 추가합니다.",
+ "day": "일",
+ "week": "주",
+ "month": "월",
+ "period": "예제 기간",
+ "selected": "선택한 기간: {{value}}"
+ },
+ "combobox": {
+ "title": "검색 가능한 선택",
+ "description": "공통 키보드 및 포인터 탐색을 사용하는 검색 가능한 선택지입니다.",
+ "options": "useComboboxNavigation은 입력, 목록, 옵션 속성을 제공합니다. 호출 측에서 값을 필터링하고 선택 상태를 관리합니다.",
+ "search": "예제 옵션 검색",
+ "placeholder": "입력하거나 방향키를 사용하세요",
+ "choices": "예제 옵션",
+ "empty": "일치하는 옵션이 없습니다",
+ "selected": "선택한 옵션: {{value}}"
+ },
+ "chevron": {
+ "title": "컨트롤 화살표",
+ "description": "선택 컨트롤에서 공유하는 꺾쇠 화살표입니다.",
+ "options": "className으로 위치를 조정할 수 있습니다. 아이콘은 장식용이며 접근 가능한 이름은 해당 컨트롤이 제공합니다."
+ },
+ "dialog": {
+ "title": "대화상자",
+ "description": "임시 변경, 중첩 선택, 포커스 복귀를 지원하는 모달 편집기입니다.",
+ "options": "호출 측에서 open/onOpenChange와 초안 및 저장 동작을 관리합니다. DialogTitle을 항상 제공하고 필요하면 설명을 추가하세요.",
+ "open": "대화상자 열기",
+ "edit": "예제 레이블 편집",
+ "help": "변경 사항은 이 미리보기에만 적용됩니다.",
+ "label": "예제 레이블",
+ "save": "레이블 저장",
+ "saved": "저장한 레이블: {{name}}"
+ },
+ "alert": {
+ "title": "확인 대화상자",
+ "description": "취소와 실행 컨트롤을 분리하여 명확하게 확인합니다.",
+ "options": "제목, 설명, 하단 영역을 조합하고 AlertDialogAction의 핸들러에서 작업을 실행합니다.",
+ "remove": "예제 제거",
+ "confirmTitle": "이 예제를 제거할까요?",
+ "help": "미리보기 상태만 변경됩니다.",
+ "confirm": "제거 확인",
+ "removed": "예제를 제거했습니다.",
+ "available": "예제를 사용할 수 있습니다."
+ },
+ "sheet": {
+ "title": "측면 패널",
+ "description": "표시 영역의 가장자리에 붙는 모달 패널입니다.",
+ "options": "SheetContent는 side를 지원합니다. SheetTitle과 SheetDescription을 포함하세요.",
+ "open": "측면 패널 열기",
+ "panelTitle": "예제 측면 패널",
+ "help": "현재 페이지 옆에 표시하는 보조 컨트롤입니다.",
+ "notes": "패널 메모",
+ "placeholder": "여기에서 편집해 보세요"
+ },
+ "popover": {
+ "title": "팝오버",
+ "description": "트리거에 고정된 작은 상호작용 영역입니다.",
+ "options": "트리거와 내용을 조합합니다. open/onOpenChange를 제어할 수 있습니다. 내용은 상위 대화상자의 포털을 따릅니다.",
+ "open": "팝오버 열기",
+ "note": "빠른 메모"
+ },
+ "menu": {
+ "title": "드롭다운 메뉴",
+ "description": "작업, 단일 선택, 중첩 메뉴, 비활성 항목입니다.",
+ "options": "작업에는 onSelect를, 지속되는 선택에는 라디오 그룹을 사용합니다.",
+ "view": "보기 옵션",
+ "layout": "레이아웃",
+ "comfortable": "여유롭게",
+ "compact": "촘촘하게",
+ "rename": "이름 바꾸기",
+ "more": "추가 작업",
+ "duplicate": "복제",
+ "none": "없음",
+ "status": "밀도: {{density}}. 작업: {{action}}."
+ },
+ "tooltip": {
+ "title": "도구 설명과 힌트",
+ "description": "HoverHint는 공통 도구 설명 기본 요소를 조합하며 tooltip.tsx가 공개 가져오기 경로입니다.",
+ "options": "일반 힌트에는 HoverHint를 사용합니다. 중요한 오류는 항상 표시하세요. 호버와 키보드 포커스는 제품 공통의 표시 시간 규칙을 따릅니다.",
+ "primitive": "기본 도구 설명",
+ "primitiveHelp": "포인터에는 공통 지연을 적용하고 키보드 포커스에는 즉시 표시합니다.",
+ "hint": "호버 힌트",
+ "hintHelp": "같은 포커스 및 포인터 동작을 사용하는 조합형 힌트입니다."
+ },
+ "truncated": {
+ "title": "잘린 텍스트 힌트",
+ "description": "측정한 텍스트가 잘린 경우에만 힌트를 표시합니다.",
+ "options": "text와 제한된 너비를 지정합니다. 텍스트 자체가 키보드 포커스를 받아야 하면 tabIndex를 추가하세요."
+ },
+ "disclosure": {
+ "title": "접을 수 있는 내용",
+ "description": "접힌 상태에서도 자식 상태를 유지하는 확장 영역입니다.",
+ "options": "Disclosure가 확장을 관리합니다. 사용자 지정 트리거에는 DisclosureContent의 제어형 open 속성을 사용할 수 있습니다.",
+ "show": "고급 옵션 표시",
+ "help": "닫았다 다시 열어도 이 초안은 유지됩니다.",
+ "draft": "접이식 영역 초안"
+ },
+ "expandable": {
+ "title": "펼칠 수 있는 텍스트",
+ "description": "같은 텍스트를 마운트한 채로 줄 수를 제한해 미리 봅니다.",
+ "options": "호출 측에서 expanded를 관리합니다. lines는 접힌 줄 수를 정합니다. 접근 가능한 전환 컨트롤을 제공하세요.",
+ "less": "접기",
+ "more": "더 보기"
+ },
+ "imageViewport": {
+ "title": "이미지 표시 영역",
+ "description": "이미지별 맞춤, 확대/축소, 이동, 핀치 컨트롤입니다.",
+ "options": "className으로 영역을 제한하고 이미지 식별 정보가 달라지면 다시 마운트합니다. 갤러리가 방향키 탐색을 관리하면 panWithArrows=false로 설정합니다."
+ },
+ "streaming": {
+ "title": "애니메이션 레이블",
+ "description": "진행 중인 사고와 도구 레이블이 공유하는 텍스트 애니메이션입니다.",
+ "options": "active가 애니메이션을 제어합니다. 문자열 또는 숫자 자식이 글리프 오버레이를 제공하며 동작 줄이기 설정을 따릅니다.",
+ "animate": "레이블 애니메이션",
+ "working": "다음 단계 처리 중…"
+ },
+ "markdown": {
+ "title": "Markdown 답변",
+ "description": "표, 코드, 수식을 포함하는 실제 스트리밍 렌더러입니다.",
+ "options": "children은 Markdown 텍스트입니다. streaming은 미완성 내용을 제어하며 onOpenFilePreview는 화면에서 제공합니다.",
+ "state": "Markdown 상태"
+ },
+ "code": {
+ "title": "코드 표시",
+ "description": "구문 강조, 줄 번호, 복사, ANSI 출력, 표시 영역을 고려한 행 렌더링입니다.",
+ "options": "code와 language가 내용을 제공하며 showLineNumbers, wrapLongLines, chrome이 표시를 제어합니다. 표시 영역 강조에는 줄 번호와 줄 바꿈 없는 행이 필요합니다.",
+ "format": "코드 형식"
+ },
+ "math": {
+ "title": "수학 수식",
+ "description": "Markdown의 블록 수식을 너비에 맞추는 공통 래퍼입니다.",
+ "options": "TeX 소스에는 MarkdownText를 사용합니다. DisplayMath는 이미 렌더링된 수식 노드를 받아 사용 가능한 너비에 맞게 크기를 조정합니다."
+ },
+ "message": {
+ "title": "메시지",
+ "description": "사고 및 전송 상태를 포함한 사용자와 어시스턴트 메시지입니다.",
+ "options": "message는 채팅 런타임이 투영한 UIMessage입니다. 데이터와 네트워크 작업은 렌더러 밖에서 처리합니다.",
+ "state": "메시지 상태"
+ },
+ "activity": {
+ "title": "에이전트 활동",
+ "description": "활동 기본 요소를 진행 중, 완료, 실패 시퀀스로 조합합니다.",
+ "options": "텍스트, 상태, 제어되는 확장 값을 전달합니다. 도구 실행은 gateway가 관리하며 이 컴포넌트는 투영된 상태를 렌더링합니다.",
+ "state": "활동 상태",
+ "working": "처리 중",
+ "details": "활동 세부 정보",
+ "collapse": "접기",
+ "readError": "파일을 읽을 수 없습니다",
+ "read": "소스 읽기"
+ },
+ "files": {
+ "title": "파일 편집",
+ "description": "파일 참조, 변경된 줄 수, 펼칠 수 있는 차이입니다.",
+ "options": "edits는 표시 요약을 담습니다. displayMode는 summary/diff/collapsed_diff를 선택하며 onOpenFilePreview는 화면에서 제공합니다.",
+ "error": "예제 편집을 적용하지 못했습니다.",
+ "state": "파일 편집 상태",
+ "operation": "파일 작업",
+ "display": "차이 표시",
+ "selected": "선택한 파일: {{path}}",
+ "hint": "파일 참조를 선택하여 콜백을 실행해 보세요."
+ },
+ "media": { "study": "색상 연습 {{count}}" },
+ "imageGallery": {
+ "title": "이미지 썸네일",
+ "description": "여러 이미지 레이아웃, 썸네일 선택, 추가 이미지 표시입니다.",
+ "options": "images는 URL과 이름을, size는 큰 썸네일 또는 작은 썸네일을, align은 정렬을 지정합니다. 썸네일은 네 개만 표시하며 내장 ImageLightbox에는 볼 수 있는 모든 이미지가 포함됩니다.",
+ "sixImages": "이미지 6개",
+ "compact": "작은 썸네일",
+ "hint": "썸네일이나 +2를 선택하면 이미지 6개를 모두 볼 수 있습니다."
+ },
+ "imageLightbox": {
+ "title": "전체 화면 이미지 보기",
+ "description": "제어형 전체 화면 보기와 이미지 탐색입니다.",
+ "options": "닫힌 상태에서는 index가 null입니다. 호출 측에서 index와 열기 콜백을 관리합니다. ImageLightbox는 ZoomableImage를 조합하며 이미지가 바뀌면 보기를 초기화합니다.",
+ "open": "전체 화면 뷰어 열기",
+ "hint": "이전/다음, ←/→ 또는 Home/End로 이동하고 × 또는 Escape로 닫습니다."
+ },
+ "zoomableImage": {
+ "title": "이미지 확대/축소",
+ "description": "단일 이미지 확대/축소, 경계 내 이동, 제스처입니다.",
+ "options": "src와 alt는 이미지 하나를 제공합니다. 위치와 높이가 지정된 컨테이너에 배치하고 이미지 변경 시 다시 마운트합니다. 표시 영역에 포커스를 두면 +, −, 0 키를 사용할 수 있습니다.",
+ "hint": "+/−, 두 번 클릭, Ctrl+휠 또는 핀치로 확대/축소합니다. 확대한 뒤 드래그하거나 스크롤하여 이동하고 배율을 클릭하거나 0을 눌러 초기화합니다."
+ },
+ "attachment": {
+ "title": "첨부 파일",
+ "description": "이미지 미리보기, 동영상 재생, 파일 다운로드, 사용할 수 없는 첨부 파일입니다.",
+ "options": "attachment.kind는 image, video, file을 선택합니다. 이미지는 ImageLightbox를 열고 동영상은 기본 컨트롤, 파일은 다운로드 링크를 사용합니다. URL이 없거나 이미지 로드가 실패하면 사용할 수 없는 타일을 표시합니다.",
+ "image": "이미지",
+ "video": "재생 가능한 동영상",
+ "file": "파일 다운로드",
+ "unavailable": "사용할 수 없는 첨부 파일(URL 없음)"
+ },
+ "fileReference": {
+ "title": "파일 참조",
+ "description": "호출 측에서 열기 작업을 관리하는 파일 참조입니다.",
+ "options": "path가 레이블을, onOpen이 작업을 제공합니다. 컴포넌트는 작업 공간 권한을 결정하지 않습니다.",
+ "select": "파일 참조를 선택하세요."
+ },
+ "settingsComposition": {
+ "title": "설정 조합",
+ "description": "실제 설정 행, 그룹, 기능 컴포넌트를 공통 컨트롤과 조합합니다.",
+ "options": "상위 설정 컨트롤러가 값과 영구 저장을 관리합니다. 갤러리 콜백은 로컬 미리보기 상태만 변경합니다.",
+ "preferences": "예제 환경설정",
+ "keepDrafts": "초안 유지",
+ "switchHint": "제어형 스위치를 사용하는 공통 설정 행입니다.",
+ "projectLabel": "프로젝트 레이블",
+ "projectName": "설정의 프로젝트 레이블",
+ "capability": "예제 기능",
+ "notes": "메모",
+ "capabilityNotes": "기능 메모",
+ "localOnly": "로컬 미리보기 전용"
+ },
+ "modelPickers": {
+ "title": "모델 선택",
+ "description": "제공업체를 선택하고 모델 ID를 검색하거나 입력한 뒤 추론 강도를 조정합니다.",
+ "options": "호출 측에서 ProviderPicker의 값과 작업을 제공합니다. ModelIdPicker의 models로 고정 목록을, ReasoningEffortPicker의 savedValues로 기존 옵션을 제공할 수 있습니다.",
+ "chooseProvider": "제공업체 선택",
+ "configure": "{{provider}} 설정"
+ },
+ "providerIcons": {
+ "title": "제공업체 아이콘",
+ "description": "일반, 작은 크기, 채우기 크기와 선택기의 미설정 상태를 비교합니다.",
+ "options": "provider가 기존 아이콘을 선택하고 compact와 fill이 크기를 제어합니다. showBrandLogos=false는 내장 아이콘을 사용합니다.",
+ "size": "아이콘 크기"
+ },
+ "timezone": {
+ "title": "시간대 선택",
+ "description": "시간대 이름, 중국어 이름, UTC 오프셋으로 검색한 뒤 같은 순간의 현지 시간을 확인합니다.",
+ "options": "value는 IANA 시간대이며 onChange가 호출 측의 값을 갱신합니다. 컴포넌트가 검색과 키보드 탐색을 제공합니다."
+ },
+ "textEditor": {
+ "title": "텍스트 편집과 힌트",
+ "description": "편집기를 열어 수정, 저장 또는 취소합니다. 내용을 비우고 저장하면 오류 피드백을 확인할 수 있습니다.",
+ "options": "SettingsTextEditor는 onSave 성공 후 닫히며 실패하면 오류를 표시합니다. SettingsHint는 호버, 포커스, 클릭으로 열립니다.",
+ "state": "편집 상태",
+ "hint": "편집기를 열어 수정, 저장 또는 취소할 수 있습니다. 내용을 비우면 오류 상태를 볼 수 있습니다.",
+ "instructions": "예제 지침",
+ "edit": "예제 지침 편집",
+ "help": "저장하면 변경한 내용이 아래에 표시됩니다.",
+ "required": "내용을 입력하세요."
+ },
+ "removePreset": {
+ "title": "프리셋 삭제",
+ "description": "사용하지 않는 모델 프리셋을 삭제하고 기본 모델이 사용하는 프리셋의 비활성 상태를 확인합니다.",
+ "options": "ModelsSettings에서 사용하는 삭제 버튼입니다. 호출 측에서 disabled와 삭제 작업을 제공합니다. 제공업체 관리는 ProvidersSettings 대화상자를 사용합니다.",
+ "defaultModel": "기본 모델",
+ "codeAssistant": "코딩 어시스턴트",
+ "remove": "{{name}} 삭제",
+ "primaryHint": "기본 모델이 사용하는 프리셋은 삭제할 수 없습니다.",
+ "count": "미리보기 프리셋 수: {{count}}"
+ },
+ "loading": {
+ "title": "로딩 레이아웃",
+ "description": "앱, 채널, 스킬 목록의 로딩 레이아웃을 전환하고 공통 상태 컨테이너를 확인합니다.",
+ "options": "CatalogSkeleton의 layout이 레이아웃을 선택합니다. SkeletonStatus는 label로 화면 읽기 상태를 제공하고 장식 내용을 aria-hidden으로 표시합니다.",
+ "layout": "목록 레이아웃",
+ "catalog": "미리보기 목록 로드 중"
+ },
+ "sidebar": {
+ "title": "설정 탐색",
+ "description": "분류를 선택하고 재시작 대기를 처리하며 브라우저를 좁혀 모바일 메뉴를 확인합니다.",
+ "options": "activeSection과 onSelectSection이 선택을 제어합니다. 돌아가기, 로그아웃, 재시작 작업은 호출 측 콜백입니다.",
+ "back": "채팅으로 돌아가기",
+ "logout": "로그아웃",
+ "restart": "미리보기 재시작 작업을 처리했습니다",
+ "hint": "설정 분류를 선택하거나 브라우저를 좁혀 모바일 탐색을 확인하세요.",
+ "toggleRestart": "재시작 대기 전환"
+ },
+ "providerSearch": {
+ "title": "제공업체 검색",
+ "description": "OAuth, API 키, 로컬 그룹별로 검색하고 항목이나 사용자 지정 제공업체를 선택합니다.",
+ "options": "providers는 기존 목록입니다. query는 제어형 검색 값이며 onSelect와 onCustom이 선택을 부모에게 전달합니다.",
+ "closed": "검색을 닫았습니다",
+ "custom": "사용자 지정 제공업체를 선택했습니다",
+ "hint": "제공업체를 검색하거나 방향키로 선택하세요."
+ },
+ "requestParameters": {
+ "title": "요청 매개변수",
+ "description": "헤더, 쿼리 매개변수, 요청 본문을 편집합니다. 잘못된 JSON으로 실제 검증 피드백을 확인합니다.",
+ "options": "fields는 표시 항목을, form은 JSON 텍스트를 지정합니다. 헤더와 쿼리 매개변수는 문자열 값만 받으며 요청 본문은 JSON 객체의 모든 값 형식을 받습니다."
+ },
+ "requestAPI": {
+ "title": "요청 API 제어",
+ "description": "제공업체의 지원 API, 기본 API, 모델 재정의와 대체 옵션을 선택합니다.",
+ "options": "ProviderAPIControl은 API를 하나 이상 유지합니다. ModelAPIControl은 null로 자동 선택을 허용하며 제공업체 기능에 따라 사용 가능한 API를 표시합니다.",
+ "providerAPI": "제공업체 API",
+ "modelOverride": "모델 재정의"
+ },
+ "usage": {
+ "title": "토큰 사용량",
+ "description": "데이터 있음, 빈 기록, 사용 불가를 전환합니다. 막대에 호버해 일별 사용량을 보고 상세 정보에서 모델 추세를 확인합니다.",
+ "options": "usage는 호출 측에서 제공하는 통계 기록이며 timeZone은 날짜 경계를 정합니다. 상세 대화상자와 차트는 전달받은 데이터만 표시합니다.",
+ "state": "사용량 상태"
+ },
+ "overview": {
+ "title": "설정 개요",
+ "description": "현재 모델, 기능 상태, 사용량을 보고 기능 행을 선택하여 분류 이동을 시험합니다.",
+ "options": "settings가 개요 데이터를 제공하며 onSelectSection이 선택한 설정 분류를 받습니다.",
+ "selected": "선택한 분류: {{section}}"
+ },
+ "web": {
+ "title": "웹 검색 설정",
+ "description": "인증 불필요, API 키, 서버 URL 제공업체를 전환하고 검색 옵션과 자동 저장을 시험합니다.",
+ "options": "settings는 현재 설정을, form은 편집 값을 보관합니다. 저장, 인증 정보 표시, 제공업체 전환은 부모가 제공합니다.",
+ "unsaved": "미리보기 초안이 저장되지 않았습니다"
+ },
+ "image": {
+ "title": "이미지 생성 설정",
+ "description": "이미지 생성을 켜고 끄며 고정 목록의 모델, 종횡비, 크기를 선택하고 고급 옵션에서 수량을 조정합니다.",
+ "options": "form은 제어형 설정이며 dirty는 변경 표시입니다. 제공업체 인증 정보를 재사용하고 저장 작업은 부모가 구현합니다."
+ },
+ "voice": {
+ "title": "음성 전사 설정",
+ "description": "전사를 켜고 끄며 모델, 언어, 길이, 업로드 크기 제한을 편집하고 자동 저장을 시험합니다.",
+ "options": "settings가 제공업체 정보를 제공하고 부모가 form과 저장 콜백을 관리합니다."
+ },
+ "safety": {
+ "title": "접근 설정",
+ "description": "로컬 서비스 접근과 기본 권한을 전환하고 설정 행, 힌트, 자동 저장 피드백을 확인합니다.",
+ "options": "form은 표시 값을 제공하며 onSave가 저장 요청을 처리합니다. 런타임 권한 적용은 계속 gateway가 담당합니다."
+ },
+ "channelCatalog": {
+ "title": "채널 목록과 식별 정보",
+ "description": "실행 중, 시작 중, 실패, 미설치 상태를 전환하고 스위치, 설치 버튼, 도움말 메뉴를 시험합니다.",
+ "options": "feature가 설치 및 실행 상태를 제공합니다. 부모가 onAction과 onSelect를 처리하며 식별 정보, 오류, 도움말은 같은 채널 데이터를 사용합니다.",
+ "exampleChannel": "예제 채널",
+ "state": "채널 상태",
+ "error": "예제 연결에 실패했습니다.",
+ "stopped": "중지됨",
+ "running": "실행 중",
+ "starting": "시작 중",
+ "failed": "실패",
+ "selected": "채널 설정을 선택했습니다",
+ "hint": "스위치나 설치 버튼으로 상태 변화를 확인하세요."
+ },
+ "credentials": {
+ "title": "채널 인증 정보",
+ "description": "인증 정보를 입력하고 비밀 값을 표시하거나 숨기며 연결 프리셋 적용, 필수 항목 확인, 보조 명령 복사를 시험합니다.",
+ "options": "fields가 그룹과 컨트롤을 정의하고 values와 visibleSecrets는 제어형 값입니다. requirements가 인증 정보 조합을 정의하며 프리셋 및 저장 콜백은 이 예제만 갱신합니다.",
+ "botToken": "봇 토큰",
+ "tokenPlaceholder": "예제 토큰",
+ "serverURL": "서버 URL",
+ "replyMode": "응답 모드",
+ "mentions": "멘션",
+ "allMessages": "모든 메시지",
+ "allowFrom": "허용할 발신자",
+ "local": "로컬 서버",
+ "hosted": "호스팅 서버",
+ "required": "봇 토큰을 입력하세요.",
+ "checkSave": "확인 및 저장",
+ "command": "예제 명령",
+ "applied": "{{name}} 적용됨",
+ "incomplete": "인증 정보를 완성하세요.",
+ "saved": "미리보기 인증 정보를 저장했습니다.",
+ "hint": "인증 정보를 입력하고 비밀 값 표시를 전환하거나 연결 프리셋을 적용하세요."
+ },
+ "channelValidation": {
+ "title": "연결 검사",
+ "description": "검사 중, 성공, 실패를 전환하고 순서대로 나타나는 검사 결과와 식별 정보 요약을 확인합니다.",
+ "options": "validation은 검사 기록을 제공하고 validating은 로딩을 제어합니다. 컴포넌트는 결과 표시만 담당합니다.",
+ "expired": "예제 토큰이 만료되었습니다.",
+ "result": "검사 결과"
+ },
+ "runAt": {
+ "title": "예약 시간 선택",
+ "description": "날짜와 시간을 입력하거나 달력을 열어 마우스, 방향키, 페이지 키로 날짜를 선택합니다.",
+ "options": "value는 YYYY-MM-DDTHH:mm 형식의 현지 시간이며 onChange는 편집한 값을 반환합니다. 잘못된 입력은 기존 폼 컨트롤에 표시합니다."
+ },
+ "automationCalendar": {
+ "title": "자동화 달력",
+ "description": "월, 일정, 기록을 전환하고 성공 또는 실패 기록의 결과를 엽니다. 좁은 컨테이너에서는 일정 목록을 표시합니다.",
+ "options": "jobs와 month가 달력 내용을 정합니다. onInspect는 예약 작업을 처리하며 호출 측에서 renderRunDialog로 결과 표시를 제공합니다. 달력은 서비스를 읽지 않습니다.",
+ "providerError": "예제 제공업체를 사용할 수 없었습니다.",
+ "state": "일정 상태",
+ "previousMonth": "이전 달",
+ "nextMonth": "다음 달",
+ "planned": "예약됨",
+ "recorded": "실행 기록",
+ "running": "실행 중",
+ "failed": "실패",
+ "completed": "완료",
+ "skipped": "건너뜀",
+ "system": "시스템 작업",
+ "noEntries": "이번 달 일정이 없습니다",
+ "more": "{{count}}개 더 보기",
+ "selected": "선택한 작업: {{name}}",
+ "hint": "실행 기록을 선택해 결과를 보거나 예약 작업을 선택하세요."
+ },
+ "providers": {
+ "title": "제공업체 관리",
+ "description": "실제 제공업체 관리 대화상자와 추가 과정을 확인합니다.",
+ "options": "설정의 ProvidersSettings를 재사용합니다. 호출 측에서 목록, 폼, 저장 콜백을 제어합니다. 이 미리보기는 로컬 예제 데이터를 변경하며 설정, 검색, 생성, 취소를 지원합니다.",
+ "invalidParameters": "유효한 요청 매개변수 JSON을 입력하세요. 헤더와 쿼리 매개변수의 값은 문자열이어야 합니다.",
+ "saved": "{{name}}의 미리보기 설정을 저장했습니다",
+ "added": "{{name}} 추가됨",
+ "signedIn": "미리보기 인증을 로그인 상태로 설정했습니다",
+ "signedOut": "미리보기 인증을 로그아웃 상태로 설정했습니다",
+ "builtInIcons": "내장 아이콘 사용",
+ "brandIcons": "브랜드 아이콘 사용",
+ "configured": "설정된 제공업체 수: {{count}}",
+ "providerAdded": "제공업체를 추가했습니다"
+ },
+ "runResult": {
+ "title": "자동 실행 결과",
+ "description": "실행 결과를 열어 Markdown 응답, 로딩, 재시도, 빈 응답, 누락된 기록을 비교합니다.",
+ "options": "result는 로딩 상태와 가져온 응답을 제공합니다. 호출 측에서 onRetry를 처리합니다. 이 뷰는 런타임 상태를 읽거나 결과를 요청하지 않습니다.",
+ "state": "실행 결과",
+ "view": "실행 결과 보기"
+ },
+ "chatBinding": {
+ "title": "실행 채팅",
+ "description": "실행 채팅을 선택하고 지침을 편집, 확인, 되돌리기 또는 취소합니다. 작업 사용 중, 로드 오류, 충돌 상태도 비교합니다.",
+ "options": "data와 job은 사용 가능한 채팅과 연결 버전을 제공합니다. 뷰는 확인 초안을 관리하며 기능 진입점이 onSave, onSaved, onReload를 데이터 작업에 연결합니다.",
+ "state": "채팅 연결 상태",
+ "setChat": "실행 채팅 설정",
+ "saved": "다음 실행은 {{title}}에서 진행됩니다",
+ "hint": "대상 채팅을 선택한 뒤 작업 지침을 확인하거나 수정하세요."
+ },
+ "about": {
+ "title": "정보와 버전",
+ "description": "버전 검사 상태, 커밋 링크, 업데이트, 정보 페이지를 비교합니다. 버튼은 예제 결과로 화면을 갱신합니다.",
+ "options": "AboutSettingsView는 버전과 지원 링크 조합을 받습니다. VersionCheckRowView는 checking/result를 표시하며 onCheck로 검사를 요청합니다. 실제 검사와 진단 링크 데이터는 기능 진입점이 담당합니다.",
+ "error": "버전 정보를 가져올 수 없습니다. 다시 시도하세요.",
+ "state": "버전 상태",
+ "selectedLink": "GitHub 링크를 선택했습니다"
+ },
+ "appearance": {
+ "title": "화면 환경설정",
+ "description": "외관, 활동 표시, 파일 차이, 알림 설정을 전환합니다. 예제 값은 아래에 표시됩니다.",
+ "options": "테마와 환경설정은 호출 측에서 관리합니다. onChangeBrowserNotifications는 권한 요청을 기능 진입점에 맡기며 미리보기 콜백은 예제 스위치만 변경합니다."
+ },
+ "starInvitation": {
+ "title": "프로젝트 지원 안내",
+ "description": "실제 안내 대화상자를 열어 저장 및 오류 상태와 나중에 알림, GitHub 링크, 다시 알리지 않기를 시험합니다.",
+ "options": "open, saving, error는 표시 상태입니다. 기존 StarPrompt 진입점에서 안내 수신과 환경설정 저장을 관리하며 뷰는 전달된 작업만 호출합니다.",
+ "state": "안내 상태",
+ "view": "안내 보기",
+ "dismissed": "미리보기에서 다시 알리지 않기를 선택했습니다",
+ "starred": "미리보기에서 GitHub 링크를 선택했습니다"
+ }
+}
diff --git a/webui/src/dev/gallery/locales/controls/pt-BR.json b/webui/src/dev/gallery/locales/controls/pt-BR.json
new file mode 100644
index 000000000..c98a8830d
--- /dev/null
+++ b/webui/src/dev/gallery/locales/controls/pt-BR.json
@@ -0,0 +1,500 @@
+{
+ "common": {
+ "unavailable": "Indisponível",
+ "selected": "Seleção: {{value}}",
+ "savingPreview": "Salvando valores da prévia…",
+ "savedPreview": "Valores da prévia salvos",
+ "providerAction": "Ação de configuração do provedor selecionada",
+ "reset": "Redefinir prévia"
+ },
+ "button": {
+ "title": "Botões",
+ "description": "Um mesmo botão com várias aparências e tamanhos, definidos pelas opções.",
+ "options": "variant muda a aparência; size muda as dimensões; disabled bloqueia a interação; onClick é fornecido por quem usa o componente.",
+ "variants": "Variantes — estilos diferentes do mesmo botão",
+ "sizes": "Tamanhos",
+ "add": "Adicionar exemplo",
+ "clicks": "Cliques nos botões: {{count}}"
+ },
+ "input": {
+ "title": "Campos de texto",
+ "description": "Entrada de texto e a variante compartilhada de pesquisa.",
+ "options": "Use Input para campos comuns e SearchInput para pesquisa. Forneça um rótulo e explique entradas inválidas.",
+ "name": "Nome de exemplo",
+ "projectName": "Nome do projeto",
+ "search": "Pesquisa",
+ "searchName": "Pesquisa de exemplo",
+ "searchProjects": "Pesquisar projetos",
+ "invalid": "Inválido",
+ "invalidName": "Nome inválido",
+ "required": "Digite um nome de projeto.",
+ "disabledName": "Campo de nome desativado"
+ },
+ "textarea": {
+ "title": "Entrada de várias linhas",
+ "description": "Texto de várias linhas com o estilo de foco compartilhado.",
+ "options": "Aceita as propriedades nativas de textarea: value, onChange, rows e disabled.",
+ "notes": "Notas de exemplo",
+ "disabledNotes": "Notas desativadas",
+ "readOnly": "Prévia somente leitura"
+ },
+ "toggle": {
+ "title": "Interruptores",
+ "description": "Um interruptor controlado de ligar e desligar, compartilhado por configurações, espaços de trabalho e canais.",
+ "options": "Quem usa o componente gerencia checked e onChange. label fornece o nome acessível.",
+ "enable": "Ativar exemplo",
+ "unavailableOn": "Interruptor ligado sem possibilidade de alteração",
+ "unavailableOff": "Interruptor desligado sem possibilidade de alteração"
+ },
+ "select": {
+ "title": "Seletores",
+ "description": "Uma escolha única com navegação por teclado e opções desativadas.",
+ "options": "Combine Select, SelectTrigger, SelectValue, SelectContent e SelectItem. A raiz gerencia value/onValueChange.",
+ "fast": "Rápido",
+ "model": "Modelo de exemplo",
+ "disabledModel": "Seletor de modelo desativado"
+ },
+ "segmented": {
+ "title": "Escolhas segmentadas",
+ "description": "Um pequeno conjunto de escolhas sempre visíveis.",
+ "options": "value, options e onChange são controlados. mode=\"tabs\" adiciona navegação entre abas com as setas.",
+ "day": "Dia",
+ "week": "Semana",
+ "month": "Mês",
+ "period": "Período de exemplo",
+ "selected": "Período selecionado: {{value}}"
+ },
+ "combobox": {
+ "title": "Escolhas com pesquisa",
+ "description": "Opções pesquisáveis com navegação compartilhada por teclado e ponteiro.",
+ "options": "useComboboxNavigation fornece propriedades de entrada, lista e opções; quem usa o componente filtra os valores e gerencia a seleção.",
+ "search": "Pesquisar opções de exemplo",
+ "placeholder": "Digite ou use as setas",
+ "choices": "Opções de exemplo",
+ "empty": "Nenhuma opção correspondente",
+ "selected": "Opção selecionada: {{value}}"
+ },
+ "chevron": {
+ "title": "Seta de controle",
+ "description": "A seta compartilhada pelos controles de seleção.",
+ "options": "className pode ajustar a posição. O ícone é decorativo; o controle ao qual pertence fornece o nome acessível."
+ },
+ "dialog": {
+ "title": "Caixas de diálogo",
+ "description": "Um editor modal com alterações em rascunho, seleção aninhada e retorno do foco.",
+ "options": "Quem usa o componente gerencia open/onOpenChange e os comportamentos de rascunho e salvamento. Sempre forneça DialogTitle e uma descrição quando for útil.",
+ "open": "Abrir diálogo",
+ "edit": "Editar rótulo de exemplo",
+ "help": "As alterações se aplicam apenas a esta prévia.",
+ "label": "Rótulo de exemplo",
+ "save": "Salvar rótulo",
+ "saved": "Rótulo salvo: {{name}}"
+ },
+ "alert": {
+ "title": "Diálogos de confirmação",
+ "description": "Confirmação explícita com controles separados para cancelar e executar.",
+ "options": "Combine título, descrição e rodapé; execute a ação no manipulador de AlertDialogAction.",
+ "remove": "Remover exemplo",
+ "confirmTitle": "Remover este exemplo?",
+ "help": "Isso altera apenas o estado da prévia.",
+ "confirm": "Confirmar remoção",
+ "removed": "Exemplo removido.",
+ "available": "Exemplo disponível."
+ },
+ "sheet": {
+ "title": "Painéis laterais",
+ "description": "Um painel modal ligado a uma borda da área visível.",
+ "options": "SheetContent aceita side. Inclua SheetTitle e SheetDescription.",
+ "open": "Abrir painel lateral",
+ "panelTitle": "Painel lateral de exemplo",
+ "help": "Controles auxiliares ao lado da página atual.",
+ "notes": "Notas do painel",
+ "placeholder": "Experimente editar aqui"
+ },
+ "popover": {
+ "title": "Painéis flutuantes",
+ "description": "Uma pequena área interativa ancorada ao seu acionador.",
+ "options": "Combine acionador e conteúdo; open/onOpenChange podem ser controlados. O conteúdo segue o portal do diálogo ao qual pertence.",
+ "open": "Abrir painel flutuante",
+ "note": "Nota rápida"
+ },
+ "menu": {
+ "title": "Menus suspensos",
+ "description": "Ações, escolhas exclusivas, menus aninhados e itens desativados.",
+ "options": "Use onSelect para ações e um grupo de opções exclusivas para uma escolha persistente.",
+ "view": "Opções de visualização",
+ "layout": "Layout",
+ "comfortable": "Confortável",
+ "compact": "Compacto",
+ "rename": "Renomear",
+ "more": "Mais ações",
+ "duplicate": "Duplicar",
+ "none": "Nenhuma",
+ "status": "Densidade: {{density}}. Ação: {{action}}."
+ },
+ "tooltip": {
+ "title": "Dicas de interface",
+ "description": "HoverHint combina as primitivas de dica compartilhadas; tooltip.tsx é o ponto público de importação.",
+ "options": "Use HoverHint para dicas comuns. Mantenha erros essenciais visíveis. O ponteiro e o foco do teclado seguem as regras de tempo do produto.",
+ "primitive": "Dica básica",
+ "primitiveHelp": "Atraso compartilhado para o ponteiro e exibição imediata com foco do teclado.",
+ "hint": "Dica ao passar o ponteiro",
+ "hintHelp": "Uma dica composta com o mesmo comportamento de foco e ponteiro."
+ },
+ "truncated": {
+ "title": "Dicas para texto truncado",
+ "description": "Mostra uma dica apenas quando o texto medido está truncado.",
+ "options": "Forneça text e uma largura limitada. Adicione tabIndex quando o próprio texto precisar receber foco do teclado."
+ },
+ "disclosure": {
+ "title": "Conteúdo recolhível",
+ "description": "Conteúdo expansível que preserva o estado dos filhos quando recolhido.",
+ "options": "Disclosure gerencia a expansão; DisclosureContent aceita a propriedade open controlada para acionadores personalizados.",
+ "show": "Mostrar opções avançadas",
+ "help": "Este rascunho é mantido ao fechar e abrir novamente.",
+ "draft": "Rascunho da área recolhível"
+ },
+ "expandable": {
+ "title": "Texto expansível",
+ "description": "Uma prévia com limite de linhas do mesmo texto montado.",
+ "options": "Quem usa o componente gerencia expanded. lines define as linhas quando recolhido; forneça um controle acessível.",
+ "less": "Mostrar menos",
+ "more": "Mostrar mais"
+ },
+ "imageViewport": {
+ "title": "Área de imagem",
+ "description": "Controles de ajuste, zoom, deslocamento e pinça locais à imagem.",
+ "options": "Forneça uma className com limites e remonte o componente se a identidade da imagem mudar. Use panWithArrows=false quando uma galeria gerenciar as setas."
+ },
+ "streaming": {
+ "title": "Rótulos animados",
+ "description": "Uma animação de texto compartilhada para raciocínio ativo e rótulos de ferramentas.",
+ "options": "active controla a animação. Filhos do tipo texto ou número fornecem a sobreposição de glifos; as preferências de redução de movimento são respeitadas.",
+ "animate": "Animar rótulo",
+ "working": "Processando a próxima etapa…"
+ },
+ "markdown": {
+ "title": "Respostas Markdown",
+ "description": "O renderizador de produção em fluxo, com tabelas, código e fórmulas.",
+ "options": "children é texto Markdown. streaming controla o conteúdo incompleto; onOpenFilePreview é responsabilidade da tela.",
+ "state": "Estado do Markdown"
+ },
+ "code": {
+ "title": "Exibição de código",
+ "description": "Realce de sintaxe, números de linha, cópia, saída ANSI e linhas adaptadas à área visível.",
+ "options": "code e language fornecem o conteúdo; showLineNumbers, wrapLongLines e chrome controlam a apresentação. O realce da área visível exige números de linha e linhas sem quebra automática.",
+ "format": "Formato do código"
+ },
+ "math": {
+ "title": "Fórmulas matemáticas",
+ "description": "O contêiner compartilhado que ajusta as fórmulas em bloco renderizadas pelo Markdown.",
+ "options": "Use MarkdownText para código TeX. DisplayMath recebe nós matemáticos já renderizados e os redimensiona à largura disponível."
+ },
+ "message": {
+ "title": "Mensagens",
+ "description": "Mensagens de usuário e assistente, incluindo estados de raciocínio e entrega.",
+ "options": "message é um UIMessage projetado pelo ambiente de execução do chat. Dados e ações de rede ficam fora do renderizador.",
+ "state": "Estado da mensagem"
+ },
+ "activity": {
+ "title": "Atividade do agente",
+ "description": "Primitivas de atividade combinadas em uma sequência em andamento, concluída ou com falha.",
+ "options": "Passe texto, estado e expansão controlada. O gateway executa as ferramentas; estes componentes renderizam o estado projetado.",
+ "state": "Estado da atividade",
+ "working": "Processando",
+ "details": "Detalhes da atividade",
+ "collapse": "Recolher",
+ "readError": "Não foi possível ler o arquivo",
+ "read": "Ler código-fonte"
+ },
+ "files": {
+ "title": "Edições de arquivos",
+ "description": "Referências de arquivos, contagem de linhas alteradas e diferenças expansíveis.",
+ "options": "edits contém resumos para exibição; displayMode seleciona summary/diff/collapsed_diff; a tela fornece onOpenFilePreview.",
+ "error": "Não foi possível aplicar a edição de exemplo.",
+ "state": "Estado da edição do arquivo",
+ "operation": "Operação no arquivo",
+ "display": "Exibição das diferenças",
+ "selected": "Arquivo selecionado: {{path}}",
+ "hint": "Selecione uma referência de arquivo para testar seu callback."
+ },
+ "media": { "study": "Estudo de cor {{count}}" },
+ "imageGallery": {
+ "title": "Miniaturas de imagens",
+ "description": "Layout de várias imagens, seleção de miniaturas e imagens adicionais.",
+ "options": "images fornece URLs e nomes; size escolhe miniaturas grandes ou compactas, align controla o alinhamento. Apenas quatro miniaturas são exibidas; o ImageLightbox composto inclui todas as imagens disponíveis para visualização.",
+ "sixImages": "Seis imagens",
+ "compact": "Miniaturas compactas",
+ "hint": "Selecione uma miniatura ou +2 para ver as seis imagens."
+ },
+ "imageLightbox": {
+ "title": "Visualizador em tela cheia",
+ "description": "Visualização controlada em tela cheia e navegação entre imagens.",
+ "options": "index é null quando fechado. Quem usa o componente gerencia index e os callbacks de abertura; ImageLightbox combina ZoomableImage e redefine a visualização ao mudar a imagem.",
+ "open": "Abrir visualizador em tela cheia",
+ "hint": "Use anterior/próximo, ←/→ ou Home/End; feche com × ou Escape."
+ },
+ "zoomableImage": {
+ "title": "Zoom de imagem",
+ "description": "Zoom de uma imagem, deslocamento limitado e gestos.",
+ "options": "src e alt fornecem uma imagem. Coloque-a em um contêiner posicionado com altura definida e remonte ao trocar a imagem. Foque a área para usar +, − e 0.",
+ "hint": "Use +/−, clique duplo, Ctrl+roda ou pinça para ampliar. Arraste ou role após ampliar; clique na porcentagem ou pressione 0 para redefinir."
+ },
+ "attachment": {
+ "title": "Anexos",
+ "description": "Prévia de imagem, reprodução de vídeo, download de arquivo e anexos indisponíveis.",
+ "options": "attachment.kind seleciona image, video ou file. Imagens abrem ImageLightbox, vídeos usam controles nativos e arquivos usam links de download. URLs ausentes ou falhas ao carregar imagens exibem blocos indisponíveis.",
+ "image": "Imagem",
+ "video": "Vídeo reproduzível",
+ "file": "Baixar arquivo",
+ "unavailable": "Anexos indisponíveis (sem URL)"
+ },
+ "fileReference": {
+ "title": "Referências de arquivos",
+ "description": "Uma referência de arquivo cuja abertura é gerenciada por quem a utiliza.",
+ "options": "path fornece o rótulo; onOpen fornece a ação. O componente não decide as permissões do espaço de trabalho.",
+ "select": "Selecione a referência de arquivo."
+ },
+ "settingsComposition": {
+ "title": "Composição de configurações",
+ "description": "Os componentes reais de linha, grupo e capacidade das configurações, combinados com controles compartilhados.",
+ "options": "O controlador de configurações que os contém gerencia valores e persistência. Um callback da galeria altera apenas o estado local da prévia.",
+ "preferences": "Preferências de exemplo",
+ "keepDrafts": "Manter rascunhos",
+ "switchHint": "Uma linha de configuração compartilhada com um interruptor controlado.",
+ "projectLabel": "Rótulo do projeto",
+ "projectName": "Rótulo do projeto nas configurações",
+ "capability": "Capacidade de exemplo",
+ "notes": "Notas",
+ "capabilityNotes": "Notas da capacidade",
+ "localOnly": "Somente prévia local"
+ },
+ "modelPickers": {
+ "title": "Seleção de modelos",
+ "description": "Escolha um provedor, pesquise ou digite um ID de modelo e ajuste o esforço de raciocínio.",
+ "options": "Quem usa o componente fornece valores e ações de ProviderPicker. models de ModelIdPicker pode fornecer um catálogo fixo; savedValues de ReasoningEffortPicker fornece as opções existentes.",
+ "chooseProvider": "Escolher provedor",
+ "configure": "Configurar {{provider}}"
+ },
+ "providerIcons": {
+ "title": "Ícones de provedores",
+ "description": "Compare os tamanhos normal, compacto e de preenchimento, além do estado não configurado do seletor.",
+ "options": "provider seleciona um ícone existente; compact e fill controlam o tamanho. showBrandLogos=false usa ícones integrados.",
+ "size": "Tamanho do ícone"
+ },
+ "timezone": {
+ "title": "Seleção de fuso horário",
+ "description": "Pesquise por nome do fuso, nome em chinês ou deslocamento UTC e veja o mesmo instante na hora local.",
+ "options": "value é um fuso IANA; onChange atualiza o valor de quem usa o componente. O componente fornece pesquisa e navegação por teclado."
+ },
+ "textEditor": {
+ "title": "Editor de texto e dicas",
+ "description": "Abra o editor para alterar, salvar ou cancelar. Apague o conteúdo e salve para ver o erro.",
+ "options": "SettingsTextEditor fecha após o sucesso de onSave e mostra erros em caso de falha; SettingsHint abre ao passar o ponteiro, focar ou clicar.",
+ "state": "Estado de edição",
+ "hint": "Abra o editor para alterar, salvar ou cancelar. Apague o conteúdo para ver o estado de erro.",
+ "instructions": "Instruções de exemplo",
+ "edit": "Editar instruções de exemplo",
+ "help": "Após salvar, o conteúdo atualizado aparece abaixo.",
+ "required": "Digite algum conteúdo."
+ },
+ "removePreset": {
+ "title": "Excluir predefinições",
+ "description": "Exclua predefinições de modelo não utilizadas e veja o estado desativado daquela usada pelo modelo padrão.",
+ "options": "Este é o botão de exclusão de ModelsSettings; quem usa o componente fornece disabled e a ação de exclusão. A gestão de provedores usa o diálogo ProvidersSettings.",
+ "defaultModel": "Modelo padrão",
+ "codeAssistant": "Assistente de programação",
+ "remove": "Excluir {{name}}",
+ "primaryHint": "A predefinição usada pelo modelo padrão não pode ser excluída.",
+ "count": "Predefinições da prévia: {{count}}"
+ },
+ "loading": {
+ "title": "Layouts de carregamento",
+ "description": "Alterne os layouts de carregamento de apps, canais e habilidades e veja o contêiner de estado compartilhado.",
+ "options": "layout de CatalogSkeleton seleciona o layout. SkeletonStatus usa label para o estado do leitor de tela e marca o conteúdo decorativo como aria-hidden.",
+ "layout": "Layout do catálogo",
+ "catalog": "Carregando catálogo da prévia"
+ },
+ "sidebar": {
+ "title": "Navegação das configurações",
+ "description": "Selecione seções, trate uma reinicialização pendente e estreite o navegador para ver o menu móvel.",
+ "options": "activeSection e onSelectSection controlam a seleção; voltar, sair e reiniciar são callbacks de quem usa o componente.",
+ "back": "Voltar ao chat",
+ "logout": "Sair",
+ "restart": "Ação de reinicialização da prévia processada",
+ "hint": "Escolha uma seção ou estreite o navegador para ver a navegação móvel.",
+ "toggleRestart": "Alternar reinicialização pendente"
+ },
+ "providerSearch": {
+ "title": "Pesquisa de provedores",
+ "description": "Pesquise provedores agrupados por OAuth, chave de API e acesso local; selecione uma entrada ou um provedor personalizado.",
+ "options": "providers é o catálogo existente. query é um valor de pesquisa controlado; onSelect e onCustom passam a seleção ao pai.",
+ "closed": "Pesquisa fechada",
+ "custom": "Provedor personalizado selecionado",
+ "hint": "Pesquise provedores ou use as setas para escolher."
+ },
+ "requestParameters": {
+ "title": "Parâmetros de requisição",
+ "description": "Edite cabeçalhos, parâmetros de consulta e corpo; digite JSON inválido para ver a validação real.",
+ "options": "fields seleciona as entradas visíveis; form guarda o texto JSON. Cabeçalhos e parâmetros de consulta aceitam apenas strings; o corpo aceita quaisquer valores de objeto JSON."
+ },
+ "requestAPI": {
+ "title": "API de requisições",
+ "description": "Selecione as APIs compatíveis, a API padrão, as substituições por modelo e as opções de fallback.",
+ "options": "ProviderAPIControl mantém pelo menos uma API. ModelAPIControl permite null para seleção automática e mostra as APIs disponíveis conforme os recursos do provedor.",
+ "providerAPI": "API do provedor",
+ "modelOverride": "Substituição por modelo"
+ },
+ "usage": {
+ "title": "Uso de tokens",
+ "description": "Alterne entre dados, registros vazios e indisponibilidade. Passe o ponteiro nas barras para o uso diário e abra os detalhes para tendências por modelo.",
+ "options": "usage é um registro estatístico fornecido por quem usa o componente; timeZone define os limites das datas. O diálogo de detalhes e os gráficos exibem apenas os dados recebidos.",
+ "state": "Estado do uso"
+ },
+ "overview": {
+ "title": "Visão geral das configurações",
+ "description": "Veja o modelo atual, o estado dos recursos e o uso; selecione linhas de recursos para experimentar a navegação entre seções.",
+ "options": "settings fornece os dados gerais; onSelectSection recebe a seção de configurações selecionada.",
+ "selected": "Seção selecionada: {{section}}"
+ },
+ "web": {
+ "title": "Configurações de pesquisa web",
+ "description": "Alterne entre provedores sem credenciais, com chave de API ou URL de servidor; ajuste a pesquisa e experimente o salvamento automático.",
+ "options": "settings guarda a configuração atual; form guarda os valores editados. O pai fornece salvamento, visibilidade das credenciais e troca de provedor.",
+ "unsaved": "Rascunho da prévia não salvo"
+ },
+ "image": {
+ "title": "Geração de imagens",
+ "description": "Ative a geração, escolha um modelo do catálogo fixo, proporção e tamanho; expanda as opções avançadas para ajustar a quantidade.",
+ "options": "form é uma configuração controlada; dirty marca alterações. O componente reutiliza credenciais do provedor; o pai implementa o salvamento."
+ },
+ "voice": {
+ "title": "Configurações de transcrição",
+ "description": "Ative a transcrição, edite modelo, idioma e limites de duração e tamanho de envio; experimente o salvamento automático.",
+ "options": "settings fornece informações do provedor; o pai gerencia form e os callbacks de salvamento."
+ },
+ "safety": {
+ "title": "Configurações de acesso",
+ "description": "Alterne o acesso a serviços locais e as permissões padrão; veja linhas, dicas e avisos de salvamento automático.",
+ "options": "form fornece os valores exibidos; onSave trata as solicitações de salvamento. O gateway continua responsável por aplicar as permissões em execução."
+ },
+ "channelCatalog": {
+ "title": "Catálogo e identidade dos canais",
+ "description": "Alterne entre execução, inicialização, falha e não instalado; experimente o interruptor, a instalação e o menu de ajuda.",
+ "options": "feature fornece estados de instalação e execução. O pai trata onAction e onSelect; identidade, erros e ajuda usam os mesmos dados do canal.",
+ "exampleChannel": "Canal de exemplo",
+ "state": "Estado do canal",
+ "error": "A conexão de exemplo falhou.",
+ "stopped": "Parado",
+ "running": "Em execução",
+ "starting": "Iniciando",
+ "failed": "Falhou",
+ "selected": "Configurações do canal selecionadas",
+ "hint": "Use o interruptor ou o botão de instalação para ver as mudanças de estado."
+ },
+ "credentials": {
+ "title": "Credenciais do canal",
+ "description": "Insira credenciais, revele ou oculte segredos, aplique predefinições de conexão, verifique campos obrigatórios e copie um comando auxiliar.",
+ "options": "fields define grupos e controles; values e visibleSecrets são controlados. requirements define combinações de credenciais; os callbacks de predefinição e salvamento alteram apenas este exemplo.",
+ "botToken": "Token do bot",
+ "tokenPlaceholder": "Token de exemplo",
+ "serverURL": "URL do servidor",
+ "replyMode": "Modo de resposta",
+ "mentions": "Menções",
+ "allMessages": "Todas as mensagens",
+ "allowFrom": "Remetentes permitidos",
+ "local": "Servidor local",
+ "hosted": "Servidor hospedado",
+ "required": "Digite um token de bot.",
+ "checkSave": "Verificar e salvar",
+ "command": "Comando de exemplo",
+ "applied": "{{name}} aplicado",
+ "incomplete": "Complete as credenciais.",
+ "saved": "Credenciais da prévia salvas.",
+ "hint": "Preencha as credenciais, alterne a exibição de segredos ou aplique uma predefinição de conexão."
+ },
+ "channelValidation": {
+ "title": "Verificação de conexão",
+ "description": "Alterne entre verificação, sucesso e falha; acompanhe as verificações em sequência com um resumo de identidade.",
+ "options": "validation fornece os registros de verificação; validating controla o carregamento. O componente apenas exibe os resultados.",
+ "expired": "O token de exemplo expirou.",
+ "result": "Resultado da verificação"
+ },
+ "runAt": {
+ "title": "Seleção de horário agendado",
+ "description": "Insira data e hora ou abra o calendário e escolha com o mouse, as setas e as teclas de página.",
+ "options": "value usa a hora local YYYY-MM-DDTHH:mm; onChange retorna o valor editado. Entradas inválidas são indicadas no controle existente."
+ },
+ "automationCalendar": {
+ "title": "Calendário de automações",
+ "description": "Mude de mês, alterne planos e histórico e abra resultados de execuções bem-sucedidas ou com falha. Contêineres estreitos exibem uma agenda.",
+ "options": "jobs e month definem o conteúdo. onInspect trata tarefas agendadas; quem usa o componente fornece os resultados por renderRunDialog. O calendário não consulta serviços.",
+ "providerError": "O provedor de exemplo estava indisponível.",
+ "state": "Estado da agenda",
+ "previousMonth": "Mês anterior",
+ "nextMonth": "Próximo mês",
+ "planned": "Agendado",
+ "recorded": "Histórico de execução",
+ "running": "Em execução",
+ "failed": "Falhou",
+ "completed": "Concluído",
+ "skipped": "Ignorado",
+ "system": "Tarefa do sistema",
+ "noEntries": "Nenhum agendamento neste mês",
+ "more": "Mais {{count}}",
+ "selected": "Tarefa selecionada: {{name}}",
+ "hint": "Selecione uma execução para ver o resultado ou escolha uma tarefa agendada."
+ },
+ "providers": {
+ "title": "Gestão de provedores",
+ "description": "Veja o diálogo real de gestão de provedores e o fluxo de adição.",
+ "options": "Reutiliza ProvidersSettings das configurações. Quem usa o componente controla catálogo, formulários e salvamento; esta prévia altera dados locais de exemplo e permite configurar, pesquisar, criar e cancelar.",
+ "invalidParameters": "Digite parâmetros JSON válidos; os valores de cabeçalhos e parâmetros de consulta devem ser strings.",
+ "saved": "Configuração da prévia salva para {{name}}",
+ "added": "{{name}} adicionado",
+ "signedIn": "Autorização da prévia definida como conectada",
+ "signedOut": "Autorização da prévia definida como desconectada",
+ "builtInIcons": "Usar ícones integrados",
+ "brandIcons": "Usar ícones de marca",
+ "configured": "Provedores configurados: {{count}}",
+ "providerAdded": "Provedor adicionado"
+ },
+ "runResult": {
+ "title": "Resultados de automações",
+ "description": "Abra resultados para comparar respostas Markdown, carregamento, nova tentativa, respostas vazias e histórico ausente.",
+ "options": "result fornece o estado de carregamento e a resposta obtida. Quem usa o componente trata onRetry; esta visualização não lê o ambiente de execução nem solicita resultados.",
+ "state": "Resultado da execução",
+ "view": "Ver resultado da execução"
+ },
+ "chatBinding": {
+ "title": "Chat de execução",
+ "description": "Escolha o chat, edite instruções, confirme, volte ao anterior ou cancele; compare tarefas ocupadas, erros de carregamento e conflitos.",
+ "options": "data e job fornecem chats disponíveis e versões do vínculo. A visualização gerencia o rascunho de confirmação; o ponto de entrada conecta onSave, onSaved e onReload às operações de dados.",
+ "state": "Estado do vínculo ao chat",
+ "setChat": "Definir chat de execução",
+ "saved": "A próxima execução ocorrerá em {{title}}",
+ "hint": "Escolha um chat de destino e confirme ou edite as instruções da tarefa."
+ },
+ "about": {
+ "title": "Sobre e versão",
+ "description": "Compare estados de versão, links de commits, atualizações e a página Sobre; os botões exibem resultados de exemplo.",
+ "options": "AboutSettingsView aceita uma composição de links de versão e suporte. VersionCheckRowView exibe checking/result e solicita verificações por onCheck. O ponto de entrada gerencia as verificações reais e os dados dos links de diagnóstico.",
+ "error": "Não foi possível obter a versão. Tente novamente.",
+ "state": "Estado da versão",
+ "selectedLink": "Link do GitHub selecionado"
+ },
+ "appearance": {
+ "title": "Preferências de aparência",
+ "description": "Alterne aparência, exibição de atividade, diferenças de arquivos e notificações; os valores de exemplo aparecem abaixo.",
+ "options": "Quem usa o componente gerencia tema e preferências. onChangeBrowserNotifications delega pedidos de permissão ao ponto de entrada; os callbacks da prévia só alteram interruptores de exemplo."
+ },
+ "starInvitation": {
+ "title": "Convite de apoio",
+ "description": "Abra o convite real, compare salvamento e erros e experimente adiar, o link do GitHub e nunca mais lembrar.",
+ "options": "open, saving e error são estados de exibição. O ponto de entrada StarPrompt existente gerencia o recebimento de convites e a persistência das preferências; a visualização só chama as ações fornecidas.",
+ "state": "Estado do convite",
+ "view": "Ver convite",
+ "dismissed": "Nunca mais lembrar selecionado na prévia",
+ "starred": "Link do GitHub selecionado na prévia"
+ }
+}
diff --git a/webui/src/dev/gallery/locales/controls/vi.json b/webui/src/dev/gallery/locales/controls/vi.json
new file mode 100644
index 000000000..36c1f9417
--- /dev/null
+++ b/webui/src/dev/gallery/locales/controls/vi.json
@@ -0,0 +1,500 @@
+{
+ "common": {
+ "unavailable": "Không khả dụng",
+ "selected": "Đã chọn: {{value}}",
+ "savingPreview": "Đang lưu giá trị xem trước…",
+ "savedPreview": "Đã lưu giá trị xem trước",
+ "providerAction": "Đã chọn thao tác cấu hình nhà cung cấp",
+ "reset": "Đặt lại bản xem trước"
+ },
+ "button": {
+ "title": "Nút bấm",
+ "description": "Cùng một nút với nhiều kiểu hiển thị và kích thước, thay đổi qua các tùy chọn.",
+ "options": "variant đổi kiểu hiển thị; size đổi kích thước; disabled chặn tương tác; onClick do bên gọi cung cấp.",
+ "variants": "Biến thể — các kiểu của cùng một nút",
+ "sizes": "Kích thước",
+ "add": "Thêm ví dụ",
+ "clicks": "Số lần bấm nút: {{count}}"
+ },
+ "input": {
+ "title": "Ô nhập văn bản",
+ "description": "Nhập văn bản và biến thể ô tìm kiếm dùng chung.",
+ "options": "Dùng Input cho ô thông thường và SearchInput cho tìm kiếm. Cung cấp nhãn và giải thích dữ liệu nhập không hợp lệ.",
+ "name": "Tên ví dụ",
+ "projectName": "Tên dự án",
+ "search": "Tìm kiếm",
+ "searchName": "Tìm kiếm ví dụ",
+ "searchProjects": "Tìm dự án",
+ "invalid": "Không hợp lệ",
+ "invalidName": "Tên không hợp lệ",
+ "required": "Nhập tên dự án.",
+ "disabledName": "Ô tên bị vô hiệu hóa"
+ },
+ "textarea": {
+ "title": "Ô nhập nhiều dòng",
+ "description": "Văn bản nhiều dòng với kiểu hiển thị tiêu điểm dùng chung.",
+ "options": "Nhận các thuộc tính textarea gốc: value, onChange, rows và disabled.",
+ "notes": "Ghi chú ví dụ",
+ "disabledNotes": "Ghi chú bị vô hiệu hóa",
+ "readOnly": "Bản xem trước chỉ đọc"
+ },
+ "toggle": {
+ "title": "Công tắc",
+ "description": "Công tắc bật/tắt được điều khiển, dùng chung cho cài đặt, không gian làm việc và kênh.",
+ "options": "Bên gọi quản lý checked và onChange. label cung cấp tên hỗ trợ tiếp cận.",
+ "enable": "Bật ví dụ",
+ "unavailableOn": "Công tắc đang bật không thể thao tác",
+ "unavailableOff": "Công tắc đang tắt không thể thao tác"
+ },
+ "select": {
+ "title": "Bộ chọn",
+ "description": "Chọn một mục với điều hướng bàn phím và các tùy chọn bị vô hiệu hóa.",
+ "options": "Kết hợp Select, SelectTrigger, SelectValue, SelectContent và SelectItem. Thành phần gốc quản lý value/onValueChange.",
+ "fast": "Nhanh",
+ "model": "Mô hình ví dụ",
+ "disabledModel": "Bộ chọn mô hình bị vô hiệu hóa"
+ },
+ "segmented": {
+ "title": "Lựa chọn phân đoạn",
+ "description": "Một nhóm ít lựa chọn luôn hiển thị.",
+ "options": "value, options và onChange được điều khiển từ bên ngoài. mode=\"tabs\" thêm điều hướng thẻ bằng phím mũi tên.",
+ "day": "Ngày",
+ "week": "Tuần",
+ "month": "Tháng",
+ "period": "Khoảng thời gian ví dụ",
+ "selected": "Khoảng thời gian đã chọn: {{value}}"
+ },
+ "combobox": {
+ "title": "Lựa chọn có tìm kiếm",
+ "description": "Các tùy chọn tìm kiếm được với điều hướng bàn phím và con trỏ dùng chung.",
+ "options": "useComboboxNavigation cung cấp thuộc tính cho ô nhập, danh sách và tùy chọn; bên gọi lọc giá trị và quản lý lựa chọn.",
+ "search": "Tìm trong tùy chọn ví dụ",
+ "placeholder": "Nhập hoặc dùng phím mũi tên",
+ "choices": "Tùy chọn ví dụ",
+ "empty": "Không có tùy chọn phù hợp",
+ "selected": "Tùy chọn đã chọn: {{value}}"
+ },
+ "chevron": {
+ "title": "Mũi tên điều khiển",
+ "description": "Biểu tượng mũi tên dùng chung cho các bộ chọn.",
+ "options": "className có thể điều chỉnh vị trí. Biểu tượng chỉ để trang trí; điều khiển chứa nó cung cấp tên hỗ trợ tiếp cận."
+ },
+ "dialog": {
+ "title": "Hộp thoại",
+ "description": "Trình soạn thảo dạng hộp thoại với thay đổi tạm, bộ chọn lồng nhau và khôi phục tiêu điểm.",
+ "options": "Bên gọi quản lý open/onOpenChange cùng hành vi bản nháp và lưu. Luôn cung cấp DialogTitle và thêm mô tả khi cần.",
+ "open": "Mở hộp thoại",
+ "edit": "Sửa nhãn ví dụ",
+ "help": "Thay đổi chỉ áp dụng cho bản xem trước này.",
+ "label": "Nhãn ví dụ",
+ "save": "Lưu nhãn",
+ "saved": "Nhãn đã lưu: {{name}}"
+ },
+ "alert": {
+ "title": "Hộp thoại xác nhận",
+ "description": "Xác nhận rõ ràng với điều khiển hủy và thực hiện riêng biệt.",
+ "options": "Kết hợp tiêu đề, mô tả và chân hộp thoại; thực hiện thao tác trong trình xử lý của AlertDialogAction.",
+ "remove": "Xóa ví dụ",
+ "confirmTitle": "Xóa ví dụ này?",
+ "help": "Thao tác này chỉ thay đổi trạng thái xem trước.",
+ "confirm": "Xác nhận xóa",
+ "removed": "Đã xóa ví dụ.",
+ "available": "Ví dụ khả dụng."
+ },
+ "sheet": {
+ "title": "Bảng bên",
+ "description": "Bảng dạng hộp thoại gắn vào một cạnh vùng hiển thị.",
+ "options": "SheetContent hỗ trợ side. Cần có SheetTitle và SheetDescription.",
+ "open": "Mở bảng bên",
+ "panelTitle": "Bảng bên ví dụ",
+ "help": "Các điều khiển bổ trợ bên cạnh trang hiện tại.",
+ "notes": "Ghi chú bảng bên",
+ "placeholder": "Thử chỉnh sửa tại đây"
+ },
+ "popover": {
+ "title": "Bảng nổi",
+ "description": "Một vùng tương tác nhỏ neo vào điều khiển kích hoạt.",
+ "options": "Kết hợp phần kích hoạt và nội dung; có thể điều khiển open/onOpenChange. Nội dung dùng cổng hiển thị của hộp thoại chứa nó.",
+ "open": "Mở bảng nổi",
+ "note": "Ghi chú nhanh"
+ },
+ "menu": {
+ "title": "Menu thả xuống",
+ "description": "Thao tác, lựa chọn đơn, menu lồng nhau và mục bị vô hiệu hóa.",
+ "options": "Dùng onSelect cho thao tác và nhóm lựa chọn đơn cho lựa chọn cần giữ lại.",
+ "view": "Tùy chọn hiển thị",
+ "layout": "Bố cục",
+ "comfortable": "Thoáng",
+ "compact": "Gọn",
+ "rename": "Đổi tên",
+ "more": "Thao tác khác",
+ "duplicate": "Nhân bản",
+ "none": "Không có",
+ "status": "Mật độ: {{density}}. Thao tác: {{action}}."
+ },
+ "tooltip": {
+ "title": "Chú giải và gợi ý",
+ "description": "HoverHint kết hợp các thành phần chú giải cơ bản dùng chung; tooltip.tsx là điểm nhập công khai.",
+ "options": "Dùng HoverHint cho gợi ý thông thường. Giữ lỗi quan trọng luôn hiển thị. Di chuột và tiêu điểm bàn phím tuân theo quy tắc thời gian chung của sản phẩm.",
+ "primitive": "Chú giải cơ bản",
+ "primitiveHelp": "Độ trễ con trỏ dùng chung và hiển thị ngay khi có tiêu điểm bàn phím.",
+ "hint": "Gợi ý khi di chuột",
+ "hintHelp": "Gợi ý kết hợp có cùng hành vi tiêu điểm và con trỏ."
+ },
+ "truncated": {
+ "title": "Gợi ý văn bản bị cắt",
+ "description": "Chỉ hiển thị gợi ý khi đo được văn bản bị cắt ngắn.",
+ "options": "Cung cấp text và giới hạn chiều rộng. Thêm tabIndex nếu bản thân văn bản cần nhận tiêu điểm bàn phím."
+ },
+ "disclosure": {
+ "title": "Nội dung thu gọn",
+ "description": "Nội dung có thể mở rộng, giữ trạng thái thành phần con khi thu gọn.",
+ "options": "Disclosure quản lý việc mở rộng; DisclosureContent nhận thuộc tính open được điều khiển cho phần kích hoạt tùy chỉnh.",
+ "show": "Hiện tùy chọn nâng cao",
+ "help": "Bản nháp này vẫn được giữ khi đóng rồi mở lại.",
+ "draft": "Bản nháp vùng thu gọn"
+ },
+ "expandable": {
+ "title": "Văn bản mở rộng",
+ "description": "Bản xem trước giới hạn dòng của cùng văn bản đang được gắn kết.",
+ "options": "Bên gọi quản lý expanded. lines đặt số dòng khi thu gọn; cần cung cấp nút chuyển hỗ trợ tiếp cận.",
+ "less": "Thu gọn",
+ "more": "Xem thêm"
+ },
+ "imageViewport": {
+ "title": "Vùng hiển thị ảnh",
+ "description": "Điều khiển vừa khung, thu phóng, di chuyển và chụm ngón cho từng ảnh.",
+ "options": "Dùng className để giới hạn vùng và gắn kết lại khi danh tính ảnh thay đổi. Đặt panWithArrows=false nếu thư viện ảnh quản lý điều hướng bằng phím mũi tên."
+ },
+ "streaming": {
+ "title": "Nhãn động",
+ "description": "Hiệu ứng văn bản dùng chung cho trạng thái suy nghĩ và nhãn công cụ đang hoạt động.",
+ "options": "active điều khiển hiệu ứng. Thành phần con dạng chuỗi hoặc số cung cấp lớp phủ ký tự; tôn trọng tùy chọn giảm chuyển động.",
+ "animate": "Bật hiệu ứng nhãn",
+ "working": "Đang xử lý bước tiếp theo…"
+ },
+ "markdown": {
+ "title": "Phản hồi Markdown",
+ "description": "Trình kết xuất luồng thực tế, gồm bảng, mã và công thức.",
+ "options": "children là văn bản Markdown. streaming điều khiển nội dung chưa hoàn tất; onOpenFilePreview do màn hình cung cấp.",
+ "state": "Trạng thái Markdown"
+ },
+ "code": {
+ "title": "Hiển thị mã",
+ "description": "Tô màu cú pháp, số dòng, sao chép, đầu ra ANSI và các dòng thích ứng với vùng nhìn thấy.",
+ "options": "code và language cung cấp nội dung; showLineNumbers, wrapLongLines và chrome điều khiển trình bày. Tô sáng theo vùng nhìn thấy yêu cầu số dòng và không ngắt dòng.",
+ "format": "Định dạng mã"
+ },
+ "math": {
+ "title": "Công thức toán học",
+ "description": "Lớp bọc dùng chung để điều chỉnh kích thước công thức khối đã được Markdown kết xuất.",
+ "options": "Dùng MarkdownText cho mã TeX. DisplayMath nhận các nút công thức đã kết xuất và co giãn theo chiều rộng hiện có."
+ },
+ "message": {
+ "title": "Tin nhắn",
+ "description": "Tin nhắn người dùng và trợ lý, gồm trạng thái suy nghĩ và gửi.",
+ "options": "message là UIMessage được môi trường chạy trò chuyện chiếu ra. Dữ liệu và thao tác mạng nằm ngoài trình kết xuất.",
+ "state": "Trạng thái tin nhắn"
+ },
+ "activity": {
+ "title": "Hoạt động tác tử",
+ "description": "Các thành phần hoạt động cơ bản kết hợp thành chuỗi đang chạy, hoàn tất hoặc thất bại.",
+ "options": "Truyền văn bản, trạng thái và giá trị mở rộng được điều khiển. gateway quản lý thực thi công cụ; các thành phần này hiển thị trạng thái được chiếu ra.",
+ "state": "Trạng thái hoạt động",
+ "working": "Đang xử lý",
+ "details": "Chi tiết hoạt động",
+ "collapse": "Thu gọn",
+ "readError": "Không thể đọc tệp",
+ "read": "Đọc mã nguồn"
+ },
+ "files": {
+ "title": "Chỉnh sửa tệp",
+ "description": "Tham chiếu tệp, số dòng thay đổi và phần khác biệt có thể mở rộng.",
+ "options": "edits chứa tóm tắt hiển thị; displayMode chọn summary/diff/collapsed_diff; onOpenFilePreview do màn hình cung cấp.",
+ "error": "Không thể áp dụng chỉnh sửa ví dụ.",
+ "state": "Trạng thái chỉnh sửa tệp",
+ "operation": "Thao tác tệp",
+ "display": "Hiển thị khác biệt",
+ "selected": "Tệp đã chọn: {{path}}",
+ "hint": "Chọn một tham chiếu tệp để thử hàm gọi lại."
+ },
+ "media": { "study": "Bài tập màu sắc {{count}}" },
+ "imageGallery": {
+ "title": "Ảnh thu nhỏ",
+ "description": "Bố cục nhiều ảnh, chọn ảnh thu nhỏ và hiển thị ảnh bổ sung.",
+ "options": "images cung cấp URL và tên; size chọn ảnh thu nhỏ lớn hoặc gọn, align điều khiển căn chỉnh. Chỉ hiện bốn ảnh thu nhỏ; ImageLightbox kết hợp chứa mọi ảnh có thể xem.",
+ "sixImages": "Sáu ảnh",
+ "compact": "Ảnh thu nhỏ gọn",
+ "hint": "Chọn ảnh thu nhỏ hoặc +2 để xem cả sáu ảnh."
+ },
+ "imageLightbox": {
+ "title": "Trình xem ảnh toàn màn hình",
+ "description": "Xem toàn màn hình có điều khiển và chuyển giữa các ảnh.",
+ "options": "index là null khi đóng. Bên gọi quản lý index và hàm gọi lại mở; ImageLightbox kết hợp ZoomableImage và đặt lại góc nhìn khi đổi ảnh.",
+ "open": "Mở trình xem toàn màn hình",
+ "hint": "Dùng trước/sau, ←/→ hoặc Home/End; đóng bằng × hoặc Escape."
+ },
+ "zoomableImage": {
+ "title": "Thu phóng ảnh",
+ "description": "Thu phóng một ảnh, di chuyển trong giới hạn và thao tác cử chỉ.",
+ "options": "src và alt cung cấp một ảnh. Đặt trong vùng chứa có định vị và chiều cao rõ ràng; gắn kết lại khi đổi ảnh. Đưa tiêu điểm vào vùng ảnh để dùng +, − và 0.",
+ "hint": "Thu phóng bằng +/−, nhấp đúp, Ctrl+con lăn hoặc chụm ngón. Kéo hoặc cuộn để di chuyển sau khi phóng to; nhấp phần trăm hoặc nhấn 0 để đặt lại."
+ },
+ "attachment": {
+ "title": "Tệp đính kèm",
+ "description": "Xem trước ảnh, phát video, tải tệp và tệp đính kèm không khả dụng.",
+ "options": "attachment.kind chọn image, video hoặc file. Ảnh mở ImageLightbox, video dùng điều khiển gốc, tệp dùng liên kết tải xuống. Thiếu URL hoặc tải ảnh thất bại sẽ hiển thị ô không khả dụng.",
+ "image": "Ảnh",
+ "video": "Video có thể phát",
+ "file": "Tải tệp",
+ "unavailable": "Tệp đính kèm không khả dụng (không có URL)"
+ },
+ "fileReference": {
+ "title": "Tham chiếu tệp",
+ "description": "Tham chiếu tệp với thao tác mở do bên gọi quản lý.",
+ "options": "path cung cấp nhãn; onOpen cung cấp thao tác. Thành phần không quyết định quyền của không gian làm việc.",
+ "select": "Chọn tham chiếu tệp."
+ },
+ "settingsComposition": {
+ "title": "Kết hợp cài đặt",
+ "description": "Các thành phần hàng, nhóm và khả năng thực tế của cài đặt kết hợp với điều khiển dùng chung.",
+ "options": "Bộ điều khiển cài đặt bên ngoài quản lý giá trị và lưu trữ lâu dài. Hàm gọi lại của thư viện chỉ cập nhật trạng thái xem trước cục bộ.",
+ "preferences": "Tùy chọn ví dụ",
+ "keepDrafts": "Giữ bản nháp",
+ "switchHint": "Hàng cài đặt dùng chung với công tắc được điều khiển.",
+ "projectLabel": "Nhãn dự án",
+ "projectName": "Nhãn dự án trong cài đặt",
+ "capability": "Khả năng ví dụ",
+ "notes": "Ghi chú",
+ "capabilityNotes": "Ghi chú khả năng",
+ "localOnly": "Chỉ xem trước cục bộ"
+ },
+ "modelPickers": {
+ "title": "Chọn mô hình",
+ "description": "Chọn nhà cung cấp, tìm hoặc nhập ID mô hình và điều chỉnh mức suy luận.",
+ "options": "Bên gọi cung cấp giá trị và thao tác của ProviderPicker. models của ModelIdPicker có thể cung cấp danh mục cố định; savedValues của ReasoningEffortPicker cung cấp tùy chọn hiện có.",
+ "chooseProvider": "Chọn nhà cung cấp",
+ "configure": "Cấu hình {{provider}}"
+ },
+ "providerIcons": {
+ "title": "Biểu tượng nhà cung cấp",
+ "description": "So sánh kích thước thường, gọn, lấp đầy và trạng thái chưa cấu hình của bộ chọn.",
+ "options": "provider chọn biểu tượng hiện có; compact và fill điều khiển kích thước. showBrandLogos=false dùng biểu tượng tích hợp.",
+ "size": "Kích thước biểu tượng"
+ },
+ "timezone": {
+ "title": "Chọn múi giờ",
+ "description": "Tìm theo tên múi giờ, tên tiếng Trung hoặc độ lệch UTC, rồi xem cùng thời điểm theo giờ địa phương.",
+ "options": "value là múi giờ IANA; onChange cập nhật giá trị của bên gọi. Thành phần cung cấp tìm kiếm và điều hướng bàn phím."
+ },
+ "textEditor": {
+ "title": "Soạn thảo văn bản và gợi ý",
+ "description": "Mở trình soạn thảo để sửa, lưu hoặc hủy. Xóa nội dung rồi lưu để xem phản hồi lỗi.",
+ "options": "SettingsTextEditor đóng sau khi onSave thành công và hiển thị lỗi khi thất bại; SettingsHint mở khi di chuột, nhận tiêu điểm hoặc nhấp.",
+ "state": "Trạng thái chỉnh sửa",
+ "hint": "Mở trình soạn thảo để sửa, lưu hoặc hủy. Xóa nội dung để xem trạng thái lỗi.",
+ "instructions": "Hướng dẫn ví dụ",
+ "edit": "Sửa hướng dẫn ví dụ",
+ "help": "Sau khi lưu, nội dung đã sửa sẽ xuất hiện bên dưới.",
+ "required": "Nhập nội dung."
+ },
+ "removePreset": {
+ "title": "Xóa cấu hình sẵn",
+ "description": "Xóa cấu hình mô hình chưa dùng và xem trạng thái vô hiệu hóa của cấu hình mà mô hình mặc định đang dùng.",
+ "options": "Đây là nút xóa của ModelsSettings; bên gọi cung cấp disabled và thao tác xóa. Quản lý nhà cung cấp dùng hộp thoại ProvidersSettings.",
+ "defaultModel": "Mô hình mặc định",
+ "codeAssistant": "Trợ lý lập trình",
+ "remove": "Xóa {{name}}",
+ "primaryHint": "Không thể xóa cấu hình mà mô hình mặc định đang dùng.",
+ "count": "Số cấu hình xem trước: {{count}}"
+ },
+ "loading": {
+ "title": "Bố cục tải dữ liệu",
+ "description": "Chuyển bố cục tải danh mục ứng dụng, kênh và kỹ năng; xem vùng trạng thái dùng chung.",
+ "options": "layout của CatalogSkeleton chọn bố cục. SkeletonStatus dùng label để cung cấp trạng thái cho trình đọc màn hình và đánh dấu nội dung trang trí là aria-hidden.",
+ "layout": "Bố cục danh mục",
+ "catalog": "Đang tải danh mục xem trước"
+ },
+ "sidebar": {
+ "title": "Điều hướng cài đặt",
+ "description": "Chọn mục, xử lý trạng thái chờ khởi động lại và thu hẹp trình duyệt để xem menu di động.",
+ "options": "activeSection và onSelectSection điều khiển lựa chọn; quay lại, đăng xuất và khởi động lại là hàm gọi lại của bên gọi.",
+ "back": "Quay lại trò chuyện",
+ "logout": "Đăng xuất",
+ "restart": "Đã xử lý thao tác khởi động lại trong bản xem trước",
+ "hint": "Chọn mục cài đặt hoặc thu hẹp trình duyệt để xem điều hướng di động.",
+ "toggleRestart": "Đổi trạng thái chờ khởi động lại"
+ },
+ "providerSearch": {
+ "title": "Tìm nhà cung cấp",
+ "description": "Tìm nhà cung cấp theo nhóm OAuth, khóa API và cục bộ; chọn một mục hoặc nhà cung cấp tùy chỉnh.",
+ "options": "providers là danh mục hiện có. query là giá trị tìm kiếm được điều khiển; onSelect và onCustom chuyển lựa chọn cho thành phần cha.",
+ "closed": "Đã đóng tìm kiếm",
+ "custom": "Đã chọn nhà cung cấp tùy chỉnh",
+ "hint": "Tìm nhà cung cấp hoặc dùng phím mũi tên để chọn."
+ },
+ "requestParameters": {
+ "title": "Tham số yêu cầu",
+ "description": "Sửa tiêu đề, tham số truy vấn và nội dung yêu cầu; nhập JSON không hợp lệ để xem phản hồi kiểm tra thực tế.",
+ "options": "fields chọn mục hiển thị; form giữ văn bản JSON. Tiêu đề và tham số truy vấn chỉ nhận chuỗi; nội dung yêu cầu nhận mọi kiểu giá trị trong đối tượng JSON."
+ },
+ "requestAPI": {
+ "title": "API yêu cầu",
+ "description": "Chọn API nhà cung cấp hỗ trợ, API mặc định, ghi đè theo mô hình và tùy chọn dự phòng.",
+ "options": "ProviderAPIControl giữ ít nhất một API. ModelAPIControl cho phép null để chọn tự động và hiển thị API theo khả năng nhà cung cấp.",
+ "providerAPI": "API nhà cung cấp",
+ "modelOverride": "Ghi đè mô hình"
+ },
+ "usage": {
+ "title": "Mức dùng token",
+ "description": "Chuyển giữa có dữ liệu, trống và không khả dụng. Di chuột lên cột để xem mức dùng hằng ngày, mở chi tiết để xem xu hướng mô hình.",
+ "options": "usage là bản thống kê do bên gọi cung cấp; timeZone xác định ranh giới ngày. Hộp thoại chi tiết và biểu đồ chỉ hiển thị dữ liệu được truyền vào.",
+ "state": "Trạng thái mức dùng"
+ },
+ "overview": {
+ "title": "Tổng quan cài đặt",
+ "description": "Xem mô hình hiện tại, trạng thái khả năng và mức dùng; chọn hàng tính năng để thử chuyển mục.",
+ "options": "settings cung cấp dữ liệu tổng quan; onSelectSection nhận mục cài đặt đã chọn.",
+ "selected": "Mục đã chọn: {{section}}"
+ },
+ "web": {
+ "title": "Cài đặt tìm kiếm web",
+ "description": "Chuyển giữa nhà cung cấp không cần thông tin xác thực, dùng khóa API hoặc URL máy chủ; chỉnh tìm kiếm và thử tự động lưu.",
+ "options": "settings giữ cấu hình hiện tại; form giữ giá trị chỉnh sửa. Thành phần cha cung cấp lưu, hiển thị thông tin xác thực và chuyển nhà cung cấp.",
+ "unsaved": "Chưa lưu bản nháp xem trước"
+ },
+ "image": {
+ "title": "Cài đặt tạo ảnh",
+ "description": "Bật/tắt tạo ảnh, chọn mô hình từ danh mục cố định, tỷ lệ và kích thước; mở tùy chọn nâng cao để chỉnh số lượng.",
+ "options": "form là cấu hình được điều khiển; dirty đánh dấu thay đổi. Thành phần dùng lại thông tin xác thực nhà cung cấp; thành phần cha thực hiện lưu."
+ },
+ "voice": {
+ "title": "Cài đặt chép lời",
+ "description": "Bật/tắt chép lời, sửa mô hình, ngôn ngữ, giới hạn thời lượng và dung lượng tải lên; thử tự động lưu.",
+ "options": "settings cung cấp thông tin nhà cung cấp; thành phần cha quản lý form và hàm gọi lại lưu."
+ },
+ "safety": {
+ "title": "Cài đặt truy cập",
+ "description": "Chuyển quyền truy cập dịch vụ cục bộ và quyền mặc định; xem hàng cài đặt, gợi ý và phản hồi tự động lưu.",
+ "options": "form cung cấp giá trị hiển thị; onSave xử lý yêu cầu lưu. Việc thực thi quyền lúc chạy vẫn do gateway quản lý."
+ },
+ "channelCatalog": {
+ "title": "Danh mục và nhận diện kênh",
+ "description": "Chuyển trạng thái đang chạy, đang khởi động, thất bại và chưa cài; thử công tắc, cài đặt và menu trợ giúp.",
+ "options": "feature cung cấp trạng thái cài đặt và chạy. Thành phần cha xử lý onAction và onSelect; nhận diện, lỗi và trợ giúp dùng cùng dữ liệu kênh.",
+ "exampleChannel": "Kênh ví dụ",
+ "state": "Trạng thái kênh",
+ "error": "Kết nối ví dụ thất bại.",
+ "stopped": "Đã dừng",
+ "running": "Đang chạy",
+ "starting": "Đang khởi động",
+ "failed": "Thất bại",
+ "selected": "Đã chọn cài đặt kênh",
+ "hint": "Dùng công tắc hoặc nút cài đặt để xem thay đổi trạng thái."
+ },
+ "credentials": {
+ "title": "Thông tin xác thực kênh",
+ "description": "Nhập thông tin xác thực, hiện/ẩn bí mật, áp dụng cấu hình kết nối, kiểm tra trường bắt buộc và sao chép lệnh hỗ trợ.",
+ "options": "fields định nghĩa nhóm và điều khiển; values và visibleSecrets được điều khiển. requirements định nghĩa các tổ hợp thông tin xác thực; cấu hình sẵn và hàm lưu chỉ cập nhật ví dụ này.",
+ "botToken": "Token bot",
+ "tokenPlaceholder": "Token ví dụ",
+ "serverURL": "URL máy chủ",
+ "replyMode": "Chế độ trả lời",
+ "mentions": "Lượt nhắc đến",
+ "allMessages": "Mọi tin nhắn",
+ "allowFrom": "Người gửi được phép",
+ "local": "Máy chủ cục bộ",
+ "hosted": "Máy chủ được lưu trữ",
+ "required": "Nhập token bot.",
+ "checkSave": "Kiểm tra và lưu",
+ "command": "Lệnh ví dụ",
+ "applied": "Đã áp dụng {{name}}",
+ "incomplete": "Điền đủ thông tin xác thực.",
+ "saved": "Đã lưu thông tin xác thực xem trước.",
+ "hint": "Điền thông tin xác thực, đổi hiển thị bí mật hoặc áp dụng cấu hình kết nối."
+ },
+ "channelValidation": {
+ "title": "Kiểm tra kết nối",
+ "description": "Chuyển giữa đang kiểm tra, thành công và thất bại; xem từng kiểm tra hiện lần lượt cùng tóm tắt danh tính.",
+ "options": "validation cung cấp bản ghi kiểm tra; validating điều khiển tải. Thành phần chỉ hiển thị kết quả.",
+ "expired": "Token ví dụ đã hết hạn.",
+ "result": "Kết quả kiểm tra"
+ },
+ "runAt": {
+ "title": "Chọn giờ lên lịch",
+ "description": "Nhập ngày giờ hoặc mở lịch để chọn bằng chuột, phím mũi tên và phím chuyển trang.",
+ "options": "value dùng giờ địa phương YYYY-MM-DDTHH:mm; onChange trả về giá trị đã sửa. Dữ liệu không hợp lệ được báo trên điều khiển biểu mẫu hiện có."
+ },
+ "automationCalendar": {
+ "title": "Lịch tự động hóa",
+ "description": "Đổi tháng, chuyển lịch và lịch sử, mở kết quả bản ghi thành công hoặc thất bại. Vùng chứa hẹp tự hiện danh sách lịch.",
+ "options": "jobs và month quyết định nội dung lịch. onInspect xử lý tác vụ đã lên lịch; bên gọi cung cấp hiển thị kết quả qua renderRunDialog. Lịch không đọc dịch vụ.",
+ "providerError": "Nhà cung cấp ví dụ không khả dụng.",
+ "state": "Trạng thái lịch",
+ "previousMonth": "Tháng trước",
+ "nextMonth": "Tháng sau",
+ "planned": "Đã lên lịch",
+ "recorded": "Lịch sử chạy",
+ "running": "Đang chạy",
+ "failed": "Thất bại",
+ "completed": "Hoàn tất",
+ "skipped": "Đã bỏ qua",
+ "system": "Tác vụ hệ thống",
+ "noEntries": "Không có lịch trong tháng này",
+ "more": "Thêm {{count}} mục",
+ "selected": "Tác vụ đã chọn: {{name}}",
+ "hint": "Chọn bản ghi chạy để xem kết quả hoặc chọn tác vụ đã lên lịch."
+ },
+ "providers": {
+ "title": "Quản lý nhà cung cấp",
+ "description": "Xem hộp thoại quản lý nhà cung cấp thực tế và quy trình thêm mới.",
+ "options": "Dùng lại ProvidersSettings từ cài đặt. Bên gọi quản lý danh mục, biểu mẫu và hàm lưu; bản xem trước thay đổi dữ liệu ví dụ cục bộ, hỗ trợ cấu hình, tìm kiếm, tạo và hủy.",
+ "invalidParameters": "Nhập JSON tham số yêu cầu hợp lệ; giá trị tiêu đề và tham số truy vấn phải là chuỗi.",
+ "saved": "Đã lưu cấu hình xem trước cho {{name}}",
+ "added": "Đã thêm {{name}}",
+ "signedIn": "Đã đặt xác thực xem trước thành đã đăng nhập",
+ "signedOut": "Đã đặt xác thực xem trước thành chưa đăng nhập",
+ "builtInIcons": "Dùng biểu tượng tích hợp",
+ "brandIcons": "Dùng biểu tượng thương hiệu",
+ "configured": "Số nhà cung cấp đã cấu hình: {{count}}",
+ "providerAdded": "Đã thêm nhà cung cấp"
+ },
+ "runResult": {
+ "title": "Kết quả chạy tự động",
+ "description": "Mở kết quả để so sánh phản hồi Markdown, đang tải, thử lại, phản hồi trống và thiếu lịch sử.",
+ "options": "result cung cấp trạng thái tải và phản hồi đã lấy. Bên gọi xử lý onRetry; giao diện này không đọc môi trường chạy hay yêu cầu kết quả.",
+ "state": "Kết quả chạy",
+ "view": "Xem kết quả chạy"
+ },
+ "chatBinding": {
+ "title": "Trò chuyện chạy tác vụ",
+ "description": "Chọn trò chuyện, sửa hướng dẫn, xác nhận, đổi lại hoặc hủy; so sánh tác vụ bận, lỗi tải và xung đột.",
+ "options": "data và job cung cấp trò chuyện khả dụng và phiên bản liên kết. Giao diện quản lý bản nháp xác nhận; điểm vào tính năng nối onSave, onSaved và onReload với thao tác dữ liệu.",
+ "state": "Trạng thái liên kết trò chuyện",
+ "setChat": "Đặt trò chuyện chạy tác vụ",
+ "saved": "Lần chạy tiếp theo sẽ diễn ra trong {{title}}",
+ "hint": "Chọn trò chuyện đích rồi xác nhận hoặc sửa hướng dẫn tác vụ."
+ },
+ "about": {
+ "title": "Giới thiệu và phiên bản",
+ "description": "So sánh kiểm tra phiên bản, liên kết commit, cập nhật và trang giới thiệu; các nút dùng kết quả ví dụ để cập nhật hiển thị.",
+ "options": "AboutSettingsView nhận tổ hợp liên kết phiên bản và hỗ trợ. VersionCheckRowView hiển thị checking/result và yêu cầu kiểm tra qua onCheck. Điểm vào tính năng quản lý kiểm tra thực tế và dữ liệu liên kết chẩn đoán.",
+ "error": "Không thể lấy thông tin phiên bản. Hãy thử lại.",
+ "state": "Trạng thái phiên bản",
+ "selectedLink": "Đã chọn liên kết GitHub"
+ },
+ "appearance": {
+ "title": "Tùy chọn giao diện",
+ "description": "Đổi giao diện, hiển thị hoạt động, khác biệt tệp và thông báo; giá trị ví dụ xuất hiện bên dưới.",
+ "options": "Bên gọi quản lý giao diện và tùy chọn. onChangeBrowserNotifications giao yêu cầu quyền cho điểm vào tính năng; hàm gọi lại xem trước chỉ đổi công tắc ví dụ."
+ },
+ "starInvitation": {
+ "title": "Lời mời ủng hộ",
+ "description": "Mở hộp thoại mời thực tế, so sánh lưu và lỗi; thử để sau, liên kết GitHub và không nhắc lại.",
+ "options": "open, saving và error là trạng thái hiển thị. Điểm vào StarPrompt hiện có quản lý nhận lời mời và lưu tùy chọn lâu dài; giao diện chỉ gọi thao tác được truyền vào.",
+ "state": "Trạng thái lời mời",
+ "view": "Xem lời mời",
+ "dismissed": "Đã chọn không nhắc lại trong bản xem trước",
+ "starred": "Đã chọn liên kết GitHub trong bản xem trước"
+ }
+}
diff --git a/webui/src/dev/gallery/locales/controls/zh-CN.json b/webui/src/dev/gallery/locales/controls/zh-CN.json
new file mode 100644
index 000000000..d3e06c5a7
--- /dev/null
+++ b/webui/src/dev/gallery/locales/controls/zh-CN.json
@@ -0,0 +1,500 @@
+{
+ "common": {
+ "unavailable": "不可用",
+ "selected": "已选择:{{value}}",
+ "savingPreview": "正在保存预览值…",
+ "savedPreview": "预览值已保存",
+ "providerAction": "选择了服务商配置操作",
+ "reset": "重置预览"
+ },
+ "button": {
+ "title": "按钮",
+ "description": "通过选项调整同一按钮的样式与尺寸。",
+ "options": "variant 改变样式;size 调整尺寸;disabled 禁止交互;onClick 由调用方提供。",
+ "variants": "样式 — 同一按钮的不同外观",
+ "sizes": "尺寸",
+ "add": "添加示例",
+ "clicks": "按钮点击次数:{{count}}"
+ },
+ "input": {
+ "title": "输入框",
+ "description": "文本输入与共用的搜索框变体。",
+ "options": "普通字段使用 Input,搜索使用 SearchInput。须提供标签,并说明无效输入的原因。",
+ "name": "示例名称",
+ "projectName": "项目名称",
+ "search": "搜索",
+ "searchName": "示例搜索",
+ "searchProjects": "搜索项目",
+ "invalid": "无效输入",
+ "invalidName": "无效名称",
+ "required": "请输入项目名称。",
+ "disabledName": "禁用的名称输入框"
+ },
+ "textarea": {
+ "title": "多行输入",
+ "description": "采用共用焦点样式的多行文本框。",
+ "options": "接受原生 textarea 属性:value、onChange、rows 和 disabled。",
+ "notes": "示例笔记",
+ "disabledNotes": "禁用的笔记输入框",
+ "readOnly": "只读预览"
+ },
+ "toggle": {
+ "title": "开关",
+ "description": "设置、工作区与频道共用的受控开关。",
+ "options": "调用方管理 checked 和 onChange;label 提供无障碍名称。",
+ "enable": "启用示例",
+ "unavailableOn": "不可操作的已开启开关",
+ "unavailableOff": "不可操作的已关闭开关"
+ },
+ "select": {
+ "title": "选择器",
+ "description": "支持键盘导航与禁用选项的单选控件。",
+ "options": "组合 Select、SelectTrigger、SelectValue、SelectContent 和 SelectItem。根组件管理 value/onValueChange。",
+ "fast": "快速",
+ "model": "示例模型",
+ "disabledModel": "禁用的模型选择器"
+ },
+ "segmented": {
+ "title": "分段选择",
+ "description": "始终可见的一组简短选项。",
+ "options": "value、options 和 onChange 由调用方控制。mode=\"tabs\" 增加方向键标签页导航。",
+ "day": "日",
+ "week": "周",
+ "month": "月",
+ "period": "示例周期",
+ "selected": "已选周期:{{value}}"
+ },
+ "combobox": {
+ "title": "搜索选择",
+ "description": "可搜索选项,共用键盘与指针导航。",
+ "options": "useComboboxNavigation 提供输入框、列表与选项属性;调用方过滤数据并管理选择。",
+ "search": "搜索示例选项",
+ "placeholder": "输入文字或使用方向键",
+ "choices": "示例选项",
+ "empty": "没有匹配的选项",
+ "selected": "已选选项:{{value}}"
+ },
+ "chevron": {
+ "title": "控件箭头",
+ "description": "选择控件共用的箭头图标。",
+ "options": "可用 className 调整位置。图标仅作装饰,无障碍名称由所属控件提供。"
+ },
+ "dialog": {
+ "title": "对话框",
+ "description": "暂存编辑、嵌套选择与焦点返回。",
+ "options": "调用方管理 open/onOpenChange 及草稿和保存行为。始终提供 DialogTitle,并在需要时提供说明。",
+ "open": "打开对话框",
+ "edit": "编辑示例标签",
+ "help": "修改仅应用于此预览。",
+ "label": "示例标签",
+ "save": "保存标签",
+ "saved": "已保存标签:{{name}}"
+ },
+ "alert": {
+ "title": "确认对话框",
+ "description": "取消与执行操作分开的明确确认。",
+ "options": "组合标题、说明与底部操作区;在 AlertDialogAction 的处理函数中执行操作。",
+ "remove": "移除示例",
+ "confirmTitle": "移除此示例?",
+ "help": "此操作仅改变预览状态。",
+ "confirm": "确认移除",
+ "removed": "示例已移除。",
+ "available": "示例可用。"
+ },
+ "sheet": {
+ "title": "侧边面板",
+ "description": "贴靠视口边缘的模态面板。",
+ "options": "SheetContent 支持 side。须包含 SheetTitle 和 SheetDescription。",
+ "open": "打开侧边面板",
+ "panelTitle": "示例侧边面板",
+ "help": "当前页面旁的辅助控件。",
+ "notes": "面板笔记",
+ "placeholder": "在此尝试编辑"
+ },
+ "popover": {
+ "title": "浮层",
+ "description": "锚定到触发控件的小型交互区域。",
+ "options": "组合触发控件与内容;可控制 open/onOpenChange。内容沿用所属对话框的 portal。",
+ "open": "打开浮层",
+ "note": "随手笔记"
+ },
+ "menu": {
+ "title": "下拉菜单",
+ "description": "操作、单选、嵌套菜单与禁用条目。",
+ "options": "操作使用 onSelect,持久选择使用单选组。",
+ "view": "视图选项",
+ "layout": "布局",
+ "comfortable": "宽松",
+ "compact": "紧凑",
+ "rename": "重命名",
+ "more": "更多操作",
+ "duplicate": "创建副本",
+ "none": "无",
+ "status": "密度:{{density}}。操作:{{action}}。"
+ },
+ "tooltip": {
+ "title": "提示",
+ "description": "HoverHint 组合共用提示基础组件;tooltip.tsx 是公开导入入口。",
+ "options": "普通提示使用 HoverHint;重要错误须保持可见。悬停与键盘焦点遵循产品共用的时序规则。",
+ "primitive": "基础提示",
+ "primitiveHelp": "指针悬停采用共用延迟,键盘聚焦立即显示。",
+ "hint": "悬停提示",
+ "hintHelp": "组合提示采用相同的焦点与指针行为。"
+ },
+ "truncated": {
+ "title": "截断提示",
+ "description": "仅在测得文本被截断时显示提示。",
+ "options": "提供 text 并限制宽度。文本本身需要接受键盘焦点时添加 tabIndex。"
+ },
+ "disclosure": {
+ "title": "折叠内容",
+ "description": "折叠时保留子组件状态的展开区域。",
+ "options": "Disclosure 管理展开状态;自定义触发控件可向 DisclosureContent 传入受控的 open。",
+ "show": "显示高级选项",
+ "help": "关闭再打开后,此草稿仍会保留。",
+ "draft": "折叠区域草稿"
+ },
+ "expandable": {
+ "title": "文本展开",
+ "description": "同一已挂载文本的限行预览。",
+ "options": "调用方管理 expanded。lines 指定折叠行数;须提供可无障碍操作的开关。",
+ "less": "收起",
+ "more": "展开"
+ },
+ "imageViewport": {
+ "title": "图像视口",
+ "description": "单张图片的适应、缩放、平移与双指缩放控件。",
+ "options": "用 className 限定边界;更换图片身份时重新挂载。图库管理方向键导航时设置 panWithArrows=false。"
+ },
+ "streaming": {
+ "title": "流光文字",
+ "description": "思考中与工具标签共用的文字动画。",
+ "options": "active 控制动画。字符串或数字子节点提供字形叠层;遵循减少动态效果设置。",
+ "animate": "启用标签动画",
+ "working": "正在处理下一步…"
+ },
+ "markdown": {
+ "title": "回复排版",
+ "description": "实际流式渲染,支持表格、代码与公式。",
+ "options": "children 为 Markdown 文本。streaming 控制未完成内容;onOpenFilePreview 由页面提供。",
+ "state": "Markdown 状态"
+ },
+ "code": {
+ "title": "代码展示",
+ "description": "语法高亮、行号、复制、ANSI 输出与视口感知代码行。",
+ "options": "code 与 language 提供内容;showLineNumbers、wrapLongLines 和 chrome 控制展示。视口高亮要求显示行号且不换行。",
+ "format": "代码格式"
+ },
+ "math": {
+ "title": "数学公式",
+ "description": "为 Markdown 块级公式提供尺寸适配。",
+ "options": "TeX 源码使用 MarkdownText。DisplayMath 本身接收已渲染的公式节点,并按可用宽度缩放。"
+ },
+ "message": {
+ "title": "消息",
+ "description": "用户与助手消息,含思考及投递状态。",
+ "options": "message 为聊天运行时投影的 UIMessage。数据与网络操作不属于渲染器。",
+ "state": "消息状态"
+ },
+ "activity": {
+ "title": "智能体活动",
+ "description": "组合运行中、已完成或失败的活动序列。",
+ "options": "传入文本、状态及受控的展开值。工具执行由 gateway 负责;这些组件展示其投影状态。",
+ "state": "活动状态",
+ "working": "处理中",
+ "details": "活动详情",
+ "collapse": "收起",
+ "readError": "无法读取文件",
+ "read": "读取源码"
+ },
+ "files": {
+ "title": "文件修改",
+ "description": "文件引用、变更行数与可展开差异。",
+ "options": "edits 包含展示摘要;displayMode 选择 summary/diff/collapsed_diff;onOpenFilePreview 由页面提供。",
+ "error": "无法应用示例修改。",
+ "state": "文件修改状态",
+ "operation": "文件操作",
+ "display": "差异展示",
+ "selected": "已选文件:{{path}}",
+ "hint": "选择文件引用以体验其回调。"
+ },
+ "media": { "study": "色彩练习 {{count}}" },
+ "imageGallery": {
+ "title": "图片缩略图",
+ "description": "多图布局、缩略图选择与更多图片。",
+ "options": "images 提供地址和名称;size 选择大图或紧凑缩略图,align 控制对齐。最多显示四个缩略图,内置 ImageLightbox 可浏览全部有地址的图片。",
+ "sixImages": "六张图片",
+ "compact": "紧凑缩略图",
+ "hint": "点击缩略图或 +2 查看全部六张图片。"
+ },
+ "imageLightbox": {
+ "title": "全屏预览",
+ "description": "受控全屏预览与多图切换。",
+ "options": "index 为 null 时关闭。调用方管理 index 与开关回调;ImageLightbox 内置 ZoomableImage,切图时重置视图。",
+ "open": "打开全屏预览",
+ "hint": "使用前后按钮、←/→ 或 Home/End 切图;点击 × 或按 Escape 关闭。"
+ },
+ "zoomableImage": {
+ "title": "单图缩放",
+ "description": "单图缩放、边界内平移与手势。",
+ "options": "src 和 alt 提供单张图片。容器须有定位和明确高度,换图时重新挂载。聚焦图片区域后可用 +、− 和 0 操作。",
+ "hint": "使用 +/−、双击、Ctrl+滚轮或双指缩放;放大后拖动或滚动平移,点击百分比或按 0 复位。"
+ },
+ "attachment": {
+ "title": "附件",
+ "description": "图片、视频、下载与不可用附件。",
+ "options": "attachment.kind 区分 image、video 与 file。图片打开 ImageLightbox,视频使用原生控件,文件提供下载链接。无地址时显示不可用附件;图片加载失败时也显示不可用附件。",
+ "image": "图片",
+ "video": "可播放视频",
+ "file": "下载文件",
+ "unavailable": "附件不可用(无 URL)"
+ },
+ "fileReference": {
+ "title": "文件引用",
+ "description": "由调用方提供打开操作的文件引用。",
+ "options": "path 提供标签;onOpen 提供操作。组件不决定工作区权限。",
+ "select": "请选择文件引用。"
+ },
+ "settingsComposition": {
+ "title": "设置组件",
+ "description": "实际设置行、分组与能力组件搭配共用控件。",
+ "options": "所在设置控制器管理数值与持久化;图库回调仅更新本地预览状态。",
+ "preferences": "示例偏好",
+ "keepDrafts": "保留草稿",
+ "switchHint": "带受控开关的共用设置行。",
+ "projectLabel": "项目标签",
+ "projectName": "设置中的项目标签",
+ "capability": "示例能力",
+ "notes": "笔记",
+ "capabilityNotes": "能力笔记",
+ "localOnly": "仅用于本地预览"
+ },
+ "modelPickers": {
+ "title": "模型选择",
+ "description": "选择服务商、搜索或输入模型 ID,并调整推理强度。",
+ "options": "ProviderPicker 的值与操作由调用方提供。ModelIdPicker 的 models 参数可提供固定目录;ReasoningEffortPicker 的 savedValues 提供已有选项。",
+ "chooseProvider": "选择服务商",
+ "configure": "配置 {{provider}}"
+ },
+ "providerIcons": {
+ "title": "服务商图标",
+ "description": "比较普通、紧凑与填充尺寸,以及选择器的未配置状态。",
+ "options": "provider 选择已有图标;compact 与 fill 控制尺寸。showBrandLogos=false 使用内置图标。",
+ "size": "图标尺寸"
+ },
+ "timezone": {
+ "title": "时区选择",
+ "description": "按时区名、中文名称或 UTC 偏移搜索,查看同一时刻的当地时间。",
+ "options": "value 是 IANA 时区;onChange 更新调用方的值。搜索与键盘导航由组件提供。"
+ },
+ "textEditor": {
+ "title": "文本编辑",
+ "description": "打开编辑器,修改、保存或取消;清空内容后保存可查看错误反馈。",
+ "options": "SettingsTextEditor 在 onSave 成功后关闭,失败时显示错误;SettingsHint 可通过悬停、焦点或点击打开。",
+ "state": "编辑状态",
+ "hint": "打开编辑器后可以修改、保存或取消。清空内容可查看错误状态。",
+ "instructions": "示例说明",
+ "edit": "编辑示例说明",
+ "help": "保存后,下方显示修改的内容。",
+ "required": "请输入内容。"
+ },
+ "removePreset": {
+ "title": "删除预设",
+ "description": "删除未使用的模型预设,查看默认模型使用中预设的禁用状态。",
+ "options": "这是 ModelsSettings 使用的删除按钮;disabled 与删除动作由调用方提供。服务商管理使用 ProvidersSettings 弹窗。",
+ "defaultModel": "默认模型",
+ "codeAssistant": "代码助手",
+ "remove": "删除 {{name}}",
+ "primaryHint": "默认模型使用中的预设不能删除。",
+ "count": "预览预设数量:{{count}}"
+ },
+ "loading": {
+ "title": "加载占位",
+ "description": "切换应用、频道与技能目录的加载布局,并查看通用状态容器。",
+ "options": "CatalogSkeleton 的 layout 选择布局。SkeletonStatus 用 label 提供读屏状态,将装饰内容标为 aria-hidden。",
+ "layout": "目录布局",
+ "catalog": "正在加载预览目录"
+ },
+ "sidebar": {
+ "title": "设置导航",
+ "description": "选择分类、处理待重启状态,并缩小浏览器查看移动端菜单。",
+ "options": "activeSection 与 onSelectSection 控制选择;返回、退出与重启动作为调用方回调。",
+ "back": "返回聊天",
+ "logout": "退出登录",
+ "restart": "已处理预览重启操作",
+ "hint": "选择设置分类,或缩小浏览器查看移动端导航。",
+ "toggleRestart": "切换待重启状态"
+ },
+ "providerSearch": {
+ "title": "服务商搜索",
+ "description": "搜索按 OAuth、API Key 与本地分组的服务商,选择条目或自定义服务商。",
+ "options": "providers 是已有目录。query 为受控搜索值;onSelect 与 onCustom 将选择交给父组件。",
+ "closed": "已关闭搜索",
+ "custom": "已选择自定义服务商",
+ "hint": "搜索服务商,或用方向键选择。"
+ },
+ "requestParameters": {
+ "title": "请求参数",
+ "description": "编辑请求头、查询参数和请求体;输入无效 JSON 查看真实校验反馈。",
+ "options": "fields 选择显示项,form 保存 JSON 文本。请求头与查询参数只接受字符串值;请求体接受任意 JSON 对象值。"
+ },
+ "requestAPI": {
+ "title": "请求协议",
+ "description": "选择服务商支持的协议、默认协议,以及模型覆盖和回退选项。",
+ "options": "ProviderAPIControl 至少保留一个协议。ModelAPIControl 允许 null 表示自动选择,并按服务商能力显示可用协议。",
+ "providerAPI": "服务商协议",
+ "modelOverride": "模型覆盖"
+ },
+ "usage": {
+ "title": "用量统计",
+ "description": "切换有数据、空记录和不可用状态;悬停柱图查看每日用量,打开详情查看模型趋势。",
+ "options": "usage 是调用方提供的统计记录;timeZone 定义日期范围。详情弹窗与图表只展示传入数据。",
+ "state": "用量状态"
+ },
+ "overview": {
+ "title": "设置概览",
+ "description": "查看当前模型、能力状态和用量统计,点击功能行体验分类选择。",
+ "options": "settings 提供概览数据;onSelectSection 接收选择的设置分类。",
+ "selected": "选择的分类:{{section}}"
+ },
+ "web": {
+ "title": "搜索设置",
+ "description": "切换免凭据、API Key 与服务器地址三种服务商,调整搜索选项并体验自动保存。",
+ "options": "settings 保存当前配置,form 保存编辑值。保存、凭据显示与服务商切换由父组件提供。",
+ "unsaved": "预览草稿尚未保存"
+ },
+ "image": {
+ "title": "图像设置",
+ "description": "开关图像生成,选择固定模型目录、宽高比与图片尺寸,展开高级选项调整数量。",
+ "options": "form 为受控配置,dirty 标记修改。组件复用服务商凭据,保存动作由父组件实现。"
+ },
+ "voice": {
+ "title": "语音设置",
+ "description": "切换转写开关,编辑模型、语言、时长和上传大小限制,体验自动保存。",
+ "options": "settings 提供服务商信息;form 与保存回调由父组件管理。"
+ },
+ "safety": {
+ "title": "访问设置",
+ "description": "切换本地服务访问与默认权限,查看设置行、提示和自动保存反馈。",
+ "options": "form 是显示值;onSave 处理保存请求。运行时的权限执行仍由 gateway 负责。"
+ },
+ "channelCatalog": {
+ "title": "频道条目",
+ "description": "切换运行、启动、失败和未安装状态;操作开关、安装入口与帮助菜单。",
+ "options": "feature 提供安装和运行状态;onAction 与 onSelect 交给父组件处理,标识、错误和帮助使用同一频道数据。",
+ "exampleChannel": "示例频道",
+ "state": "频道状态",
+ "error": "示例连接失败。",
+ "stopped": "已停止",
+ "running": "运行中",
+ "starting": "启动中",
+ "failed": "失败",
+ "selected": "选择了频道设置",
+ "hint": "点击开关或安装按钮,查看状态变化。"
+ },
+ "credentials": {
+ "title": "频道表单",
+ "description": "输入凭据,显示或隐藏密文,应用连接预设,检查必填字段并复制辅助命令。",
+ "options": "fields 定义分组与控件,values 和 visibleSecrets 为受控值。requirements 定义凭据组合;预设与保存回调只更新此示例。",
+ "botToken": "机器人令牌",
+ "tokenPlaceholder": "示例令牌",
+ "serverURL": "服务器 URL",
+ "replyMode": "回复模式",
+ "mentions": "提及消息",
+ "allMessages": "所有消息",
+ "allowFrom": "允许的发送者",
+ "local": "本地服务器",
+ "hosted": "托管服务器",
+ "required": "请输入机器人令牌。",
+ "checkSave": "检查并保存",
+ "command": "示例命令",
+ "applied": "已应用 {{name}}",
+ "incomplete": "请补全凭据。",
+ "saved": "预览凭据已保存。",
+ "hint": "填写凭据、切换密文显示,或应用连接预设。"
+ },
+ "channelValidation": {
+ "title": "连接检查",
+ "description": "切换检查中、成功和失败,观察逐项揭示的检查结果与身份摘要。",
+ "options": "validation 提供检查记录,validating 控制加载状态;组件只负责展示。",
+ "expired": "示例令牌已过期。",
+ "result": "检查结果"
+ },
+ "runAt": {
+ "title": "定时选择",
+ "description": "输入日期时间,或打开日历并用鼠标、方向键和翻页键选择日期。",
+ "options": "value 使用 YYYY-MM-DDTHH:mm 本地时间;onChange 返回编辑值。错误输入显示在现有表单控件上。"
+ },
+ "automationCalendar": {
+ "title": "任务日历",
+ "description": "翻月、切换计划与历史,点击成功或失败记录打开结果弹窗;窄容器自动显示日程列表。",
+ "options": "jobs 与 month 决定日历内容。onInspect 处理计划中的任务;renderRunDialog 由调用方提供结果展示,日历不读取服务。",
+ "providerError": "示例服务商不可用。",
+ "state": "日程状态",
+ "previousMonth": "上个月",
+ "nextMonth": "下个月",
+ "planned": "已计划",
+ "recorded": "运行记录",
+ "running": "正在运行",
+ "failed": "失败",
+ "completed": "完成",
+ "skipped": "已跳过",
+ "system": "系统任务",
+ "noEntries": "本月没有日程",
+ "more": "另外 {{count}} 条",
+ "selected": "选择了任务:{{name}}",
+ "hint": "点击运行记录查看结果,或选择计划中的任务。"
+ },
+ "providers": {
+ "title": "服务商管理",
+ "description": "查看实际服务商管理弹窗与添加流程。",
+ "options": "复用设置中的 ProvidersSettings。目录、表单与保存回调由调用方控制;此处修改本地示例数据,支持配置、搜索、创建与取消。",
+ "invalidParameters": "请输入有效的请求参数 JSON;请求头和查询参数的值须为字符串。",
+ "saved": "已保存 {{name}} 的预览配置",
+ "added": "已添加 {{name}}",
+ "signedIn": "预览授权状态已设为已登录",
+ "signedOut": "预览授权状态已设为未登录",
+ "builtInIcons": "使用内置图标",
+ "brandIcons": "使用品牌图标",
+ "configured": "已配置服务商数量:{{count}}",
+ "providerAdded": "已添加服务商"
+ },
+ "runResult": {
+ "title": "运行结果",
+ "description": "打开运行结果,比较 Markdown 回复、加载、重试、空回复与历史记录缺失状态。",
+ "options": "result 提供加载状态与已取得的回复。onRetry 交给调用方处理;此视图不读取运行时或请求结果。",
+ "state": "运行结果",
+ "view": "查看运行结果"
+ },
+ "chatBinding": {
+ "title": "运行聊天",
+ "description": "选择运行聊天、修改任务说明,确认、更换回来或取消;比较任务占用、加载错误与冲突。",
+ "options": "data 与 job 提供可用聊天和绑定版本。视图管理确认草稿;onSave、onSaved 与 onReload 由功能入口接入数据操作。",
+ "state": "聊天绑定状态",
+ "setChat": "设置运行聊天",
+ "saved": "下次运行将在 {{title}} 中进行",
+ "hint": "选择目标聊天,确认或修改任务说明。"
+ },
+ "about": {
+ "title": "关于与版本",
+ "description": "比较版本检查状态、提交链接、更新入口和关于页面;按钮用示例结果更新显示。",
+ "options": "AboutSettingsView 接受版本与支持链接的组合。VersionCheckRowView 展示 checking/result,并通过 onCheck 请求检查。真实检查与诊断链接数据由功能入口负责。",
+ "error": "无法获取版本信息,请重试。",
+ "state": "版本状态",
+ "selectedLink": "选择了 GitHub 链接"
+ },
+ "appearance": {
+ "title": "外观选项",
+ "description": "切换外观、活动展示、文件差异和通知偏好,下方显示示例值。",
+ "options": "主题和偏好由调用方管理。onChangeBrowserNotifications 将权限申请交给功能入口;预览回调只改变示例开关。"
+ },
+ "starInvitation": {
+ "title": "支持邀请",
+ "description": "打开实际邀请弹窗,比较保存与错误状态,体验暂缓、GitHub 链接和不再提醒的操作。",
+ "options": "open、saving 和 error 是显示状态。领取邀请与持久化偏好由原有 StarPrompt 入口负责;视图只调用传入操作。",
+ "state": "邀请状态",
+ "view": "查看邀请",
+ "dismissed": "预览中选择了不再提醒",
+ "starred": "预览中选择了 GitHub 链接"
+ }
+}
diff --git a/webui/src/dev/gallery/locales/controls/zh-TW.json b/webui/src/dev/gallery/locales/controls/zh-TW.json
new file mode 100644
index 000000000..08cf945b0
--- /dev/null
+++ b/webui/src/dev/gallery/locales/controls/zh-TW.json
@@ -0,0 +1,500 @@
+{
+ "common": {
+ "unavailable": "無法使用",
+ "selected": "已選取:{{value}}",
+ "savingPreview": "正在儲存預覽值…",
+ "savedPreview": "已儲存預覽值",
+ "providerAction": "已選取服務商設定操作",
+ "reset": "重設預覽"
+ },
+ "button": {
+ "title": "按鈕",
+ "description": "透過選項調整同一按鈕的外觀與尺寸。",
+ "options": "variant 改變外觀;size 調整尺寸;disabled 禁止互動;onClick 由呼叫端提供。",
+ "variants": "樣式 — 同一按鈕的不同外觀",
+ "sizes": "尺寸",
+ "add": "新增範例",
+ "clicks": "按鈕點擊次數:{{count}}"
+ },
+ "input": {
+ "title": "輸入欄位",
+ "description": "文字輸入與共用的搜尋欄位變體。",
+ "options": "一般欄位使用 Input,搜尋使用 SearchInput。須提供標籤,並說明無效輸入的原因。",
+ "name": "範例名稱",
+ "projectName": "專案名稱",
+ "search": "搜尋",
+ "searchName": "範例搜尋",
+ "searchProjects": "搜尋專案",
+ "invalid": "無效輸入",
+ "invalidName": "無效名稱",
+ "required": "請輸入專案名稱。",
+ "disabledName": "停用的名稱欄位"
+ },
+ "textarea": {
+ "title": "多行輸入",
+ "description": "採用共用焦點樣式的多行文字欄位。",
+ "options": "接受原生 textarea 屬性:value、onChange、rows 和 disabled。",
+ "notes": "範例筆記",
+ "disabledNotes": "停用的筆記欄位",
+ "readOnly": "唯讀預覽"
+ },
+ "toggle": {
+ "title": "開關",
+ "description": "設定、工作區與頻道共用的受控開關。",
+ "options": "呼叫端管理 checked 和 onChange;label 提供無障礙名稱。",
+ "enable": "啟用範例",
+ "unavailableOn": "無法操作的已開啟開關",
+ "unavailableOff": "無法操作的已關閉開關"
+ },
+ "select": {
+ "title": "選擇器",
+ "description": "支援鍵盤導覽與停用選項的單選控制項。",
+ "options": "組合 Select、SelectTrigger、SelectValue、SelectContent 和 SelectItem。根元件管理 value/onValueChange。",
+ "fast": "快速",
+ "model": "範例模型",
+ "disabledModel": "停用的模型選擇器"
+ },
+ "segmented": {
+ "title": "分段選擇",
+ "description": "一組簡短且持續顯示的選項。",
+ "options": "value、options 和 onChange 由呼叫端控制。mode=\"tabs\" 加入方向鍵分頁導覽。",
+ "day": "日",
+ "week": "週",
+ "month": "月",
+ "period": "範例週期",
+ "selected": "已選週期:{{value}}"
+ },
+ "combobox": {
+ "title": "搜尋選擇",
+ "description": "可搜尋選項,共用鍵盤與指標導覽。",
+ "options": "useComboboxNavigation 提供輸入欄位、清單與選項屬性;呼叫端篩選資料並管理選取狀態。",
+ "search": "搜尋範例選項",
+ "placeholder": "輸入文字或使用方向鍵",
+ "choices": "範例選項",
+ "empty": "沒有符合的選項",
+ "selected": "已選選項:{{value}}"
+ },
+ "chevron": {
+ "title": "控制項箭頭",
+ "description": "選擇控制項共用的箭頭圖示。",
+ "options": "可用 className 調整位置。圖示僅供裝飾,無障礙名稱由所屬控制項提供。"
+ },
+ "dialog": {
+ "title": "對話方塊",
+ "description": "支援暫存修改、巢狀選擇與焦點返回。",
+ "options": "呼叫端管理 open/onOpenChange 及草稿與儲存行為。務必提供 DialogTitle,並在需要時提供說明。",
+ "open": "開啟對話方塊",
+ "edit": "編輯範例標籤",
+ "help": "變更只會套用至此預覽。",
+ "label": "範例標籤",
+ "save": "儲存標籤",
+ "saved": "已儲存標籤:{{name}}"
+ },
+ "alert": {
+ "title": "確認對話方塊",
+ "description": "分開取消與執行操作,明確要求確認。",
+ "options": "組合標題、說明與底部操作區;在 AlertDialogAction 的處理函式中執行操作。",
+ "remove": "移除範例",
+ "confirmTitle": "移除此範例?",
+ "help": "此操作只會改變預覽狀態。",
+ "confirm": "確認移除",
+ "removed": "已移除範例。",
+ "available": "範例可供使用。"
+ },
+ "sheet": {
+ "title": "側邊面板",
+ "description": "貼靠檢視區邊緣的模態面板。",
+ "options": "SheetContent 支援 side。須包含 SheetTitle 和 SheetDescription。",
+ "open": "開啟側邊面板",
+ "panelTitle": "範例側邊面板",
+ "help": "目前頁面旁的輔助控制項。",
+ "notes": "面板筆記",
+ "placeholder": "在此嘗試編輯"
+ },
+ "popover": {
+ "title": "浮動面板",
+ "description": "固定於觸發控制項的小型互動區域。",
+ "options": "組合觸發控制項與內容;可控制 open/onOpenChange。內容沿用所屬對話方塊的 portal。",
+ "open": "開啟浮動面板",
+ "note": "隨手筆記"
+ },
+ "menu": {
+ "title": "下拉選單",
+ "description": "操作、單選、巢狀選單與停用項目。",
+ "options": "操作使用 onSelect,持續保留的選擇使用單選群組。",
+ "view": "檢視選項",
+ "layout": "版面配置",
+ "comfortable": "寬鬆",
+ "compact": "緊密",
+ "rename": "重新命名",
+ "more": "更多操作",
+ "duplicate": "建立副本",
+ "none": "無",
+ "status": "密度:{{density}}。操作:{{action}}。"
+ },
+ "tooltip": {
+ "title": "工具提示",
+ "description": "HoverHint 組合共用提示元件;tooltip.tsx 為其公開匯入入口。",
+ "options": "一般提示使用 HoverHint。重要錯誤須持續顯示。懸停與鍵盤焦點遵循產品共用的時間規則。",
+ "primitive": "基礎提示",
+ "primitiveHelp": "指標懸停採用共用延遲,鍵盤聚焦立即顯示。",
+ "hint": "懸停提示",
+ "hintHelp": "組合提示採用相同的焦點與指標行為。"
+ },
+ "truncated": {
+ "title": "截斷提示",
+ "description": "僅在測得文字被截斷時顯示提示。",
+ "options": "提供 text 並限制寬度。文字本身需要接受鍵盤焦點時加入 tabIndex。"
+ },
+ "disclosure": {
+ "title": "摺疊內容",
+ "description": "摺疊時保留子元件狀態的展開區域。",
+ "options": "Disclosure 管理展開狀態;自訂觸發控制項可向 DisclosureContent 傳入受控的 open。",
+ "show": "顯示進階選項",
+ "help": "關閉再開啟後,此草稿仍會保留。",
+ "draft": "摺疊區域草稿"
+ },
+ "expandable": {
+ "title": "文字展開",
+ "description": "同一已掛載文字的限行預覽。",
+ "options": "呼叫端管理 expanded。lines 指定摺疊行數;須提供可無障礙操作的開關。",
+ "less": "收合",
+ "more": "展開"
+ },
+ "imageViewport": {
+ "title": "圖片檢視區",
+ "description": "單張圖片的適應、縮放、平移與雙指縮放。",
+ "options": "用 className 限定邊界;更換圖片身分時重新掛載。圖庫管理方向鍵導覽時設定 panWithArrows=false。"
+ },
+ "streaming": {
+ "title": "流光文字",
+ "description": "思考中與工具標籤共用的文字動畫。",
+ "options": "active 控制動畫。字串或數字子節點提供字形疊層;遵循減少動態效果設定。",
+ "animate": "啟用標籤動畫",
+ "working": "正在處理下一步…"
+ },
+ "markdown": {
+ "title": "回覆排版",
+ "description": "正式串流渲染器,支援表格、程式碼與公式。",
+ "options": "children 為 Markdown 文字。streaming 控制未完成內容;onOpenFilePreview 由頁面提供。",
+ "state": "Markdown 狀態"
+ },
+ "code": {
+ "title": "程式碼顯示",
+ "description": "語法醒目提示、行號、複製、ANSI 輸出與檢視區感知程式碼行。",
+ "options": "code 與 language 提供內容;showLineNumbers、wrapLongLines 和 chrome 控制顯示。檢視區醒目提示要求顯示行號且不換行。",
+ "format": "程式碼格式"
+ },
+ "math": {
+ "title": "數學公式",
+ "description": "為 Markdown 區塊公式提供尺寸適配。",
+ "options": "TeX 原始碼使用 MarkdownText。DisplayMath 本身接收已渲染的公式節點,並依可用寬度縮放。"
+ },
+ "message": {
+ "title": "訊息",
+ "description": "使用者與助理訊息,含思考及傳送狀態。",
+ "options": "message 為聊天執行環境投影的 UIMessage。資料與網路操作不屬於渲染器。",
+ "state": "訊息狀態"
+ },
+ "activity": {
+ "title": "代理活動",
+ "description": "組合執行中、已完成或失敗的活動序列。",
+ "options": "傳入文字、狀態及受控的展開值。工具執行由 gateway 負責;這些元件顯示其投影狀態。",
+ "state": "活動狀態",
+ "working": "處理中",
+ "details": "活動詳情",
+ "collapse": "收合",
+ "readError": "無法讀取檔案",
+ "read": "讀取原始碼"
+ },
+ "files": {
+ "title": "檔案修改",
+ "description": "檔案參照、變更行數與可展開差異。",
+ "options": "edits 包含顯示摘要;displayMode 選擇 summary/diff/collapsed_diff;onOpenFilePreview 由頁面提供。",
+ "error": "無法套用範例修改。",
+ "state": "檔案修改狀態",
+ "operation": "檔案操作",
+ "display": "差異顯示",
+ "selected": "已選檔案:{{path}}",
+ "hint": "選取檔案參照以體驗其回呼。"
+ },
+ "media": { "study": "色彩練習 {{count}}" },
+ "imageGallery": {
+ "title": "圖片縮圖",
+ "description": "多圖配置、縮圖選取與更多圖片。",
+ "options": "images 提供網址和名稱;size 選擇大型或緊密縮圖,align 控制對齊。最多顯示四張縮圖,內建 ImageLightbox 可瀏覽所有有網址的圖片。",
+ "sixImages": "六張圖片",
+ "compact": "緊密縮圖",
+ "hint": "點選縮圖或 +2 查看全部六張圖片。"
+ },
+ "imageLightbox": {
+ "title": "全螢幕預覽",
+ "description": "受控全螢幕預覽與多圖切換。",
+ "options": "index 為 null 時關閉。呼叫端管理 index 與開關回呼;ImageLightbox 內建 ZoomableImage,切換圖片時重設檢視。",
+ "open": "開啟全螢幕預覽",
+ "hint": "使用前後按鈕、←/→ 或 Home/End 切換圖片;點選 × 或按 Escape 關閉。"
+ },
+ "zoomableImage": {
+ "title": "單圖縮放",
+ "description": "單圖縮放、邊界內平移與手勢。",
+ "options": "src 和 alt 提供單張圖片。容器須有定位和明確高度,換圖時重新掛載。聚焦圖片區域後可用 +、− 和 0 操作。",
+ "hint": "使用 +/−、按兩下、Ctrl+滾輪或雙指縮放;放大後拖曳或捲動平移,點選百分比或按 0 重設。"
+ },
+ "attachment": {
+ "title": "附件",
+ "description": "圖片預覽、影片播放、檔案下載與無法使用的附件。",
+ "options": "attachment.kind 區分 image、video 與 file。圖片開啟 ImageLightbox,影片使用原生控制項,檔案提供下載連結。沒有網址時顯示無法使用的附件;圖片載入失敗時亦同。",
+ "image": "圖片",
+ "video": "可播放影片",
+ "file": "下載檔案",
+ "unavailable": "無法使用的附件(無 URL)"
+ },
+ "fileReference": {
+ "title": "檔案參照",
+ "description": "由呼叫端提供開啟操作的檔案參照。",
+ "options": "path 提供標籤;onOpen 提供操作。元件不決定工作區權限。",
+ "select": "請選取檔案參照。"
+ },
+ "settingsComposition": {
+ "title": "設定元件",
+ "description": "實際設定列、群組與能力元件搭配共用控制項。",
+ "options": "所屬設定控制器管理數值與持久化;圖庫回呼只更新本機預覽狀態。",
+ "preferences": "範例偏好",
+ "keepDrafts": "保留草稿",
+ "switchHint": "搭配受控開關的共用設定列。",
+ "projectLabel": "專案標籤",
+ "projectName": "設定中的專案標籤",
+ "capability": "範例能力",
+ "notes": "筆記",
+ "capabilityNotes": "能力筆記",
+ "localOnly": "僅供本機預覽"
+ },
+ "modelPickers": {
+ "title": "模型選擇",
+ "description": "選擇服務商、搜尋或輸入模型 ID,並調整推理強度。",
+ "options": "ProviderPicker 的值與操作由呼叫端提供。ModelIdPicker 的 models 參數可提供固定目錄;ReasoningEffortPicker 的 savedValues 提供既有選項。",
+ "chooseProvider": "選擇服務商",
+ "configure": "設定 {{provider}}"
+ },
+ "providerIcons": {
+ "title": "服務商圖示",
+ "description": "比較一般、緊密與填滿尺寸,以及選擇器未設定狀態。",
+ "options": "provider 選擇既有圖示;compact 與 fill 控制尺寸。showBrandLogos=false 使用內建圖示。",
+ "size": "圖示尺寸"
+ },
+ "timezone": {
+ "title": "時區選擇",
+ "description": "依時區名、中文名稱或 UTC 位移搜尋,查看同一時刻的當地時間。",
+ "options": "value 是 IANA 時區;onChange 更新呼叫端的值。元件提供搜尋與鍵盤導覽。"
+ },
+ "textEditor": {
+ "title": "文字編輯",
+ "description": "開啟編輯視窗,修改、儲存或取消;清空後儲存可查看錯誤回饋。",
+ "options": "SettingsTextEditor 在 onSave 成功後關閉,失敗時顯示錯誤;SettingsHint 可透過懸停、焦點或點擊開啟。",
+ "state": "編輯狀態",
+ "hint": "開啟編輯器後可修改、儲存或取消。清空內容可查看錯誤狀態。",
+ "instructions": "範例說明",
+ "edit": "編輯範例說明",
+ "help": "儲存後,下方會顯示修改的內容。",
+ "required": "請輸入內容。"
+ },
+ "removePreset": {
+ "title": "刪除預設組態",
+ "description": "刪除未使用的模型預設組態,查看預設模型使用中項目的停用狀態。",
+ "options": "這是 ModelsSettings 使用的刪除按鈕;disabled 與刪除操作由呼叫端提供。服務商管理使用 ProvidersSettings 視窗。",
+ "defaultModel": "預設模型",
+ "codeAssistant": "程式碼助理",
+ "remove": "刪除 {{name}}",
+ "primaryHint": "無法刪除預設模型使用中的預設組態。",
+ "count": "預覽組態數量:{{count}}"
+ },
+ "loading": {
+ "title": "載入佔位",
+ "description": "切換應用程式、頻道與技能目錄的載入版面,查看共用狀態容器。",
+ "options": "CatalogSkeleton 的 layout 選擇版面。SkeletonStatus 用 label 提供螢幕閱讀器狀態,將裝飾內容標為 aria-hidden。",
+ "layout": "目錄版面",
+ "catalog": "正在載入預覽目錄"
+ },
+ "sidebar": {
+ "title": "設定導覽",
+ "description": "選擇分類、處理待重新啟動狀態,並縮窄瀏覽器查看行動版選單。",
+ "options": "activeSection 與 onSelectSection 控制選取狀態;返回、登出與重新啟動操作為呼叫端回呼。",
+ "back": "返回聊天",
+ "logout": "登出",
+ "restart": "已處理預覽重新啟動操作",
+ "hint": "選擇設定分類,或縮窄瀏覽器查看行動版導覽。",
+ "toggleRestart": "切換待重新啟動狀態"
+ },
+ "providerSearch": {
+ "title": "服務商搜尋",
+ "description": "搜尋依 OAuth、API 金鑰與本機分組的服務商,選取項目或自訂服務商。",
+ "options": "providers 是既有目錄。query 為受控搜尋值;onSelect 與 onCustom 將選擇交給父元件。",
+ "closed": "已關閉搜尋",
+ "custom": "已選取自訂服務商",
+ "hint": "搜尋服務商,或用方向鍵選擇。"
+ },
+ "requestParameters": {
+ "title": "請求參數",
+ "description": "編輯標頭、查詢參數與請求主體;輸入無效 JSON 查看實際驗證回饋。",
+ "options": "fields 選擇顯示項目,form 儲存 JSON 文字。標頭與查詢參數只接受字串值;請求主體接受任意 JSON 物件值。"
+ },
+ "requestAPI": {
+ "title": "請求協定",
+ "description": "選擇服務商支援的協定、預設協定、模型覆寫與備援選項。",
+ "options": "ProviderAPIControl 至少保留一個協定。ModelAPIControl 允許 null 表示自動選擇,並依服務商能力顯示可用協定。",
+ "providerAPI": "服務商協定",
+ "modelOverride": "模型覆寫"
+ },
+ "usage": {
+ "title": "用量統計",
+ "description": "切換有資料、空記錄與無法使用狀態;懸停長條查看每日用量,開啟詳情查看模型趨勢。",
+ "options": "usage 是呼叫端提供的統計記錄;timeZone 定義日期範圍。詳情視窗與圖表只顯示傳入資料。",
+ "state": "用量狀態"
+ },
+ "overview": {
+ "title": "設定概覽",
+ "description": "查看目前模型、能力狀態與用量,點選功能列體驗分類選擇。",
+ "options": "settings 提供概覽資料;onSelectSection 接收選取的設定分類。",
+ "selected": "已選分類:{{section}}"
+ },
+ "web": {
+ "title": "搜尋設定",
+ "description": "切換免憑證、API 金鑰與伺服器網址服務商,調整搜尋選項並體驗自動儲存。",
+ "options": "settings 儲存目前設定,form 儲存編輯值。儲存、憑證顯示與服務商切換由父元件提供。",
+ "unsaved": "預覽草稿尚未儲存"
+ },
+ "image": {
+ "title": "圖片設定",
+ "description": "開關圖片生成,選擇固定模型目錄、長寬比與尺寸,展開進階選項調整數量。",
+ "options": "form 為受控設定,dirty 標記修改。元件重用服務商憑證,儲存操作由父元件實作。"
+ },
+ "voice": {
+ "title": "轉錄設定",
+ "description": "切換轉錄,編輯模型、語言、時長與上傳大小限制,體驗自動儲存。",
+ "options": "settings 提供服務商資訊;form 與儲存回呼由父元件管理。"
+ },
+ "safety": {
+ "title": "存取設定",
+ "description": "切換本機服務存取與預設權限,查看設定列、提示及自動儲存回饋。",
+ "options": "form 是顯示值;onSave 處理儲存請求。執行時期的權限執行仍由 gateway 負責。"
+ },
+ "channelCatalog": {
+ "title": "頻道項目",
+ "description": "切換執行、啟動、失敗與未安裝狀態;操作開關、安裝入口與說明選單。",
+ "options": "feature 提供安裝與執行狀態。onAction 與 onSelect 由父元件處理;識別、錯誤和說明使用同一頻道資料。",
+ "exampleChannel": "範例頻道",
+ "state": "頻道狀態",
+ "error": "範例連線失敗。",
+ "stopped": "已停止",
+ "running": "執行中",
+ "starting": "啟動中",
+ "failed": "失敗",
+ "selected": "已選取頻道設定",
+ "hint": "點選開關或安裝按鈕,查看狀態變化。"
+ },
+ "credentials": {
+ "title": "頻道憑證",
+ "description": "輸入憑證、顯示或隱藏機密、套用連線預設組態、檢查必填欄位並複製輔助命令。",
+ "options": "fields 定義群組與控制項,values 和 visibleSecrets 為受控值。requirements 定義憑證組合;預設組態與儲存回呼只更新此範例。",
+ "botToken": "機器人權杖",
+ "tokenPlaceholder": "範例權杖",
+ "serverURL": "伺服器 URL",
+ "replyMode": "回覆模式",
+ "mentions": "提及訊息",
+ "allMessages": "所有訊息",
+ "allowFrom": "允許的傳送者",
+ "local": "本機伺服器",
+ "hosted": "託管伺服器",
+ "required": "請輸入機器人權杖。",
+ "checkSave": "檢查並儲存",
+ "command": "範例命令",
+ "applied": "已套用 {{name}}",
+ "incomplete": "請補齊憑證。",
+ "saved": "已儲存預覽憑證。",
+ "hint": "填寫憑證、切換機密顯示,或套用連線預設組態。"
+ },
+ "channelValidation": {
+ "title": "連線檢查",
+ "description": "切換檢查中、成功與失敗,觀察逐項顯示的結果與身分摘要。",
+ "options": "validation 提供檢查記錄,validating 控制載入狀態;元件只負責顯示。",
+ "expired": "範例權杖已過期。",
+ "result": "檢查結果"
+ },
+ "runAt": {
+ "title": "排程時間",
+ "description": "輸入日期時間,或開啟日曆並用滑鼠、方向鍵與翻頁鍵選擇日期。",
+ "options": "value 使用 YYYY-MM-DDTHH:mm 本機時間;onChange 傳回編輯值。無效輸入會顯示在現有表單控制項上。"
+ },
+ "automationCalendar": {
+ "title": "任務日曆",
+ "description": "切換月份、排程與歷史,點選成功或失敗記錄開啟結果;窄容器自動顯示議程。",
+ "options": "jobs 與 month 決定日曆內容。onInspect 處理排程任務;renderRunDialog 由呼叫端提供結果顯示,日曆不讀取服務。",
+ "providerError": "範例服務商無法使用。",
+ "state": "排程狀態",
+ "previousMonth": "上個月",
+ "nextMonth": "下個月",
+ "planned": "已排程",
+ "recorded": "執行記錄",
+ "running": "執行中",
+ "failed": "失敗",
+ "completed": "已完成",
+ "skipped": "已略過",
+ "system": "系統任務",
+ "noEntries": "本月沒有排程",
+ "more": "另外 {{count}} 筆",
+ "selected": "已選任務:{{name}}",
+ "hint": "點選執行記錄查看結果,或選擇排程中的任務。"
+ },
+ "providers": {
+ "title": "服務商管理",
+ "description": "查看實際服務商管理視窗與新增流程。",
+ "options": "重用設定中的 ProvidersSettings。目錄、表單與儲存回呼由呼叫端控制;此處修改本機範例資料,支援設定、搜尋、建立與取消。",
+ "invalidParameters": "請輸入有效的請求參數 JSON;標頭與查詢參數的值須為字串。",
+ "saved": "已儲存 {{name}} 的預覽設定",
+ "added": "已新增 {{name}}",
+ "signedIn": "預覽授權狀態已設為已登入",
+ "signedOut": "預覽授權狀態已設為未登入",
+ "builtInIcons": "使用內建圖示",
+ "brandIcons": "使用品牌圖示",
+ "configured": "已設定服務商數量:{{count}}",
+ "providerAdded": "已新增服務商"
+ },
+ "runResult": {
+ "title": "執行結果",
+ "description": "開啟結果,比較 Markdown 回覆、載入、重試、空回覆與歷史記錄缺失狀態。",
+ "options": "result 提供載入狀態與已取得的回覆。onRetry 由呼叫端處理;此檢視不讀取執行環境或請求結果。",
+ "state": "執行結果",
+ "view": "查看執行結果"
+ },
+ "chatBinding": {
+ "title": "執行聊天",
+ "description": "選擇執行聊天、修改說明、確認、切換回來或取消;比較任務忙碌、載入錯誤與衝突。",
+ "options": "data 與 job 提供可用聊天和綁定版本。檢視管理確認草稿;onSave、onSaved 與 onReload 由功能入口接入資料操作。",
+ "state": "聊天綁定狀態",
+ "setChat": "設定執行聊天",
+ "saved": "下次執行將在 {{title}} 中進行",
+ "hint": "選擇目標聊天,確認或修改任務說明。"
+ },
+ "about": {
+ "title": "關於與版本",
+ "description": "比較版本檢查狀態、提交連結、更新入口與關於頁面;按鈕以範例結果更新顯示。",
+ "options": "AboutSettingsView 接受版本與支援連結的組合。VersionCheckRowView 顯示 checking/result,並透過 onCheck 請求檢查。實際檢查與診斷連結資料由功能入口負責。",
+ "error": "無法取得版本資訊,請重試。",
+ "state": "版本狀態",
+ "selectedLink": "已選取 GitHub 連結"
+ },
+ "appearance": {
+ "title": "外觀選項",
+ "description": "切換外觀、活動顯示、檔案差異與通知偏好,下方顯示範例值。",
+ "options": "主題和偏好由呼叫端管理。onChangeBrowserNotifications 將權限請求交給功能入口;預覽回呼只改變範例開關。"
+ },
+ "starInvitation": {
+ "title": "支持邀請",
+ "description": "開啟實際邀請視窗,比較儲存與錯誤狀態,體驗稍後、GitHub 連結與不再提醒。",
+ "options": "open、saving 和 error 是顯示狀態。領取邀請與持久化偏好由既有 StarPrompt 入口負責;檢視只呼叫傳入操作。",
+ "state": "邀請狀態",
+ "view": "查看邀請",
+ "dismissed": "已在預覽中選取不再提醒",
+ "starred": "已在預覽中選取 GitHub 連結"
+ }
+}
diff --git a/webui/src/dev/gallery/locales/previews/en.json b/webui/src/dev/gallery/locales/previews/en.json
new file mode 100644
index 000000000..1d468b42a
--- /dev/null
+++ b/webui/src/dev/gallery/locales/previews/en.json
@@ -0,0 +1,444 @@
+{
+ "rename": {
+ "title": "RenameDialog · Rename groups and projects",
+ "description": "Try the rename dialog for groups and projects. Topics are renamed inline in the chat list.",
+ "options": "The caller supplies dialogTitle, description and placeholder. title sets the initial value; onConfirm receives the trimmed title. Empty titles cannot be saved.",
+ "hint": "Saving updates the title above."
+ },
+ "delete": {
+ "title": "DeleteConfirm · Delete confirmation",
+ "description": "Compare deletion of one chat, multiple chats, or a chat with automations.",
+ "options": "count controls bulk deletion copy. automations shows linked jobs, schedules and next runs. Confirm calls onConfirm.",
+ "scenario": "Deletion scenario",
+ "open": "Open delete confirmation",
+ "confirmed": "Example deletion confirmed.",
+ "hint": "Choose a single chat, multiple chats, or a chat with automations."
+ },
+ "inlineTokens": {
+ "title": "Inline tokens · Commands and session handles",
+ "description": "Edit commands and handles to see highlighting and stable session colors.",
+ "options": "SlashCommandText takes command; InlineTokenHighlight takes color and content. SessionHandleLabel derives its color from id.",
+ "command": "Command text",
+ "run": "Run <command/> to check the status.",
+ "handle": "Session handle",
+ "continue": "Continue working in <session/>.",
+ "highlight": "Shared highlight",
+ "review": "Use <skill/> to review changes.",
+ "skill": "Skill: {{name}}"
+ },
+ "sessionLinks": {
+ "selected": "Selected session: {{name}}.",
+ "hint": "Select a session mention to see feedback."
+ },
+ "userText": {
+ "title": "UserMessageText · Message mentions",
+ "description": "Edit a message with skill, app, MCP and session mentions.",
+ "options": "text is the original message. cliApps, mcpPresets and sessionMentions resolve mentions. Skills use $name; other mentions use @name.",
+ "message": "Message text"
+ },
+ "capabilityTokens": {
+ "title": "CapabilityMentionToken · App mentions",
+ "description": "Compare app, MCP and session mentions in the composer and messages.",
+ "options": "segment specifies cli, mcp or session and its metadata. variant selects composer or message. This example uses a local brand image.",
+ "position": "Mention location"
+ },
+ "productIcons": {
+ "title": "Product icons · Icon catalog",
+ "description": "Browse product icons, change their size and select a highlight.",
+ "options": "Icons accept LucideProps such as size, strokeWidth and className. Color inherits currentColor; buttons have accessible action names.",
+ "size": "Icon size",
+ "selected": "Selected: {{name}}"
+ },
+ "startup": {
+ "title": "StartupShell · Startup placeholder",
+ "description": "Preview the quiet placeholder while the app connects.",
+ "options": "embedded renders a section; otherwise the element is main. aria-busy and loading status remain available. Placeholder styles come from the app entry."
+ },
+ "fileActions": {
+ "title": "FileActions · File menu",
+ "description": "Right-click a file to copy its full path, relative path or reference text.",
+ "options": "path is the reference text. metadata supplies the full path and optional relative path. The Gallery supplies metadata without loading a file.",
+ "scope": "File scope",
+ "hint": "Right-click for the copy menu, or focus the file and press Shift+F10."
+ },
+ "webLinks": {
+ "title": "Web links · Link menu",
+ "description": "Open the real link menu to select message links and copy addresses.",
+ "options": "WebLink accepts link attributes. useMessageWebLinks collects rendered message links. MessageLinksMenu takes entries and back/close callbacks; expanded controls width. All example links point to local Gallery resources.",
+ "width": "Link menu width",
+ "message": "View the <gallery>component Gallery</gallery> and <brand>brand image</brand>.",
+ "close": "Close link menu",
+ "open": "View message links",
+ "hint": "Right-click a link to copy its address. The message menu collects links from the rendered message."
+ },
+ "workbench": {
+ "title": "PaneWorkbench · Multiple panes",
+ "description": "Switch layouts, activate or add panes, and adjust their position and size.",
+ "options": "The caller controls panes, activePaneKey, layout and splitRatios. renderPane supplies content; callbacks update local preview state. Narrow screens show the active pane.",
+ "layout": "Pane layout",
+ "limit": "Up to four panes",
+ "notes": "{{title}} notes",
+ "active": "Active pane",
+ "activate": "Select this pane to activate it",
+ "hint": "Active: {{title}}. Drag the bottom handle to move a pane; drag its edges to resize."
+ },
+ "hostConnection": {
+ "title": "HostConnectionStatus · Connection status",
+ "description": "Compare connected, disconnected, connecting and error states.",
+ "options": "state controls the icon and text. compact hides visible text but keeps the accessible status and tooltip.",
+ "state": "Connection state",
+ "withText": "Status with text",
+ "compact": "Compact display"
+ },
+ "compatibility": {
+ "title": "HostCompatibilityDialog · Version compatibility",
+ "description": "Inspect versions, preparation notes and the upgrade guide for each compatibility result.",
+ "options": "A profile opens the dialog; compatibility supplies the result and versions. onClose closes it. This component only displays information.",
+ "state": "Version compatibility",
+ "open": "View compatibility details"
+ },
+ "composer": {
+ "title": "ThreadComposer · Message input",
+ "description": "Try sending messages, attachments, commands and quotes in busy and disabled states.",
+ "options": "A successful onSend clears the input. isStreaming controls stopping and queuing; variant selects thread or welcome-page styling. Submissions stay in this preview.",
+ "statusCommand": "Session status",
+ "statusDescription": "View the current session status",
+ "compactCommand": "Compact context",
+ "compactDescription": "Compact the current session context",
+ "helpCommand": "Command help",
+ "helpDescription": "View available commands",
+ "state": "Input state",
+ "addQuote": "Add quote",
+ "input": "Example message",
+ "placeholder": "Type a message, or / for commands",
+ "stopped": "Example task stopped.",
+ "sent": "Submitted: {{content}}{{attachments}}",
+ "attachments": " · Attachments: {{amount}}",
+ "hint": "Try sending a message, selecting attachments, switching models and opening commands."
+ },
+ "modelPreset": {
+ "title": "ModelPresetBadge · Model presets",
+ "description": "Try the model menu, keyboard navigation and setup state.",
+ "options": "modelPresets supplies presets; modelPreset and onPresetChange control selection. needsSetup shows the setup entry.",
+ "state": "Model control state",
+ "manage": "Opened model management.",
+ "settings": "Opened model settings.",
+ "hint": "Current preset: {{preset}}. Open the menu or use arrow keys to switch."
+ },
+ "usage": {
+ "title": "ComposerUsagePopover · Context usage",
+ "description": "View context, cache and generation time with warning states and a bottom sheet.",
+ "options": "context supplies capacity; rounds supplies per-round statistics. bottomSheet selects the mobile panel.",
+ "state": "Usage state",
+ "hint": "Open usage details for context, cache and generation time per round."
+ },
+ "workspace": {
+ "title": "WorkspaceControls · Working directory",
+ "description": "Choose an example project and change this preview’s access mode.",
+ "options": "scope and onChange control selection; onLoadProjects supplies example directories. The gateway resolves real paths and enforces permissions.",
+ "state": "Working directory state"
+ },
+ "navigator": {
+ "title": "PromptNavigator · Message navigation",
+ "description": "Search earlier questions and inspect the jump callback.",
+ "options": "messages supplies the full conversation; the component extracts user questions. onJumpToPrompt receives the target message ID.",
+ "hint": "Open message navigation, then search and select a question.",
+ "empty": "No question selected yet"
+ },
+ "header": {
+ "title": "ThreadHeader · Chat header",
+ "description": "Try the sidebar, theme, temporary chat and message navigation controls.",
+ "options": "title, handle, theme and temporaryChatEnabled supply display state. Callbacks pass actions to the caller.",
+ "jump": "Jumped to {{id}}",
+ "sidebar": "Toggled sidebar",
+ "hint": "Try the header actions",
+ "temporary": "Temporary chat",
+ "regular": "Regular chat"
+ },
+ "messages": {
+ "title": "ThreadMessages · Message list",
+ "description": "Explore a multi-turn conversation, message menus, branches and selected-text quotes.",
+ "options": "messages contains projected messages. onForkFromMessage receives a user-question index; onQuoteSelection receives selected answer text.",
+ "quoted": "Quoted: {{text}}",
+ "forked": "Created a branch from question {{index}}",
+ "hint": "Open a message menu, or select answer text and choose Quote."
+ },
+ "viewport": {
+ "title": "ThreadViewport · Chat scrolling",
+ "description": "Scroll a long conversation with question markers, navigation and return to bottom.",
+ "options": "The preview has a fixed height. messages drives history; ref.jumpToUserPrompt locates a question. emptyState supplies empty-chat content.",
+ "state": "Chat view",
+ "empty": "Type a message to start a chat",
+ "hint": "Scroll to explore question markers, or use navigation and return to the bottom."
+ },
+ "history": {
+ "title": "ThreadHistoryStatus · History status",
+ "description": "Show loading, the beginning of history, and errors with retry.",
+ "options": "loading indicates a request, exhausted means there are no earlier messages, error supplies error details, and onRetry retries loading.",
+ "state": "History state",
+ "error": "Example history is unavailable.",
+ "retries": "Retries: {{amount}}"
+ },
+ "recovery": {
+ "title": "RecoveryNotice · Task recovery",
+ "description": "Compare interrupted, resuming, failed and unavailable states; try Continue and Dismiss.",
+ "options": "state supplies a recovery snapshot. onContinue and onDismiss return Promises. These callbacks only update the preview.",
+ "state": "Recovery state",
+ "continued": "Continued the example task.",
+ "dismissed": "Recovery notice dismissed.",
+ "reset": "Reset preview",
+ "hint": "Select a recovery state, then try continuing or dismissing."
+ },
+ "fallback": {
+ "title": "ModelFallbackNotice · Model fallback",
+ "description": "View fallback-model and expired-authorization notices, settings and dismissal.",
+ "options": "model identifies the fallback model; reauthProviderLabel names the expired authorization. The caller supplies onOpenSettings and onDismiss.",
+ "state": "Model fallback state",
+ "showAgain": "Show again",
+ "hint": "Try the model settings link and dismiss button."
+ },
+ "compaction": {
+ "title": "ContextCompactionNotice · Context compaction",
+ "description": "Compare compaction started, succeeded, failed and cancelled states.",
+ "options": "compaction.phase selects the notice; announce controls screen-reader announcements.",
+ "phase": "Context compaction phase"
+ },
+ "streamError": {
+ "title": "StreamErrorNotice · Message errors",
+ "description": "Compare message size, directory permission, turn rejection and model request errors.",
+ "options": "error.kind selects the error message; onDismiss closes the notice.",
+ "kind": "Message error type"
+ },
+ "cluster": {
+ "title": "AgentActivityCluster · Full activity",
+ "description": "View reasoning and tool records in running, completed and failed states.",
+ "options": "messages contains reasoning and trace projections. isTurnStreaming controls activity; expanded can be caller-controlled.",
+ "state": "Activity state",
+ "error": "The file could not be read."
+ },
+ "search": {
+ "title": "WebSearchRun · Search activity",
+ "description": "View search progress and sources for web and X searches.",
+ "options": "run supplies query, target, status and sources; turnActive controls the running effect. Shared components load source-site icons.",
+ "state": "Search state",
+ "source": "Search source"
+ },
+ "responseSources": {
+ "title": "FallbackResponseSources · Response sources",
+ "description": "View the fallback presets, models and providers used by earlier replies.",
+ "options": "sources preserves the model snapshot at response time. Only sources with fallback set to true show a badge.",
+ "hint": "Select a fallback badge to see the preset, model and provider used for that response."
+ },
+ "filePreview": {
+ "title": "FilePreviewPanelView · File content",
+ "description": "Compare text, images, truncation, loading and errors. Select an image to zoom.",
+ "options": "state supplies a display snapshot; path determines the file type and name. Image open and error callbacks update the preview.",
+ "state": "File preview state"
+ },
+ "webPreview": {
+ "title": "WebPreviewPanelView · Web content",
+ "description": "Explore the web title bar, isolation notes and restrictions; refresh a local document.",
+ "options": "The runtime chooses restriction before supplying content. children provides content; onRefresh requests a refresh. This iframe uses local srcDoc.",
+ "state": "Web preview state",
+ "frame": "Local example webpage",
+ "refreshes": "Refreshes: {{amount}}"
+ },
+ "session": {
+ "title": "SessionInfoPopoverView · Session automations",
+ "description": "View, edit, disable and delete jobs, with loading and error states.",
+ "options": "The caller supplies jobs, loading, loadFailed and now. onAction and onEdit return updated jobs; the view coordinates dialogs, focus and feedback.",
+ "state": "Session automation state",
+ "saveError": "Example save failed. Try again.",
+ "providerError": "The example provider is unavailable.",
+ "saved": "Automation saved.",
+ "openedChat": "Opened the example chat.",
+ "openedCalendar": "Opened the automation calendar.",
+ "actionError": "Example action failed. Try again.",
+ "delete": "Deleted: {{name}}",
+ "run": "Run requested: {{name}}",
+ "enable": "Enabled: {{name}}",
+ "disable": "Disabled: {{name}}",
+ "hint": "Open session details to view, toggle, edit and delete automations."
+ },
+ "subagent": {
+ "title": "SubagentThreadView · Subagent messages",
+ "description": "View subagent messages, reasoning, loading and failure; try the retry callback.",
+ "options": "The runtime projects messages. loading and error use the shared history status; isStreaming and activeTurnId identify activity. The view does not fetch history.",
+ "state": "Subagent chat state"
+ },
+ "pairRoute": {
+ "title": "PairRouteSettingsView · Pairing route",
+ "description": "Select and locally save routes, with saved, saving, error and refresh-failure states.",
+ "options": "The caller manages route and original; routes supplies SSH routes. Save success and directory refresh failure are shown separately. Gallery and settings share this view.",
+ "state": "Route state"
+ },
+ "quickPair": {
+ "title": "QuickPairSetupView · Quick pairing",
+ "description": "Try invitation copying, receipt entry, access confirmation, existing hosts and retries.",
+ "options": "state supplies pairing and display state; callbacks perform actions. routeSettings composes route settings. Gallery uses fixtures and local callbacks; QuickPairSetup manages real pairing.",
+ "state": "Pairing stage",
+ "open": "Open quick pairing",
+ "connected": "Selected connection: {{name}}.",
+ "ssh": "Selected SSH connection.",
+ "hint": "Example invitations and receipts are for display only. Confirmation updates local feedback."
+ },
+ "sshHost": {
+ "title": "SSHHostPickerView · SSH address",
+ "description": "Filter SSH aliases, select with arrow keys, and compare import, loading and error states.",
+ "options": "discovery supplies hosts from the current config. The caller controls value, busy, error and callbacks. customConfig retains custom-config alias discovery; inputRef restores focus after selection.",
+ "state": "SSH address state",
+ "refreshed": "Example addresses refreshed.",
+ "entered": "Entered: {{value}}",
+ "hint": "Type to filter addresses; use arrow keys to select an SSH alias."
+ },
+ "connectionBadge": {
+ "title": "ConnectionBadge · Connection indicator",
+ "description": "Compare connection colors, animations and accessible status text.",
+ "options": "The caller supplies status. The page container owns the connection subscription.",
+ "state": "Connection state",
+ "idle": "Idle",
+ "connecting": "Connecting",
+ "open": "Connected",
+ "reconnecting": "Reconnecting",
+ "closed": "Disconnected",
+ "error": "Connection error"
+ },
+ "hostPicker": {
+ "title": "HostSwitcherView · Host menu",
+ "description": "Choose local or example hosts; compare pending, offline and collapsed states.",
+ "options": "picker supplies host data and callbacks; status is the current connection state. Production HostSwitcher subscribes to the client.",
+ "state": "Host menu state",
+ "offline": "The example host is disconnected.",
+ "manage": "Opened connection management.",
+ "cancelled": "Example host switch cancelled.",
+ "selected": "Preview host: {{name}}"
+ },
+ "chats": {
+ "title": "ChatList · Chat list",
+ "description": "Select chats and try pinning, archiving and deleting from their menus.",
+ "options": "The caller supplies sessions, activeKey and pinned/archived keys. Action callbacks update the example list.",
+ "state": "Chat list state",
+ "renamed": "Renamed: {{name}}",
+ "selected": "Selected chat: {{name}}",
+ "none": "None"
+ },
+ "sidebarResize": {
+ "title": "SidebarResizeHandle · Sidebar size",
+ "description": "Resize, collapse and expand the sidebar with the mouse or keyboard.",
+ "options": "width and open are controlled. onResize updates size and expansion; onDraggingChange reports dragging.",
+ "content": "Sidebar content",
+ "hint": "Drag the divider, or focus it and use arrow keys, Home, End and Enter.",
+ "collapsed": "Collapsed",
+ "dragging": "Dragging"
+ },
+ "language": {
+ "title": "LanguageSwitcher · Interface language",
+ "description": "Switch the language of the Gallery and production components.",
+ "options": "Uses the app’s i18n and browser language preference, without a gateway. The top language selector is the same component."
+ },
+ "channelMarks": {
+ "title": "Channel marks · Channel identity",
+ "description": "View avatar fallback text, workspace icons and the WebSocket mark.",
+ "options": "LinearAvatar takes name, url and workspace. Without a valid image, it shows fallback text or an icon.",
+ "name": "Avatar name",
+ "member": "Member avatar",
+ "workspace": "Workspace icon"
+ },
+ "secret": {
+ "title": "LinearSecretField · Secret editing",
+ "description": "Edit, reveal, save and replace a secret; check draft retention after a failed save.",
+ "options": "configured indicates saved state; onSave persists the secret. Gallery callbacks only update local state.",
+ "state": "Secret state",
+ "error": "Example save failed.",
+ "hint": "Enter example text and save, or select the error state to check draft retention."
+ },
+ "channelHelp": {
+ "title": "LinearHelpContent · Channel help",
+ "description": "View channel help inside the real dropdown menu.",
+ "options": "Content uses existing channel translations; the caller supplies the menu container.",
+ "open": "Open channel help"
+ },
+ "channel": {
+ "title": "{{channel}} · Channel setup",
+ "description": "Explore the real channel setup form and states.",
+ "options": "Uses channel registrations, Python setup-contract snapshots and production ChannelSetupSurfaceView. Inputs, credential visibility, presets, checks and toggles affect only this preview.",
+ "state": "Channel setup state",
+ "credentialsError": "Example credentials were rejected. Update the preview values and try again.",
+ "validation": "Preview configuration"
+ },
+ "channelConnect": {
+ "state": "{{channel}} connection state",
+ "error": "Authorization is temporarily unavailable. Try again."
+ },
+ "feishuConnect": {
+ "title": "FeishuConnectFlowView · Feishu QR authorization",
+ "description": "Try the real Feishu QR flow with waiting, success, expiry, cancellation and errors.",
+ "options": "connect, busy and error supply display state; QR codes are generated locally. The feature owns start, cancel and polling; preview callbacks change only this example."
+ },
+ "feishuAssistants": {
+ "title": "FeishuAssistantsPanelView · Feishu assistants",
+ "description": "Explore assistant cards, runtime and authorization states, toggles, advanced settings and adding an assistant.",
+ "options": "feature and instances supply assistant snapshots. The view owns drafts and save feedback; onToggleInstance, onSaveInstance and renderConnectFlow connect runtime actions.",
+ "state": "Assistant runtime state",
+ "error": "The assistant stopped. Check its credentials before restarting.",
+ "on": "{{name}}: on",
+ "off": "{{name}}: off",
+ "saved": "{{name}}: preview fields saved: {{amount}}"
+ },
+ "whatsappConnect": {
+ "title": "WhatsAppConnectFlowView · WhatsApp device linking",
+ "description": "Compare automatic linking, success, expiry and errors in the minimal QR layout; try linking another account.",
+ "options": "The view preserves automatic-start and minimal-layout display rules. The caller controls state and retries. The real connection entry owns automatic start, forced retries and polling."
+ },
+ "linearPanel": {
+ "title": "LinearPanelView · Linear setup",
+ "description": "Explore app details, secrets, advanced settings, workspaces, member access and browser authorization.",
+ "options": "state and workspaces supply snapshots; callbacks connect workspace, save and MCP actions. Three slots compose production member, authorization and reset views.",
+ "state": "Linear setup state",
+ "runtimeError": "The Linear webhook could not be started.",
+ "saveError": "Settings could not be saved. Your draft was kept.",
+ "inspectionError": "Connected workspaces could not be inspected.",
+ "refreshed": "Example workspaces refreshed.",
+ "removed": "Removed example workspace: {{name}}",
+ "mcp": "Selected Linear MCP setup."
+ },
+ "linearMembers": {
+ "title": "LinearMemberAccessView · Member access",
+ "description": "Search members, change access and compare loading, empty, saving and unconfirmed states.",
+ "options": "snapshot contains confirmed member state. onLoad and onSetAllowed belong to the channel entry; the gateway still validates permissions.",
+ "state": "Member state",
+ "loadError": "The member directory is unavailable.",
+ "saveError": "Access was not confirmed."
+ },
+ "linearConnect": {
+ "title": "LinearConnectFlowView · Linear authorization",
+ "description": "Try browser authorization and waiting notices with start, cancel, success and failure stages.",
+ "options": "Reuses ChannelQrConnectFlowView. Linear supplies browser authorization display, labels and focus handling; the runtime entry owns session creation and polling.",
+ "state": "Authorization stage",
+ "error": "Authorization could not be completed.",
+ "hint": "The authorization link and workspace are examples. Start and Cancel only change the preview stage."
+ },
+ "linearReset": {
+ "title": "LinearResetConnectionView · Reset connection",
+ "description": "Review what is cleared or kept, busy state and retries after a partial reset.",
+ "options": "onReset performs the full revocation and cleanup transaction. The view manages confirmation, errors, closing restrictions and focus restoration.",
+ "state": "Reset result",
+ "error": "The channel could not be stopped. App settings were kept.",
+ "completed": "Preview workspace and app settings cleared."
+ },
+ "weixinPanel": {
+ "title": "WeixinPanelView · Weixin settings",
+ "description": "Explore Weixin settings, advanced options, save feedback and expired-login recovery.",
+ "options": "Fields come from the channel setup contract. The view owns expansion and secret visibility; the runtime entry owns autosave, draft merging and login recovery.",
+ "state": "Weixin panel state"
+ },
+ "weixinConnect": {
+ "title": "WeixinConnectFlowView · Weixin QR and verification",
+ "description": "Compare QR scanning, verification codes, success, expiry, cancellation and connection errors.",
+ "options": "The view takes connection snapshots and callbacks, retaining the verification draft. QR codes are generated in the browser. The real entry owns authorization, polling pauses, refresh and cancellation.",
+ "state": "Weixin connection state",
+ "error": "Connection interrupted. Try again.",
+ "refreshed": "A new preview QR code is displayed.",
+ "hint": "Enter 123456 to complete the verification preview. Other input keeps your draft and shows an error."
+ }
+}
diff --git a/webui/src/dev/gallery/locales/previews/es.json b/webui/src/dev/gallery/locales/previews/es.json
new file mode 100644
index 000000000..d92a1a35c
--- /dev/null
+++ b/webui/src/dev/gallery/locales/previews/es.json
@@ -0,0 +1,444 @@
+{
+ "rename": {
+ "title": "RenameDialog · Renombrar grupos y proyectos",
+ "description": "Prueba el cambio de nombre de grupos y proyectos. Los temas se renombran en la lista de chats.",
+ "options": "El componente padre aporta dialogTitle, description y placeholder. title fija el valor inicial; onConfirm recibe el título sin espacios en los extremos. No se pueden guardar títulos vacíos.",
+ "hint": "Al guardar se actualiza el título de arriba."
+ },
+ "delete": {
+ "title": "DeleteConfirm · Confirmación de eliminación",
+ "description": "Compara la eliminación de un chat, varios chats o un chat con automatizaciones.",
+ "options": "count controla el texto de eliminación múltiple. automations muestra tareas vinculadas, horarios y próximas ejecuciones. Confirmar llama a onConfirm.",
+ "scenario": "Escenario de eliminación",
+ "open": "Abrir confirmación de eliminación",
+ "confirmed": "Eliminación de ejemplo confirmada.",
+ "hint": "Elige un chat, varios chats o un chat con automatizaciones."
+ },
+ "inlineTokens": {
+ "title": "Inline tokens · Comandos e identificadores de sesión",
+ "description": "Edita comandos e identificadores para ver el resaltado y los colores estables de sesión.",
+ "options": "SlashCommandText recibe command; InlineTokenHighlight recibe color y contenido. SessionHandleLabel obtiene su color a partir de id.",
+ "command": "Texto del comando",
+ "run": "Ejecuta <command/> para consultar el estado.",
+ "handle": "Identificador de sesión",
+ "continue": "Continúa trabajando en <session/>.",
+ "highlight": "Resaltado compartido",
+ "review": "Usa <skill/> para revisar los cambios.",
+ "skill": "Habilidad: {{name}}"
+ },
+ "sessionLinks": {
+ "selected": "Sesión seleccionada: {{name}}.",
+ "hint": "Selecciona una mención de sesión para ver el resultado."
+ },
+ "userText": {
+ "title": "UserMessageText · Menciones en mensajes",
+ "description": "Edita un mensaje con menciones de habilidades, aplicaciones, MCP y sesiones.",
+ "options": "text es el mensaje original. cliApps, mcpPresets y sessionMentions resuelven las menciones. Las habilidades usan $name; las demás menciones, @name.",
+ "message": "Texto del mensaje"
+ },
+ "capabilityTokens": {
+ "title": "CapabilityMentionToken · Menciones de aplicaciones",
+ "description": "Compara las menciones de aplicaciones, MCP y sesiones en el editor y los mensajes.",
+ "options": "segment especifica cli, mcp o session y sus metadatos. variant elige composer o message. El ejemplo usa una imagen de marca local.",
+ "position": "Ubicación de la mención"
+ },
+ "productIcons": {
+ "title": "Product icons · Catálogo de iconos",
+ "description": "Explora los iconos, cambia su tamaño y selecciona uno para resaltarlo.",
+ "options": "Los iconos aceptan LucideProps como size, strokeWidth y className. El color hereda currentColor; los botones tienen nombres de acción accesibles.",
+ "size": "Tamaño del icono",
+ "selected": "Seleccionado: {{name}}"
+ },
+ "startup": {
+ "title": "StartupShell · Pantalla de inicio",
+ "description": "Previsualiza la pantalla discreta que aparece mientras se conecta la aplicación.",
+ "options": "embedded renderiza section; en caso contrario, main. aria-busy y el estado de carga permanecen disponibles. Los estilos se cargan desde la entrada de la aplicación."
+ },
+ "fileActions": {
+ "title": "FileActions · Menú de archivo",
+ "description": "Haz clic derecho para copiar la ruta completa, relativa o el texto de referencia de un archivo.",
+ "options": "path es el texto de referencia. metadata aporta la ruta completa y la relativa opcional. La galería proporciona los metadatos sin cargar el archivo.",
+ "scope": "Ámbito del archivo",
+ "hint": "Haz clic derecho para abrir el menú de copia, o enfoca el archivo y pulsa Mayús+F10."
+ },
+ "webLinks": {
+ "title": "Web links · Menú de enlaces",
+ "description": "Abre el menú real de enlaces para elegir enlaces del mensaje y copiar direcciones.",
+ "options": "WebLink recibe atributos de enlace. useMessageWebLinks recoge los enlaces renderizados. MessageLinksMenu recibe entradas y funciones de volver y cerrar; expanded controla el ancho. Todos los enlaces apuntan a recursos locales de la galería.",
+ "width": "Ancho del menú de enlaces",
+ "message": "Consulta la <gallery>galería de componentes</gallery> y la <brand>imagen de marca</brand>.",
+ "close": "Cerrar menú de enlaces",
+ "open": "Ver enlaces del mensaje",
+ "hint": "Haz clic derecho en un enlace para copiar su dirección. El menú recoge los enlaces del mensaje renderizado."
+ },
+ "workbench": {
+ "title": "PaneWorkbench · Paneles múltiples",
+ "description": "Cambia la disposición, activa o añade paneles y ajusta su posición y tamaño.",
+ "options": "El componente padre controla panes, activePaneKey, layout y splitRatios. renderPane aporta el contenido y las funciones actualizan el estado local. En pantallas estrechas se muestra el panel activo.",
+ "layout": "Disposición de paneles",
+ "limit": "Hasta cuatro paneles",
+ "notes": "Notas de {{title}}",
+ "active": "Panel activo",
+ "activate": "Selecciona este panel para activarlo",
+ "hint": "Activo: {{title}}. Arrastra el tirador inferior para mover un panel y sus bordes para cambiar su tamaño."
+ },
+ "hostConnection": {
+ "title": "HostConnectionStatus · Estado de conexión",
+ "description": "Compara los estados conectado, desconectado, conectando y error.",
+ "options": "state controla el icono y el texto. compact oculta el texto visible, pero conserva el estado accesible y la descripción emergente.",
+ "state": "Estado de conexión",
+ "withText": "Estado con texto",
+ "compact": "Vista compacta"
+ },
+ "compatibility": {
+ "title": "HostCompatibilityDialog · Compatibilidad de versiones",
+ "description": "Consulta versiones, preparación y guía de actualización para cada resultado de compatibilidad.",
+ "options": "Un profile abre el diálogo; compatibility aporta el resultado y las versiones. onClose lo cierra. Este componente solo muestra información.",
+ "state": "Compatibilidad de versiones",
+ "open": "Ver detalles de compatibilidad"
+ },
+ "composer": {
+ "title": "ThreadComposer · Entrada de mensajes",
+ "description": "Prueba mensajes, adjuntos, comandos y citas en los estados ocupado y desactivado.",
+ "options": "Un onSend correcto vacía la entrada. isStreaming controla la detención y la cola; variant elige el estilo de chat o bienvenida. Los envíos se conservan en esta vista previa.",
+ "statusCommand": "Estado de la sesión",
+ "statusDescription": "Ver el estado de la sesión actual",
+ "compactCommand": "Compactar contexto",
+ "compactDescription": "Compactar el contexto de la sesión actual",
+ "helpCommand": "Ayuda de comandos",
+ "helpDescription": "Ver los comandos disponibles",
+ "state": "Estado de entrada",
+ "addQuote": "Añadir cita",
+ "input": "Mensaje de ejemplo",
+ "placeholder": "Escribe un mensaje o / para ver comandos",
+ "stopped": "Tarea de ejemplo detenida.",
+ "sent": "Contenido enviado: {{content}}{{attachments}}",
+ "attachments": " · Adjuntos: {{amount}}",
+ "hint": "Prueba el envío, la selección de adjuntos, el cambio de modelo y el menú de comandos."
+ },
+ "modelPreset": {
+ "title": "ModelPresetBadge · Preajustes de modelo",
+ "description": "Prueba el menú de modelos, el teclado y el estado pendiente de configuración.",
+ "options": "modelPresets aporta los preajustes; modelPreset y onPresetChange controlan la selección. needsSetup muestra el acceso a la configuración.",
+ "state": "Estado del control de modelo",
+ "manage": "Gestión de modelos abierta.",
+ "settings": "Configuración de modelos abierta.",
+ "hint": "Preajuste actual: {{preset}}. Abre el menú o usa las flechas para cambiar."
+ },
+ "usage": {
+ "title": "ComposerUsagePopover · Uso del contexto",
+ "description": "Consulta contexto, caché y tiempo de generación, con avisos y panel inferior.",
+ "options": "context aporta la capacidad y rounds las estadísticas por turno. bottomSheet elige el panel móvil.",
+ "state": "Estado de uso",
+ "hint": "Abre los detalles para ver el contexto, la caché y el tiempo de generación por turno."
+ },
+ "workspace": {
+ "title": "WorkspaceControls · Directorio de trabajo",
+ "description": "Elige un proyecto de ejemplo y cambia el modo de acceso de esta vista previa.",
+ "options": "scope y onChange controlan la selección; onLoadProjects aporta directorios de ejemplo. La pasarela resuelve las rutas reales y aplica los permisos.",
+ "state": "Estado del directorio de trabajo"
+ },
+ "navigator": {
+ "title": "PromptNavigator · Navegación de preguntas",
+ "description": "Busca preguntas anteriores y observa la función de salto.",
+ "options": "messages aporta toda la conversación; el componente extrae las preguntas del usuario. onJumpToPrompt recibe el ID del mensaje de destino.",
+ "hint": "Abre la navegación, busca una pregunta y selecciónala.",
+ "empty": "Aún no hay ninguna pregunta seleccionada"
+ },
+ "header": {
+ "title": "ThreadHeader · Cabecera del chat",
+ "description": "Prueba la barra lateral, el tema, el chat temporal y la navegación de preguntas.",
+ "options": "title, handle, theme y temporaryChatEnabled aportan el estado visual. Las funciones de retorno envían las acciones al componente padre.",
+ "jump": "Salto a {{id}}",
+ "sidebar": "Barra lateral alternada",
+ "hint": "Prueba las acciones de la cabecera",
+ "temporary": "Chat temporal",
+ "regular": "Chat normal"
+ },
+ "messages": {
+ "title": "ThreadMessages · Lista de mensajes",
+ "description": "Explora una conversación con varios turnos, menús, ramas y citas del texto seleccionado.",
+ "options": "messages contiene los mensajes proyectados. onForkFromMessage recibe el índice de una pregunta; onQuoteSelection recibe el texto seleccionado de una respuesta.",
+ "quoted": "Cita: {{text}}",
+ "forked": "Rama creada desde la pregunta {{index}}",
+ "hint": "Abre el menú de un mensaje, o selecciona texto de una respuesta y elige Citar."
+ },
+ "viewport": {
+ "title": "ThreadViewport · Desplazamiento del chat",
+ "description": "Recorre una conversación larga con marcadores, navegación y regreso al final.",
+ "options": "La altura de la vista previa es fija. messages aporta el historial; ref.jumpToUserPrompt localiza una pregunta. emptyState aporta el contenido de un chat vacío.",
+ "state": "Vista del chat",
+ "empty": "Escribe un mensaje para iniciar un chat",
+ "hint": "Desplázate para ver los marcadores, o usa la navegación y vuelve al final."
+ },
+ "history": {
+ "title": "ThreadHistoryStatus · Estado del historial",
+ "description": "Muestra la carga, el inicio del historial y los errores con reintento.",
+ "options": "loading indica una solicitud, exhausted que no hay mensajes anteriores, error aporta los detalles del error y onRetry reintenta la carga.",
+ "state": "Estado del historial",
+ "error": "El historial de ejemplo no está disponible.",
+ "retries": "Reintentos: {{amount}}"
+ },
+ "recovery": {
+ "title": "RecoveryNotice · Recuperación de tareas",
+ "description": "Compara interrupción, reanudación, error e imposibilidad de continuar; prueba continuar y cerrar.",
+ "options": "state aporta una instantánea de recuperación. onContinue y onDismiss devuelven Promises. Estas funciones solo actualizan la vista previa.",
+ "state": "Estado de recuperación",
+ "continued": "Tarea de ejemplo reanudada.",
+ "dismissed": "Aviso de recuperación cerrado.",
+ "reset": "Restablecer vista previa",
+ "hint": "Elige un estado de recuperación y prueba a continuar o cerrar."
+ },
+ "fallback": {
+ "title": "ModelFallbackNotice · Modelo alternativo",
+ "description": "Consulta avisos de modelo alternativo y autorización caducada, configuración y cierre.",
+ "options": "model identifica el modelo alternativo; reauthProviderLabel nombra la autorización caducada. El componente padre aporta onOpenSettings y onDismiss.",
+ "state": "Estado del modelo alternativo",
+ "showAgain": "Mostrar de nuevo",
+ "hint": "Prueba el enlace a la configuración de modelos y el botón de cierre."
+ },
+ "compaction": {
+ "title": "ContextCompactionNotice · Compactación del contexto",
+ "description": "Compara los estados de inicio, éxito, error y cancelación de la compactación.",
+ "options": "compaction.phase selecciona el aviso; announce controla los anuncios del lector de pantalla.",
+ "phase": "Fase de compactación del contexto"
+ },
+ "streamError": {
+ "title": "StreamErrorNotice · Errores de mensaje",
+ "description": "Compara errores de tamaño, permisos, rechazo de turno y petición al modelo.",
+ "options": "error.kind elige el mensaje de error; onDismiss cierra el aviso.",
+ "kind": "Tipo de error de mensaje"
+ },
+ "cluster": {
+ "title": "AgentActivityCluster · Actividad completa",
+ "description": "Consulta razonamiento y registros de herramientas en ejecución, completados o fallidos.",
+ "options": "messages contiene las proyecciones reasoning y trace. isTurnStreaming controla la actividad; expanded puede controlarse desde el componente padre.",
+ "state": "Estado de la actividad",
+ "error": "No se pudo leer el archivo."
+ },
+ "search": {
+ "title": "WebSearchRun · Actividad de búsqueda",
+ "description": "Consulta el progreso y las fuentes de búsquedas web y en X.",
+ "options": "run aporta query, target, status y sources; turnActive controla el efecto de ejecución. Los componentes compartidos cargan los iconos de las fuentes.",
+ "state": "Estado de la búsqueda",
+ "source": "Fuente de búsqueda"
+ },
+ "responseSources": {
+ "title": "FallbackResponseSources · Fuentes de respuesta",
+ "description": "Consulta los preajustes, modelos y proveedores alternativos de respuestas anteriores.",
+ "options": "sources conserva la instantánea del modelo al responder. Solo las fuentes con fallback en true muestran una insignia.",
+ "hint": "Selecciona una insignia de modelo alternativo para ver el preajuste, modelo y proveedor de esa respuesta."
+ },
+ "filePreview": {
+ "title": "FilePreviewPanelView · Contenido de archivos",
+ "description": "Compara texto, imágenes, truncamiento, carga y errores. Selecciona una imagen para ampliarla.",
+ "options": "state aporta la instantánea visual; path determina el tipo y nombre del archivo. Las funciones de apertura y error de imagen actualizan la vista previa.",
+ "state": "Estado de la vista previa del archivo"
+ },
+ "webPreview": {
+ "title": "WebPreviewPanelView · Contenido web",
+ "description": "Explora la barra de título, el aislamiento y las restricciones; actualiza un documento local.",
+ "options": "El entorno de ejecución elige restriction antes de aportar el contenido. children lo contiene y onRefresh solicita una actualización. Este iframe usa un srcDoc local.",
+ "state": "Estado de la vista previa web",
+ "frame": "Página web local de ejemplo",
+ "refreshes": "Actualizaciones: {{amount}}"
+ },
+ "session": {
+ "title": "SessionInfoPopoverView · Automatizaciones de sesión",
+ "description": "Consulta, edita, desactiva y elimina tareas con estados de carga y error.",
+ "options": "El componente padre aporta jobs, loading, loadFailed y now. onAction y onEdit devuelven las tareas actualizadas; la vista coordina diálogos, foco y resultados.",
+ "state": "Estado de las automatizaciones",
+ "saveError": "Falló el guardado de ejemplo. Inténtalo de nuevo.",
+ "providerError": "El proveedor de ejemplo no está disponible.",
+ "saved": "Automatización guardada.",
+ "openedChat": "Chat de ejemplo abierto.",
+ "openedCalendar": "Calendario de automatizaciones abierto.",
+ "actionError": "Falló la acción de ejemplo. Inténtalo de nuevo.",
+ "delete": "Eliminado: {{name}}",
+ "run": "Ejecución solicitada: {{name}}",
+ "enable": "Activado: {{name}}",
+ "disable": "Desactivado: {{name}}",
+ "hint": "Abre los detalles de la sesión para consultar, alternar, editar y eliminar automatizaciones."
+ },
+ "subagent": {
+ "title": "SubagentThreadView · Mensajes del subagente",
+ "description": "Consulta mensajes, razonamiento, carga y fallos del subagente; prueba el reintento.",
+ "options": "El entorno de ejecución proyecta messages. loading y error usan el estado compartido del historial; isStreaming y activeTurnId identifican la actividad. La vista no obtiene el historial.",
+ "state": "Estado del chat del subagente"
+ },
+ "pairRoute": {
+ "title": "PairRouteSettingsView · Ruta de emparejamiento",
+ "description": "Selecciona y guarda rutas localmente, con estados de guardado, error y fallo de actualización.",
+ "options": "El componente padre gestiona route y original; routes aporta rutas SSH. El guardado correcto y el fallo de actualización del directorio se muestran por separado. Galería y ajustes comparten esta vista.",
+ "state": "Estado de la ruta"
+ },
+ "quickPair": {
+ "title": "QuickPairSetupView · Emparejamiento rápido",
+ "description": "Prueba la copia de invitación, el recibo, la confirmación de acceso, hosts existentes y reintentos.",
+ "options": "state aporta el estado visual y del emparejamiento; las funciones ejecutan acciones. routeSettings integra los ajustes de ruta. La galería usa ejemplos y funciones locales; QuickPairSetup gestiona el emparejamiento real.",
+ "state": "Etapa de emparejamiento",
+ "open": "Abrir emparejamiento rápido",
+ "connected": "Conexión seleccionada: {{name}}.",
+ "ssh": "Conexión SSH seleccionada.",
+ "hint": "Las invitaciones y los recibos de ejemplo son solo visuales. La confirmación actualiza el resultado local."
+ },
+ "sshHost": {
+ "title": "SSHHostPickerView · Dirección SSH",
+ "description": "Filtra alias SSH, elige con las flechas y compara importación, carga y errores.",
+ "options": "discovery aporta los hosts de la configuración actual. El componente padre controla value, busy, error y las funciones. customConfig conserva el descubrimiento de alias personalizados; inputRef restaura el foco tras seleccionar.",
+ "state": "Estado de la dirección SSH",
+ "refreshed": "Direcciones de ejemplo actualizadas.",
+ "entered": "Entrada: {{value}}",
+ "hint": "Escribe para filtrar direcciones y usa las flechas para elegir un alias SSH."
+ },
+ "connectionBadge": {
+ "title": "ConnectionBadge · Indicador de conexión",
+ "description": "Compara colores, animaciones y textos de estado accesibles.",
+ "options": "El componente padre aporta status. El contenedor de la página gestiona la suscripción de conexión.",
+ "state": "Estado de conexión",
+ "idle": "Inactivo",
+ "connecting": "Conectando",
+ "open": "Conectado",
+ "reconnecting": "Reconectando",
+ "closed": "Desconectado",
+ "error": "Error de conexión"
+ },
+ "hostPicker": {
+ "title": "HostSwitcherView · Menú de hosts",
+ "description": "Elige hosts locales o de ejemplo y compara espera, desconexión y vista contraída.",
+ "options": "picker aporta datos y funciones de los hosts; status es el estado de conexión actual. HostSwitcher de producción se suscribe al cliente.",
+ "state": "Estado del menú de hosts",
+ "offline": "El host de ejemplo está desconectado.",
+ "manage": "Gestión de conexiones abierta.",
+ "cancelled": "Cambio de host de ejemplo cancelado.",
+ "selected": "Host de la vista previa: {{name}}"
+ },
+ "chats": {
+ "title": "ChatList · Lista de chats",
+ "description": "Selecciona chats y prueba a fijarlos, archivarlos o eliminarlos desde sus menús.",
+ "options": "El componente padre aporta sessions, activeKey y las claves fijadas o archivadas. Las funciones de acción actualizan la lista de ejemplo.",
+ "state": "Estado de la lista de chats",
+ "renamed": "Nuevo nombre: {{name}}",
+ "selected": "Chat seleccionado: {{name}}",
+ "none": "Ninguno"
+ },
+ "sidebarResize": {
+ "title": "SidebarResizeHandle · Tamaño de la barra lateral",
+ "description": "Ajusta, contrae y expande la barra lateral con el ratón o el teclado.",
+ "options": "width y open son estados controlados. onResize actualiza tamaño y expansión; onDraggingChange informa del arrastre.",
+ "content": "Contenido de la barra lateral",
+ "hint": "Arrastra el separador, o enfócalo y usa las flechas, Inicio, Fin y Entrar.",
+ "collapsed": "Contraída",
+ "dragging": "Arrastrando"
+ },
+ "language": {
+ "title": "LanguageSwitcher · Idioma de la interfaz",
+ "description": "Cambia el idioma de la galería y los componentes de producción.",
+ "options": "Usa el i18n de la aplicación y la preferencia del navegador, sin pasarela. El selector superior es el mismo componente."
+ },
+ "channelMarks": {
+ "title": "Channel marks · Identidad de canales",
+ "description": "Consulta el texto alternativo de avatares, iconos de espacio y la marca WebSocket.",
+ "options": "LinearAvatar recibe name, url y workspace. Sin una imagen válida, muestra texto alternativo o un icono.",
+ "name": "Nombre del avatar",
+ "member": "Avatar de miembro",
+ "workspace": "Icono del espacio de trabajo"
+ },
+ "secret": {
+ "title": "LinearSecretField · Edición de secretos",
+ "description": "Edita, muestra, guarda y sustituye un secreto; comprueba el borrador tras un fallo.",
+ "options": "configured indica el estado guardado y onSave persiste el secreto. Las funciones de la galería solo actualizan el estado local.",
+ "state": "Estado del secreto",
+ "error": "Falló el guardado de ejemplo.",
+ "hint": "Introduce un texto y guárdalo, o elige el estado de error para comprobar que se conserva el borrador."
+ },
+ "channelHelp": {
+ "title": "LinearHelpContent · Ayuda del canal",
+ "description": "Consulta la ayuda del canal dentro del menú desplegable real.",
+ "options": "El contenido usa las traducciones existentes del canal; el componente padre aporta el contenedor del menú.",
+ "open": "Abrir ayuda del canal"
+ },
+ "channel": {
+ "title": "{{channel}} · Configuración del canal",
+ "description": "Explora el formulario real de configuración del canal y sus estados.",
+ "options": "Usa registros de canal, instantáneas del contrato Python y ChannelSetupSurfaceView de producción. Entradas, credenciales visibles, preajustes, comprobaciones e interruptores solo afectan a esta vista previa.",
+ "state": "Estado de configuración del canal",
+ "credentialsError": "Se rechazaron las credenciales de ejemplo. Actualiza los valores de la vista previa y reintenta.",
+ "validation": "Configuración de vista previa"
+ },
+ "channelConnect": {
+ "state": "Estado de conexión de {{channel}}",
+ "error": "La autorización no está disponible temporalmente. Inténtalo de nuevo."
+ },
+ "feishuConnect": {
+ "title": "FeishuConnectFlowView · Autorización QR de Feishu",
+ "description": "Prueba el flujo QR real de Feishu con espera, éxito, caducidad, cancelación y errores.",
+ "options": "connect, busy y error aportan el estado visual; los QR se generan localmente. La función gestiona inicio, cancelación y sondeo; los ejemplos solo cambian esta vista previa."
+ },
+ "feishuAssistants": {
+ "title": "FeishuAssistantsPanelView · Asistentes de Feishu",
+ "description": "Explora tarjetas, ejecución y autorización, interruptores, ajustes avanzados y nuevos asistentes.",
+ "options": "feature e instances aportan instantáneas. La vista gestiona borradores y resultados de guardado; onToggleInstance, onSaveInstance y renderConnectFlow conectan acciones de ejecución.",
+ "state": "Estado de ejecución del asistente",
+ "error": "El asistente se detuvo. Comprueba sus credenciales antes de reiniciarlo.",
+ "on": "{{name}}: activado",
+ "off": "{{name}}: desactivado",
+ "saved": "{{name}}: campos de vista previa guardados: {{amount}}"
+ },
+ "whatsappConnect": {
+ "title": "WhatsAppConnectFlowView · Vinculación de dispositivo WhatsApp",
+ "description": "Compara vinculación automática, éxito, caducidad y errores; prueba otra cuenta.",
+ "options": "La vista conserva las reglas visuales de inicio automático y diseño mínimo. El componente padre controla estado y reintentos. La entrada real gestiona inicio automático, reintentos forzados y sondeo."
+ },
+ "linearPanel": {
+ "title": "LinearPanelView · Configuración de Linear",
+ "description": "Explora datos de la app, secretos, ajustes avanzados, espacios, acceso y autorización web.",
+ "options": "state y workspaces aportan instantáneas; las funciones conectan acciones de espacio, guardado y MCP. Tres espacios de composición integran las vistas reales de miembros, autorización y restablecimiento.",
+ "state": "Estado de configuración de Linear",
+ "runtimeError": "No se pudo iniciar el webhook de Linear.",
+ "saveError": "No se pudo guardar la configuración. Se conservó el borrador.",
+ "inspectionError": "No se pudieron inspeccionar los espacios de trabajo conectados.",
+ "refreshed": "Espacios de trabajo de ejemplo actualizados.",
+ "removed": "Espacio de trabajo de ejemplo eliminado: {{name}}",
+ "mcp": "Configuración de Linear MCP seleccionada."
+ },
+ "linearMembers": {
+ "title": "LinearMemberAccessView · Acceso de miembros",
+ "description": "Busca miembros, cambia permisos y compara carga, vacío, guardado y falta de confirmación.",
+ "options": "snapshot contiene el estado confirmado de los miembros. onLoad y onSetAllowed corresponden a la entrada del canal; la pasarela sigue validando los permisos.",
+ "state": "Estado de miembros",
+ "loadError": "El directorio de miembros no está disponible.",
+ "saveError": "No se confirmó el acceso."
+ },
+ "linearConnect": {
+ "title": "LinearConnectFlowView · Autorización de Linear",
+ "description": "Prueba la autorización del navegador con espera, inicio, cancelación, éxito y error.",
+ "options": "Reutiliza ChannelQrConnectFlowView. Linear aporta la vista, etiquetas y gestión del foco; la entrada de ejecución crea sesiones y realiza el sondeo.",
+ "state": "Etapa de autorización",
+ "error": "No se pudo completar la autorización.",
+ "hint": "El enlace y el espacio de trabajo son ejemplos. Iniciar y Cancelar solo cambian la etapa de la vista previa."
+ },
+ "linearReset": {
+ "title": "LinearResetConnectionView · Restablecer conexión",
+ "description": "Revisa qué se borra o conserva, el estado ocupado y el reintento tras un restablecimiento parcial.",
+ "options": "onReset ejecuta la revocación y limpieza completas. La vista gestiona confirmación, errores, restricciones de cierre y restauración del foco.",
+ "state": "Resultado del restablecimiento",
+ "error": "No se pudo detener el canal. Se conservó la configuración de la aplicación.",
+ "completed": "Se borraron el espacio y la configuración de la aplicación de la vista previa."
+ },
+ "weixinPanel": {
+ "title": "WeixinPanelView · Ajustes de Weixin",
+ "description": "Explora ajustes, opciones avanzadas, guardado y recuperación de sesión caducada.",
+ "options": "Los campos proceden del contrato del canal. La vista gestiona expansión y secretos visibles; la entrada de ejecución gestiona autoguardado, combinación de borradores y recuperación de acceso.",
+ "state": "Estado del panel de Weixin"
+ },
+ "weixinConnect": {
+ "title": "WeixinConnectFlowView · QR y verificación de Weixin",
+ "description": "Compara escaneo QR, códigos de verificación, éxito, caducidad, cancelación y errores.",
+ "options": "La vista recibe instantáneas y funciones, conservando el código escrito. Los QR se generan en el navegador. La entrada real gestiona autorización, pausa de sondeo, actualización y cancelación.",
+ "state": "Estado de conexión de Weixin",
+ "error": "Conexión interrumpida. Inténtalo de nuevo.",
+ "refreshed": "Se muestra un nuevo código QR de vista previa.",
+ "hint": "Introduce 123456 para completar la verificación de ejemplo. Otro valor conserva el borrador y muestra un error."
+ }
+}
diff --git a/webui/src/dev/gallery/locales/previews/fr.json b/webui/src/dev/gallery/locales/previews/fr.json
new file mode 100644
index 000000000..be3e79494
--- /dev/null
+++ b/webui/src/dev/gallery/locales/previews/fr.json
@@ -0,0 +1,444 @@
+{
+ "rename": {
+ "title": "RenameDialog · Renommer groupes et projets",
+ "description": "Essayez le renommage des groupes et projets. Les sujets se renomment dans la liste des discussions.",
+ "options": "L’appelant fournit dialogTitle, description et placeholder. title définit la valeur initiale ; onConfirm reçoit le titre sans espaces aux extrémités. Un titre vide ne peut pas être enregistré.",
+ "hint": "L’enregistrement met à jour le titre ci-dessus."
+ },
+ "delete": {
+ "title": "DeleteConfirm · Confirmation de suppression",
+ "description": "Comparez la suppression d’une discussion, de plusieurs discussions ou d’une discussion avec automatisations.",
+ "options": "count détermine le texte de suppression groupée. automations affiche les tâches liées, leur planification et leur prochaine exécution. La confirmation appelle onConfirm.",
+ "scenario": "Scénario de suppression",
+ "open": "Ouvrir la confirmation de suppression",
+ "confirmed": "Suppression d’exemple confirmée.",
+ "hint": "Choisissez une discussion, plusieurs discussions ou une discussion avec automatisations."
+ },
+ "inlineTokens": {
+ "title": "Inline tokens · Commandes et identifiants de session",
+ "description": "Modifiez les commandes et identifiants pour observer la mise en évidence et les couleurs stables.",
+ "options": "SlashCommandText reçoit command ; InlineTokenHighlight reçoit color et le contenu. SessionHandleLabel déduit sa couleur de id.",
+ "command": "Texte de commande",
+ "run": "Exécutez <command/> pour vérifier l’état.",
+ "handle": "Identifiant de session",
+ "continue": "Continuez votre travail dans <session/>.",
+ "highlight": "Mise en évidence partagée",
+ "review": "Utilisez <skill/> pour examiner les modifications.",
+ "skill": "Compétence : {{name}}"
+ },
+ "sessionLinks": {
+ "selected": "Session sélectionnée : {{name}}.",
+ "hint": "Sélectionnez une mention de session pour voir le résultat."
+ },
+ "userText": {
+ "title": "UserMessageText · Mentions dans les messages",
+ "description": "Modifiez un message contenant des mentions de compétences, d’applications, de MCP et de sessions.",
+ "options": "text est le message d’origine. cliApps, mcpPresets et sessionMentions permettent de résoudre les mentions. Les compétences utilisent $name, les autres mentions @name.",
+ "message": "Texte du message"
+ },
+ "capabilityTokens": {
+ "title": "CapabilityMentionToken · Mentions d’applications",
+ "description": "Comparez les mentions d’applications, de MCP et de sessions dans la saisie et les messages.",
+ "options": "segment indique cli, mcp ou session et ses métadonnées. variant choisit composer ou message. L’exemple utilise une image de marque locale.",
+ "position": "Emplacement de la mention"
+ },
+ "productIcons": {
+ "title": "Product icons · Catalogue d’icônes",
+ "description": "Parcourez les icônes, changez leur taille et sélectionnez-en une.",
+ "options": "Les icônes acceptent LucideProps, dont size, strokeWidth et className. La couleur hérite de currentColor ; les boutons ont des noms d’action accessibles.",
+ "size": "Taille des icônes",
+ "selected": "Sélection : {{name}}"
+ },
+ "startup": {
+ "title": "StartupShell · Écran de démarrage",
+ "description": "Prévisualisez l’écran discret affiché pendant la connexion de l’application.",
+ "options": "embedded produit un élément section, sinon main. aria-busy et l’état de chargement restent disponibles. Les styles proviennent du point d’entrée de l’application."
+ },
+ "fileActions": {
+ "title": "FileActions · Menu de fichier",
+ "description": "Faites un clic droit pour copier le chemin complet, relatif ou le texte de référence d’un fichier.",
+ "options": "path est le texte de référence. metadata fournit le chemin complet et, éventuellement, relatif. La galerie fournit ces métadonnées sans charger le fichier.",
+ "scope": "Emplacement du fichier",
+ "hint": "Ouvrez le menu de copie par clic droit, ou placez le focus sur le fichier et appuyez sur Maj+F10."
+ },
+ "webLinks": {
+ "title": "Web links · Menu des liens",
+ "description": "Ouvrez le véritable menu des liens pour sélectionner un lien et copier son adresse.",
+ "options": "WebLink reçoit les attributs du lien. useMessageWebLinks collecte les liens affichés. MessageLinksMenu reçoit les entrées et les rappels de retour et de fermeture ; expanded contrôle la largeur. Les liens pointent vers des ressources locales de la galerie.",
+ "width": "Largeur du menu des liens",
+ "message": "Consultez la <gallery>galerie de composants</gallery> et l’<brand>image de marque</brand>.",
+ "close": "Fermer le menu des liens",
+ "open": "Voir les liens du message",
+ "hint": "Un clic droit permet de copier l’adresse d’un lien. Le menu collecte les liens du message affiché."
+ },
+ "workbench": {
+ "title": "PaneWorkbench · Volets multiples",
+ "description": "Changez la disposition, activez ou ajoutez des volets et ajustez leur position et leur taille.",
+ "options": "L’appelant contrôle panes, activePaneKey, layout et splitRatios. renderPane fournit le contenu ; les rappels modifient l’état local. Sur écran étroit, seul le volet actif est affiché.",
+ "layout": "Disposition des volets",
+ "limit": "Quatre volets maximum",
+ "notes": "Notes de {{title}}",
+ "active": "Volet actif",
+ "activate": "Sélectionnez ce volet pour l’activer",
+ "hint": "Actif : {{title}}. Faites glisser la poignée inférieure pour déplacer un volet, ses bords pour le redimensionner."
+ },
+ "hostConnection": {
+ "title": "HostConnectionStatus · État de connexion",
+ "description": "Comparez les états connecté, déconnecté, en cours de connexion et en erreur.",
+ "options": "state contrôle l’icône et le texte. compact masque le texte visible mais conserve l’état accessible et l’infobulle.",
+ "state": "État de connexion",
+ "withText": "État avec texte",
+ "compact": "Affichage compact"
+ },
+ "compatibility": {
+ "title": "HostCompatibilityDialog · Compatibilité des versions",
+ "description": "Consultez les versions, les préparatifs et le guide de mise à niveau pour chaque résultat.",
+ "options": "Un profile ouvre la boîte de dialogue ; compatibility fournit le résultat et les versions. onClose la ferme. Ce composant affiche uniquement des informations.",
+ "state": "Compatibilité des versions",
+ "open": "Voir les détails de compatibilité"
+ },
+ "composer": {
+ "title": "ThreadComposer · Saisie des messages",
+ "description": "Essayez l’envoi, les pièces jointes, les commandes et les citations, y compris les états occupé et désactivé.",
+ "options": "Un onSend réussi vide la saisie. isStreaming contrôle l’arrêt et la mise en attente ; variant choisit le style discussion ou accueil. Les envois restent dans cet aperçu.",
+ "statusCommand": "État de la session",
+ "statusDescription": "Voir l’état de la session actuelle",
+ "compactCommand": "Compacter le contexte",
+ "compactDescription": "Compacter le contexte de la session actuelle",
+ "helpCommand": "Aide sur les commandes",
+ "helpDescription": "Voir les commandes disponibles",
+ "state": "État de la saisie",
+ "addQuote": "Ajouter une citation",
+ "input": "Message d’exemple",
+ "placeholder": "Saisissez un message, ou / pour les commandes",
+ "stopped": "Tâche d’exemple arrêtée.",
+ "sent": "Contenu envoyé : {{content}}{{attachments}}",
+ "attachments": " · Pièces jointes : {{amount}}",
+ "hint": "Essayez l’envoi, les pièces jointes, le changement de modèle et le menu des commandes."
+ },
+ "modelPreset": {
+ "title": "ModelPresetBadge · Préréglages de modèle",
+ "description": "Essayez le menu des modèles, la navigation au clavier et l’état à configurer.",
+ "options": "modelPresets fournit les préréglages ; modelPreset et onPresetChange contrôlent la sélection. needsSetup affiche l’accès à la configuration.",
+ "state": "État du sélecteur de modèle",
+ "manage": "Gestion des modèles ouverte.",
+ "settings": "Paramètres des modèles ouverts.",
+ "hint": "Préréglage actuel : {{preset}}. Ouvrez le menu ou utilisez les flèches pour changer."
+ },
+ "usage": {
+ "title": "ComposerUsagePopover · Utilisation du contexte",
+ "description": "Consultez contexte, cache et durée de génération, avec alertes et panneau inférieur.",
+ "options": "context fournit la capacité ; rounds fournit les statistiques par tour. bottomSheet choisit le panneau mobile.",
+ "state": "État de l’utilisation",
+ "hint": "Ouvrez les détails pour voir le contexte, le cache et la durée de génération par tour."
+ },
+ "workspace": {
+ "title": "WorkspaceControls · Répertoire de travail",
+ "description": "Choisissez un projet d’exemple et modifiez son mode d’accès.",
+ "options": "scope et onChange contrôlent la sélection ; onLoadProjects fournit des répertoires d’exemple. La passerelle résout les chemins réels et applique les permissions.",
+ "state": "État du répertoire de travail"
+ },
+ "navigator": {
+ "title": "PromptNavigator · Navigation des messages",
+ "description": "Recherchez des questions précédentes et observez le rappel de navigation.",
+ "options": "messages fournit toute la conversation ; le composant en extrait les questions. onJumpToPrompt reçoit l’ID du message cible.",
+ "hint": "Ouvrez la navigation, puis recherchez et sélectionnez une question.",
+ "empty": "Aucune question sélectionnée"
+ },
+ "header": {
+ "title": "ThreadHeader · En-tête de discussion",
+ "description": "Essayez la barre latérale, le thème, les discussions temporaires et la navigation.",
+ "options": "title, handle, theme et temporaryChatEnabled fournissent l’état d’affichage. Les rappels transmettent les actions à l’appelant.",
+ "jump": "Navigation vers {{id}}",
+ "sidebar": "Barre latérale basculée",
+ "hint": "Essayez les actions de l’en-tête",
+ "temporary": "Discussion temporaire",
+ "regular": "Discussion normale"
+ },
+ "messages": {
+ "title": "ThreadMessages · Liste des messages",
+ "description": "Explorez une conversation à plusieurs tours, ses menus, ses branches et ses citations.",
+ "options": "messages contient les messages projetés. onForkFromMessage reçoit l’index d’une question ; onQuoteSelection reçoit le texte sélectionné d’une réponse.",
+ "quoted": "Citation : {{text}}",
+ "forked": "Branche créée depuis la question {{index}}",
+ "hint": "Ouvrez le menu d’un message, ou sélectionnez du texte dans une réponse et choisissez Citer."
+ },
+ "viewport": {
+ "title": "ThreadViewport · Défilement des discussions",
+ "description": "Parcourez une longue conversation avec repères, navigation et retour en bas.",
+ "options": "La hauteur de l’aperçu est fixe. messages fournit l’historique ; ref.jumpToUserPrompt localise une question. emptyState fournit le contenu d’une discussion vide.",
+ "state": "Vue de la discussion",
+ "empty": "Saisissez un message pour commencer",
+ "hint": "Faites défiler pour explorer les repères, ou utilisez la navigation et le retour en bas."
+ },
+ "history": {
+ "title": "ThreadHistoryStatus · État de l’historique",
+ "description": "Affichez le chargement, le début de l’historique et les erreurs avec relance.",
+ "options": "loading indique une requête, exhausted l’absence de messages plus anciens, error fournit les détails de l’erreur et onRetry relance le chargement.",
+ "state": "État de l’historique",
+ "error": "L’historique d’exemple est indisponible.",
+ "retries": "Tentatives : {{amount}}"
+ },
+ "recovery": {
+ "title": "RecoveryNotice · Reprise de tâche",
+ "description": "Comparez interruption, reprise, échec et indisponibilité ; essayez de continuer ou fermer.",
+ "options": "state fournit un instantané de reprise. onContinue et onDismiss renvoient des Promises. Ces rappels modifient uniquement l’aperçu.",
+ "state": "État de la reprise",
+ "continued": "Tâche d’exemple reprise.",
+ "dismissed": "Avis de reprise fermé.",
+ "reset": "Réinitialiser l’aperçu",
+ "hint": "Sélectionnez un état de reprise, puis essayez de continuer ou de fermer."
+ },
+ "fallback": {
+ "title": "ModelFallbackNotice · Modèle de secours",
+ "description": "Consultez les avis de modèle de secours et d’autorisation expirée, puis les actions associées.",
+ "options": "model identifie le modèle de secours ; reauthProviderLabel nomme l’autorisation expirée. L’appelant fournit onOpenSettings et onDismiss.",
+ "state": "État du modèle de secours",
+ "showAgain": "Afficher à nouveau",
+ "hint": "Essayez le lien vers les paramètres des modèles et le bouton de fermeture."
+ },
+ "compaction": {
+ "title": "ContextCompactionNotice · Compactage du contexte",
+ "description": "Comparez les états démarré, réussi, échoué et annulé du compactage.",
+ "options": "compaction.phase choisit l’avis ; announce contrôle les annonces du lecteur d’écran.",
+ "phase": "Phase de compactage du contexte"
+ },
+ "streamError": {
+ "title": "StreamErrorNotice · Erreurs de message",
+ "description": "Comparez les erreurs de taille, de permissions, de refus et de requête au modèle.",
+ "options": "error.kind choisit le message d’erreur ; onDismiss ferme l’avis.",
+ "kind": "Type d’erreur de message"
+ },
+ "cluster": {
+ "title": "AgentActivityCluster · Activité complète",
+ "description": "Consultez le raisonnement et les traces d’outils en cours, terminés ou en échec.",
+ "options": "messages contient les projections reasoning et trace. isTurnStreaming contrôle l’activité ; expanded peut être contrôlé par l’appelant.",
+ "state": "État de l’activité",
+ "error": "Impossible de lire le fichier."
+ },
+ "search": {
+ "title": "WebSearchRun · Activité de recherche",
+ "description": "Consultez la progression et les sources des recherches web et X.",
+ "options": "run fournit query, target, status et sources ; turnActive contrôle l’effet d’exécution. Les composants partagés chargent les icônes des sites sources.",
+ "state": "État de la recherche",
+ "source": "Source de recherche"
+ },
+ "responseSources": {
+ "title": "FallbackResponseSources · Sources des réponses",
+ "description": "Consultez les préréglages, modèles et fournisseurs de secours utilisés précédemment.",
+ "options": "sources conserve l’instantané du modèle lors de la réponse. Seules les sources dont fallback vaut true affichent un badge.",
+ "hint": "Sélectionnez un badge de secours pour voir le préréglage, le modèle et le fournisseur de la réponse."
+ },
+ "filePreview": {
+ "title": "FilePreviewPanelView · Contenu des fichiers",
+ "description": "Comparez texte, images, troncature, chargement et erreurs. Sélectionnez une image pour zoomer.",
+ "options": "state fournit l’état d’affichage ; path détermine le type et le nom du fichier. Les rappels d’ouverture et d’erreur d’image actualisent l’aperçu.",
+ "state": "État de l’aperçu du fichier"
+ },
+ "webPreview": {
+ "title": "WebPreviewPanelView · Contenu web",
+ "description": "Explorez le titre, l’isolation et les restrictions ; actualisez un document local.",
+ "options": "Le runtime choisit restriction avant de fournir le contenu. children fournit le contenu ; onRefresh demande une actualisation. Cet iframe utilise un srcDoc local.",
+ "state": "État de l’aperçu web",
+ "frame": "Page web d’exemple locale",
+ "refreshes": "Actualisations : {{amount}}"
+ },
+ "session": {
+ "title": "SessionInfoPopoverView · Automatisations de session",
+ "description": "Consultez, modifiez, désactivez et supprimez des tâches, avec chargement et erreurs.",
+ "options": "L’appelant fournit jobs, loading, loadFailed et now. onAction et onEdit renvoient les tâches mises à jour ; la vue coordonne les dialogues, le focus et les retours.",
+ "state": "État des automatisations de session",
+ "saveError": "Échec de l’enregistrement d’exemple. Réessayez.",
+ "providerError": "Le fournisseur d’exemple est indisponible.",
+ "saved": "Automatisation enregistrée.",
+ "openedChat": "Discussion d’exemple ouverte.",
+ "openedCalendar": "Calendrier des automatisations ouvert.",
+ "actionError": "Échec de l’action d’exemple. Réessayez.",
+ "delete": "Suppression : {{name}}",
+ "run": "Exécution demandée : {{name}}",
+ "enable": "Activation : {{name}}",
+ "disable": "Désactivation : {{name}}",
+ "hint": "Ouvrez les détails de la session pour consulter, activer, modifier ou supprimer des automatisations."
+ },
+ "subagent": {
+ "title": "SubagentThreadView · Messages du sous-agent",
+ "description": "Consultez les messages, le raisonnement, le chargement et les échecs ; essayez de relancer.",
+ "options": "Le runtime projette messages. loading et error utilisent l’état partagé de l’historique ; isStreaming et activeTurnId identifient l’activité. La vue ne récupère pas l’historique.",
+ "state": "État de la discussion du sous-agent"
+ },
+ "pairRoute": {
+ "title": "PairRouteSettingsView · Route d’appairage",
+ "description": "Sélectionnez et enregistrez des routes localement, avec les états de sauvegarde et d’erreur.",
+ "options": "L’appelant gère route et original ; routes fournit les routes SSH. Le succès d’enregistrement et l’échec d’actualisation sont distincts. La galerie et les paramètres partagent cette vue.",
+ "state": "État de la route"
+ },
+ "quickPair": {
+ "title": "QuickPairSetupView · Appairage rapide",
+ "description": "Essayez copie d’invitation, saisie du reçu, confirmation d’accès, hôtes existants et nouvelles tentatives.",
+ "options": "state fournit l’état d’appairage et d’affichage ; les rappels exécutent les actions. routeSettings intègre les paramètres de route. La galerie utilise des données d’exemple ; QuickPairSetup gère l’appairage réel.",
+ "state": "Étape d’appairage",
+ "open": "Ouvrir l’appairage rapide",
+ "connected": "Connexion sélectionnée : {{name}}.",
+ "ssh": "Connexion SSH sélectionnée.",
+ "hint": "Les invitations et reçus d’exemple servent uniquement à l’affichage. La confirmation met à jour le retour local."
+ },
+ "sshHost": {
+ "title": "SSHHostPickerView · Adresse SSH",
+ "description": "Filtrez les alias SSH, sélectionnez avec les flèches et comparez import, chargement et erreurs.",
+ "options": "discovery fournit les hôtes de la configuration actuelle. L’appelant contrôle value, busy, error et les rappels. customConfig conserve la découverte d’alias personnalisés ; inputRef rétablit le focus après sélection.",
+ "state": "État de l’adresse SSH",
+ "refreshed": "Adresses d’exemple actualisées.",
+ "entered": "Saisie : {{value}}",
+ "hint": "Saisissez du texte pour filtrer les adresses ; utilisez les flèches pour choisir un alias SSH."
+ },
+ "connectionBadge": {
+ "title": "ConnectionBadge · Indicateur de connexion",
+ "description": "Comparez les couleurs, animations et textes d’état accessibles.",
+ "options": "L’appelant fournit status. Le conteneur de page gère l’abonnement à la connexion.",
+ "state": "État de connexion",
+ "idle": "Inactif",
+ "connecting": "Connexion en cours",
+ "open": "Connecté",
+ "reconnecting": "Reconnexion en cours",
+ "closed": "Déconnecté",
+ "error": "Erreur de connexion"
+ },
+ "hostPicker": {
+ "title": "HostSwitcherView · Menu des hôtes",
+ "description": "Choisissez un hôte local ou d’exemple ; comparez attente, déconnexion et repli.",
+ "options": "picker fournit les hôtes et les rappels ; status est l’état de connexion actuel. Le HostSwitcher de production s’abonne au client.",
+ "state": "État du menu des hôtes",
+ "offline": "L’hôte d’exemple est déconnecté.",
+ "manage": "Gestion des connexions ouverte.",
+ "cancelled": "Changement d’hôte d’exemple annulé.",
+ "selected": "Hôte de l’aperçu : {{name}}"
+ },
+ "chats": {
+ "title": "ChatList · Liste des discussions",
+ "description": "Sélectionnez des discussions, puis essayez l’épinglage, l’archivage et la suppression.",
+ "options": "L’appelant fournit sessions, activeKey et les clés épinglées ou archivées. Les rappels modifient la liste d’exemple.",
+ "state": "État de la liste des discussions",
+ "renamed": "Nouveau nom : {{name}}",
+ "selected": "Discussion sélectionnée : {{name}}",
+ "none": "Aucune"
+ },
+ "sidebarResize": {
+ "title": "SidebarResizeHandle · Taille de la barre latérale",
+ "description": "Redimensionnez, repliez et dépliez la barre latérale à la souris ou au clavier.",
+ "options": "width et open sont contrôlés. onResize actualise taille et ouverture ; onDraggingChange signale le glissement.",
+ "content": "Contenu de la barre latérale",
+ "hint": "Faites glisser la séparation, ou placez-y le focus puis utilisez les flèches, Début, Fin et Entrée.",
+ "collapsed": "Repliée",
+ "dragging": "Glissement en cours"
+ },
+ "language": {
+ "title": "LanguageSwitcher · Langue de l’interface",
+ "description": "Changez la langue de la galerie et des composants de production.",
+ "options": "Utilise l’i18n de l’application et la langue préférée du navigateur, sans passerelle. Le sélecteur en haut utilise le même composant."
+ },
+ "channelMarks": {
+ "title": "Channel marks · Identité des canaux",
+ "description": "Consultez les avatars de remplacement, les icônes d’espace de travail et la marque WebSocket.",
+ "options": "LinearAvatar reçoit name, url et workspace. Sans image valide, il affiche du texte de remplacement ou une icône.",
+ "name": "Nom de l’avatar",
+ "member": "Avatar de membre",
+ "workspace": "Icône d’espace de travail"
+ },
+ "secret": {
+ "title": "LinearSecretField · Édition des secrets",
+ "description": "Modifiez, révélez, enregistrez et remplacez un secret ; vérifiez le brouillon après un échec.",
+ "options": "configured indique l’état enregistré ; onSave persiste le secret. Les rappels de la galerie modifient uniquement l’état local.",
+ "state": "État du secret",
+ "error": "Échec de l’enregistrement d’exemple.",
+ "hint": "Saisissez un exemple et enregistrez, ou choisissez l’état d’erreur pour vérifier la conservation du brouillon."
+ },
+ "channelHelp": {
+ "title": "LinearHelpContent · Aide du canal",
+ "description": "Consultez l’aide du canal dans le véritable menu déroulant.",
+ "options": "Le contenu utilise les traductions existantes du canal ; l’appelant fournit le conteneur du menu.",
+ "open": "Ouvrir l’aide du canal"
+ },
+ "channel": {
+ "title": "{{channel}} · Configuration du canal",
+ "description": "Explorez le véritable formulaire de configuration et ses états.",
+ "options": "Utilise les enregistrements de canaux, les instantanés du contrat Python et ChannelSetupSurfaceView de production. Saisie, affichage des identifiants, préréglages, vérifications et interrupteurs ne modifient que cet aperçu.",
+ "state": "État de configuration du canal",
+ "credentialsError": "Les identifiants d’exemple ont été refusés. Modifiez les valeurs de l’aperçu et réessayez.",
+ "validation": "Configuration d’aperçu"
+ },
+ "channelConnect": {
+ "state": "État de connexion {{channel}}",
+ "error": "L’autorisation est temporairement indisponible. Réessayez."
+ },
+ "feishuConnect": {
+ "title": "FeishuConnectFlowView · Autorisation Feishu par QR",
+ "description": "Essayez le parcours QR Feishu avec attente, réussite, expiration, annulation et erreurs.",
+ "options": "connect, busy et error fournissent l’affichage ; les QR codes sont générés localement. La fonctionnalité gère démarrage, annulation et interrogation ; les rappels ne modifient que cet exemple."
+ },
+ "feishuAssistants": {
+ "title": "FeishuAssistantsPanelView · Assistants Feishu",
+ "description": "Explorez les cartes d’assistants, leurs états, les réglages avancés et l’ajout d’un assistant.",
+ "options": "feature et instances fournissent les instantanés. La vue gère les brouillons et les retours d’enregistrement ; onToggleInstance, onSaveInstance et renderConnectFlow relient les actions au runtime.",
+ "state": "État d’exécution des assistants",
+ "error": "L’assistant s’est arrêté. Vérifiez ses identifiants avant de le redémarrer.",
+ "on": "{{name}} : activé",
+ "off": "{{name}} : désactivé",
+ "saved": "{{name}} : champs d’aperçu enregistrés : {{amount}}"
+ },
+ "whatsappConnect": {
+ "title": "WhatsAppConnectFlowView · Association d’appareil WhatsApp",
+ "description": "Comparez association automatique, réussite, expiration et erreurs ; essayez un autre compte.",
+ "options": "La vue conserve les règles d’affichage de démarrage automatique et de présentation minimale. L’appelant contrôle l’état et les tentatives. Le point d’entrée réel gère démarrage, relance forcée et interrogation."
+ },
+ "linearPanel": {
+ "title": "LinearPanelView · Configuration de Linear",
+ "description": "Explorez l’application, les secrets, les réglages avancés, les espaces, les accès et l’autorisation web.",
+ "options": "state et workspaces fournissent des instantanés ; les rappels relient les actions d’espace, d’enregistrement et de MCP. Trois emplacements composent les vues de membres, d’autorisation et de réinitialisation.",
+ "state": "État de configuration de Linear",
+ "runtimeError": "Impossible de démarrer le webhook Linear.",
+ "saveError": "Impossible d’enregistrer les paramètres. Votre brouillon a été conservé.",
+ "inspectionError": "Impossible d’inspecter les espaces de travail connectés.",
+ "refreshed": "Espaces de travail d’exemple actualisés.",
+ "removed": "Espace de travail d’exemple retiré : {{name}}",
+ "mcp": "Configuration du MCP Linear sélectionnée."
+ },
+ "linearMembers": {
+ "title": "LinearMemberAccessView · Accès des membres",
+ "description": "Recherchez des membres, changez les accès et comparez chargement, enregistrement et échecs.",
+ "options": "snapshot contient l’état confirmé des membres. onLoad et onSetAllowed appartiennent au canal ; la passerelle valide toujours les permissions.",
+ "state": "État des membres",
+ "loadError": "L’annuaire des membres est indisponible.",
+ "saveError": "L’accès n’a pas été confirmé."
+ },
+ "linearConnect": {
+ "title": "LinearConnectFlowView · Autorisation Linear",
+ "description": "Essayez l’autorisation dans le navigateur, l’attente, l’annulation, la réussite et l’échec.",
+ "options": "Réutilise ChannelQrConnectFlowView. Linear fournit affichage, libellés et gestion du focus ; le runtime crée les sessions et gère l’interrogation.",
+ "state": "Étape d’autorisation",
+ "error": "Impossible de terminer l’autorisation.",
+ "hint": "Le lien d’autorisation et l’espace de travail sont des exemples. Démarrer et Annuler modifient uniquement l’étape de l’aperçu."
+ },
+ "linearReset": {
+ "title": "LinearResetConnectionView · Réinitialiser la connexion",
+ "description": "Vérifiez les éléments effacés ou conservés et la relance après une réinitialisation partielle.",
+ "options": "onReset exécute toute la révocation et le nettoyage. La vue gère confirmation, erreurs, restrictions de fermeture et restauration du focus.",
+ "state": "Résultat de la réinitialisation",
+ "error": "Impossible d’arrêter le canal. Les paramètres de l’application ont été conservés.",
+ "completed": "Espace de travail et paramètres d’application de l’aperçu effacés."
+ },
+ "weixinPanel": {
+ "title": "WeixinPanelView · Paramètres Weixin",
+ "description": "Explorez les paramètres, les options avancées, l’enregistrement et la reconnexion.",
+ "options": "Les champs proviennent du contrat du canal. La vue gère le déploiement et la visibilité des secrets ; le runtime gère l’enregistrement automatique, la fusion des brouillons et la reconnexion.",
+ "state": "État du panneau Weixin"
+ },
+ "weixinConnect": {
+ "title": "WeixinConnectFlowView · QR et vérification Weixin",
+ "description": "Comparez scan QR, codes de vérification, réussite, expiration, annulation et erreurs.",
+ "options": "La vue reçoit des instantanés et des rappels, en conservant le code saisi. Les QR codes sont générés dans le navigateur. L’entrée réelle gère autorisation, pauses d’interrogation, actualisation et annulation.",
+ "state": "État de connexion Weixin",
+ "error": "Connexion interrompue. Réessayez.",
+ "refreshed": "Un nouveau QR code d’aperçu est affiché.",
+ "hint": "Saisissez 123456 pour terminer l’aperçu de vérification. Toute autre saisie conserve le brouillon et affiche une erreur."
+ }
+}
diff --git a/webui/src/dev/gallery/locales/previews/id.json b/webui/src/dev/gallery/locales/previews/id.json
new file mode 100644
index 000000000..95d4eac02
--- /dev/null
+++ b/webui/src/dev/gallery/locales/previews/id.json
@@ -0,0 +1,444 @@
+{
+ "rename": {
+ "title": "RenameDialog · Ubah nama grup dan proyek",
+ "description": "Coba dialog pengubahan nama grup dan proyek. Nama topik diubah langsung di daftar percakapan.",
+ "options": "Pemanggil menyediakan dialogTitle, description, dan placeholder. title menentukan nilai awal; onConfirm menerima judul tanpa spasi di kedua ujung. Judul kosong tidak dapat disimpan.",
+ "hint": "Menyimpan akan memperbarui judul di atas."
+ },
+ "delete": {
+ "title": "DeleteConfirm · Konfirmasi penghapusan",
+ "description": "Bandingkan penghapusan satu percakapan, beberapa percakapan, atau percakapan dengan otomatisasi.",
+ "options": "count mengatur teks penghapusan massal. automations menampilkan tugas terkait, jadwal, dan waktu eksekusi berikutnya. Konfirmasi memanggil onConfirm.",
+ "scenario": "Skenario penghapusan",
+ "open": "Buka konfirmasi penghapusan",
+ "confirmed": "Penghapusan contoh dikonfirmasi.",
+ "hint": "Pilih satu percakapan, beberapa percakapan, atau percakapan dengan otomatisasi."
+ },
+ "inlineTokens": {
+ "title": "Inline tokens · Perintah dan pengenal sesi",
+ "description": "Edit perintah dan pengenal untuk melihat sorotan serta warna sesi yang konsisten.",
+ "options": "SlashCommandText menerima command; InlineTokenHighlight menerima color dan konten. SessionHandleLabel menentukan warna berdasarkan id.",
+ "command": "Teks perintah",
+ "run": "Jalankan <command/> untuk memeriksa status.",
+ "handle": "Pengenal sesi",
+ "continue": "Lanjutkan pekerjaan di <session/>.",
+ "highlight": "Sorotan bersama",
+ "review": "Gunakan <skill/> untuk meninjau perubahan.",
+ "skill": "Keterampilan: {{name}}"
+ },
+ "sessionLinks": {
+ "selected": "Sesi terpilih: {{name}}.",
+ "hint": "Pilih penyebutan sesi untuk melihat hasilnya."
+ },
+ "userText": {
+ "title": "UserMessageText · Penyebutan dalam pesan",
+ "description": "Edit pesan yang menyebut keterampilan, aplikasi, MCP, dan sesi.",
+ "options": "text adalah pesan asli. cliApps, mcpPresets, dan sessionMentions digunakan untuk mengenali penyebutan. Keterampilan memakai $name; penyebutan lain memakai @name.",
+ "message": "Teks pesan"
+ },
+ "capabilityTokens": {
+ "title": "CapabilityMentionToken · Penyebutan aplikasi",
+ "description": "Bandingkan penyebutan aplikasi, MCP, dan sesi di kolom penulisan dan pesan.",
+ "options": "segment menentukan cli, mcp, atau session beserta metadatanya. variant memilih composer atau message. Contoh ini memakai gambar merek lokal.",
+ "position": "Lokasi penyebutan"
+ },
+ "productIcons": {
+ "title": "Product icons · Katalog ikon",
+ "description": "Jelajahi ikon, ubah ukurannya, dan pilih ikon untuk disorot.",
+ "options": "Ikon menerima LucideProps seperti size, strokeWidth, dan className. Warna mengikuti currentColor; tombol memiliki nama tindakan yang aksesibel.",
+ "size": "Ukuran ikon",
+ "selected": "Terpilih: {{name}}"
+ },
+ "startup": {
+ "title": "StartupShell · Tampilan awal",
+ "description": "Pratinjau tampilan penantian yang tenang saat aplikasi terhubung.",
+ "options": "embedded merender section; selain itu memakai main. aria-busy dan status pemuatan tetap tersedia. Gaya tampilan berasal dari titik masuk aplikasi."
+ },
+ "fileActions": {
+ "title": "FileActions · Menu berkas",
+ "description": "Klik kanan untuk menyalin jalur lengkap, jalur relatif, atau teks referensi berkas.",
+ "options": "path adalah teks referensi. metadata menyediakan jalur lengkap dan jalur relatif opsional. Galeri menyediakan metadata tanpa memuat berkas.",
+ "scope": "Cakupan berkas",
+ "hint": "Klik kanan untuk membuka menu salin, atau fokuskan berkas lalu tekan Shift+F10."
+ },
+ "webLinks": {
+ "title": "Web links · Menu tautan",
+ "description": "Buka menu tautan asli untuk memilih tautan pesan dan menyalin alamatnya.",
+ "options": "WebLink menerima atribut tautan. useMessageWebLinks mengumpulkan tautan yang dirender. MessageLinksMenu menerima entri serta callback kembali dan tutup; expanded mengatur lebar. Semua tautan menuju sumber daya galeri lokal.",
+ "width": "Lebar menu tautan",
+ "message": "Lihat <gallery>galeri komponen</gallery> dan <brand>gambar merek</brand>.",
+ "close": "Tutup menu tautan",
+ "open": "Lihat tautan pesan",
+ "hint": "Klik kanan tautan untuk menyalin alamatnya. Menu mengumpulkan tautan dari pesan yang dirender."
+ },
+ "workbench": {
+ "title": "PaneWorkbench · Beberapa panel",
+ "description": "Ganti tata letak, aktifkan atau tambahkan panel, lalu atur posisi dan ukurannya.",
+ "options": "Pemanggil mengontrol panes, activePaneKey, layout, dan splitRatios. renderPane menyediakan konten; callback memperbarui status lokal. Layar sempit menampilkan panel aktif.",
+ "layout": "Tata letak panel",
+ "limit": "Maksimal empat panel",
+ "notes": "Catatan {{title}}",
+ "active": "Panel aktif",
+ "activate": "Pilih panel ini untuk mengaktifkannya",
+ "hint": "Aktif: {{title}}. Seret pegangan bawah untuk memindahkan panel dan tepinya untuk mengubah ukuran."
+ },
+ "hostConnection": {
+ "title": "HostConnectionStatus · Status koneksi",
+ "description": "Bandingkan status terhubung, terputus, menghubungkan, dan kesalahan.",
+ "options": "state mengatur ikon dan teks. compact menyembunyikan teks yang terlihat, tetapi mempertahankan status aksesibel dan tooltip.",
+ "state": "Status koneksi",
+ "withText": "Status dengan teks",
+ "compact": "Tampilan ringkas"
+ },
+ "compatibility": {
+ "title": "HostCompatibilityDialog · Kompatibilitas versi",
+ "description": "Lihat versi, persiapan, dan panduan peningkatan untuk setiap hasil kompatibilitas.",
+ "options": "profile membuka dialog; compatibility menyediakan hasil dan versi. onClose menutupnya. Komponen ini hanya menampilkan informasi.",
+ "state": "Kompatibilitas versi",
+ "open": "Lihat detail kompatibilitas"
+ },
+ "composer": {
+ "title": "ThreadComposer · Penulisan pesan",
+ "description": "Coba pesan, lampiran, perintah, dan kutipan dalam status sibuk dan nonaktif.",
+ "options": "onSend yang berhasil mengosongkan input. isStreaming mengatur penghentian dan antrean; variant memilih gaya percakapan atau halaman pembuka. Kiriman tetap berada di pratinjau ini.",
+ "statusCommand": "Status sesi",
+ "statusDescription": "Lihat status sesi saat ini",
+ "compactCommand": "Padatkan konteks",
+ "compactDescription": "Padatkan konteks sesi saat ini",
+ "helpCommand": "Bantuan perintah",
+ "helpDescription": "Lihat perintah yang tersedia",
+ "state": "Status input",
+ "addQuote": "Tambahkan kutipan",
+ "input": "Pesan contoh",
+ "placeholder": "Ketik pesan, atau / untuk melihat perintah",
+ "stopped": "Tugas contoh dihentikan.",
+ "sent": "Konten terkirim: {{content}}{{attachments}}",
+ "attachments": " · Lampiran: {{amount}}",
+ "hint": "Coba kirim pesan, pilih lampiran, ganti model, dan buka menu perintah."
+ },
+ "modelPreset": {
+ "title": "ModelPresetBadge · Preset model",
+ "description": "Coba menu model, navigasi papan ketik, dan status perlu pengaturan.",
+ "options": "modelPresets menyediakan preset; modelPreset dan onPresetChange mengontrol pilihan. needsSetup menampilkan akses ke pengaturan.",
+ "state": "Status kontrol model",
+ "manage": "Pengelolaan model dibuka.",
+ "settings": "Pengaturan model dibuka.",
+ "hint": "Preset saat ini: {{preset}}. Buka menu atau gunakan tombol panah untuk mengganti."
+ },
+ "usage": {
+ "title": "ComposerUsagePopover · Penggunaan konteks",
+ "description": "Lihat konteks, cache, dan waktu pembuatan dengan peringatan serta panel bawah.",
+ "options": "context menyediakan kapasitas; rounds menyediakan statistik per giliran. bottomSheet memilih panel seluler.",
+ "state": "Status penggunaan",
+ "hint": "Buka detail untuk melihat konteks, cache, dan waktu pembuatan per giliran."
+ },
+ "workspace": {
+ "title": "WorkspaceControls · Direktori kerja",
+ "description": "Pilih proyek contoh dan ubah mode akses pratinjau ini.",
+ "options": "scope dan onChange mengontrol pilihan; onLoadProjects menyediakan direktori contoh. Gateway menyelesaikan jalur nyata dan menerapkan izin.",
+ "state": "Status direktori kerja"
+ },
+ "navigator": {
+ "title": "PromptNavigator · Navigasi pertanyaan",
+ "description": "Cari pertanyaan sebelumnya dan periksa callback perpindahan.",
+ "options": "messages menyediakan seluruh percakapan; komponen mengambil pertanyaan pengguna. onJumpToPrompt menerima ID pesan tujuan.",
+ "hint": "Buka navigasi, lalu cari dan pilih pertanyaan.",
+ "empty": "Belum ada pertanyaan yang dipilih"
+ },
+ "header": {
+ "title": "ThreadHeader · Header percakapan",
+ "description": "Coba bilah samping, tema, percakapan sementara, dan navigasi pertanyaan.",
+ "options": "title, handle, theme, dan temporaryChatEnabled menyediakan status tampilan. Callback meneruskan tindakan ke pemanggil.",
+ "jump": "Berpindah ke {{id}}",
+ "sidebar": "Tampilan bilah samping diubah",
+ "hint": "Coba tindakan pada header",
+ "temporary": "Percakapan sementara",
+ "regular": "Percakapan biasa"
+ },
+ "messages": {
+ "title": "ThreadMessages · Daftar pesan",
+ "description": "Jelajahi percakapan beberapa giliran, menu, cabang, dan kutipan teks terpilih.",
+ "options": "messages berisi pesan yang diproyeksikan. onForkFromMessage menerima indeks pertanyaan; onQuoteSelection menerima teks jawaban yang dipilih.",
+ "quoted": "Kutipan: {{text}}",
+ "forked": "Cabang dibuat dari pertanyaan {{index}}",
+ "hint": "Buka menu pesan, atau pilih teks jawaban lalu pilih Kutip."
+ },
+ "viewport": {
+ "title": "ThreadViewport · Gulir percakapan",
+ "description": "Gulir percakapan panjang dengan penanda pertanyaan, navigasi, dan kembali ke bawah.",
+ "options": "Tinggi pratinjau tetap. messages menyediakan riwayat; ref.jumpToUserPrompt menemukan pertanyaan. emptyState menyediakan konten percakapan kosong.",
+ "state": "Tampilan percakapan",
+ "empty": "Ketik pesan untuk memulai percakapan",
+ "hint": "Gulir untuk menjelajahi penanda, atau gunakan navigasi lalu kembali ke bawah."
+ },
+ "history": {
+ "title": "ThreadHistoryStatus · Status riwayat",
+ "description": "Tampilkan pemuatan, awal riwayat, dan kesalahan dengan opsi coba lagi.",
+ "options": "loading menandakan permintaan sedang berlangsung, exhausted berarti tidak ada pesan sebelumnya, error menyediakan detail kesalahan, dan onRetry mencoba memuat ulang.",
+ "state": "Status riwayat",
+ "error": "Riwayat contoh tidak tersedia.",
+ "retries": "Percobaan ulang: {{amount}}"
+ },
+ "recovery": {
+ "title": "RecoveryNotice · Pemulihan tugas",
+ "description": "Bandingkan terhenti, melanjutkan, gagal, dan tidak tersedia; coba lanjutkan atau tutup.",
+ "options": "state menyediakan snapshot pemulihan. onContinue dan onDismiss mengembalikan Promise. Callback ini hanya memperbarui pratinjau.",
+ "state": "Status pemulihan",
+ "continued": "Tugas contoh dilanjutkan.",
+ "dismissed": "Pemberitahuan pemulihan ditutup.",
+ "reset": "Atur ulang pratinjau",
+ "hint": "Pilih status pemulihan, lalu coba lanjutkan atau tutup."
+ },
+ "fallback": {
+ "title": "ModelFallbackNotice · Model cadangan",
+ "description": "Lihat pemberitahuan model cadangan dan otorisasi kedaluwarsa, lalu coba pengaturan atau tutup.",
+ "options": "model menentukan model cadangan; reauthProviderLabel menyebut otorisasi yang kedaluwarsa. Pemanggil menyediakan onOpenSettings dan onDismiss.",
+ "state": "Status model cadangan",
+ "showAgain": "Tampilkan lagi",
+ "hint": "Coba tautan pengaturan model dan tombol tutup."
+ },
+ "compaction": {
+ "title": "ContextCompactionNotice · Pemadatan konteks",
+ "description": "Bandingkan status pemadatan dimulai, berhasil, gagal, dan dibatalkan.",
+ "options": "compaction.phase memilih pemberitahuan; announce mengatur pengumuman pembaca layar.",
+ "phase": "Tahap pemadatan konteks"
+ },
+ "streamError": {
+ "title": "StreamErrorNotice · Kesalahan pesan",
+ "description": "Bandingkan kesalahan ukuran, izin direktori, penolakan giliran, dan permintaan model.",
+ "options": "error.kind memilih pesan kesalahan; onDismiss menutup pemberitahuan.",
+ "kind": "Jenis kesalahan pesan"
+ },
+ "cluster": {
+ "title": "AgentActivityCluster · Aktivitas lengkap",
+ "description": "Lihat penalaran dan catatan alat saat berjalan, selesai, atau gagal.",
+ "options": "messages berisi proyeksi reasoning dan trace. isTurnStreaming mengatur aktivitas; expanded dapat dikontrol pemanggil.",
+ "state": "Status aktivitas",
+ "error": "Berkas tidak dapat dibaca."
+ },
+ "search": {
+ "title": "WebSearchRun · Aktivitas pencarian",
+ "description": "Lihat kemajuan dan sumber pencarian web maupun X.",
+ "options": "run menyediakan query, target, status, dan sources; turnActive mengatur efek berjalan. Komponen bersama memuat ikon situs sumber.",
+ "state": "Status pencarian",
+ "source": "Sumber pencarian"
+ },
+ "responseSources": {
+ "title": "FallbackResponseSources · Sumber respons",
+ "description": "Lihat preset, model, dan penyedia cadangan yang digunakan dalam jawaban sebelumnya.",
+ "options": "sources mempertahankan snapshot model saat merespons. Hanya sumber dengan fallback bernilai true yang menampilkan lencana.",
+ "hint": "Pilih lencana cadangan untuk melihat preset, model, dan penyedia yang digunakan dalam respons itu."
+ },
+ "filePreview": {
+ "title": "FilePreviewPanelView · Konten berkas",
+ "description": "Bandingkan teks, gambar, pemotongan, pemuatan, dan kesalahan. Pilih gambar untuk memperbesar.",
+ "options": "state menyediakan snapshot tampilan; path menentukan jenis dan nama berkas. Callback pembukaan dan kesalahan gambar memperbarui pratinjau.",
+ "state": "Status pratinjau berkas"
+ },
+ "webPreview": {
+ "title": "WebPreviewPanelView · Konten web",
+ "description": "Jelajahi bilah judul, keterangan isolasi, dan pembatasan; segarkan dokumen lokal.",
+ "options": "Runtime menentukan restriction sebelum menyediakan konten. children menyediakan konten; onRefresh meminta penyegaran. iframe ini memakai srcDoc lokal.",
+ "state": "Status pratinjau web",
+ "frame": "Halaman web contoh lokal",
+ "refreshes": "Penyegaran: {{amount}}"
+ },
+ "session": {
+ "title": "SessionInfoPopoverView · Otomatisasi sesi",
+ "description": "Lihat, edit, nonaktifkan, dan hapus tugas dengan status pemuatan dan kesalahan.",
+ "options": "Pemanggil menyediakan jobs, loading, loadFailed, dan now. onAction dan onEdit mengembalikan tugas terbaru; tampilan mengoordinasikan dialog, fokus, dan umpan balik.",
+ "state": "Status otomatisasi sesi",
+ "saveError": "Penyimpanan contoh gagal. Coba lagi.",
+ "providerError": "Penyedia contoh tidak tersedia.",
+ "saved": "Otomatisasi disimpan.",
+ "openedChat": "Percakapan contoh dibuka.",
+ "openedCalendar": "Kalender otomatisasi dibuka.",
+ "actionError": "Tindakan contoh gagal. Coba lagi.",
+ "delete": "Dihapus: {{name}}",
+ "run": "Eksekusi diminta: {{name}}",
+ "enable": "Diaktifkan: {{name}}",
+ "disable": "Dinonaktifkan: {{name}}",
+ "hint": "Buka detail sesi untuk melihat, mengaktifkan, mengedit, dan menghapus otomatisasi."
+ },
+ "subagent": {
+ "title": "SubagentThreadView · Pesan subagen",
+ "description": "Lihat pesan, penalaran, pemuatan, dan kegagalan subagen; coba ulang.",
+ "options": "Runtime memproyeksikan messages. loading dan error memakai tampilan status riwayat bersama; isStreaming dan activeTurnId menentukan aktivitas. Tampilan tidak mengambil riwayat.",
+ "state": "Status percakapan subagen"
+ },
+ "pairRoute": {
+ "title": "PairRouteSettingsView · Rute pemasangan",
+ "description": "Pilih dan simpan rute secara lokal, dengan status penyimpanan, kesalahan, dan kegagalan penyegaran.",
+ "options": "Pemanggil mengelola route dan original; routes menyediakan rute SSH. Penyimpanan berhasil dan penyegaran direktori gagal ditampilkan terpisah. Galeri dan pengaturan memakai tampilan yang sama.",
+ "state": "Status rute"
+ },
+ "quickPair": {
+ "title": "QuickPairSetupView · Pemasangan cepat",
+ "description": "Coba salin undangan, masukkan balasan, konfirmasi akses, host yang ada, dan percobaan ulang.",
+ "options": "state menyediakan status pemasangan dan tampilan; callback menjalankan tindakan. routeSettings menyusun pengaturan rute. Galeri memakai contoh dan callback lokal; QuickPairSetup mengelola pemasangan nyata.",
+ "state": "Tahap pemasangan",
+ "open": "Buka pemasangan cepat",
+ "connected": "Koneksi terpilih: {{name}}.",
+ "ssh": "Koneksi SSH dipilih.",
+ "hint": "Undangan dan balasan contoh hanya untuk tampilan. Konfirmasi memperbarui umpan balik lokal."
+ },
+ "sshHost": {
+ "title": "SSHHostPickerView · Alamat SSH",
+ "description": "Filter alias SSH, pilih dengan tombol panah, dan bandingkan impor, pemuatan, serta kesalahan.",
+ "options": "discovery menyediakan host dari konfigurasi saat ini. Pemanggil mengontrol value, busy, error, dan callback. customConfig mempertahankan penemuan alias konfigurasi khusus; inputRef memulihkan fokus setelah pemilihan.",
+ "state": "Status alamat SSH",
+ "refreshed": "Alamat contoh disegarkan.",
+ "entered": "Masukan: {{value}}",
+ "hint": "Ketik untuk memfilter alamat; gunakan tombol panah untuk memilih alias SSH."
+ },
+ "connectionBadge": {
+ "title": "ConnectionBadge · Indikator koneksi",
+ "description": "Bandingkan warna, animasi, dan teks status yang aksesibel.",
+ "options": "Pemanggil menyediakan status. Kontainer halaman mengelola langganan koneksi.",
+ "state": "Status koneksi",
+ "idle": "Siaga",
+ "connecting": "Menghubungkan",
+ "open": "Terhubung",
+ "reconnecting": "Menghubungkan ulang",
+ "closed": "Terputus",
+ "error": "Kesalahan koneksi"
+ },
+ "hostPicker": {
+ "title": "HostSwitcherView · Menu host",
+ "description": "Pilih host lokal atau contoh; bandingkan status menunggu, luring, dan diciutkan.",
+ "options": "picker menyediakan data host dan callback; status adalah status koneksi saat ini. HostSwitcher produksi berlangganan ke klien.",
+ "state": "Status menu host",
+ "offline": "Host contoh terputus.",
+ "manage": "Pengelolaan koneksi dibuka.",
+ "cancelled": "Peralihan host contoh dibatalkan.",
+ "selected": "Host pratinjau: {{name}}"
+ },
+ "chats": {
+ "title": "ChatList · Daftar percakapan",
+ "description": "Pilih percakapan dan coba sematkan, arsipkan, atau hapus melalui menunya.",
+ "options": "Pemanggil menyediakan sessions, activeKey, serta kunci yang disematkan atau diarsipkan. Callback tindakan memperbarui daftar contoh.",
+ "state": "Status daftar percakapan",
+ "renamed": "Nama diubah: {{name}}",
+ "selected": "Percakapan terpilih: {{name}}",
+ "none": "Tidak ada"
+ },
+ "sidebarResize": {
+ "title": "SidebarResizeHandle · Ukuran bilah samping",
+ "description": "Ubah ukuran, ciutkan, dan perluas bilah samping dengan tetikus atau papan ketik.",
+ "options": "width dan open dikontrol pemanggil. onResize memperbarui ukuran dan perluasan; onDraggingChange melaporkan penyeretan.",
+ "content": "Konten bilah samping",
+ "hint": "Seret pembatas, atau fokuskan lalu gunakan tombol panah, Home, End, dan Enter.",
+ "collapsed": "Diciutkan",
+ "dragging": "Sedang diseret"
+ },
+ "language": {
+ "title": "LanguageSwitcher · Bahasa antarmuka",
+ "description": "Ganti bahasa galeri dan komponen produksi.",
+ "options": "Memakai i18n aplikasi dan preferensi bahasa peramban, tanpa gateway. Pemilih bahasa di atas memakai komponen yang sama."
+ },
+ "channelMarks": {
+ "title": "Channel marks · Identitas kanal",
+ "description": "Lihat teks pengganti avatar, ikon ruang kerja, dan tanda WebSocket.",
+ "options": "LinearAvatar menerima name, url, dan workspace. Tanpa gambar yang valid, komponen menampilkan teks pengganti atau ikon.",
+ "name": "Nama avatar",
+ "member": "Avatar anggota",
+ "workspace": "Ikon ruang kerja"
+ },
+ "secret": {
+ "title": "LinearSecretField · Penyuntingan rahasia",
+ "description": "Edit, tampilkan, simpan, dan ganti rahasia; periksa draf setelah penyimpanan gagal.",
+ "options": "configured menunjukkan status tersimpan; onSave menyimpan secara permanen. Callback galeri hanya memperbarui status lokal.",
+ "state": "Status rahasia",
+ "error": "Penyimpanan contoh gagal.",
+ "hint": "Masukkan teks contoh lalu simpan, atau pilih status kesalahan untuk memeriksa apakah draf tetap ada."
+ },
+ "channelHelp": {
+ "title": "LinearHelpContent · Bantuan kanal",
+ "description": "Lihat bantuan kanal di dalam menu tarik-turun asli.",
+ "options": "Konten memakai terjemahan kanal yang sudah ada; pemanggil menyediakan kontainer menu.",
+ "open": "Buka bantuan kanal"
+ },
+ "channel": {
+ "title": "{{channel}} · Pengaturan kanal",
+ "description": "Jelajahi formulir pengaturan kanal asli dan statusnya.",
+ "options": "Memakai registrasi kanal, snapshot kontrak pengaturan Python, dan ChannelSetupSurfaceView produksi. Input, visibilitas kredensial, preset, pemeriksaan, dan sakelar hanya memengaruhi pratinjau ini.",
+ "state": "Status pengaturan kanal",
+ "credentialsError": "Kredensial contoh ditolak. Perbarui nilai pratinjau lalu coba lagi.",
+ "validation": "Konfigurasi pratinjau"
+ },
+ "channelConnect": {
+ "state": "Status koneksi {{channel}}",
+ "error": "Otorisasi sementara tidak tersedia. Coba lagi."
+ },
+ "feishuConnect": {
+ "title": "FeishuConnectFlowView · Otorisasi QR Feishu",
+ "description": "Coba alur QR Feishu asli dengan status menunggu, berhasil, kedaluwarsa, batal, dan kesalahan.",
+ "options": "connect, busy, dan error menyediakan status tampilan; kode QR dibuat secara lokal. Fitur mengelola mulai, batal, dan polling; callback pratinjau hanya mengubah contoh ini."
+ },
+ "feishuAssistants": {
+ "title": "FeishuAssistantsPanelView · Asisten Feishu",
+ "description": "Jelajahi kartu asisten, status eksekusi dan otorisasi, sakelar, pengaturan lanjutan, dan penambahan asisten.",
+ "options": "feature dan instances menyediakan snapshot asisten. Tampilan mengelola draf dan hasil penyimpanan; onToggleInstance, onSaveInstance, dan renderConnectFlow menghubungkan tindakan runtime.",
+ "state": "Status eksekusi asisten",
+ "error": "Asisten berhenti. Periksa kredensial sebelum memulainya kembali.",
+ "on": "{{name}}: aktif",
+ "off": "{{name}}: nonaktif",
+ "saved": "{{name}}: kolom pratinjau tersimpan: {{amount}}"
+ },
+ "whatsappConnect": {
+ "title": "WhatsAppConnectFlowView · Penautan perangkat WhatsApp",
+ "description": "Bandingkan penautan otomatis, berhasil, kedaluwarsa, dan kesalahan; coba tautkan akun lain.",
+ "options": "Tampilan mempertahankan aturan mulai otomatis dan tata letak minimal. Pemanggil mengontrol status dan percobaan ulang. Titik masuk koneksi nyata menangani mulai otomatis, percobaan paksa, dan polling."
+ },
+ "linearPanel": {
+ "title": "LinearPanelView · Pengaturan Linear",
+ "description": "Jelajahi detail aplikasi, rahasia, opsi lanjutan, ruang kerja, akses anggota, dan otorisasi web.",
+ "options": "state dan workspaces menyediakan snapshot; callback menghubungkan tindakan ruang kerja, penyimpanan, dan MCP. Tiga slot menyusun tampilan anggota, otorisasi, dan pengaturan ulang yang dipakai di produksi.",
+ "state": "Status pengaturan Linear",
+ "runtimeError": "Webhook Linear tidak dapat dimulai.",
+ "saveError": "Pengaturan tidak dapat disimpan. Draf Anda tetap disimpan.",
+ "inspectionError": "Ruang kerja yang terhubung tidak dapat diperiksa.",
+ "refreshed": "Ruang kerja contoh disegarkan.",
+ "removed": "Ruang kerja contoh dihapus: {{name}}",
+ "mcp": "Pengaturan Linear MCP dipilih."
+ },
+ "linearMembers": {
+ "title": "LinearMemberAccessView · Akses anggota",
+ "description": "Cari anggota, ubah akses, dan bandingkan pemuatan, kosong, penyimpanan, serta belum dikonfirmasi.",
+ "options": "snapshot berisi status anggota yang telah dikonfirmasi. onLoad dan onSetAllowed ditangani titik masuk kanal; gateway tetap memvalidasi izin.",
+ "state": "Status anggota",
+ "loadError": "Direktori anggota tidak tersedia.",
+ "saveError": "Akses belum dikonfirmasi."
+ },
+ "linearConnect": {
+ "title": "LinearConnectFlowView · Otorisasi Linear",
+ "description": "Coba otorisasi peramban dan pemberitahuan menunggu dengan tahap mulai, batal, berhasil, dan gagal.",
+ "options": "Memakai ulang ChannelQrConnectFlowView. Linear menyediakan tampilan, label, dan penanganan fokus; titik masuk runtime menangani pembuatan sesi dan polling.",
+ "state": "Tahap otorisasi",
+ "error": "Otorisasi tidak dapat diselesaikan.",
+ "hint": "Tautan otorisasi dan ruang kerja hanyalah contoh. Mulai dan Batal hanya mengubah tahap pratinjau."
+ },
+ "linearReset": {
+ "title": "LinearResetConnectionView · Atur ulang koneksi",
+ "description": "Tinjau data yang dihapus atau dipertahankan, status sibuk, dan percobaan ulang setelah pengaturan ulang sebagian.",
+ "options": "onReset menjalankan seluruh transaksi pencabutan dan pembersihan. Tampilan mengelola konfirmasi, kesalahan, pembatasan penutupan, dan pemulihan fokus.",
+ "state": "Hasil pengaturan ulang",
+ "error": "Kanal tidak dapat dihentikan. Pengaturan aplikasi dipertahankan.",
+ "completed": "Ruang kerja dan pengaturan aplikasi pratinjau telah dihapus."
+ },
+ "weixinPanel": {
+ "title": "WeixinPanelView · Pengaturan Weixin",
+ "description": "Jelajahi pengaturan, opsi lanjutan, hasil penyimpanan, dan pemulihan login kedaluwarsa.",
+ "options": "Kolom berasal dari kontrak pengaturan kanal. Tampilan mengatur perluasan dan visibilitas rahasia; titik masuk runtime menangani simpan otomatis, penggabungan draf, dan pemulihan login.",
+ "state": "Status panel Weixin"
+ },
+ "weixinConnect": {
+ "title": "WeixinConnectFlowView · QR dan verifikasi Weixin",
+ "description": "Bandingkan pemindaian QR, kode verifikasi, keberhasilan, kedaluwarsa, pembatalan, dan kesalahan koneksi.",
+ "options": "Tampilan menerima snapshot koneksi dan callback, sambil mempertahankan draf kode verifikasi. Kode QR dibuat di peramban. Titik masuk nyata menangani otorisasi, jeda polling, penyegaran, dan pembatalan.",
+ "state": "Status koneksi Weixin",
+ "error": "Koneksi terputus. Coba lagi.",
+ "refreshed": "Kode QR pratinjau baru ditampilkan.",
+ "hint": "Masukkan 123456 untuk menyelesaikan pratinjau verifikasi. Input lain mempertahankan draf dan menampilkan kesalahan."
+ }
+}
diff --git a/webui/src/dev/gallery/locales/previews/ja.json b/webui/src/dev/gallery/locales/previews/ja.json
new file mode 100644
index 000000000..b85ab0583
--- /dev/null
+++ b/webui/src/dev/gallery/locales/previews/ja.json
@@ -0,0 +1,444 @@
+{
+ "rename": {
+ "title": "RenameDialog · グループとプロジェクトの名前変更",
+ "description": "グループとプロジェクトの名前変更を試せます。トピック名はチャット一覧内で変更します。",
+ "options": "呼び出し元が dialogTitle、description、placeholder を渡します。title が初期値になり、onConfirm は前後の空白を除いた名前を受け取ります。空の名前は保存できません。",
+ "hint": "保存すると上の名前が更新されます。"
+ },
+ "delete": {
+ "title": "DeleteConfirm · 削除の確認",
+ "description": "単一、複数、自動化タスク付きチャットの削除確認を比較できます。",
+ "options": "count が一括削除の文言を制御します。automations は関連タスク、スケジュール、次回実行日時を表示します。確認すると onConfirm を呼び出します。",
+ "scenario": "削除のシナリオ",
+ "open": "削除確認を開く",
+ "confirmed": "サンプルの削除を確認しました。",
+ "hint": "単一、複数、または自動化タスク付きのチャットを選択してください。"
+ },
+ "inlineTokens": {
+ "title": "Inline tokens · コマンドとセッション識別子",
+ "description": "コマンドや識別子を編集して、強調表示とセッション固有の色を確認できます。",
+ "options": "SlashCommandText は command、InlineTokenHighlight は color と内容を受け取ります。SessionHandleLabel は id から色を決定します。",
+ "command": "コマンドのテキスト",
+ "run": "<command/> を実行して状態を確認します。",
+ "handle": "セッション識別子",
+ "continue": "<session/> で作業を続けます。",
+ "highlight": "共通の強調表示",
+ "review": "<skill/> で変更を確認します。",
+ "skill": "スキル:{{name}}"
+ },
+ "sessionLinks": {
+ "selected": "選択したセッション:{{name}}。",
+ "hint": "セッションへのメンションを選択すると結果が表示されます。"
+ },
+ "userText": {
+ "title": "UserMessageText · メッセージ内のメンション",
+ "description": "スキル、アプリ、MCP、セッションへのメンションを含むメッセージを編集できます。",
+ "options": "text は元のメッセージです。cliApps、mcpPresets、sessionMentions でメンションを解決します。スキルは $name、その他は @name を使います。",
+ "message": "メッセージのテキスト"
+ },
+ "capabilityTokens": {
+ "title": "CapabilityMentionToken · アプリのメンション",
+ "description": "入力欄とメッセージでアプリ、MCP、セッションのメンション表示を比較できます。",
+ "options": "segment は cli、mcp、session とそのメタデータを指定します。variant で composer または message を選びます。サンプルはローカルのブランド画像を使います。",
+ "position": "メンションの表示場所"
+ },
+ "productIcons": {
+ "title": "Product icons · 製品アイコン",
+ "description": "アイコンを閲覧し、サイズを変えたり選択したりできます。",
+ "options": "アイコンは size、strokeWidth、className などの LucideProps を受け取ります。色は currentColor を継承し、ボタンにはアクセシブルな操作名があります。",
+ "size": "アイコンのサイズ",
+ "selected": "選択中:{{name}}"
+ },
+ "startup": {
+ "title": "StartupShell · 起動時のプレースホルダー",
+ "description": "アプリの接続中に表示する控えめなレイアウトを確認できます。",
+ "options": "embedded では section、それ以外では main を使います。aria-busy と読み込み状態を常に提供します。スタイルはアプリのエントリーから読み込みます。"
+ },
+ "fileActions": {
+ "title": "FileActions · ファイルメニュー",
+ "description": "右クリックして絶対パス、相対パス、参照テキストをコピーできます。",
+ "options": "path は参照テキストです。metadata が絶対パスと任意の相対パスを提供します。ギャラリーはファイルを読み込まずにメタデータを渡します。",
+ "scope": "ファイルの範囲",
+ "hint": "右クリックでコピーメニューを開くか、ファイルにフォーカスして Shift+F10 を押してください。"
+ },
+ "webLinks": {
+ "title": "Web links · リンクメニュー",
+ "description": "実際のリンクメニューでメッセージのリンクを選び、アドレスをコピーできます。",
+ "options": "WebLink はリンク属性を受け取ります。useMessageWebLinks は表示済みのリンクを収集します。MessageLinksMenu は項目と戻る・閉じるコールバックを受け取り、expanded が幅を制御します。リンク先はすべてローカルのギャラリー素材です。",
+ "width": "リンクメニューの幅",
+ "message": "<gallery>コンポーネントギャラリー</gallery>と<brand>ブランド画像</brand>を表示します。",
+ "close": "リンクメニューを閉じる",
+ "open": "メッセージのリンクを見る",
+ "hint": "リンクを右クリックするとアドレスをコピーできます。メニューは表示済みメッセージからリンクを収集します。"
+ },
+ "workbench": {
+ "title": "PaneWorkbench · 複数ペイン",
+ "description": "レイアウトの切り替え、ペインの選択・追加、移動やサイズ変更を試せます。",
+ "options": "呼び出し元が panes、activePaneKey、layout、splitRatios を制御します。renderPane が内容を提供し、コールバックがローカル状態を更新します。狭い画面では選択中のペインを表示します。",
+ "layout": "ペインのレイアウト",
+ "limit": "ペインは最大4つです",
+ "notes": "{{title}}のメモ",
+ "active": "選択中のペイン",
+ "activate": "このペインを選択して有効にする",
+ "hint": "選択中:{{title}}。下部のハンドルをドラッグして移動し、境界をドラッグしてサイズを変更します。"
+ },
+ "hostConnection": {
+ "title": "HostConnectionStatus · 接続状態",
+ "description": "接続済み、切断、接続中、エラーの状態を比較できます。",
+ "options": "state がアイコンとテキストを制御します。compact は表示テキストを隠し、アクセシブルな状態とツールチップを残します。",
+ "state": "接続状態",
+ "withText": "テキスト付きの状態",
+ "compact": "コンパクト表示"
+ },
+ "compatibility": {
+ "title": "HostCompatibilityDialog · バージョン互換性",
+ "description": "各互換性結果のバージョン、事前準備、更新ガイドを確認できます。",
+ "options": "profile を渡すとダイアログが開き、compatibility が結果とバージョンを提供します。onClose で閉じます。このコンポーネントは情報の表示のみを行います。",
+ "state": "バージョンの互換性",
+ "open": "互換性の詳細を見る"
+ },
+ "composer": {
+ "title": "ThreadComposer · メッセージ入力",
+ "description": "送信、添付、コマンド、引用と、処理中・無効の状態を試せます。",
+ "options": "onSend が成功すると入力を消去します。isStreaming が停止と待機列、variant がチャットとホームのスタイルを制御します。送信内容はこのプレビュー内に保持します。",
+ "statusCommand": "セッションの状態",
+ "statusDescription": "現在のセッション状態を表示",
+ "compactCommand": "コンテキストを圧縮",
+ "compactDescription": "現在のセッションのコンテキストを圧縮",
+ "helpCommand": "コマンドのヘルプ",
+ "helpDescription": "使用可能なコマンドを表示",
+ "state": "入力状態",
+ "addQuote": "引用を追加",
+ "input": "サンプルメッセージ",
+ "placeholder": "メッセージを入力、または / でコマンドを表示",
+ "stopped": "サンプルタスクを停止しました。",
+ "sent": "送信内容:{{content}}{{attachments}}",
+ "attachments": " · 添付数:{{amount}}",
+ "hint": "メッセージの送信、添付の選択、モデルの切り替え、コマンドメニューを試してください。"
+ },
+ "modelPreset": {
+ "title": "ModelPresetBadge · モデルプリセット",
+ "description": "モデルメニュー、キーボード操作、未設定の状態を試せます。",
+ "options": "modelPresets がプリセットを提供し、modelPreset と onPresetChange が選択を制御します。needsSetup は設定への入口を表示します。",
+ "state": "モデルコントロールの状態",
+ "manage": "モデル管理を開きました。",
+ "settings": "モデル設定を開きました。",
+ "hint": "現在のプリセット:{{preset}}。メニューを開くか矢印キーで切り替えてください。"
+ },
+ "usage": {
+ "title": "ComposerUsagePopover · コンテキスト使用量",
+ "description": "コンテキスト、キャッシュ、生成時間を警告状態やボトムシートで確認できます。",
+ "options": "context が容量、rounds が各ターンの統計を提供します。bottomSheet はモバイル用パネルを選択します。",
+ "state": "使用量の状態",
+ "hint": "使用量の詳細を開くと、コンテキスト、キャッシュ、各ターンの生成時間を確認できます。"
+ },
+ "workspace": {
+ "title": "WorkspaceControls · 作業ディレクトリ",
+ "description": "サンプルプロジェクトとアクセスモードを選択できます。",
+ "options": "scope と onChange が選択を制御し、onLoadProjects がサンプルディレクトリを提供します。実際のパス解決と権限制御はゲートウェイが行います。",
+ "state": "作業ディレクトリの状態"
+ },
+ "navigator": {
+ "title": "PromptNavigator · 質問ナビゲーション",
+ "description": "過去の質問を検索し、移動コールバックを確認できます。",
+ "options": "messages が全メッセージを提供し、コンポーネントがユーザーの質問を抽出します。onJumpToPrompt は対象メッセージの ID を受け取ります。",
+ "hint": "質問ナビゲーションを開き、質問を検索して選択してください。",
+ "empty": "質問はまだ選択されていません"
+ },
+ "header": {
+ "title": "ThreadHeader · チャットヘッダー",
+ "description": "サイドバー、テーマ、一時チャット、質問ナビゲーションを試せます。",
+ "options": "title、handle、theme、temporaryChatEnabled が表示状態を提供します。操作はコールバックで呼び出し元に渡します。",
+ "jump": "{{id}} に移動しました",
+ "sidebar": "サイドバーを切り替えました",
+ "hint": "ヘッダーの操作を試してください",
+ "temporary": "一時チャット",
+ "regular": "通常のチャット"
+ },
+ "messages": {
+ "title": "ThreadMessages · メッセージ一覧",
+ "description": "複数ターンの会話、メニュー、分岐、選択テキストの引用を試せます。",
+ "options": "messages は投影済みメッセージです。onForkFromMessage は質問のインデックス、onQuoteSelection は選択した回答テキストを受け取ります。",
+ "quoted": "引用:{{text}}",
+ "forked": "質問 {{index}} から分岐を作成しました",
+ "hint": "メッセージメニューを開くか、回答のテキストを選択して引用してください。"
+ },
+ "viewport": {
+ "title": "ThreadViewport · チャットのスクロール",
+ "description": "長い会話をスクロールし、質問マーカーや移動、最下部への復帰を試せます。",
+ "options": "プレビューの高さは固定です。messages が履歴を提供し、ref.jumpToUserPrompt が質問に移動します。emptyState が空のチャット内容を提供します。",
+ "state": "チャット表示",
+ "empty": "メッセージを入力してチャットを開始",
+ "hint": "スクロールで質問マーカーを確認するか、ナビゲーションで移動して最下部に戻ってください。"
+ },
+ "history": {
+ "title": "ThreadHistoryStatus · 履歴の状態",
+ "description": "読み込み中、履歴の先頭、エラーと再試行の状態を表示します。",
+ "options": "loading はリクエスト中、exhausted はそれ以前のメッセージがない状態を示し、error はエラー情報を渡します。onRetry で読み込みを再試行します。",
+ "state": "履歴の状態",
+ "error": "サンプル履歴を利用できません。",
+ "retries": "再試行回数:{{amount}}"
+ },
+ "recovery": {
+ "title": "RecoveryNotice · タスクの復旧",
+ "description": "中断、再開中、失敗、続行不可の状態と、続行・閉じる操作を試せます。",
+ "options": "state が復旧状態を提供します。onContinue と onDismiss は Promise を返します。サンプルのコールバックはプレビューのみ更新します。",
+ "state": "復旧状態",
+ "continued": "サンプルタスクを続行しました。",
+ "dismissed": "復旧の通知を閉じました。",
+ "reset": "プレビューをリセット",
+ "hint": "復旧状態を選び、続行または閉じる操作を試してください。"
+ },
+ "fallback": {
+ "title": "ModelFallbackNotice · 代替モデル",
+ "description": "代替モデルや認証期限切れの通知、設定と閉じる操作を確認できます。",
+ "options": "model は代替モデルを指定し、reauthProviderLabel は認証期限切れの対象を表示します。onOpenSettings と onDismiss は呼び出し元が提供します。",
+ "state": "代替モデルの状態",
+ "showAgain": "再表示",
+ "hint": "モデル設定へのリンクと閉じるボタンを試してください。"
+ },
+ "compaction": {
+ "title": "ContextCompactionNotice · コンテキスト圧縮",
+ "description": "圧縮の開始、成功、失敗、キャンセルの表示を比較できます。",
+ "options": "compaction.phase が通知を決定し、announce がスクリーンリーダーの読み上げを制御します。",
+ "phase": "コンテキスト圧縮の段階"
+ },
+ "streamError": {
+ "title": "StreamErrorNotice · メッセージエラー",
+ "description": "サイズ、ディレクトリ権限、ターン拒否、モデルリクエストのエラーを比較できます。",
+ "options": "error.kind がエラー文言を決定し、onDismiss が通知を閉じます。",
+ "kind": "メッセージエラーの種類"
+ },
+ "cluster": {
+ "title": "AgentActivityCluster · アクティビティ全体",
+ "description": "推論とツールの記録を実行中、完了、失敗の状態で確認できます。",
+ "options": "messages は reasoning と trace の投影を含みます。isTurnStreaming が活動状態を制御し、expanded は呼び出し元で制御できます。",
+ "state": "アクティビティの状態",
+ "error": "ファイルを読み取れませんでした。"
+ },
+ "search": {
+ "title": "WebSearchRun · 検索アクティビティ",
+ "description": "ウェブ検索と X 検索の進行状況や情報源を確認できます。",
+ "options": "run が query、target、status、sources を提供し、turnActive が実行中の効果を制御します。情報源のアイコンは共通コンポーネントが読み込みます。",
+ "state": "検索状態",
+ "source": "検索元"
+ },
+ "responseSources": {
+ "title": "FallbackResponseSources · 応答の情報源",
+ "description": "過去の応答で使った代替プリセット、モデル、プロバイダーを確認できます。",
+ "options": "sources は応答時点のモデル情報を保持します。fallback が true の情報源だけにバッジを表示します。",
+ "hint": "代替モデルのバッジを選択すると、その応答のプリセット、モデル、プロバイダーを確認できます。"
+ },
+ "filePreview": {
+ "title": "FilePreviewPanelView · ファイル内容",
+ "description": "テキスト、画像、省略、読み込み、エラーを比較できます。画像を選択すると拡大します。",
+ "options": "state は表示状態を提供し、path はファイルの種類と名前を決定します。画像の表示・エラーコールバックがプレビューを更新します。",
+ "state": "ファイルプレビューの状態"
+ },
+ "webPreview": {
+ "title": "WebPreviewPanelView · ウェブ内容",
+ "description": "タイトルバー、隔離の説明、各種制限を確認し、ローカル文書を更新できます。",
+ "options": "ランタイムが restriction を決めてから内容を渡します。children が内容を提供し、onRefresh が更新を要求します。この iframe はローカルの srcDoc を使います。",
+ "state": "ウェブプレビューの状態",
+ "frame": "ローカルのサンプルページ",
+ "refreshes": "更新回数:{{amount}}"
+ },
+ "session": {
+ "title": "SessionInfoPopoverView · セッションの自動化",
+ "description": "タスクの表示、編集、無効化、削除と読み込み・エラー状態を試せます。",
+ "options": "呼び出し元が jobs、loading、loadFailed、now を提供します。onAction と onEdit は更新済みタスクを返し、ビューがダイアログ、フォーカス、結果表示を管理します。",
+ "state": "セッション自動化の状態",
+ "saveError": "サンプルの保存に失敗しました。再試行してください。",
+ "providerError": "サンプルプロバイダーを利用できません。",
+ "saved": "自動化タスクを保存しました。",
+ "openedChat": "サンプルチャットを開きました。",
+ "openedCalendar": "自動化カレンダーを開きました。",
+ "actionError": "サンプルの操作に失敗しました。再試行してください。",
+ "delete": "削除しました:{{name}}",
+ "run": "実行を要求しました:{{name}}",
+ "enable": "有効にしました:{{name}}",
+ "disable": "無効にしました:{{name}}",
+ "hint": "セッションの詳細を開き、自動化タスクの表示、切り替え、編集、削除を試してください。"
+ },
+ "subagent": {
+ "title": "SubagentThreadView · サブエージェントのメッセージ",
+ "description": "メッセージ、推論、読み込み、失敗の表示と再試行を確認できます。",
+ "options": "messages はランタイムが投影します。loading と error は共通の履歴状態表示を使用し、isStreaming と activeTurnId が活動を指定します。ビューは履歴を取得しません。",
+ "state": "サブエージェントのチャット状態"
+ },
+ "pairRoute": {
+ "title": "PairRouteSettingsView · ペアリング経路",
+ "description": "経路を選択してローカル保存し、保存中や更新失敗などを比較できます。",
+ "options": "呼び出し元が route と original を管理し、routes が SSH 経路を提供します。保存成功とディレクトリ更新失敗を別々に表示します。ギャラリーと設定は同じビューを使います。",
+ "state": "経路の状態"
+ },
+ "quickPair": {
+ "title": "QuickPairSetupView · クイックペアリング",
+ "description": "招待のコピー、応答コード入力、アクセス確認、既存ホストと再試行を試せます。",
+ "options": "state がペアリングと表示状態を提供し、コールバックが操作を実行します。routeSettings は経路設定を組み込みます。ギャラリーはサンプルとローカル処理を使い、実際のペアリングは QuickPairSetup が管理します。",
+ "state": "ペアリングの段階",
+ "open": "クイックペアリングを開く",
+ "connected": "選択した接続:{{name}}。",
+ "ssh": "SSH 接続を選択しました。",
+ "hint": "サンプルの招待と応答コードは表示専用です。確認操作はローカルの結果表示を更新します。"
+ },
+ "sshHost": {
+ "title": "SSHHostPickerView · SSH アドレス",
+ "description": "SSH エイリアスの絞り込み、矢印キー選択、取り込みや読み込み状態を試せます。",
+ "options": "discovery が現在の設定からホストを提供します。呼び出し元が value、busy、error、コールバックを制御します。customConfig はカスタム設定のエイリアス検出を維持し、inputRef は選択後のフォーカスに使います。",
+ "state": "SSH アドレスの状態",
+ "refreshed": "サンプルアドレスを更新しました。",
+ "entered": "入力内容:{{value}}",
+ "hint": "入力してアドレスを絞り込み、矢印キーで SSH エイリアスを選択してください。"
+ },
+ "connectionBadge": {
+ "title": "ConnectionBadge · 接続インジケーター",
+ "description": "接続状態ごとの色、アニメーション、アクセシブルなテキストを確認できます。",
+ "options": "呼び出し元が status を渡します。接続の購読はページコンテナが管理します。",
+ "state": "接続状態",
+ "idle": "待機中",
+ "connecting": "接続中",
+ "open": "接続済み",
+ "reconnecting": "再接続中",
+ "closed": "切断済み",
+ "error": "接続エラー"
+ },
+ "hostPicker": {
+ "title": "HostSwitcherView · ホストメニュー",
+ "description": "ローカルやサンプルホストを選び、接続待ち、オフライン、折りたたみを比較できます。",
+ "options": "picker がホスト情報とコールバック、status が現在の接続状態を提供します。本番の HostSwitcher がクライアントを購読します。",
+ "state": "ホストメニューの状態",
+ "offline": "サンプルホストは切断されています。",
+ "manage": "接続管理を開きました。",
+ "cancelled": "サンプルホストの切り替えをキャンセルしました。",
+ "selected": "プレビューのホスト:{{name}}"
+ },
+ "chats": {
+ "title": "ChatList · チャット一覧",
+ "description": "チャットを選び、メニューから固定、アーカイブ、削除を試せます。",
+ "options": "呼び出し元が sessions、activeKey、固定・アーカイブのキーを提供します。操作コールバックがサンプル一覧を更新します。",
+ "state": "チャット一覧の状態",
+ "renamed": "名前を変更しました:{{name}}",
+ "selected": "選択したチャット:{{name}}",
+ "none": "なし"
+ },
+ "sidebarResize": {
+ "title": "SidebarResizeHandle · サイドバーのサイズ",
+ "description": "マウスやキーボードでサイドバーのサイズ変更、折りたたみ、展開を試せます。",
+ "options": "width と open は制御状態です。onResize がサイズと展開状態を更新し、onDraggingChange がドラッグ状態を通知します。",
+ "content": "サイドバーの内容",
+ "hint": "境界をドラッグするか、フォーカスして矢印キー、Home、End、Enter を使ってください。",
+ "collapsed": "折りたたみ済み",
+ "dragging": "ドラッグ中"
+ },
+ "language": {
+ "title": "LanguageSwitcher · 表示言語",
+ "description": "ギャラリーと本番コンポーネントの表示言語を切り替えます。",
+ "options": "アプリの i18n とブラウザーの言語設定を使い、ゲートウェイは不要です。上部の言語選択も同じコンポーネントです。"
+ },
+ "channelMarks": {
+ "title": "Channel marks · チャンネル識別",
+ "description": "画像がない場合のアバター、ワークスペースアイコン、WebSocket マークを確認できます。",
+ "options": "LinearAvatar は name、url、workspace を受け取ります。有効な画像がない場合は代替テキストやアイコンを表示します。",
+ "name": "アバター名",
+ "member": "メンバーアバター",
+ "workspace": "ワークスペースアイコン"
+ },
+ "secret": {
+ "title": "LinearSecretField · シークレット編集",
+ "description": "編集、表示、保存、置換と、保存失敗時の下書き保持を確認できます。",
+ "options": "configured が保存済み状態を示し、onSave が永続化します。ギャラリーのコールバックはローカル状態のみ更新します。",
+ "state": "シークレットの状態",
+ "error": "サンプルの保存に失敗しました。",
+ "hint": "サンプルを入力して保存するか、エラー状態に切り替えて下書きの保持を確認してください。"
+ },
+ "channelHelp": {
+ "title": "LinearHelpContent · チャンネルヘルプ",
+ "description": "実際のドロップダウン内でチャンネルのヘルプを表示します。",
+ "options": "内容はチャンネルの既存翻訳を使い、呼び出し元がメニューのコンテナを提供します。",
+ "open": "チャンネルヘルプを開く"
+ },
+ "channel": {
+ "title": "{{channel}} · チャンネル設定",
+ "description": "実際のチャンネル設定フォームと各状態を確認できます。",
+ "options": "チャンネル登録、Python 設定契約のスナップショット、本番の ChannelSetupSurfaceView を使います。入力、認証情報の表示、プリセット、確認、切り替えはこのプレビューだけを変更します。",
+ "state": "チャンネル設定の状態",
+ "credentialsError": "サンプル認証情報が拒否されました。プレビューの値を更新して再試行してください。",
+ "validation": "プレビュー設定"
+ },
+ "channelConnect": {
+ "state": "{{channel}} の接続状態",
+ "error": "認証を一時的に利用できません。再試行してください。"
+ },
+ "feishuConnect": {
+ "title": "FeishuConnectFlowView · Feishu QR 認証",
+ "description": "実際の QR 認証画面で待機、成功、期限切れ、キャンセル、エラーを試せます。",
+ "options": "connect、busy、error が表示状態を提供し、QR コードはローカル生成します。開始、キャンセル、ポーリングは機能の入口が担当し、サンプルは現在の表示のみ変更します。"
+ },
+ "feishuAssistants": {
+ "title": "FeishuAssistantsPanelView · Feishu アシスタント",
+ "description": "アシスタントカード、動作・認証状態、詳細設定、追加を試せます。",
+ "options": "feature と instances が状態を提供します。ビューが下書きと保存結果を管理し、onToggleInstance、onSaveInstance、renderConnectFlow がランタイム操作につなぎます。",
+ "state": "アシスタントの動作状態",
+ "error": "アシスタントが停止しました。認証情報を確認してから再起動してください。",
+ "on": "{{name}}:オン",
+ "off": "{{name}}:オフ",
+ "saved": "{{name}}:プレビューの {{amount}} 項目を保存しました"
+ },
+ "whatsappConnect": {
+ "title": "WhatsAppConnectFlowView · WhatsApp デバイス連携",
+ "description": "簡潔な QR 画面で自動接続、成功、期限切れ、エラーと別アカウントの連携を試せます。",
+ "options": "ビューは自動開始と最小レイアウトの表示規則を維持します。状態と再試行は呼び出し元が制御し、実際の自動開始、強制再試行、ポーリングは接続機能の入口が担当します。"
+ },
+ "linearPanel": {
+ "title": "LinearPanelView · Linear 設定",
+ "description": "アプリ情報、シークレット、詳細設定、ワークスペース、メンバー権限、ブラウザー認証を確認できます。",
+ "options": "state と workspaces が状態を提供し、コールバックがワークスペース、保存、MCP 操作を接続します。3つのスロットで本番のメンバー、認証、リセットのビューを組み合わせます。",
+ "state": "Linear 設定の状態",
+ "runtimeError": "Linear webhook を開始できませんでした。",
+ "saveError": "設定を保存できませんでした。下書きは保持されています。",
+ "inspectionError": "接続済みワークスペースを確認できませんでした。",
+ "refreshed": "サンプルワークスペースを更新しました。",
+ "removed": "サンプルワークスペースを削除しました:{{name}}",
+ "mcp": "Linear MCP の設定を選択しました。"
+ },
+ "linearMembers": {
+ "title": "LinearMemberAccessView · メンバーのアクセス",
+ "description": "メンバーの検索、権限変更、読み込み、空、保存、未確認の状態を比較できます。",
+ "options": "snapshot は確認済みのメンバー状態です。onLoad と onSetAllowed はチャンネルの入口に渡し、権限の検証は引き続きゲートウェイが担当します。",
+ "state": "メンバーの状態",
+ "loadError": "メンバー一覧を利用できません。",
+ "saveError": "アクセス権を確認できませんでした。"
+ },
+ "linearConnect": {
+ "title": "LinearConnectFlowView · Linear 認証",
+ "description": "ブラウザー認証の開始、待機、キャンセル、成功、失敗を試せます。",
+ "options": "ChannelQrConnectFlowView を再利用します。Linear が認証表示、ラベル、フォーカス処理を提供し、セッション作成とポーリングはランタイムの入口が担当します。",
+ "state": "認証の段階",
+ "error": "認証を完了できませんでした。",
+ "hint": "認証リンクとワークスペースはサンプルです。開始とキャンセルはプレビューの段階のみ変更します。"
+ },
+ "linearReset": {
+ "title": "LinearResetConnectionView · 接続のリセット",
+ "description": "削除・保持する内容、処理中、部分完了後の再試行を確認できます。",
+ "options": "onReset が失効とクリーンアップの全処理を実行します。ビューは確認、エラー、閉じる操作の制限、フォーカスの復元を管理します。",
+ "state": "リセット結果",
+ "error": "チャンネルを停止できませんでした。アプリ設定は保持されています。",
+ "completed": "プレビューのワークスペースとアプリ設定を消去しました。"
+ },
+ "weixinPanel": {
+ "title": "WeixinPanelView · Weixin 設定",
+ "description": "設定、詳細項目、保存結果、ログイン期限切れからの復旧を確認できます。",
+ "options": "項目はチャンネルの設定契約から取得します。ビューは展開とシークレット表示を管理し、ランタイムは自動保存、下書きの統合、ログイン復旧を担当します。",
+ "state": "Weixin パネルの状態"
+ },
+ "weixinConnect": {
+ "title": "WeixinConnectFlowView · Weixin QR と確認コード",
+ "description": "QR スキャン、確認コード、成功、期限切れ、キャンセル、接続エラーを比較できます。",
+ "options": "ビューは接続状態とコールバックを受け取り、確認コードの下書きを保持します。QR コードはブラウザーで生成します。実際の認証、ポーリング停止、更新、キャンセルは機能の入口が担当します。",
+ "state": "Weixin の接続状態",
+ "error": "接続が中断されました。再試行してください。",
+ "refreshed": "新しいプレビュー用 QR コードを表示しました。",
+ "hint": "確認コードのプレビューに 123456 を入力すると接続が完了します。それ以外では下書きを保持してエラーを表示します。"
+ }
+}
diff --git a/webui/src/dev/gallery/locales/previews/ko.json b/webui/src/dev/gallery/locales/previews/ko.json
new file mode 100644
index 000000000..9b4d46ecc
--- /dev/null
+++ b/webui/src/dev/gallery/locales/previews/ko.json
@@ -0,0 +1,444 @@
+{
+ "rename": {
+ "title": "RenameDialog · 그룹 및 프로젝트 이름 변경",
+ "description": "그룹과 프로젝트의 이름 변경을 시험합니다. 주제 이름은 채팅 목록에서 바로 바꿉니다.",
+ "options": "호출자가 dialogTitle, description, placeholder를 제공합니다. title은 초기값이며 onConfirm은 양끝 공백을 제거한 이름을 받습니다. 빈 이름은 저장할 수 없습니다.",
+ "hint": "저장하면 위의 제목이 바뀝니다."
+ },
+ "delete": {
+ "title": "DeleteConfirm · 삭제 확인",
+ "description": "단일 채팅, 여러 채팅, 자동화가 연결된 채팅의 삭제를 비교합니다.",
+ "options": "count는 일괄 삭제 문구를 제어합니다. automations는 연결된 작업, 일정, 다음 실행 시간을 표시합니다. 확인하면 onConfirm을 호출합니다.",
+ "scenario": "삭제 시나리오",
+ "open": "삭제 확인 열기",
+ "confirmed": "예제 삭제를 확인했습니다.",
+ "hint": "단일 채팅, 여러 채팅 또는 자동화가 있는 채팅을 선택하세요."
+ },
+ "inlineTokens": {
+ "title": "Inline tokens · 명령과 세션 식별자",
+ "description": "명령과 식별자를 편집하여 강조 표시와 일관된 세션 색상을 확인합니다.",
+ "options": "SlashCommandText는 command를, InlineTokenHighlight는 color와 내용을 받습니다. SessionHandleLabel은 id로 색상을 정합니다.",
+ "command": "명령 텍스트",
+ "run": "<command/> 명령으로 상태를 확인합니다.",
+ "handle": "세션 식별자",
+ "continue": "<session/>에서 작업을 계속합니다.",
+ "highlight": "공통 강조 표시",
+ "review": "<skill/>로 변경 사항을 검토합니다.",
+ "skill": "스킬: {{name}}"
+ },
+ "sessionLinks": {
+ "selected": "선택한 세션: {{name}}.",
+ "hint": "세션 멘션을 선택하여 결과를 확인하세요."
+ },
+ "userText": {
+ "title": "UserMessageText · 메시지 멘션",
+ "description": "스킬, 앱, MCP, 세션 멘션이 있는 메시지를 편집합니다.",
+ "options": "text는 원본 메시지입니다. cliApps, mcpPresets, sessionMentions로 멘션을 해석합니다. 스킬은 $name, 다른 멘션은 @name을 사용합니다.",
+ "message": "메시지 텍스트"
+ },
+ "capabilityTokens": {
+ "title": "CapabilityMentionToken · 앱 멘션",
+ "description": "입력창과 메시지의 앱, MCP, 세션 멘션을 비교합니다.",
+ "options": "segment는 cli, mcp 또는 session과 메타데이터를 지정합니다. variant는 composer 또는 message를 선택합니다. 예제는 로컬 브랜드 이미지를 사용합니다.",
+ "position": "멘션 위치"
+ },
+ "productIcons": {
+ "title": "Product icons · 제품 아이콘",
+ "description": "아이콘을 살펴보고 크기와 선택 상태를 바꿉니다.",
+ "options": "아이콘은 size, strokeWidth, className 등의 LucideProps를 받습니다. 색상은 currentColor를 상속하며 버튼에는 접근 가능한 동작 이름이 있습니다.",
+ "size": "아이콘 크기",
+ "selected": "선택됨: {{name}}"
+ },
+ "startup": {
+ "title": "StartupShell · 시작 대기 화면",
+ "description": "앱이 연결되는 동안 표시되는 차분한 대기 화면을 미리 봅니다.",
+ "options": "embedded는 section을, 그 외에는 main을 렌더링합니다. aria-busy와 로딩 상태를 계속 제공합니다. 대기 화면 스타일은 앱 진입점에서 가져옵니다."
+ },
+ "fileActions": {
+ "title": "FileActions · 파일 메뉴",
+ "description": "파일을 오른쪽 클릭하여 전체 경로, 상대 경로 또는 참조 텍스트를 복사합니다.",
+ "options": "path는 참조 텍스트입니다. metadata는 전체 경로와 선택적인 상대 경로를 제공합니다. 갤러리는 파일을 읽지 않고 메타데이터를 제공합니다.",
+ "scope": "파일 범위",
+ "hint": "오른쪽 클릭으로 복사 메뉴를 열거나 파일에 초점을 두고 Shift+F10을 누르세요."
+ },
+ "webLinks": {
+ "title": "Web links · 링크 메뉴",
+ "description": "실제 링크 메뉴에서 메시지의 링크를 선택하고 주소를 복사합니다.",
+ "options": "WebLink는 링크 속성을 받습니다. useMessageWebLinks는 렌더링된 링크를 수집합니다. MessageLinksMenu는 항목과 뒤로 가기·닫기 콜백을 받고 expanded로 너비를 정합니다. 예제 링크는 모두 로컬 갤러리 리소스로 연결됩니다.",
+ "width": "링크 메뉴 너비",
+ "message": "<gallery>컴포넌트 갤러리</gallery>와 <brand>브랜드 이미지</brand>를 확인하세요.",
+ "close": "링크 메뉴 닫기",
+ "open": "메시지 링크 보기",
+ "hint": "링크를 오른쪽 클릭하면 주소를 복사할 수 있습니다. 메시지 메뉴는 실제 표시된 링크를 수집합니다."
+ },
+ "workbench": {
+ "title": "PaneWorkbench · 여러 창",
+ "description": "레이아웃을 바꾸고 창을 선택하거나 추가하며 위치와 크기를 조절합니다.",
+ "options": "호출자가 panes, activePaneKey, layout, splitRatios를 제어합니다. renderPane이 내용을 제공하며 콜백이 로컬 상태를 갱신합니다. 좁은 화면에는 활성 창을 표시합니다.",
+ "layout": "창 레이아웃",
+ "limit": "최대 4개 창",
+ "notes": "{{title}} 메모",
+ "active": "활성 창",
+ "activate": "이 창을 선택하여 활성화",
+ "hint": "활성 창: {{title}}. 아래 손잡이를 끌어 창을 이동하고 경계를 끌어 크기를 조절하세요."
+ },
+ "hostConnection": {
+ "title": "HostConnectionStatus · 연결 상태",
+ "description": "연결됨, 연결 끊김, 연결 중, 오류 상태를 비교합니다.",
+ "options": "state가 아이콘과 텍스트를 제어합니다. compact는 화면의 텍스트를 숨기되 접근 가능한 상태와 툴팁을 유지합니다.",
+ "state": "연결 상태",
+ "withText": "텍스트와 상태",
+ "compact": "간략 표시"
+ },
+ "compatibility": {
+ "title": "HostCompatibilityDialog · 버전 호환성",
+ "description": "호환성 결과별 버전, 준비 안내, 업그레이드 가이드를 확인합니다.",
+ "options": "profile이 있으면 대화 상자를 열고 compatibility가 결과와 버전을 제공합니다. onClose로 닫습니다. 이 컴포넌트는 정보만 표시합니다.",
+ "state": "버전 호환성",
+ "open": "호환성 세부 정보 보기"
+ },
+ "composer": {
+ "title": "ThreadComposer · 메시지 입력",
+ "description": "메시지, 첨부 파일, 명령, 인용과 처리 중·비활성 상태를 시험합니다.",
+ "options": "onSend가 성공하면 입력을 비웁니다. isStreaming은 중지와 대기열을, variant는 채팅 또는 시작 페이지 스타일을 제어합니다. 제출 내용은 이 미리보기에 남습니다.",
+ "statusCommand": "세션 상태",
+ "statusDescription": "현재 세션 상태 보기",
+ "compactCommand": "컨텍스트 압축",
+ "compactDescription": "현재 세션 컨텍스트 압축",
+ "helpCommand": "명령 도움말",
+ "helpDescription": "사용 가능한 명령 보기",
+ "state": "입력 상태",
+ "addQuote": "인용 추가",
+ "input": "예제 메시지",
+ "placeholder": "메시지를 입력하거나 /로 명령을 확인하세요",
+ "stopped": "예제 작업을 중지했습니다.",
+ "sent": "제출 내용: {{content}}{{attachments}}",
+ "attachments": " · 첨부 파일 수: {{amount}}",
+ "hint": "메시지 제출, 첨부 파일 선택, 모델 전환, 명령 메뉴를 시험해 보세요."
+ },
+ "modelPreset": {
+ "title": "ModelPresetBadge · 모델 프리셋",
+ "description": "모델 메뉴, 키보드 탐색, 설정 필요 상태를 시험합니다.",
+ "options": "modelPresets가 프리셋을 제공하고 modelPreset과 onPresetChange가 선택을 제어합니다. needsSetup은 설정 진입점을 표시합니다.",
+ "state": "모델 컨트롤 상태",
+ "manage": "모델 관리를 열었습니다.",
+ "settings": "모델 설정을 열었습니다.",
+ "hint": "현재 프리셋: {{preset}}. 메뉴를 열거나 방향키로 전환하세요."
+ },
+ "usage": {
+ "title": "ComposerUsagePopover · 컨텍스트 사용량",
+ "description": "컨텍스트, 캐시, 생성 시간과 경고 상태, 하단 패널을 확인합니다.",
+ "options": "context는 용량을, rounds는 턴별 통계를 제공합니다. bottomSheet는 모바일 패널을 선택합니다.",
+ "state": "사용량 상태",
+ "hint": "사용량 세부 정보를 열어 컨텍스트, 캐시, 턴별 생성 시간을 확인하세요."
+ },
+ "workspace": {
+ "title": "WorkspaceControls · 작업 디렉터리",
+ "description": "예제 프로젝트를 고르고 미리보기의 접근 모드를 바꿉니다.",
+ "options": "scope와 onChange가 선택을 제어하고 onLoadProjects가 예제 디렉터리를 제공합니다. 실제 경로 확인과 권한 적용은 게이트웨이가 담당합니다.",
+ "state": "작업 디렉터리 상태"
+ },
+ "navigator": {
+ "title": "PromptNavigator · 질문 탐색",
+ "description": "이전 질문을 검색하고 이동 콜백을 확인합니다.",
+ "options": "messages가 전체 대화를 제공하면 컴포넌트가 사용자 질문을 추출합니다. onJumpToPrompt는 대상 메시지 ID를 받습니다.",
+ "hint": "질문 탐색을 열고 질문을 검색하여 선택하세요.",
+ "empty": "아직 선택한 질문이 없습니다"
+ },
+ "header": {
+ "title": "ThreadHeader · 채팅 헤더",
+ "description": "사이드바, 테마, 임시 채팅, 질문 탐색 컨트롤을 시험합니다.",
+ "options": "title, handle, theme, temporaryChatEnabled가 표시 상태를 제공합니다. 콜백은 동작을 호출자에게 전달합니다.",
+ "jump": "{{id}}(으)로 이동했습니다",
+ "sidebar": "사이드바를 전환했습니다",
+ "hint": "헤더 동작을 시험해 보세요",
+ "temporary": "임시 채팅",
+ "regular": "일반 채팅"
+ },
+ "messages": {
+ "title": "ThreadMessages · 메시지 목록",
+ "description": "여러 턴의 대화, 메시지 메뉴, 분기, 선택 텍스트 인용을 살펴봅니다.",
+ "options": "messages는 투영된 메시지를 담습니다. onForkFromMessage는 사용자 질문 인덱스를, onQuoteSelection은 선택한 응답 텍스트를 받습니다.",
+ "quoted": "인용: {{text}}",
+ "forked": "질문 {{index}}에서 분기를 만들었습니다",
+ "hint": "메시지 메뉴를 열거나 응답 텍스트를 선택한 후 인용을 누르세요."
+ },
+ "viewport": {
+ "title": "ThreadViewport · 채팅 스크롤",
+ "description": "긴 대화의 질문 표시, 탐색 이동, 맨 아래로 돌아가기를 시험합니다.",
+ "options": "미리보기 높이는 고정입니다. messages가 기록을 제공하고 ref.jumpToUserPrompt가 질문으로 이동합니다. emptyState는 빈 채팅 내용을 제공합니다.",
+ "state": "채팅 보기",
+ "empty": "메시지를 입력하여 채팅을 시작하세요",
+ "hint": "스크롤로 질문 표시를 살펴보거나 탐색으로 이동한 후 맨 아래로 돌아가세요."
+ },
+ "history": {
+ "title": "ThreadHistoryStatus · 기록 상태",
+ "description": "로딩, 기록의 시작, 오류와 재시도 상태를 표시합니다.",
+ "options": "loading은 요청 중임을, exhausted는 이전 메시지가 없음을 나타냅니다. error는 오류 정보를 제공하고 onRetry는 로딩을 재시도합니다.",
+ "state": "기록 상태",
+ "error": "예제 기록을 사용할 수 없습니다.",
+ "retries": "재시도 횟수: {{amount}}"
+ },
+ "recovery": {
+ "title": "RecoveryNotice · 작업 복구",
+ "description": "중단, 재개 중, 실패, 계속할 수 없음 상태와 계속·닫기 동작을 시험합니다.",
+ "options": "state는 복구 스냅샷입니다. onContinue와 onDismiss는 Promise를 반환합니다. 예제 콜백은 미리보기만 갱신합니다.",
+ "state": "복구 상태",
+ "continued": "예제 작업을 계속했습니다.",
+ "dismissed": "복구 알림을 닫았습니다.",
+ "reset": "미리보기 초기화",
+ "hint": "복구 상태를 선택한 후 계속하거나 닫아 보세요."
+ },
+ "fallback": {
+ "title": "ModelFallbackNotice · 대체 모델",
+ "description": "대체 모델과 인증 만료 알림, 설정 열기, 닫기를 확인합니다.",
+ "options": "model은 대체 모델을 지정하며 reauthProviderLabel은 만료된 인증 대상을 표시합니다. 호출자가 onOpenSettings와 onDismiss를 제공합니다.",
+ "state": "대체 모델 상태",
+ "showAgain": "다시 표시",
+ "hint": "모델 설정 링크와 닫기 버튼을 시험해 보세요."
+ },
+ "compaction": {
+ "title": "ContextCompactionNotice · 컨텍스트 압축",
+ "description": "압축 시작, 성공, 실패, 취소 상태를 비교합니다.",
+ "options": "compaction.phase가 알림을 선택하고 announce가 스크린 리더 안내를 제어합니다.",
+ "phase": "컨텍스트 압축 단계"
+ },
+ "streamError": {
+ "title": "StreamErrorNotice · 메시지 오류",
+ "description": "메시지 크기, 디렉터리 권한, 턴 거부, 모델 요청 오류를 비교합니다.",
+ "options": "error.kind가 오류 문구를 선택하고 onDismiss가 알림을 닫습니다.",
+ "kind": "메시지 오류 유형"
+ },
+ "cluster": {
+ "title": "AgentActivityCluster · 전체 활동",
+ "description": "추론과 도구 기록의 실행 중, 완료, 실패 상태를 살펴봅니다.",
+ "options": "messages에는 reasoning과 trace 투영이 들어갑니다. isTurnStreaming이 활동 상태를 제어하고 expanded는 호출자가 제어할 수 있습니다.",
+ "state": "활동 상태",
+ "error": "파일을 읽을 수 없습니다."
+ },
+ "search": {
+ "title": "WebSearchRun · 검색 활동",
+ "description": "웹 및 X 검색의 진행 상태와 출처를 확인합니다.",
+ "options": "run은 query, target, status, sources를 제공하고 turnActive가 실행 효과를 제어합니다. 공통 컴포넌트가 출처 사이트 아이콘을 불러옵니다.",
+ "state": "검색 상태",
+ "source": "검색 출처"
+ },
+ "responseSources": {
+ "title": "FallbackResponseSources · 응답 출처",
+ "description": "이전 응답에 사용된 대체 프리셋, 모델, 제공업체를 확인합니다.",
+ "options": "sources는 응답 시점의 모델 스냅샷을 유지합니다. fallback이 true인 출처에만 배지를 표시합니다.",
+ "hint": "대체 모델 배지를 선택하여 응답에 사용된 프리셋, 모델, 제공업체를 확인하세요."
+ },
+ "filePreview": {
+ "title": "FilePreviewPanelView · 파일 내용",
+ "description": "텍스트, 이미지, 잘림, 로딩, 오류를 비교합니다. 이미지를 선택하여 확대하세요.",
+ "options": "state가 표시 스냅샷을 제공하고 path가 파일 형식과 이름을 정합니다. 이미지 열기와 오류 콜백이 미리보기를 갱신합니다.",
+ "state": "파일 미리보기 상태"
+ },
+ "webPreview": {
+ "title": "WebPreviewPanelView · 웹 콘텐츠",
+ "description": "웹 제목 표시줄, 격리 안내, 제한을 확인하고 로컬 문서를 새로 고칩니다.",
+ "options": "런타임이 restriction을 정한 후 내용을 전달합니다. children이 내용을 제공하고 onRefresh가 새로고침을 요청합니다. 이 iframe은 로컬 srcDoc을 사용합니다.",
+ "state": "웹 미리보기 상태",
+ "frame": "로컬 예제 웹페이지",
+ "refreshes": "새로고침 횟수: {{amount}}"
+ },
+ "session": {
+ "title": "SessionInfoPopoverView · 세션 자동화",
+ "description": "작업 조회, 편집, 비활성화, 삭제와 로딩·오류 상태를 시험합니다.",
+ "options": "호출자가 jobs, loading, loadFailed, now를 제공합니다. onAction과 onEdit는 갱신된 작업을 반환하며 뷰가 대화 상자, 초점 복원, 결과 표시를 관리합니다.",
+ "state": "세션 자동화 상태",
+ "saveError": "예제 저장에 실패했습니다. 다시 시도하세요.",
+ "providerError": "예제 제공업체를 사용할 수 없습니다.",
+ "saved": "자동화를 저장했습니다.",
+ "openedChat": "예제 채팅을 열었습니다.",
+ "openedCalendar": "자동화 캘린더를 열었습니다.",
+ "actionError": "예제 동작에 실패했습니다. 다시 시도하세요.",
+ "delete": "삭제됨: {{name}}",
+ "run": "실행 요청됨: {{name}}",
+ "enable": "활성화됨: {{name}}",
+ "disable": "비활성화됨: {{name}}",
+ "hint": "세션 세부 정보를 열어 자동화 조회, 전환, 편집, 삭제를 시험해 보세요."
+ },
+ "subagent": {
+ "title": "SubagentThreadView · 하위 에이전트 메시지",
+ "description": "하위 에이전트의 메시지, 추론, 로딩, 실패와 재시도를 확인합니다.",
+ "options": "런타임이 messages를 투영합니다. loading과 error는 공통 기록 상태 표시를 사용하고, isStreaming과 activeTurnId는 활동을 지정합니다. 뷰는 기록을 가져오지 않습니다.",
+ "state": "하위 에이전트 채팅 상태"
+ },
+ "pairRoute": {
+ "title": "PairRouteSettingsView · 페어링 경로",
+ "description": "경로를 선택해 로컬에 저장하고 저장 중, 오류, 새로고침 실패를 비교합니다.",
+ "options": "호출자가 route와 original을 관리하고 routes가 SSH 경로를 제공합니다. 저장 성공과 디렉터리 새로고침 실패를 따로 표시합니다. 갤러리와 설정이 같은 뷰를 사용합니다.",
+ "state": "경로 상태"
+ },
+ "quickPair": {
+ "title": "QuickPairSetupView · 빠른 페어링",
+ "description": "초대 복사, 응답 코드 입력, 접근 확인, 기존 호스트와 재시도를 시험합니다.",
+ "options": "state가 페어링과 표시 상태를 제공하며 콜백이 동작을 실행합니다. routeSettings는 경로 설정을 구성합니다. 갤러리는 예제와 로컬 콜백을 사용하며 실제 페어링은 QuickPairSetup이 관리합니다.",
+ "state": "페어링 단계",
+ "open": "빠른 페어링 열기",
+ "connected": "선택한 연결: {{name}}.",
+ "ssh": "SSH 연결을 선택했습니다.",
+ "hint": "예제 초대와 응답 코드는 표시용입니다. 확인 동작은 로컬 결과만 갱신합니다."
+ },
+ "sshHost": {
+ "title": "SSHHostPickerView · SSH 주소",
+ "description": "SSH 별칭을 필터링하고 방향키로 선택하며 가져오기, 로딩, 오류를 비교합니다.",
+ "options": "discovery는 현재 설정의 호스트를 제공합니다. 호출자가 value, busy, error, 콜백을 제어합니다. customConfig는 사용자 설정의 별칭 탐색을 유지하고 inputRef는 선택 후 초점을 복원합니다.",
+ "state": "SSH 주소 상태",
+ "refreshed": "예제 주소를 새로 고쳤습니다.",
+ "entered": "입력 내용: {{value}}",
+ "hint": "입력하여 주소를 필터링하고 방향키로 SSH 별칭을 선택하세요."
+ },
+ "connectionBadge": {
+ "title": "ConnectionBadge · 연결 표시기",
+ "description": "연결 색상, 애니메이션, 접근 가능한 상태 텍스트를 비교합니다.",
+ "options": "호출자가 status를 제공합니다. 페이지 컨테이너가 연결 구독을 관리합니다.",
+ "state": "연결 상태",
+ "idle": "대기 중",
+ "connecting": "연결 중",
+ "open": "연결됨",
+ "reconnecting": "재연결 중",
+ "closed": "연결 끊김",
+ "error": "연결 오류"
+ },
+ "hostPicker": {
+ "title": "HostSwitcherView · 호스트 메뉴",
+ "description": "로컬 또는 예제 호스트를 고르고 대기, 오프라인, 접힘 상태를 비교합니다.",
+ "options": "picker는 호스트 데이터와 콜백을, status는 현재 연결 상태를 제공합니다. 실제 HostSwitcher는 클라이언트를 구독합니다.",
+ "state": "호스트 메뉴 상태",
+ "offline": "예제 호스트의 연결이 끊어졌습니다.",
+ "manage": "연결 관리를 열었습니다.",
+ "cancelled": "예제 호스트 전환을 취소했습니다.",
+ "selected": "미리보기 호스트: {{name}}"
+ },
+ "chats": {
+ "title": "ChatList · 채팅 목록",
+ "description": "채팅을 선택하고 메뉴에서 고정, 보관, 삭제를 시험합니다.",
+ "options": "호출자가 sessions, activeKey, 고정 및 보관 키를 제공합니다. 동작 콜백이 예제 목록을 갱신합니다.",
+ "state": "채팅 목록 상태",
+ "renamed": "변경된 이름: {{name}}",
+ "selected": "선택한 채팅: {{name}}",
+ "none": "없음"
+ },
+ "sidebarResize": {
+ "title": "SidebarResizeHandle · 사이드바 크기",
+ "description": "마우스나 키보드로 사이드바 크기를 바꾸고 접거나 펼칩니다.",
+ "options": "width와 open은 제어 상태입니다. onResize는 크기와 펼침 상태를 갱신하며 onDraggingChange는 끌기 상태를 알립니다.",
+ "content": "사이드바 내용",
+ "hint": "구분선을 끌거나 초점을 두고 방향키, Home, End, Enter를 사용하세요.",
+ "collapsed": "접힘",
+ "dragging": "끌기 중"
+ },
+ "language": {
+ "title": "LanguageSwitcher · 인터페이스 언어",
+ "description": "갤러리와 실제 컴포넌트의 표시 언어를 바꿉니다.",
+ "options": "게이트웨이 없이 앱의 i18n과 브라우저 언어 설정을 사용합니다. 상단 언어 선택기도 같은 컴포넌트입니다."
+ },
+ "channelMarks": {
+ "title": "Channel marks · 채널 표시",
+ "description": "대체 아바타 텍스트, 워크스페이스 아이콘, WebSocket 표시를 확인합니다.",
+ "options": "LinearAvatar는 name, url, workspace를 받습니다. 유효한 이미지가 없으면 대체 텍스트나 아이콘을 표시합니다.",
+ "name": "아바타 이름",
+ "member": "멤버 아바타",
+ "workspace": "워크스페이스 아이콘"
+ },
+ "secret": {
+ "title": "LinearSecretField · 비밀 키 편집",
+ "description": "키를 편집, 표시, 저장, 교체하고 저장 실패 시 초안 유지를 확인합니다.",
+ "options": "configured는 저장 상태를 나타내며 onSave가 영구 저장합니다. 갤러리 콜백은 로컬 상태만 갱신합니다.",
+ "state": "비밀 키 상태",
+ "error": "예제 저장에 실패했습니다.",
+ "hint": "예제 텍스트를 입력해 저장하거나 오류 상태를 골라 초안 유지를 확인하세요."
+ },
+ "channelHelp": {
+ "title": "LinearHelpContent · 채널 도움말",
+ "description": "실제 드롭다운 메뉴에서 채널 도움말을 확인합니다.",
+ "options": "내용은 채널의 기존 번역을 사용하고 호출자가 메뉴 컨테이너를 제공합니다.",
+ "open": "채널 도움말 열기"
+ },
+ "channel": {
+ "title": "{{channel}} · 채널 설정",
+ "description": "실제 채널 설정 양식과 상태를 살펴봅니다.",
+ "options": "채널 등록 정보, Python 설정 계약 스냅샷, 실제 ChannelSetupSurfaceView를 사용합니다. 입력, 자격 증명 표시, 프리셋, 확인, 전환은 이 미리보기만 변경합니다.",
+ "state": "채널 설정 상태",
+ "credentialsError": "예제 자격 증명이 거부되었습니다. 미리보기 값을 수정한 후 다시 시도하세요.",
+ "validation": "미리보기 설정"
+ },
+ "channelConnect": {
+ "state": "{{channel}} 연결 상태",
+ "error": "일시적으로 인증할 수 없습니다. 다시 시도하세요."
+ },
+ "feishuConnect": {
+ "title": "FeishuConnectFlowView · Feishu QR 인증",
+ "description": "실제 Feishu QR 화면에서 대기, 성공, 만료, 취소, 오류를 시험합니다.",
+ "options": "connect, busy, error는 표시 상태이며 QR 코드는 로컬에서 생성합니다. 시작, 취소, 폴링은 기능 진입점이 제공하고 예제 콜백은 현재 예제만 바꿉니다."
+ },
+ "feishuAssistants": {
+ "title": "FeishuAssistantsPanelView · Feishu 어시스턴트",
+ "description": "어시스턴트 카드, 실행·인증 상태, 전환, 고급 설정, 추가를 살펴봅니다.",
+ "options": "feature와 instances가 스냅샷을 제공합니다. 뷰는 초안과 저장 결과를 관리하며 onToggleInstance, onSaveInstance, renderConnectFlow가 런타임 동작을 연결합니다.",
+ "state": "어시스턴트 실행 상태",
+ "error": "어시스턴트가 중지되었습니다. 자격 증명을 확인한 후 다시 시작하세요.",
+ "on": "{{name}}: 켜짐",
+ "off": "{{name}}: 꺼짐",
+ "saved": "{{name}}: 미리보기 필드 {{amount}}개 저장됨"
+ },
+ "whatsappConnect": {
+ "title": "WhatsAppConnectFlowView · WhatsApp 기기 연결",
+ "description": "간단한 QR 화면에서 자동 연결, 성공, 만료, 오류와 다른 계정 연결을 시험합니다.",
+ "options": "뷰는 자동 시작과 간결한 레이아웃 표시 규칙을 유지합니다. 호출자가 상태와 재시도를 제어합니다. 실제 자동 시작, 강제 재시도, 폴링은 연결 진입점이 담당합니다."
+ },
+ "linearPanel": {
+ "title": "LinearPanelView · Linear 설정",
+ "description": "앱 정보, 키, 고급 설정, 워크스페이스, 멤버 권한, 브라우저 인증을 살펴봅니다.",
+ "options": "state와 workspaces가 스냅샷을 제공하고 콜백이 워크스페이스, 저장, MCP 동작을 연결합니다. 세 슬롯이 실제 멤버, 인증, 초기화 뷰를 구성합니다.",
+ "state": "Linear 설정 상태",
+ "runtimeError": "Linear webhook을 시작할 수 없습니다.",
+ "saveError": "설정을 저장할 수 없습니다. 초안은 유지됩니다.",
+ "inspectionError": "연결된 워크스페이스를 확인할 수 없습니다.",
+ "refreshed": "예제 워크스페이스를 새로 고쳤습니다.",
+ "removed": "제거한 예제 워크스페이스: {{name}}",
+ "mcp": "Linear MCP 설정을 선택했습니다."
+ },
+ "linearMembers": {
+ "title": "LinearMemberAccessView · 멤버 접근 권한",
+ "description": "멤버 검색, 권한 변경과 로딩, 빈 목록, 저장, 미확인 상태를 비교합니다.",
+ "options": "snapshot은 확인된 멤버 상태입니다. onLoad와 onSetAllowed는 채널 진입점이 담당하며 게이트웨이가 계속 권한을 검증합니다.",
+ "state": "멤버 상태",
+ "loadError": "멤버 디렉터리를 사용할 수 없습니다.",
+ "saveError": "접근 권한을 확인하지 못했습니다."
+ },
+ "linearConnect": {
+ "title": "LinearConnectFlowView · Linear 인증",
+ "description": "브라우저 인증과 대기 안내, 시작, 취소, 성공, 실패 단계를 시험합니다.",
+ "options": "ChannelQrConnectFlowView를 재사용합니다. Linear는 인증 표시, 레이블, 초점을 처리하며 런타임 진입점이 세션 생성과 폴링을 담당합니다.",
+ "state": "인증 단계",
+ "error": "인증을 완료할 수 없습니다.",
+ "hint": "인증 링크와 워크스페이스는 예제입니다. 시작과 취소는 미리보기 단계만 바꿉니다."
+ },
+ "linearReset": {
+ "title": "LinearResetConnectionView · 연결 초기화",
+ "description": "삭제·유지 범위, 처리 중 상태, 부분 초기화 후 재시도를 확인합니다.",
+ "options": "onReset이 전체 권한 취소와 정리 트랜잭션을 수행합니다. 뷰는 확인, 오류, 닫기 제한, 초점 복원을 관리합니다.",
+ "state": "초기화 결과",
+ "error": "채널을 중지할 수 없습니다. 앱 설정은 유지됩니다.",
+ "completed": "미리보기 워크스페이스와 앱 설정을 지웠습니다."
+ },
+ "weixinPanel": {
+ "title": "WeixinPanelView · Weixin 설정",
+ "description": "Weixin 설정, 고급 옵션, 저장 결과, 로그인 만료 복구를 살펴봅니다.",
+ "options": "필드는 채널 설정 계약에서 가져옵니다. 뷰는 펼침과 키 표시를 관리하고 런타임 진입점이 자동 저장, 초안 병합, 로그인 복구를 담당합니다.",
+ "state": "Weixin 패널 상태"
+ },
+ "weixinConnect": {
+ "title": "WeixinConnectFlowView · Weixin QR 및 인증 코드",
+ "description": "QR 스캔, 인증 코드, 성공, 만료, 취소, 연결 오류를 비교합니다.",
+ "options": "뷰는 연결 스냅샷과 콜백을 받고 인증 코드 초안을 유지합니다. QR 코드는 브라우저에서 생성합니다. 실제 진입점이 인증, 폴링 중단, 새로고침, 취소를 담당합니다.",
+ "state": "Weixin 연결 상태",
+ "error": "연결이 중단되었습니다. 다시 시도하세요.",
+ "refreshed": "새 미리보기 QR 코드를 표시했습니다.",
+ "hint": "인증 코드 미리보기에 123456을 입력하면 연결됩니다. 다른 입력은 초안을 유지하고 오류를 표시합니다."
+ }
+}
diff --git a/webui/src/dev/gallery/locales/previews/pt-BR.json b/webui/src/dev/gallery/locales/previews/pt-BR.json
new file mode 100644
index 000000000..dfc9d2dc1
--- /dev/null
+++ b/webui/src/dev/gallery/locales/previews/pt-BR.json
@@ -0,0 +1,444 @@
+{
+ "rename": {
+ "title": "RenameDialog · Renomear grupos e projetos",
+ "description": "Teste a renomeação de grupos e projetos. Os tópicos são renomeados na lista de conversas.",
+ "options": "O chamador fornece dialogTitle, description e placeholder. title define o valor inicial; onConfirm recebe o título sem espaços nas extremidades. Títulos vazios não podem ser salvos.",
+ "hint": "Ao salvar, o título acima é atualizado."
+ },
+ "delete": {
+ "title": "DeleteConfirm · Confirmação de exclusão",
+ "description": "Compare a exclusão de uma conversa, várias conversas ou uma conversa com automações.",
+ "options": "count controla o texto de exclusão em lote. automations mostra tarefas vinculadas, agendamentos e próximas execuções. Confirmar chama onConfirm.",
+ "scenario": "Cenário de exclusão",
+ "open": "Abrir confirmação de exclusão",
+ "confirmed": "Exclusão de exemplo confirmada.",
+ "hint": "Escolha uma conversa, várias conversas ou uma conversa com automações."
+ },
+ "inlineTokens": {
+ "title": "Inline tokens · Comandos e identificadores de sessão",
+ "description": "Edite comandos e identificadores para ver o destaque e as cores estáveis das sessões.",
+ "options": "SlashCommandText recebe command; InlineTokenHighlight recebe color e conteúdo. SessionHandleLabel determina a cor a partir de id.",
+ "command": "Texto do comando",
+ "run": "Execute <command/> para verificar o status.",
+ "handle": "Identificador da sessão",
+ "continue": "Continue trabalhando em <session/>.",
+ "highlight": "Destaque compartilhado",
+ "review": "Use <skill/> para revisar as alterações.",
+ "skill": "Habilidade: {{name}}"
+ },
+ "sessionLinks": {
+ "selected": "Sessão selecionada: {{name}}.",
+ "hint": "Selecione uma menção de sessão para ver o resultado."
+ },
+ "userText": {
+ "title": "UserMessageText · Menções em mensagens",
+ "description": "Edite uma mensagem com menções a habilidades, aplicativos, MCP e sessões.",
+ "options": "text é a mensagem original. cliApps, mcpPresets e sessionMentions resolvem as menções. Habilidades usam $name; as outras menções usam @name.",
+ "message": "Texto da mensagem"
+ },
+ "capabilityTokens": {
+ "title": "CapabilityMentionToken · Menções a aplicativos",
+ "description": "Compare menções a aplicativos, MCP e sessões no editor e nas mensagens.",
+ "options": "segment especifica cli, mcp ou session e seus metadados. variant escolhe composer ou message. O exemplo usa uma imagem de marca local.",
+ "position": "Local da menção"
+ },
+ "productIcons": {
+ "title": "Product icons · Catálogo de ícones",
+ "description": "Explore os ícones, mude o tamanho e selecione um para destacar.",
+ "options": "Os ícones aceitam LucideProps como size, strokeWidth e className. A cor herda currentColor; os botões têm nomes de ação acessíveis.",
+ "size": "Tamanho do ícone",
+ "selected": "Selecionado: {{name}}"
+ },
+ "startup": {
+ "title": "StartupShell · Tela de inicialização",
+ "description": "Veja a tela discreta exibida enquanto o aplicativo se conecta.",
+ "options": "embedded renderiza section; nos outros casos, main. aria-busy e o status de carregamento permanecem disponíveis. Os estilos vêm da entrada do aplicativo."
+ },
+ "fileActions": {
+ "title": "FileActions · Menu de arquivo",
+ "description": "Clique com o botão direito para copiar o caminho completo, relativo ou o texto de referência.",
+ "options": "path é o texto de referência. metadata fornece o caminho completo e o relativo opcional. A galeria fornece os metadados sem carregar o arquivo.",
+ "scope": "Escopo do arquivo",
+ "hint": "Clique com o botão direito para abrir o menu de cópia, ou foque o arquivo e pressione Shift+F10."
+ },
+ "webLinks": {
+ "title": "Web links · Menu de links",
+ "description": "Abra o menu real de links para selecionar links da mensagem e copiar endereços.",
+ "options": "WebLink recebe atributos de link. useMessageWebLinks coleta os links renderizados. MessageLinksMenu recebe entradas e callbacks de voltar e fechar; expanded controla a largura. Todos os links apontam para recursos locais da galeria.",
+ "width": "Largura do menu de links",
+ "message": "Veja a <gallery>galeria de componentes</gallery> e a <brand>imagem de marca</brand>.",
+ "close": "Fechar menu de links",
+ "open": "Ver links da mensagem",
+ "hint": "Clique com o botão direito em um link para copiar o endereço. O menu coleta os links da mensagem renderizada."
+ },
+ "workbench": {
+ "title": "PaneWorkbench · Múltiplos painéis",
+ "description": "Mude o layout, ative ou adicione painéis e ajuste a posição e o tamanho.",
+ "options": "O chamador controla panes, activePaneKey, layout e splitRatios. renderPane fornece o conteúdo e os callbacks atualizam o estado local. Em telas estreitas, o painel ativo é exibido.",
+ "layout": "Layout dos painéis",
+ "limit": "Até quatro painéis",
+ "notes": "Notas de {{title}}",
+ "active": "Painel ativo",
+ "activate": "Selecione este painel para ativá-lo",
+ "hint": "Ativo: {{title}}. Arraste a alça inferior para mover um painel e as bordas para redimensioná-lo."
+ },
+ "hostConnection": {
+ "title": "HostConnectionStatus · Status da conexão",
+ "description": "Compare os estados conectado, desconectado, conectando e erro.",
+ "options": "state controla o ícone e o texto. compact oculta o texto visível, mantendo o status acessível e a dica.",
+ "state": "Status da conexão",
+ "withText": "Status com texto",
+ "compact": "Exibição compacta"
+ },
+ "compatibility": {
+ "title": "HostCompatibilityDialog · Compatibilidade de versões",
+ "description": "Confira versões, preparativos e o guia de atualização para cada resultado de compatibilidade.",
+ "options": "Um profile abre o diálogo; compatibility fornece o resultado e as versões. onClose o fecha. Este componente apenas exibe informações.",
+ "state": "Compatibilidade de versões",
+ "open": "Ver detalhes de compatibilidade"
+ },
+ "composer": {
+ "title": "ThreadComposer · Entrada de mensagens",
+ "description": "Teste mensagens, anexos, comandos e citações nos estados ocupado e desativado.",
+ "options": "Um onSend bem-sucedido limpa a entrada. isStreaming controla a interrupção e a fila; variant escolhe o estilo de conversa ou boas-vindas. Os envios ficam nesta prévia.",
+ "statusCommand": "Status da sessão",
+ "statusDescription": "Ver o status da sessão atual",
+ "compactCommand": "Compactar contexto",
+ "compactDescription": "Compactar o contexto da sessão atual",
+ "helpCommand": "Ajuda de comandos",
+ "helpDescription": "Ver os comandos disponíveis",
+ "state": "Estado da entrada",
+ "addQuote": "Adicionar citação",
+ "input": "Mensagem de exemplo",
+ "placeholder": "Digite uma mensagem ou / para ver comandos",
+ "stopped": "Tarefa de exemplo interrompida.",
+ "sent": "Conteúdo enviado: {{content}}{{attachments}}",
+ "attachments": " · Anexos: {{amount}}",
+ "hint": "Teste o envio, a seleção de anexos, a troca de modelo e o menu de comandos."
+ },
+ "modelPreset": {
+ "title": "ModelPresetBadge · Predefinições de modelo",
+ "description": "Teste o menu de modelos, a navegação por teclado e o estado de configuração pendente.",
+ "options": "modelPresets fornece as predefinições; modelPreset e onPresetChange controlam a seleção. needsSetup exibe o acesso à configuração.",
+ "state": "Estado do controle de modelo",
+ "manage": "Gerenciamento de modelos aberto.",
+ "settings": "Configurações de modelos abertas.",
+ "hint": "Predefinição atual: {{preset}}. Abra o menu ou use as setas para trocar."
+ },
+ "usage": {
+ "title": "ComposerUsagePopover · Uso do contexto",
+ "description": "Veja contexto, cache e tempo de geração com alertas e painel inferior.",
+ "options": "context fornece a capacidade; rounds fornece estatísticas por turno. bottomSheet escolhe o painel móvel.",
+ "state": "Estado do uso",
+ "hint": "Abra os detalhes para ver contexto, cache e tempo de geração por turno."
+ },
+ "workspace": {
+ "title": "WorkspaceControls · Diretório de trabalho",
+ "description": "Escolha um projeto de exemplo e altere o modo de acesso desta prévia.",
+ "options": "scope e onChange controlam a seleção; onLoadProjects fornece diretórios de exemplo. O gateway resolve os caminhos reais e aplica as permissões.",
+ "state": "Estado do diretório de trabalho"
+ },
+ "navigator": {
+ "title": "PromptNavigator · Navegação de perguntas",
+ "description": "Pesquise perguntas anteriores e confira o callback de navegação.",
+ "options": "messages fornece toda a conversa; o componente extrai as perguntas do usuário. onJumpToPrompt recebe o ID da mensagem de destino.",
+ "hint": "Abra a navegação, pesquise e selecione uma pergunta.",
+ "empty": "Nenhuma pergunta selecionada ainda"
+ },
+ "header": {
+ "title": "ThreadHeader · Cabeçalho da conversa",
+ "description": "Teste a barra lateral, o tema, a conversa temporária e a navegação de perguntas.",
+ "options": "title, handle, theme e temporaryChatEnabled fornecem o estado visual. Os callbacks encaminham as ações ao chamador.",
+ "jump": "Navegou para {{id}}",
+ "sidebar": "Barra lateral alternada",
+ "hint": "Teste as ações do cabeçalho",
+ "temporary": "Conversa temporária",
+ "regular": "Conversa normal"
+ },
+ "messages": {
+ "title": "ThreadMessages · Lista de mensagens",
+ "description": "Explore uma conversa com vários turnos, menus, ramificações e citações de texto selecionado.",
+ "options": "messages contém as mensagens projetadas. onForkFromMessage recebe o índice de uma pergunta; onQuoteSelection recebe o texto selecionado de uma resposta.",
+ "quoted": "Citação: {{text}}",
+ "forked": "Ramificação criada a partir da pergunta {{index}}",
+ "hint": "Abra o menu de uma mensagem, ou selecione o texto de uma resposta e escolha Citar."
+ },
+ "viewport": {
+ "title": "ThreadViewport · Rolagem da conversa",
+ "description": "Percorra uma conversa longa com marcadores, navegação e retorno ao final.",
+ "options": "A prévia tem altura fixa. messages fornece o histórico; ref.jumpToUserPrompt localiza uma pergunta. emptyState fornece o conteúdo de uma conversa vazia.",
+ "state": "Visualização da conversa",
+ "empty": "Digite uma mensagem para iniciar uma conversa",
+ "hint": "Role para explorar os marcadores, ou use a navegação e volte ao final."
+ },
+ "history": {
+ "title": "ThreadHistoryStatus · Estado do histórico",
+ "description": "Mostre o carregamento, o início do histórico e os erros com nova tentativa.",
+ "options": "loading indica uma solicitação, exhausted a ausência de mensagens anteriores, error fornece os detalhes do erro e onRetry tenta carregar novamente.",
+ "state": "Estado do histórico",
+ "error": "O histórico de exemplo está indisponível.",
+ "retries": "Novas tentativas: {{amount}}"
+ },
+ "recovery": {
+ "title": "RecoveryNotice · Recuperação de tarefas",
+ "description": "Compare interrupção, retomada, falha e indisponibilidade; teste continuar e fechar.",
+ "options": "state fornece um retrato da recuperação. onContinue e onDismiss retornam Promises. Esses callbacks apenas atualizam a prévia.",
+ "state": "Estado da recuperação",
+ "continued": "Tarefa de exemplo retomada.",
+ "dismissed": "Aviso de recuperação fechado.",
+ "reset": "Redefinir prévia",
+ "hint": "Selecione um estado de recuperação e teste continuar ou fechar."
+ },
+ "fallback": {
+ "title": "ModelFallbackNotice · Modelo alternativo",
+ "description": "Veja avisos de modelo alternativo e autorização expirada, configurações e fechamento.",
+ "options": "model identifica o modelo alternativo; reauthProviderLabel nomeia a autorização expirada. O chamador fornece onOpenSettings e onDismiss.",
+ "state": "Estado do modelo alternativo",
+ "showAgain": "Mostrar novamente",
+ "hint": "Teste o link para configurações de modelos e o botão de fechar."
+ },
+ "compaction": {
+ "title": "ContextCompactionNotice · Compactação do contexto",
+ "description": "Compare os estados de início, sucesso, falha e cancelamento da compactação.",
+ "options": "compaction.phase seleciona o aviso; announce controla os anúncios do leitor de tela.",
+ "phase": "Fase de compactação do contexto"
+ },
+ "streamError": {
+ "title": "StreamErrorNotice · Erros de mensagem",
+ "description": "Compare erros de tamanho, permissões, rejeição de turno e solicitação ao modelo.",
+ "options": "error.kind escolhe a mensagem de erro; onDismiss fecha o aviso.",
+ "kind": "Tipo de erro de mensagem"
+ },
+ "cluster": {
+ "title": "AgentActivityCluster · Atividade completa",
+ "description": "Veja raciocínio e registros de ferramentas em execução, concluídos ou com falha.",
+ "options": "messages contém projeções de reasoning e trace. isTurnStreaming controla a atividade; expanded pode ser controlado pelo chamador.",
+ "state": "Estado da atividade",
+ "error": "Não foi possível ler o arquivo."
+ },
+ "search": {
+ "title": "WebSearchRun · Atividade de busca",
+ "description": "Veja o progresso e as fontes das buscas na web e no X.",
+ "options": "run fornece query, target, status e sources; turnActive controla o efeito de execução. Componentes compartilhados carregam os ícones dos sites de origem.",
+ "state": "Estado da busca",
+ "source": "Fonte da busca"
+ },
+ "responseSources": {
+ "title": "FallbackResponseSources · Fontes da resposta",
+ "description": "Veja predefinições, modelos e provedores alternativos usados nas respostas anteriores.",
+ "options": "sources preserva o retrato do modelo no momento da resposta. Apenas fontes com fallback em true exibem um selo.",
+ "hint": "Selecione um selo de modelo alternativo para ver a predefinição, o modelo e o provedor da resposta."
+ },
+ "filePreview": {
+ "title": "FilePreviewPanelView · Conteúdo de arquivos",
+ "description": "Compare texto, imagens, truncamento, carregamento e erros. Selecione uma imagem para ampliar.",
+ "options": "state fornece o estado visual; path determina o tipo e o nome do arquivo. Os callbacks de abertura e erro de imagem atualizam a prévia.",
+ "state": "Estado da prévia do arquivo"
+ },
+ "webPreview": {
+ "title": "WebPreviewPanelView · Conteúdo web",
+ "description": "Explore a barra de título, o isolamento e as restrições; atualize um documento local.",
+ "options": "O runtime escolhe restriction antes de fornecer o conteúdo. children fornece o conteúdo; onRefresh solicita a atualização. Este iframe usa um srcDoc local.",
+ "state": "Estado da prévia web",
+ "frame": "Página web local de exemplo",
+ "refreshes": "Atualizações: {{amount}}"
+ },
+ "session": {
+ "title": "SessionInfoPopoverView · Automações da sessão",
+ "description": "Veja, edite, desative e exclua tarefas com estados de carregamento e erro.",
+ "options": "O chamador fornece jobs, loading, loadFailed e now. onAction e onEdit retornam tarefas atualizadas; a interface coordena diálogos, foco e resultados.",
+ "state": "Estado das automações da sessão",
+ "saveError": "Falha ao salvar o exemplo. Tente novamente.",
+ "providerError": "O provedor de exemplo está indisponível.",
+ "saved": "Automação salva.",
+ "openedChat": "Conversa de exemplo aberta.",
+ "openedCalendar": "Calendário de automações aberto.",
+ "actionError": "Falha na ação de exemplo. Tente novamente.",
+ "delete": "Excluído: {{name}}",
+ "run": "Execução solicitada: {{name}}",
+ "enable": "Ativado: {{name}}",
+ "disable": "Desativado: {{name}}",
+ "hint": "Abra os detalhes da sessão para ver, alternar, editar e excluir automações."
+ },
+ "subagent": {
+ "title": "SubagentThreadView · Mensagens do subagente",
+ "description": "Veja mensagens, raciocínio, carregamento e falhas do subagente; teste a nova tentativa.",
+ "options": "O runtime projeta messages. loading e error usam o estado compartilhado do histórico; isStreaming e activeTurnId identificam a atividade. A interface não busca o histórico.",
+ "state": "Estado da conversa do subagente"
+ },
+ "pairRoute": {
+ "title": "PairRouteSettingsView · Rota de pareamento",
+ "description": "Selecione e salve rotas localmente, com estados de salvamento, erro e falha de atualização.",
+ "options": "O chamador gerencia route e original; routes fornece rotas SSH. O sucesso ao salvar e a falha ao atualizar o diretório são separados. Galeria e configurações compartilham a interface.",
+ "state": "Estado da rota"
+ },
+ "quickPair": {
+ "title": "QuickPairSetupView · Pareamento rápido",
+ "description": "Teste cópia do convite, entrada da resposta, confirmação de acesso, hosts existentes e novas tentativas.",
+ "options": "state fornece o estado visual e do pareamento; callbacks executam ações. routeSettings integra as configurações de rota. A galeria usa exemplos e callbacks locais; QuickPairSetup gerencia o pareamento real.",
+ "state": "Etapa do pareamento",
+ "open": "Abrir pareamento rápido",
+ "connected": "Conexão selecionada: {{name}}.",
+ "ssh": "Conexão SSH selecionada.",
+ "hint": "Convites e respostas de exemplo são apenas ilustrativos. A confirmação atualiza o resultado local."
+ },
+ "sshHost": {
+ "title": "SSHHostPickerView · Endereço SSH",
+ "description": "Filtre aliases SSH, selecione com as setas e compare importação, carregamento e erros.",
+ "options": "discovery fornece os hosts da configuração atual. O chamador controla value, busy, error e callbacks. customConfig mantém a descoberta de aliases personalizados; inputRef restaura o foco após a seleção.",
+ "state": "Estado do endereço SSH",
+ "refreshed": "Endereços de exemplo atualizados.",
+ "entered": "Valor digitado: {{value}}",
+ "hint": "Digite para filtrar endereços e use as setas para escolher um alias SSH."
+ },
+ "connectionBadge": {
+ "title": "ConnectionBadge · Indicador de conexão",
+ "description": "Compare cores, animações e textos de status acessíveis.",
+ "options": "O chamador fornece status. O contêiner da página gerencia a assinatura da conexão.",
+ "state": "Status da conexão",
+ "idle": "Inativo",
+ "connecting": "Conectando",
+ "open": "Conectado",
+ "reconnecting": "Reconectando",
+ "closed": "Desconectado",
+ "error": "Erro de conexão"
+ },
+ "hostPicker": {
+ "title": "HostSwitcherView · Menu de hosts",
+ "description": "Escolha hosts locais ou de exemplo; compare espera, desconexão e estado recolhido.",
+ "options": "picker fornece dados e callbacks dos hosts; status é o estado atual da conexão. O HostSwitcher de produção assina o cliente.",
+ "state": "Estado do menu de hosts",
+ "offline": "O host de exemplo está desconectado.",
+ "manage": "Gerenciamento de conexões aberto.",
+ "cancelled": "Troca de host de exemplo cancelada.",
+ "selected": "Host da prévia: {{name}}"
+ },
+ "chats": {
+ "title": "ChatList · Lista de conversas",
+ "description": "Selecione conversas e teste fixação, arquivamento e exclusão pelos menus.",
+ "options": "O chamador fornece sessions, activeKey e chaves fixadas ou arquivadas. Os callbacks de ação atualizam a lista de exemplo.",
+ "state": "Estado da lista de conversas",
+ "renamed": "Novo nome: {{name}}",
+ "selected": "Conversa selecionada: {{name}}",
+ "none": "Nenhuma"
+ },
+ "sidebarResize": {
+ "title": "SidebarResizeHandle · Tamanho da barra lateral",
+ "description": "Redimensione, recolha e expanda a barra lateral com o mouse ou teclado.",
+ "options": "width e open são controlados. onResize atualiza o tamanho e a expansão; onDraggingChange informa o arraste.",
+ "content": "Conteúdo da barra lateral",
+ "hint": "Arraste a divisória, ou foque nela e use as setas, Home, End e Enter.",
+ "collapsed": "Recolhida",
+ "dragging": "Arrastando"
+ },
+ "language": {
+ "title": "LanguageSwitcher · Idioma da interface",
+ "description": "Mude o idioma da galeria e dos componentes de produção.",
+ "options": "Usa o i18n do aplicativo e a preferência de idioma do navegador, sem gateway. O seletor superior é o mesmo componente."
+ },
+ "channelMarks": {
+ "title": "Channel marks · Identidade dos canais",
+ "description": "Veja texto alternativo de avatares, ícones de espaço de trabalho e a marca WebSocket.",
+ "options": "LinearAvatar recebe name, url e workspace. Sem imagem válida, exibe texto alternativo ou um ícone.",
+ "name": "Nome do avatar",
+ "member": "Avatar do membro",
+ "workspace": "Ícone do espaço de trabalho"
+ },
+ "secret": {
+ "title": "LinearSecretField · Edição de segredos",
+ "description": "Edite, revele, salve e substitua um segredo; verifique o rascunho após uma falha.",
+ "options": "configured indica o estado salvo; onSave persiste o segredo. Os callbacks da galeria apenas atualizam o estado local.",
+ "state": "Estado do segredo",
+ "error": "Falha ao salvar o exemplo.",
+ "hint": "Digite um exemplo e salve, ou selecione o estado de erro para verificar a preservação do rascunho."
+ },
+ "channelHelp": {
+ "title": "LinearHelpContent · Ajuda do canal",
+ "description": "Veja a ajuda do canal dentro do menu suspenso real.",
+ "options": "O conteúdo usa as traduções existentes do canal; o chamador fornece o contêiner do menu.",
+ "open": "Abrir ajuda do canal"
+ },
+ "channel": {
+ "title": "{{channel}} · Configuração do canal",
+ "description": "Explore o formulário real de configuração e seus estados.",
+ "options": "Usa registros de canal, retratos do contrato Python e ChannelSetupSurfaceView de produção. Entradas, visibilidade das credenciais, predefinições, verificações e interruptores afetam apenas esta prévia.",
+ "state": "Estado da configuração do canal",
+ "credentialsError": "As credenciais de exemplo foram recusadas. Atualize os valores da prévia e tente novamente.",
+ "validation": "Configuração da prévia"
+ },
+ "channelConnect": {
+ "state": "Status da conexão do {{channel}}",
+ "error": "A autorização está temporariamente indisponível. Tente novamente."
+ },
+ "feishuConnect": {
+ "title": "FeishuConnectFlowView · Autorização QR do Feishu",
+ "description": "Teste o fluxo QR real do Feishu com espera, sucesso, expiração, cancelamento e erros.",
+ "options": "connect, busy e error fornecem o estado visual; os QR codes são gerados localmente. A funcionalidade gerencia início, cancelamento e consultas periódicas; os callbacks só alteram este exemplo."
+ },
+ "feishuAssistants": {
+ "title": "FeishuAssistantsPanelView · Assistentes do Feishu",
+ "description": "Explore cartões de assistentes, execução, autorização, opções avançadas e adição de assistentes.",
+ "options": "feature e instances fornecem retratos do estado. A interface gerencia rascunhos e resultados; onToggleInstance, onSaveInstance e renderConnectFlow conectam ações do runtime.",
+ "state": "Estado de execução do assistente",
+ "error": "O assistente parou. Verifique as credenciais antes de reiniciá-lo.",
+ "on": "{{name}}: ligado",
+ "off": "{{name}}: desligado",
+ "saved": "{{name}}: campos de prévia salvos: {{amount}}"
+ },
+ "whatsappConnect": {
+ "title": "WhatsAppConnectFlowView · Vinculação de dispositivo WhatsApp",
+ "description": "Compare vinculação automática, sucesso, expiração e erros; teste outra conta.",
+ "options": "A interface mantém as regras de início automático e layout mínimo. O chamador controla estado e novas tentativas. A entrada real gerencia início automático, tentativas forçadas e consultas periódicas."
+ },
+ "linearPanel": {
+ "title": "LinearPanelView · Configuração do Linear",
+ "description": "Explore dados do app, segredos, opções avançadas, espaços, acesso de membros e autorização web.",
+ "options": "state e workspaces fornecem retratos; callbacks conectam ações de espaço, salvamento e MCP. Três slots compõem as interfaces de membros, autorização e redefinição usadas em produção.",
+ "state": "Estado da configuração do Linear",
+ "runtimeError": "Não foi possível iniciar o webhook do Linear.",
+ "saveError": "Não foi possível salvar as configurações. Seu rascunho foi mantido.",
+ "inspectionError": "Não foi possível inspecionar os espaços de trabalho conectados.",
+ "refreshed": "Espaços de trabalho de exemplo atualizados.",
+ "removed": "Espaço de trabalho de exemplo removido: {{name}}",
+ "mcp": "Configuração do Linear MCP selecionada."
+ },
+ "linearMembers": {
+ "title": "LinearMemberAccessView · Acesso de membros",
+ "description": "Pesquise membros, mude o acesso e compare carregamento, lista vazia, salvamento e falta de confirmação.",
+ "options": "snapshot contém o estado confirmado dos membros. onLoad e onSetAllowed pertencem à entrada do canal; o gateway continua validando as permissões.",
+ "state": "Estado dos membros",
+ "loadError": "O diretório de membros está indisponível.",
+ "saveError": "O acesso não foi confirmado."
+ },
+ "linearConnect": {
+ "title": "LinearConnectFlowView · Autorização do Linear",
+ "description": "Teste a autorização no navegador com espera, início, cancelamento, sucesso e falha.",
+ "options": "Reutiliza ChannelQrConnectFlowView. O Linear fornece exibição, rótulos e foco; a entrada do runtime cria sessões e faz consultas periódicas.",
+ "state": "Etapa de autorização",
+ "error": "Não foi possível concluir a autorização.",
+ "hint": "O link de autorização e o espaço de trabalho são exemplos. Iniciar e Cancelar só mudam a etapa da prévia."
+ },
+ "linearReset": {
+ "title": "LinearResetConnectionView · Redefinir conexão",
+ "description": "Revise o que é limpo ou mantido, o estado ocupado e as tentativas após redefinição parcial.",
+ "options": "onReset executa toda a revogação e limpeza. A interface gerencia confirmação, erros, restrições de fechamento e restauração do foco.",
+ "state": "Resultado da redefinição",
+ "error": "Não foi possível parar o canal. As configurações do aplicativo foram mantidas.",
+ "completed": "Espaço de trabalho e configurações do aplicativo da prévia limpos."
+ },
+ "weixinPanel": {
+ "title": "WeixinPanelView · Configurações do Weixin",
+ "description": "Explore configurações, opções avançadas, salvamento e recuperação de login expirado.",
+ "options": "Os campos vêm do contrato do canal. A interface gerencia expansão e visibilidade dos segredos; a entrada do runtime gerencia salvamento automático, mesclagem de rascunhos e recuperação do login.",
+ "state": "Estado do painel do Weixin"
+ },
+ "weixinConnect": {
+ "title": "WeixinConnectFlowView · QR e verificação do Weixin",
+ "description": "Compare leitura QR, códigos de verificação, sucesso, expiração, cancelamento e erros.",
+ "options": "A interface recebe retratos e callbacks, mantendo o código digitado. Os QR codes são gerados no navegador. A entrada real gerencia autorização, pausa de consultas, atualização e cancelamento.",
+ "state": "Status da conexão do Weixin",
+ "error": "Conexão interrompida. Tente novamente.",
+ "refreshed": "Um novo QR code de prévia está sendo exibido.",
+ "hint": "Digite 123456 para concluir a verificação de exemplo. Outra entrada mantém o rascunho e exibe um erro."
+ }
+}
diff --git a/webui/src/dev/gallery/locales/previews/vi.json b/webui/src/dev/gallery/locales/previews/vi.json
new file mode 100644
index 000000000..603117eab
--- /dev/null
+++ b/webui/src/dev/gallery/locales/previews/vi.json
@@ -0,0 +1,444 @@
+{
+ "rename": {
+ "title": "RenameDialog · Đổi tên nhóm và dự án",
+ "description": "Thử hộp thoại đổi tên nhóm và dự án. Chủ đề được đổi tên ngay trong danh sách trò chuyện.",
+ "options": "Bên gọi cung cấp dialogTitle, description và placeholder. title đặt giá trị ban đầu; onConfirm nhận tên đã bỏ khoảng trắng ở hai đầu. Không thể lưu tên trống.",
+ "hint": "Khi lưu, tiêu đề phía trên sẽ được cập nhật."
+ },
+ "delete": {
+ "title": "DeleteConfirm · Xác nhận xóa",
+ "description": "So sánh việc xóa một cuộc trò chuyện, nhiều cuộc trò chuyện hoặc cuộc trò chuyện có tác vụ tự động.",
+ "options": "count điều khiển nội dung xóa hàng loạt. automations hiển thị tác vụ liên kết, lịch và lần chạy tiếp theo. Xác nhận sẽ gọi onConfirm.",
+ "scenario": "Tình huống xóa",
+ "open": "Mở xác nhận xóa",
+ "confirmed": "Đã xác nhận xóa ví dụ.",
+ "hint": "Chọn một, nhiều hoặc cuộc trò chuyện có tác vụ tự động."
+ },
+ "inlineTokens": {
+ "title": "Inline tokens · Lệnh và định danh phiên",
+ "description": "Sửa lệnh và định danh để xem phần tô sáng và màu ổn định của phiên.",
+ "options": "SlashCommandText nhận command; InlineTokenHighlight nhận color và nội dung. SessionHandleLabel xác định màu từ id.",
+ "command": "Văn bản lệnh",
+ "run": "Chạy <command/> để kiểm tra trạng thái.",
+ "handle": "Định danh phiên",
+ "continue": "Tiếp tục làm việc trong <session/>.",
+ "highlight": "Tô sáng dùng chung",
+ "review": "Dùng <skill/> để kiểm tra thay đổi.",
+ "skill": "Kỹ năng: {{name}}"
+ },
+ "sessionLinks": {
+ "selected": "Phiên đã chọn: {{name}}.",
+ "hint": "Chọn một lượt nhắc đến phiên để xem phản hồi."
+ },
+ "userText": {
+ "title": "UserMessageText · Lượt nhắc trong tin nhắn",
+ "description": "Sửa tin nhắn có nhắc đến kỹ năng, ứng dụng, MCP và phiên.",
+ "options": "text là tin nhắn gốc. cliApps, mcpPresets và sessionMentions giúp phân giải lượt nhắc. Kỹ năng dùng $name; các lượt nhắc khác dùng @name.",
+ "message": "Nội dung tin nhắn"
+ },
+ "capabilityTokens": {
+ "title": "CapabilityMentionToken · Nhắc đến ứng dụng",
+ "description": "So sánh lượt nhắc đến ứng dụng, MCP và phiên trong ô soạn thảo và tin nhắn.",
+ "options": "segment chỉ định cli, mcp hoặc session cùng siêu dữ liệu. variant chọn composer hoặc message. Ví dụ dùng ảnh thương hiệu cục bộ.",
+ "position": "Vị trí lượt nhắc"
+ },
+ "productIcons": {
+ "title": "Product icons · Danh mục biểu tượng",
+ "description": "Duyệt biểu tượng, đổi kích thước và chọn biểu tượng để tô sáng.",
+ "options": "Biểu tượng nhận LucideProps như size, strokeWidth và className. Màu kế thừa currentColor; các nút có tên thao tác hỗ trợ tiếp cận.",
+ "size": "Kích thước biểu tượng",
+ "selected": "Đã chọn: {{name}}"
+ },
+ "startup": {
+ "title": "StartupShell · Màn hình chờ khởi động",
+ "description": "Xem trước bố cục chờ tối giản khi ứng dụng đang kết nối.",
+ "options": "embedded dùng phần tử section; trường hợp khác dùng main. aria-busy và trạng thái tải luôn được cung cấp. Kiểu hiển thị đến từ điểm vào ứng dụng."
+ },
+ "fileActions": {
+ "title": "FileActions · Menu tệp",
+ "description": "Nhấp chuột phải để sao chép đường dẫn đầy đủ, tương đối hoặc văn bản tham chiếu.",
+ "options": "path là văn bản tham chiếu. metadata cung cấp đường dẫn đầy đủ và đường dẫn tương đối tùy chọn. Thư viện cung cấp siêu dữ liệu mà không tải tệp.",
+ "scope": "Phạm vi tệp",
+ "hint": "Nhấp chuột phải để mở menu sao chép, hoặc đưa tiêu điểm vào tệp rồi nhấn Shift+F10."
+ },
+ "webLinks": {
+ "title": "Web links · Menu liên kết",
+ "description": "Mở menu liên kết thực để chọn liên kết trong tin nhắn và sao chép địa chỉ.",
+ "options": "WebLink nhận thuộc tính liên kết. useMessageWebLinks thu thập liên kết đã hiển thị. MessageLinksMenu nhận các mục và hàm gọi lại để quay lại, đóng; expanded điều khiển chiều rộng. Mọi liên kết đều trỏ đến tài nguyên thư viện cục bộ.",
+ "width": "Chiều rộng menu liên kết",
+ "message": "Xem <gallery>thư viện thành phần</gallery> và <brand>ảnh thương hiệu</brand>.",
+ "close": "Đóng menu liên kết",
+ "open": "Xem liên kết trong tin nhắn",
+ "hint": "Nhấp chuột phải vào liên kết để sao chép địa chỉ. Menu thu thập liên kết từ tin nhắn đã hiển thị."
+ },
+ "workbench": {
+ "title": "PaneWorkbench · Nhiều ngăn",
+ "description": "Đổi bố cục, kích hoạt hoặc thêm ngăn, điều chỉnh vị trí và kích thước.",
+ "options": "Bên gọi điều khiển panes, activePaneKey, layout và splitRatios. renderPane cung cấp nội dung; hàm gọi lại cập nhật trạng thái cục bộ. Màn hình hẹp chỉ hiển thị ngăn đang hoạt động.",
+ "layout": "Bố cục ngăn",
+ "limit": "Tối đa bốn ngăn",
+ "notes": "Ghi chú {{title}}",
+ "active": "Ngăn đang hoạt động",
+ "activate": "Chọn ngăn này để kích hoạt",
+ "hint": "Đang hoạt động: {{title}}. Kéo tay nắm bên dưới để di chuyển ngăn, kéo đường biên để đổi kích thước."
+ },
+ "hostConnection": {
+ "title": "HostConnectionStatus · Trạng thái kết nối",
+ "description": "So sánh trạng thái đã kết nối, ngắt kết nối, đang kết nối và lỗi.",
+ "options": "state điều khiển biểu tượng và văn bản. compact ẩn văn bản hiển thị nhưng giữ trạng thái hỗ trợ tiếp cận và chú giải.",
+ "state": "Trạng thái kết nối",
+ "withText": "Trạng thái kèm văn bản",
+ "compact": "Hiển thị thu gọn"
+ },
+ "compatibility": {
+ "title": "HostCompatibilityDialog · Tương thích phiên bản",
+ "description": "Xem phiên bản, hướng dẫn chuẩn bị và nâng cấp cho từng kết quả tương thích.",
+ "options": "profile mở hộp thoại; compatibility cung cấp kết quả và phiên bản. onClose đóng hộp thoại. Thành phần này chỉ hiển thị thông tin.",
+ "state": "Tương thích phiên bản",
+ "open": "Xem chi tiết tương thích"
+ },
+ "composer": {
+ "title": "ThreadComposer · Soạn tin nhắn",
+ "description": "Thử tin nhắn, tệp đính kèm, lệnh và trích dẫn ở trạng thái bận hoặc bị vô hiệu hóa.",
+ "options": "onSend thành công sẽ xóa ô nhập. isStreaming điều khiển dừng và xếp hàng; variant chọn kiểu trò chuyện hoặc trang chào. Nội dung gửi chỉ được giữ trong bản xem trước này.",
+ "statusCommand": "Trạng thái phiên",
+ "statusDescription": "Xem trạng thái phiên hiện tại",
+ "compactCommand": "Nén ngữ cảnh",
+ "compactDescription": "Nén ngữ cảnh của phiên hiện tại",
+ "helpCommand": "Trợ giúp về lệnh",
+ "helpDescription": "Xem các lệnh có sẵn",
+ "state": "Trạng thái ô nhập",
+ "addQuote": "Thêm trích dẫn",
+ "input": "Tin nhắn ví dụ",
+ "placeholder": "Nhập tin nhắn, hoặc / để xem lệnh",
+ "stopped": "Đã dừng tác vụ ví dụ.",
+ "sent": "Nội dung đã gửi: {{content}}{{attachments}}",
+ "attachments": " · Tệp đính kèm: {{amount}}",
+ "hint": "Thử gửi tin nhắn, chọn tệp đính kèm, đổi mô hình và mở menu lệnh."
+ },
+ "modelPreset": {
+ "title": "ModelPresetBadge · Cấu hình sẵn của mô hình",
+ "description": "Thử menu mô hình, điều hướng bằng bàn phím và trạng thái cần thiết lập.",
+ "options": "modelPresets cung cấp cấu hình sẵn; modelPreset và onPresetChange điều khiển lựa chọn. needsSetup hiển thị lối vào thiết lập.",
+ "state": "Trạng thái bộ chọn mô hình",
+ "manage": "Đã mở quản lý mô hình.",
+ "settings": "Đã mở cài đặt mô hình.",
+ "hint": "Cấu hình hiện tại: {{preset}}. Mở menu hoặc dùng phím mũi tên để đổi."
+ },
+ "usage": {
+ "title": "ComposerUsagePopover · Mức sử dụng ngữ cảnh",
+ "description": "Xem ngữ cảnh, bộ nhớ đệm, thời gian tạo, cảnh báo và bảng phía dưới.",
+ "options": "context cung cấp dung lượng; rounds cung cấp thống kê theo lượt. bottomSheet chọn bảng cho thiết bị di động.",
+ "state": "Trạng thái sử dụng",
+ "hint": "Mở chi tiết để xem ngữ cảnh, bộ nhớ đệm và thời gian tạo của từng lượt."
+ },
+ "workspace": {
+ "title": "WorkspaceControls · Thư mục làm việc",
+ "description": "Chọn dự án ví dụ và đổi chế độ truy cập của bản xem trước.",
+ "options": "scope và onChange điều khiển lựa chọn; onLoadProjects cung cấp thư mục ví dụ. Gateway phân giải đường dẫn thực và thực thi quyền truy cập.",
+ "state": "Trạng thái thư mục làm việc"
+ },
+ "navigator": {
+ "title": "PromptNavigator · Điều hướng câu hỏi",
+ "description": "Tìm câu hỏi trước đó và xem hàm gọi lại khi chuyển đến câu hỏi.",
+ "options": "messages cung cấp toàn bộ hội thoại; thành phần trích xuất câu hỏi của người dùng. onJumpToPrompt nhận ID tin nhắn đích.",
+ "hint": "Mở điều hướng câu hỏi, tìm kiếm rồi chọn một câu hỏi.",
+ "empty": "Chưa chọn câu hỏi nào"
+ },
+ "header": {
+ "title": "ThreadHeader · Thanh tiêu đề trò chuyện",
+ "description": "Thử thanh bên, giao diện, trò chuyện tạm thời và điều hướng câu hỏi.",
+ "options": "title, handle, theme và temporaryChatEnabled cung cấp trạng thái hiển thị. Hàm gọi lại chuyển thao tác cho bên gọi.",
+ "jump": "Đã chuyển đến {{id}}",
+ "sidebar": "Đã chuyển trạng thái thanh bên",
+ "hint": "Thử các thao tác trên thanh tiêu đề",
+ "temporary": "Trò chuyện tạm thời",
+ "regular": "Trò chuyện thông thường"
+ },
+ "messages": {
+ "title": "ThreadMessages · Danh sách tin nhắn",
+ "description": "Khám phá hội thoại nhiều lượt, menu tin nhắn, nhánh và trích dẫn văn bản đã chọn.",
+ "options": "messages chứa tin nhắn đã được chiếu sang giao diện. onForkFromMessage nhận chỉ mục câu hỏi; onQuoteSelection nhận văn bản trả lời đã chọn.",
+ "quoted": "Trích dẫn: {{text}}",
+ "forked": "Đã tạo nhánh từ câu hỏi {{index}}",
+ "hint": "Mở menu tin nhắn, hoặc chọn văn bản trả lời rồi chọn Trích dẫn."
+ },
+ "viewport": {
+ "title": "ThreadViewport · Cuộn trò chuyện",
+ "description": "Cuộn hội thoại dài với dấu câu hỏi, điều hướng và quay về cuối.",
+ "options": "Bản xem trước có chiều cao cố định. messages cung cấp lịch sử; ref.jumpToUserPrompt định vị câu hỏi. emptyState cung cấp nội dung khi chưa có tin nhắn.",
+ "state": "Chế độ xem trò chuyện",
+ "empty": "Nhập tin nhắn để bắt đầu trò chuyện",
+ "hint": "Cuộn để xem dấu câu hỏi, hoặc dùng điều hướng rồi quay về cuối."
+ },
+ "history": {
+ "title": "ThreadHistoryStatus · Trạng thái lịch sử",
+ "description": "Hiển thị trạng thái đang tải, đầu lịch sử và lỗi kèm thao tác thử lại.",
+ "options": "loading cho biết đang gửi yêu cầu, exhausted cho biết không còn tin nhắn cũ hơn, error cung cấp chi tiết lỗi và onRetry thử tải lại.",
+ "state": "Trạng thái lịch sử",
+ "error": "Lịch sử ví dụ hiện không khả dụng.",
+ "retries": "Số lần thử lại: {{amount}}"
+ },
+ "recovery": {
+ "title": "RecoveryNotice · Khôi phục tác vụ",
+ "description": "So sánh gián đoạn, tiếp tục, lỗi và không thể tiếp tục; thử tiếp tục hoặc đóng.",
+ "options": "state cung cấp ảnh chụp trạng thái khôi phục. onContinue và onDismiss trả về Promise. Hàm gọi lại chỉ cập nhật bản xem trước.",
+ "state": "Trạng thái khôi phục",
+ "continued": "Đã tiếp tục tác vụ ví dụ.",
+ "dismissed": "Đã đóng thông báo khôi phục.",
+ "reset": "Đặt lại bản xem trước",
+ "hint": "Chọn trạng thái khôi phục, rồi thử tiếp tục hoặc đóng."
+ },
+ "fallback": {
+ "title": "ModelFallbackNotice · Mô hình dự phòng",
+ "description": "Xem thông báo mô hình dự phòng, ủy quyền hết hạn và thử mở cài đặt hoặc đóng.",
+ "options": "model xác định mô hình dự phòng; reauthProviderLabel nêu bên có ủy quyền hết hạn. Bên gọi cung cấp onOpenSettings và onDismiss.",
+ "state": "Trạng thái mô hình dự phòng",
+ "showAgain": "Hiển thị lại",
+ "hint": "Thử liên kết cài đặt mô hình và nút đóng."
+ },
+ "compaction": {
+ "title": "ContextCompactionNotice · Nén ngữ cảnh",
+ "description": "So sánh trạng thái bắt đầu, thành công, thất bại và hủy nén.",
+ "options": "compaction.phase chọn thông báo; announce điều khiển thông báo của trình đọc màn hình.",
+ "phase": "Giai đoạn nén ngữ cảnh"
+ },
+ "streamError": {
+ "title": "StreamErrorNotice · Lỗi tin nhắn",
+ "description": "So sánh lỗi kích thước, quyền thư mục, từ chối lượt và yêu cầu mô hình.",
+ "options": "error.kind chọn nội dung lỗi; onDismiss đóng thông báo.",
+ "kind": "Loại lỗi tin nhắn"
+ },
+ "cluster": {
+ "title": "AgentActivityCluster · Hoạt động đầy đủ",
+ "description": "Xem suy luận và bản ghi công cụ khi đang chạy, hoàn tất hoặc thất bại.",
+ "options": "messages chứa phần chiếu reasoning và trace. isTurnStreaming điều khiển hoạt động; bên gọi có thể điều khiển expanded.",
+ "state": "Trạng thái hoạt động",
+ "error": "Không thể đọc tệp."
+ },
+ "search": {
+ "title": "WebSearchRun · Hoạt động tìm kiếm",
+ "description": "Xem tiến độ và nguồn của tìm kiếm web và X.",
+ "options": "run cung cấp query, target, status và sources; turnActive điều khiển hiệu ứng đang chạy. Thành phần dùng chung tải biểu tượng của trang nguồn.",
+ "state": "Trạng thái tìm kiếm",
+ "source": "Nguồn tìm kiếm"
+ },
+ "responseSources": {
+ "title": "FallbackResponseSources · Nguồn phản hồi",
+ "description": "Xem cấu hình sẵn, mô hình và nhà cung cấp dự phòng dùng trong phản hồi trước.",
+ "options": "sources giữ trạng thái mô hình tại thời điểm trả lời. Chỉ nguồn có fallback bằng true mới hiển thị huy hiệu.",
+ "hint": "Chọn huy hiệu dự phòng để xem cấu hình sẵn, mô hình và nhà cung cấp của phản hồi đó."
+ },
+ "filePreview": {
+ "title": "FilePreviewPanelView · Nội dung tệp",
+ "description": "So sánh văn bản, ảnh, nội dung bị cắt, đang tải và lỗi. Chọn ảnh để phóng to.",
+ "options": "state cung cấp trạng thái hiển thị; path xác định loại và tên tệp. Hàm gọi lại mở ảnh và lỗi ảnh cập nhật bản xem trước.",
+ "state": "Trạng thái xem trước tệp"
+ },
+ "webPreview": {
+ "title": "WebPreviewPanelView · Nội dung web",
+ "description": "Khám phá thanh tiêu đề, thông tin cách ly và giới hạn; làm mới tài liệu cục bộ.",
+ "options": "Runtime chọn restriction trước khi cung cấp nội dung. children cung cấp nội dung; onRefresh yêu cầu làm mới. iframe này dùng srcDoc cục bộ.",
+ "state": "Trạng thái xem trước web",
+ "frame": "Trang web ví dụ cục bộ",
+ "refreshes": "Số lần làm mới: {{amount}}"
+ },
+ "session": {
+ "title": "SessionInfoPopoverView · Tác vụ tự động của phiên",
+ "description": "Xem, sửa, tắt và xóa tác vụ với trạng thái đang tải và lỗi.",
+ "options": "Bên gọi cung cấp jobs, loading, loadFailed và now. onAction và onEdit trả về tác vụ đã cập nhật; giao diện phối hợp hộp thoại, tiêu điểm và phản hồi.",
+ "state": "Trạng thái tác vụ tự động của phiên",
+ "saveError": "Lưu ví dụ thất bại. Vui lòng thử lại.",
+ "providerError": "Nhà cung cấp ví dụ hiện không khả dụng.",
+ "saved": "Đã lưu tác vụ tự động.",
+ "openedChat": "Đã mở cuộc trò chuyện ví dụ.",
+ "openedCalendar": "Đã mở lịch tác vụ tự động.",
+ "actionError": "Thao tác ví dụ thất bại. Vui lòng thử lại.",
+ "delete": "Đã xóa: {{name}}",
+ "run": "Đã yêu cầu chạy: {{name}}",
+ "enable": "Đã bật: {{name}}",
+ "disable": "Đã tắt: {{name}}",
+ "hint": "Mở chi tiết phiên để xem, bật tắt, sửa và xóa tác vụ tự động."
+ },
+ "subagent": {
+ "title": "SubagentThreadView · Tin nhắn tác nhân phụ",
+ "description": "Xem tin nhắn, suy luận, đang tải, lỗi và thử lại của tác nhân phụ.",
+ "options": "Runtime chiếu messages sang giao diện. loading và error dùng thành phần trạng thái lịch sử chung; isStreaming và activeTurnId xác định hoạt động. Giao diện không tải lịch sử.",
+ "state": "Trạng thái trò chuyện tác nhân phụ"
+ },
+ "pairRoute": {
+ "title": "PairRouteSettingsView · Tuyến ghép nối",
+ "description": "Chọn và lưu tuyến cục bộ, so sánh trạng thái lưu, lỗi và làm mới thất bại.",
+ "options": "Bên gọi quản lý route và original; routes cung cấp tuyến SSH. Lưu thành công và làm mới thư mục thất bại được hiển thị riêng. Thư viện và cài đặt dùng cùng giao diện.",
+ "state": "Trạng thái tuyến"
+ },
+ "quickPair": {
+ "title": "QuickPairSetupView · Ghép nối nhanh",
+ "description": "Thử sao chép lời mời, nhập mã phản hồi, xác nhận quyền, máy chủ hiện có và thử lại.",
+ "options": "state cung cấp trạng thái ghép nối và hiển thị; hàm gọi lại thực hiện thao tác. routeSettings kết hợp cài đặt tuyến. Thư viện dùng dữ liệu ví dụ và hàm cục bộ; QuickPairSetup quản lý ghép nối thực.",
+ "state": "Giai đoạn ghép nối",
+ "open": "Mở ghép nối nhanh",
+ "connected": "Kết nối đã chọn: {{name}}.",
+ "ssh": "Đã chọn kết nối SSH.",
+ "hint": "Lời mời và mã phản hồi ví dụ chỉ để minh họa. Xác nhận chỉ cập nhật phản hồi cục bộ."
+ },
+ "sshHost": {
+ "title": "SSHHostPickerView · Địa chỉ SSH",
+ "description": "Lọc bí danh SSH, chọn bằng phím mũi tên và so sánh nhập, đang tải và lỗi.",
+ "options": "discovery cung cấp máy chủ từ cấu hình hiện tại. Bên gọi điều khiển value, busy, error và hàm gọi lại. customConfig giữ khả năng tìm bí danh từ cấu hình tùy chỉnh; inputRef khôi phục tiêu điểm sau khi chọn.",
+ "state": "Trạng thái địa chỉ SSH",
+ "refreshed": "Đã làm mới địa chỉ ví dụ.",
+ "entered": "Đã nhập: {{value}}",
+ "hint": "Nhập để lọc địa chỉ; dùng phím mũi tên để chọn bí danh SSH."
+ },
+ "connectionBadge": {
+ "title": "ConnectionBadge · Chỉ báo kết nối",
+ "description": "So sánh màu, chuyển động và văn bản trạng thái hỗ trợ tiếp cận.",
+ "options": "Bên gọi cung cấp status. Thành phần bao trang quản lý đăng ký theo dõi kết nối.",
+ "state": "Trạng thái kết nối",
+ "idle": "Chờ",
+ "connecting": "Đang kết nối",
+ "open": "Đã kết nối",
+ "reconnecting": "Đang kết nối lại",
+ "closed": "Đã ngắt kết nối",
+ "error": "Lỗi kết nối"
+ },
+ "hostPicker": {
+ "title": "HostSwitcherView · Menu máy chủ",
+ "description": "Chọn máy cục bộ hoặc máy chủ ví dụ; so sánh đang chờ, ngoại tuyến và thu gọn.",
+ "options": "picker cung cấp dữ liệu máy chủ và hàm gọi lại; status là trạng thái kết nối hiện tại. HostSwitcher thực đăng ký theo dõi client.",
+ "state": "Trạng thái menu máy chủ",
+ "offline": "Máy chủ ví dụ đã ngắt kết nối.",
+ "manage": "Đã mở quản lý kết nối.",
+ "cancelled": "Đã hủy chuyển máy chủ ví dụ.",
+ "selected": "Máy chủ xem trước: {{name}}"
+ },
+ "chats": {
+ "title": "ChatList · Danh sách trò chuyện",
+ "description": "Chọn cuộc trò chuyện và thử ghim, lưu trữ hoặc xóa từ menu.",
+ "options": "Bên gọi cung cấp sessions, activeKey và khóa đã ghim hoặc lưu trữ. Hàm gọi lại thao tác cập nhật danh sách ví dụ.",
+ "state": "Trạng thái danh sách trò chuyện",
+ "renamed": "Đã đổi tên: {{name}}",
+ "selected": "Cuộc trò chuyện đã chọn: {{name}}",
+ "none": "Không có"
+ },
+ "sidebarResize": {
+ "title": "SidebarResizeHandle · Kích thước thanh bên",
+ "description": "Đổi kích thước, thu gọn và mở rộng thanh bên bằng chuột hoặc bàn phím.",
+ "options": "width và open là trạng thái được điều khiển. onResize cập nhật kích thước và mở rộng; onDraggingChange thông báo trạng thái kéo.",
+ "content": "Nội dung thanh bên",
+ "hint": "Kéo đường phân cách, hoặc đưa tiêu điểm vào đó rồi dùng phím mũi tên, Home, End và Enter.",
+ "collapsed": "Đã thu gọn",
+ "dragging": "Đang kéo"
+ },
+ "language": {
+ "title": "LanguageSwitcher · Ngôn ngữ giao diện",
+ "description": "Đổi ngôn ngữ của thư viện và các thành phần thực.",
+ "options": "Dùng i18n của ứng dụng và ngôn ngữ ưu tiên của trình duyệt, không cần gateway. Bộ chọn ngôn ngữ phía trên dùng cùng thành phần."
+ },
+ "channelMarks": {
+ "title": "Channel marks · Nhận diện kênh",
+ "description": "Xem văn bản đại diện khi thiếu ảnh, biểu tượng không gian làm việc và dấu WebSocket.",
+ "options": "LinearAvatar nhận name, url và workspace. Khi không có ảnh hợp lệ, thành phần hiển thị văn bản thay thế hoặc biểu tượng.",
+ "name": "Tên ảnh đại diện",
+ "member": "Ảnh đại diện thành viên",
+ "workspace": "Biểu tượng không gian làm việc"
+ },
+ "secret": {
+ "title": "LinearSecretField · Sửa khóa bí mật",
+ "description": "Sửa, hiện, lưu và thay khóa; kiểm tra giữ bản nháp khi lưu thất bại.",
+ "options": "configured chỉ trạng thái đã lưu; onSave lưu lâu dài khóa bí mật. Hàm gọi lại của thư viện chỉ cập nhật trạng thái cục bộ.",
+ "state": "Trạng thái khóa bí mật",
+ "error": "Lưu ví dụ thất bại.",
+ "hint": "Nhập văn bản ví dụ rồi lưu, hoặc chọn trạng thái lỗi để kiểm tra việc giữ bản nháp."
+ },
+ "channelHelp": {
+ "title": "LinearHelpContent · Trợ giúp kênh",
+ "description": "Xem trợ giúp kênh trong menu thả xuống thực.",
+ "options": "Nội dung dùng bản dịch sẵn có của kênh; bên gọi cung cấp thành phần bao menu.",
+ "open": "Mở trợ giúp kênh"
+ },
+ "channel": {
+ "title": "{{channel}} · Thiết lập kênh",
+ "description": "Khám phá biểu mẫu thiết lập kênh thực và các trạng thái.",
+ "options": "Dùng đăng ký kênh, ảnh chụp hợp đồng thiết lập Python và ChannelSetupSurfaceView thực. Nội dung nhập, hiện thông tin xác thực, cấu hình sẵn, kiểm tra và bật tắt chỉ tác động đến bản xem trước này.",
+ "state": "Trạng thái thiết lập kênh",
+ "credentialsError": "Thông tin xác thực ví dụ bị từ chối. Cập nhật giá trị xem trước rồi thử lại.",
+ "validation": "Cấu hình xem trước"
+ },
+ "channelConnect": {
+ "state": "Trạng thái kết nối {{channel}}",
+ "error": "Tạm thời không thể ủy quyền. Vui lòng thử lại."
+ },
+ "feishuConnect": {
+ "title": "FeishuConnectFlowView · Ủy quyền QR Feishu",
+ "description": "Thử luồng QR Feishu thực với chờ, thành công, hết hạn, hủy và lỗi.",
+ "options": "connect, busy và error cung cấp trạng thái hiển thị; mã QR được tạo cục bộ. Tính năng quản lý bắt đầu, hủy và thăm dò; hàm gọi lại chỉ thay đổi ví dụ này."
+ },
+ "feishuAssistants": {
+ "title": "FeishuAssistantsPanelView · Trợ lý Feishu",
+ "description": "Khám phá thẻ trợ lý, trạng thái chạy và ủy quyền, cài đặt nâng cao và thêm trợ lý.",
+ "options": "feature và instances cung cấp ảnh chụp trạng thái. Giao diện quản lý bản nháp và phản hồi lưu; onToggleInstance, onSaveInstance và renderConnectFlow kết nối thao tác runtime.",
+ "state": "Trạng thái chạy của trợ lý",
+ "error": "Trợ lý đã dừng. Kiểm tra thông tin xác thực trước khi khởi động lại.",
+ "on": "{{name}}: đã bật",
+ "off": "{{name}}: đã tắt",
+ "saved": "{{name}}: số trường xem trước đã lưu: {{amount}}"
+ },
+ "whatsappConnect": {
+ "title": "WhatsAppConnectFlowView · Liên kết thiết bị WhatsApp",
+ "description": "So sánh liên kết tự động, thành công, hết hạn và lỗi; thử liên kết tài khoản khác.",
+ "options": "Giao diện giữ quy tắc hiển thị tự bắt đầu và bố cục tối giản. Bên gọi điều khiển trạng thái và thử lại. Điểm vào thực quản lý tự bắt đầu, buộc thử lại và thăm dò."
+ },
+ "linearPanel": {
+ "title": "LinearPanelView · Thiết lập Linear",
+ "description": "Khám phá ứng dụng, khóa, cài đặt nâng cao, không gian làm việc, quyền và ủy quyền web.",
+ "options": "state và workspaces cung cấp ảnh chụp trạng thái; hàm gọi lại nối thao tác không gian làm việc, lưu và MCP. Ba vị trí kết hợp giao diện thành viên, ủy quyền và đặt lại dùng trong sản phẩm.",
+ "state": "Trạng thái thiết lập Linear",
+ "runtimeError": "Không thể khởi động webhook Linear.",
+ "saveError": "Không thể lưu cài đặt. Bản nháp đã được giữ lại.",
+ "inspectionError": "Không thể kiểm tra không gian làm việc đã kết nối.",
+ "refreshed": "Đã làm mới không gian làm việc ví dụ.",
+ "removed": "Đã gỡ không gian làm việc ví dụ: {{name}}",
+ "mcp": "Đã chọn thiết lập Linear MCP."
+ },
+ "linearMembers": {
+ "title": "LinearMemberAccessView · Quyền truy cập thành viên",
+ "description": "Tìm thành viên, sửa quyền và so sánh đang tải, trống, lưu và chưa xác nhận.",
+ "options": "snapshot chứa trạng thái thành viên đã xác nhận. onLoad và onSetAllowed thuộc điểm vào kênh; gateway vẫn kiểm tra quyền.",
+ "state": "Trạng thái thành viên",
+ "loadError": "Danh bạ thành viên hiện không khả dụng.",
+ "saveError": "Quyền truy cập chưa được xác nhận."
+ },
+ "linearConnect": {
+ "title": "LinearConnectFlowView · Ủy quyền Linear",
+ "description": "Thử ủy quyền qua trình duyệt với chờ, bắt đầu, hủy, thành công và thất bại.",
+ "options": "Tái sử dụng ChannelQrConnectFlowView. Linear cung cấp cách hiển thị, nhãn và xử lý tiêu điểm; điểm vào runtime tạo phiên và thăm dò.",
+ "state": "Giai đoạn ủy quyền",
+ "error": "Không thể hoàn tất ủy quyền.",
+ "hint": "Liên kết ủy quyền và không gian làm việc là ví dụ. Bắt đầu và Hủy chỉ thay đổi giai đoạn xem trước."
+ },
+ "linearReset": {
+ "title": "LinearResetConnectionView · Đặt lại kết nối",
+ "description": "Xem phần bị xóa hoặc giữ lại, trạng thái bận và thử lại sau khi đặt lại một phần.",
+ "options": "onReset thực hiện toàn bộ giao dịch thu hồi và dọn dẹp. Giao diện quản lý xác nhận, lỗi, giới hạn đóng và khôi phục tiêu điểm.",
+ "state": "Kết quả đặt lại",
+ "error": "Không thể dừng kênh. Cài đặt ứng dụng đã được giữ lại.",
+ "completed": "Đã xóa không gian làm việc và cài đặt ứng dụng trong bản xem trước."
+ },
+ "weixinPanel": {
+ "title": "WeixinPanelView · Cài đặt Weixin",
+ "description": "Khám phá cài đặt, tùy chọn nâng cao, phản hồi lưu và khôi phục đăng nhập hết hạn.",
+ "options": "Các trường đến từ hợp đồng thiết lập kênh. Giao diện quản lý mở rộng và hiện khóa; điểm vào runtime quản lý tự lưu, hợp nhất bản nháp và khôi phục đăng nhập.",
+ "state": "Trạng thái bảng Weixin"
+ },
+ "weixinConnect": {
+ "title": "WeixinConnectFlowView · QR và xác minh Weixin",
+ "description": "So sánh quét QR, mã xác minh, thành công, hết hạn, hủy và lỗi kết nối.",
+ "options": "Giao diện nhận ảnh chụp kết nối và hàm gọi lại, giữ bản nháp mã xác minh. Mã QR được tạo trong trình duyệt. Điểm vào thực quản lý ủy quyền, tạm dừng thăm dò, làm mới và hủy.",
+ "state": "Trạng thái kết nối Weixin",
+ "error": "Kết nối bị gián đoạn. Vui lòng thử lại.",
+ "refreshed": "Đã hiển thị mã QR xem trước mới.",
+ "hint": "Nhập 123456 để hoàn tất xác minh ví dụ. Nội dung khác sẽ giữ bản nháp và hiển thị lỗi."
+ }
+}
diff --git a/webui/src/dev/gallery/locales/previews/zh-CN.json b/webui/src/dev/gallery/locales/previews/zh-CN.json
new file mode 100644
index 000000000..e4b2652b4
--- /dev/null
+++ b/webui/src/dev/gallery/locales/previews/zh-CN.json
@@ -0,0 +1,444 @@
+{
+ "rename": {
+ "title": "RenameDialog · 分组与项目改名",
+ "description": "预览分组和项目改名;话题在列表行内改名。",
+ "options": "调用方提供 dialogTitle、description 和 placeholder。title 设置初值,onConfirm 接收去除两端空白的标题。空标题无法保存。",
+ "hint": "保存后更新上方标题。"
+ },
+ "delete": {
+ "title": "DeleteConfirm · 删除确认",
+ "description": "比较单个、批量和带自动任务的删除确认。",
+ "options": "count 控制批量文案;automations 展示关联任务、计划和下次运行时间。确认按钮调用 onConfirm。",
+ "scenario": "删除场景",
+ "open": "打开删除确认",
+ "confirmed": "已确认删除示例。",
+ "hint": "选择单个、批量或带自动任务的会话。"
+ },
+ "inlineTokens": {
+ "title": "Inline tokens · 命令与会话标识",
+ "description": "编辑命令与标识,查看高亮和会话颜色。",
+ "options": "SlashCommandText 接收 command;InlineTokenHighlight 接收 color 和内容;SessionHandleLabel 根据 id 生成颜色。",
+ "command": "命令文本",
+ "run": "运行 <command/> 查看状态。",
+ "handle": "会话标识",
+ "continue": "继续 <session/> 中的工作。",
+ "highlight": "共享高亮",
+ "review": "使用 <skill/> 检查修改。",
+ "skill": "技能:{{name}}"
+ },
+ "sessionLinks": {
+ "selected": "已选择会话:{{name}}。",
+ "hint": "选择会话引用查看反馈。"
+ },
+ "userText": {
+ "title": "UserMessageText · 消息引用",
+ "description": "编辑消息中的技能、应用、MCP 和会话引用。",
+ "options": "text 为原始消息;cliApps、mcpPresets 与 sessionMentions 提供可解析引用。技能使用 $name,其他引用使用 @name。",
+ "message": "消息文本"
+ },
+ "capabilityTokens": {
+ "title": "CapabilityMentionToken · 应用引用",
+ "description": "比较输入框和消息中的引用样式。",
+ "options": "segment 指定 cli、mcp 或 session 及其元数据;variant 选择 composer 或 message。示例使用本地品牌图片。",
+ "position": "引用位置"
+ },
+ "productIcons": {
+ "title": "Product icons · 产品图标",
+ "description": "浏览图标,切换尺寸并选择高亮。",
+ "options": "图标接受 LucideProps,如 size、strokeWidth、className。颜色继承 currentColor,按钮提供可访问的动作名称。",
+ "size": "图标尺寸",
+ "selected": "已选择:{{name}}"
+ },
+ "startup": {
+ "title": "StartupShell · 启动占位",
+ "description": "预览应用连接时的安静占位布局。",
+ "options": "embedded 使用 section,其余情况使用 main。组件持续提供 aria-busy 与加载状态;占位样式来自应用入口。"
+ },
+ "fileActions": {
+ "title": "FileActions · 文件菜单",
+ "description": "右键复制完整路径、相对路径或引用文本。",
+ "options": "path 为引用文本;metadata 提供完整路径与可选相对路径。画廊直接提供元数据,无需加载文件。",
+ "scope": "文件范围",
+ "hint": "右键打开复制菜单,也可聚焦文件后按 Shift+F10。"
+ },
+ "webLinks": {
+ "title": "Web links · 链接菜单",
+ "description": "选择消息链接并复制地址。",
+ "options": "WebLink 接收链接属性;useMessageWebLinks 收集实际渲染的消息链接。MessageLinksMenu 接收条目、返回与关闭回调,expanded 控制宽度。示例链接均指向本地画廊资源。",
+ "width": "链接菜单宽度",
+ "message": "查看<gallery>组件画廊</gallery>和<brand>品牌图片</brand>。",
+ "close": "关闭链接菜单",
+ "open": "查看消息链接",
+ "hint": "右键链接可复制地址;消息菜单从实际渲染的链接中收集条目。"
+ },
+ "workbench": {
+ "title": "PaneWorkbench · 多窗格",
+ "description": "切换布局、激活或添加窗格并调整尺寸。",
+ "options": "panes、activePaneKey、layout 与 splitRatios 由调用方控制。renderPane 提供内容;回调写回本地预览状态。窄屏自动显示当前窗格。",
+ "layout": "窗格布局",
+ "limit": "最多四个窗格",
+ "notes": "{{title}}笔记",
+ "active": "当前窗格",
+ "activate": "选择此窗格以激活",
+ "hint": "当前:{{title}}。拖动底部手柄移动窗格,拖动边界调整尺寸。"
+ },
+ "hostConnection": {
+ "title": "HostConnectionStatus · 连接状态",
+ "description": "比较已连接、断开、连接中和出错状态。",
+ "options": "state 控制图标与文字;compact 隐藏可见文字,保留可访问状态和悬浮标题。",
+ "state": "连接状态",
+ "withText": "状态与文字",
+ "compact": "紧凑显示"
+ },
+ "compatibility": {
+ "title": "HostCompatibilityDialog · 版本兼容",
+ "description": "查看兼容结果、版本和升级指南。",
+ "options": "profile 存在时打开对话框;compatibility 指定结果与版本。onClose 由调用方关闭;此组件只展示信息。",
+ "state": "版本兼容状态",
+ "open": "查看兼容详情"
+ },
+ "composer": {
+ "title": "ThreadComposer · 消息输入",
+ "description": "试用消息、附件、命令和引用等输入状态。",
+ "options": "onSend 返回成功后清空输入;isStreaming 控制停止与排队;variant 切换会话和欢迎页样式。示例提交保存在当前预览。",
+ "statusCommand": "会话状态",
+ "statusDescription": "查看当前会话状态",
+ "compactCommand": "压缩上下文",
+ "compactDescription": "压缩当前会话上下文",
+ "helpCommand": "命令帮助",
+ "helpDescription": "查看可用命令",
+ "state": "输入状态",
+ "addQuote": "加入引用",
+ "input": "示例消息",
+ "placeholder": "输入消息,或输入 / 查看命令",
+ "stopped": "已停止示例任务。",
+ "sent": "提交内容:{{content}}{{attachments}}",
+ "attachments": " · 附件数:{{amount}}",
+ "hint": "试用消息提交、附件选择、模型切换和命令菜单。"
+ },
+ "modelPreset": {
+ "title": "ModelPresetBadge · 模型预设",
+ "description": "试用模型菜单、键盘操作和待配置状态。",
+ "options": "modelPresets 提供预设;modelPreset 与 onPresetChange 控制选择;needsSetup 显示配置入口。",
+ "state": "模型控件状态",
+ "manage": "已打开模型管理。",
+ "settings": "已打开模型设置。",
+ "hint": "当前预设:{{preset}}。打开菜单或用方向键切换。"
+ },
+ "usage": {
+ "title": "ComposerUsagePopover · 上下文用量",
+ "description": "查看上下文、缓存、生成时间和警戒状态。",
+ "options": "context 提供上下文容量;rounds 提供各轮统计;bottomSheet 选择移动端面板。",
+ "state": "用量状态",
+ "hint": "打开用量详情,查看上下文占用、缓存和各轮生成时间。"
+ },
+ "workspace": {
+ "title": "WorkspaceControls · 工作目录",
+ "description": "选择示例项目并切换访问模式。",
+ "options": "scope 与 onChange 控制选择;onLoadProjects 提供示例目录。真实路径解析和权限执行由 gateway 负责。",
+ "state": "工作目录状态"
+ },
+ "navigator": {
+ "title": "PromptNavigator · 问题导航",
+ "description": "搜索历史问题并查看跳转反馈。",
+ "options": "messages 提供完整消息列表,组件提取用户问题;onJumpToPrompt 接收目标消息 ID。",
+ "hint": "打开问题导航,搜索并选择问题。",
+ "empty": "尚未选择问题"
+ },
+ "header": {
+ "title": "ThreadHeader · 会话标题栏",
+ "description": "试用侧栏、主题、临时会话和问题导航。",
+ "options": "title、handle、theme 与 temporaryChatEnabled 提供显示状态;各操作通过回调交给调用方。",
+ "jump": "已跳转到 {{id}}",
+ "sidebar": "已切换侧栏",
+ "hint": "试用标题栏操作",
+ "temporary": "临时会话",
+ "regular": "普通会话"
+ },
+ "messages": {
+ "title": "ThreadMessages · 消息列表",
+ "description": "试用多轮消息、操作菜单、分支和引用。",
+ "options": "messages 为已投影消息;onForkFromMessage 接收用户问题索引,onQuoteSelection 接收所选回复文字。",
+ "quoted": "引用:{{text}}",
+ "forked": "已从第 {{index}} 个问题创建分支",
+ "hint": "打开消息菜单,或选中回复文字后点击引用。"
+ },
+ "viewport": {
+ "title": "ThreadViewport · 会话滚动",
+ "description": "体验长会话滚动、问题导航和返回底部。",
+ "options": "预览容器高度固定;messages 驱动历史显示,ref.jumpToUserPrompt 执行定位;emptyState 提供空会话内容。",
+ "state": "会话视图",
+ "empty": "输入消息开始会话",
+ "hint": "滚动查看问题标记,或用导航跳转并返回底部。"
+ },
+ "history": {
+ "title": "ThreadHistoryStatus · 历史状态",
+ "description": "显示加载、历史起点与失败重试状态。",
+ "options": "loading 表示正在请求,exhausted 表示没有更早消息,error 提供报错信息,onRetry 重试加载。",
+ "state": "历史状态",
+ "error": "示例历史暂不可用。",
+ "retries": "重试次数:{{amount}}"
+ },
+ "recovery": {
+ "title": "RecoveryNotice · 任务恢复",
+ "description": "比较任务恢复状态,试用继续与关闭。",
+ "options": "state 为恢复快照;onContinue 与 onDismiss 返回 Promise。示例回调只更新当前预览。",
+ "state": "恢复状态",
+ "continued": "已继续示例任务。",
+ "dismissed": "已关闭恢复提示。",
+ "reset": "重置预览",
+ "hint": "选择恢复状态,再试用继续或关闭。"
+ },
+ "fallback": {
+ "title": "ModelFallbackNotice · 模型回退",
+ "description": "查看模型回退和授权失效提示。",
+ "options": "model 标识回退模型;reauthProviderLabel 显示授权到期提示;onOpenSettings 和 onDismiss 由调用方提供。",
+ "state": "模型回退状态",
+ "showAgain": "重新显示",
+ "hint": "试用模型设置入口与关闭按钮。"
+ },
+ "compaction": {
+ "title": "ContextCompactionNotice · 上下文压缩",
+ "description": "比较压缩开始、成功、失败和取消状态。",
+ "options": "compaction.phase 决定提示;announce 控制屏幕阅读器播报。",
+ "phase": "上下文压缩阶段"
+ },
+ "streamError": {
+ "title": "StreamErrorNotice · 消息错误",
+ "description": "比较消息大小、权限和请求失败提示。",
+ "options": "error.kind 决定错误文案;onDismiss 关闭提示。",
+ "kind": "消息错误类型"
+ },
+ "cluster": {
+ "title": "AgentActivityCluster · 完整活动",
+ "description": "查看推理、工具记录和各运行状态。",
+ "options": "messages 包含 reasoning 和 trace 投影;isTurnStreaming 控制活动状态;expanded 可由调用方控制。",
+ "state": "活动状态",
+ "error": "未能读取文件。"
+ },
+ "search": {
+ "title": "WebSearchRun · 搜索活动",
+ "description": "查看网页和 X 搜索进度与来源。",
+ "options": "run 包含 query、target、status 和 sources;turnActive 控制运行效果。结果站点图标由共享组件加载。",
+ "state": "搜索状态",
+ "source": "搜索来源"
+ },
+ "responseSources": {
+ "title": "FallbackResponseSources · 响应来源",
+ "description": "查看历史回复使用的预设、模型和供应商。",
+ "options": "sources 保留响应时的模型快照,仅 fallback 为 true 的来源显示标记。",
+ "hint": "点击回退标记查看响应时的预设、模型与供应商。"
+ },
+ "filePreview": {
+ "title": "FilePreviewPanelView · 文件内容",
+ "description": "比较文件显示状态,点击图片试用缩放。",
+ "options": "state 为显示快照;path 决定文件类型和名称;图片打开与失败回调更新当前预览。",
+ "state": "文件预览状态"
+ },
+ "webPreview": {
+ "title": "WebPreviewPanelView · 网页内容",
+ "description": "查看隔离与限制提示,试用刷新本地文档。",
+ "options": "运行时先决定 restriction,再提供内容。children 接收内容,onRefresh 请求刷新;此示例的 iframe 使用本地 srcDoc。",
+ "state": "网页预览状态",
+ "frame": "本地示例网页",
+ "refreshes": "刷新次数:{{amount}}"
+ },
+ "session": {
+ "title": "SessionInfoPopoverView · 会话任务",
+ "description": "查看、编辑、停用和删除会话任务。",
+ "options": "jobs、loading、loadFailed 和 now 来自调用方;onAction 与 onEdit 返回更新后的任务;界面负责弹窗衔接、焦点恢复和操作反馈。",
+ "state": "会话任务状态",
+ "saveError": "示例保存失败,请重试。",
+ "providerError": "示例供应商暂不可用。",
+ "saved": "已保存任务。",
+ "openedChat": "已打开示例聊天。",
+ "openedCalendar": "已打开任务日历。",
+ "actionError": "示例操作失败,请重试。",
+ "delete": "已删除:{{name}}",
+ "run": "已请求运行:{{name}}",
+ "enable": "已启用:{{name}}",
+ "disable": "已停用:{{name}}",
+ "hint": "打开会话详情,试用任务查看、开关、编辑和删除。"
+ },
+ "subagent": {
+ "title": "SubagentThreadView · 子任务消息",
+ "description": "查看子任务消息、活动和重试状态。",
+ "options": "messages 已由运行时投影;loading 和 error 复用历史加载组件;isStreaming 与 activeTurnId 决定活动。界面不获取任务历史。",
+ "state": "子任务会话状态"
+ },
+ "pairRoute": {
+ "title": "PairRouteSettingsView · 配对路由",
+ "description": "选择路由并比较保存与刷新失败状态。",
+ "options": "route 与 original 由调用方管理;routes 提供 SSH 路由。保存成功与目录刷新失败分别呈现;画廊与设置使用同一个视图。",
+ "state": "路由状态"
+ },
+ "quickPair": {
+ "title": "QuickPairSetupView · 快速配对",
+ "description": "试用邀请、回执、访问确认和重试界面。",
+ "options": "state 提供配对和显示状态,回调执行动作,routeSettings 组合路由设置。画廊使用示例数据和本地回调;实际配对由 QuickPairSetup 管理。",
+ "state": "配对阶段",
+ "open": "打开快速配对",
+ "connected": "已选择连接:{{name}}。",
+ "ssh": "已选择 SSH 连接方式。",
+ "hint": "示例邀请与回执仅用于展示;确认动作更新本地反馈。"
+ },
+ "sshHost": {
+ "title": "SSHHostPickerView · SSH 地址",
+ "description": "筛选 SSH 别名并查看导入与读取状态。",
+ "options": "discovery 提供当前配置文件的地址;value、busy、error 与回调由调用方控制。customConfig 保留自定义配置的别名发现行为;inputRef 用于选择后的焦点。",
+ "state": "SSH 地址状态",
+ "refreshed": "已刷新示例地址。",
+ "entered": "已输入:{{value}}",
+ "hint": "输入内容筛选地址;按方向键选择 SSH 别名。"
+ },
+ "connectionBadge": {
+ "title": "ConnectionBadge · 连接指示",
+ "description": "查看连接颜色、动画和可访问状态。",
+ "options": "status 来自调用方;页面容器维护连接订阅。",
+ "state": "连接状态",
+ "idle": "未连接",
+ "connecting": "连接中",
+ "open": "已连接",
+ "reconnecting": "重新连接中",
+ "closed": "已断开",
+ "error": "连接出错"
+ },
+ "hostPicker": {
+ "title": "HostSwitcherView · 主机菜单",
+ "description": "选择主机并比较待连接、断开与收起状态。",
+ "options": "picker 提供主机数据与回调;status 为当前连接状态。生产 HostSwitcher 负责订阅客户端。",
+ "state": "主机菜单状态",
+ "offline": "示例主机已断开。",
+ "manage": "已打开连接管理。",
+ "cancelled": "已取消示例切换。",
+ "selected": "预览中的主机:{{name}}"
+ },
+ "chats": {
+ "title": "ChatList · 会话列表",
+ "description": "选择会话并试用置顶、归档和删除。",
+ "options": "sessions、activeKey 和置顶或归档的 key 由调用方提供;操作回调更新示例列表。",
+ "state": "会话列表状态",
+ "renamed": "已重命名:{{name}}",
+ "selected": "选择的会话:{{name}}",
+ "none": "无"
+ },
+ "sidebarResize": {
+ "title": "SidebarResizeHandle · 侧栏尺寸",
+ "description": "用鼠标或键盘调整、收起和展开侧栏。",
+ "options": "width 与 open 为受控状态;onResize 更新尺寸与展开状态;onDraggingChange 通知拖动状态。",
+ "content": "侧栏内容",
+ "hint": "拖动分隔条,或聚焦后使用方向键、Home、End 和 Enter。",
+ "collapsed": "已收起",
+ "dragging": "正在拖动"
+ },
+ "language": {
+ "title": "LanguageSwitcher · 界面语言",
+ "description": "切换画廊与生产组件的界面语言。",
+ "options": "使用应用已有 i18n 与浏览器语言偏好,不需要 gateway。顶部语言选择器使用同一个组件。"
+ },
+ "channelMarks": {
+ "title": "Channel marks · 频道标识",
+ "description": "查看头像缺省文字、工作区和频道图标。",
+ "options": "LinearAvatar 接收 name、url 和 workspace;无有效图片时显示缺省文字或图标。",
+ "name": "头像名称",
+ "member": "成员头像",
+ "workspace": "工作区图标"
+ },
+ "secret": {
+ "title": "LinearSecretField · 密钥编辑",
+ "description": "编辑、保存密钥并检查失败时的草稿保留。",
+ "options": "configured 为已保存状态;onSave 负责持久化。画廊回调仅更新本地状态。",
+ "state": "密钥状态",
+ "error": "示例保存失败。",
+ "hint": "输入示例文本并保存,或切换错误状态检查草稿保留。"
+ },
+ "channelHelp": {
+ "title": "LinearHelpContent · 频道帮助",
+ "description": "在实际下拉菜单中查看频道帮助。",
+ "options": "内容使用频道的现有翻译;调用方提供菜单容器。",
+ "open": "打开频道帮助"
+ },
+ "channel": {
+ "title": "{{channel}} · 频道配置",
+ "description": "查看真实频道配置表单与状态。",
+ "options": "使用频道注册定义、Python 设置契约快照和生产 ChannelSetupSurfaceView。输入、凭据显示、预设、检查与开关只更新当前预览。",
+ "state": "频道配置状态",
+ "credentialsError": "示例凭据被拒绝。请更新预览中的值后重试。",
+ "validation": "预览配置"
+ },
+ "channelConnect": {
+ "state": "{{channel}} 连接状态",
+ "error": "授权暂不可用,请重试。"
+ },
+ "feishuConnect": {
+ "title": "FeishuConnectFlowView · 飞书扫码授权",
+ "description": "试用飞书扫码、成功、过期与错误状态。",
+ "options": "connect、busy 和 error 提供显示状态;二维码在本地生成。开始、取消与轮询由功能入口提供,预览回调只改变当前示例。"
+ },
+ "feishuAssistants": {
+ "title": "FeishuAssistantsPanelView · 飞书助手管理",
+ "description": "查看助手卡片、运行状态和高级设置。",
+ "options": "feature 和 instances 提供助手快照;视图管理草稿与保存反馈。onToggleInstance、onSaveInstance 与 renderConnectFlow 接入运行时操作。",
+ "state": "助手运行状态",
+ "error": "助手已停止。请检查凭据后重新启动。",
+ "on": "{{name}}:已开启",
+ "off": "{{name}}:已关闭",
+ "saved": "{{name}}:已保存 {{amount}} 个预览字段"
+ },
+ "whatsappConnect": {
+ "title": "WhatsAppConnectFlowView · WhatsApp 设备关联",
+ "description": "比较关联、成功、过期和错误界面。",
+ "options": "视图沿用自动开始和极简布局的显示规则;调用方控制状态和重试。真实自动开始、强制重试和轮询由连接功能入口负责。"
+ },
+ "linearPanel": {
+ "title": "LinearPanelView · Linear 配置",
+ "description": "查看应用设置、工作区、成员和浏览器授权。",
+ "options": "state 与 workspaces 提供快照;工作区、保存与 MCP 操作由回调接入。三个插槽组合生产使用的成员、授权和重置视图。",
+ "state": "Linear 配置状态",
+ "runtimeError": "未能启动 Linear webhook。",
+ "saveError": "无法保存设置,已保留草稿。",
+ "inspectionError": "未能检查已连接的工作区。",
+ "refreshed": "已刷新示例工作区。",
+ "removed": "已移除示例工作区:{{name}}",
+ "mcp": "已选择 Linear MCP 配置入口。"
+ },
+ "linearMembers": {
+ "title": "LinearMemberAccessView · 成员访问",
+ "description": "搜索成员、修改权限并比较保存状态。",
+ "options": "snapshot 为已确认的成员状态。onLoad 与 onSetAllowed 交给频道入口;权限校验仍由网关负责。",
+ "state": "成员状态",
+ "loadError": "成员目录暂不可用。",
+ "saveError": "尚未确认访问权限。"
+ },
+ "linearConnect": {
+ "title": "LinearConnectFlowView · Linear 授权",
+ "description": "试用浏览器授权入口和各授权阶段。",
+ "options": "复用 ChannelQrConnectFlowView。Linear 提供浏览器授权展示、标签与焦点处理;会话创建及轮询留在运行时入口。",
+ "state": "授权阶段",
+ "error": "未能完成授权。",
+ "hint": "授权链接与工作区为示例数据;开始、取消只更新预览阶段。"
+ },
+ "linearReset": {
+ "title": "LinearResetConnectionView · 重置连接",
+ "description": "查看清除范围、忙碌和部分完成状态。",
+ "options": "onReset 执行完整撤销与清理事务;视图管理确认、错误、关闭限制与焦点恢复。",
+ "state": "重置结果",
+ "error": "未能停止频道,已保留应用设置。",
+ "completed": "预览工作区及应用设置已清除。"
+ },
+ "weixinPanel": {
+ "title": "WeixinPanelView · 微信设置",
+ "description": "查看微信设置、保存反馈和登录恢复。",
+ "options": "字段来自频道设置契约。视图管理展开和密钥可见状态;运行时入口负责自动保存、草稿合并和登录恢复。",
+ "state": "微信面板状态"
+ },
+ "weixinConnect": {
+ "title": "WeixinConnectFlowView · 微信扫码与验证",
+ "description": "比较扫码、验证、过期和连接错误状态。",
+ "options": "视图接收连接快照与回调,保留验证码草稿。二维码在浏览器中生成;授权启动、轮询暂停、刷新和取消由真实入口负责。",
+ "state": "微信连接状态",
+ "error": "连接中断,请重试。",
+ "refreshed": "已显示新的预览二维码。",
+ "hint": "验证码预览输入 123456 可完成连接;其他输入会保留草稿并显示错误。"
+ }
+}
diff --git a/webui/src/dev/gallery/locales/previews/zh-TW.json b/webui/src/dev/gallery/locales/previews/zh-TW.json
new file mode 100644
index 000000000..cb34f063b
--- /dev/null
+++ b/webui/src/dev/gallery/locales/previews/zh-TW.json
@@ -0,0 +1,444 @@
+{
+ "rename": {
+ "title": "RenameDialog · 群組與專案改名",
+ "description": "預覽群組與專案改名;話題在清單內改名。",
+ "options": "呼叫端提供 dialogTitle、description 與 placeholder。title 設定初始值,onConfirm 接收去除頭尾空白的標題。空標題無法儲存。",
+ "hint": "儲存後更新上方標題。"
+ },
+ "delete": {
+ "title": "DeleteConfirm · 刪除確認",
+ "description": "比較單筆、多筆與含自動任務的刪除確認。",
+ "options": "count 控制批次刪除文案;automations 顯示關聯任務、排程與下次執行時間。確認按鈕呼叫 onConfirm。",
+ "scenario": "刪除情境",
+ "open": "開啟刪除確認",
+ "confirmed": "已確認刪除範例。",
+ "hint": "選擇單一、多個或含自動任務的對話。"
+ },
+ "inlineTokens": {
+ "title": "Inline tokens · 指令與對話識別",
+ "description": "編輯指令與識別碼,查看醒目樣式與色彩。",
+ "options": "SlashCommandText 接收 command;InlineTokenHighlight 接收 color 與內容;SessionHandleLabel 依 id 產生色彩。",
+ "command": "指令文字",
+ "run": "執行 <command/> 查看狀態。",
+ "handle": "對話識別碼",
+ "continue": "繼續 <session/> 中的工作。",
+ "highlight": "共用醒目樣式",
+ "review": "使用 <skill/> 檢查修改。",
+ "skill": "技能:{{name}}"
+ },
+ "sessionLinks": {
+ "selected": "已選擇對話:{{name}}。",
+ "hint": "選擇對話提及以查看回饋。"
+ },
+ "userText": {
+ "title": "UserMessageText · 訊息提及",
+ "description": "編輯訊息中的技能、應用、MCP 與對話提及。",
+ "options": "text 為原始訊息;cliApps、mcpPresets 與 sessionMentions 提供可解析的提及。技能使用 $name,其他提及使用 @name。",
+ "message": "訊息文字"
+ },
+ "capabilityTokens": {
+ "title": "CapabilityMentionToken · 應用提及",
+ "description": "比較輸入框與訊息中的提及樣式。",
+ "options": "segment 指定 cli、mcp 或 session 及其中繼資料;variant 選擇 composer 或 message。範例使用本機品牌圖片。",
+ "position": "提及位置"
+ },
+ "productIcons": {
+ "title": "Product icons · 產品圖示",
+ "description": "瀏覽圖示、切換尺寸並選擇醒目項目。",
+ "options": "圖示接受 LucideProps,如 size、strokeWidth 與 className。色彩繼承 currentColor,按鈕提供無障礙操作名稱。",
+ "size": "圖示尺寸",
+ "selected": "已選擇:{{name}}"
+ },
+ "startup": {
+ "title": "StartupShell · 啟動佔位",
+ "description": "預覽應用連線時的安靜佔位版面。",
+ "options": "embedded 使用 section,其他情況使用 main。元件持續提供 aria-busy 與載入狀態;佔位樣式來自應用入口。"
+ },
+ "fileActions": {
+ "title": "FileActions · 檔案選單",
+ "description": "按右鍵複製完整路徑、相對路徑或參照文字。",
+ "options": "path 為參照文字;metadata 提供完整路徑與選填的相對路徑。元件庫直接提供中繼資料,無須載入檔案。",
+ "scope": "檔案範圍",
+ "hint": "按右鍵開啟複製選單,或聚焦檔案後按 Shift+F10。"
+ },
+ "webLinks": {
+ "title": "Web links · 連結選單",
+ "description": "選擇訊息連結並複製網址。",
+ "options": "WebLink 接收連結屬性;useMessageWebLinks 收集實際呈現的訊息連結。MessageLinksMenu 接收項目、返回與關閉回呼,expanded 控制寬度。範例連結皆指向本機元件庫資源。",
+ "width": "連結選單寬度",
+ "message": "查看<gallery>元件庫</gallery>與<brand>品牌圖片</brand>。",
+ "close": "關閉連結選單",
+ "open": "查看訊息連結",
+ "hint": "在連結上按右鍵可複製網址;訊息選單從實際呈現的連結收集項目。"
+ },
+ "workbench": {
+ "title": "PaneWorkbench · 多窗格",
+ "description": "切換版面、啟用或新增窗格並調整尺寸。",
+ "options": "panes、activePaneKey、layout 與 splitRatios 由呼叫端控制。renderPane 提供內容;回呼更新本機預覽狀態。窄螢幕自動顯示目前窗格。",
+ "layout": "窗格版面",
+ "limit": "最多四個窗格",
+ "notes": "{{title}}筆記",
+ "active": "目前窗格",
+ "activate": "選擇此窗格以啟用",
+ "hint": "目前:{{title}}。拖曳底部把手移動窗格,拖曳邊界調整尺寸。"
+ },
+ "hostConnection": {
+ "title": "HostConnectionStatus · 連線狀態",
+ "description": "比較已連線、中斷、連線中與錯誤狀態。",
+ "options": "state 控制圖示與文字;compact 隱藏可見文字,保留無障礙狀態與提示。",
+ "state": "連線狀態",
+ "withText": "狀態與文字",
+ "compact": "精簡顯示"
+ },
+ "compatibility": {
+ "title": "HostCompatibilityDialog · 版本相容",
+ "description": "查看相容結果、版本與升級指南。",
+ "options": "profile 存在時開啟對話框;compatibility 指定結果與版本。onClose 由呼叫端關閉;此元件僅顯示資訊。",
+ "state": "版本相容狀態",
+ "open": "查看相容詳細資訊"
+ },
+ "composer": {
+ "title": "ThreadComposer · 訊息輸入",
+ "description": "試用訊息、附件、指令與引用等輸入狀態。",
+ "options": "onSend 成功後清空輸入;isStreaming 控制停止與排隊;variant 切換對話與歡迎頁樣式。範例提交保留於目前預覽。",
+ "statusCommand": "對話狀態",
+ "statusDescription": "查看目前對話狀態",
+ "compactCommand": "壓縮上下文",
+ "compactDescription": "壓縮目前對話上下文",
+ "helpCommand": "指令說明",
+ "helpDescription": "查看可用指令",
+ "state": "輸入狀態",
+ "addQuote": "加入引用",
+ "input": "範例訊息",
+ "placeholder": "輸入訊息,或輸入 / 查看指令",
+ "stopped": "已停止範例任務。",
+ "sent": "提交內容:{{content}}{{attachments}}",
+ "attachments": " · 附件數:{{amount}}",
+ "hint": "試用訊息提交、附件選擇、模型切換與指令選單。"
+ },
+ "modelPreset": {
+ "title": "ModelPresetBadge · 模型預設",
+ "description": "試用模型選單、鍵盤操作與待設定狀態。",
+ "options": "modelPresets 提供預設;modelPreset 與 onPresetChange 控制選擇;needsSetup 顯示設定入口。",
+ "state": "模型控制項狀態",
+ "manage": "已開啟模型管理。",
+ "settings": "已開啟模型設定。",
+ "hint": "目前預設:{{preset}}。開啟選單或用方向鍵切換。"
+ },
+ "usage": {
+ "title": "ComposerUsagePopover · 上下文用量",
+ "description": "查看上下文、快取、生成時間與警戒狀態。",
+ "options": "context 提供上下文容量;rounds 提供各輪統計;bottomSheet 選擇行動裝置面板。",
+ "state": "用量狀態",
+ "hint": "開啟用量詳細資訊,查看上下文佔用、快取與各輪生成時間。"
+ },
+ "workspace": {
+ "title": "WorkspaceControls · 工作目錄",
+ "description": "選擇範例專案並切換存取模式。",
+ "options": "scope 與 onChange 控制選擇;onLoadProjects 提供範例目錄。實際路徑解析與權限執行由 gateway 負責。",
+ "state": "工作目錄狀態"
+ },
+ "navigator": {
+ "title": "PromptNavigator · 問題導覽",
+ "description": "搜尋歷史問題並查看跳轉回饋。",
+ "options": "messages 提供完整訊息清單,元件擷取使用者問題;onJumpToPrompt 接收目標訊息 ID。",
+ "hint": "開啟問題導覽,搜尋並選擇問題。",
+ "empty": "尚未選擇問題"
+ },
+ "header": {
+ "title": "ThreadHeader · 對話標題列",
+ "description": "試用側邊欄、主題、臨時對話與問題導覽。",
+ "options": "title、handle、theme 與 temporaryChatEnabled 提供顯示狀態;各操作透過回呼交給呼叫端。",
+ "jump": "已跳至 {{id}}",
+ "sidebar": "已切換側邊欄",
+ "hint": "試用標題列操作",
+ "temporary": "臨時對話",
+ "regular": "一般對話"
+ },
+ "messages": {
+ "title": "ThreadMessages · 訊息清單",
+ "description": "試用多輪訊息、操作選單、分支與引用。",
+ "options": "messages 為已投影訊息;onForkFromMessage 接收使用者問題索引,onQuoteSelection 接收所選回覆文字。",
+ "quoted": "引用:{{text}}",
+ "forked": "已從第 {{index}} 個問題建立分支",
+ "hint": "開啟訊息選單,或選取回覆文字後點選引用。"
+ },
+ "viewport": {
+ "title": "ThreadViewport · 對話捲動",
+ "description": "體驗長對話捲動、問題導覽與返回底部。",
+ "options": "預覽容器高度固定;messages 驅動歷史顯示,ref.jumpToUserPrompt 執行定位;emptyState 提供空對話內容。",
+ "state": "對話檢視",
+ "empty": "輸入訊息開始對話",
+ "hint": "捲動查看問題標記,或使用導覽跳轉並返回底部。"
+ },
+ "history": {
+ "title": "ThreadHistoryStatus · 歷史狀態",
+ "description": "顯示載入、歷史起點與失敗重試狀態。",
+ "options": "loading 表示正在請求,exhausted 表示沒有更早訊息,error 提供錯誤資訊,onRetry 重試載入。",
+ "state": "歷史狀態",
+ "error": "範例歷史暫時無法使用。",
+ "retries": "重試次數:{{amount}}"
+ },
+ "recovery": {
+ "title": "RecoveryNotice · 任務復原",
+ "description": "比較任務復原狀態,試用繼續與關閉。",
+ "options": "state 為復原快照;onContinue 與 onDismiss 回傳 Promise。範例回呼只更新目前預覽。",
+ "state": "復原狀態",
+ "continued": "已繼續範例任務。",
+ "dismissed": "已關閉復原提示。",
+ "reset": "重設預覽",
+ "hint": "選擇復原狀態,再試用繼續或關閉。"
+ },
+ "fallback": {
+ "title": "ModelFallbackNotice · 模型備援",
+ "description": "查看備援模型與授權失效提示。",
+ "options": "model 指定備援模型;reauthProviderLabel 顯示授權到期提示;onOpenSettings 與 onDismiss 由呼叫端提供。",
+ "state": "模型備援狀態",
+ "showAgain": "重新顯示",
+ "hint": "試用模型設定入口與關閉按鈕。"
+ },
+ "compaction": {
+ "title": "ContextCompactionNotice · 上下文壓縮",
+ "description": "比較壓縮開始、成功、失敗與取消狀態。",
+ "options": "compaction.phase 決定提示;announce 控制螢幕閱讀器播報。",
+ "phase": "上下文壓縮階段"
+ },
+ "streamError": {
+ "title": "StreamErrorNotice · 訊息錯誤",
+ "description": "比較訊息大小、權限與請求失敗提示。",
+ "options": "error.kind 決定錯誤文案;onDismiss 關閉提示。",
+ "kind": "訊息錯誤類型"
+ },
+ "cluster": {
+ "title": "AgentActivityCluster · 完整活動",
+ "description": "查看推理、工具記錄與各執行狀態。",
+ "options": "messages 包含 reasoning 與 trace 投影;isTurnStreaming 控制活動狀態;expanded 可由呼叫端控制。",
+ "state": "活動狀態",
+ "error": "無法讀取檔案。"
+ },
+ "search": {
+ "title": "WebSearchRun · 搜尋活動",
+ "description": "查看網頁與 X 搜尋進度及來源。",
+ "options": "run 包含 query、target、status 與 sources;turnActive 控制執行效果。結果網站圖示由共用元件載入。",
+ "state": "搜尋狀態",
+ "source": "搜尋來源"
+ },
+ "responseSources": {
+ "title": "FallbackResponseSources · 回應來源",
+ "description": "查看歷史回覆使用的預設、模型與供應商。",
+ "options": "sources 保留回應當時的模型快照,僅 fallback 為 true 的來源顯示標記。",
+ "hint": "點選備援標記查看回應當時的預設、模型與供應商。"
+ },
+ "filePreview": {
+ "title": "FilePreviewPanelView · 檔案內容",
+ "description": "比較檔案顯示狀態,點選圖片試用縮放。",
+ "options": "state 為顯示快照;path 決定檔案類型與名稱;圖片開啟與失敗回呼更新目前預覽。",
+ "state": "檔案預覽狀態"
+ },
+ "webPreview": {
+ "title": "WebPreviewPanelView · 網頁內容",
+ "description": "查看隔離與限制提示,試用重新整理。",
+ "options": "執行階段先決定 restriction,再提供內容。children 接收內容,onRefresh 請求重新整理;此範例的 iframe 使用本機 srcDoc。",
+ "state": "網頁預覽狀態",
+ "frame": "本機範例網頁",
+ "refreshes": "重新整理次數:{{amount}}"
+ },
+ "session": {
+ "title": "SessionInfoPopoverView · 對話任務",
+ "description": "查看、編輯、停用與刪除對話任務。",
+ "options": "jobs、loading、loadFailed 與 now 來自呼叫端;onAction 與 onEdit 回傳更新後的任務;介面負責對話框銜接、焦點復原與操作回饋。",
+ "state": "對話任務狀態",
+ "saveError": "範例儲存失敗,請重試。",
+ "providerError": "範例供應商暫時無法使用。",
+ "saved": "已儲存任務。",
+ "openedChat": "已開啟範例對話。",
+ "openedCalendar": "已開啟任務行事曆。",
+ "actionError": "範例操作失敗,請重試。",
+ "delete": "已刪除:{{name}}",
+ "run": "已請求執行:{{name}}",
+ "enable": "已啟用:{{name}}",
+ "disable": "已停用:{{name}}",
+ "hint": "開啟對話詳細資訊,試用任務查看、開關、編輯與刪除。"
+ },
+ "subagent": {
+ "title": "SubagentThreadView · 子任務訊息",
+ "description": "查看子任務訊息、活動與重試狀態。",
+ "options": "messages 已由執行階段投影;loading 與 error 共用歷史載入元件;isStreaming 與 activeTurnId 決定活動。介面不擷取任務歷史。",
+ "state": "子任務對話狀態"
+ },
+ "pairRoute": {
+ "title": "PairRouteSettingsView · 配對路由",
+ "description": "選擇路由並比較儲存與重新整理失敗狀態。",
+ "options": "route 與 original 由呼叫端管理;routes 提供 SSH 路由。儲存成功與目錄重新整理失敗分別呈現;元件庫與設定共用此檢視。",
+ "state": "路由狀態"
+ },
+ "quickPair": {
+ "title": "QuickPairSetupView · 快速配對",
+ "description": "試用邀請、回執、存取確認與重試介面。",
+ "options": "state 提供配對與顯示狀態,回呼執行操作,routeSettings 組合路由設定。元件庫使用範例資料與本機回呼;實際配對由 QuickPairSetup 管理。",
+ "state": "配對階段",
+ "open": "開啟快速配對",
+ "connected": "已選擇連線:{{name}}。",
+ "ssh": "已選擇 SSH 連線方式。",
+ "hint": "範例邀請與回執僅供展示;確認操作更新本機回饋。"
+ },
+ "sshHost": {
+ "title": "SSHHostPickerView · SSH 位址",
+ "description": "篩選 SSH 別名並查看匯入與讀取狀態。",
+ "options": "discovery 提供目前設定檔的位址;value、busy、error 與回呼由呼叫端控制。customConfig 保留自訂設定的別名探索行為;inputRef 用於選擇後的焦點。",
+ "state": "SSH 位址狀態",
+ "refreshed": "已重新整理範例位址。",
+ "entered": "已輸入:{{value}}",
+ "hint": "輸入文字篩選位址;按方向鍵選擇 SSH 別名。"
+ },
+ "connectionBadge": {
+ "title": "ConnectionBadge · 連線指示",
+ "description": "查看連線色彩、動畫與無障礙狀態。",
+ "options": "status 來自呼叫端;頁面容器維護連線訂閱。",
+ "state": "連線狀態",
+ "idle": "未連線",
+ "connecting": "連線中",
+ "open": "已連線",
+ "reconnecting": "重新連線中",
+ "closed": "已中斷",
+ "error": "連線錯誤"
+ },
+ "hostPicker": {
+ "title": "HostSwitcherView · 主機選單",
+ "description": "選擇主機並比較待連線、中斷與收合狀態。",
+ "options": "picker 提供主機資料與回呼;status 為目前連線狀態。正式 HostSwitcher 負責訂閱用戶端。",
+ "state": "主機選單狀態",
+ "offline": "範例主機已中斷連線。",
+ "manage": "已開啟連線管理。",
+ "cancelled": "已取消範例切換。",
+ "selected": "預覽中的主機:{{name}}"
+ },
+ "chats": {
+ "title": "ChatList · 對話清單",
+ "description": "選擇對話並試用置頂、封存與刪除。",
+ "options": "sessions、activeKey 與置頂或封存的 key 由呼叫端提供;操作回呼更新範例清單。",
+ "state": "對話清單狀態",
+ "renamed": "已重新命名:{{name}}",
+ "selected": "選擇的對話:{{name}}",
+ "none": "無"
+ },
+ "sidebarResize": {
+ "title": "SidebarResizeHandle · 側邊欄尺寸",
+ "description": "用滑鼠或鍵盤調整、收合與展開側邊欄。",
+ "options": "width 與 open 為受控狀態;onResize 更新尺寸與展開狀態;onDraggingChange 通知拖曳狀態。",
+ "content": "側邊欄內容",
+ "hint": "拖曳分隔線,或聚焦後使用方向鍵、Home、End 與 Enter。",
+ "collapsed": "已收合",
+ "dragging": "拖曳中"
+ },
+ "language": {
+ "title": "LanguageSwitcher · 介面語言",
+ "description": "切換元件庫與正式元件的介面語言。",
+ "options": "使用應用既有的 i18n 與瀏覽器語言偏好,無須 gateway。頂部語言選擇器使用同一元件。"
+ },
+ "channelMarks": {
+ "title": "Channel marks · 頻道識別",
+ "description": "查看頭像預設文字、工作區與頻道圖示。",
+ "options": "LinearAvatar 接收 name、url 與 workspace;無有效圖片時顯示預設文字或圖示。",
+ "name": "頭像名稱",
+ "member": "成員頭像",
+ "workspace": "工作區圖示"
+ },
+ "secret": {
+ "title": "LinearSecretField · 金鑰編輯",
+ "description": "編輯、儲存金鑰並檢查失敗時的草稿保留。",
+ "options": "configured 為已儲存狀態;onSave 負責持久儲存。元件庫回呼僅更新本機狀態。",
+ "state": "金鑰狀態",
+ "error": "範例儲存失敗。",
+ "hint": "輸入範例文字並儲存,或切換錯誤狀態檢查草稿保留。"
+ },
+ "channelHelp": {
+ "title": "LinearHelpContent · 頻道說明",
+ "description": "在實際下拉選單中查看頻道說明。",
+ "options": "內容使用頻道現有翻譯;呼叫端提供選單容器。",
+ "open": "開啟頻道說明"
+ },
+ "channel": {
+ "title": "{{channel}} · 頻道設定",
+ "description": "查看實際頻道設定表單與狀態。",
+ "options": "使用頻道註冊定義、Python 設定契約快照與正式 ChannelSetupSurfaceView。輸入、憑證顯示、預設、檢查與開關僅更新目前預覽。",
+ "state": "頻道設定狀態",
+ "credentialsError": "範例憑證遭拒。請更新預覽中的值後重試。",
+ "validation": "預覽設定"
+ },
+ "channelConnect": {
+ "state": "{{channel}} 連線狀態",
+ "error": "授權暫時無法使用,請重試。"
+ },
+ "feishuConnect": {
+ "title": "FeishuConnectFlowView · 飛書掃碼授權",
+ "description": "試用飛書掃碼、成功、到期與錯誤狀態。",
+ "options": "connect、busy 與 error 提供顯示狀態;QR 碼於本機產生。開始、取消與輪詢由功能入口提供,預覽回呼僅改變目前範例。"
+ },
+ "feishuAssistants": {
+ "title": "FeishuAssistantsPanelView · 飛書助手管理",
+ "description": "查看助手卡片、執行狀態與進階設定。",
+ "options": "feature 與 instances 提供助手快照;檢視管理草稿與儲存回饋。onToggleInstance、onSaveInstance 與 renderConnectFlow 接入執行階段操作。",
+ "state": "助手執行狀態",
+ "error": "助手已停止。請檢查憑證後重新啟動。",
+ "on": "{{name}}:已開啟",
+ "off": "{{name}}:已關閉",
+ "saved": "{{name}}:已儲存 {{amount}} 個預覽欄位"
+ },
+ "whatsappConnect": {
+ "title": "WhatsAppConnectFlowView · WhatsApp 裝置連結",
+ "description": "比較連結、成功、到期與錯誤介面。",
+ "options": "檢視沿用自動開始與精簡版面的顯示規則;呼叫端控制狀態與重試。實際自動開始、強制重試與輪詢由連線功能入口負責。"
+ },
+ "linearPanel": {
+ "title": "LinearPanelView · Linear 設定",
+ "description": "查看應用設定、工作區、成員與瀏覽器授權。",
+ "options": "state 與 workspaces 提供快照;工作區、儲存與 MCP 操作透過回呼接入。三個插槽組合正式使用的成員、授權與重設檢視。",
+ "state": "Linear 設定狀態",
+ "runtimeError": "無法啟動 Linear webhook。",
+ "saveError": "無法儲存設定,已保留草稿。",
+ "inspectionError": "無法檢查已連線的工作區。",
+ "refreshed": "已重新整理範例工作區。",
+ "removed": "已移除範例工作區:{{name}}",
+ "mcp": "已選擇 Linear MCP 設定入口。"
+ },
+ "linearMembers": {
+ "title": "LinearMemberAccessView · 成員存取",
+ "description": "搜尋成員、修改權限並比較儲存狀態。",
+ "options": "snapshot 為已確認的成員狀態。onLoad 與 onSetAllowed 交給頻道入口;權限驗證仍由閘道負責。",
+ "state": "成員狀態",
+ "loadError": "成員目錄暫時無法使用。",
+ "saveError": "尚未確認存取權限。"
+ },
+ "linearConnect": {
+ "title": "LinearConnectFlowView · Linear 授權",
+ "description": "試用瀏覽器授權入口與各授權階段。",
+ "options": "重用 ChannelQrConnectFlowView。Linear 提供瀏覽器授權顯示、標籤與焦點處理;工作階段建立與輪詢留在執行階段入口。",
+ "state": "授權階段",
+ "error": "無法完成授權。",
+ "hint": "授權連結與工作區為範例資料;開始、取消僅更新預覽階段。"
+ },
+ "linearReset": {
+ "title": "LinearResetConnectionView · 重設連線",
+ "description": "查看清除範圍、忙碌與部分完成狀態。",
+ "options": "onReset 執行完整撤銷與清理交易;檢視管理確認、錯誤、關閉限制與焦點復原。",
+ "state": "重設結果",
+ "error": "無法停止頻道,已保留應用設定。",
+ "completed": "預覽工作區與應用設定已清除。"
+ },
+ "weixinPanel": {
+ "title": "WeixinPanelView · 微信設定",
+ "description": "查看微信設定、儲存回饋與登入復原。",
+ "options": "欄位來自頻道設定契約。檢視管理展開與金鑰可見狀態;執行階段入口負責自動儲存、草稿合併與登入復原。",
+ "state": "微信面板狀態"
+ },
+ "weixinConnect": {
+ "title": "WeixinConnectFlowView · 微信掃碼與驗證",
+ "description": "比較掃碼、驗證、到期與連線錯誤狀態。",
+ "options": "檢視接收連線快照與回呼,保留驗證碼草稿。QR 碼在瀏覽器中產生;授權啟動、輪詢暫停、重新整理與取消由實際入口負責。",
+ "state": "微信連線狀態",
+ "error": "連線中斷,請重試。",
+ "refreshed": "已顯示新的預覽 QR 碼。",
+ "hint": "驗證碼預覽輸入 123456 可完成連線;其他輸入會保留草稿並顯示錯誤。"
+ }
+}
diff --git a/webui/src/dev/gallery/locales/ui/en.json b/webui/src/dev/gallery/locales/ui/en.json
new file mode 100644
index 000000000..9745f3838
--- /dev/null
+++ b/webui/src/dev/gallery/locales/ui/en.json
@@ -0,0 +1,52 @@
+{
+ "pageTitle": "Nanobot component gallery",
+ "title": "Component gallery",
+ "subtitle": "Try components and their states",
+ "darkMode": "Dark mode",
+ "navigation": "Component navigation",
+ "inventoryView": "Inventory view",
+ "previews": "Previews",
+ "allSource": "All source",
+ "search": "Search components",
+ "searchPlaceholder": "Search name or path",
+ "category": "Category",
+ "componentCategory": "Component category",
+ "readingInventory": "Reading source inventory…",
+ "previewCount": "{{visible}} / {{total}} modules with previews",
+ "sourceCount": "{{visible}} / {{total}} source modules · {{previews}} with previews",
+ "sources": "Component sources",
+ "previewBadge": "Preview",
+ "sourceOnlyBadge": "Source only",
+ "noPreviews": "No matching previews.",
+ "noSources": "No matching source modules.",
+ "clearFilters": "Clear filters",
+ "searchAllSource": "Search all source",
+ "refreshInventory": "Refresh inventory",
+ "inventoryFailure": "Could not load the inventory. Check the Vite terminal and retry.",
+ "componentPreview": "Component preview",
+ "usage": "Usage",
+ "composedModules": "This example composes: {{modules}}",
+ "sourceOnlyTitle": "Source only",
+ "sourceOnlyDescription": "This entry indexes a source module. Use Previews to browse working examples.",
+ "relatedPreviews": "Related component previews",
+ "exports": "Exports",
+ "internalModule": "Internal module",
+ "references": "Direct references",
+ "referencesDescription": "Imports and re-exports in product source; tests and this gallery are excluded. Plugin registration may also load modules indirectly.",
+ "noReferences": "No direct source references found.",
+ "sourceCode": "Source code",
+ "loadingComponents": "Loading components…",
+ "noComponentFiles": "No component source files found.",
+ "groups": {
+ "all": "All",
+ "shared": "Shared views & shell",
+ "icons": "Icons",
+ "hosts": "Hosts",
+ "settings": "Settings",
+ "settingsShared": "Settings / shared",
+ "conversation": "Conversation",
+ "foundations": "Foundations",
+ "workbench": "Workbench",
+ "channel": "Channels / {{channel}}"
+ }
+}
diff --git a/webui/src/dev/gallery/locales/ui/es.json b/webui/src/dev/gallery/locales/ui/es.json
new file mode 100644
index 000000000..5fcb47cac
--- /dev/null
+++ b/webui/src/dev/gallery/locales/ui/es.json
@@ -0,0 +1,52 @@
+{
+ "pageTitle": "Galería de componentes de Nanobot",
+ "title": "Galería de componentes",
+ "subtitle": "Prueba los componentes y sus estados",
+ "darkMode": "Modo oscuro",
+ "navigation": "Navegación de componentes",
+ "inventoryView": "Vista del catálogo",
+ "previews": "Vistas previas",
+ "allSource": "Todo el código",
+ "search": "Buscar componentes",
+ "searchPlaceholder": "Buscar por nombre o ruta",
+ "category": "Categoría",
+ "componentCategory": "Categoría de componentes",
+ "readingInventory": "Leyendo el catálogo de código…",
+ "previewCount": "{{visible}} / {{total}} módulos con vista previa",
+ "sourceCount": "{{visible}} / {{total}} módulos de código · {{previews}} con vista previa",
+ "sources": "Código de componentes",
+ "previewBadge": "Vista previa",
+ "sourceOnlyBadge": "Solo código",
+ "noPreviews": "No hay vistas previas coincidentes.",
+ "noSources": "No hay módulos de código coincidentes.",
+ "clearFilters": "Borrar filtros",
+ "searchAllSource": "Buscar en todo el código",
+ "refreshInventory": "Actualizar catálogo",
+ "inventoryFailure": "No se pudo cargar el catálogo. Revisa la terminal de Vite e inténtalo de nuevo.",
+ "componentPreview": "Vista previa del componente",
+ "usage": "Uso",
+ "composedModules": "Este ejemplo combina: {{modules}}",
+ "sourceOnlyTitle": "Solo código fuente",
+ "sourceOnlyDescription": "Esta entrada enumera un módulo de código. Abre las vistas previas para probar ejemplos interactivos.",
+ "relatedPreviews": "Vistas previas relacionadas",
+ "exports": "Exportaciones",
+ "internalModule": "Módulo interno",
+ "references": "Referencias directas",
+ "referencesDescription": "Importaciones y reexportaciones en el código del producto, sin pruebas ni galería. El registro de complementos también puede cargar módulos indirectamente.",
+ "noReferences": "No se encontraron referencias directas en el código.",
+ "sourceCode": "Código fuente",
+ "loadingComponents": "Cargando componentes…",
+ "noComponentFiles": "No se encontraron archivos de código de componentes.",
+ "groups": {
+ "all": "Todas",
+ "shared": "Vistas compartidas e interfaz",
+ "icons": "Iconos",
+ "hosts": "Hosts",
+ "settings": "Ajustes",
+ "settingsShared": "Ajustes / compartidos",
+ "conversation": "Conversación",
+ "foundations": "Componentes básicos",
+ "workbench": "Área de trabajo",
+ "channel": "Canales / {{channel}}"
+ }
+}
diff --git a/webui/src/dev/gallery/locales/ui/fr.json b/webui/src/dev/gallery/locales/ui/fr.json
new file mode 100644
index 000000000..8932d0ce0
--- /dev/null
+++ b/webui/src/dev/gallery/locales/ui/fr.json
@@ -0,0 +1,52 @@
+{
+ "pageTitle": "Galerie de composants Nanobot",
+ "title": "Galerie de composants",
+ "subtitle": "Essayez les composants et leurs états",
+ "darkMode": "Mode sombre",
+ "navigation": "Navigation des composants",
+ "inventoryView": "Vue du catalogue",
+ "previews": "Aperçus",
+ "allSource": "Tout le code",
+ "search": "Rechercher des composants",
+ "searchPlaceholder": "Rechercher un nom ou un chemin",
+ "category": "Catégorie",
+ "componentCategory": "Catégorie de composants",
+ "readingInventory": "Lecture du catalogue source…",
+ "previewCount": "{{visible}} / {{total}} modules avec aperçu",
+ "sourceCount": "{{visible}} / {{total}} modules source · {{previews}} avec aperçu",
+ "sources": "Sources des composants",
+ "previewBadge": "Aperçu",
+ "sourceOnlyBadge": "Code seul",
+ "noPreviews": "Aucun aperçu correspondant.",
+ "noSources": "Aucun module source correspondant.",
+ "clearFilters": "Effacer les filtres",
+ "searchAllSource": "Rechercher dans tout le code",
+ "refreshInventory": "Actualiser le catalogue",
+ "inventoryFailure": "Impossible de charger le catalogue. Vérifiez le terminal Vite et réessayez.",
+ "componentPreview": "Aperçu du composant",
+ "usage": "Utilisation",
+ "composedModules": "Cet exemple assemble : {{modules}}",
+ "sourceOnlyTitle": "Code source uniquement",
+ "sourceOnlyDescription": "Cette entrée répertorie un module source. Ouvrez les aperçus pour essayer des exemples interactifs.",
+ "relatedPreviews": "Aperçus de composants associés",
+ "exports": "Exports",
+ "internalModule": "Module interne",
+ "references": "Références directes",
+ "referencesDescription": "Imports et réexports dans le code du produit, hors tests et galerie. L’enregistrement des extensions peut aussi charger des modules indirectement.",
+ "noReferences": "Aucune référence source directe trouvée.",
+ "sourceCode": "Code source",
+ "loadingComponents": "Chargement des composants…",
+ "noComponentFiles": "Aucun fichier source de composant trouvé.",
+ "groups": {
+ "all": "Toutes",
+ "shared": "Vues partagées et interface",
+ "icons": "Icônes",
+ "hosts": "Hôtes",
+ "settings": "Paramètres",
+ "settingsShared": "Paramètres / partagés",
+ "conversation": "Conversation",
+ "foundations": "Composants de base",
+ "workbench": "Espace de travail",
+ "channel": "Canaux / {{channel}}"
+ }
+}
diff --git a/webui/src/dev/gallery/locales/ui/id.json b/webui/src/dev/gallery/locales/ui/id.json
new file mode 100644
index 000000000..82dc5f520
--- /dev/null
+++ b/webui/src/dev/gallery/locales/ui/id.json
@@ -0,0 +1,52 @@
+{
+ "pageTitle": "Galeri komponen Nanobot",
+ "title": "Galeri komponen",
+ "subtitle": "Coba komponen dan berbagai statusnya",
+ "darkMode": "Mode gelap",
+ "navigation": "Navigasi komponen",
+ "inventoryView": "Tampilan katalog",
+ "previews": "Pratinjau",
+ "allSource": "Semua kode",
+ "search": "Cari komponen",
+ "searchPlaceholder": "Cari nama atau jalur",
+ "category": "Kategori",
+ "componentCategory": "Kategori komponen",
+ "readingInventory": "Membaca daftar kode sumber…",
+ "previewCount": "{{visible}} / {{total}} modul dengan pratinjau",
+ "sourceCount": "{{visible}} / {{total}} modul kode sumber · {{previews}} dengan pratinjau",
+ "sources": "Kode sumber komponen",
+ "previewBadge": "Pratinjau",
+ "sourceOnlyBadge": "Hanya kode",
+ "noPreviews": "Tidak ada pratinjau yang cocok.",
+ "noSources": "Tidak ada modul kode sumber yang cocok.",
+ "clearFilters": "Hapus filter",
+ "searchAllSource": "Cari di semua kode",
+ "refreshInventory": "Segarkan daftar",
+ "inventoryFailure": "Tidak dapat memuat daftar. Periksa terminal Vite lalu coba lagi.",
+ "componentPreview": "Pratinjau komponen",
+ "usage": "Penggunaan",
+ "composedModules": "Contoh ini menggabungkan: {{modules}}",
+ "sourceOnlyTitle": "Hanya kode sumber",
+ "sourceOnlyDescription": "Entri ini mencantumkan modul kode sumber. Buka Pratinjau untuk mencoba contoh interaktif.",
+ "relatedPreviews": "Pratinjau komponen terkait",
+ "exports": "Ekspor",
+ "internalModule": "Modul internal",
+ "references": "Referensi langsung",
+ "referencesDescription": "Impor dan ekspor ulang dalam kode produk, tidak termasuk pengujian dan galeri ini. Pendaftaran plugin juga dapat memuat modul secara tidak langsung.",
+ "noReferences": "Tidak ditemukan referensi langsung dalam kode sumber.",
+ "sourceCode": "Kode sumber",
+ "loadingComponents": "Memuat komponen…",
+ "noComponentFiles": "Tidak ditemukan berkas kode sumber komponen.",
+ "groups": {
+ "all": "Semua",
+ "shared": "Tampilan bersama dan kerangka aplikasi",
+ "icons": "Ikon",
+ "hosts": "Host",
+ "settings": "Pengaturan",
+ "settingsShared": "Pengaturan / bersama",
+ "conversation": "Percakapan",
+ "foundations": "Komponen dasar",
+ "workbench": "Ruang kerja",
+ "channel": "Kanal / {{channel}}"
+ }
+}
diff --git a/webui/src/dev/gallery/locales/ui/ja.json b/webui/src/dev/gallery/locales/ui/ja.json
new file mode 100644
index 000000000..acab816cc
--- /dev/null
+++ b/webui/src/dev/gallery/locales/ui/ja.json
@@ -0,0 +1,52 @@
+{
+ "pageTitle": "Nanobot コンポーネントギャラリー",
+ "title": "コンポーネントギャラリー",
+ "subtitle": "コンポーネントと各状態を試す",
+ "darkMode": "ダークモード",
+ "navigation": "コンポーネントナビゲーション",
+ "inventoryView": "一覧表示",
+ "previews": "プレビュー",
+ "allSource": "全ソース",
+ "search": "コンポーネントを検索",
+ "searchPlaceholder": "名前またはパスで検索",
+ "category": "カテゴリ",
+ "componentCategory": "コンポーネントのカテゴリ",
+ "readingInventory": "ソース一覧を読み込み中…",
+ "previewCount": "プレビュー付きモジュール {{visible}} / {{total}}",
+ "sourceCount": "ソースモジュール {{visible}} / {{total}} · プレビュー付き {{previews}}",
+ "sources": "コンポーネントのソース",
+ "previewBadge": "プレビュー",
+ "sourceOnlyBadge": "ソースのみ",
+ "noPreviews": "一致するプレビューはありません。",
+ "noSources": "一致するソースモジュールはありません。",
+ "clearFilters": "絞り込みを解除",
+ "searchAllSource": "全ソースを検索",
+ "refreshInventory": "一覧を更新",
+ "inventoryFailure": "一覧を読み込めませんでした。Vite のターミナルを確認して再試行してください。",
+ "componentPreview": "コンポーネントのプレビュー",
+ "usage": "使い方",
+ "composedModules": "このサンプルの構成:{{modules}}",
+ "sourceOnlyTitle": "ソースのみ",
+ "sourceOnlyDescription": "この項目はソースモジュールの一覧です。「プレビュー」で操作可能なサンプルを確認できます。",
+ "relatedPreviews": "関連コンポーネントのプレビュー",
+ "exports": "エクスポート",
+ "internalModule": "内部モジュール",
+ "references": "直接参照",
+ "referencesDescription": "製品ソース内のインポートと再エクスポートを表示します。テストとギャラリーは除外されます。プラグイン登録による間接読み込みもあります。",
+ "noReferences": "ソース内の直接参照は見つかりませんでした。",
+ "sourceCode": "ソースコード",
+ "loadingComponents": "コンポーネントを読み込み中…",
+ "noComponentFiles": "コンポーネントのソースファイルは見つかりませんでした。",
+ "groups": {
+ "all": "すべて",
+ "shared": "共有ビューとシェル",
+ "icons": "アイコン",
+ "hosts": "ホスト",
+ "settings": "設定",
+ "settingsShared": "設定 / 共有",
+ "conversation": "会話",
+ "foundations": "基本コンポーネント",
+ "workbench": "ワークベンチ",
+ "channel": "チャンネル / {{channel}}"
+ }
+}
diff --git a/webui/src/dev/gallery/locales/ui/ko.json b/webui/src/dev/gallery/locales/ui/ko.json
new file mode 100644
index 000000000..8c17f42fe
--- /dev/null
+++ b/webui/src/dev/gallery/locales/ui/ko.json
@@ -0,0 +1,52 @@
+{
+ "pageTitle": "Nanobot 컴포넌트 갤러리",
+ "title": "컴포넌트 갤러리",
+ "subtitle": "컴포넌트와 각 상태를 체험하세요",
+ "darkMode": "다크 모드",
+ "navigation": "컴포넌트 탐색",
+ "inventoryView": "목록 보기",
+ "previews": "미리보기",
+ "allSource": "전체 소스",
+ "search": "컴포넌트 검색",
+ "searchPlaceholder": "이름 또는 경로 검색",
+ "category": "분류",
+ "componentCategory": "컴포넌트 분류",
+ "readingInventory": "소스 목록을 읽는 중…",
+ "previewCount": "미리보기 모듈 {{visible}} / {{total}}",
+ "sourceCount": "소스 모듈 {{visible}} / {{total}} · 미리보기 {{previews}}",
+ "sources": "컴포넌트 소스",
+ "previewBadge": "미리보기",
+ "sourceOnlyBadge": "소스만",
+ "noPreviews": "일치하는 미리보기가 없습니다.",
+ "noSources": "일치하는 소스 모듈이 없습니다.",
+ "clearFilters": "필터 지우기",
+ "searchAllSource": "전체 소스 검색",
+ "refreshInventory": "목록 새로고침",
+ "inventoryFailure": "목록을 불러올 수 없습니다. Vite 터미널을 확인하고 다시 시도하세요.",
+ "componentPreview": "컴포넌트 미리보기",
+ "usage": "사용법",
+ "composedModules": "이 예제의 구성: {{modules}}",
+ "sourceOnlyTitle": "소스 코드만 제공",
+ "sourceOnlyDescription": "소스 모듈을 나열하는 항목입니다. 미리보기에서 동작하는 예제를 확인하세요.",
+ "relatedPreviews": "관련 컴포넌트 미리보기",
+ "exports": "내보내기",
+ "internalModule": "내부 모듈",
+ "references": "직접 참조",
+ "referencesDescription": "테스트와 갤러리를 제외한 제품 소스의 가져오기와 다시 내보내기입니다. 플러그인 등록으로 모듈을 간접 로드할 수도 있습니다.",
+ "noReferences": "직접 소스 참조를 찾지 못했습니다.",
+ "sourceCode": "소스 코드",
+ "loadingComponents": "컴포넌트를 불러오는 중…",
+ "noComponentFiles": "컴포넌트 소스 파일을 찾지 못했습니다.",
+ "groups": {
+ "all": "전체",
+ "shared": "공유 뷰와 셸",
+ "icons": "아이콘",
+ "hosts": "호스트",
+ "settings": "설정",
+ "settingsShared": "설정 / 공유",
+ "conversation": "대화",
+ "foundations": "기본 컴포넌트",
+ "workbench": "작업 공간",
+ "channel": "채널 / {{channel}}"
+ }
+}
diff --git a/webui/src/dev/gallery/locales/ui/pt-BR.json b/webui/src/dev/gallery/locales/ui/pt-BR.json
new file mode 100644
index 000000000..205098035
--- /dev/null
+++ b/webui/src/dev/gallery/locales/ui/pt-BR.json
@@ -0,0 +1,52 @@
+{
+ "pageTitle": "Galeria de componentes do Nanobot",
+ "title": "Galeria de componentes",
+ "subtitle": "Experimente os componentes e seus estados",
+ "darkMode": "Modo escuro",
+ "navigation": "Navegação de componentes",
+ "inventoryView": "Visualização do catálogo",
+ "previews": "Prévias",
+ "allSource": "Todo o código",
+ "search": "Buscar componentes",
+ "searchPlaceholder": "Buscar por nome ou caminho",
+ "category": "Categoria",
+ "componentCategory": "Categoria de componentes",
+ "readingInventory": "Lendo o catálogo de código…",
+ "previewCount": "{{visible}} / {{total}} módulos com prévia",
+ "sourceCount": "{{visible}} / {{total}} módulos de código · {{previews}} com prévia",
+ "sources": "Código dos componentes",
+ "previewBadge": "Prévia",
+ "sourceOnlyBadge": "Somente código",
+ "noPreviews": "Nenhuma prévia correspondente.",
+ "noSources": "Nenhum módulo de código correspondente.",
+ "clearFilters": "Limpar filtros",
+ "searchAllSource": "Buscar em todo o código",
+ "refreshInventory": "Atualizar catálogo",
+ "inventoryFailure": "Não foi possível carregar o catálogo. Verifique o terminal do Vite e tente novamente.",
+ "componentPreview": "Prévia do componente",
+ "usage": "Uso",
+ "composedModules": "Este exemplo combina: {{modules}}",
+ "sourceOnlyTitle": "Somente código-fonte",
+ "sourceOnlyDescription": "Esta entrada lista um módulo de código. Abra as prévias para experimentar exemplos interativos.",
+ "relatedPreviews": "Prévias de componentes relacionados",
+ "exports": "Exportações",
+ "internalModule": "Módulo interno",
+ "references": "Referências diretas",
+ "referencesDescription": "Importações e reexportações no código do produto, excluindo testes e a galeria. O registro de plugins também pode carregar módulos indiretamente.",
+ "noReferences": "Nenhuma referência direta encontrada no código.",
+ "sourceCode": "Código-fonte",
+ "loadingComponents": "Carregando componentes…",
+ "noComponentFiles": "Nenhum arquivo de código de componente encontrado.",
+ "groups": {
+ "all": "Todas",
+ "shared": "Visualizações compartilhadas e interface",
+ "icons": "Ícones",
+ "hosts": "Hosts",
+ "settings": "Configurações",
+ "settingsShared": "Configurações / compartilhados",
+ "conversation": "Conversa",
+ "foundations": "Componentes básicos",
+ "workbench": "Área de trabalho",
+ "channel": "Canais / {{channel}}"
+ }
+}
diff --git a/webui/src/dev/gallery/locales/ui/vi.json b/webui/src/dev/gallery/locales/ui/vi.json
new file mode 100644
index 000000000..56209b7e3
--- /dev/null
+++ b/webui/src/dev/gallery/locales/ui/vi.json
@@ -0,0 +1,52 @@
+{
+ "pageTitle": "Thư viện thành phần Nanobot",
+ "title": "Thư viện thành phần",
+ "subtitle": "Dùng thử các thành phần và trạng thái",
+ "darkMode": "Chế độ tối",
+ "navigation": "Điều hướng thành phần",
+ "inventoryView": "Chế độ xem danh mục",
+ "previews": "Xem trước",
+ "allSource": "Toàn bộ mã",
+ "search": "Tìm thành phần",
+ "searchPlaceholder": "Tìm theo tên hoặc đường dẫn",
+ "category": "Danh mục",
+ "componentCategory": "Danh mục thành phần",
+ "readingInventory": "Đang đọc danh sách mã nguồn…",
+ "previewCount": "{{visible}} / {{total}} mô-đun có bản xem trước",
+ "sourceCount": "{{visible}} / {{total}} mô-đun mã nguồn · {{previews}} có bản xem trước",
+ "sources": "Mã nguồn thành phần",
+ "previewBadge": "Xem trước",
+ "sourceOnlyBadge": "Chỉ mã nguồn",
+ "noPreviews": "Không có bản xem trước phù hợp.",
+ "noSources": "Không có mô-đun mã nguồn phù hợp.",
+ "clearFilters": "Xóa bộ lọc",
+ "searchAllSource": "Tìm trong toàn bộ mã",
+ "refreshInventory": "Làm mới danh sách",
+ "inventoryFailure": "Không tải được danh sách. Hãy kiểm tra cửa sổ lệnh Vite rồi thử lại.",
+ "componentPreview": "Xem trước thành phần",
+ "usage": "Cách dùng",
+ "composedModules": "Ví dụ này kết hợp: {{modules}}",
+ "sourceOnlyTitle": "Chỉ có mã nguồn",
+ "sourceOnlyDescription": "Mục này liệt kê một mô-đun mã nguồn. Mở phần Xem trước để dùng thử các ví dụ tương tác.",
+ "relatedPreviews": "Bản xem trước liên quan",
+ "exports": "Thành phần xuất",
+ "internalModule": "Mô-đun nội bộ",
+ "references": "Tham chiếu trực tiếp",
+ "referencesDescription": "Các lệnh nhập và tái xuất trong mã sản phẩm, không gồm kiểm thử và thư viện này. Việc đăng ký tiện ích cũng có thể tải mô-đun gián tiếp.",
+ "noReferences": "Không tìm thấy tham chiếu trực tiếp trong mã.",
+ "sourceCode": "Mã nguồn",
+ "loadingComponents": "Đang tải thành phần…",
+ "noComponentFiles": "Không tìm thấy tệp mã nguồn thành phần.",
+ "groups": {
+ "all": "Tất cả",
+ "shared": "Giao diện dùng chung và khung ứng dụng",
+ "icons": "Biểu tượng",
+ "hosts": "Máy chủ",
+ "settings": "Cài đặt",
+ "settingsShared": "Cài đặt / dùng chung",
+ "conversation": "Hội thoại",
+ "foundations": "Thành phần cơ bản",
+ "workbench": "Không gian làm việc",
+ "channel": "Kênh / {{channel}}"
+ }
+}
diff --git a/webui/src/dev/gallery/locales/ui/zh-CN.json b/webui/src/dev/gallery/locales/ui/zh-CN.json
new file mode 100644
index 000000000..23968f81e
--- /dev/null
+++ b/webui/src/dev/gallery/locales/ui/zh-CN.json
@@ -0,0 +1,52 @@
+{
+ "pageTitle": "Nanobot 组件图鉴",
+ "title": "组件图鉴",
+ "subtitle": "查看组件效果与交互状态",
+ "darkMode": "深色模式",
+ "navigation": "组件导航",
+ "inventoryView": "目录视图",
+ "previews": "预览",
+ "allSource": "全部源码",
+ "search": "搜索组件",
+ "searchPlaceholder": "搜索名称或路径",
+ "category": "分类",
+ "componentCategory": "组件分类",
+ "readingInventory": "正在读取源码目录…",
+ "previewCount": "{{visible}} / {{total}} 个可预览模块",
+ "sourceCount": "{{visible}} / {{total}} 个源码模块 · {{previews}} 个可预览",
+ "sources": "组件源码",
+ "previewBadge": "可预览",
+ "sourceOnlyBadge": "仅源码",
+ "noPreviews": "没有匹配的预览。",
+ "noSources": "没有匹配的源码模块。",
+ "clearFilters": "清除筛选",
+ "searchAllSource": "搜索全部源码",
+ "refreshInventory": "刷新目录",
+ "inventoryFailure": "无法加载组件目录。请检查 Vite 终端后重试。",
+ "componentPreview": "组件预览",
+ "usage": "使用方法",
+ "composedModules": "此示例组合了:{{modules}}",
+ "sourceOnlyTitle": "暂无独立预览",
+ "sourceOnlyDescription": "此条目收录源码模块,切换到“预览”查看可操作示例。",
+ "relatedPreviews": "相关组件预览",
+ "exports": "导出",
+ "internalModule": "内部模块",
+ "references": "直接引用",
+ "referencesDescription": "列出产品源码中的导入和再导出,不含测试与图鉴本身。插件注册也可能间接加载模块。",
+ "noReferences": "未找到直接源码引用。",
+ "sourceCode": "源码",
+ "loadingComponents": "正在加载组件…",
+ "noComponentFiles": "未找到组件源码文件。",
+ "groups": {
+ "all": "全部",
+ "shared": "共享视图与外壳",
+ "icons": "图标",
+ "hosts": "主机",
+ "settings": "设置",
+ "settingsShared": "设置 / 共享组件",
+ "conversation": "会话",
+ "foundations": "基础组件",
+ "workbench": "工作台",
+ "channel": "频道 / {{channel}}"
+ }
+}
diff --git a/webui/src/dev/gallery/locales/ui/zh-TW.json b/webui/src/dev/gallery/locales/ui/zh-TW.json
new file mode 100644
index 000000000..2f66a3092
--- /dev/null
+++ b/webui/src/dev/gallery/locales/ui/zh-TW.json
@@ -0,0 +1,52 @@
+{
+ "pageTitle": "Nanobot 元件圖鑑",
+ "title": "元件圖鑑",
+ "subtitle": "查看元件效果與互動狀態",
+ "darkMode": "深色模式",
+ "navigation": "元件導覽",
+ "inventoryView": "目錄檢視",
+ "previews": "預覽",
+ "allSource": "全部原始碼",
+ "search": "搜尋元件",
+ "searchPlaceholder": "搜尋名稱或路徑",
+ "category": "分類",
+ "componentCategory": "元件分類",
+ "readingInventory": "正在讀取原始碼目錄…",
+ "previewCount": "{{visible}} / {{total}} 個可預覽模組",
+ "sourceCount": "{{visible}} / {{total}} 個原始碼模組 · {{previews}} 個可預覽",
+ "sources": "元件原始碼",
+ "previewBadge": "可預覽",
+ "sourceOnlyBadge": "僅原始碼",
+ "noPreviews": "沒有相符的預覽。",
+ "noSources": "沒有相符的原始碼模組。",
+ "clearFilters": "清除篩選",
+ "searchAllSource": "搜尋全部原始碼",
+ "refreshInventory": "重新整理目錄",
+ "inventoryFailure": "無法載入元件目錄。請檢查 Vite 終端機後重試。",
+ "componentPreview": "元件預覽",
+ "usage": "使用方式",
+ "composedModules": "此範例組合了:{{modules}}",
+ "sourceOnlyTitle": "尚無獨立預覽",
+ "sourceOnlyDescription": "此項目收錄原始碼模組,切換至「預覽」查看可操作的範例。",
+ "relatedPreviews": "相關元件預覽",
+ "exports": "匯出",
+ "internalModule": "內部模組",
+ "references": "直接引用",
+ "referencesDescription": "列出產品原始碼中的匯入與重新匯出,不含測試與圖鑑本身。外掛註冊也可能間接載入模組。",
+ "noReferences": "找不到直接原始碼引用。",
+ "sourceCode": "原始碼",
+ "loadingComponents": "正在載入元件…",
+ "noComponentFiles": "找不到元件原始碼檔案。",
+ "groups": {
+ "all": "全部",
+ "shared": "共用檢視與外殼",
+ "icons": "圖示",
+ "hosts": "主機",
+ "settings": "設定",
+ "settingsShared": "設定 / 共用元件",
+ "conversation": "對話",
+ "foundations": "基礎元件",
+ "workbench": "工作台",
+ "channel": "頻道 / {{channel}}"
+ }
+}
diff --git a/webui/src/dev/gallery/main.tsx b/webui/src/dev/gallery/main.tsx
index 99fac5791..b8d98b770 100644
--- a/webui/src/dev/gallery/main.tsx
+++ b/webui/src/dev/gallery/main.tsx
@@ -1,6 +1,6 @@
import { createRoot } from "react-dom/client";
-import { initializeI18n } from "@/i18n";
+import { initializeGalleryI18n } from "./i18n";
import { Gallery } from "./Gallery";
import "@/globals.css";
import "./gallery.css";
@@ -8,4 +8,4 @@ import "./gallery.css";
const root = document.getElementById("root");
if (!root) throw new Error("Gallery root element missing");
-void initializeI18n().then(() => createRoot(root).render(<Gallery />));
+void initializeGalleryI18n().then(() => createRoot(root).render(<Gallery />));
diff --git a/webui/src/dev/gallery/providers.tsx b/webui/src/dev/gallery/providers.tsx
index 5db4bc05a..4eafb41f9 100644
--- a/webui/src/dev/gallery/providers.tsx
+++ b/webui/src/dev/gallery/providers.tsx
@@ -7,6 +7,7 @@ import { Button } from "@/components/ui/button";
import type { SettingsPayload } from "@/lib/types";
import type { ComponentExample } from "./example";
import { settings } from "./settings";
+import { useGalleryTranslation } from "./i18n";
type ProviderRow = SettingsPayload["providers"][number];
@@ -55,6 +56,7 @@ function providerValues(form: ProviderForm) {
function ProvidersPreview() {
const { t } = useTranslation();
+ const { t: g } = useGalleryTranslation();
const [payload, setPayload] = useState<SettingsPayload>(() => ({
...settings, providers: previewProviders, provider_api_configuration_supported: true,
}));
@@ -64,7 +66,7 @@ function ProvidersPreview() {
const [editingKeys, setEditingKeys] = useState<Record<string, boolean>>({});
const [entry, setEntry] = useState<ProviderSettingsEntry | null>(null);
const [showBrandLogos, setShowBrandLogos] = useState(true);
- const [notice, setNotice] = useState("");
+ const [notice, setNotice] = useState<{ key: string; name?: string } | null>(null);
const trigger = useRef<HTMLButtonElement | null>(null);
const nextCustomId = useRef(1);
const providerRows: Record<string, ProviderRow> = Object.fromEntries(payload.providers.map((provider) => [provider.name, provider]));
@@ -78,7 +80,7 @@ function ProvidersPreview() {
const form = drafts[name];
const values = providerValues(form);
if (!values) {
- setNotice("请输入有效的请求参数 JSON;请求头和查询参数的值须为字符串。");
+ setNotice({ key: "invalidParameters" });
return false;
}
setPayload((current) => ({ ...current, providers: current.providers.map((provider) => provider.name === name
@@ -87,13 +89,13 @@ function ProvidersPreview() {
: provider) }));
setDrafts((current) => ({ ...current, [name]: { ...form, apiKey: "" } }));
setEditingKeys((current) => ({ ...current, [name]: false }));
- setNotice(`已保存 ${providerRows[name].label} 的预览配置`);
+ setNotice({ key: "saved", name: providerRows[name].label });
return true;
};
const createCustomProvider = async (form: CustomProviderDraft) => {
const values = providerValues(form);
if (!values) {
- setNotice("请输入有效的请求参数 JSON;请求头和查询参数的值须为字符串。");
+ setNotice({ key: "invalidParameters" });
return null;
}
const name = `custom_preview_${nextCustomId.current++}`;
@@ -103,13 +105,13 @@ function ProvidersPreview() {
const next: SettingsPayload = { ...payload, providers: [...payload.providers, row], created_provider: name };
setPayload(next);
setDrafts((current) => ({ ...current, [name]: providerFormFromRow(row) }));
- setNotice(`已添加 ${row.label}`);
+ setNotice({ key: "added", name: row.label });
return next;
};
const changeOAuth = (name: string, configured: boolean) => {
setPayload((current) => ({ ...current, providers: current.providers.map((provider) => provider.name === name
? { ...provider, configured } : provider) }));
- setNotice(configured ? "预览授权状态已设为已登录" : "预览授权状态已设为未登录");
+ setNotice({ key: configured ? "signedIn" : "signedOut" });
};
return <div className="space-y-4">
@@ -123,15 +125,15 @@ function ProvidersPreview() {
setEntry({ kind: "add" });
}}>{t("settings.providers.addProvider")}</Button>
<Button variant="ghost" aria-pressed={showBrandLogos} onClick={() => setShowBrandLogos((current) => !current)}>
- {showBrandLogos ? "使用内置图标" : "使用品牌图标"}
+ {g(showBrandLogos ? "controls.providers.builtInIcons" : "controls.providers.brandIcons")}
</Button>
</div>
<p role="status" className="text-xs text-muted-foreground">
- {notice || `${payload.providers.filter((provider) => provider.configured).length} 个已配置提供商`}
+ {notice ? g(`controls.providers.${notice.key}`, { name: notice.name }) : g("controls.providers.configured", { count: payload.providers.filter((provider) => provider.configured).length })}
</p>
{entry ? <ProvidersSettings entry={entry} settings={payload} showBrandLogos={showBrandLogos}
onClose={() => setEntry(null)} onCloseAutoFocus={(event) => { event.preventDefault(); trigger.current?.focus(); }}
- onProviderAdded={() => setNotice("已添加提供商")}
+ onProviderAdded={() => setNotice({ key: "providerAdded" })}
nanobotFeatures={null} featureAction={null} capabilityError={null} providerForms={drafts}
visibleProviderKeys={visibleKeys} editingProviderKeys={editingKeys} providerSaving={null} remoteBrowserAccess={false}
onResetProviderDraft={resetDraft}
@@ -144,8 +146,8 @@ function ProvidersPreview() {
}
export const providerExamples: ComponentExample[] = [
- { title: "ProvidersSettings · 管理提供商", files: ["webui/src/components/settings/models/ProviderSettings.tsx"], Preview: ProvidersPreview,
- description: "查看真实提供商管理弹窗与添加流程。",
- options: "复用设置中的 ProvidersSettings。目录、表单与保存回调由调用方控制;此处修改本地示例数据,支持配置、搜索、创建与取消。",
+ { title: "controls.providers.title", files: ["webui/src/components/settings/models/ProviderSettings.tsx"], Preview: ProvidersPreview,
+ description: "controls.providers.description",
+ options: "controls.providers.options",
code: '<ProvidersSettings entry={{ kind: "manage" }} settings={settings} providerForms={drafts} showBrandLogos={true} onSaveProvider={save} onCreateCustomProvider={create} {...callbacks} />' },
];
diff --git a/webui/src/dev/gallery/remote.tsx b/webui/src/dev/gallery/remote.tsx
index 2a7f51d36..bce327129 100644
--- a/webui/src/dev/gallery/remote.tsx
+++ b/webui/src/dev/gallery/remote.tsx
@@ -9,6 +9,7 @@ import { Dialog, DialogContent } from "@/components/ui/dialog";
import { copyTextToClipboard } from "@/lib/clipboard";
import type { SSHDiscovery } from "@/lib/remote-instances";
import { StatePicker, type ComponentExample } from "./example";
+import { useGalleryTranslation } from "./i18n";
import "@/components/remote/remote-layout.css";
const routes = [{ id: "gallery-ssh", name: "开发 SSH 路由" }, { id: "gallery-vpn", name: "VPN 路由" }];
@@ -20,18 +21,19 @@ function RouteEditor({ story }: { story: RouteStory }) {
const [route, setRoute] = useState(initial);
const [original, setOriginal] = useState(story === "saving" || story === "save_error" ? "direct" : initial);
const [saved, setSaved] = useState(story === "refresh_error");
- const [error, setError] = useState(story === "save_error" ? t("remote.errors.pair_route_mismatch")
- : story === "refresh_error" ? t("remote.errors.directory_unavailable") : "");
+ const [error, setError] = useState(story === "save_error" ? "remote.errors.pair_route_mismatch"
+ : story === "refresh_error" ? "remote.errors.directory_unavailable" : "");
return <PairRouteSettingsView hasSavedRoute={story === "saved_route"} routes={routes}
- route={route} original={original} busy={story === "saving"} error={error} saved={saved}
+ route={route} original={original} busy={story === "saving"} error={error ? t(error) : ""} saved={saved}
onRouteChange={(next) => { setRoute(next); setError(""); setSaved(false); }}
onSave={() => { setOriginal(route); setSaved(true); setError(""); }} />;
}
function PairRoutePreview() {
+ const { t } = useGalleryTranslation();
const [story, setStory] = useState<RouteStory>("direct");
return <>
- <StatePicker label="路由状态" value={story} options={["direct", "saved_route", "saving", "save_error", "refresh_error"]} onChange={setStory} />
+ <StatePicker label={t("previews.pairRoute.state")} value={story} options={["direct", "saved_route", "saving", "save_error", "refresh_error"]} onChange={setStory} />
<RouteEditor key={story} story={story} />
</>;
}
@@ -60,20 +62,21 @@ function pairState(story: PairStory): QuickPairSetupState {
}
function QuickPairPreview() {
+ const { t } = useGalleryTranslation();
const [story, setStory] = useState<PairStory>("invite");
const [state, setState] = useState(() => pairState("invite"));
const [open, setOpen] = useState(false);
const [feedback, setFeedback] = useState("");
return <div className="space-y-4">
- <StatePicker label="配对阶段" value={story} options={["invite", "copied", "manual", "confirm", "existing", "saved_retry", "waiting", "expired"]}
+ <StatePicker label={t("previews.quickPair.state")} value={story} options={["invite", "copied", "manual", "confirm", "existing", "saved_retry", "waiting", "expired"]}
onChange={(next) => { setStory(next); setState(pairState(next)); setFeedback(""); }} />
- <Button variant="outline" onClick={() => setOpen(true)}>打开快速配对</Button>
+ <Button variant="outline" onClick={() => setOpen(true)}>{t("previews.quickPair.open")}</Button>
<Dialog open={open} onOpenChange={setOpen}>
<DialogContent className="remote-dialog max-w-sm">
<QuickPairSetupView state={state} routeSettings={<RouteEditor story="saved_route" />}
onStart={() => { setState(pairState("invite")); setStory("invite"); }}
onReview={() => setState((current) => ({ ...current, preview, error: "" }))}
- onConnect={() => { setFeedback("已选择连接:开发主机。"); setOpen(false); }}
+ onConnect={() => { setFeedback("previews.quickPair.connected"); setOpen(false); }}
onCopyCommand={() => {
if (!state.request) return;
void copyTextToClipboard(state.request.command).then((copied) => setState((current) => ({
@@ -84,10 +87,10 @@ function QuickPairPreview() {
onManualChange={(manual) => setState((current) => ({ ...current, manual, panel: null, error: "" }))}
onPanelChange={(panel) => setState((current) => ({ ...current, panel }))}
onBack={() => setState((current) => ({ ...current, preview: null, error: "", manual: current.manual || !current.request?.command }))}
- onCancel={() => setOpen(false)} onSSH={() => { setFeedback("已选择 SSH 连接方式。"); setOpen(false); }} />
+ onCancel={() => setOpen(false)} onSSH={() => { setFeedback("previews.quickPair.ssh"); setOpen(false); }} />
</DialogContent>
</Dialog>
- <p role="status" className="text-xs text-muted-foreground">{feedback || "示例邀请与回执仅用于展示;确认动作更新本地反馈。"}</p>
+ <p role="status" className="text-xs text-muted-foreground">{t(feedback || "previews.quickPair.hint", { name: preview.hostname })}</p>
</div>;
}
@@ -103,35 +106,36 @@ type SSHStory = "ready" | "custom_config" | "imported" | "loading" | "error" | "
function SSHHostPreview() {
const { t } = useTranslation();
+ const { t: g } = useGalleryTranslation();
const [story, setStory] = useState<SSHStory>("ready");
const [value, setValue] = useState("");
- const [feedback, setFeedback] = useState("");
+ const [feedback, setFeedback] = useState<{ key: string; value?: string } | null>(null);
const input = useRef<HTMLInputElement>(null);
return <div className="space-y-4">
- <StatePicker label="SSH 地址状态" value={story} options={["ready", "custom_config", "imported", "loading", "error", "partial", "address_only"]}
- onChange={(next) => { setStory(next); setValue(next === "custom_config" ? "[email protected]" : next === "imported" ? "dev" : ""); setFeedback(""); }} />
+ <StatePicker label={g("previews.sshHost.state")} value={story} options={["ready", "custom_config", "imported", "loading", "error", "partial", "address_only"]}
+ onChange={(next) => { setStory(next); setValue(next === "custom_config" ? "[email protected]" : next === "imported" ? "dev" : ""); setFeedback(null); }} />
<SSHHostPickerView disabled={false} value={value} imported={story === "imported"}
suggestions={story !== "address_only"} customConfig={story === "custom_config"}
discovery={story === "error" ? null : story === "partial" ? { ...discovery, incomplete: true } : discovery}
busy={story === "loading"} error={story === "error" ? t("remote.discoveryError") : ""}
- onRefresh={() => { setStory("ready"); setFeedback("已刷新示例地址。"); }}
- onChange={setValue} onBlur={() => setFeedback(value ? `已输入:${value}` : "")}
+ onRefresh={() => { setStory("ready"); setFeedback({ key: "previews.sshHost.refreshed" }); }}
+ onChange={setValue} onBlur={() => setFeedback(value ? { key: "previews.sshHost.entered", value } : null)}
inputRef={input} />
- <p role="status" className="text-xs text-muted-foreground">{feedback || "输入内容筛选地址;按方向键选择 SSH 别名。"}</p>
+ <p role="status" className="text-xs text-muted-foreground">{feedback ? g(feedback.key, { value: feedback.value }) : g("previews.sshHost.hint")}</p>
</div>;
}
export const remoteExamples: ComponentExample[] = [
- { title: "PairRouteSettingsView · 配对路由", files: ["webui/src/components/remote/PairRouteSettingsView.tsx"], Preview: PairRoutePreview,
- description: "切换已存路由、保存、出错和刷新失败状态,选择路由后在本地保存。",
- options: "route 与 original 由调用方管理;routes 提供 SSH 路由。保存成功与目录刷新失败分别呈现,画廊与实际设置使用同一个视图。",
+ { title: "previews.pairRoute.title", files: ["webui/src/components/remote/PairRouteSettingsView.tsx"], Preview: PairRoutePreview,
+ description: "previews.pairRoute.description",
+ options: "previews.pairRoute.options",
code: '<PairRouteSettingsView hasSavedRoute={hasSavedRoute} routes={routes} route={route} original={original} busy={busy} error={error} saved={saved} onRouteChange={setRoute} onSave={save} />' },
- { title: "QuickPairSetupView · 快速配对", files: ["webui/src/components/remote/QuickPairSetupView.tsx"], Preview: QuickPairPreview,
- description: "体验邀请复制、回执输入、访问确认、已有主机和保存后重试界面。",
- options: "state 提供当前配对结果与显示状态,回调交给所属界面执行动作,routeSettings 组合路由设置。画廊使用示例数据和本地回调;实际配对由 QuickPairSetup 管理。",
+ { title: "previews.quickPair.title", files: ["webui/src/components/remote/QuickPairSetupView.tsx"], Preview: QuickPairPreview,
+ description: "previews.quickPair.description",
+ options: "previews.quickPair.options",
code: '<QuickPairSetupView state={state} routeSettings={routeSettings} onStart={start} onReview={review} onConnect={connect} onCopyCommand={copy} onCodeChange={setCode} onManualChange={setManual} onPanelChange={setPanel} onBack={back} onCancel={cancel} onSSH={showSSH} />' },
- { title: "SSHHostPickerView · SSH 地址", files: ["webui/src/components/remote/SSHHostPickerView.tsx"], Preview: SSHHostPreview,
- description: "筛选 SSH 别名,使用方向键选择,查看导入、读取和错误状态。",
- options: "discovery 提供当前配置文件的地址;value、busy、error 与回调由调用方控制。customConfig 保留自定义配置的别名发现行为,inputRef 用于选择后的焦点。",
+ { title: "previews.sshHost.title", files: ["webui/src/components/remote/SSHHostPickerView.tsx"], Preview: SSHHostPreview,
+ description: "previews.sshHost.description",
+ options: "previews.sshHost.options",
code: '<SSHHostPickerView disabled={false} value={host} imported={false} discovery={discovery} busy={busy} error={error} onRefresh={refresh} onChange={setHost} onBlur={validateHost} inputRef={hostInput} />' },
];
diff --git a/webui/src/dev/gallery/runtime-settings.tsx b/webui/src/dev/gallery/runtime-settings.tsx
index 679e76018..70b7e8ce1 100644
--- a/webui/src/dev/gallery/runtime-settings.tsx
+++ b/webui/src/dev/gallery/runtime-settings.tsx
@@ -11,6 +11,7 @@ import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from
import { DEFAULT_LOCAL_PREFS } from "@/lib/local-preferences";
import type { AutomationChatsPayload, SessionAutomationJob } from "@/lib/types";
import { StatePicker, type ComponentExample } from "./example";
+import { useGalleryTranslation } from "./i18n";
const job: SessionAutomationJob = {
id: "gallery-report", name: "Weekly summary", enabled: true, chat_binding_revision: "gallery-1",
@@ -26,26 +27,28 @@ const chats: AutomationChatsPayload = {
};
function RunResultPreview() {
+ const { t, i18n } = useGalleryTranslation();
const [mode, setMode] = useState<"complete" | "loading" | "error" | "empty" | "unavailable">("complete");
const [open, setOpen] = useState(false);
const trigger = useRef<HTMLButtonElement>(null);
const result: AutomationRunResult = mode === "loading" || mode === "error"
? { status: mode, response: null }
: { status: "loaded", response: mode === "empty" ? "" : mode === "unavailable" ? null : "## Weekly summary\n\n- **Completed:** component previews\n- **Next:** review the changes" };
- return <><StatePicker label="运行结果" value={mode} options={["complete", "loading", "error", "empty", "unavailable"]} onChange={setMode} />
- <Button ref={trigger} variant="outline" onClick={() => setOpen(true)}>查看运行结果</Button>
+ return <><StatePicker label={t("controls.runResult.state")} value={mode} options={["complete", "loading", "error", "empty", "unavailable"]} onChange={setMode} />
+ <Button ref={trigger} variant="outline" onClick={() => setOpen(true)}>{t("controls.runResult.view")}</Button>
<AutomationRunDialogView job={job} run={{ run_at_ms: Date.UTC(2026, 9, 12, 9, 30), status: "ok", duration_ms: 3200 }}
- locale="zh-CN" open={open} result={result} onRetry={() => setMode("complete")} onOpenChange={setOpen}
+ locale={i18n.language} open={open} result={result} onRetry={() => setMode("complete")} onOpenChange={setOpen}
onCloseAutoFocus={(event) => { event.preventDefault(); trigger.current?.focus(); }} /></>;
}
function ChatBindingPreview() {
+ const { t } = useGalleryTranslation();
const [mode, setMode] = useState<"ready" | "pending" | "load-error" | "conflict">("ready");
const [task, setTask] = useState(job);
const [data, setData] = useState(chats);
- const [notice, setNotice] = useState("");
- return <><StatePicker label="聊天绑定状态" value={mode} options={["ready", "pending", "load-error", "conflict"]} onChange={setMode} />
- <Dialog><DialogTrigger asChild><Button variant="outline">设置运行聊天</Button></DialogTrigger>
+ const [targetTitle, setTargetTitle] = useState("");
+ return <><StatePicker label={t("controls.chatBinding.state")} value={mode} options={["ready", "pending", "load-error", "conflict"]} onChange={setMode} />
+ <Dialog><DialogTrigger asChild><Button variant="outline">{t("controls.chatBinding.setChat")}</Button></DialogTrigger>
<DialogContent aria-describedby={undefined} className="max-w-[520px] gap-0 p-0">
<AutomationChatBindingView job={mode === "pending" ? { ...task, state: { pending: true } } : task}
data={data} loadError={mode === "load-error"} showBrandLogos={false} onReload={() => setMode("ready")}
@@ -54,27 +57,28 @@ function ChatBindingPreview() {
setTask((current) => ({ ...current, chat_binding_revision: `${current.chat_binding_revision}-next`, payload: { ...current.payload, message: values.message } }));
}} onSaved={(target) => {
setData((current) => ({ ...current, current: target, revision: `${current.revision}-next` }));
- setNotice(`下次运行将在 ${target.title} 中进行`);
+ setTargetTitle(target.title);
}}>{(picker) => <>
<DialogHeader className="px-6 pb-4 pr-12 pt-5"><DialogTitle>{task.name}</DialogTitle></DialogHeader>
<div className="px-6 pb-6">{picker}</div>
</>}</AutomationChatBindingView>
</DialogContent>
- </Dialog><p role="status" className="mt-4 text-xs text-muted-foreground">{notice || "选择目标聊天,确认或修改任务说明。"}</p></>;
+ </Dialog><p role="status" className="mt-4 text-xs text-muted-foreground">{targetTitle ? t("controls.chatBinding.saved", { title: targetTitle }) : t("controls.chatBinding.hint")}</p></>;
}
function AboutPreview() {
+ const { t } = useGalleryTranslation();
const [mode, setMode] = useState<"ready" | "checking" | "up-to-date" | "update" | "error">("ready");
- const [notice, setNotice] = useState("");
+ const [selectedLink, setSelectedLink] = useState(false);
const result: VersionCheckState = mode === "up-to-date" ? { type: mode }
: mode === "update" ? { type: mode, latestVersion: "0.3.6", pypiUrl: "https://pypi.org/project/nanobot-ai/" }
- : mode === "error" ? { type: mode, message: "无法获取版本信息,请重试。" } : null;
- return <><StatePicker label="版本状态" value={mode} options={["ready", "checking", "up-to-date", "update", "error"]} onChange={setMode} />
+ : mode === "error" ? { type: mode, message: t("controls.about.error") } : null;
+ return <><StatePicker label={t("controls.about.state")} value={mode} options={["ready", "checking", "up-to-date", "update", "error"]} onChange={setMode} />
<AboutSettingsView reportIssueUrl="https://github.com/HKUDS/nanobot/issues/new?template=bug_report.yml"
versionCheck={<VersionCheckRowView currentVersion="0.3.5" currentCommit="abcdef1234567890" checking={mode === "checking"}
result={result} onCheck={() => setMode("update")} />}
- starLink={<StarLinkView onActivate={() => setNotice("选择了 GitHub 链接")} />} />
- {notice ? <p role="status" className="mt-4 text-xs text-muted-foreground">{notice}</p> : null}</>;
+ starLink={<StarLinkView onActivate={() => setSelectedLink(true)} />} />
+ {selectedLink ? <p role="status" className="mt-4 text-xs text-muted-foreground">{t("controls.about.selectedLink")}</p> : null}</>;
}
function AppearancePreview() {
@@ -86,36 +90,37 @@ function AppearancePreview() {
}
function StarInvitationPreview() {
+ const { t } = useGalleryTranslation();
const [mode, setMode] = useState<"ready" | "saving" | "error">("ready");
const [open, setOpen] = useState(false);
- const [notice, setNotice] = useState("");
- return <><StatePicker label="邀请状态" value={mode} options={["ready", "saving", "error"]} onChange={setMode} />
- <Button variant="outline" onClick={() => setOpen(true)}>查看邀请</Button>
+ const [notice, setNotice] = useState<"dismissed" | "starred" | null>(null);
+ return <><StatePicker label={t("controls.starInvitation.state")} value={mode} options={["ready", "saving", "error"]} onChange={setMode} />
+ <Button variant="outline" onClick={() => setOpen(true)}>{t("controls.starInvitation.view")}</Button>
<StarPromptView open={open} saving={mode === "saving"} error={mode === "error"} onOpenChange={setOpen}
- onDismissForever={() => { setNotice("预览中选择了不再提醒"); setOpen(false); }}
- onStar={() => { setNotice("预览中选择了 GitHub 链接"); setOpen(false); }} />
- {notice ? <p role="status" className="mt-4 text-xs text-muted-foreground">{notice}</p> : null}</>;
+ onDismissForever={() => { setNotice("dismissed"); setOpen(false); }}
+ onStar={() => { setNotice("starred"); setOpen(false); }} />
+ {notice ? <p role="status" className="mt-4 text-xs text-muted-foreground">{t(`controls.starInvitation.${notice}`)}</p> : null}</>;
}
export const runtimeSettingsExamples: ComponentExample[] = [
- { title: "AutomationRunDialogView · 运行结果", files: ["webui/src/components/settings/system/AutomationRunDialogView.tsx"], Preview: RunResultPreview,
- description: "打开运行结果,比较 Markdown 回复、加载、重试、空回复与历史记录缺失状态。",
- options: "result 提供加载状态与已取得的回复。onRetry 交给调用方处理;此视图不读取运行时或请求结果。",
+ { title: "controls.runResult.title", files: ["webui/src/components/settings/system/AutomationRunDialogView.tsx"], Preview: RunResultPreview,
+ description: "controls.runResult.description",
+ options: "controls.runResult.options",
code: '<AutomationRunDialogView job={job} run={run} locale="zh-CN" open={open} result={{ status: "loaded", response }} onRetry={retry} onOpenChange={setOpen} onCloseAutoFocus={restoreFocus} />' },
- { title: "AutomationChatBindingView · 运行聊天", files: ["webui/src/components/settings/system/AutomationChatBindingView.tsx"], Preview: ChatBindingPreview,
- description: "选择运行聊天、修改任务说明,确认、更换回来或取消;可比较任务占用、加载错误与冲突。",
- options: "data 与 job 提供可用聊天和绑定版本。视图管理确认草稿;onSave、onSaved 与 onReload 由功能入口接入数据操作。",
+ { title: "controls.chatBinding.title", files: ["webui/src/components/settings/system/AutomationChatBindingView.tsx"], Preview: ChatBindingPreview,
+ description: "controls.chatBinding.description",
+ options: "controls.chatBinding.options",
code: '<AutomationChatBindingView job={job} data={chats} loadError={false} showBrandLogos={false} onSave={save} onSaved={updateCurrent} onReload={reload}>{renderDetails}</AutomationChatBindingView>' },
- { title: "About and version views · 关于与版本", files: ["webui/src/components/settings/overview/AboutSettingsView.tsx", "webui/src/components/settings/overview/VersionCheckRowView.tsx"], Preview: AboutPreview,
- description: "比较版本检查状态、提交链接、更新入口和关于页面;按钮用示例结果更新显示。",
- options: "AboutSettingsView 接受版本与支持链接的组合。VersionCheckRowView 展示 checking/result,并通过 onCheck 请求检查。真实检查与诊断链接数据由功能入口负责。",
+ { title: "controls.about.title", files: ["webui/src/components/settings/overview/AboutSettingsView.tsx", "webui/src/components/settings/overview/VersionCheckRowView.tsx"], Preview: AboutPreview,
+ description: "controls.about.description",
+ options: "controls.about.options",
code: '<AboutSettingsView reportIssueUrl={reportIssueUrl} versionCheck={<VersionCheckRowView currentVersion={version} checking={checking} result={result} onCheck={check} />} starLink={<StarLinkView onActivate={star} />} />' },
- { title: "AppearanceSettingsView · 外观选项", files: ["webui/src/components/settings/overview/AppearanceSettingsView.tsx"], Preview: AppearancePreview,
- description: "切换外观、活动展示、文件差异和通知偏好,下方显示示例值。",
- options: "主题和偏好由调用方管理。onChangeBrowserNotifications 将权限申请交给功能入口;预览回调只改变示例开关。",
+ { title: "controls.appearance.title", files: ["webui/src/components/settings/overview/AppearanceSettingsView.tsx"], Preview: AppearancePreview,
+ description: "controls.appearance.description",
+ options: "controls.appearance.options",
code: '<AppearanceSettingsView theme={theme} onToggleTheme={toggleTheme} localPrefs={preferences} onChangeLocalPrefs={setPreferences} onChangeBrowserNotifications={changeNotifications} />' },
- { title: "StarPromptView · 支持邀请", files: ["webui/src/components/StarPromptView.tsx"], Preview: StarInvitationPreview,
- description: "打开实际邀请弹窗,比较保存与错误状态,体验暂缓、GitHub 链接和不再提醒的操作。",
- options: "open、saving 和 error 是显示状态。领取邀请与持久化偏好由原有 StarPrompt 入口负责;视图只调用传入操作。",
+ { title: "controls.starInvitation.title", files: ["webui/src/components/StarPromptView.tsx"], Preview: StarInvitationPreview,
+ description: "controls.starInvitation.description",
+ options: "controls.starInvitation.options",
code: '<StarPromptView open={open} saving={saving} error={error} onOpenChange={setOpen} onDismissForever={dismiss} onStar={openRepository} />' },
];
diff --git a/webui/src/dev/gallery/settings.tsx b/webui/src/dev/gallery/settings.tsx
index 64514dcae..4ae045330 100644
--- a/webui/src/dev/gallery/settings.tsx
+++ b/webui/src/dev/gallery/settings.tsx
@@ -1,4 +1,4 @@
-import { useMemo, useState } from "react";
+import { useState } from "react";
import { AdvancedSettings, networkSafetyFormFromPayload } from "@/components/settings/capabilities/SecuritySettings";
import { ImageGenerationSettings, imageGenerationFormFromPayload } from "@/components/settings/capabilities/ImageGenerationSettings";
@@ -35,6 +35,7 @@ import { TokenUsageCard } from "@/components/settings/TokenUsageCard";
import { Button } from "@/components/ui/button";
import type { ChannelValidationPayload, ModelAPIConfig, NanobotFeatureInfo, SessionAutomationJob, SettingsPayload } from "@/lib/types";
import { Sample, StatePicker, type ComponentExample } from "./example";
+import { useGalleryTranslation } from "./i18n";
const providers: SettingsPayload["providers"] = [
{ name: "openai", label: "OpenAI", configured: true, auth_type: "api_key", model_catalog: "builtin", model_api_configurable: true,
@@ -77,33 +78,36 @@ function usePreviewForm<T>(initial: T) {
}
function FormStatus({ dirty }: { dirty: boolean }) {
- return <p role="status" className="mt-4 text-xs text-muted-foreground">{dirty ? "正在保存预览值…" : "预览值已保存"}</p>;
+ const { t } = useGalleryTranslation();
+ return <p role="status" className="mt-4 text-xs text-muted-foreground">{t(dirty ? "controls.common.savingPreview" : "controls.common.savedPreview")}</p>;
}
function ModelPickerPreview() {
+ const { t } = useGalleryTranslation();
const [provider, setProvider] = useState("openai");
const [model, setModel] = useState("gpt-5.4");
const [effort, setEffort] = useState("medium");
- const [action, setAction] = useState("");
+ const [action, setAction] = useState<{ kind: "add" } | { kind: "configure"; provider: string } | null>(null);
const models = provider === "anthropic" ? ["claude-sonnet-4", "claude-opus-4"] : ["gpt-5.4", "gpt-5-mini", "gpt-4.1"];
return <div className="settings-grid space-y-4">
<SettingsGroup>
- <SettingsRow title="服务商"><ProviderPicker providers={providers.slice(0, 2)} value={provider} emptyLabel="选择服务商"
+ <SettingsRow title={t("settings.rows.provider", { ns: "common" })}><ProviderPicker providers={providers.slice(0, 2)} value={provider} emptyLabel={t("controls.modelPickers.chooseProvider")}
onChange={(next) => { setProvider(next); setModel(next === "anthropic" ? "claude-sonnet-4" : "gpt-5.4"); }}
- onAddProvider={() => setAction("添加服务商")}
- onConfigureProvider={(next) => setAction(`配置 ${next}`)} /></SettingsRow>
- <SettingsRow title="模型"><ModelIdPicker token="" settings={settings} provider={provider} models={models}
+ onAddProvider={() => setAction({ kind: "add" })}
+ onConfigureProvider={(next) => setAction({ kind: "configure", provider: next })} /></SettingsRow>
+ <SettingsRow title={t("settings.rows.model", { ns: "common" })}><ModelIdPicker token="" settings={settings} provider={provider} models={models}
value={model} showProviderLogos={false} onChange={setModel} /></SettingsRow>
- <SettingsRow title="推理强度"><ReasoningEffortPicker token="" provider={undefined} model={model}
+ <SettingsRow title={t("settings.models.reasoningEffort", { ns: "common" })}><ReasoningEffortPicker token="" provider={undefined} model={model}
savedValues={["low", "medium", "high"]} value={effort} onChange={setEffort} /></SettingsRow>
</SettingsGroup>
- <p role="status" className="text-xs text-muted-foreground">{provider} / {model} / {effort || "default"}{action ? ` · ${action}` : ""}</p>
+ <p role="status" className="text-xs text-muted-foreground">{provider} / {model} / {effort || t("settings.values.default", { ns: "common" })}{action ? ` · ${action.kind === "add" ? t("settings.providers.addProvider", { ns: "common" }) : t("controls.modelPickers.configure", { provider: action.provider })}` : ""}</p>
</div>;
}
function ProviderIconsPreview() {
+ const { t } = useGalleryTranslation();
const [size, setSize] = useState<"regular" | "compact" | "fill">("regular");
- return <><StatePicker label="图标尺寸" value={size} options={["regular", "compact", "fill"]} onChange={setSize} />
+ return <><StatePicker label={t("controls.providerIcons.size")} value={size} options={["regular", "compact", "fill"]} onChange={setSize} />
<div className="flex flex-wrap gap-8">{providers.map((provider) => <Sample key={provider.name} label={provider.label}>
<div className="flex items-center gap-3"><span className={size === "fill" ? "block h-12 w-12" : ""}>
<ProviderIcon provider={provider.name} compact={size === "compact"} fill={size === "fill"} showBrandLogos={false} />
@@ -113,69 +117,75 @@ function ProviderIconsPreview() {
}
function TimezonePreview() {
+ const { t, i18n } = useGalleryTranslation();
const [value, setValue] = useState("Asia/Shanghai");
- return <div className="max-w-sm space-y-4"><TimezonePicker value={value} onChange={setValue} aria-label="选择时区" />
- <p role="status" className="text-sm text-muted-foreground">{new Intl.DateTimeFormat("zh-CN", {
+ return <div className="max-w-sm space-y-4"><TimezonePicker value={value} onChange={setValue} aria-label={t("settings.timezone.select", { ns: "common" })} />
+ <p role="status" className="text-sm text-muted-foreground">{new Intl.DateTimeFormat(i18n.language, {
timeZone: value, dateStyle: "medium", timeStyle: "short",
}).format(Date.UTC(2026, 0, 1, 12))} · {value}</p></div>;
}
function TextEditorPreview() {
+ const { t } = useGalleryTranslation();
const [value, setValue] = useState("Keep replies concise. Explain the reason for a change.");
const [mode, setMode] = useState<"editable" | "disabled">("editable");
- return <><StatePicker label="编辑状态" value={mode} options={["editable", "disabled"]} onChange={setMode} />
- <SettingsGroup><SettingsRow title={<SettingsHint description="打开编辑器后可以修改、保存或取消。清空内容可查看错误状态。">示例说明</SettingsHint>}>
- <SettingsTextEditor title="编辑示例说明" description="保存后,下方显示修改的内容。" value={value} disabled={mode === "disabled"}
- onSave={(next) => { if (!next.trim()) throw new Error("请输入内容。"); setValue(next); }} />
+ return <><StatePicker label={t("controls.textEditor.state")} value={mode} options={["editable", "disabled"]} onChange={setMode} />
+ <SettingsGroup><SettingsRow title={<SettingsHint description={t("controls.textEditor.hint")}>{t("controls.textEditor.instructions")}</SettingsHint>}>
+ <SettingsTextEditor title={t("controls.textEditor.edit")} description={t("controls.textEditor.help")} value={value} disabled={mode === "disabled"}
+ onSave={(next) => { if (!next.trim()) throw new Error(t("controls.textEditor.required")); setValue(next); }} />
</SettingsRow></SettingsGroup>
<pre role="status" className="mt-4 whitespace-pre-wrap rounded-control bg-muted p-4 text-sm">{value}</pre></>;
}
function RemovePresetPreview() {
- const initial = [{ id: 1, name: "默认模型", primary: true }, { id: 2, name: "代码助手", primary: false }];
+ const { t } = useGalleryTranslation();
+ const initial = [{ id: 1, nameKey: "controls.removePreset.defaultModel", primary: true }, { id: 2, nameKey: "controls.removePreset.codeAssistant", primary: false }];
const [items, setItems] = useState(initial);
return <div className="settings-grid"><SettingsGroup>
- {items.map((item) => <SettingsRow key={item.id} title={item.name}>
- <RemoveActionButton disabled={item.primary} aria-label={`删除 ${item.name}`}
+ {items.map((item) => <SettingsRow key={item.id} title={t(item.nameKey)}>
+ <RemoveActionButton disabled={item.primary} aria-label={t("controls.removePreset.remove", { name: t(item.nameKey) })}
aria-describedby={item.primary ? "gallery-primary-model-hint" : undefined}
- onClick={() => setItems((current) => current.filter((entry) => entry.id !== item.id))}>删除</RemoveActionButton>
+ onClick={() => setItems((current) => current.filter((entry) => entry.id !== item.id))}>{t("settings.actions.delete", { ns: "common" })}</RemoveActionButton>
</SettingsRow>)}
- </SettingsGroup><p id="gallery-primary-model-hint" className="mt-4 text-xs text-muted-foreground">默认模型使用中的预设不能删除。</p>
- <p role="status" className="mt-2 text-xs text-muted-foreground">{items.length} 个预览预设</p>
- <Button className="mt-3" variant="outline" size="sm" onClick={() => setItems(initial)}>重置预览</Button></div>;
+ </SettingsGroup><p id="gallery-primary-model-hint" className="mt-4 text-xs text-muted-foreground">{t("controls.removePreset.primaryHint")}</p>
+ <p role="status" className="mt-2 text-xs text-muted-foreground">{t("controls.removePreset.count", { count: items.length })}</p>
+ <Button className="mt-3" variant="outline" size="sm" onClick={() => setItems(initial)}>{t("controls.common.reset")}</Button></div>;
}
function LoadingPreview() {
+ const { t } = useGalleryTranslation();
const [layout, setLayout] = useState<"apps" | "channels" | "skills">("apps");
- return <><StatePicker label="目录布局" value={layout} options={["apps", "channels", "skills"]} onChange={setLayout} />
- <Sample label="CatalogSkeleton"><CatalogSkeleton label="正在加载预览目录" layout={layout} /></Sample>
- <div className="mt-6"><Sample label="SkeletonStatus"><SkeletonStatus label="正在加载设置" className="space-y-3">
+ return <><StatePicker label={t("controls.loading.layout")} value={layout} options={["apps", "channels", "skills"]} onChange={setLayout} />
+ <Sample label="CatalogSkeleton"><CatalogSkeleton label={t("controls.loading.catalog")} layout={layout} /></Sample>
+ <div className="mt-6"><Sample label="SkeletonStatus"><SkeletonStatus label={t("settings.status.loading", { ns: "common" })} className="space-y-3">
<div className="h-4 w-1/3 rounded bg-muted" /><div className="h-9 rounded-control bg-muted" />
</SkeletonStatus></Sample></div></>;
}
function SidebarPreview() {
+ const { t } = useGalleryTranslation();
const [section, setSection] = useState<SettingsSectionKey>("models");
const [pending, setPending] = useState(true);
- const [action, setAction] = useState("");
+ const [action, setAction] = useState<"back" | "logout" | "restart" | null>(null);
return <div className="flex min-h-96 flex-col gap-6 lg:flex-row">
<SettingsSidebar activeSection={section} onSelectSection={setSection} restartPending={pending}
- onBackToChat={() => setAction("返回聊天")}
- onLogout={() => setAction("退出登录")}
- onRestart={() => { setPending(false); setAction("已处理预览重启操作"); }} />
- <div className="space-y-3 p-4"><p role="status" className="text-sm">选中:{section}</p>
- <p className="text-xs text-muted-foreground">{action || "选择设置分类,或缩小浏览器查看移动端导航。"}</p>
- <Button variant="outline" size="sm" onClick={() => setPending((value) => !value)}>切换待重启状态</Button></div>
+ onBackToChat={() => setAction("back")}
+ onLogout={() => setAction("logout")}
+ onRestart={() => { setPending(false); setAction("restart"); }} />
+ <div className="space-y-3 p-4"><p role="status" className="text-sm">{t("controls.common.selected", { value: t(`settings.nav.${section}`, { ns: "common" }) })}</p>
+ <p className="text-xs text-muted-foreground">{t(action ? `controls.sidebar.${action}` : "controls.sidebar.hint")}</p>
+ <Button variant="outline" size="sm" onClick={() => setPending((value) => !value)}>{t("controls.sidebar.toggleRestart")}</Button></div>
</div>;
}
function ProviderSearchPreview() {
+ const { t } = useGalleryTranslation();
const [query, setQuery] = useState("");
- const [selected, setSelected] = useState("");
+ const [result, setResult] = useState<{ kind: "selected"; provider: string } | { kind: "custom" | "closed" } | null>(null);
return <><div className="flex h-[400px] flex-col overflow-hidden rounded-panel border pt-4">
<ProviderSearchList providers={providers} showBrandLogos={false} query={query} onQueryChange={setQuery}
- onSelect={setSelected} onCustom={() => setSelected("custom")} onClose={() => { setQuery(""); setSelected("已关闭搜索"); }} />
- </div><p role="status" className="mt-4 text-sm text-muted-foreground">{selected ? `选择:${selected}` : "搜索服务商,或用方向键选择。"}</p></>;
+ onSelect={(provider) => setResult({ kind: "selected", provider })} onCustom={() => setResult({ kind: "custom" })} onClose={() => { setQuery(""); setResult({ kind: "closed" }); }} />
+ </div><p role="status" className="mt-4 text-sm text-muted-foreground">{result?.kind === "selected" ? t("controls.common.selected", { value: result.provider }) : t(result ? `controls.providerSearch.${result.kind}` : "controls.providerSearch.hint")}</p></>;
}
function RequestParametersPreview() {
@@ -186,11 +196,12 @@ function RequestParametersPreview() {
}
function RequestAPIPreview() {
+ const { t } = useGalleryTranslation();
const [providerAPI, setProviderAPI] = useState<ModelAPIConfig>({ supported_apis: ["responses", "chat_completions"], preferred_api: "responses" });
const [modelAPI, setModelAPI] = useState<ModelAPIConfig | null>(null);
return <div className="grid gap-8 md:grid-cols-2">
- <Sample label="服务商协议"><ProviderAPIControl value={providerAPI} onChange={setProviderAPI} /></Sample>
- <Sample label="模型覆盖"><SettingsGroup><ModelAPIControl provider={providers[0]} automaticAPI="responses" value={modelAPI} onChange={setModelAPI} /></SettingsGroup></Sample>
+ <Sample label={t("controls.requestAPI.providerAPI")}><ProviderAPIControl value={providerAPI} onChange={setProviderAPI} /></Sample>
+ <Sample label={t("controls.requestAPI.modelOverride")}><SettingsGroup><ModelAPIControl provider={providers[0]} automaticAPI="responses" value={modelAPI} onChange={setModelAPI} /></SettingsGroup></Sample>
<pre role="status" className="overflow-auto rounded-control bg-muted p-4 text-xs md:col-span-2">{JSON.stringify({ providerAPI, modelAPI }, null, 2)}</pre>
</div>;
}
@@ -216,18 +227,21 @@ const usage: Usage = (() => {
})();
function UsagePreview() {
+ const { t } = useGalleryTranslation();
const [mode, setMode] = useState<"active" | "empty" | "unavailable">("active");
- return <><StatePicker label="用量状态" value={mode} options={["active", "empty", "unavailable"]} onChange={setMode} />
+ return <><StatePicker label={t("controls.usage.state")} value={mode} options={["active", "empty", "unavailable"]} onChange={setMode} />
<TokenUsageCard usage={mode === "unavailable" ? undefined : mode === "empty" ? { ...usage, days: [], model_days_30d: [] } : usage} timeZone="UTC" /></>;
}
function OverviewPreview() {
+ const { t } = useGalleryTranslation();
const [section, setSection] = useState<SettingsSectionKey>("overview");
return <><OverviewSettings settings={{ ...settings, usage }} showBrandLogos={false} onSelectSection={setSection} />
- <p role="status" className="mt-4 text-xs text-muted-foreground">选择的分类:{section}</p></>;
+ <p role="status" className="mt-4 text-xs text-muted-foreground">{t("controls.overview.selected", { section: t(`settings.nav.${section}`, { ns: "common" }) })}</p></>;
}
function WebPreview() {
+ const { t } = useGalleryTranslation();
const [savedSettings, setSavedSettings] = useState(settings);
const [form, setForm] = useState(webSearchFormFromPayload(settings));
const [keyVisible, setKeyVisible] = useState(false);
@@ -245,25 +259,27 @@ function WebPreview() {
web: { ...current.web, fetch: { use_jina_reader: form.useJinaReader ?? current.web.fetch.use_jina_reader } },
})); setForm((current) => ({ ...current, apiKey: "" })); setKeyEditing(false);
}} showBrandLogos={false} requiresRestartPending={false} olostepInstalling={false} capabilityError={null} />
- <p role="status" className="mt-4 text-xs text-muted-foreground">{dirty ? "预览草稿尚未保存" : "预览值已保存"}</p></>;
+ <p role="status" className="mt-4 text-xs text-muted-foreground">{t(dirty ? "controls.web.unsaved" : "controls.common.savedPreview")}</p></>;
}
function ImagePreview() {
+ const { t } = useGalleryTranslation();
const { form, setForm, dirty, save } = usePreviewForm(imageGenerationFormFromPayload(settings));
- const [notice, setNotice] = useState("");
+ const [providerAction, setProviderAction] = useState(false);
return <><ImageGenerationSettings token="" settings={settings} form={form} dirty={dirty} saving={false}
onChangeForm={setForm} onSave={save} showBrandLogos={false} requiresRestartPending={false}
onSaveRequestSettings={async (next) => setForm((current) => ({ ...current, ...next }))}
- onOpenProviders={() => setNotice("选择了服务商配置操作")} />
- <FormStatus dirty={dirty} />{notice ? <p className="mt-2 text-xs text-muted-foreground">{notice}</p> : null}</>;
+ onOpenProviders={() => setProviderAction(true)} />
+ <FormStatus dirty={dirty} />{providerAction ? <p className="mt-2 text-xs text-muted-foreground">{t("controls.common.providerAction")}</p> : null}</>;
}
function VoicePreview() {
+ const { t } = useGalleryTranslation();
const { form, setForm, dirty, save } = usePreviewForm(transcriptionFormFromPayload(settings));
- const [notice, setNotice] = useState("");
+ const [providerAction, setProviderAction] = useState(false);
return <><TranscriptionSettings settings={settings} form={form} dirty={dirty} saving={false} onChangeForm={setForm}
- onSave={save} showBrandLogos={false} requiresRestartPending={false} onOpenProviders={() => setNotice("选择了服务商配置操作")} />
- <FormStatus dirty={dirty} />{notice ? <p className="mt-2 text-xs text-muted-foreground">{notice}</p> : null}</>;
+ onSave={save} showBrandLogos={false} requiresRestartPending={false} onOpenProviders={() => setProviderAction(true)} />
+ <FormStatus dirty={dirty} />{providerAction ? <p className="mt-2 text-xs text-muted-foreground">{t("controls.common.providerAction")}</p> : null}</>;
}
function SafetyPreview() {
@@ -279,59 +295,62 @@ const channel: NanobotFeatureInfo = {
};
function ChannelCatalogPreview() {
+ const { t } = useGalleryTranslation();
const [mode, setMode] = useState<"stopped" | "running" | "starting" | "failed" | "uninstalled">("stopped");
const [selected, setSelected] = useState(false);
- const feature = { ...channel, enabled: mode === "running" || mode === "starting", installed: mode !== "uninstalled",
- runtime_status: mode === "uninstalled" ? "stopped" : mode, runtime_error: mode === "failed" ? "Example connection failed." : undefined };
- return <><StatePicker label="频道状态" value={mode} options={["stopped", "running", "starting", "failed", "uninstalled"]} onChange={setMode} />
+ const feature = { ...channel, display_name: t("controls.channelCatalog.exampleChannel"), enabled: mode === "running" || mode === "starting", installed: mode !== "uninstalled",
+ runtime_status: mode === "uninstalled" ? "stopped" : mode, runtime_error: mode === "failed" ? t("controls.channelCatalog.error") : undefined };
+ return <><StatePicker label={t("controls.channelCatalog.state")} value={mode} options={["stopped", "running", "starting", "failed", "uninstalled"]} onChange={setMode} />
<div className="settings-grid"><SettingsGroup><ChannelCatalogRow feature={feature} showBrandLogos={false} actionKey={null}
onSelect={() => setSelected(true)} onAction={(action, _name, options) => setMode(options?.installOnly ? "stopped" : action === "enable" ? "running" : "stopped")} /></SettingsGroup></div>
<div className="mt-4 flex items-center gap-3"><ChannelLogo feature={feature} showBrandLogos={false} />
- <ChannelStatusBadge status={feature.runtime_status}>{feature.runtime_status}</ChannelStatusBadge>
+ <ChannelStatusBadge status={feature.runtime_status}>{t(`controls.channelCatalog.${feature.runtime_status}`)}</ChannelStatusBadge>
<ChannelHelpMenu feature={feature} /></div>
<ChannelRuntimeError message={feature.runtime_error} />
- <p role="status" className="mt-4 text-xs text-muted-foreground">{selected ? "选择了频道设置" : "点击开关或安装按钮,查看状态变化。"}</p></>;
+ <p role="status" className="mt-4 text-xs text-muted-foreground">{t(selected ? "controls.channelCatalog.selected" : "controls.channelCatalog.hint")}</p></>;
}
-const channelFields: ChannelConfigField[] = [
- { key: "bot_token", label: "Bot token", secret: true, section: "credentials", placeholder: "Example token" },
- { key: "server_url", label: "Server URL", inputType: "url", section: "connection", optional: true },
- { key: "mode", label: "Reply mode", section: "behavior", options: [{ value: "mention", label: "Mentions" }, { value: "all", label: "All messages" }] },
- { key: "allow_from", label: "Allow from", section: "access", kind: "json", optional: true, placeholder: '["user-id"]' },
-];
-const channelPresets: ChannelProviderPreset[] = [
- { id: "local", label: "Local server", values: { server_url: "http://127.0.0.1:8080", mode: "mention" } },
- { id: "hosted", label: "Hosted server", values: { server_url: "https://example.com", mode: "all" } },
-];
-
function CredentialsPreview() {
+ const { t } = useGalleryTranslation();
+ const channelFields: ChannelConfigField[] = [
+ { key: "bot_token", label: t("controls.credentials.botToken"), secret: true, section: "credentials", placeholder: t("controls.credentials.tokenPlaceholder") },
+ { key: "server_url", label: t("controls.credentials.serverURL"), inputType: "url", section: "connection", optional: true },
+ { key: "mode", label: t("controls.credentials.replyMode"), section: "behavior", options: [{ value: "mention", label: t("controls.credentials.mentions") }, { value: "all", label: t("controls.credentials.allMessages") }] },
+ { key: "allow_from", label: t("controls.credentials.allowFrom"), section: "access", kind: "json", optional: true, placeholder: '["user-id"]' },
+ ];
+ const channelPresets: ChannelProviderPreset[] = [
+ { id: "local", label: t("controls.credentials.local"), values: { server_url: "http://127.0.0.1:8080", mode: "mention" } },
+ { id: "hosted", label: t("controls.credentials.hosted"), values: { server_url: "https://example.com", mode: "all" } },
+ ];
const [values, setValues] = useState<Record<string, string>>({ bot_token: "", server_url: "", mode: "mention", allow_from: "[]" });
const [visibleSecrets, setVisibleSecrets] = useState<Record<string, boolean>>({});
- const [errors, setErrors] = useState<Record<string, string>>({});
- const [notice, setNotice] = useState<string | null>(null);
+ const [errorFields, setErrorFields] = useState<string[]>([]);
+ const [notice, setNotice] = useState<{ kind: "applied"; preset: string } | { kind: "incomplete" | "saved" } | { kind: "helper"; message: string } | null>(null);
+ const errors = Object.fromEntries(errorFields.map((key) => [key, t("controls.credentials.required")]));
return <div className="space-y-5">
- <ChannelProviderPresets presets={channelPresets} onApply={(preset) => { setValues((current) => ({ ...current, ...preset.values })); setNotice(`已应用 ${preset.label}`); }} />
+ <ChannelProviderPresets presets={channelPresets} onApply={(preset) => { setValues((current) => ({ ...current, ...preset.values })); setNotice({ kind: "applied", preset: preset.id }); }} />
<ChannelFieldGroups fields={channelFields} requirements={[{ alternatives: [["bot_token"]] }]} values={values} visibleSecrets={visibleSecrets}
- errors={errors} onChange={(key, value) => { setValues((current) => ({ ...current, [key]: value })); setErrors({}); }}
+ errors={errors} onChange={(key, value) => { setValues((current) => ({ ...current, [key]: value })); setErrorFields([]); }}
onToggleSecret={(key) => setVisibleSecrets((current) => ({ ...current, [key]: !current[key] }))} />
<div className="flex flex-wrap items-center gap-3"><Button variant="outline" onClick={() => {
- const next = channelRequirementErrors(channelFields, [{ alternatives: [["bot_token"]] }], values, new Set(), new Set(), "请输入 Bot token。");
- setErrors(next); setNotice(Object.keys(next).length ? "请补全凭据。" : "预览凭据已保存。");
- }}>检查并保存</Button><ChannelSetupActions feature={channel} setup={{ actions: [{ id: "copy", label: "Example command", copyText: "nanobot gateway" }] }} onNotice={setNotice} /></div>
- <p role="status" className="text-xs text-muted-foreground">{notice || "填写凭据、切换密文显示,或应用连接预设。"}</p>
+ const next = channelRequirementErrors(channelFields, [{ alternatives: [["bot_token"]] }], values, new Set(), new Set(), "required");
+ setErrorFields(Object.keys(next)); setNotice({ kind: Object.keys(next).length ? "incomplete" : "saved" });
+ }}>{t("controls.credentials.checkSave")}</Button><ChannelSetupActions feature={{ ...channel, display_name: t("controls.channelCatalog.exampleChannel") }} setup={{ actions: [{ id: "copy", label: t("controls.credentials.command"), copyText: "nanobot gateway" }] }} onNotice={(message) => setNotice(message ? { kind: "helper", message } : null)} /></div>
+ <p role="status" className="text-xs text-muted-foreground">{notice?.kind === "helper" ? notice.message : notice?.kind === "applied" ? t("controls.credentials.applied", { name: t(`controls.credentials.${notice.preset}`) }) : t(notice ? `controls.credentials.${notice.kind}` : "controls.credentials.hint")}</p>
</div>;
}
function ChannelValidationPreview() {
+ const { t } = useGalleryTranslation();
const [mode, setMode] = useState<"checking" | "connected" | "invalid">("connected");
- const validation = useMemo<ChannelValidationPayload | null>(() => mode === "checking" ? null : {
+ const validation: ChannelValidationPayload | null = mode === "checking" ? null : {
name: channel.name, status: mode, identity: { name: "Example bot", workspace: "Gallery workspace" },
- checks: [{ id: "credentials", label: "Credentials", status: "pass" },
- { id: "connection", label: "Connection", status: mode === "invalid" ? "fail" : "pass", message: mode === "invalid" ? "The example token has expired." : undefined }],
+ checks: [{ id: "credentials", label: t("settings.channels.sections.credentials", { ns: "common" }), status: "pass" },
+ { id: "connection", label: t("settings.channels.sections.connection", { ns: "common" }), status: mode === "invalid" ? "fail" : "pass", message: mode === "invalid" ? t("controls.channelValidation.expired") : undefined }],
missing_fields: [], can_enable: mode === "connected", requires_restart: false,
- }, [mode]);
- return <><StatePicker label="检查结果" value={mode} options={["checking", "connected", "invalid"]} onChange={setMode} />
- <ChannelValidationProgress validation={validation} validating={mode === "checking"} feature={channel} /></>;
+ };
+ return <><StatePicker label={t("controls.channelValidation.result")} value={mode} options={["checking", "connected", "invalid"]} onChange={setMode} />
+ <ChannelValidationProgress validation={validation} validating={mode === "checking"} feature={{ ...channel, display_name: t("controls.channelCatalog.exampleChannel") }} /></>;
}
function RunAtPreview() {
@@ -341,6 +360,7 @@ function RunAtPreview() {
}
function AutomationCalendarPreview() {
+ const { t, i18n } = useGalleryTranslation();
const [month, setMonth] = useState(() => { const now = new Date(); return new Date(now.getFullYear(), now.getMonth(), 1); });
const [mode, setMode] = useState<"scheduled" | "history" | "empty">("scheduled");
const [selected, setSelected] = useState("");
@@ -348,83 +368,83 @@ function AutomationCalendarPreview() {
schedule: { kind: "cron", expr: "30 9 * * 1", tz: "UTC" }, payload: { message: "Summarize this week's changes." },
state: { next_run_at_ms: mode === "scheduled" ? new Date(month.getFullYear(), month.getMonth(), 15, 9, 30).getTime() : null,
run_history: [{ run_at_ms: new Date(month.getFullYear(), month.getMonth(), 8, 9, 30).getTime(), status: "ok", duration_ms: 3200, webui_session_key: null },
- { run_at_ms: new Date(month.getFullYear(), month.getMonth(), 1, 9, 30).getTime(), status: "error", duration_ms: 1200, error: "Example provider was unavailable.", webui_session_key: null }] } }];
- return <><StatePicker label="日程状态" value={mode} options={["scheduled", "history", "empty"]} onChange={setMode} />
- <div className="mb-4 flex flex-wrap items-center gap-3"><Button size="sm" variant="outline" onClick={() => setMonth(new Date(month.getFullYear(), month.getMonth() - 1, 1))}>上个月</Button>
- <span className="text-sm">{new Intl.DateTimeFormat("zh-CN", { year: "numeric", month: "long" }).format(month)}</span>
- <Button size="sm" variant="outline" onClick={() => setMonth(new Date(month.getFullYear(), month.getMonth() + 1, 1))}>下个月</Button></div>
- <AutomationCalendar jobs={jobs} month={month} locale="zh-CN" onInspect={(job) => setSelected(job.name)}
+ { run_at_ms: new Date(month.getFullYear(), month.getMonth(), 1, 9, 30).getTime(), status: "error", duration_ms: 1200, error: t("controls.automationCalendar.providerError"), webui_session_key: null }] } }];
+ return <><StatePicker label={t("controls.automationCalendar.state")} value={mode} options={["scheduled", "history", "empty"]} onChange={setMode} />
+ <div className="mb-4 flex flex-wrap items-center gap-3"><Button size="sm" variant="outline" onClick={() => setMonth(new Date(month.getFullYear(), month.getMonth() - 1, 1))}>{t("controls.automationCalendar.previousMonth")}</Button>
+ <span className="text-sm">{new Intl.DateTimeFormat(i18n.language, { year: "numeric", month: "long" }).format(month)}</span>
+ <Button size="sm" variant="outline" onClick={() => setMonth(new Date(month.getFullYear(), month.getMonth() + 1, 1))}>{t("controls.automationCalendar.nextMonth")}</Button></div>
+ <AutomationCalendar jobs={jobs} month={month} locale={i18n.language} onInspect={(job) => setSelected(job.name)}
renderRunDialog={(props) => <AutomationRunDialogView {...props} result={{ status: "loaded", response: "**运行结果**\n\n示例任务已处理当前项目更新。" }} onRetry={() => {}} />}
copy={{
- planned: "已计划", recorded: "运行记录", running: "正在运行", failed: "失败", completed: "完成", skipped: "已跳过", system: "系统任务",
- close: "关闭", noEntries: "本月没有日程", more: (count) => `另外 ${count} 条`,
- }} /><p role="status" className="mt-4 text-xs text-muted-foreground">{selected ? `选择了任务:${selected}` : "点击运行记录查看结果,或选择计划中的任务。"}</p></>;
+ planned: t("controls.automationCalendar.planned"), recorded: t("controls.automationCalendar.recorded"), running: t("controls.automationCalendar.running"), failed: t("controls.automationCalendar.failed"), completed: t("controls.automationCalendar.completed"), skipped: t("controls.automationCalendar.skipped"), system: t("controls.automationCalendar.system"),
+ close: t("common.close", { ns: "common" }), noEntries: t("controls.automationCalendar.noEntries"), more: (count) => t("controls.automationCalendar.more", { count }),
+ }} /><p role="status" className="mt-4 text-xs text-muted-foreground">{selected ? t("controls.automationCalendar.selected", { name: selected }) : t("controls.automationCalendar.hint")}</p></>;
}
const components = "webui/src/components/settings/";
export const settingsExamples: ComponentExample[] = [
- { title: "Model pickers · 模型选择", files: ["shared/ModelControls", "models/ReasoningEffortPicker"], Preview: ModelPickerPreview,
- description: "选择服务商、搜索或输入模型 ID,并调整推理强度。",
- options: "ProviderPicker 的值与操作由调用方提供。ModelIdPicker 的 models 参数可提供固定目录;ReasoningEffortPicker 的 savedValues 提供已有选项。",
+ { title: "controls.modelPickers.title", files: ["shared/ModelControls", "models/ReasoningEffortPicker"], Preview: ModelPickerPreview,
+ description: "controls.modelPickers.description",
+ options: "controls.modelPickers.options",
code: '<ProviderPicker providers={providers} value={provider} onChange={setProvider} emptyLabel="选择服务商" />\n<ModelIdPicker token="" settings={settings} provider={provider} models={modelIds} value={model} showProviderLogos={false} onChange={setModel} />' },
- { title: "Provider icons · 服务商图标", files: ["shared/ProviderIcon"], Preview: ProviderIconsPreview,
- description: "比较普通、紧凑与填充尺寸,以及选择器的未配置状态。", options: "provider 选择已有图标;compact 与 fill 控制尺寸。showBrandLogos=false 使用内置图标。",
+ { title: "controls.providerIcons.title", files: ["shared/ProviderIcon"], Preview: ProviderIconsPreview,
+ description: "controls.providerIcons.description", options: "controls.providerIcons.options",
code: '<ProviderIcon provider="openai" showBrandLogos={false} compact />\n<ProviderPickerIcon provider="openai" showBrandLogos={false} unconfigured />' },
- { title: "TimezonePicker · 时区选择", files: ["shared/TimezonePicker"], Preview: TimezonePreview,
- description: "按时区名、中文名称或 UTC 偏移搜索,选择后查看同一时刻的当地时间。", options: "value 是 IANA 时区;onChange 更新调用方的值。搜索与键盘导航由组件提供。",
+ { title: "controls.timezone.title", files: ["shared/TimezonePicker"], Preview: TimezonePreview,
+ description: "controls.timezone.description", options: "controls.timezone.options",
code: '<TimezonePicker value={timezone} onChange={setTimezone} aria-label="选择时区" />' },
- { title: "Text editor and hint · 文本编辑", files: ["shared/SettingsTextEditor", "shared/SettingsHint"], Preview: TextEditorPreview,
- description: "打开编辑弹窗,修改、保存或取消。清空内容后保存可查看错误反馈。", options: "SettingsTextEditor 在 onSave 成功后关闭,失败时显示错误;SettingsHint 可通过悬停、焦点或点击打开。",
+ { title: "controls.textEditor.title", files: ["shared/SettingsTextEditor", "shared/SettingsHint"], Preview: TextEditorPreview,
+ description: "controls.textEditor.description", options: "controls.textEditor.options",
code: '<SettingsHint description="补充说明">标题</SettingsHint>\n<SettingsTextEditor title="编辑说明" value={value} onSave={setValue} />' },
- { title: "RemoveActionButton · 删除预设", files: ["shared/RemoveActionButton"], Preview: RemovePresetPreview,
- description: "删除未使用的模型预设,查看默认模型使用中预设的禁用状态。", options: "这是 ModelsSettings 使用的删除按钮;disabled 与删除动作由调用方提供。提供商管理使用 ProvidersSettings 弹窗。",
+ { title: "controls.removePreset.title", files: ["shared/RemoveActionButton"], Preview: RemovePresetPreview,
+ description: "controls.removePreset.description", options: "controls.removePreset.options",
code: '<RemoveActionButton disabled={referenced} onClick={deletePreset}>删除</RemoveActionButton>' },
- { title: "Loading layouts · 加载占位", files: ["shared/CatalogSkeleton", "shared/SkeletonStatus"], Preview: LoadingPreview,
- description: "切换应用、频道与技能目录的加载布局,并查看通用状态容器。", options: "CatalogSkeleton 的 layout 选择布局。SkeletonStatus 用 label 提供读屏状态,将装饰内容标为 aria-hidden。",
+ { title: "controls.loading.title", files: ["shared/CatalogSkeleton", "shared/SkeletonStatus"], Preview: LoadingPreview,
+ description: "controls.loading.description", options: "controls.loading.options",
code: '<CatalogSkeleton label="正在加载目录" layout="channels" />\n<SkeletonStatus label="正在加载设置" className="space-y-3">{skeletons}</SkeletonStatus>' },
- { title: "SettingsSidebar · 设置导航", files: ["SettingsSidebar"], Preview: SidebarPreview,
- description: "选择分类、处理待重启状态,并缩小浏览器查看移动端菜单。", options: "activeSection 与 onSelectSection 控制选择;返回、退出与重启动作为调用方回调。",
+ { title: "controls.sidebar.title", files: ["SettingsSidebar"], Preview: SidebarPreview,
+ description: "controls.sidebar.description", options: "controls.sidebar.options",
code: '<SettingsSidebar activeSection={section} onSelectSection={setSection} onBackToChat={back} onRestart={restart} restartPending />' },
- { title: "ProviderSearchList · 服务商搜索", files: ["models/ProviderSearchList"], Preview: ProviderSearchPreview,
- description: "搜索按 OAuth、API Key 与本地分组的服务商,选择条目或自定义服务商。", options: "providers 是已有目录。query 为受控搜索值;onSelect 与 onCustom 将选择交给父组件。",
+ { title: "controls.providerSearch.title", files: ["models/ProviderSearchList"], Preview: ProviderSearchPreview,
+ description: "controls.providerSearch.description", options: "controls.providerSearch.options",
code: '<ProviderSearchList providers={providers} query={query} onQueryChange={setQuery} showBrandLogos={false} onSelect={select} onCustom={custom} onClose={close} />' },
- { title: "ProviderParameterFields · 请求参数", files: ["models/ProviderParameterFields"], Preview: RequestParametersPreview,
- description: "编辑请求头、查询参数和请求体;输入无效 JSON 可查看真实校验反馈。", options: "fields 选择显示项,form 保存 JSON 文本。请求头与查询参数只接受字符串值;请求体接受任意 JSON 对象值。",
+ { title: "controls.requestParameters.title", files: ["models/ProviderParameterFields"], Preview: RequestParametersPreview,
+ description: "controls.requestParameters.description", options: "controls.requestParameters.options",
code: '<ProviderParameterFields fields={["extra_headers", "extra_query", "extra_body"]} form={draft} onChange={updateDraft} />' },
- { title: "Request API controls · 请求协议", files: ["models/ProviderAPIControl", "models/ModelAPIControl"], Preview: RequestAPIPreview,
- description: "选择服务商支持的协议、默认协议,以及模型覆盖和回退选项。", options: "ProviderAPIControl 至少保留一个协议。ModelAPIControl 允许 null 表示自动选择,并按服务商能力显示可用协议。",
+ { title: "controls.requestAPI.title", files: ["models/ProviderAPIControl", "models/ModelAPIControl"], Preview: RequestAPIPreview,
+ description: "controls.requestAPI.description", options: "controls.requestAPI.options",
code: '<ProviderAPIControl value={api} onChange={setAPI} />\n<ModelAPIControl provider={provider} automaticAPI="responses" value={modelAPI} onChange={setModelAPI} />' },
- { title: "Token usage · 用量统计", files: ["TokenUsageCard", "TokenUsageDetails", "TokenUsageModelTrend"], Preview: UsagePreview,
- description: "切换有数据、空记录和不可用状态。悬停柱图查看每日用量,打开详情查看模型趋势。", options: "usage 是调用方提供的统计记录;timeZone 定义日期范围。详情弹窗与图表只展示传入数据。",
+ { title: "controls.usage.title", files: ["TokenUsageCard", "TokenUsageDetails", "TokenUsageModelTrend"], Preview: UsagePreview,
+ description: "controls.usage.description", options: "controls.usage.options",
code: '<TokenUsageCard usage={usage} timeZone="UTC" />' },
- { title: "OverviewSettings · 设置概览", files: ["overview/OverviewSettings"], Preview: OverviewPreview,
- description: "查看当前模型、能力状态和用量统计,点击功能行体验分类选择。", options: "settings 提供概览数据;onSelectSection 接收选择的设置分类。",
+ { title: "controls.overview.title", files: ["overview/OverviewSettings"], Preview: OverviewPreview,
+ description: "controls.overview.description", options: "controls.overview.options",
code: '<OverviewSettings settings={settings} showBrandLogos={false} onSelectSection={setSection} />' },
- { title: "WebSettings · 搜索设置", files: ["capabilities/WebSettings"], Preview: WebPreview,
- description: "切换免凭据、API Key 与服务器地址三种服务商,调整搜索选项并体验自动保存。", options: "settings 保存当前配置,form 保存编辑值。保存、凭据显示与服务商切换由父组件提供。",
+ { title: "controls.web.title", files: ["capabilities/WebSettings"], Preview: WebPreview,
+ description: "controls.web.description", options: "controls.web.options",
code: '<WebSettings settings={settings} form={form} onChangeForm={setForm} onSave={save} {...actions} />' },
- { title: "ImageGenerationSettings · 图像设置", files: ["capabilities/ImageGenerationSettings"], Preview: ImagePreview,
- description: "开关图像生成,选择固定模型目录、宽高比与图片尺寸,展开高级选项调整数量。", options: "form 为受控配置,dirty 标记修改。组件复用服务商凭据,保存动作由父组件实现。",
+ { title: "controls.image.title", files: ["capabilities/ImageGenerationSettings"], Preview: ImagePreview,
+ description: "controls.image.description", options: "controls.image.options",
code: '<ImageGenerationSettings token="" settings={settings} form={form} dirty={dirty} onChangeForm={setForm} onSave={save} {...actions} />' },
- { title: "TranscriptionSettings · 语音设置", files: ["capabilities/TranscriptionSettings"], Preview: VoicePreview,
- description: "切换转写开关,编辑模型、语言与时长和上传大小限制,体验自动保存。", options: "settings 提供服务商信息;form 与保存回调由父组件管理。",
+ { title: "controls.voice.title", files: ["capabilities/TranscriptionSettings"], Preview: VoicePreview,
+ description: "controls.voice.description", options: "controls.voice.options",
code: '<TranscriptionSettings settings={settings} form={form} dirty={dirty} onChangeForm={setForm} onSave={save} {...actions} />' },
- { title: "AdvancedSettings · 访问设置", files: ["capabilities/SecuritySettings"], Preview: SafetyPreview,
- description: "切换本地服务访问与默认权限,查看设置行、提示和自动保存反馈。", options: "form 是显示值;onSave 处理保存请求。运行时的权限执行仍由 gateway 负责。",
+ { title: "controls.safety.title", files: ["capabilities/SecuritySettings"], Preview: SafetyPreview,
+ description: "controls.safety.description", options: "controls.safety.options",
code: '<AdvancedSettings form={form} dirty={dirty} saving={false} requiresRestartPending={false} isNativeHostSurface={false} onChangeForm={setForm} onSave={save} />' },
- { title: "Channel catalog and identity · 频道条目", files: ["channels/ChannelCatalogRow", "channels/ChannelIdentity", "channels/ChannelHelpMenu"], Preview: ChannelCatalogPreview,
- description: "切换运行、启动、失败和未安装状态;操作开关、安装入口与帮助菜单。", options: "feature 提供安装和运行状态。onAction 与 onSelect 交给父组件处理;标识、错误和帮助使用同一频道数据。",
+ { title: "controls.channelCatalog.title", files: ["channels/ChannelCatalogRow", "channels/ChannelIdentity", "channels/ChannelHelpMenu"], Preview: ChannelCatalogPreview,
+ description: "controls.channelCatalog.description", options: "controls.channelCatalog.options",
code: '<ChannelCatalogRow feature={feature} showBrandLogos={false} actionKey={null} onSelect={select} onAction={act} />' },
- { title: "Channel credentials · 频道表单", files: ["channels/CredentialForm", "channels/ChannelCredentialFields", "channels/ChannelSetupParts"], Preview: CredentialsPreview,
- description: "输入凭据,显示或隐藏密文,应用连接预设,检查必填字段并复制辅助命令。", options: "fields 定义分组与控件,values 和 visibleSecrets 为受控值。requirements 定义凭据组合;预设与保存回调只更新此示例。",
+ { title: "controls.credentials.title", files: ["channels/CredentialForm", "channels/ChannelCredentialFields", "channels/ChannelSetupParts"], Preview: CredentialsPreview,
+ description: "controls.credentials.description", options: "controls.credentials.options",
code: '<ChannelFieldGroups fields={fields} requirements={requirements} values={values} visibleSecrets={visible} onChange={change} onToggleSecret={toggle} />' },
- { title: "ChannelValidationProgress · 连接检查", files: ["channels/ChannelValidationProgress"], Preview: ChannelValidationPreview,
- description: "切换检查中、成功和失败,观察逐项揭示的检查结果与身份摘要。", options: "validation 提供检查记录,validating 控制加载状态;组件只负责展示。",
+ { title: "controls.channelValidation.title", files: ["channels/ChannelValidationProgress"], Preview: ChannelValidationPreview,
+ description: "controls.channelValidation.description", options: "controls.channelValidation.options",
code: '<ChannelValidationProgress feature={feature} validation={validation} validating={checking} />' },
- { title: "AutomationRunAtPicker · 定时选择", files: ["system/AutomationRunAtPicker"], Preview: RunAtPreview,
- description: "输入日期时间,或打开日历并用鼠标、方向键和翻页键选择日期。", options: "value 使用 YYYY-MM-DDTHH:mm 本地时间;onChange 返回编辑值。错误输入显示在现有表单控件上。",
+ { title: "controls.runAt.title", files: ["system/AutomationRunAtPicker"], Preview: RunAtPreview,
+ description: "controls.runAt.description", options: "controls.runAt.options",
code: '<AutomationRunAtPicker value={runAt} onChange={setRunAt} />' },
- { title: "Automation calendar · 任务日历", files: ["system/AutomationCalendar"], Preview: AutomationCalendarPreview,
- description: "翻月、切换计划与历史记录,点击成功或失败记录打开结果弹窗。窄容器自动显示日程列表。", options: "jobs 与 month 决定日历内容。onInspect 处理计划中的任务;renderRunDialog 由调用方提供结果展示,日历不读取服务。",
+ { title: "controls.automationCalendar.title", files: ["system/AutomationCalendar"], Preview: AutomationCalendarPreview,
+ description: "controls.automationCalendar.description", options: "controls.automationCalendar.options",
code: '<AutomationCalendar jobs={jobs} month={month} locale="zh-CN" copy={copy} onInspect={inspect} renderRunDialog={renderRunDialog} />' },
].map((example) => ({ ...example, files: example.files.map((file) => `${components}${file}.tsx`) }));
diff --git a/webui/src/dev/gallery/shared-views.tsx b/webui/src/dev/gallery/shared-views.tsx
index c3285edbc..cc1bb3e59 100644
--- a/webui/src/dev/gallery/shared-views.tsx
+++ b/webui/src/dev/gallery/shared-views.tsx
@@ -22,24 +22,28 @@ import { Input } from "@/components/ui/input";
import { ToggleButton } from "@/components/ui/toggle-button";
import type { UIMessage } from "@/lib/types";
import { Sample, StatePicker, type ComponentExample } from "./example";
+import { useGalleryTranslation } from "./i18n";
const markdown = `## A small result\n\nA reply can contain **emphasis**, a list, and inline math $a^2 + b^2 = c^2$.\n\n- Read the source\n- Reuse the existing component\n\n| Item | State |\n| --- | --- |\n| UI | Ready |\n\n\`\`\`python\nprint("Hello, Nanobot")\n\`\`\``;
function MarkdownPreview() {
+ const { t } = useGalleryTranslation();
const [state, setState] = useState<"complete" | "streaming">("complete");
- return <><StatePicker label="Markdown state" value={state} options={["complete", "streaming"]} onChange={setState} />
+ return <><StatePicker label={t("controls.markdown.state")} value={state} options={["complete", "streaming"]} onChange={setState} />
<MarkdownText streaming={state === "streaming"}>{state === "streaming" ? markdown.slice(0, 100) : markdown}</MarkdownText></>;
}
function CodePreview() {
+ const { t } = useGalleryTranslation();
const [mode, setMode] = useState<"code" | "terminal" | "viewport">("code");
- return <><StatePicker label="Code format" value={mode} options={["code", "terminal", "viewport"]} onChange={setMode} />
+ return <><StatePicker label={t("controls.code.format")} value={mode} options={["code", "terminal", "viewport"]} onChange={setMode} />
<CodeBlock language={mode === "terminal" ? "ansi" : "tsx"} showLineNumbers={mode !== "terminal"}
viewportHighlight={mode === "viewport"} wrapLongLines={mode !== "viewport"}
code={mode === "terminal" ? "\u001b[32mPASS\u001b[0m Component preview ready\n\u001b[33mNOTE\u001b[0m No gateway connection" : '<Button variant="outline" onClick={save}>\n Save changes\n</Button>'} /></>;
}
function MessagePreview() {
+ const { t } = useGalleryTranslation();
const [state, setState] = useState<"answer" | "thinking" | "streaming" | "sending" | "failed">("answer");
const user: UIMessage = {
id: "gallery-user", role: "user", content: "Show me how this component works.", createdAt: Date.UTC(2026, 0, 1, 12),
@@ -51,20 +55,21 @@ function MessagePreview() {
content: state === "thinking" ? "" : "Here is a **reusable message** with the same typography and actions as the chat.",
isStreaming: state === "thinking" || state === "streaming",
};
- return <><StatePicker label="Message state" value={state} options={["answer", "thinking", "streaming", "sending", "failed"]} onChange={setState} />
+ return <><StatePicker label={t("controls.message.state")} value={state} options={["answer", "thinking", "streaming", "sending", "failed"]} onChange={setState} />
<div className="space-y-6"><MessageBubble message={user} />
{state !== "sending" && state !== "failed" ? <MessageBubble message={assistant} /> : null}</div></>;
}
function ActivityPreview() {
+ const { t } = useGalleryTranslation();
const [state, setState] = useState<"running" | "done" | "error">("running");
const [expanded, setExpanded] = useState(true);
- return <><StatePicker label="Activity state" value={state} options={["running", "done", "error"]} onChange={setState} />
- <ThinkingReasoningShell active={state === "running"} expanded={expanded} label={state === "running" ? "Working" : "Activity details"}
- collapseLabel="Collapse" onToggle={() => setExpanded((value) => !value)}>
+ return <><StatePicker label={t("controls.activity.state")} value={state} options={["running", "done", "error"]} onChange={setState} />
+ <ThinkingReasoningShell active={state === "running"} expanded={expanded} label={t(state === "running" ? "controls.activity.working" : "controls.activity.details")}
+ collapseLabel={t("controls.activity.collapse")} onToggle={() => setExpanded((value) => !value)}>
<ReasoningRow text="Checking the component's inputs and shared styles." streaming={state === "running"} />
<ActivityStep icon={state === "error" ? CircleAlert : Check} active={state === "running"}
- tone={state === "error" ? "error" : "success"} label={state === "error" ? "Could not read file" : "Read source"} detail="components/ui/button.tsx" />
+ tone={state === "error" ? "error" : "success"} label={t(state === "error" ? "controls.activity.readError" : "controls.activity.read")} detail="components/ui/button.tsx" />
<GenericToolRun items={[{ status: state, trace: {
name: "read_file", family: "read", groupKey: "read", fields: [{ key: "path", value: "webui/src/components/ui/button.tsx" }], collectedSource: false,
} }]} />
@@ -72,6 +77,7 @@ function ActivityPreview() {
}
function FilesPreview() {
+ const { t } = useGalleryTranslation();
const [state, setState] = useState<"done" | "editing" | "error">("done");
const [operation, setOperation] = useState<"create" | "edit" | "delete">("edit");
const [display, setDisplay] = useState<"summary" | "diff" | "collapsed_diff">("diff");
@@ -83,55 +89,68 @@ function FilesPreview() {
};
const edit: FileEditSummary = {
key: "example-edit", path: "src/greeting.ts", added: operation === "delete" ? 0 : 1, deleted: operation === "create" ? 0 : 1, approximate: false, binary: false,
- status: state, pending: state === "editing", operation, error: state === "error" ? "Example edit could not be applied." : undefined,
+ status: state, pending: state === "editing", operation, error: state === "error" ? t("controls.files.error") : undefined,
diff: { format: "unified", text: diffs[operation] },
};
- return <><StatePicker label="File edit state" value={state} options={["done", "editing", "error"]} onChange={setState} />
- <StatePicker label="File operation" value={operation} options={["create", "edit", "delete"]} onChange={setOperation} />
- <StatePicker label="Diff display" value={display} options={["summary", "diff", "collapsed_diff"]} onChange={setDisplay} />
+ return <><StatePicker label={t("controls.files.state")} value={state} options={["done", "editing", "error"]} onChange={setState} />
+ <StatePicker label={t("controls.files.operation")} value={operation} options={["create", "edit", "delete"]} onChange={setOperation} />
+ <StatePicker label={t("controls.files.display")} value={display} options={["summary", "diff", "collapsed_diff"]} onChange={setDisplay} />
<FileEditGroup edits={[edit]} displayMode={display} onOpenFilePreview={setOpened} />
- <p role="status" className="mt-4 text-xs text-muted-foreground">{opened ? `Selected file: ${opened}` : "Select a file reference to exercise its callback."}</p></>;
+ <p role="status" className="mt-4 text-xs text-muted-foreground">{opened ? t("controls.files.selected", { path: opened }) : t("controls.files.hint")}</p></>;
}
// Inline SVG fixtures stay local to the developer gallery and need no network fetch.
const mediaImages = ["#2563eb", "#0d9488", "#9333ea", "#ea580c", "#be123c", "#4f46e5"].map((color, index) => ({
- name: `Study ${index + 1} · 色彩练习 ${index + 1}`,
+ number: index + 1,
url: `data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" width="960" height="640" viewBox="0 0 960 640"><rect width="960" height="640" fill="${color}"/><path d="M0 480L240 160L480 480L720 160L960 480" fill="none" stroke="white" stroke-opacity=".35" stroke-width="32"/><circle cx="480" cy="320" r="120" fill="white" fill-opacity=".2"/><text x="480" y="355" text-anchor="middle" font-family="sans-serif" font-size="100" fill="white">${index + 1}</text></svg>`)}`,
}));
+function useMediaImages() {
+ const { t } = useGalleryTranslation();
+ return mediaImages.map(({ number, url }) => ({ name: t("controls.media.study", { count: number }), url }));
+}
+
function ImageGalleryPreview() {
+ const { t } = useGalleryTranslation();
+ const images = useMediaImages();
return <div className="space-y-6">
- <Sample label="Six images · 六张图片"><ImageGallery images={mediaImages} /></Sample>
- <Sample label="Compact thumbnails · 紧凑缩略图"><ImageGallery images={mediaImages} size="compact" /></Sample>
- <p className="text-sm text-muted-foreground">Select a thumbnail or +2 to view all six images. · 点击缩略图或 +2 查看全部六张图片。</p>
+ <Sample label={t("controls.imageGallery.sixImages")}><ImageGallery images={images} /></Sample>
+ <Sample label={t("controls.imageGallery.compact")}><ImageGallery images={images} size="compact" /></Sample>
+ <p className="text-sm text-muted-foreground">{t("controls.imageGallery.hint")}</p>
</div>;
}
function ImageLightboxPreview() {
+ const { t } = useGalleryTranslation();
+ const images = useMediaImages();
const [index, setIndex] = useState<number | null>(null);
return <div className="space-y-4">
- <Button variant="outline" onClick={() => setIndex(0)}>Open full-screen viewer · 打开全屏预览</Button>
- <p className="text-sm text-muted-foreground">Use previous/next, ←/→ or Home/End; close with × or Escape. · 使用前后按钮、方向键或 Home/End 切图;点击 × 或按 Escape 关闭。</p>
- <ImageLightbox images={mediaImages.slice(0, 3)} index={index} onIndexChange={setIndex}
+ <Button variant="outline" onClick={() => setIndex(0)}>{t("controls.imageLightbox.open")}</Button>
+ <p className="text-sm text-muted-foreground">{t("controls.imageLightbox.hint")}</p>
+ <ImageLightbox images={images.slice(0, 3)} index={index} onIndexChange={setIndex}
onOpenChange={(open) => { if (!open) setIndex(null); }} />
</div>;
}
function ZoomableImagePreview() {
+ const { t } = useGalleryTranslation();
+ const images = useMediaImages();
return <div className="space-y-4">
- <p className="text-sm text-muted-foreground">Zoom with +/−, double-click, Ctrl+wheel or pinch. Drag or scroll to pan after zooming; click the percentage or press 0 to reset. · 使用 +/−、双击、Ctrl+滚轮或双指缩放;放大后拖动或滚动平移,点击百分比或按 0 复位。</p>
+ <p className="text-sm text-muted-foreground">{t("controls.zoomableImage.hint")}</p>
<div className="relative h-[28rem] overflow-hidden rounded-control bg-slate-950">
- <ZoomableImage src={mediaImages[0].url} alt={mediaImages[0].name} />
+ <ZoomableImage src={images[0].url} alt={images[0].name} />
</div>
</div>;
}
function AttachmentTilePreview() {
+ const { t } = useGalleryTranslation();
+ const images = useMediaImages();
return <div className="space-y-6">
- <Sample label="Image · 图片"><AttachmentTile attachment={{ kind: "image", ...mediaImages[1] }} variant="compact" /></Sample>
- <Sample label="Playable video · 可播放视频"><AttachmentTile attachment={{ kind: "video", name: "sample.webm", url: sampleVideo }} /></Sample>
- <Sample label="Download file · 下载文件"><AttachmentTile attachment={{ kind: "file", name: "report.txt", url: "data:text/plain;charset=utf-8,Gallery%20attachment%20example%0A" }} /></Sample>
- <Sample label="Unavailable attachments (no URL) · 附件不可用(无 URL)">
+ <Sample label={t("controls.attachment.image")}><AttachmentTile attachment={{ kind: "image", ...images[1] }} variant="compact" /></Sample>
+ <Sample label={t("controls.attachment.video")}><AttachmentTile attachment={{ kind: "video", name: "sample.webm", url: sampleVideo }} /></Sample>
+ <Sample label={t("controls.attachment.file")}><AttachmentTile attachment={{ kind: "file", name: "report.txt", url: "data:text/plain;charset=utf-8,Gallery%20attachment%20example%0A" }} /></Sample>
+ <Sample label={t("controls.attachment.unavailable")}>
<div className="flex flex-wrap gap-3">{(["image", "video", "file"] as const).map((kind) =>
<AttachmentTile key={kind} attachment={{ kind, name: `${kind}-unavailable` }} />)}</div>
</Sample>
@@ -139,59 +158,61 @@ function AttachmentTilePreview() {
}
function SettingsPreview() {
+ const { t } = useGalleryTranslation();
const [enabled, setEnabled] = useState(false);
return <div className="settings-grid space-y-4">
- <SettingsSectionTitle>Example preferences</SettingsSectionTitle>
- <SettingsGroup><SettingsRow title="Keep drafts" description="A shared setting row with a controlled switch.">
- <ToggleButton checked={enabled} onChange={setEnabled} label="Keep drafts" />
- </SettingsRow><SettingsRow title="Project label"><Input aria-label="Settings project label" defaultValue="Nanobot" /></SettingsRow></SettingsGroup>
- <SettingsFeature title="Example capability" enabled={enabled} onChange={setEnabled}>
- <SettingsGroup><SettingsRow title="Notes"><Input aria-label="Capability notes" placeholder="Local preview only" /></SettingsRow></SettingsGroup>
+ <SettingsSectionTitle>{t("controls.settingsComposition.preferences")}</SettingsSectionTitle>
+ <SettingsGroup><SettingsRow title={t("controls.settingsComposition.keepDrafts")} description={t("controls.settingsComposition.switchHint")}>
+ <ToggleButton checked={enabled} onChange={setEnabled} label={t("controls.settingsComposition.keepDrafts")} />
+ </SettingsRow><SettingsRow title={t("controls.settingsComposition.projectLabel")}><Input aria-label={t("controls.settingsComposition.projectName")} defaultValue="Nanobot" /></SettingsRow></SettingsGroup>
+ <SettingsFeature title={t("controls.settingsComposition.capability")} enabled={enabled} onChange={setEnabled}>
+ <SettingsGroup><SettingsRow title={t("controls.settingsComposition.notes")}><Input aria-label={t("controls.settingsComposition.capabilityNotes")} placeholder={t("controls.settingsComposition.localOnly")} /></SettingsRow></SettingsGroup>
</SettingsFeature>
</div>;
}
function FileReferencePreview() {
+ const { t } = useGalleryTranslation();
const [selected, setSelected] = useState("");
return <div className="space-y-4"><FileReferenceChip path="src/components/ui/button.tsx" onOpen={setSelected} />
- <p role="status" className="text-sm text-muted-foreground">{selected || "Select the file reference."}</p></div>;
+ <p role="status" className="text-sm text-muted-foreground">{selected || t("controls.fileReference.select")}</p></div>;
}
const components = "webui/src/components/";
export const sharedExamples: ComponentExample[] = [
- { title: "MarkdownText · 回复排版", files: ["MarkdownText", "MarkdownTextRenderer"], Preview: MarkdownPreview,
- description: "The production streaming renderer, including tables, code and math.", options: "children is Markdown text. streaming controls incomplete content; onOpenFilePreview belongs to the screen.",
+ { title: "controls.markdown.title", files: ["MarkdownText", "MarkdownTextRenderer"], Preview: MarkdownPreview,
+ description: "controls.markdown.description", options: "controls.markdown.options",
code: '<MarkdownText streaming={running}>{content}</MarkdownText>' },
- { title: "CodeBlock · 代码展示", files: ["CodeBlock", "ViewportCodeRows"], Preview: CodePreview,
- description: "Syntax highlighting, line numbers, clipboard copying, ANSI output and viewport-aware rows.", options: "code and language supply content; showLineNumbers, wrapLongLines and chrome control presentation. Viewport highlighting requires line numbers and unwrapped lines.",
+ { title: "controls.code.title", files: ["CodeBlock", "ViewportCodeRows"], Preview: CodePreview,
+ description: "controls.code.description", options: "controls.code.options",
code: '<CodeBlock language="python" code={source} showLineNumbers />' },
- { title: "DisplayMath · 数学公式", files: ["DisplayMath"], Preview: () => <MarkdownText>{"$$\nE = mc^2\n$$"}</MarkdownText>,
- description: "The shared fitting wrapper around Markdown's rendered display math.", options: "Use MarkdownText for TeX source. DisplayMath itself accepts already-rendered math nodes and scales them to the available width.", code: '<MarkdownText>{"$$\\nE = mc^2\\n$$"}</MarkdownText>' },
- { title: "MessageBubble · 消息", files: ["MessageBubble"], Preview: MessagePreview,
- description: "User and assistant messages, including thinking and delivery states.", options: "message is a UIMessage projected by the chat runtime. Data and network actions remain outside the renderer.",
+ { title: "controls.math.title", files: ["DisplayMath"], Preview: () => <MarkdownText>{"$$\nE = mc^2\n$$"}</MarkdownText>,
+ description: "controls.math.description", options: "controls.math.options", code: '<MarkdownText>{"$$\\nE = mc^2\\n$$"}</MarkdownText>' },
+ { title: "controls.message.title", files: ["MessageBubble"], Preview: MessagePreview,
+ description: "controls.message.description", options: "controls.message.options",
code: '<MessageBubble message={{ id: "example", role: "assistant", content: "Hello", createdAt: Date.now() }} />' },
- { title: "Agent activity · 思考与工具活动", files: ["thread/activity/ActivityStep", "thread/activity/ReasoningRow", "thread/activity/ThinkingReasoningShell", "thread/activity/GenericToolRun"], Preview: ActivityPreview,
- description: "Activity primitives composed into a working, completed or failed sequence.", options: "Pass text, status and controlled expansion. The gateway owns tool execution; these components render its projected state.",
+ { title: "controls.activity.title", files: ["thread/activity/ActivityStep", "thread/activity/ReasoningRow", "thread/activity/ThinkingReasoningShell", "thread/activity/GenericToolRun"], Preview: ActivityPreview,
+ description: "controls.activity.description", options: "controls.activity.options",
code: '<ReasoningRow text={reasoning} streaming={running} />\n<ActivityStep label="Read source" detail="button.tsx" active={running} />' },
- { title: "FileEditGroup · 文件修改", files: ["thread/activity/FileEditRow", "thread/activity/DiffPair", "thread/activity/DiffSyntaxHighlight"], Preview: FilesPreview,
- description: "File references, line-change counts and expandable diffs.", options: "edits contains display summaries; displayMode selects summary/diff/collapsed_diff; onOpenFilePreview is supplied by the screen.",
+ { title: "controls.files.title", files: ["thread/activity/FileEditRow", "thread/activity/DiffPair", "thread/activity/DiffSyntaxHighlight"], Preview: FilesPreview,
+ description: "controls.files.description", options: "controls.files.options",
code: '<FileEditGroup edits={edits} displayMode="diff" onOpenFilePreview={openFile} />' },
- { title: "ImageGallery · 图片缩略图", files: ["ImageGallery"], Preview: ImageGalleryPreview,
- description: "Multi-image layout, thumbnail selection and overflow. · 多图布局、缩略图选择与更多图片。", options: "images supplies URLs and names; size selects large or compact thumbnails, align controls alignment. Only four thumbnails are shown; the composed ImageLightbox includes all viewable images. · images 提供地址和名称,size 控制尺寸,align 控制对齐;最多显示四个缩略图,内置 ImageLightbox 可浏览全部有地址的图片。",
+ { title: "controls.imageGallery.title", files: ["ImageGallery"], Preview: ImageGalleryPreview,
+ description: "controls.imageGallery.description", options: "controls.imageGallery.options",
code: '<ImageGallery images={images} />\n<ImageGallery images={images} size="compact" />' },
- { title: "ImageLightbox · 全屏预览", files: ["ImageLightbox"], Preview: ImageLightboxPreview,
- description: "Controlled full-screen viewing and image navigation. · 受控全屏预览与多图切换。", options: "index is null when closed. The caller owns index and open callbacks; ImageLightbox composes ZoomableImage and resets the view on image changes. · index 为 null 时关闭;调用方管理索引与开关回调,ImageLightbox 内置 ZoomableImage,切图时重置缩放。",
+ { title: "controls.imageLightbox.title", files: ["ImageLightbox"], Preview: ImageLightboxPreview,
+ description: "controls.imageLightbox.description", options: "controls.imageLightbox.options",
code: '<ImageLightbox images={images} index={index} onIndexChange={setIndex}\n onOpenChange={(open) => { if (!open) setIndex(null); }} />' },
- { title: "ZoomableImage · 单图缩放", files: ["ZoomableImage"], Preview: ZoomableImagePreview,
- description: "Single-image zoom, bounded panning and gestures. · 单图缩放、边界内平移与手势。", options: "src and alt supply one image. Place it in a positioned container with a defined height; remount when changing images. Focus the viewport for +, − and 0 keyboard controls. · src 和 alt 提供单张图片;容器须有定位和明确高度,换图时重新挂载。聚焦图片区域后可用 +、− 和 0 操作。",
+ { title: "controls.zoomableImage.title", files: ["ZoomableImage"], Preview: ZoomableImagePreview,
+ description: "controls.zoomableImage.description", options: "controls.zoomableImage.options",
code: '<div className="relative h-[28rem] bg-slate-950">\n <ZoomableImage src={image.url} alt={image.name} />\n</div>' },
- { title: "AttachmentTile · 附件", files: ["AttachmentTile"], Preview: AttachmentTilePreview,
- description: "Image preview, video playback, file download and unavailable attachments. · 图片预览、视频播放、文件下载与不可用附件。", options: "attachment.kind selects image, video or file. Images open ImageLightbox, videos use native controls, files use download links. Missing URLs render unavailable tiles; failed image loads also render an unavailable tile. · attachment.kind 区分图片、视频与文件;图片打开 ImageLightbox,视频使用原生控件,文件提供下载链接。无地址或图片加载失败时显示不可用附件。",
+ { title: "controls.attachment.title", files: ["AttachmentTile"], Preview: AttachmentTilePreview,
+ description: "controls.attachment.description", options: "controls.attachment.options",
code: '<AttachmentTile attachment={{ kind: "video", name: "sample.webm", url: sampleVideo }} />\n<AttachmentTile attachment={{ kind: "file", name: "report.txt", url: reportUrl }} />\n<AttachmentTile attachment={{ kind: "image", name: "unavailable.png" }} />' },
- { title: "FileReferenceChip · 文件引用", files: ["FileReferenceChip"], Preview: FileReferencePreview,
- description: "A file reference with a caller-owned open action.", options: "path supplies the label; onOpen supplies the action. The component does not decide workspace permissions.",
+ { title: "controls.fileReference.title", files: ["FileReferenceChip"], Preview: FileReferencePreview,
+ description: "controls.fileReference.description", options: "controls.fileReference.options",
code: '<FileReferenceChip path="src/app.tsx" onOpen={openFile} />' },
- { title: "Settings composition · 设置组件", files: ["settings/shared/SettingsControls", "settings/shared/SettingsFeature"], Preview: SettingsPreview,
- description: "The actual settings row/group/capability components composed with shared controls.", options: "The containing settings controller owns values and persistence. A gallery callback updates only local preview state.",
+ { title: "controls.settingsComposition.title", files: ["settings/shared/SettingsControls", "settings/shared/SettingsFeature"], Preview: SettingsPreview,
+ description: "controls.settingsComposition.description", options: "controls.settingsComposition.options",
code: '<SettingsGroup><SettingsRow title="Enabled"><ToggleButton checked={enabled} onChange={setEnabled} label="Enabled" /></SettingsRow></SettingsGroup>' },
].map((example) => ({ ...example, files: example.files.map((file) => `${components}${file}.tsx`) }));
diff --git a/webui/src/dev/gallery/shell.tsx b/webui/src/dev/gallery/shell.tsx
index 0a640bdf8..3d6f7a948 100644
--- a/webui/src/dev/gallery/shell.tsx
+++ b/webui/src/dev/gallery/shell.tsx
@@ -1,6 +1,6 @@
import { useRef, useState, type ReactNode } from "react";
import { createPortal } from "react-dom";
-import { useTranslation } from "react-i18next";
+import { Trans, useTranslation } from "react-i18next";
import { CapabilityMentionToken } from "@/components/CliAppMentionText";
import type { CapabilityMentionSegment } from "@/lib/composer-mention-text";
@@ -26,6 +26,7 @@ import type { HostCompatibility, RemoteProfile } from "@/lib/remote-instances";
import type { CliAppInfo, McpPresetInfo, SessionAutomationJob, SessionMention, WorkbenchLayout } from "@/lib/types";
import { cn } from "@/lib/utils";
import { Sample, StatePicker, type ComponentExample } from "./example";
+import { useGalleryTranslation } from "./i18n";
const cliApp: CliAppInfo = {
name: "nanobot", display_name: "Nanobot", category: "assistant", description: "Local assistant",
@@ -45,18 +46,19 @@ const sessionMention: SessionMention = {
function RenamePreview() {
const { t } = useTranslation();
+ const { t: g } = useGalleryTranslation();
const [open, setOpen] = useState(false);
const [title, setTitle] = useState("组件设计");
return <div className="space-y-4">
<p className="text-sm">{title}</p>
- <Button variant="outline" onClick={() => setOpen(true)}>重命名分组</Button>
+ <Button variant="outline" onClick={() => setOpen(true)}>{t("workbench.renameGroupTitle")}</Button>
<RenameDialog open={open} title={title}
dialogTitle={t("workbench.renameGroupTitle")}
description={t("workbench.renameGroupDescription")}
placeholder={t("workbench.renameGroupPlaceholder")}
onCancel={() => setOpen(false)}
onConfirm={(next) => { setTitle(next); setOpen(false); }} />
- <p role="status" className="text-xs text-muted-foreground">保存后更新上方标题。</p>
+ <p role="status" className="text-xs text-muted-foreground">{g("previews.rename.hint")}</p>
</div>;
}
@@ -69,33 +71,36 @@ const automations: SessionAutomationJob[] = [
];
function DeletePreview() {
+ const { t } = useGalleryTranslation();
const [scenario, setScenario] = useState<"single" | "multiple" | "automations">("single");
const [open, setOpen] = useState(false);
const [deleted, setDeleted] = useState(false);
return <>
- <StatePicker label="删除场景" value={scenario} options={["single", "multiple", "automations"]}
+ <StatePicker label={t("previews.delete.scenario")} value={scenario} options={["single", "multiple", "automations"]}
onChange={(next) => { setScenario(next); setDeleted(false); }} />
- <Button variant="outline" onClick={() => { setDeleted(false); setOpen(true); }}>打开删除确认</Button>
+ <Button variant="outline" onClick={() => { setDeleted(false); setOpen(true); }}>{t("previews.delete.open")}</Button>
<DeleteConfirm open={open} title="组件设计" count={scenario === "multiple" ? 3 : 1}
automations={scenario === "automations" ? automations : []} onCancel={() => setOpen(false)}
onConfirm={() => { setDeleted(true); setOpen(false); }} />
- <p role="status" className="mt-4 text-xs text-muted-foreground">{deleted ? "已确认删除示例。" : "选择单个、批量或带自动任务的会话。"}</p>
+ <p role="status" className="mt-4 text-xs text-muted-foreground">{t(deleted ? "previews.delete.confirmed" : "previews.delete.hint")}</p>
</>;
}
function InlineTokensPreview() {
+ const { t } = useGalleryTranslation();
const [command, setCommand] = useState("/status");
const [handle, setHandle] = useState("gallery-session");
return <div className="space-y-5">
- <Sample label="命令文本"><Input aria-label="命令文本" value={command} onChange={(event) => setCommand(event.target.value)} />
- <p className="text-sm">运行 <SlashCommandText command={command} /> 查看状态。</p></Sample>
- <Sample label="会话标识"><Input aria-label="会话标识" value={handle} onChange={(event) => setHandle(event.target.value)} />
- <p className="text-sm">继续 <SessionHandleLabel id={handle}>@design</SessionHandleLabel> 中的工作。</p></Sample>
- <Sample label="共享高亮"><p className="text-sm">使用 <InlineTokenHighlight color={INLINE_TOKEN_HIGHLIGHT_COLOR} title="Skill: review">review</InlineTokenHighlight> 检查修改。</p></Sample>
+ <Sample label={t("previews.inlineTokens.command")}><Input aria-label={t("previews.inlineTokens.command")} value={command} onChange={(event) => setCommand(event.target.value)} />
+ <p className="text-sm"><Trans t={t} i18nKey="previews.inlineTokens.run" components={{ command: <SlashCommandText command={command} /> }} /></p></Sample>
+ <Sample label={t("previews.inlineTokens.handle")}><Input aria-label={t("previews.inlineTokens.handle")} value={handle} onChange={(event) => setHandle(event.target.value)} />
+ <p className="text-sm"><Trans t={t} i18nKey="previews.inlineTokens.continue" components={{ session: <SessionHandleLabel id={handle}>@design</SessionHandleLabel> }} /></p></Sample>
+ <Sample label={t("previews.inlineTokens.highlight")}><p className="text-sm"><Trans t={t} i18nKey="previews.inlineTokens.review" components={{ skill: <InlineTokenHighlight color={INLINE_TOKEN_HIGHLIGHT_COLOR} title={t("previews.inlineTokens.skill", { name: "review" })}>review</InlineTokenHighlight> }} /></p></Sample>
</div>;
}
function SessionLinksPreview({ children }: { children: ReactNode }) {
+ const { t } = useGalleryTranslation();
const [selected, setSelected] = useState(false);
return <div className="space-y-4" onClick={(event) => {
if (!(event.target instanceof Element)) return;
@@ -105,14 +110,15 @@ function SessionLinksPreview({ children }: { children: ReactNode }) {
setSelected(true);
}}>
{children}
- <p role="status" className="text-xs text-muted-foreground">{selected ? "已选择会话:组件设计。" : "选择会话引用查看反馈。"}</p>
+ <p role="status" className="text-xs text-muted-foreground">{selected ? t("previews.sessionLinks.selected", { name: sessionMention.title }) : t("previews.sessionLinks.hint")}</p>
</div>;
}
function UserTextPreview() {
+ const { t } = useGalleryTranslation();
const [text, setText] = useState("用 $review 检查 @nanobot 的修改,参考 @design 和 @files。");
return <SessionLinksPreview>
- <label className="grid gap-2 text-xs text-muted-foreground">消息文本
+ <label className="grid gap-2 text-xs text-muted-foreground">{t("previews.userText.message")}
<Textarea value={text} onChange={(event) => setText(event.target.value)} />
</label>
<p className="whitespace-pre-wrap text-sm leading-7"><UserMessageText text={text} cliApps={[cliApp]}
@@ -121,6 +127,7 @@ function UserTextPreview() {
}
function CapabilityTokensPreview() {
+ const { t } = useGalleryTranslation();
const [variant, setVariant] = useState<"message" | "composer">("message");
const segments: Array<Exclude<CapabilityMentionSegment, { kind: "text" }>> = [
{ kind: "cli", text: "@nanobot", app: cliApp },
@@ -128,23 +135,24 @@ function CapabilityTokensPreview() {
{ kind: "session", text: "@design", mention: sessionMention },
];
return <SessionLinksPreview>
- <StatePicker label="引用位置" value={variant} options={["message", "composer"]} onChange={setVariant} />
+ <StatePicker label={t("previews.capabilityTokens.position")} value={variant} options={["message", "composer"]} onChange={setVariant} />
<div className="flex flex-wrap gap-6 text-sm leading-7">{segments.map((segment) =>
<CapabilityMentionToken key={segment.kind} segment={segment} variant={variant} />)}</div>
</SessionLinksPreview>;
}
function ProductIconsPreview() {
+ const { t } = useGalleryTranslation();
const [size, setSize] = useState<"16" | "20" | "24">("20");
const [selected, setSelected] = useState("ConversationIcon");
return <>
- <StatePicker label="图标尺寸" value={size} options={["16", "20", "24"]} onChange={setSize} />
+ <StatePicker label={t("previews.productIcons.size")} value={size} options={["16", "20", "24"]} onChange={setSize} />
<div className="grid grid-cols-2 gap-2 sm:grid-cols-4 lg:grid-cols-6">{Object.entries(ProductIcons).map(([name, Icon]) =>
<button key={name} type="button" aria-pressed={selected === name} onClick={() => setSelected(name)}
className={cn("flex min-w-0 flex-col items-center gap-2 rounded-control p-3 text-muted-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", selected === name && "bg-muted text-foreground")}>
<Icon size={Number(size)} /><span className="max-w-full break-all text-center text-[10px] leading-4">{name.replace(/Icon$/, "")}</span>
</button>)}</div>
- <p role="status" className="mt-4 text-xs text-muted-foreground">已选择:{selected}</p>
+ <p role="status" className="mt-4 text-xs text-muted-foreground">{t("previews.productIcons.selected", { name: selected })}</p>
</>;
}
@@ -153,34 +161,38 @@ function StartupPreview() {
}
function FileActionsPreview() {
+ const { t } = useGalleryTranslation();
const [scope, setScope] = useState<"workspace" | "outside" | "unresolved">("workspace");
const path = "src/app.tsx";
return <>
- <StatePicker label="文件范围" value={scope} options={["workspace", "outside", "unresolved"]} onChange={setScope} />
+ <StatePicker label={t("previews.fileActions.scope")} value={scope} options={["workspace", "outside", "unresolved"]} onChange={setScope} />
<FileActions path={path} metadata={scope === "unresolved" ? undefined : {
path: scope === "workspace" ? "D:/workspace/nanobot/src/app.tsx" : "D:/documents/report.tsx",
relative_path: scope === "workspace" ? path : null,
}}><Button variant="outline">{path}</Button></FileActions>
- <p className="mt-4 text-xs text-muted-foreground">右键打开复制菜单,也可聚焦文件后按 Shift+F10。</p>
+ <p className="mt-4 text-xs text-muted-foreground">{t("previews.fileActions.hint")}</p>
</>;
}
function WebLinksPreview() {
+ const { t } = useGalleryTranslation();
const [open, setOpen] = useState(false);
const [display, setDisplay] = useState<"compact" | "expanded">("compact");
const message = useRef<HTMLDivElement>(null);
const links = useMessageWebLinks(message, open);
return <div className="space-y-4">
- <StatePicker label="链接菜单宽度" value={display} options={["compact", "expanded"]} onChange={setDisplay} />
+ <StatePicker label={t("previews.webLinks.width")} value={display} options={["compact", "expanded"]} onChange={setDisplay} />
<div ref={message} className="text-sm leading-7"><p data-assistant-selectable>
- 查看 <WebLink href={`${window.location.origin}/gallery.html`} className="underline underline-offset-4">组件画廊</WebLink>
- {" 和 "}<WebLink href={`${window.location.origin}/brand/nanobot_icon_512.png`} className="underline underline-offset-4">品牌图片</WebLink>。
+ <Trans t={t} i18nKey="previews.webLinks.message" components={{
+ gallery: <WebLink href={`${window.location.origin}/gallery.html`} className="underline underline-offset-4" />,
+ brand: <WebLink href={`${window.location.origin}/brand/nanobot_icon_512.png`} className="underline underline-offset-4" />,
+ }} />
</p></div>
- <Button variant="outline" onClick={() => setOpen((value) => !value)}>{open ? "关闭链接菜单" : "查看消息链接"}</Button>
+ <Button variant="outline" onClick={() => setOpen((value) => !value)}>{t(open ? "previews.webLinks.close" : "previews.webLinks.open")}</Button>
{open && links.length > 0 ? <div className="rounded-control border p-1">
<MessageLinksMenu links={links} onBack={() => setOpen(false)} onClose={() => setOpen(false)} expanded={display === "expanded"} />
</div> : null}
- <p className="text-xs text-muted-foreground">右键链接可复制地址;消息菜单从实际渲染的链接中收集条目。</p>
+ <p className="text-xs text-muted-foreground">{t("previews.webLinks.hint")}</p>
</div>;
}
@@ -189,16 +201,17 @@ const initialPanes: WorkbenchPane[] = [
];
function WorkbenchPreview() {
+ const { t } = useGalleryTranslation();
const [panes, setPanes] = useState(initialPanes);
const [active, setActive] = useState("pane-1");
const [layout, setLayout] = useState<WorkbenchLayout>("columns");
const [ratios, setRatios] = useState<number[]>([]);
return <>
- <StatePicker label="窗格布局" value={layout} options={["columns", "rows", "grid", "bsp", "main-stack"]}
+ <StatePicker label={t("previews.workbench.layout")} value={layout} options={["columns", "rows", "grid", "bsp", "main-stack"]}
onChange={(next) => { setLayout(next); setRatios([]); }} />
<div className="h-[28rem] overflow-hidden rounded-panel border">
<PaneWorkbench panes={panes} activePaneKey={active} layout={layout} showLayoutControl
- addPaneDisabled={panes.length >= 4} addPaneDisabledLabel="最多四个窗格"
+ addPaneDisabled={panes.length >= 4} addPaneDisabledLabel={t("previews.workbench.limit")}
onActivatePane={setActive} onLayoutChange={(next) => { setLayout(next); setRatios([]); }}
onAddPane={() => {
const next = { key: `pane-${panes.length + 1}`, title: "补充笔记" };
@@ -212,26 +225,28 @@ function WorkbenchPreview() {
</div>;
return <div className="flex min-w-0 flex-1 flex-col gap-3 p-3 pb-8">
{context.active && context.headerPortalTarget ? createPortal(header, context.headerPortalTarget) : context.active ? header : <p className="h-10 content-center text-xs text-muted-foreground">{pane.title}</p>}
- <label className="grid gap-2 text-xs text-muted-foreground">{pane.title}笔记
+ <label className="grid gap-2 text-xs text-muted-foreground">{t("previews.workbench.notes", { title: pane.title })}
<Textarea defaultValue={`在${pane.title}窗格中编辑笔记。`} /></label>
- <p className="text-xs text-muted-foreground">{context.active ? "当前窗格" : "选择此窗格以激活"}</p>
+ <p className="text-xs text-muted-foreground">{t(context.active ? "previews.workbench.active" : "previews.workbench.activate")}</p>
</div>;
}} />
</div>
- <p role="status" className="mt-4 text-xs text-muted-foreground">当前:{panes.find((pane) => pane.key === active)?.title}。拖动底部手柄移动窗格,拖动边界调整尺寸。</p>
+ <p role="status" className="mt-4 text-xs text-muted-foreground">{t("previews.workbench.hint", { title: panes.find((pane) => pane.key === active)?.title })}</p>
</>;
}
function ConnectionPreview() {
+ const { t } = useGalleryTranslation();
const [state, setState] = useState<HostConnectionState>("open");
return <>
- <StatePicker label="连接状态" value={state} options={["open", "closed", "connecting", "error"]} onChange={setState} />
- <div className="flex flex-wrap gap-8"><Sample label="状态与文字"><HostConnectionStatus state={state} /></Sample>
- <Sample label="紧凑显示"><HostConnectionStatus state={state} compact /></Sample></div>
+ <StatePicker label={t("previews.hostConnection.state")} value={state} options={["open", "closed", "connecting", "error"]} onChange={setState} />
+ <div className="flex flex-wrap gap-8"><Sample label={t("previews.hostConnection.withText")}><HostConnectionStatus state={state} /></Sample>
+ <Sample label={t("previews.hostConnection.compact")}><HostConnectionStatus state={state} compact /></Sample></div>
</>;
}
function CompatibilityPreview() {
+ const { t } = useGalleryTranslation();
const [status, setStatus] = useState<HostCompatibility["status"] | "unchecked">("compatible");
const [open, setOpen] = useState(false);
const profile: RemoteProfile = {
@@ -242,48 +257,48 @@ function CompatibilityPreview() {
},
};
return <>
- <StatePicker label="版本兼容状态" value={status} options={["compatible", "update_host", "update_client", "unknown", "unchecked"]} onChange={setStatus} />
- <Button variant="outline" onClick={() => setOpen(true)}>查看兼容详情</Button>
+ <StatePicker label={t("previews.compatibility.state")} value={status} options={["compatible", "update_host", "update_client", "unknown", "unchecked"]} onChange={setStatus} />
+ <Button variant="outline" onClick={() => setOpen(true)}>{t("previews.compatibility.open")}</Button>
<HostCompatibilityDialog profile={open ? profile : undefined} clientVersion="0.3.0" onClose={() => setOpen(false)} />
</>;
}
const components = "webui/src/components/";
export const shellExamples: ComponentExample[] = [
- { title: "RenameDialog · 分组与项目改名", files: ["RenameDialog"], Preview: RenamePreview,
- description: "预览分组和项目使用的改名弹窗;话题在会话列表中行内改名。", options: "调用方提供 dialogTitle、description 和 placeholder。title 设置初值,onConfirm 接收去除两端空白的标题。空标题无法保存。",
+ { title: "previews.rename.title", files: ["RenameDialog"], Preview: RenamePreview,
+ description: "previews.rename.description", options: "previews.rename.options",
code: '<RenameDialog open={open} title={title} dialogTitle="Rename group" description="Give this group a name." placeholder="Group name" onCancel={close} onConfirm={rename} />' },
- { title: "DeleteConfirm · 删除确认", files: ["DeleteConfirm"], Preview: DeletePreview,
- description: "切换单个、批量和关联自动任务的删除确认。", options: "count 控制批量文案;automations 展示关联任务、计划与下次运行时间。确认按钮调用 onConfirm。",
+ { title: "previews.delete.title", files: ["DeleteConfirm"], Preview: DeletePreview,
+ description: "previews.delete.description", options: "previews.delete.options",
code: '<DeleteConfirm open={open} title="组件设计" count={1} automations={jobs} onCancel={close} onConfirm={remove} />' },
- { title: "Inline tokens · 命令与会话标识", files: ["SlashCommandText", "InlineTokenHighlight", "SessionHandleLabel"], Preview: InlineTokensPreview,
- description: "输入命令与会话标识,观察高亮与稳定的会话颜色。", options: "SlashCommandText 接收 command;InlineTokenHighlight 接收 color 和内容;SessionHandleLabel 根据 id 生成颜色。",
+ { title: "previews.inlineTokens.title", files: ["SlashCommandText", "InlineTokenHighlight", "SessionHandleLabel"], Preview: InlineTokensPreview,
+ description: "previews.inlineTokens.description", options: "previews.inlineTokens.options",
code: '<SlashCommandText command="/status" />\n<SessionHandleLabel id={session.id}>@design</SessionHandleLabel>\n<InlineTokenHighlight color="var(--inline-token-highlight)">review</InlineTokenHighlight>' },
- { title: "UserMessageText · 消息引用", files: ["UserMessageText"], Preview: UserTextPreview,
- description: "编辑消息,预览技能、应用、MCP 和会话引用。", options: "text 为原始消息;cliApps、mcpPresets 与 sessionMentions 提供可解析引用。技能使用 $name,其他引用使用 @name。",
+ { title: "previews.userText.title", files: ["UserMessageText"], Preview: UserTextPreview,
+ description: "previews.userText.description", options: "previews.userText.options",
code: '<UserMessageText text={text} cliApps={apps} mcpPresets={presets} sessionMentions={sessions} />' },
- { title: "CapabilityMentionToken · 应用引用", files: ["CliAppMentionText"], Preview: CapabilityTokensPreview,
- description: "比较应用、MCP 与会话引用在输入框和消息中的样式。", options: "segment 指定 cli、mcp 或 session 及其元数据;variant 选择 composer 或 message。示例使用本地品牌图片。",
+ { title: "previews.capabilityTokens.title", files: ["CliAppMentionText"], Preview: CapabilityTokensPreview,
+ description: "previews.capabilityTokens.description", options: "previews.capabilityTokens.options",
code: '<CapabilityMentionToken segment={{ kind: "cli", text: "@nanobot", app }} variant="message" />' },
- { title: "Product icons · 产品图标", files: ["icons/product-icons"], Preview: ProductIconsPreview,
- description: "浏览实际产品图标,切换尺寸并选择高亮状态。", options: "图标接受 LucideProps,例如 size、strokeWidth、className。颜色继承 currentColor,按钮提供可访问的动作名称。",
+ { title: "previews.productIcons.title", files: ["icons/product-icons"], Preview: ProductIconsPreview,
+ description: "previews.productIcons.description", options: "previews.productIcons.options",
code: '<ConversationIcon size={20} />\n<SettingsIcon className="text-muted-foreground" />' },
- { title: "StartupShell · 启动占位", files: ["StartupShell"], Preview: StartupPreview,
- description: "预览应用连接时的安静占位布局。", options: "embedded 使用 section,其余情况使用 main。组件持续提供 aria-busy 与加载状态;占位样式来自应用入口。",
+ { title: "previews.startup.title", files: ["StartupShell"], Preview: StartupPreview,
+ description: "previews.startup.description", options: "previews.startup.options",
code: '<StartupShell embedded />' },
- { title: "FileActions · 文件菜单", files: ["FileActions"], Preview: FileActionsPreview,
- description: "右键文件,体验完整路径、相对路径和引用文本的复制菜单。", options: "path 为引用文本;metadata 提供完整路径与可选相对路径。画廊直接提供元数据,无需加载文件。",
+ { title: "previews.fileActions.title", files: ["FileActions"], Preview: FileActionsPreview,
+ description: "previews.fileActions.description", options: "previews.fileActions.options",
code: '<FileActions path="src/app.tsx" metadata={{ path: "D:/workspace/src/app.tsx", relative_path: "src/app.tsx" }}><Button>app.tsx</Button></FileActions>' },
- { title: "Web links · 链接菜单", files: ["WebLink", "MessageLinksMenu"], Preview: WebLinksPreview,
- description: "打开真实链接菜单,选择消息中的链接并复制地址。", options: "WebLink 接收链接属性;useMessageWebLinks 收集消息中实际渲染的链接。MessageLinksMenu 接收条目、返回与关闭回调,expanded 控制宽度。示例链接均指向本地画廊资源。",
+ { title: "previews.webLinks.title", files: ["WebLink", "MessageLinksMenu"], Preview: WebLinksPreview,
+ description: "previews.webLinks.description", options: "previews.webLinks.options",
code: '<WebLink href={url}>组件画廊</WebLink>\nconst links = useMessageWebLinks(messageRef, open);\n<MessageLinksMenu links={links} onBack={close} onClose={close} expanded />' },
- { title: "PaneWorkbench · 多窗格", files: ["workbench/PaneWorkbench"], Preview: WorkbenchPreview,
- description: "切换布局、激活窗格、添加窗格并调整位置与尺寸。", options: "panes、activePaneKey、layout 与 splitRatios 由调用方控制。renderPane 提供内容;回调将变更写回本地示例状态。窄屏自动显示当前窗格。",
+ { title: "previews.workbench.title", files: ["workbench/PaneWorkbench"], Preview: WorkbenchPreview,
+ description: "previews.workbench.description", options: "previews.workbench.options",
code: '<PaneWorkbench panes={panes} activePaneKey={active} layout={layout} showLayoutControl onActivatePane={setActive} onAddPane={addPane} onLayoutChange={setLayout} onPaneOrderChange={reorder} renderPane={renderPane} />' },
- { title: "HostConnectionStatus · 连接状态", files: ["remote/HostConnectionStatus"], Preview: ConnectionPreview,
- description: "切换已连接、断开、连接中和出错状态。", options: "state 控制图标与文字,compact 隐藏可见文字并保留可访问状态和悬浮标题。",
+ { title: "previews.hostConnection.title", files: ["remote/HostConnectionStatus"], Preview: ConnectionPreview,
+ description: "previews.hostConnection.description", options: "previews.hostConnection.options",
code: '<HostConnectionStatus state="connecting" />\n<HostConnectionStatus state="open" compact />' },
- { title: "HostCompatibilityDialog · 版本兼容", files: ["remote/HostCompatibilityDialog"], Preview: CompatibilityPreview,
- description: "切换兼容检查结果,查看版本、准备说明和升级指南入口。", options: "profile 存在时打开对话框;compatibility 指定报告状态与版本。onClose 由调用方关闭;此组件只展示信息。",
+ { title: "previews.compatibility.title", files: ["remote/HostCompatibilityDialog"], Preview: CompatibilityPreview,
+ description: "previews.compatibility.description", options: "previews.compatibility.options",
code: '<HostCompatibilityDialog profile={selectedProfile} clientVersion="0.3.0" onClose={close} />' },
].map((example) => ({ ...example, files: example.files.map((file) => `${components}${file}.tsx`) }));
diff --git a/webui/src/dev/gallery/standalone.tsx b/webui/src/dev/gallery/standalone.tsx
index db2522b8d..9a1225607 100644
--- a/webui/src/dev/gallery/standalone.tsx
+++ b/webui/src/dev/gallery/standalone.tsx
@@ -1,4 +1,5 @@
import { useState } from "react";
+import { useTranslation } from "react-i18next";
import { ChatList } from "@/components/ChatList";
import { ConnectionBadge } from "@/components/ConnectionBadge";
@@ -14,14 +15,18 @@ import { LinearSecretField } from "../../../../nanobot/channels/linear/webui/Lin
import { WebSocketIcon } from "../../../../nanobot/channels/websocket/webui/WebSocketIcon";
import type { ChatSummary, ConnectionStatus } from "@/lib/types";
import { Sample, StatePicker, type ComponentExample } from "./example";
+import { useGalleryTranslation } from "./i18n";
function ConnectionPreview() {
+ const { t } = useGalleryTranslation();
const [status, setStatus] = useState<ConnectionStatus>("open");
- return <><StatePicker label="连接状态" value={status} options={["idle", "connecting", "open", "reconnecting", "closed", "error"]} onChange={setStatus} />
- <div className="flex items-center gap-3"><ConnectionBadge status={status} /><span className="text-sm">{status}</span></div></>;
+ return <><StatePicker label={t("previews.connectionBadge.state")} value={status} options={["idle", "connecting", "open", "reconnecting", "closed", "error"]} onChange={setStatus} />
+ <div className="flex items-center gap-3"><ConnectionBadge status={status} /><span className="text-sm">{t(`previews.connectionBadge.${status}`)}</span></div></>;
}
function HostPickerPreview() {
+ const { t } = useTranslation();
+ const { t: g } = useGalleryTranslation();
const [mode, setMode] = useState<"ready" | "pending" | "offline" | "collapsed">("ready");
const [currentId, setCurrentId] = useState<string | null>(null);
const [action, setAction] = useState("");
@@ -31,15 +36,15 @@ function HostPickerPreview() {
];
const selected = profiles.find((profile) => profile.id === currentId);
const picker: HostPicker = {
- kind: "shell", name: selected?.name ?? "本机", hostname: selected?.host ?? "gallery", localName: "gallery",
+ kind: "shell", name: selected?.name ?? t("remote.local"), hostname: selected?.host ?? "gallery", localName: "gallery",
currentId, profiles, recentIds: [], pending: mode === "pending" ? { id: profiles[0].id, name: profiles[0].name } : null,
- error: mode === "offline" ? "示例主机已断开。" : "", offline: mode === "offline",
- select: (id) => { setCurrentId(id); setMode("ready"); }, manage: () => setAction("打开连接管理"),
- cancel: () => { setMode("ready"); setAction("已取消示例切换"); }, clearError: () => setMode("ready"), restoreFocus: () => {},
+ error: mode === "offline" ? g("previews.hostPicker.offline") : "", offline: mode === "offline",
+ select: (id) => { setCurrentId(id); setMode("ready"); }, manage: () => setAction("previews.hostPicker.manage"),
+ cancel: () => { setMode("ready"); setAction("previews.hostPicker.cancelled"); }, clearError: () => setMode("ready"), restoreFocus: () => {},
};
- return <><StatePicker label="主机菜单状态" value={mode} options={["ready", "pending", "offline", "collapsed"]} onChange={setMode} />
+ return <><StatePicker label={g("previews.hostPicker.state")} value={mode} options={["ready", "pending", "offline", "collapsed"]} onChange={setMode} />
<div className="max-w-sm rounded-panel bg-sidebar p-4"><HostSwitcherView picker={picker} status="open" collapsed={mode === "collapsed"} /></div>
- <p role="status" className="mt-4 text-sm text-muted-foreground">{action || `预览中的主机:${picker.name}`}</p></>;
+ <p role="status" className="mt-4 text-sm text-muted-foreground">{action ? g(action) : g("previews.hostPicker.selected", { name: picker.name })}</p></>;
}
const initialSessions: ChatSummary[] = [
@@ -52,14 +57,15 @@ const initialSessions: ChatSummary[] = [
];
function ChatsPreview() {
+ const { t } = useGalleryTranslation();
const [sessions, setSessions] = useState(initialSessions);
const [active, setActive] = useState<string | null>(initialSessions[0].key);
const [pinned, setPinned] = useState<string[]>([]);
const [archived, setArchived] = useState<string[]>(["websocket:gallery-history"]);
const [mode, setMode] = useState<"ready" | "loading" | "empty" | "archived">("ready");
- const [action, setAction] = useState("");
+ const [renamed, setRenamed] = useState<string | null>(null);
const toggle = (keys: string[], key: string) => keys.includes(key) ? keys.filter((value) => value !== key) : [...keys, key];
- return <><StatePicker label="会话列表状态" value={mode} options={["ready", "loading", "empty", "archived"]} onChange={setMode} />
+ return <><StatePicker label={t("previews.chats.state")} value={mode} options={["ready", "loading", "empty", "archived"]} onChange={setMode} />
<div className="flex h-80 max-w-sm flex-col rounded-panel bg-sidebar p-2"><ChatList sessions={mode === "loading" || mode === "empty" ? [] : sessions}
activeKey={active} onSelect={setActive} pinnedKeys={pinned} archivedKeys={archived} showArchived={mode === "archived"}
loading={mode === "loading"}
@@ -67,69 +73,76 @@ function ChatsPreview() {
onRequestDelete={(key) => setSessions((items) => items.filter((item) => item.key !== key))}
onRequestRename={async (key, label) => {
setSessions((items) => items.map((item) => item.key === key ? { ...item, title: label } : item));
- setAction(`已重命名:${label}`);
+ setRenamed(label);
}} /></div>
- <p role="status" className="mt-4 text-sm text-muted-foreground">{action || `选择的会话:${active ?? "无"}`}</p></>;
+ <p role="status" className="mt-4 text-sm text-muted-foreground">{renamed !== null ? t("previews.chats.renamed", { name: renamed })
+ : t("previews.chats.selected", { name: active ?? t("previews.chats.none") })}</p></>;
}
function SidebarResizePreview() {
+ const { t } = useGalleryTranslation();
const [width, setWidth] = useState(260);
const [open, setOpen] = useState(true);
const [dragging, setDragging] = useState(false);
return <div className="space-y-4"><div className="relative flex h-72 overflow-hidden rounded-panel border">
<aside id="main-sidebar" className="relative shrink-0 bg-sidebar p-4" style={{ width: open ? width : 56 }}>
- {open ? <p className="text-sm text-muted-foreground">侧栏内容</p> : null}
+ {open ? <p className="text-sm text-muted-foreground">{t("previews.sidebarResize.content")}</p> : null}
<SidebarResizeHandle width={width} open={open} onResize={(next, expanded) => { setWidth(next); setOpen(expanded); }} onDraggingChange={setDragging} />
- </aside><div className="min-w-0 flex-1 p-4 text-sm text-muted-foreground">拖动分隔条,或聚焦后使用方向键、Home、End 和 Enter。</div>
- </div><p role="status" className="text-sm text-muted-foreground">{open ? `${width}px` : "已收起"}{dragging ? " · 正在拖动" : ""}</p></div>;
+ </aside><div className="min-w-0 flex-1 p-4 text-sm text-muted-foreground">{t("previews.sidebarResize.hint")}</div>
+ </div><p role="status" className="text-sm text-muted-foreground">{open ? `${width}px` : t("previews.sidebarResize.collapsed")}{dragging ? ` · ${t("previews.sidebarResize.dragging")}` : ""}</p></div>;
}
function ChannelMarksPreview() {
+ const { t } = useGalleryTranslation();
const [name, setName] = useState<"Nanobot" | "研发">("Nanobot");
- return <><StatePicker label="头像名称" value={name} options={["Nanobot", "研发"]} onChange={setName} />
- <div className="flex items-start gap-8"><Sample label="成员头像"><LinearAvatar name={name} /></Sample>
- <Sample label="工作区图标"><LinearAvatar name={name} workspace /></Sample><Sample label="WebSocket"><WebSocketIcon /></Sample></div></>;
+ return <><StatePicker label={t("previews.channelMarks.name")} value={name} options={["Nanobot", "研发"]} onChange={setName} />
+ <div className="flex items-start gap-8"><Sample label={t("previews.channelMarks.member")}><LinearAvatar name={name} /></Sample>
+ <Sample label={t("previews.channelMarks.workspace")}><LinearAvatar name={name} workspace /></Sample><Sample label="WebSocket"><WebSocketIcon /></Sample></div></>;
}
function SecretPreview() {
+ const { t } = useTranslation();
+ const { t: g } = useGalleryTranslation();
const [mode, setMode] = useState<"new" | "saved" | "disabled" | "error">("new");
const [configured, setConfigured] = useState(false);
- return <><StatePicker label="密钥状态" value={mode} options={["new", "saved", "disabled", "error"]}
+ return <><StatePicker label={g("previews.secret.state")} value={mode} options={["new", "saved", "disabled", "error"]}
onChange={(next) => { setMode(next); setConfigured(next === "saved"); }} />
- <LinearSecretField field={{ key: "api_key", label: "API Key", secret: true }} configured={configured} disabled={mode === "disabled"}
- onSave={async () => { if (mode === "error") throw new Error("Example save failed"); setConfigured(true); }} />
- <p className="mt-4 text-xs text-muted-foreground">输入示例文本并保存,或切换错误状态检查草稿保留。</p></>;
+ <LinearSecretField field={{ key: "api_key", label: t("settings.byok.apiKey"), secret: true }} configured={configured} disabled={mode === "disabled"}
+ onSave={async () => { if (mode === "error") throw new Error(g("previews.secret.error")); setConfigured(true); }} />
+ <p className="mt-4 text-xs text-muted-foreground">{g("previews.secret.hint")}</p></>;
}
function ChannelHelpPreview() {
- return <DropdownMenu><DropdownMenuTrigger asChild><Button variant="outline">打开频道帮助</Button></DropdownMenuTrigger>
- <DropdownMenuContent><LinearHelpContent /><DropdownMenuItem>关闭</DropdownMenuItem></DropdownMenuContent></DropdownMenu>;
+ const { t } = useTranslation();
+ const { t: g } = useGalleryTranslation();
+ return <DropdownMenu><DropdownMenuTrigger asChild><Button variant="outline">{g("previews.channelHelp.open")}</Button></DropdownMenuTrigger>
+ <DropdownMenuContent><LinearHelpContent /><DropdownMenuItem>{t("common.close")}</DropdownMenuItem></DropdownMenuContent></DropdownMenu>;
}
const components = "webui/src/components/";
export const standaloneExamples: ComponentExample[] = [
- { title: "ConnectionBadge · 连接指示", files: [`${components}ConnectionBadge.tsx`], Preview: ConnectionPreview,
- description: "切换连接状态,查看颜色、动画和可访问状态文字。", options: "status 来自调用方。连接订阅由页面容器维护。",
+ { title: "previews.connectionBadge.title", files: [`${components}ConnectionBadge.tsx`], Preview: ConnectionPreview,
+ description: "previews.connectionBadge.description", options: "previews.connectionBadge.options",
code: '<ConnectionBadge status={status} />' },
- { title: "HostSwitcherView · 主机菜单", files: [`${components}remote/HostSwitcherView.tsx`], Preview: HostPickerPreview,
- description: "打开主机菜单,选择本机或示例主机,并切换待连接、断开和收起状态。", options: "picker 提供主机显示数据与操作回调;status 是当前连接状态。生产 HostSwitcher 负责订阅客户端。",
+ { title: "previews.hostPicker.title", files: [`${components}remote/HostSwitcherView.tsx`], Preview: HostPickerPreview,
+ description: "previews.hostPicker.description", options: "previews.hostPicker.options",
code: '<HostSwitcherView picker={picker} status="open" collapsed={false} />' },
- { title: "ChatList · 会话列表", files: [`${components}ChatList.tsx`, `${components}SidebarSelectionHighlight.tsx`], Preview: ChatsPreview,
- description: "选择会话,打开操作菜单,试用置顶、归档和删除。", options: "sessions、activeKey 和已置顶/归档的 key 由调用方提供。各操作通过回调更新示例列表。",
+ { title: "previews.chats.title", files: [`${components}ChatList.tsx`, `${components}SidebarSelectionHighlight.tsx`], Preview: ChatsPreview,
+ description: "previews.chats.description", options: "previews.chats.options",
code: '<ChatList sessions={sessions} activeKey={active} onSelect={setActive} onTogglePin={pin} onToggleArchive={archive} onRequestDelete={remove} onRequestRename={rename} />' },
- { title: "SidebarResizeHandle · 侧栏尺寸", files: [`${components}SidebarResizeHandle.tsx`], Preview: SidebarResizePreview,
- description: "用鼠标或键盘调整侧栏宽度并收起或展开。", options: "width 与 open 是受控状态;onResize 更新尺寸与展开状态;onDraggingChange 通知拖动状态。",
+ { title: "previews.sidebarResize.title", files: [`${components}SidebarResizeHandle.tsx`], Preview: SidebarResizePreview,
+ description: "previews.sidebarResize.description", options: "previews.sidebarResize.options",
code: '<SidebarResizeHandle width={width} open={open} onResize={resize} onDraggingChange={setDragging} />' },
- { title: "LanguageSwitcher · 界面语言", files: [`${components}LanguageSwitcher.tsx`], Preview: LanguageSwitcher,
- description: "切换画廊内生产组件使用的界面语言。", options: "使用应用已有 i18n 与浏览器语言偏好,不需要 gateway。顶部语言选择器使用同一个组件。",
+ { title: "previews.language.title", files: [`${components}LanguageSwitcher.tsx`], Preview: LanguageSwitcher,
+ description: "previews.language.description", options: "previews.language.options",
code: '<LanguageSwitcher />' },
- { title: "Channel marks · 频道标识", files: ["nanobot/channels/linear/webui/LinearAvatar.tsx", "nanobot/channels/websocket/webui/WebSocketIcon.tsx"], Preview: ChannelMarksPreview,
- description: "查看成员头像缺省文字、工作区图标和 WebSocket 标识。", options: "LinearAvatar 接收 name、url 和 workspace;无有效图片时显示缺省文字或图标。",
+ { title: "previews.channelMarks.title", files: ["nanobot/channels/linear/webui/LinearAvatar.tsx", "nanobot/channels/websocket/webui/WebSocketIcon.tsx"], Preview: ChannelMarksPreview,
+ description: "previews.channelMarks.description", options: "previews.channelMarks.options",
code: '<LinearAvatar name="Nanobot" />\n<LinearAvatar name="Nanobot" workspace />\n<WebSocketIcon />' },
- { title: "LinearSecretField · 密钥编辑", files: ["nanobot/channels/linear/webui/LinearSecretField.tsx"], Preview: SecretPreview,
- description: "编辑、显示、保存与替换密钥,检查保存失败时的输入保留。", options: "configured 是已保存状态,onSave 负责持久化。画廊回调仅更新本地状态。",
+ { title: "previews.secret.title", files: ["nanobot/channels/linear/webui/LinearSecretField.tsx"], Preview: SecretPreview,
+ description: "previews.secret.description", options: "previews.secret.options",
code: '<LinearSecretField field={field} configured={configured} disabled={false} onSave={save} />' },
- { title: "LinearHelpContent · 频道帮助", files: ["nanobot/channels/linear/webui/LinearHelpContent.tsx"], Preview: ChannelHelpPreview,
- description: "在实际下拉菜单中查看频道帮助内容。", options: "内容使用频道的现有翻译,菜单容器由调用方提供。",
+ { title: "previews.channelHelp.title", files: ["nanobot/channels/linear/webui/LinearHelpContent.tsx"], Preview: ChannelHelpPreview,
+ description: "previews.channelHelp.description", options: "previews.channelHelp.options",
code: '<DropdownMenuContent><LinearHelpContent /></DropdownMenuContent>' },
];
diff --git a/webui/src/tests/component-gallery.test.tsx b/webui/src/tests/component-gallery.test.tsx
index e8617ff64..e0f0eed36 100644
--- a/webui/src/tests/component-gallery.test.tsx
+++ b/webui/src/tests/component-gallery.test.tsx
@@ -2,15 +2,17 @@ import { resolve } from "node:path";
import { cwd } from "node:process";
import { act, cleanup, render, screen, within } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
-import { afterEach, beforeEach, expect, it, vi } from "vitest";
+import { afterEach, beforeAll, beforeEach, expect, it, vi } from "vitest";
import { Gallery, examples } from "@/dev/gallery/Gallery";
import { componentInventory } from "@/dev/gallery/inventory-plugin";
import { foundationPath } from "@/dev/gallery/inventory";
+import { initializeGalleryI18n } from "@/dev/gallery/i18n";
import { registeredChannelUiContributions } from "@/channel-plugins/registry";
const inventory = componentInventory(resolve(cwd(), ".."));
+beforeAll(initializeGalleryI18n);
beforeEach(() => {
window.history.replaceState({}, "", "/gallery.html");
});
@@ -45,7 +47,7 @@ it("provides a live example for every foundation source and resolves every docum
it("finds a shared component by its name and renders its working variants", async () => {
vi.stubGlobal("fetch", vi.fn().mockResolvedValue({ ok: true, json: async () => inventory }));
render(<Gallery />);
- await screen.findByRole("heading", { name: "Button · 按钮" });
+ await screen.findByRole("heading", { name: "Buttons" });
await userEvent.type(screen.getByRole("searchbox", { name: "Search components" }), "toggle-button");
expect(screen.getByRole("link", { name: /toggle-button/ })).toHaveAttribute("href", expect.stringContaining("toggle-button"));
await userEvent.click(screen.getByRole("button", { name: "destructive" }));
@@ -59,7 +61,7 @@ it("lets the developer retry a failed inventory request", async () => {
render(<Gallery />);
expect(await screen.findByRole("alert")).toHaveTextContent("Could not load the inventory");
await userEvent.click(screen.getByRole("button", { name: "Refresh inventory" }));
- expect(await screen.findByRole("heading", { name: "Button · 按钮" })).toBeVisible();
+ expect(await screen.findByRole("heading", { name: "Buttons" })).toBeVisible();
});
it("covers every registered channel and its presentation components", () => {
@@ -78,22 +80,22 @@ it("covers every registered channel and its presentation components", () => {
it("starts with working previews and lets the developer inspect source-only modules", async () => {
vi.stubGlobal("fetch", vi.fn().mockResolvedValue({ ok: true, json: async () => inventory }));
render(<Gallery />);
- await screen.findByRole("heading", { name: "Button · 按钮" });
+ await screen.findByRole("heading", { name: "Buttons" });
expect(screen.queryByRole("link", { name: /SettingsPage/ })).not.toBeInTheDocument();
- await userEvent.click(screen.getByRole("button", { name: "All source · 源码" }));
+ await userEvent.click(screen.getByRole("button", { name: "All source" }));
const sourceLink = screen.getByRole("link", { name: /SettingsPage Source only/ });
// happy-dom does not follow anchor navigation or emit the browser's hashchange.
act(() => {
window.location.hash = sourceLink.getAttribute("href")!;
window.dispatchEvent(new HashChangeEvent("hashchange"));
});
- expect(await screen.findByRole("heading", { name: "Source only · 暂无独立预览" })).toBeVisible();
+ expect(await screen.findByRole("heading", { name: "Source only" })).toBeVisible();
expect(screen.getByRole("link", { name: /Settings composition/ })).toBeVisible();
- await userEvent.click(screen.getByRole("button", { name: "Previews · 预览" }));
+ await userEvent.click(screen.getByRole("button", { name: "Previews" }));
expect(await screen.findByRole("region", { name: "Component preview" })).toBeVisible();
- expect(screen.queryByRole("heading", { name: "Source only · 暂无独立预览" })).not.toBeInTheDocument();
+ expect(screen.queryByRole("heading", { name: "Source only" })).not.toBeInTheDocument();
});
it("opens bookmarked source entries and offers all source when a preview search has no match", async () => {
@@ -104,7 +106,7 @@ it("opens bookmarked source entries and offers all source when a preview search
expect(await screen.findByRole("heading", { name: "SettingsView" })).toBeVisible();
expect(screen.getByRole("link", { name: /^SettingsView Source only/ })).toHaveAttribute("aria-current", "page");
- await userEvent.click(screen.getByRole("button", { name: "Previews · 预览" }));
+ await userEvent.click(screen.getByRole("button", { name: "Previews" }));
await userEvent.type(screen.getByRole("searchbox", { name: "Search components" }), source);
expect(screen.getByText("No matching previews.")).toBeVisible();
await userEvent.click(screen.getByRole("button", { name: "Search all source" }));
@@ -117,9 +119,9 @@ it("submits a message through the actual composer using only local preview state
const fetch = vi.fn().mockResolvedValue({ ok: true, json: async () => inventory });
vi.stubGlobal("fetch", fetch);
render(<Gallery />);
- const input = await screen.findByRole("textbox", { name: "示例消息" });
+ const input = await screen.findByRole("textbox", { name: "Example message" });
await userEvent.type(input, "Try the real composer{Enter}");
- expect(await screen.findByText("提交内容:Try the real composer")).toBeVisible();
+ expect(await screen.findByText("Submitted: Try the real composer")).toBeVisible();
expect(input).toHaveValue("");
expect(fetch).toHaveBeenCalledTimes(1);
expect(fetch.mock.calls[0][0]).toBe("/__nanobot_components");
@@ -130,10 +132,10 @@ it("switches the chat list preview between ready, loading, empty and archived st
window.history.replaceState({}, "", `/gallery.html#${new URLSearchParams({ component: source })}`);
vi.stubGlobal("fetch", vi.fn().mockResolvedValue({ ok: true, json: async () => inventory }));
render(<Gallery />);
- await screen.findByRole("heading", { name: "ChatList · 会话列表" });
+ await screen.findByRole("heading", { name: "ChatList · Chat list" });
const preview = within(screen.getByRole("region", { name: "Component preview" }));
const setMode = async (mode: string) => {
- await userEvent.click(preview.getByRole("combobox", { name: "会话列表状态" }));
+ await userEvent.click(preview.getByRole("combobox", { name: "Chat list state" }));
await userEvent.click(screen.getByRole("option", { name: mode }));
};
@@ -161,7 +163,7 @@ it("edits a pairing route without mounting a client or making a gateway mutation
const fetch = vi.fn().mockResolvedValue({ ok: true, json: async () => inventory });
vi.stubGlobal("fetch", fetch);
render(<Gallery />);
- await screen.findByRole("heading", { name: "PairRouteSettingsView · 配对路由" });
+ await screen.findByRole("heading", { name: "PairRouteSettingsView · Pairing route" });
const preview = within(screen.getByRole("region", { name: "Component preview" }));
expect(preview.getByRole("button", { name: "Save changes" })).toBeDisabled();
await userEvent.click(preview.getByRole("combobox", { name: "Network route" }));
@@ -179,7 +181,7 @@ it("uses the real provider manager and saves a new provider entirely in preview
const fetch = vi.fn().mockResolvedValue({ ok: true, json: async () => inventory });
vi.stubGlobal("fetch", fetch);
render(<Gallery />);
- await screen.findByRole("heading", { name: "ProvidersSettings · 管理提供商" });
+ await screen.findByRole("heading", { name: "Provider management" });
const preview = within(screen.getByRole("region", { name: "Component preview" }));
await userEvent.click(preview.getByRole("button", { name: "Manage providers" }));
let dialog = within(screen.getByRole("dialog", { name: "Manage providers" }));
@@ -212,7 +214,7 @@ it("renders a registered channel's real secret fields and enable action without
const fetch = vi.fn().mockResolvedValue({ ok: true, json: async () => inventory });
vi.stubGlobal("fetch", fetch);
render(<Gallery />);
- await screen.findByRole("heading", { name: "Telegram · 频道配置" });
+ await screen.findByRole("heading", { name: "Telegram · Channel setup" });
const preview = within(screen.getByRole("region", { name: "Component preview" }));
const token = preview.getByLabelText("Bot token", { selector: "input" });
expect(token).toHaveAttribute("type", "password");
diff --git a/webui/src/tests/gallery-i18n.test.ts b/webui/src/tests/gallery-i18n.test.ts
new file mode 100644
index 000000000..f6d105cfb
--- /dev/null
+++ b/webui/src/tests/gallery-i18n.test.ts
@@ -0,0 +1,47 @@
+import { beforeAll, expect, it } from "vitest";
+
+import i18n from "@/i18n";
+import { supportedLocales } from "@/i18n/config";
+import { examples } from "@/dev/gallery/Gallery";
+import { initializeGalleryI18n } from "@/dev/gallery/i18n";
+
+type Copy = { [key: string]: string | Copy };
+const bundles = import.meta.glob<{ default: Copy }>("../dev/gallery/locales/*/*.json", { eager: true });
+
+function strings(copy: Copy, prefix = ""): Record<string, string> {
+ return Object.fromEntries(Object.entries(copy).flatMap(([key, value]) => {
+ const path = prefix ? `${prefix}.${key}` : key;
+ return typeof value === "string" ? [[path, value]] : Object.entries(strings(value, path));
+ }));
+}
+
+function placeholders(text: string): string[] {
+ return (text.match(/{{\s*[^{}]+\s*}}/g) ?? []).sort();
+}
+
+beforeAll(initializeGalleryI18n);
+
+it("provides complete gallery copy and interpolation variables in every supported locale", () => {
+ for (const domain of ["ui", "controls", "previews"]) {
+ const english = strings(bundles[`../dev/gallery/locales/${domain}/en.json`].default);
+ for (const { code } of supportedLocales) {
+ const copy = strings(bundles[`../dev/gallery/locales/${domain}/${code}.json`].default);
+ expect(Object.keys(copy).sort(), `${domain}/${code}`).toEqual(Object.keys(english).sort());
+ for (const [key, text] of Object.entries(copy)) {
+ expect(text.trim(), `${domain}/${code}/${key}`).not.toBe("");
+ expect(placeholders(text), `${domain}/${code}/${key}`).toEqual(placeholders(english[key]));
+ expect(i18n.getResource(code, "gallery", `${domain}.${key}`)).toBe(text);
+ }
+ }
+ }
+});
+
+it("resolves every example's title and usage notes directly from each locale", () => {
+ for (const { code } of supportedLocales) {
+ for (const example of examples) {
+ for (const key of [example.title, example.description, example.options]) {
+ expect(i18n.getResource(code, "gallery", key), `${code}/${key}`).toBeTypeOf("string");
+ }
+ }
+ }
+});
diff --git a/webui/src/tests/gallery-language.test.tsx b/webui/src/tests/gallery-language.test.tsx
new file mode 100644
index 000000000..ee5824c02
--- /dev/null
+++ b/webui/src/tests/gallery-language.test.tsx
@@ -0,0 +1,78 @@
+import { resolve } from "node:path";
+import { cwd } from "node:process";
+import { act, cleanup, render, screen, waitFor, within } from "@testing-library/react";
+import userEvent from "@testing-library/user-event";
+import { afterEach, beforeAll, beforeEach, expect, it, vi } from "vitest";
+
+import { Gallery } from "@/dev/gallery/Gallery";
+import { initializeGalleryI18n } from "@/dev/gallery/i18n";
+import { setAppLanguage } from "@/i18n";
+import { componentInventory } from "@/dev/gallery/inventory-plugin";
+
+const inventory = componentInventory(resolve(cwd(), ".."));
+
+beforeAll(initializeGalleryI18n);
+beforeEach(() => {
+ window.history.replaceState({}, "", "/gallery.html#component=webui%2Fsrc%2Fcomponents%2Fui%2Finput.tsx");
+});
+afterEach(() => {
+ cleanup();
+ vi.unstubAllGlobals();
+});
+
+async function chooseChinese() {
+ await act(async () => { await setAppLanguage("zh-CN"); });
+}
+
+it("switches the gallery interface and sample controls without replacing the active draft", async () => {
+ const fetch = vi.fn().mockResolvedValue({ ok: true, json: async () => inventory });
+ vi.stubGlobal("fetch", fetch);
+ render(<Gallery />);
+ expect(await screen.findByRole("heading", { name: "Component gallery" })).toBeVisible();
+ const preview = within(await screen.findByRole("region", { name: "Component preview" }));
+ const input = preview.getAllByRole("textbox")[0];
+ await userEvent.type(input, "Keep this draft 中文");
+ const hash = window.location.hash;
+
+ await chooseChinese();
+
+ expect(await screen.findByRole("heading", { name: "组件图鉴" })).toBeVisible();
+ expect(screen.getByRole("searchbox", { name: "搜索组件" })).toBeVisible();
+ expect(screen.getByRole("button", { name: "刷新目录" })).toBeVisible();
+ expect(input).toBeInTheDocument();
+ expect(input).toHaveValue("Keep this draft 中文");
+ expect(input).toHaveAccessibleName(/[\u4e00-\u9fff]/);
+ expect(window.location.hash).toBe(hash);
+ expect(document.documentElement.lang).toBe("zh-CN");
+ expect(localStorage.getItem("nanobot.locale")).toBe("zh-CN");
+ expect(fetch).toHaveBeenCalledTimes(1);
+});
+
+it("translates a visible inventory failure without retrying or losing search input", async () => {
+ const fetch = vi.fn().mockResolvedValue({ ok: false });
+ vi.stubGlobal("fetch", fetch);
+ render(<Gallery />);
+ expect(await screen.findByRole("alert")).toHaveTextContent("Could not load the inventory");
+ const search = screen.getByRole("searchbox", { name: "Search components" });
+ await userEvent.type(search, "ThreadComposer");
+
+ await chooseChinese();
+
+ await waitFor(() => expect(screen.getByRole("alert")).toHaveTextContent("无法加载组件目录"));
+ expect(search).toHaveValue("ThreadComposer");
+ expect(fetch).toHaveBeenCalledTimes(1);
+});
+
+it("keeps the visible assistant identity when translating existing interaction feedback", async () => {
+ const source = "nanobot/channels/feishu/webui/FeishuAssistantsPanelView.tsx";
+ window.history.replaceState({}, "", `/gallery.html#${new URLSearchParams({ component: source })}`);
+ vi.stubGlobal("fetch", vi.fn().mockResolvedValue({ ok: true, json: async () => inventory }));
+ render(<Gallery />);
+ const preview = within(await screen.findByRole("region", { name: "Component preview" }));
+ await userEvent.click(preview.getByRole("switch", { name: "Support assistant assistant" }));
+ expect(await preview.findByText("Support assistant: off")).toBeVisible();
+
+ await chooseChinese();
+
+ expect(preview.getByText("Support assistant:已关闭")).toBeVisible();
+});