Skip to content
Python

gui: re-apply and extend i18n wrapping onto current main

Rohit C Prasad086be2a1a683
diff --git a/surfaces/gui/src/App.tsx b/surfaces/gui/src/App.tsx
index 6bebaea4..64055d1d 100644
--- a/surfaces/gui/src/App.tsx
+++ b/surfaces/gui/src/App.tsx
@@ -1,4 +1,5 @@
import { useCallback, useEffect, useRef, useState, type PointerEvent } from "react";
+import { useTranslation } from "react-i18next";
import {
announceInboxUnlock,
createTempWorkspace,
@@ -87,10 +88,12 @@ import { WorkspaceTrustPrompt } from "./components/WorkspaceTrustPrompt";
const newId = () =>
(crypto as any).randomUUID ? crypto.randomUUID().slice(0, 12) : Math.random().toString(36).slice(2, 14);
-const SUGGESTIONS = [
- { ico: "⚙", text: "Run the test suite and summarize any failures." },
- { ico: "✦", text: "Read the project and give me a 5-bullet overview." },
- { ico: "↻", text: "Find and fix the failing build." },
+// Hero task suggestions — translated at call time (module scope can't see React hooks).
+// Keys live under `hero.suggest_*`; resolved in the component via useTranslation.
+const SUGGESTION_KEYS = [
+ { ico: "⚙", key: "hero.suggest_tests" },
+ { ico: "✦", key: "hero.suggest_overview" },
+ { ico: "↻", key: "hero.suggest_fix_build" },
];
// Tools whose success means a new/changed file should show up under Artifacts right away.
@@ -171,6 +174,7 @@ function fallbackWorkspace(current: string | null, projects: RecentWorkspace[]):
}
export function App() {
+ const { t } = useTranslation();
const [workspace, setWorkspace] = useState<string | null>(null);
const [branch, setBranch] = useState<string | null>(null);
// UX-029: the active session runs in a temporary folder (never show its raw path —
@@ -882,7 +886,7 @@ export function App() {
break;
case "turn_end":
if (d.status === "max_iterations_exceeded")
- setItems((p) => [...p, { kind: "notice", tone: "warn", text: "Stopped: max iterations reached." }]);
+ setItems((p) => [...p, { kind: "notice", tone: "warn", text: t("app.notice.max_iterations") }]);
break;
case "mode_notice":
// Server-authored + persisted (owner ruling 2026-08-24): the Auto-Approve
@@ -896,7 +900,7 @@ export function App() {
// Mid-session switch (server-applied): update the header fact and drop the
// persisted marker into the live transcript (replay renders it from history).
if (d.model) setModel(d.model);
- setItems((p) => [...p, { kind: "notice", tone: "info", text: d.text || "Model switched" }]);
+ setItems((p) => [...p, { kind: "notice", tone: "info", text: d.text || t("app.notice.model_switched") }]);
break;
case "memory_saved":
// §5.1 save notice — inline in the transcript, where the user is already
@@ -922,23 +926,23 @@ export function App() {
case "compacted":
// Auto-compaction marker (OPE-27): outbound-only — the transcript stays intact,
// this divider just shows where the model's memory was summarized.
- setItems((p) => [...p, { kind: "notice", tone: "info", text: d.text || "Context compacted" }]);
+ setItems((p) => [...p, { kind: "notice", tone: "info", text: d.text || t("app.notice.context_compacted") }]);
break;
case "interrupted":
flushPartialStream();
- setItems((p) => [...p, { kind: "notice", tone: "warn", text: "Interrupted." }]);
+ setItems((p) => [...p, { kind: "notice", tone: "warn", text: t("app.notice.interrupted") }]);
break;
case "error":
flushPartialStream();
setItems((p) => [
...p,
- { kind: "notice", tone: "warn", text: "Error: " + (d.error || "unknown"), retriable: true },
+ { kind: "notice", tone: "warn", text: t("app.notice.error") + (d.error || t("app.notice.unknown")), retriable: true },
]);
break;
case "input_rejected":
setItems((p) => [
...p,
- { kind: "notice", tone: "warn", text: d.error || "That message was rejected." },
+ { kind: "notice", tone: "warn", text: d.error || t("app.notice.input_rejected") },
]);
break;
case "turn_done":
@@ -1137,7 +1141,7 @@ export function App() {
// identical re-proposal without the reviewer or a card; anything different still asks.
const allowAnyway = (name: string, args: any) => {
sessionRef.current?.allowAnyway(name, args);
- send(`I reviewed the blocked ${name} action — go ahead with it exactly as proposed.`);
+ send(t("app.allow_anyway_message", { name }));
};
const approve = (decision: ApprovalDecision) => {
setItems((p) => resolveLastApproval(p, decision));
@@ -1278,7 +1282,7 @@ export function App() {
setSendGate(null);
setItems((p) => [
...p,
- { kind: "notice", tone: "warn", text: res.error || "Could not create a temporary folder." },
+ { kind: "notice", tone: "warn", text: res.error || t("app.temp_folder_failed") },
]);
prefillComposer(gate.skill ? `/${gate.skill} ${gate.text}` : gate.text, gate.attachments);
return;
@@ -1290,7 +1294,7 @@ export function App() {
pendingPromptRef.current = {
...gate,
model,
- notice: res.git ? "Temporary folder created · git initialized" : "Temporary folder created",
+ notice: res.git ? t("app.temp_folder_created_git") : t("app.temp_folder_created"),
};
setSessionId(sid);
};
@@ -1310,7 +1314,7 @@ export function App() {
if (!res.ok || !res.path) {
setItems((p) => [
...p,
- { kind: "notice", tone: "warn", text: res.error || "Could not save as a project." },
+ { kind: "notice", tone: "warn", text: res.error || t("app.save_project_failed") },
]);
return;
}
@@ -1320,7 +1324,7 @@ export function App() {
setTempWorkspace(false);
setItems((p) => [
...p,
- { kind: "notice", tone: "info", text: `Saved as a project — now working in ${baseName(newPath)}.` },
+ { kind: "notice", tone: "info", text: t("app.saved_as_project", { name: baseName(newPath) }) },
]);
setConnectNonce((n) => n + 1);
refreshSessions();
@@ -1337,7 +1341,7 @@ export function App() {
if (msg.type !== "automation_run_started") return;
const d = (msg.data ?? {}) as Record<string, string>;
setRunToast({
- title: d.task_title || "Automation",
+ title: d.task_title || t("toast.automation_fallback"),
sessionId: d.session_id || "",
workspace: d.workspace || "",
agent: d.agent || "cowork",
@@ -1562,10 +1566,10 @@ export function App() {
// path never shows — "Temporary folder" + the Save as project… affordance instead.
const subtitleParts = [fullPersonaName(personaOf(agent)?.name, agent), modelDisplay];
if (isProjectScoped(personaOf(agent)) && workspace)
- subtitleParts.push(tempWorkspace ? "Temporary folder" : baseName(workspace));
+ subtitleParts.push(tempWorkspace ? t("root.temporary_space") : baseName(workspace));
const showSaveAsProject = hasHistory && tempWorkspace && isProjectScoped(personaOf(agent));
const activeInfo = sessions.find((s) => s.session_id === sessionId);
- const activeTitle = activeInfo?.title || "New session";
+ const activeTitle = activeInfo?.title || t("sidebar.new_session");
const desktop = isTauri();
// Dev-only: `?overlay=1` simulates the desktop overlay layout in the browser (adds the
@@ -1604,7 +1608,7 @@ export function App() {
<Icon name="logo" size={38} />
</div>
<div className="boot-text">
- {resumedExisting ? "Restoring your session…" : "Starting OpenWorker…"}
+ {resumedExisting ? t("boot.restoring") : t("boot.starting")}
<span className="beta-tag">BETA</span>
</div>
</div>
@@ -1637,10 +1641,10 @@ export function App() {
>
<div className="flex items-center gap-2 text-[13px] font-semibold">
<span className="w-[7px] h-[7px] rounded-full bg-faint toast-pulse" />
- Automation started
+ {t("toast.automation_started")}
</div>
<div className="text-[13px] text-muted mt-0.5 ml-[15px] truncate">
- {runToast.title} · {runToast.time} run
+ {runToast.title} · {runToast.time} {t("toast.run_count")}
</div>
<div className="flex items-center justify-between ml-[15px] mt-1.5">
<button
@@ -1651,12 +1655,12 @@ export function App() {
setRunToast(null);
}}
>
- View run ›
+ {t("toast.view_run")} ›
</button>
<button
className="text-[12px] text-faint px-0.5"
data-testid="toast-dismiss"
- title="Dismiss"
+ title={t("common.dismiss")}
onClick={() => setRunToast(null)}
>
✕
@@ -1683,8 +1687,8 @@ export function App() {
className="nav-reveal-btn"
onClick={toggleNav}
onMouseEnter={() => setNavPeek(true)}
- title="Show sidebar (⌘B)"
- aria-label="Show sidebar"
+ title={t("topbar.show_sidebar")}
+ aria-label={t("topbar.show_sidebar_short")}
>
<Icon name="sidebar" size={16} />
</button>
@@ -1765,8 +1769,8 @@ export function App() {
startNewSession();
prefillComposer(
description
- ? `Build a new skill for me: ${description}`
- : "Build a new skill for me: (describe what the skill should do)",
+ ? t("app.build_skill_prefill", { description })
+ : t("app.build_skill_prefill_empty"),
);
}}
/>
@@ -1798,24 +1802,24 @@ export function App() {
<button
className="topbar-icon-btn"
onClick={toggleNav}
- aria-label="Show sidebar"
- title="Show sidebar (⌘B)"
+ aria-label={t("topbar.show_sidebar_short")}
+ title={t("topbar.show_sidebar")}
>
<Icon name="sidebar" size={16} />
</button>
<button
className="topbar-icon-btn"
onClick={() => startNewSession()}
- aria-label="New session"
- title="New session"
+ aria-label={t("sidebar.new_session")}
+ title={t("sidebar.new_session")}
>
<Icon name="plus" size={16} />
</button>
<button
className="topbar-icon-btn"
onClick={() => setSearchOpen(true)}
- aria-label="Search"
- title="Search"
+ aria-label={t("topbar.search")}
+ title={t("topbar.search")}
>
<Icon name="search" size={16} />
</button>
@@ -1849,7 +1853,7 @@ export function App() {
onMouseDown={(e) => e.stopPropagation()}
onClick={() => void saveAsProject()}
>
- Save as project…
+ {t("app.save_as_project")}
</button>
</>
)}
@@ -1864,10 +1868,10 @@ export function App() {
className="topbar-artifacts-btn"
onMouseDown={(e) => e.stopPropagation()}
onClick={() => setRailHidden(false)}
- title="Show files this conversation produced"
+ title={t("topbar.show_artifacts")}
>
<Icon name="file" size={14} />
- <span>Artifacts</span>
+ <span>{t("topbar.artifacts")}</span>
<span className="topbar-artifacts-count">{artifactCount}</span>
</button>
)}
@@ -1878,8 +1882,8 @@ export function App() {
className="topbar-icon-btn"
onMouseDown={(e) => e.stopPropagation()}
onClick={() => setRailHiddenPersist(!railHidden)}
- aria-label={railHidden ? "Show side panel" : "Hide side panel"}
- title={railHidden ? "Show side panel" : "Hide side panel"}
+ aria-label={railHidden ? t("topbar.show_side_panel") : t("topbar.hide_side_panel")}
+ title={railHidden ? t("topbar.show_side_panel") : t("topbar.hide_side_panel")}
>
<Icon name="sidebarRight" size={16} />
</button>
@@ -1904,14 +1908,14 @@ export function App() {
>
<Icon name="clock" size={14} className="text-accent shrink-0" />
<span className="truncate text-muted">
- Scheduled run
+ {t("run_banner.scheduled_run")}
{runContext?.title ? (
<>
{" — "}
<span className="text-ink font-medium">{runContext.title}</span>
</>
) : null}{" "}
- · started by an automation
+ {t("run_banner.started_by_automation")}
</span>
<button
className="ml-auto shrink-0 text-accent font-medium hover:underline"
@@ -1920,7 +1924,7 @@ export function App() {
setSurface("scheduled");
}}
>
- ← Back to runs
+ {t("run_banner.back_to_runs")}
</button>
</div>
)}
@@ -1936,15 +1940,15 @@ export function App() {
<div className="hero">
<h1 className="greeting">
<span className="mark">✦</span>
- {agent === "chat" ? "How can I help?" : "Let's build something."}
+ {agent === "chat" ? t("hero.chat_greeting") : t("hero.build_greeting")}
</h1>
{(
<div className="suggestions">
- <div className="suggest-head">Try a task</div>
- {SUGGESTIONS.map((s, i) => (
- <div className="suggest" key={i} onClick={() => workspace && send(s.text)}>
+ <div className="suggest-head">{t("hero.try_a_task")}</div>
+ {SUGGESTION_KEYS.map((s, i) => (
+ <div className="suggest" key={i} onClick={() => workspace && send(t(s.key))}>
<span className="ico">{s.ico}</span>
- {s.text}
+ {t(s.key)}
</div>
))}
</div>
@@ -1976,7 +1980,7 @@ export function App() {
)}
{/* Compaction runs between provider turns (nothing streams during it), so
the transient takes over the waiting slot with a specific label. */}
- {running && compacting && <WaitingForAgent label="Compacting context…" />}
+ {running && compacting && <WaitingForAgent label={t("app.compacting_context")} />}
{running &&
!compacting &&
!reasoningStream &&
@@ -1985,7 +1989,7 @@ export function App() {
{streaming && streamMode(streaming, items, running) === "answer" && (
<div className="transcript">
<div className="bubble-assistant">
- <div className="who">assistant</div>
+ <div className="who">{t("transcript.who_assistant")}</div>
<Markdown text={streaming} />
<span className="stream-cursor">▍</span>
</div>
@@ -2006,7 +2010,7 @@ export function App() {
onClick={followLatest}
>
<Icon name="chevronDown" size={13} />
- Jump to latest
+ {t("app.jump_to_latest")}
</button>
</div>
)}
@@ -2040,25 +2044,23 @@ export function App() {
<div className="sleep-strip" data-testid="sleep-strip">
<span className="sleep-dot" />
<span className="sleep-text">
- Sleeping
+ {t("app.sleep.label")}
{activeInfo.sleeping_until
- ? ` until ${new Date(activeInfo.sleeping_until).toLocaleTimeString([], { hour: "numeric", minute: "2-digit" })}`
+ ? t("app.sleep.until", {
+ time: new Date(activeInfo.sleeping_until).toLocaleTimeString([], { hour: "numeric", minute: "2-digit" }),
+ })
: ""}
{activeInfo.team?.role === "lead"
- ? " while the team works — it also wakes on board activity."
- : " — it wakes on its trigger."}{" "}
- Talk to it anytime.
+ ? t("app.sleep.team_clause")
+ : t("app.sleep.trigger_clause")}{" "}
+ {t("app.sleep.talk_anytime")}
</span>
<button
className="btn sm"
data-testid="sleep-status-btn"
- onClick={() =>
- send(
- "Quick status check, please — what's moving, what's blocked, and does anything need me?",
- )
- }
+ onClick={() => send(t("app.sleep.status_prompt"))}
>
- Ask for a status
+ {t("app.sleep.ask_status")}
</button>
</div>
)}
@@ -2090,10 +2092,10 @@ export function App() {
reviewerPaused={reviewerPaused}
placeholder={
agent === "code"
- ? "Ask the coder to build, fix, or explain… (drop or paste files)"
+ ? t("composer.placeholder_code")
: agent === "chat"
- ? "Ask anything… (drop or paste files)"
- : "Ask the coworker… (drop or paste files)"
+ ? t("composer.placeholder_chat")
+ : t("composer.placeholder_cowork")
}
approvalSlot={
// Live inline cards are for ATTENDED sessions only; when Unattended the prompt is
@@ -2278,11 +2280,12 @@ function lastItemIsAssistant(items: Item[]): boolean {
}
function WaitingForAgent({ label }: { label?: string }) {
+ const { t } = useTranslation();
return (
<div className="waiting-transcript">
<div className="waiting-row" aria-live="polite">
<span className="waiting-spinner" />
- <span>{label || "Waiting for agent..."}</span>
+ <span>{label || t("app.waiting_for_agent")}</span>
</div>
</div>
);
diff --git a/surfaces/gui/src/components/AccessSection.tsx b/surfaces/gui/src/components/AccessSection.tsx
index 06bbae02..2ecf28f8 100644
--- a/surfaces/gui/src/components/AccessSection.tsx
+++ b/surfaces/gui/src/components/AccessSection.tsx
@@ -10,6 +10,7 @@
// to expand it and scroll it into view.
import { useCallback, useEffect, useRef, useState } from "react";
+import { useTranslation } from "react-i18next";
import {
CLOUD_CHANGED,
getCloudStatus,
@@ -75,6 +76,7 @@ export function AccessSection({
const { roots, busy: rootsBusy, error: rootsError, addRoot, toggleAccess, removeRoot } =
useRoots(sessionId, open ? 1 : 0);
const rootEl = useRef<HTMLElement | null>(null);
+ const { t } = useTranslation();
const reload = useCallback(() => {
// personaId hint: a brand-new session has no server-side record yet, so without it the
@@ -173,7 +175,7 @@ export function AccessSection({
const channel = raw.includes(":") || raw.startsWith("#") ? raw : `${channelsFor}:${raw}`;
const r = await subscribeChannel(sessionId, channel);
if (!r.ok) {
- setAddErr(r.error || "Couldn't add that channel.");
+ setAddErr(r.error || t("access.channel_add_error"));
return;
}
setAddErr(null);
@@ -212,27 +214,27 @@ export function AccessSection({
const names = live.map((c) => labelFor(c.connector, byName));
const sourcesPart =
names.length === 0
- ? "no sources"
+ ? t("access.summary_no_sources")
: names.length <= 2
? names.join(", ")
- : `${names.slice(0, 2).join(", ")} +${names.length - 2}`;
+ : t("access.summary_sources_more", { first: names.slice(0, 2).join(", "), more: names.length - 2 });
// A temporary dir's raw name (the session id) never shows — say "Temporary folder"; a
// draft with no folder picked yet shows none at all (UX-029).
const folderPart = projectScoped
? scratchPrimary
- ? "Temporary folder"
+ ? t("root.temporary_space")
: baseName(workspace || "") || null
: roots.length > 0
- ? `${roots.length} folder${roots.length === 1 ? "" : "s"}`
+ ? t("access.summary_folder_count", { count: roots.length })
: null;
- const summary = [sourcesPart, folderPart].filter(Boolean).join(" · ");
+ const summary = folderPart ? t("access.summary_join", { sources: sourcesPart, folder: folderPart }) : sourcesPart;
return (
<section className="rail-section" ref={rootEl} data-testid="access-section">
<div className="rail-section-head">
<button className="rail-section-toggle" onClick={() => setOpen((v) => !v)} data-testid="access-toggle">
<Icon name={open ? "chevronDown" : "chevronRight"} size={14} className="rail-chev" />
- <span>Access</span>
+ <span>{t("access.section_title")}</span>
<span
className="ml-auto min-w-0 truncate text-[11px] font-normal text-faint"
data-testid="access-summary"
@@ -243,7 +245,7 @@ export function AccessSection({
</button>
</div>
{open && (
- <div className="rail-section-body" role="region" aria-label="Session access">
+ <div className="rail-section-body" role="region" aria-label={t("access.region_label")}>
{connectFor ? (
<ConnectInline
c={connectFor}
@@ -286,10 +288,10 @@ export function AccessSection({
<div className="space-y-4">
{/* Sources — each toggle is a per-session override (mute for THIS session only). */}
<div>
- <div className={`${SEC_H} mb-1.5`}>Sources</div>
+ <div className={`${SEC_H} mb-1.5`}>{t("access.sources")}</div>
{connected.length === 0 && (
<div className="text-[12px] text-faint py-0.5">
- No connectors enabled for this session.
+ {t("access.no_connectors")}
</div>
)}
<div className="space-y-1">
@@ -309,7 +311,7 @@ export function AccessSection({
setChannelsFor(c.connector);
}}
>
- Channels · {channelsOf(c.connector).length}
+ {t("access.channels_link", { count: channelsOf(c.connector).length })}
<Icon name="chevronRight" size={10} />
</button>
)}
@@ -317,7 +319,7 @@ export function AccessSection({
<Toggle
checked={c.enabled}
onChange={(next) => toggleSession(c.connector, next)}
- title="On for this session. Off mutes it for this session only — the connector stays connected."
+ title={t("access.toggle_title")}
/>
</div>
))}
@@ -329,7 +331,7 @@ export function AccessSection({
<div className="mt-1.5">
<input
className="w-full px-2.5 py-1.5 rounded-lg border border-line bg-panel text-[13px] outline-none focus:border-accent"
- placeholder="Search connectors…"
+ placeholder={t("access.search_placeholder")}
value={query}
onChange={(e) => setQuery(e.target.value)}
onKeyDown={(e) => {
@@ -345,7 +347,7 @@ export function AccessSection({
// Also covers a failed/empty catalog fetch: an open picker must never
// be silently blank — point at the Connectors page either way.
<div className="text-[12px] text-faint mt-1.5 px-0.5">
- No match — see all on the Connectors page below.
+ {t("access.no_match")}
</div>
)}
<div className="mt-1 max-h-64 overflow-y-auto">
@@ -383,7 +385,7 @@ export function AccessSection({
onClick={() => setAdding(true)}
data-testid="access-add-source"
>
- + Add a source
+ {t("access.add_source")}
</button>
<span className="text-faint">·</span>
<button
@@ -391,7 +393,7 @@ export function AccessSection({
data-testid="access-manage"
onClick={() => onOpenIntegrations?.()}
>
- Manage →
+ {t("access.manage_all")} →
</button>
</div>
)}
@@ -399,7 +401,7 @@ export function AccessSection({
{recommended.length > 0 && (
<div>
- <div className={`${SEC_H} mb-1.5`}>Recommended</div>
+ <div className={`${SEC_H} mb-1.5`}>{t("access.recommended")}</div>
<div className="space-y-1">
{recommended.map((r) => (
<div className="flex items-center gap-2 py-1" key={r.connector}>
@@ -407,7 +409,7 @@ export function AccessSection({
<div className="min-w-0 flex-1">
<div className="flex items-center gap-1.5 text-[13px] font-medium leading-tight">
<span className="truncate">{labelFor(r.connector, byName)}</span>
- {r.tier === "core" && <span className={TAG_CORE}>core</span>}
+ {r.tier === "core" && <span className={TAG_CORE}>{t("access.core_tag")}</span>}
</div>
<div className="text-[11px] text-faint truncate" title={r.reason}>
{r.reason}
@@ -423,7 +425,7 @@ export function AccessSection({
else onOpenIntegrations?.();
}}
>
- Connect
+ {t("connector.connect")}
</button>
</div>
))}
@@ -435,7 +437,7 @@ export function AccessSection({
a quiet "+" link, structurally identical to Sources (owner ask 2026-07-13:
the old drawer's card wrapper read too heavy in the rail). */}
<div data-testid="drawer-directories">
- <div className={`${SEC_H} mb-1.5`}>Folders</div>
+ <div className={`${SEC_H} mb-1.5`}>{t("access.folders")}</div>
<div className="-mx-1.5">
{roots.map((r) => (
<RootRow
@@ -463,7 +465,7 @@ export function AccessSection({
className="mt-1 text-[12px] text-accent hover:underline text-left"
onClick={() => setAddingFolder(true)}
>
- + Give access to a folder…
+ + {t("access.give_folder")}
</button>
)}
{rootsError && <div className="roots-err">{rootsError}</div>}
@@ -490,6 +492,7 @@ function ConnectInline({
onDone: () => void;
onBack: () => void;
}) {
+ const { t: tt } = useTranslation();
useEffect(() => {
const t = setInterval(async () => {
try {
@@ -507,9 +510,9 @@ function ConnectInline({
<button
className="inline-flex items-center gap-1 text-[12px] text-faint hover:text-ink mb-2"
onClick={onBack}
- aria-label="Back to sources"
+ aria-label={tt("access.back_to_sources")}
>
- <Icon name="arrowLeft" size={13} /> Connect {c.title}
+ <Icon name="arrowLeft" size={13} /> {tt("access.connect_title", { title: c.title })}
</button>
{c.blurb && <p className="text-[12px] text-muted mb-1 leading-relaxed">{c.blurb}</p>}
<div className="-mx-2">
@@ -518,8 +521,7 @@ function ConnectInline({
{/* Scope semantics, stated once (owner ask 2026-07-13): connecting is account-level,
the toggle above is what scopes it to a session. */}
<p className="text-[11px] text-faint mt-2 leading-snug">
- Connecting makes {c.title} available to all your coworkers — the toggle in this list
- controls just this session.
+ {tt("access.scope_note", { title: c.title })}
</p>
</div>
);
@@ -548,19 +550,20 @@ function ChannelsInline({
onRemove: (channel: string) => void;
onBack: () => void;
}) {
+ const { t: tt } = useTranslation();
return (
<div>
<button
className="inline-flex items-center gap-1 text-[12px] text-faint hover:text-ink mb-2"
onClick={onBack}
- aria-label="Back to sources"
+ aria-label={tt("access.back_to_sources")}
>
- <Icon name="arrowLeft" size={13} /> {label} channels
+ <Icon name="arrowLeft" size={13} /> {tt("access.channels_title", { label })}
</button>
- <div className={`${SEC_H} mb-1.5`}>Subscribed channels · {channels.length}</div>
+ <div className={`${SEC_H} mb-1.5`}>{tt("access.subscribed", { count: channels.length })}</div>
{channels.length === 0 ? (
<div className="text-[12px] text-faint py-0.5">
- Not listening to any {label} channel yet.
+ {tt("access.no_channels", { label })}
</div>
) : (
<div className="space-y-1">
@@ -573,14 +576,14 @@ function ChannelsInline({
{s.collision && (
<span
className="text-[11px] text-warnInk bg-warnSoft/70 border border-warnInk/15 rounded px-1 shrink-0"
- title="This channel is also this session's Inbox-routing target — inbound and outbound collide."
+ title={tt("access.collision_title")}
>
⚠
</span>
)}
<button
className="w-5 h-5 grid place-items-center text-faint hover:text-danger shrink-0"
- title="Stop listening"
+ title={tt("access.stop_listening")}
onClick={() => onRemove(s.channel)}
>
×
@@ -589,11 +592,11 @@ function ChannelsInline({
))}
</div>
)}
- <div className={`${SEC_H} mt-3 mb-1.5`}>Add a channel</div>
+ <div className={`${SEC_H} mt-3 mb-1.5`}>{tt("access.add_channel")}</div>
<div className="flex items-center gap-1.5">
<ChannelPicker value={draft} onChange={onDraft} recent={recent} onSubmit={onAdd} />
<button className={BTN_ACCENT} disabled={!draft.trim()} onClick={onAdd}>
- Add
+ {tt("access.add_btn")}
</button>
</div>
{error && (
@@ -602,8 +605,7 @@ function ChannelsInline({
</p>
)}
<p className="text-[11px] text-faint mt-1.5 leading-snug">
- The agent receives messages posted to these channels. Removing one stops this session
- from listening — the connector stays connected.
+ {tt("access.channels_note")}
</p>
</div>
);
diff --git a/surfaces/gui/src/components/ApprovalCard.tsx b/surfaces/gui/src/components/ApprovalCard.tsx
index c3fd8500..f703887d 100644
--- a/surfaces/gui/src/components/ApprovalCard.tsx
+++ b/surfaces/gui/src/components/ApprovalCard.tsx
@@ -1,4 +1,5 @@
import { useState } from "react";
+import { getI18n, useTranslation } from "react-i18next";
import type { ApprovalDecision, Item } from "../types";
import { humanizeApprovalTitle, type HumanLine } from "../humanize";
import { Icon } from "./Icon";
@@ -15,14 +16,15 @@ export function shortArgs(args: any): string {
}
// Human verbs kept for the §25 grant lines (the card title now comes from humanize.ts).
+// Values are i18n keys resolved at render time.
const TOOL_VERBS: Record<string, string> = {
- write_file: "Write a file",
- replace_in_file: "Edit a file",
- apply_patch: "Apply a patch",
- apply_unified_diff: "Apply a patch",
- run_shell: "Run a command",
- send_message: "Send a message",
- send_file: "Send a file",
+ write_file: "approval.verbs.write_file",
+ replace_in_file: "approval.verbs.edit_file",
+ apply_patch: "approval.verbs.apply_patch",
+ apply_unified_diff: "approval.verbs.apply_patch",
+ run_shell: "approval.verbs.run_command",
+ send_message: "approval.verbs.send_message",
+ send_file: "approval.verbs.send_file",
};
// §35: routine workspace writes render as a compact ROW; everything else is a full card.
@@ -35,9 +37,10 @@ type ApprovalItem = Extract<Item, { kind: "approval" }>;
// Per-tool button copy (§7): a skill proposal is an "add", not an "allow". Shared with the
// parked Inbox card so both dialects match.
export function approvalActionLabels(name?: string): { allow: string; deny: string } {
+ const tt = getI18n().getFixedT(null, "translation");
return name === "save_skill"
- ? { allow: "Add to my skills", deny: "Not now" }
- : { allow: "Allow once", deny: "Deny" };
+ ? { allow: tt("approval.btn.add_to_skills"), deny: tt("approval.btn.not_now") }
+ : { allow: tt("approval.allow_once"), deny: tt("approval.btn.deny") };
}
// save_skill's review surface (SKILLS-SPEC §5.2): description, the full instructions
@@ -45,6 +48,7 @@ export function approvalActionLabels(name?: string): { allow: string; deny: stri
// answers "added WHERE, available WHEN". Shared verbatim with the parked Inbox card —
// one decision, one dialect.
export function SaveSkillPreview({ args }: { args: any }) {
+ const { t } = useTranslation();
return (
<>
{args?.description && <div className="approval-with">{String(args.description)}</div>}
@@ -61,10 +65,7 @@ export function SaveSkillPreview({ args }: { args: any }) {
))}
</div>
)}
- <div className="approval-with">
- Approving adds it to your skills on this computer — usable in every conversation from
- then on.
- </div>
+ <div className="approval-with">{t("approval.save_skill_footer")}</div>
</>
);
}
@@ -109,27 +110,39 @@ export function grantHost(url: any): string {
// Plain-words scope note (replaces the "local action" badge): where does this act?
// Shared with the parked-approval card (InboxItemCard) so both dialects match (§35).
+// Uses the fixed-T form because this helper is also called from non-component modules.
export function scopeNote(
name: string,
args: any,
category?: string,
): { text: string; external: boolean } {
+ const tt = getI18n().getFixedT(null, "translation");
// save_skill's corner answers WHERE (SKILLS-SPEC §5.2): the exact place to find, edit,
// or turn off the skill afterwards.
- if (name === "save_skill") return { text: "saves to Settings ▸ Skills", external: false };
- if (category === "connector") return { text: "acts on a connected service", external: true };
+ if (name === "save_skill") return { text: tt("approval.scope.save_skill"), external: false };
+ if (category === "connector") return { text: tt("approval.scope.connector"), external: true };
// Egress (§1.9): the request itself reaches the network — never "stays on this computer".
if (name === "web_fetch")
- return { text: `leaves this computer → ${grantHost(args?.url) || "the web"}`, external: true };
+ return {
+ text: tt("approval.scope.leaves_mac", { dest: grantHost(args?.url) || tt("approval.scope.web_fallback") }),
+ external: true,
+ };
if (name === "web_search")
- return { text: "leaves this computer → your search provider", external: true };
+ return {
+ text: tt("approval.scope.leaves_mac", { dest: tt("approval.scope.search_provider_dest") }),
+ external: true,
+ };
if (EXTERNAL.has(name)) {
const platform = String(args?.target ?? "").split(":")[0];
const names: Record<string, string> = { slack: "Slack", telegram: "Telegram" };
- return { text: `leaves this computer → ${names[platform] || platform || "a connected chat"}`, external: true };
+ const dest = names[platform] || platform || tt("approval.scope.connected_chat_fallback");
+ return { text: tt("approval.scope.leaves_mac", { dest }), external: true };
}
const overwrite = name === "write_file" && args?.overwrite;
- return { text: "stays on this computer" + (overwrite ? " · overwrites the existing file" : ""), external: false };
+ return {
+ text: tt("approval.scope.stays_mac") + (overwrite ? " " + tt("approval.scope.overwrite_suffix") : ""),
+ external: false,
+ };
}
// The proposed content/command, straight from the tool call's ARGS — the file/action
@@ -140,6 +153,7 @@ const PREVIEW_LINES = 5;
const PREVIEW_CHARS = 420;
export function PreviewBlock({ text, mono = true }: { text: string; mono?: boolean }) {
+ const { t } = useTranslation();
const [all, setAll] = useState(false);
const lines = text.split("\n");
const clipped = lines.length > PREVIEW_LINES || text.length > PREVIEW_CHARS;
@@ -154,10 +168,10 @@ export function PreviewBlock({ text, mono = true }: { text: string; mono?: boole
{clipped && (
<button className="approval-prev-more" onClick={() => setAll((v) => !v)}>
{all
- ? "show less"
+ ? t("approval.preview_less")
: lines.length > PREVIEW_LINES
- ? `show all ${lines.length} lines`
- : "show the full message"}
+ ? t("approval.preview_all_lines", { n: lines.length })
+ : t("approval.preview_full")}
</button>
)}
</div>
@@ -182,7 +196,7 @@ function Buttons({
onApprove,
runTask,
primaryLabel,
- denyLabel = "Deny",
+ denyLabel,
autoApprove = false,
}: {
item: ApprovalItem;
@@ -195,8 +209,11 @@ function Buttons({
// than none. Allow once / Deny only.
autoApprove?: boolean;
}) {
+ const { t } = useTranslation();
const connector = item.category === "connector";
const offerStanding = !!(runTask && item.standingTarget);
+ const verbKey = TOOL_VERBS[item.name];
+ const verbName = verbKey ? t(verbKey).toLowerCase() : item.name;
// §1.9: egress grants are destination-shaped. web_fetch offers the DOMAIN — tool-wide
// would cover every future destination, so it's withheld (and server-refused). web_search
// has a fixed destination (the configured provider), so tool-wide IS provider-wide and
@@ -218,10 +235,10 @@ function Buttons({
{offerStanding && (
<button
className="btn"
- title={`Always allow ${item.name} → ${item.standingTarget} for “${runTask?.title || "this automation"}” — revoke any time on its Automations page`}
+ title={t("approval.btn.always_task_title", { name: item.name, target: item.standingTarget, task: runTask?.title || t("approval.btn.this_automation") })}
onClick={() => onApprove("always_task")}
>
- Allow every time
+ {t("approval.btn.allow_every_time")}
</button>
)}
{/* In a run context the task-persistent grant replaces the session-scoped one —
@@ -234,33 +251,33 @@ function Buttons({
{!noSessionGrant && (
<button
className="btn"
- title={`Always allow ${TOOL_VERBS[item.name]?.toLowerCase() || item.name} for this session`}
+ title={t("approval.btn.always_tool_title", { name: verbName })}
onClick={() => onApprove("always_tool")}
>
- Always allow
+ {t("approval.btn.always_allow")}
</button>
)}
{!autoApprove && !offerStanding && item.name === "web_fetch" && fetchHost && (
<button
className="btn"
- title={`Every fetch to ${fetchHost} (and its subdomains) runs without asking for the rest of this session`}
+ title={t("approval.btn.always_domain_title", { host: fetchHost })}
onClick={() => onApprove("always_domain")}
>
- Always allow {fetchHost} this session
+ {t("approval.btn.always_domain", { host: fetchHost })}
</button>
)}
{!autoApprove && !offerStanding && item.name === "web_search" && (
<button
className="btn"
- title="Every web search runs without asking for the rest of this session — the grant ends if you change the search provider"
+ title={t("approval.btn.always_search_title")}
onClick={() => onApprove("always_tool")}
>
- Always allow searches this session
+ {t("approval.btn.always_search")}
</button>
)}
{!autoApprove && item.name === "run_shell" && (
<button className="btn" onClick={() => onApprove("always_command")}>
- Always allow this command
+ {t("approval.btn.always_command")}
</button>
)}
{/* Session-wide read-only grant (owner ask 2026-08-11): offered only when the
@@ -271,15 +288,15 @@ function Buttons({
<button
className="btn"
data-testid="allow-readonly-session"
- title="Auto-allow read-only commands (local reads and pipelines only — no network, writes, or interpreters) for the rest of this session"
+ title={t("approval.btn.readonly_session_title")}
onClick={() => onApprove("readonly_session")}
>
- Allow read-only commands
+ {t("approval.btn.readonly_session")}
</button>
)}
<span className="spacer" />
<button className="btn quiet-deny" onClick={() => onApprove("deny")}>
- {denyLabel}
+ {denyLabel ?? t("approval.btn.deny")}
</button>
</div>
);
@@ -302,6 +319,7 @@ export function ApprovalCard({
// grants wouldn't skip the reviewer anyway (§1.5), so the "always" buttons are hidden.
autoApprove?: boolean;
}) {
+ const { t } = useTranslation();
const [peek, setPeek] = useState(false);
const title = humanizeApprovalTitle(item.name, item.args);
const scope = scopeNote(item.name, item.args, item.category);
@@ -320,7 +338,7 @@ export function ApprovalCard({
// Quiet, not a warning: the reviewer hesitating is context, not danger.
const reviewerUnsure = item.reviewerUnsure ? (
<div className="text-[12px] text-muted mt-1" data-testid="approval-reviewer-unsure">
- reviewer wasn&rsquo;t sure: {item.reviewerUnsure}
+ {t("approval.reviewer_unsure", { note: item.reviewerUnsure })}
</div>
) : null;
@@ -334,7 +352,7 @@ export function ApprovalCard({
<TitleText line={title} />
{content && (
<button className="approval-peek" onClick={() => setPeek((v) => !v)}>
- preview {peek ? "▴" : "▾"}
+ {t("approval.preview_label")} {peek ? "▴" : "▾"}
</button>
)}
<span className="spacer" />
@@ -342,7 +360,7 @@ export function ApprovalCard({
item={item}
onApprove={onApprove}
runTask={runTask}
- primaryLabel="Allow"
+ primaryLabel={t("approval.allow")}
autoApprove={autoApprove}
/>
</div>
@@ -358,7 +376,7 @@ export function ApprovalCard({
<div className={"approval" + (scope.external ? " approval-external" : "") + dock}>
<div className="approval-top">
<div className="approval-heading">
- <span className="approval-ico" title={`Tool: ${item.name}`}>
+ <span className="approval-ico" title={t("approval.tool_title", { name: item.name })}>
<Icon name="shield" size={15} />
</span>
<TitleText line={title} />
@@ -377,11 +395,11 @@ export function ApprovalCard({
<span className="ico">
<Icon name="file" size={13} />
</span>
- {String(item.args?.path ?? "").split("/").pop() || "file"}
- {item.args?.as_screenshot ? " · as a PNG screenshot" : ""}
+ {String(item.args?.path ?? "").split("/").pop() || t("approval.file_fallback")}
+ {item.args?.as_screenshot ? t("approval.as_png_screenshot") : ""}
</span>
{item.args?.comment && (
- <MessagePreview text={String(item.args.comment)} label="With the message" />
+ <MessagePreview text={String(item.args.comment)} label={t("approval.with_message")} />
)}
</>
)}
@@ -394,26 +412,30 @@ export function ApprovalCard({
because the card must show the setting as it stands right now. */}
{item.name === "web_search" && (
<div className="approval-with">
- Queries go to your configured search provider
- {item.searchProvider ? ` (currently: ${item.searchProvider})` : ""}.
+ {item.searchProvider
+ ? t("approval.search_note_current", { provider: item.searchProvider })
+ : t("approval.search_note")}
</div>
)}
{grants.length > 0 && (
<div className="approval-grants" data-testid="approval-grants">
- {grants.map((g, i) => (
- <div className="approval-grant" key={i} data-access={g.access}>
- <span className={"grant-mark" + (g.access === "write" ? " write" : "")}>
- {g.access === "write" ? "✓" : "·"}
- </span>
- <span className="grant-line">
- {TOOL_VERBS[g.tool] || g.tool} <code className="approval-tool">{g.target}</code>
- <span className="grant-note">
- {g.access === "write" ? " — always allowed once you approve" : " — read-only"}
+ {grants.map((g, i) => {
+ const verbKey = TOOL_VERBS[g.tool];
+ return (
+ <div className="approval-grant" key={i} data-access={g.access}>
+ <span className={"grant-mark" + (g.access === "write" ? " write" : "")}>
+ {g.access === "write" ? "✓" : "·"}
</span>
- </span>
- </div>
- ))}
+ <span className="grant-line">
+ {verbKey ? t(verbKey) : g.tool} <code className="approval-tool">{g.target}</code>
+ <span className="grant-note">
+ {g.access === "write" ? t("approval.grant.always_after_approve") : t("approval.grant.read_only")}
+ </span>
+ </span>
+ </div>
+ );
+ })}
</div>
)}
{/* Long-tail tools: no bespoke preview — fall back to the compact args line. */}
@@ -426,7 +448,7 @@ export function ApprovalCard({
{reason && <div className="approval-reason">{reason}</div>}
{item.resolved ? (
- <div className="resolved">Approved: {item.resolved.replace("_", " ")}</div>
+ <div className="resolved">{t("approval.resolved_prefix", { state: item.resolved.replace(/_/g, " ") })}</div>
) : (
<Buttons
item={item}
diff --git a/surfaces/gui/src/components/AuditView.tsx b/surfaces/gui/src/components/AuditView.tsx
index 4a375cc6..8c051db6 100644
--- a/surfaces/gui/src/components/AuditView.tsx
+++ b/surfaces/gui/src/components/AuditView.tsx
@@ -1,4 +1,5 @@
import { useEffect, useState } from "react";
+import { useTranslation } from "react-i18next";
import { getAudit, type AuditEvent } from "../api";
import { PanelHead } from "./IntegrationsView";
@@ -14,6 +15,7 @@ export function AuditView() {
const [sessionFilter, setSessionFilter] = useState("");
const [connectorFilter, setConnectorFilter] = useState("");
const [toolFilter, setToolFilter] = useState("");
+ const { t } = useTranslation();
const refresh = () =>
getAudit({
@@ -34,21 +36,21 @@ export function AuditView() {
<div className="flex-1 min-w-0 overflow-y-auto hairline-scroll">
<div className="max-w-4xl mx-auto px-7 py-6">
<PanelHead
- title="Activity"
- sub="Recent connector and browser tool activity. Arguments are sanitized before storage."
+ title={t("audit.title")}
+ sub={t("audit.sub")}
/>
<div className="flex items-center gap-2 flex-wrap mb-4">
- <input className={INPUT} placeholder="session id" value={sessionFilter} onChange={(e) => setSessionFilter(e.target.value)} />
- <input className={INPUT} placeholder="connector" value={connectorFilter} onChange={(e) => setConnectorFilter(e.target.value)} />
- <input className={INPUT} placeholder="tool" value={toolFilter} onChange={(e) => setToolFilter(e.target.value)} />
+ <input className={INPUT} placeholder={t("audit.placeholder_session")} value={sessionFilter} onChange={(e) => setSessionFilter(e.target.value)} />
+ <input className={INPUT} placeholder={t("audit.placeholder_connector")} value={connectorFilter} onChange={(e) => setConnectorFilter(e.target.value)} />
+ <input className={INPUT} placeholder={t("audit.placeholder_tool")} value={toolFilter} onChange={(e) => setToolFilter(e.target.value)} />
<button className={BTN_ACCENT} onClick={refresh}>
- Filter
+ {t("audit.filter")}
</button>
</div>
{events.length === 0 ? (
- <div className={CARD + " p-4 text-[13px] text-muted"}>No audit events yet.</div>
+ <div className={CARD + " p-4 text-[13px] text-muted"}>{t("audit.no_events")}</div>
) : (
<div className="space-y-2">
{events.map((ev) => (
@@ -63,18 +65,19 @@ export function AuditView() {
}
function AuditRow({ ev }: { ev: AuditEvent }) {
+ const { t } = useTranslation();
return (
<div className={CARD + " p-3.5"}>
<div className="flex items-center gap-2 flex-wrap">
<span className="font-mono text-[13px] font-medium text-ink">{ev.tool}</span>
<span className="text-[12px] text-faint">
- {ev.connector || "tool"} · {ev.stage || ev.status || "event"} · {ev.timestamp}
+ {ev.connector || t("audit.fallback_tool")} · {ev.stage || ev.status || t("audit.fallback_event")} · {ev.timestamp}
</span>
</div>
<div className="text-[12px] text-muted mt-0.5">
- session {ev.session_id || "-"} {ev.approval ? `· ${ev.approval}` : ""} {ev.status ? `· ${ev.status}` : ""}
+ {t("audit.session")} {ev.session_id || "-"} {ev.approval ? `· ${ev.approval}` : ""} {ev.status ? `· ${ev.status}` : ""}
</div>
- {ev.resource && <div className="text-[12px] text-faint mt-0.5">resource: {ev.resource}</div>}
+ {ev.resource && <div className="text-[12px] text-faint mt-0.5">{t("audit.resource", { value: ev.resource })}</div>}
{ev.args && Object.keys(ev.args).length > 0 && (
<div className="font-mono text-[12px] text-muted mt-1.5 break-words">{formatAuditArgs(ev.args)}</div>
)}
diff --git a/surfaces/gui/src/components/AutomationQuickstart.tsx b/surfaces/gui/src/components/AutomationQuickstart.tsx
index fb3d7650..45ccd165 100644
--- a/surfaces/gui/src/components/AutomationQuickstart.tsx
+++ b/surfaces/gui/src/components/AutomationQuickstart.tsx
@@ -1,4 +1,5 @@
import { useEffect, useRef, useState } from "react";
+import { useTranslation, getI18n } from "react-i18next";
import {
cloudLogin,
connectManaged,
@@ -22,16 +23,17 @@ import { SelectMenu } from "./SelectMenu";
// The `ob-*` testids moved here with the machinery.
// "When" = day choice × free time (owner call 2026-07-11); the cron assembles from the two.
-const DAYS: Record<string, { label: string; dow: string }> = {
- mon: { label: "Mondays", dow: "1" },
- tue: { label: "Tuesdays", dow: "2" },
- wed: { label: "Wednesdays", dow: "3" },
- thu: { label: "Thursdays", dow: "4" },
- fri: { label: "Fridays", dow: "5" },
- sat: { label: "Saturdays", dow: "6" },
- sun: { label: "Sundays", dow: "0" },
- weekdays: { label: "Weekdays", dow: "1-5" },
- daily: { label: "Every day", dow: "*" },
+// Labels are i18n keys (resolved in the component via t()).
+const DAYS: Record<string, { labelKey: string; dow: string }> = {
+ mon: { labelKey: "automations.day_mon", dow: "1" },
+ tue: { labelKey: "automations.day_tue", dow: "2" },
+ wed: { labelKey: "automations.day_wed", dow: "3" },
+ thu: { labelKey: "automations.day_thu", dow: "4" },
+ fri: { labelKey: "automations.day_fri", dow: "5" },
+ sat: { labelKey: "automations.day_sat", dow: "6" },
+ sun: { labelKey: "automations.day_sun", dow: "0" },
+ weekdays: { labelKey: "automations.freq_weekdays", dow: "1-5" },
+ daily: { labelKey: "automations.freq_daily", dow: "*" },
};
// §30 connect-state spinner (the app has no other spinner — waits elsewhere are label swaps).
// Exported for Onboarding page 2's sign-in button (same states, same look).
@@ -46,10 +48,10 @@ const cronFor = (dayKey: string, hhmm: string) => {
interface QuickTemplate {
key: string;
- title: string;
- blurb: string;
- cadence: string; // the card's footer label
- conns: { name: string; why: string }[]; // [] = no connections needed
+ titleKey: string;
+ blurbKey: string;
+ cadenceKey: string; // the card's footer label
+ conns: { name: string; whyKey: string }[]; // [] = no connections needed
needsRepo?: boolean;
needsChannel?: boolean;
consent?: boolean; // write recipes carry the §25 consent line; reads carry disclosure
@@ -62,89 +64,88 @@ interface QuickTemplate {
const TEMPLATES: QuickTemplate[] = [
{
key: "github",
- title: "GitHub digest",
- blurb: "Merged PRs and commits, posted to your team's Slack.",
- cadence: "Weekly",
+ titleKey: "automations.tmpl_github_title",
+ blurbKey: "automations.tmpl_github_blurb",
+ cadenceKey: "automations.cadence_weekly",
conns: [
- { name: "slack", why: "Where the digest posts" },
- { name: "github", why: "What the digest summarizes" },
+ { name: "slack", whyKey: "automations.why_digest_posts" },
+ { name: "github", whyKey: "automations.why_digest_summarizes" },
],
needsRepo: true,
needsChannel: true,
consent: true,
day: "mon",
time: "09:00",
- instructions: ({ repo, channel }) =>
- `Summarize activity since the last digest in the GitHub repository ${repo || "(the connected repository)"}: ` +
- `merged pull requests, notable commits, and anything needing attention. ` +
- `Post the digest to the Slack channel ${channel} using send_message.`,
+ instructions: ({ repo, channel }) => {
+ const gt = getI18n().t;
+ return gt("automations.tmpl_github_instructions", { repo: repo || gt("automations.tmpl_github_repo_default"), channel });
+ },
},
{
key: "pipeline",
- title: "Pipeline digest",
- blurb: "Deals that moved — and deals going quiet — posted to Slack.",
- cadence: "Weekly",
+ titleKey: "automations.tmpl_pipeline_title",
+ blurbKey: "automations.tmpl_pipeline_blurb",
+ cadenceKey: "automations.cadence_weekly",
conns: [
- { name: "slack", why: "Where the digest posts" },
- { name: "hubspot", why: "Pipeline and deal activity" },
+ { name: "slack", whyKey: "automations.why_digest_posts" },
+ { name: "hubspot", whyKey: "automations.why_pipeline_activity" },
],
needsChannel: true,
consent: true,
day: "mon",
time: "09:00",
- instructions: ({ channel }) =>
- `Review HubSpot activity since the last digest: deals that changed stage, deals going ` +
- `quiet, and deals past their close date. Post a short pipeline digest to the Slack ` +
- `channel ${channel} using send_message.`,
+ instructions: ({ channel }) => {
+ const gt = getI18n().t;
+ return gt("automations.tmpl_pipeline_instructions", { channel });
+ },
},
{
key: "brief",
- title: "Morning brief",
- blurb: "Calendar and unread email, summarized before your day starts.",
- cadence: "Daily",
+ titleKey: "automations.tmpl_brief_title",
+ blurbKey: "automations.tmpl_brief_blurb",
+ cadenceKey: "automations.cadence_daily",
conns: [
- { name: "google_calendar", why: "Today's meetings and gaps" },
- { name: "gmail", why: "What arrived overnight" },
+ { name: "google_calendar", whyKey: "automations.why_meetings_gaps" },
+ { name: "gmail", whyKey: "automations.why_overnight_email" },
],
deliver: true,
day: "daily",
time: "08:00",
- instructions: ({ deliver }) =>
- `Prepare a short morning brief: today's calendar events and gaps, plus email that ` +
- `arrived since yesterday evening. ` +
- (deliver === "app" ? "Save it as the session deliverable." : "Send it to me as a Slack DM."),
+ instructions: ({ deliver }) => {
+ const gt = getI18n().t;
+ return gt("automations.tmpl_brief_instructions_prefix") +
+ (deliver === "app" ? gt("automations.tmpl_brief_save") : gt("automations.tmpl_brief_slack"));
+ },
},
{
key: "news",
- title: "Morning news briefing",
- blurb: "A 5-bullet tech & world news digest, saved as markdown.",
- cadence: "Daily",
+ titleKey: "automations.tmpl_news_title",
+ blurbKey: "automations.tmpl_news_blurb",
+ cadenceKey: "automations.cadence_daily",
conns: [],
day: "daily",
time: "08:00",
- instructions: () =>
- "Search the web for the most important technology and world news from the last 24 hours " +
- "and write a concise 5-bullet briefing, saved as a markdown file.",
+ instructions: () => getI18n().t("automations.tmpl_news_instructions"),
},
{
key: "inboxdigest",
- title: "Inbox digest",
- blurb: "One short digest of your unread email.",
- cadence: "Weekdays",
- conns: [{ name: "gmail", why: "Your unread email" }],
+ titleKey: "automations.tmpl_inbox_title",
+ blurbKey: "automations.tmpl_inbox_blurb",
+ cadenceKey: "automations.cadence_weekdays",
+ conns: [{ name: "gmail", whyKey: "automations.why_unread_email" }],
day: "weekdays",
time: "09:00",
- instructions: () => "Summarize my unread email into one short digest note.",
+ instructions: () => getI18n().t("automations.tmpl_inbox_instructions"),
},
{
key: "cleanup",
- title: "Folder cleanup",
- blurb: "Sort recent Downloads into tidy folders by type.",
- cadence: "Weekly",
+ titleKey: "automations.tmpl_cleanup_title",
+ blurbKey: "automations.tmpl_cleanup_blurb",
+ cadenceKey: "automations.cadence_weekly",
conns: [],
day: "fri",
time: "17:30",
- instructions: () => "Sort my recent Downloads into tidy folders by file type.",
+ instructions: () => getI18n().t("automations.tmpl_cleanup_instructions"),
},
];
@@ -160,8 +161,9 @@ export function AutomationQuickstart({
permissions?: { tool: string; target: string; access: "read" | "write" }[];
}) => void;
}) {
+ const { t } = useTranslation();
const [pickedKey, setPickedKey] = useState<string | null>(null);
- const picked = TEMPLATES.find((t) => t.key === pickedKey) || null;
+ const picked = TEMPLATES.find((tpl) => tpl.key === pickedKey) || null;
const [connectors, setConnectors] = useState<Connector[]>([]);
const [cloud, setCloud] = useState<CloudStatus | null>(null);
@@ -225,10 +227,10 @@ export function AutomationQuickstart({
if (pickedKey) cfgRef.current?.scrollIntoView({ behavior: "smooth", block: "nearest" });
}, [pickedKey]);
- const pick = (t: QuickTemplate) => {
- setPickedKey(t.key);
- setDay(t.day);
- setTime(t.time);
+ const pick = (tpl: QuickTemplate) => {
+ setPickedKey(tpl.key);
+ setDay(tpl.day);
+ setTime(tpl.time);
setConsent(true);
setConnFlow(null);
};
@@ -280,7 +282,7 @@ export function AutomationQuickstart({
const create = () => {
if (!picked) return;
onCreate({
- title: picked.title,
+ title: t(picked.titleKey),
instructions: picked.instructions({ repo, channel, deliver }),
cron: cronFor(day, time),
permissions:
@@ -291,12 +293,14 @@ export function AutomationQuickstart({
};
const gateHint = !allConnected
- ? `Connect ${picked?.conns
- .filter((c) => !connState(c.name)?.connected)
- .map((c) => connState(c.name)?.title || c.name)
- .join(" and ")} to continue`
+ ? t("automations.gate_connect", {
+ names: picked?.conns
+ .filter((c) => !connState(c.name)?.connected)
+ .map((c) => connState(c.name)?.title || c.name)
+ .join(t("automations.gate_join")),
+ })
: picked?.needsChannel && !channel
- ? "Pick a channel to post to first"
+ ? t("automations.gate_pick_channel")
: "";
const label = "block text-[12px] text-muted mt-3 mb-1";
@@ -306,33 +310,33 @@ export function AutomationQuickstart({
return (
<div className="mb-4">
<div className="text-[11px] uppercase tracking-[0.05em] text-faint mb-2.5">
- Start from a template
+ {t("automations.start_from_template")}
</div>
{/* Equal-height cards (owner ask 2026-07-12): 1fr rows + h-full — <button> grid items
don't stretch like divs. */}
<div className="grid grid-cols-3 auto-rows-fr gap-3">
- {TEMPLATES.map((t) => (
+ {TEMPLATES.map((tpl) => (
<button
- key={t.key}
- data-testid={`qs-template-${t.key}`}
+ key={tpl.key}
+ data-testid={`qs-template-${tpl.key}`}
className={
"h-full text-left rounded-xl2 border bg-panel p-4 flex flex-col gap-1.5 " +
- (pickedKey === t.key
+ (pickedKey === tpl.key
? "border-accent ring-2 ring-accentSoft"
: "border-line hover:border-lineStrong")
}
- onClick={() => pick(t)}
+ onClick={() => pick(tpl)}
>
- <span className="text-[13px] font-semibold">{t.title}</span>
- <span className="text-[12px] text-muted leading-relaxed flex-1">{t.blurb}</span>
+ <span className="text-[13px] font-semibold">{t(tpl.titleKey)}</span>
+ <span className="text-[12px] text-muted leading-relaxed flex-1">{t(tpl.blurbKey)}</span>
<span className="flex items-center gap-1.5 mt-1">
- {t.conns.map((c) => {
+ {tpl.conns.map((c) => {
const cs = connState(c.name);
const on = !!cs?.connected;
return (
<span
key={c.name}
- title={`${cs?.title || c.name} — ${on ? "connected" : "not connected yet"}`}
+ title={`${cs?.title || c.name} — ${on ? t("automations.conn_connected") : t("automations.conn_not_connected")}`}
style={on ? undefined : { filter: "grayscale(1)", opacity: 0.55 }}
>
{cs ? (
@@ -344,7 +348,7 @@ export function AutomationQuickstart({
);
})}
<span className="text-[11px] text-faint ml-0.5">
- {t.conns.length === 0 ? `No connections needed · ${t.cadence}` : t.cadence}
+ {tpl.conns.length === 0 ? t("automations.no_conns_with_cadence", { cadence: t(tpl.cadenceKey) }) : t(tpl.cadenceKey)}
</span>
</span>
</button>
@@ -360,15 +364,15 @@ export function AutomationQuickstart({
{/* §30: the card names its template — without this it starts abruptly after the grid. */}
<div className="flex items-baseline gap-2 pb-2.5 mb-1 border-b border-line">
<span className="text-[11px] uppercase tracking-[0.05em] text-accent font-semibold">
- Set up
+ {t("automations.set_up")}
</span>
- <span className="text-[14px] font-semibold">{picked.title}</span>
+ <span className="text-[14px] font-semibold">{t(picked.titleKey)}</span>
<span className="ml-auto text-[12px] text-faint max-sm:hidden">
- {picked.conns.length ? "Connections, delivery & schedule" : "Delivery & schedule"} ·{" "}
- {picked.cadence}
+ {picked.conns.length ? t("automations.conns_delivery_sched") : t("automations.delivery_sched")} ·{" "}
+ {t(picked.cadenceKey)}
</span>
</div>
- {picked.conns.map(({ name, why }) => {
+ {picked.conns.map(({ name, whyKey }) => {
const c = connState(name);
const flow = connFlow?.name === name ? connFlow : null;
return (
@@ -377,16 +381,16 @@ export function AutomationQuickstart({
{c && <ConnectorBadge connector={c} size={26} title={c.title} />}
<span className="min-w-0 flex-1">
<span className="block text-[13px] font-medium">{c?.title || name}</span>
- <span className="block text-[12px] text-faint">{why}</span>
+ <span className="block text-[12px] text-faint">{t(whyKey)}</span>
</span>
{c?.connected ? (
- <span className="text-[13px] text-ok">✓ Connected</span>
+ <span className="text-[13px] text-ok">{t("automations.connected_ok")}</span>
) : flow ? (
<span className="inline-flex items-center gap-2 text-[12px] text-muted">
<Spinner />
{flow.phase === "opening"
- ? "Opening browser…"
- : `Waiting for ${c?.title || name}…`}
+ ? t("automations.opening_browser")
+ : t("automations.waiting_for", { name: c?.title || name })}
</span>
) : (
<button
@@ -394,7 +398,7 @@ export function AutomationQuickstart({
onClick={() => startConnect(name)}
data-testid={`ob-connect-${name}`}
>
- Connect
+ {t("automations.connect")}
</button>
)}
</div>
@@ -408,16 +412,16 @@ export function AutomationQuickstart({
<span>↗</span>
<span className="flex-1 min-w-0">
<b className="text-ink font-medium">
- Finish connecting {c?.title || name} in your browser.
+ {t("automations.finish_connecting", { name: c?.title || name })}
</b>{" "}
- Approve it there, then come back — this page updates by itself.
+ {t("automations.finish_connecting_desc")}
</span>
<button
className="text-faint underline hover:text-muted shrink-0"
onClick={() => setConnFlow(null)}
data-testid="ob-connect-cancel"
>
- Cancel
+ {t("automations.cancel")}
</button>
</div>
)}
@@ -431,25 +435,25 @@ export function AutomationQuickstart({
data-testid="ob-cloudpane"
>
<span className="block text-[13px] text-ink font-medium">
- One sign-in unlocks every one-click connection
+ {t("automations.one_signin_unlocks")}
</span>
- Connections are brokered by OpenWorker Cloud — your tokens stay on this computer.
+ {t("automations.cloud_brokered")}
<div className="flex items-center gap-3 mt-2">
{signinPhase ? (
<>
<span className="inline-flex items-center gap-2 text-[12px]">
<Spinner />
- {signinPhase === "opening" ? "Opening browser…" : "Waiting for sign-in…"}
+ {signinPhase === "opening" ? t("automations.opening_browser") : t("automations.waiting_signin")}
</span>
{signinPhase === "waiting" && (
<span className="text-[12px] text-faint">
- Finish signing in in your browser — this page updates by itself.{" "}
+ {t("automations.finish_signin_desc")}{" "}
<button
className="underline hover:text-muted"
onClick={cancelSignin}
data-testid="ob-signin-cancel"
>
- Cancel
+ {t("automations.cancel")}
</button>
</span>
)}
@@ -460,7 +464,7 @@ export function AutomationQuickstart({
onClick={signInThenConnect}
data-testid="ob-cloud-signin"
>
- Sign in to OpenWorker Cloud
+ {t("automations.sign_in_to_cloud")}
</button>
)}
</div>
@@ -471,10 +475,10 @@ export function AutomationQuickstart({
<div className={picked.conns.length ? "bg-paper rounded-xl px-4 py-3.5 mt-3" : ""} data-testid="ob-recipe">
{picked.needsRepo && (
<>
- <label className={label}>Repository</label>
+ <label className={label}>{t("automations.repository")}</label>
<input
className={input}
- placeholder="owner/repo"
+ placeholder={t("automations.repo_placeholder")}
value={repo}
onChange={(e) => setRepo(e.target.value)}
data-testid="ob-repo"
@@ -483,7 +487,7 @@ export function AutomationQuickstart({
)}
{picked.needsChannel && (
<>
- <label className={label}>Post to channel</label>
+ <label className={label}>{t("automations.post_to_channel")}</label>
<div data-testid="ob-channel">
<ChannelPicker
value={channel}
@@ -495,37 +499,37 @@ export function AutomationQuickstart({
/>
</div>
<p className="text-[11px] text-warnInk mt-1">
- The bot must be a member of the channel — invite @OpenWorker in Slack if it isn't.
+ {t("automations.bot_member_hint")}
</p>
</>
)}
- <label className={label}>When</label>
+ <label className={label}>{t("automations.when")}</label>
<div className="flex gap-2">
<div className="flex-1 min-w-0">
<SelectMenu
- ariaLabel="Day"
+ ariaLabel={t("automations.day_aria")}
value={day}
- options={Object.entries(DAYS).map(([k, v]) => ({ value: k, label: v.label }))}
+ options={Object.entries(DAYS).map(([k, v]) => ({ value: k, label: t(v.labelKey) }))}
onChange={setDay}
/>
</div>
<input
className="w-28 px-3 py-2 rounded-lg border border-line bg-panel text-[13px] outline-none focus:border-accent"
type="time"
- aria-label="Time"
+ aria-label={t("automations.time_aria")}
value={time}
onChange={(e) => setTime(e.target.value)}
/>
</div>
{picked.deliver && (
<>
- <label className={label}>Deliver to</label>
+ <label className={label}>{t("automations.deliver_to")}</label>
<SelectMenu
- ariaLabel="Deliver to"
+ ariaLabel={t("automations.deliver_to")}
value={deliver}
options={[
- { value: "app", label: "In the app" },
- { value: "slack", label: "Slack DM (connect Slack later)" },
+ { value: "app", label: t("automations.deliver_app") },
+ { value: "slack", label: t("automations.deliver_slack") },
]}
onChange={(v) => setDeliver(v as "app" | "slack")}
/>
@@ -541,18 +545,17 @@ export function AutomationQuickstart({
data-testid="ob-consent"
/>
<span>
- Allow this automation to post its digest to{" "}
+ {t("automations.consent_prefix")}{" "}
<b className="text-ink" title={channel || undefined}>
- {channelLabel || "the channel"}
+ {channelLabel || t("automations.the_channel")}
{channelWorkspace ? ` (${channelWorkspace})` : ""}
</b>{" "}
- without asking each time. Anything else still asks first.
+ {t("automations.consent_suffix")}
</span>
</label>
) : picked.conns.length > 0 ? (
<p className="text-[13px] text-muted mt-3">
- This automation only <b className="text-ink">reads</b> on schedule — reading
- never needs approval.
+ {t("automations.read_only_pref")} <b className="text-ink">{t("automations.reads")}</b> {t("automations.read_only_suff")}
</p>
) : null}
</div>
@@ -563,7 +566,7 @@ export function AutomationQuickstart({
className="text-[13px] text-faint hover:text-muted"
onClick={() => setPickedKey(null)}
>
- Cancel
+ {t("automations.cancel")}
</button>
{/* A silently-disabled primary reads as a bug — always name the missing piece. */}
{gateHint && (
@@ -580,7 +583,7 @@ export function AutomationQuickstart({
onClick={create}
data-testid="ob-create"
>
- {busy ? "Creating…" : "Create automation"}
+ {busy ? t("automations.creating") : t("automations.create_btn")}
</button>
</div>
</div>
diff --git a/surfaces/gui/src/components/BoardPanel.tsx b/surfaces/gui/src/components/BoardPanel.tsx
index 95e7fdc1..97bb7abe 100644
--- a/surfaces/gui/src/components/BoardPanel.tsx
+++ b/surfaces/gui/src/components/BoardPanel.tsx
@@ -9,17 +9,19 @@
// Both render the same Board data App owns; mutations go through the /board
// endpoints and act as the USER.
import { useEffect, useState } from "react";
+import type { TFunction } from "i18next";
+import { Trans, getI18n, useTranslation } from "react-i18next";
import type { Board, BoardItem, BoardItemDetail, BoardTimelineEvent } from "../api";
import { Icon } from "./Icon";
// Rail display order: needs-attention first (mock UX-030: "blocked on top").
-const RAIL_GROUPS: { state: string; label: string }[] = [
- { state: "blocked", label: "Blocked" },
- { state: "review", label: "Awaiting review" },
- { state: "in_progress", label: "In progress" },
- { state: "open", label: "Queued" },
- { state: "done", label: "Done" },
- { state: "canceled", label: "Canceled" },
+const RAIL_GROUPS: { state: string; labelKey: string }[] = [
+ { state: "blocked", labelKey: "board.state_blocked" },
+ { state: "review", labelKey: "board.state_awaiting_review" },
+ { state: "in_progress", labelKey: "board.state_in_progress" },
+ { state: "open", labelKey: "board.state_queued" },
+ { state: "done", labelKey: "board.state_done" },
+ { state: "canceled", labelKey: "board.state_canceled" },
];
function dotClass(state: string): string {
@@ -31,13 +33,15 @@ function dotClass(state: string): string {
}
export function boardSummary(board: Board): string {
+ const t = getI18n().t;
const counts: Record<string, number> = {};
for (const item of board.items) counts[item.state] = (counts[item.state] || 0) + 1;
const parts: string[] = [];
- if (counts.blocked) parts.push(`${counts.blocked} blocked`);
- if (counts.review) parts.push(`${counts.review} review`);
- if (counts.in_progress) parts.push(`${counts.in_progress} in progress`);
- if (counts.open) parts.push(`${counts.open} open`);
+ if (counts.blocked) parts.push(t("board.summary_blocked", { count: counts.blocked }));
+ if (counts.review) parts.push(t("board.summary_review", { count: counts.review }));
+ if (counts.in_progress)
+ parts.push(t("board.summary_in_progress", { count: counts.in_progress }));
+ if (counts.open) parts.push(t("board.summary_open", { count: counts.open }));
return parts.join(" · ");
}
@@ -55,6 +59,7 @@ export function BoardSection({
// outlives its sessions, so finished history from a past effort would greet
// every fresh session as a long stale list. Done/canceled sit behind a quiet
// count; the expanded overlay keeps the full picture.
+ const { t } = useTranslation();
const [showFinished, setShowFinished] = useState(false);
const finished = board.items.filter(
(i) => i.state === "done" || i.state === "canceled"
@@ -72,18 +77,18 @@ export function BoardSection({
<div className="board-rail" data-testid="board-rail">
{groups.length === 0 && (
<div className="board-rail-quiet" data-testid="board-rail-quiet">
- No active work
+ {t("board.no_active_work")}
</div>
)}
{groups.map((group) => (
<div key={group.state}>
- <div className="board-group">{group.label}</div>
+ <div className="board-group">{t(group.labelKey)}</div>
{group.items.map((item) => (
<button
className="board-row"
key={item.id}
onClick={() => (onOpenItem ? onOpenItem(item.id) : onExpand())}
- title="Open item"
+ title={t("board.open_item")}
>
<span className={dotClass(item.state)} />
<span className="board-row-main">
@@ -102,7 +107,9 @@ export function BoardSection({
data-testid="board-finished-toggle"
onClick={() => setShowFinished((v) => !v)}
>
- {showFinished ? "Hide finished" : `${finished} finished · show`}
+ {showFinished
+ ? t("board.hide_finished")
+ : t("board.finished_show", { count: finished })}
</button>
)}
</div>
@@ -112,10 +119,10 @@ export function BoardSection({
// Overlay list sections — the store's raw states, nothing computed (owner ruling
// 2026-08-17). Blocked rows live under In progress: still that worker's item,
// just stuck — the red dot + blocker fact carry the difference.
-const LIST_SECTIONS: { label: string; states: string[] }[] = [
- { label: "In progress", states: ["in_progress", "blocked"] },
- { label: "Awaiting review", states: ["review"] },
- { label: "Queued", states: ["open"] },
+const LIST_SECTIONS: { labelKey: string; states: string[] }[] = [
+ { labelKey: "board.state_in_progress", states: ["in_progress", "blocked"] },
+ { labelKey: "board.state_awaiting_review", states: ["review"] },
+ { labelKey: "board.state_queued", states: ["open"] },
];
export function BoardOverlay({
@@ -140,6 +147,7 @@ export function BoardOverlay({
onOpenWorker?: (actor: string) => void;
initialItem?: number | null;
}) {
+ const { t } = useTranslation();
const [detail, setDetail] = useState<BoardItemDetail | null>(null);
const [showFinished, setShowFinished] = useState(false);
useEffect(() => {
@@ -191,7 +199,12 @@ export function BoardOverlay({
<span className="board-lrow-end">
{item.assignee}
{item.state === "blocked" && (
- <> · blocked{item.blocker ? `: ${item.blocker}` : ""}</>
+ <>
+ {" · "}
+ {item.blocker
+ ? t("board.blocked_with", { blocker: item.blocker })
+ : t("board.blocked_label")}
+ </>
)}
</span>
</button>
@@ -203,23 +216,28 @@ export function BoardOverlay({
<div className="board-overlay-head">
<div className="board-overlay-title">
<Icon name="table" size={16} />
- <span>Board</span>
+ <span>{t("rail.board_title")}</span>
<span className="board-overlay-space">{board.name}</span>
</div>
- <button className="artifact-icon-btn" onClick={onClose} aria-label="Close board" title="Close">
+ <button
+ className="artifact-icon-btn"
+ onClick={onClose}
+ aria-label={t("board.close_board")}
+ title={t("rail.close")}
+ >
<Icon name="x" size={16} />
</button>
</div>
<div className="board-overlay-body">
<div className="board-list">
{sections.map((section) => (
- <div key={section.label}>
- <div className="board-lsec">{section.label}</div>
+ <div key={section.labelKey}>
+ <div className="board-lsec">{t(section.labelKey)}</div>
{section.items.map(row)}
</div>
))}
{sections.length === 0 && (
- <div className="board-rail-quiet">No active work</div>
+ <div className="board-rail-quiet">{t("board.no_active_work")}</div>
)}
{finished.length > 0 && (
<>
@@ -229,12 +247,12 @@ export function BoardOverlay({
onClick={() => setShowFinished((v) => !v)}
>
{showFinished
- ? "Hide finished"
- : `${finished.length} finished · show`}
+ ? t("board.hide_finished")
+ : t("board.finished_show", { count: finished.length })}
</button>
{showFinished && (
<div>
- <div className="board-lsec">Finished</div>
+ <div className="board-lsec">{t("board.finished")}</div>
{finished.map(row)}
</div>
)}
@@ -256,15 +274,19 @@ export function BoardOverlay({
);
}
-const STATE_LABEL: Record<string, string> = {
- open: "Queued",
- in_progress: "In progress",
- blocked: "Blocked",
- review: "In review",
- done: "Done",
- canceled: "Canceled",
+const STATE_LABEL_KEYS: Record<string, string> = {
+ open: "board.state_queued",
+ in_progress: "board.state_in_progress",
+ blocked: "board.state_blocked",
+ review: "board.state_in_review",
+ done: "board.state_done",
+ canceled: "board.state_canceled",
};
+function stateLabel(t: TFunction, state: string): string {
+ return STATE_LABEL_KEYS[state] ? t(STATE_LABEL_KEYS[state]) : state;
+}
+
function ItemDetail({
detail,
onTransition,
@@ -278,6 +300,7 @@ function ItemDetail({
loadAttachment?: (stored: string) => Promise<string | null>;
onOpenWorker?: (actor: string) => void;
}) {
+ const { t } = useTranslation();
// "Request changes…" discloses a comment box; the verdict rides the transition.
const [changesOpen, setChangesOpen] = useState(false);
const [changesText, setChangesText] = useState("");
@@ -292,7 +315,7 @@ function ItemDetail({
</div>
<div className="board-detail-meta">
<span className={"board-detail-st st-" + detail.state}>
- {STATE_LABEL[detail.state] || detail.state}
+ {stateLabel(t, detail.state)}
</span>
{detail.assignee && (
<>
@@ -302,7 +325,7 @@ function ItemDetail({
className="board-detail-worker"
data-testid="board-open-worker"
onClick={() => onOpenWorker(detail.assignee)}
- title="Open this coworker's session"
+ title={t("board.open_worker_session")}
>
{detail.assignee} ↗
</button>
@@ -311,15 +334,19 @@ function ItemDetail({
)}
</>
)}
- {" · filed by "}
- {detail.creator}
+ {" · "}
+ {t("board.filed_by", { creator: detail.creator })}
</div>
{detail.description && (
<div className="board-detail-desc">{detail.description}</div>
)}
{detail.criteria && (
<div className="board-detail-crit">
- <span className="board-detail-label">Done when</span> — {detail.criteria}
+ <Trans
+ i18nKey="board.done_when_line"
+ values={{ criteria: detail.criteria }}
+ components={{ label: <span className="board-detail-label" /> }}
+ />
</div>
)}
<div className="board-tl">
@@ -352,6 +379,7 @@ function NoteComposer({
detail: BoardItemDetail;
onAddNote: (item: number, body: string) => Promise<void>;
}) {
+ const { t } = useTranslation();
const [text, setText] = useState("");
useEffect(() => setText(""), [detail.id]);
const submit = async () => {
@@ -364,8 +392,8 @@ function NoteComposer({
<input
className="board-note-input"
data-testid="board-note-input"
- placeholder="Add a note…"
- title="Leaves a note on the item — never changes its state"
+ placeholder={t("board.add_note_placeholder")}
+ title={t("board.add_note_title")}
value={text}
onChange={(e) => setText(e.target.value)}
onKeyDown={(e) => {
@@ -390,6 +418,7 @@ function DetailActions({
changesText: string;
setChangesText: (v: string) => void;
}) {
+ const { t } = useTranslation();
if (detail.state === "review") {
return (
<div className="board-detail-actions">
@@ -397,7 +426,7 @@ function DetailActions({
<div className="board-changes" data-testid="board-changes">
<textarea
autoFocus
- placeholder="What needs to change?"
+ placeholder={t("board.changes_placeholder")}
value={changesText}
onChange={(e) => setChangesText(e.target.value)}
/>
@@ -411,10 +440,10 @@ function DetailActions({
onTransition(detail.id, "in_progress", changesText.trim())
}
>
- Request changes
+ {t("plan.request_changes")}
</button>
<button className="board-btn ghost" onClick={() => setChangesOpen(false)}>
- Cancel
+ {t("board.cancel")}
</button>
</div>
</div>
@@ -424,10 +453,10 @@ function DetailActions({
className="board-btn primary"
onClick={() => onTransition(detail.id, "done")}
>
- Mark done
+ {t("board.mark_done")}
</button>
<button className="board-btn ghost" onClick={() => setChangesOpen(true)}>
- Request changes…
+ {t("board.request_changes_ellipsis")}
</button>
</>
)}
@@ -438,7 +467,7 @@ function DetailActions({
return (
<div className="board-detail-actions">
<button className="board-btn ghost" onClick={() => onTransition(detail.id, "open")}>
- Reopen
+ {t("board.reopen")}
</button>
</div>
);
@@ -447,24 +476,26 @@ function DetailActions({
return (
<div className="board-detail-actions">
<button className="board-btn ghost" onClick={() => onTransition(detail.id, "canceled")}>
- Remove
+ {t("common.remove")}
</button>
</div>
);
}
-function timelineLine(event: BoardTimelineEvent): string {
+function timelineLine(t: TFunction, event: BoardTimelineEvent): string {
switch (event.kind) {
case "created":
- return "filed this";
+ return t("board.tl_filed");
case "assigned":
- return `assigned to ${event.assignee}`;
+ return t("board.tl_assigned", { assignee: event.assignee });
case "claimed":
- return "claimed this";
+ return t("board.tl_claimed");
case "moved":
- return event.to === "in_progress" ? "started" : `moved to ${(STATE_LABEL[event.to || ""] || event.to || "").toLowerCase()}`;
+ return event.to === "in_progress"
+ ? t("board.tl_started")
+ : t("board.tl_moved", { state: stateLabel(t, event.to || "").toLowerCase() });
case "comment":
- return "commented";
+ return t("board.tl_commented");
default:
return event.kind;
}
@@ -477,6 +508,7 @@ function TimelineRow({
event: BoardTimelineEvent;
loadAttachment?: (stored: string) => Promise<string | null>;
}) {
+ const { t } = useTranslation();
const shots = (event.refs || []).filter((r) => r.startsWith("attachment://"));
const when = new Date(event.ts).toLocaleTimeString([], {
hour: "2-digit",
@@ -493,7 +525,7 @@ function TimelineRow({
return (
<div className={"board-tl-ev" + tone}>
<div className="board-tl-line">
- <b>{event.actor}</b> {timelineLine(event)} · {when}
+ <b>{event.actor}</b> {timelineLine(t, event)} · {when}
</div>
{event.body && <p className="board-tl-body">{event.body}</p>}
{loadAttachment &&
diff --git a/surfaces/gui/src/components/BoardWakeCard.tsx b/surfaces/gui/src/components/BoardWakeCard.tsx
index 688545f6..661e53ea 100644
--- a/surfaces/gui/src/components/BoardWakeCard.tsx
+++ b/surfaces/gui/src/components/BoardWakeCard.tsx
@@ -5,10 +5,25 @@
// card: a connector message is a foreign message, a board wake is a report —
// different shape, different affordances (they only share the visual family).
import { useState } from "react";
+import type { TFunction } from "i18next";
+import { useTranslation } from "react-i18next";
import type { BoardWakeRow, MessageSource } from "../api";
import { Icon } from "./Icon";
-function summarize(rows: BoardWakeRow[]): { text: string; attention: boolean } {
+// Summary buckets → plural-aware catalog keys ("1 review", "2 reviews", …).
+const WAKE_COUNT_KEYS: Record<string, string> = {
+ review: "board.wake_review",
+ blocked: "board.wake_blocked",
+ canceled: "board.wake_canceled",
+ move: "board.wake_move",
+ filing: "board.wake_filing",
+ claim: "board.wake_claim",
+ assignment: "board.wake_assignment",
+ comment: "board.wake_comment",
+ chat: "board.wake_chat_message",
+};
+
+function summarize(t: TFunction, rows: BoardWakeRow[]): { text: string; attention: boolean } {
const counts: Record<string, number> = {};
const bump = (key: string) => (counts[key] = (counts[key] || 0) + 1);
for (const row of rows) {
@@ -20,34 +35,35 @@ function summarize(rows: BoardWakeRow[]): { text: string; attention: boolean } {
else if (row.kind === "claimed") bump("claim");
else if (row.kind === "assigned") bump("assignment");
else if (row.kind === "comment") bump("comment");
- else if (row.kind === "chat") bump("chat message");
+ else if (row.kind === "chat") bump("chat");
}
- const parts = Object.entries(counts).map(
- ([label, n]) => `${n} ${label}${n === 1 ? "" : "s"}`
+ const parts = Object.entries(counts).map(([bucket, n]) =>
+ t(WAKE_COUNT_KEYS[bucket], { count: n })
);
// reviews/blocked demand a decision — those tint the collapsed line amber
const attention = (counts.review || 0) + (counts.blocked || 0) > 0;
- return { text: parts.join(", ") || "update", attention };
+ return { text: parts.join(", ") || t("board.wake_update"), attention };
}
-function rowText(row: BoardWakeRow): string {
+function rowText(t: TFunction, row: BoardWakeRow): string {
const item = row.item != null ? `#${row.item}` : "";
const title = row.title ? ` ${row.title}` : "";
+ const ref = `${item}${title}`;
switch (row.kind) {
case "moved":
- return `${item}${title} → ${row.to} by ${row.actor}`;
+ return t("board.wake_moved", { ref, to: row.to, actor: row.actor });
case "filed":
- return `${row.actor} filed ${item}${title}`;
+ return t("board.wake_filed", { ref, actor: row.actor });
case "claimed":
- return `${row.actor} claimed ${item}${title}`;
+ return t("board.wake_claimed", { ref, actor: row.actor });
case "assigned":
- return `${item}${title} assigned to you`;
+ return t("board.wake_assigned", { ref });
case "comment":
- return `${row.actor} commented on ${item}${title}`;
+ return t("board.wake_commented", { ref, actor: row.actor });
case "chat":
- return `# team chat — ${row.actor}`;
+ return t("board.wake_chat", { actor: row.actor });
default:
- return `${item}${title}`;
+ return ref;
}
}
@@ -60,10 +76,11 @@ function stateDot(row: BoardWakeRow): string {
}
export function BoardWakeCard({ source }: { source: MessageSource }) {
+ const { t } = useTranslation();
const [open, setOpen] = useState(false);
const [openNotes, setOpenNotes] = useState<Record<number, boolean>>({});
const rows = source.board?.rows || [];
- const { text, attention } = summarize(rows);
+ const { text, attention } = summarize(t, rows);
return (
<div
className={"boardwake" + (attention ? " attention" : "")}
@@ -76,7 +93,7 @@ export function BoardWakeCard({ source }: { source: MessageSource }) {
aria-expanded={open}
>
<Icon name="table" size={14} />
- <span className="boardwake-title">Board wake</span>
+ <span className="boardwake-title">{t("board.wake_title")}</span>
<span className="boardwake-summary">{text}</span>
<span className="spacer" />
<span className={"boardwake-chevron" + (open ? " open" : "")}>
@@ -89,7 +106,7 @@ export function BoardWakeCard({ source }: { source: MessageSource }) {
<div className="boardwake-row" key={i}>
<span className={stateDot(row)} />
<span className="boardwake-row-main">
- <span className="boardwake-row-text">{rowText(row)}</span>
+ <span className="boardwake-row-text">{rowText(t, row)}</span>
{row.note &&
(openNotes[i] ? (
<span className="boardwake-note">{row.note}</span>
@@ -99,8 +116,8 @@ export function BoardWakeCard({ source }: { source: MessageSource }) {
onClick={() => setOpenNotes((s) => ({ ...s, [i]: true }))}
>
{row.kind === "chat" || row.kind === "comment"
- ? "show message"
- : "show hand-off"}
+ ? t("board.wake_show_message")
+ : t("board.wake_show_handoff")}
</button>
))}
</span>
diff --git a/surfaces/gui/src/components/Composer.tsx b/surfaces/gui/src/components/Composer.tsx
index c57d46f9..5e4b0e1b 100644
--- a/surfaces/gui/src/components/Composer.tsx
+++ b/surfaces/gui/src/components/Composer.tsx
@@ -1,4 +1,5 @@
import { useEffect, useLayoutEffect, useRef, useState, type ReactNode } from "react";
+import { getI18n, useTranslation } from "react-i18next";
import type { Attachment, SessionUsage } from "../types";
import { isPdfFile, readFile } from "../attach";
import { ProjectBindMenu } from "./ProjectBindMenu";
@@ -31,23 +32,22 @@ type ModeOption = Option & { caution?: boolean; gated?: boolean };
// "auto" is the legacy wire value for Bypass approvals (server: Mode.BYPASS_APPROVALS).
// Auto-approve is `gated`: shown only when getSettings().auto_approve is true (the feature
-// flag, off by default). Copy (owner, 2026-08-22): imperative like the sibling entries;
-// "your session model" carries the who-judges fact inline; per-check cost is logged, not
-// picker text.
+// flag, off by default).
+// Labels/descriptions are i18n keys (resolved at render via t()); kept as keys here so the
+// module-level constant stays outside the component without losing translation.
const PERMISSION_OPTIONS: ModeOption[] = [
- { value: "discuss", label: "Discuss", description: "Chat and explore — no edits or commands" },
- { value: "interactive", label: "Ask for approval", description: "Ask before edits and commands" },
+ { value: "discuss", label: "composer.mode.discuss", description: "composer.mode.discuss_desc" },
+ { value: "interactive", label: "composer.mode.interactive", description: "composer.mode.interactive_desc" },
{
value: "auto-approve",
- label: "Auto-approve",
- description:
- "Let your session model classify actions and handle approvals, prompting you for anything it's unsure about",
+ label: "composer.mode.auto_approve",
+ description: "composer.mode.auto_approve_desc",
gated: true,
},
{
value: "auto",
- label: "Bypass approvals",
- description: "Run everything without asking — approvals off",
+ label: "composer.mode.auto",
+ description: "composer.mode.auto_desc",
caution: true,
},
];
@@ -55,7 +55,8 @@ const PERMISSION_OPTIONS: ModeOption[] = [
/** The picker's label for a mode value ("auto-approve" -> "Auto-approve"). Exported so the
* transcript's mode markers read the same names the user just chose from. */
export function modeLabel(value: string): string {
- return PERMISSION_OPTIONS.find((o) => o.value === value)?.label || value;
+ const option = PERMISSION_OPTIONS.find((o) => o.value === value);
+ return option ? getI18n().t(option.label) : value;
}
// No hardcoded model fallback: until the server supplies the list (a few seconds after a
@@ -135,6 +136,7 @@ interface Props {
}
export function Composer(props: Props) {
+ const { t } = useTranslation();
const [text, setText] = useState("");
const [attachments, setAttachments] = useState<Attachment[]>([]);
// "/" force-run (SKILLS-SPEC §4.1 #3). The popup derives from the draft: it is open while
@@ -338,7 +340,7 @@ export function Composer(props: Props) {
for (const file of list) {
if (isPdfFile(file) && file.size > maxMb * 1024 * 1024) {
showAttachNotice(
- `${file.name} skipped — ${(file.size / 1024 / 1024).toFixed(1)} MB is over your ${maxMb} MB limit (Settings → Token savings)`,
+ t("composer.pdf_too_big", { name: file.name, mb: (file.size / 1024 / 1024).toFixed(1), limit: maxMb }),
);
continue;
}
@@ -351,12 +353,12 @@ export function Composer(props: Props) {
const info = await inspectPdf(a.data_url).catch(() => null);
if (info?.ok && (info.pages ?? 0) > maxPages) {
showAttachNotice(
- `${a.name} skipped — ${info.pages} pages is over your ${maxPages}-page limit (Settings → Token savings)`,
+ t("composer.pdf_too_many_pages", { name: a.name, pages: info.pages, limit: maxPages }),
);
continue;
}
if (info && !info.ok) {
- showAttachNotice(`${a.name} skipped — ${info.error || "could not read PDF"}`);
+ showAttachNotice(t("composer.pdf_unreadable", { name: a.name, error: info.error || t("composer.pdf_could_not_read") }));
continue;
}
}
@@ -380,11 +382,11 @@ export function Composer(props: Props) {
// While the "/" popup is open the draft is a query, not a message — never send it.
if (slashQuery !== null) return;
// The visible "/name " prefix is UI state, not message text — strip it for the send;
- // the skill rides as its own field.
+ // the skill rides as its own field. (Named `body`, not `t`, so it can't shadow i18n's t.)
const skill = prefixIntact ? pendingSkill!.name : undefined;
- const t = (skill ? text.slice(skill.length + 1) : text).trim();
+ const body = (skill ? text.slice(skill.length + 1) : text).trim();
if (
- (!t && attachments.length === 0 && !skill) ||
+ (!body && attachments.length === 0 && !skill) ||
(props.running && !props.gateOpen) ||
dictation?.recording ||
dictationBusy
@@ -395,7 +397,7 @@ export function Composer(props: Props) {
props.onConnectModel?.();
return;
}
- props.onSend(t, attachments, skill);
+ props.onSend(body, attachments, skill);
setText("");
setAttachments([]);
setPendingSkill(null);
@@ -447,9 +449,9 @@ export function Composer(props: Props) {
setDictationError(null);
try {
if (dictation?.recording) {
- setDictationBusy("Transcribing…");
+ setDictationBusy(t("composer.starting_transcribe"));
const transcript = await stopDictation();
- if (transcript === null) throw new Error("Could not transcribe your recording.");
+ if (transcript === null) throw new Error(t("composer.err_transcribe"));
if (transcript.trim()) {
setText((draft) => (draft.trim() ? `${draft.trimEnd()} ${transcript.trim()}` : transcript.trim()));
}
@@ -459,17 +461,17 @@ export function Composer(props: Props) {
}
const status = dictation || (await getDictationStatus());
- if (!status) throw new Error("Voice dictation is unavailable.");
+ if (!status) throw new Error(t("composer.err_dictation_unavailable"));
if (!status.supported || !status.model_verified || !status.test_passed) {
props.onConfigureVoiceInput?.();
return;
}
- setDictationBusy("Starting microphone…");
+ setDictationBusy(t("composer.starting_mic"));
const recording = await startDictation();
- if (!recording?.recording) throw new Error("Could not start the microphone.");
+ if (!recording?.recording) throw new Error(t("composer.err_mic_start"));
setDictation(recording);
} catch (error) {
- setDictationError(error instanceof Error ? error.message : "Voice dictation is unavailable.");
+ setDictationError(error instanceof Error ? error.message : t("composer.err_dictation_unavailable"));
const status = await getDictationStatus();
if (status) setDictation(status);
} finally {
@@ -514,7 +516,7 @@ export function Composer(props: Props) {
<button
className="shrink-0 opacity-60 hover:opacity-100"
onClick={() => setAttachNotice(null)}
- title="Dismiss"
+ title={t("common.dismiss")}
>
✕
</button>
@@ -582,8 +584,8 @@ export function Composer(props: Props) {
className="w-full block px-3.5 pt-3.5 pb-1.5 text-[14px]"
placeholder={
props.gateOpen
- ? "Reply to adjust the proposal — or use the buttons above"
- : props.placeholder || "Ask the coworker… (drop or paste files)"
+ ? t("composer.placeholder_gate")
+ : props.placeholder || t("composer.placeholder")
}
value={text}
onChange={(e) => setText(e.target.value)}
@@ -598,8 +600,8 @@ export function Composer(props: Props) {
<div className="relative">
<button
className={iconBtn + (attachMenuOpen ? " bg-paper text-ink" : "")}
- title="Attach"
- aria-label="Attach"
+ title={t("composer.attach")}
+ aria-label={t("composer.attach")}
onClick={() => setAttachMenuOpen((v) => !v)}
>
<Icon name="plus" size={17} />
@@ -616,24 +618,24 @@ export function Composer(props: Props) {
<div className="absolute z-40 bottom-full mb-1 left-0 min-w-[200px] rounded-xl border border-line bg-panel shadow-2xl py-1.5">
{sessionRows && (
<div className="px-3 pt-1 pb-0.5 text-[10.5px] font-semibold tracking-wide uppercase text-faint">
- This message
+ {t("composer.attach_this_message")}
</div>
)}
- {attachItem("image", "Photo or image", () => pickFiles("image/*"))}
+ {attachItem("image", t("composer.attach_image"), () => pickFiles("image/*"))}
{attachItem("file", "PDF", () => pickFiles("application/pdf,.pdf"))}
{attachItem(
"fileCode",
- "Other files",
+ t("composer.attach_other"),
() => pickFiles("text/*,.md,.csv,.json,.yaml,.yml,.log,.py,.ts,.tsx,.js,.rs,.go,.toml"),
)}
{sessionRows && (
<>
<div className="my-1 border-t border-line" />
<div className="px-3 pt-0.5 pb-0.5 text-[10.5px] font-semibold tracking-wide uppercase text-faint">
- This session
+ {t("composer.attach_this_session")}
</div>
- {bindRow("book", "Project memory", "memory")}
- {bindRow("table", "Board", "board")}
+ {bindRow("book", t("composer.bind_memory"), "memory")}
+ {bindRow("table", t("composer.bind_board"), "board")}
</>
)}
</div>
@@ -685,7 +687,7 @@ export function Composer(props: Props) {
/>
) : null}
- {dictationBusy === "Transcribing…" && <span className="text-[12px] text-accent">Transcribing…</span>}
+ {dictationBusy === t("composer.starting_transcribe") && <span className="text-[12px] text-accent">{dictationBusy}</span>}
<span className="ml-auto" />
@@ -709,10 +711,10 @@ export function Composer(props: Props) {
<button
className="pill model-warn chip"
onClick={() => props.onConnectModel?.()}
- title="Connect a model"
- aria-label="No model connected — connect a model"
+ title={t("composer.model.connect")}
+ aria-label={t("composer.model.none_aria")}
>
- <span className="pill-label">No model</span>
+ <span className="pill-label">{t("composer.model.none")}</span>
<span className="model-warn-ico" aria-hidden>⚠</span>
</button>
) : modelsLoaded ? (
@@ -722,9 +724,9 @@ export function Composer(props: Props) {
className="pill chip text-faint cursor-default"
disabled
data-testid="models-loading"
- title="Fetching the model list from the server"
+ title={t("composer.model.loading_title")}
>
- <span className="pill-label">Loading models…</span>
+ <span className="pill-label">{t("composer.model.loading")}</span>
</button>
))}
@@ -742,12 +744,12 @@ export function Composer(props: Props) {
title={
dictationBusy ||
(dictation?.recording
- ? "Stop recording and transcribe"
+ ? t("composer.voice.stop_transcribe")
: voiceReady
- ? "Start local voice dictation"
- : "Configure Voice Input in Settings")
+ ? t("composer.voice.start_dictation")
+ : t("composer.voice.configure"))
}
- aria-label={dictation?.recording ? "Stop dictation" : voiceReady ? "Start dictation" : "Configure Voice Input in Settings"}
+ aria-label={dictation?.recording ? t("composer.voice.stop_dictation") : voiceReady ? t("composer.voice.start_dictation_btn") : t("composer.voice.configure")}
aria-disabled={!voiceReady && !dictation?.recording}
>
<Icon name={dictation?.recording ? "stop" : "mic"} size={16} />
@@ -757,7 +759,7 @@ export function Composer(props: Props) {
{/* send / stop — a pending gate re-opens Send: the reply resolves it */}
{props.running && !props.gateOpen ? (
<button className="btn danger" onClick={props.onInterrupt}>
- ⏹ Stop
+ {t("composer.stop")}
</button>
) : (
<button
@@ -769,8 +771,8 @@ export function Composer(props: Props) {
}
onClick={submit}
disabled={!props.connected || !!dictation?.recording || !!dictationBusy}
- title={needsModel ? "Connect a model to send" : undefined}
- aria-label="Send"
+ title={needsModel ? t("composer.connect_to_send") : undefined}
+ aria-label={t("common.send")}
>
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
<path d="M12 19V5M5 12l7-7 7 7" />
@@ -780,7 +782,7 @@ export function Composer(props: Props) {
</div>
</div>
<span className="sr-only" role="status" aria-live="polite">
- {dictation?.recording ? `Listening, ${recordingTime}` : dictationBusy || ""}
+ {dictation?.recording ? t("composer.listening_sr", { time: recordingTime }) : dictationBusy || ""}
</span>
</div>
);
@@ -947,6 +949,7 @@ function ModeMenu({
onUnattendedChange?: (on: boolean) => void;
reviewerPaused?: boolean;
}) {
+ const { t } = useTranslation();
const [open, setOpen] = useState(false);
// The Auto-Approve entry is gated on the server flag. Fetch once on first open; a session
// already IN auto-approve mode always shows its own entry so the current mode is legible
@@ -972,18 +975,16 @@ function ModeMenu({
onClick={() => setOpen((v) => !v)}
aria-haspopup="menu"
aria-expanded={open}
- aria-label="Mode"
+ aria-label={t("composer.mode_label")}
title={
- `Mode: ${current?.label || mode}` +
- (reviewerPaused && mode === "auto-approve"
- ? " · paused for this turn — the reviewer blocked several actions in a row, approvals come to you"
- : "") +
- (unattended ? " · approvals go to the Inbox" : "")
+ `${t("composer.mode_label")}: ${current ? t(current.label) : mode}` +
+ (reviewerPaused && mode === "auto-approve" ? " · " + t("composer.reviewer_paused_tip") : "") +
+ (unattended ? " · " + t("composer.approvals_to_inbox") : "")
}
>
- {current?.label || mode}
+ {current ? t(current.label) : mode}
{reviewerPaused && mode === "auto-approve" && (
- <span className="text-[11px] text-warnInk" data-testid="mode-paused">· paused</span>
+ <span className="text-[11px] text-warnInk" data-testid="mode-paused">· {t("composer.paused")}</span>
)}
<Icon name="chevronDown" size={11} className="text-faint" />
</button>
@@ -1013,10 +1014,10 @@ function ModeMenu({
{o.caution && (
<Icon name="warning" size={13} className="mr-1.5 shrink-0 text-warnInk" />
)}
- {o.label}
+ {t(o.label)}
{o.value === mode && <span className="ml-1.5">✓</span>}
</span>
- <span className="text-[11px] text-faint leading-snug">{o.description}</span>
+ <span className="text-[11px] text-faint leading-snug">{t(o.description ?? "")}</span>
</button>
))}
{onUnattendedChange && (
@@ -1024,15 +1025,15 @@ function ModeMenu({
<div className="my-1 border-t border-line" />
<div className="flex items-center gap-2 px-2.5 py-1.5">
<span className="flex-1 min-w-0">
- <span className="block text-[13px] text-ink">Send approvals to Inbox</span>
+ <span className="block text-[13px] text-ink">{t("composer.approvals_to_inbox")}</span>
<span className="block text-[11px] text-faint leading-snug">
- Approvals &amp; questions go to the Inbox; the agent keeps working.
+ {t("composer.approvals_to_inbox_help")}
</span>
</span>
<Toggle
checked={!!unattended}
onChange={onUnattendedChange}
- title="Send approvals to the Inbox"
+ title={t("composer.send_approvals_to_inbox")}
/>
</div>
</>
@@ -1057,6 +1058,7 @@ function attachItem(icon: "image" | "file" | "fileCode", label: string, onClick:
}
function AttachChip({ a, onRemove }: { a: Attachment; onRemove: () => void }) {
+ const { t } = useTranslation();
return (
<div className={"attach-chip" + (a.kind === "image" ? " img" : "")}>
{a.kind === "image" ? (
@@ -1067,7 +1069,7 @@ function AttachChip({ a, onRemove }: { a: Attachment; onRemove: () => void }) {
<span className="attach-name">{a.name}</span>
</>
)}
- <button className="attach-x" onClick={onRemove} title="Remove">
+ <button className="attach-x" onClick={onRemove} title={t("common.remove")}>
✕
</button>
</div>
diff --git a/surfaces/gui/src/components/ConnectorMessageCard.tsx b/surfaces/gui/src/components/ConnectorMessageCard.tsx
index 909952fa..2d2d961d 100644
--- a/surfaces/gui/src/components/ConnectorMessageCard.tsx
+++ b/surfaces/gui/src/components/ConnectorMessageCard.tsx
@@ -14,23 +14,24 @@
// for keyboard focus too; the ids are also mirrored into the header `title` for quick reference.
import { useState, type CSSProperties } from "react";
+import { useTranslation } from "react-i18next";
import type { MessageSource } from "../api";
import { ConnectorBadge, hexToRgba, NEUTRAL } from "../connectors/ConnectorIcon";
import { resolveConnector } from "../connectors/registry";
/** Coarse relative time from epoch seconds: "just now" / "5m ago" / "2h ago" / "3d ago" / a date. */
-function relativeTime(tsSeconds: number): string {
+function relativeTime(tsSeconds: number, t: (key: string, opts?: any) => string): string {
if (!tsSeconds || !isFinite(tsSeconds)) return "";
const then = tsSeconds * 1000;
const diff = Date.now() - then;
- if (diff < 0) return "just now";
- if (diff < 45_000) return "just now";
+ if (diff < 0) return t("inbox.rel_just_now");
+ if (diff < 45_000) return t("inbox.rel_just_now");
const mins = Math.round(diff / 60_000);
- if (mins < 60) return `${mins}m ago`;
+ if (mins < 60) return t("inbox.rel_minutes_ago", { count: mins });
const hrs = Math.round(diff / 3_600_000);
- if (hrs < 24) return `${hrs}h ago`;
+ if (hrs < 24) return t("inbox.rel_hours_ago", { count: hrs });
const days = Math.round(diff / 86_400_000);
- if (days < 7) return `${days}d ago`;
+ if (days < 7) return t("inbox.rel_days_ago", { count: days });
return new Date(then).toLocaleDateString();
}
@@ -48,6 +49,7 @@ export function ConnectorMessageCard({
brandColor?: string;
}) {
const [showIds, setShowIds] = useState(false);
+ const { t } = useTranslation();
const { key, entry } = resolveConnector(source.connector);
const color = (brandColor || "").trim() || NEUTRAL;
const soft = hexToRgba(color, 0.12) || "var(--line)";
@@ -85,11 +87,11 @@ export function ConnectorMessageCard({
</span>
<span className="text-faint">·</span>
<span className="text-[13px] font-medium">{source.sender_name}</span>
- <span className="text-[11px] text-faint ml-0.5">via {entry.label}</span>
+ <span className="text-[11px] text-faint ml-0.5">{t("inbox.connector_via", { label: entry.label })}</span>
</>
)}
<time className="ml-auto text-[11px] text-faint whitespace-nowrap" title={clockTime(source.ts)}>
- {relativeTime(source.ts)}
+ {relativeTime(source.ts, t)}
</time>
</header>
<div className="px-3.5 py-2.5 text-[14px] leading-relaxed whitespace-pre-wrap">{source.text}</div>
diff --git a/surfaces/gui/src/components/DirectoryRequestCard.tsx b/surfaces/gui/src/components/DirectoryRequestCard.tsx
index 6df4f3d6..0b6eff71 100644
--- a/surfaces/gui/src/components/DirectoryRequestCard.tsx
+++ b/surfaces/gui/src/components/DirectoryRequestCard.tsx
@@ -1,4 +1,5 @@
import { useState } from "react";
+import { useTranslation } from "react-i18next";
import type { Item } from "../types";
import { chooseFolder } from "../tauri";
import { Icon } from "./Icon";
@@ -16,6 +17,7 @@ export function DirectoryRequestCard({
}) {
const [path, setPath] = useState(item.path || "");
const [writable, setWritable] = useState(!!item.writable);
+ const { t } = useTranslation();
const browse = async () => {
const picked = await chooseFolder();
@@ -28,25 +30,24 @@ export function DirectoryRequestCard({
<Icon name="folderPlus" size={16} className="ico" />
<span>
{item.primary
- ? "The agent asks to make a folder this session's workspace"
- : "The agent is requesting access to a folder"}
+ ? t("dirreq.requesting_workspace")
+ : t("dirreq.requesting_access")}
</span>
</div>
{item.reason && <div className="dirreq-reason">“{item.reason}”</div>}
{item.primary && (
<div className="dirreq-reason">
- Granting makes this folder the session's primary working directory (read-write);
- the scratch directory stays available for temporary files and artifacts.
+ {t("dirreq.primary_note")}
</div>
)}
<div className="dirreq-pathrow">
<input
className="dirreq-path"
- placeholder="Choose or paste a folder path…"
+ placeholder={t("dirreq.path_placeholder")}
value={path}
onChange={(e) => setPath(e.target.value)}
/>
- <button className="btn icon-only" onClick={browse} title="Choose location" aria-label="Choose location">
+ <button className="btn icon-only" onClick={browse} title={t("dirreq.choose_location")} aria-label={t("dirreq.choose_location")}>
<Icon name="folder" size={15} />
</button>
</div>
@@ -54,19 +55,19 @@ export function DirectoryRequestCard({
{!item.primary && (
<label className="dirreq-access">
<input type="checkbox" checked={writable} onChange={(e) => setWritable(e.target.checked)} />
- Allow writing (read-write)
+ {t("dirreq.allow_writing")}
</label>
)}
<span className="spacer" />
<button className="btn" onClick={() => onRespond(false)}>
- Decline
+ {t("dirreq.decline")}
</button>
<button
className="btn primary"
disabled={!path.trim()}
onClick={() => onRespond(true, path.trim(), item.primary ? true : writable)}
>
- {item.primary ? "Make workspace" : "Grant access"}
+ {item.primary ? t("dirreq.make_workspace") : t("dirreq.grant_access")}
</button>
</div>
</div>
diff --git a/surfaces/gui/src/components/GalleryModal.tsx b/surfaces/gui/src/components/GalleryModal.tsx
index 541371be..e42c87eb 100644
--- a/surfaces/gui/src/components/GalleryModal.tsx
+++ b/surfaces/gui/src/components/GalleryModal.tsx
@@ -1,4 +1,5 @@
import { useEffect, useState } from "react";
+import { useTranslation } from "react-i18next";
import {
cloudLogin,
getCloudGallery,
@@ -52,6 +53,7 @@ export function GalleryModal({
onClose: () => void;
onInstalled?: () => void;
}) {
+ const { t } = useTranslation();
const [cloud, setCloud] = useState<CloudStatus | null>(null);
const [cards, setCards] = useState<GalleryPersona[]>([]);
const [installed, setInstalled] = useState<Set<string>>(new Set());
@@ -112,7 +114,7 @@ export function GalleryModal({
setMsg(null);
setJustInstalled(false);
const d = await getCloudGalleryDetail(slug).catch(() => null);
- setDetail(d ?? { ok: false, error: "could not load details" });
+ setDetail(d ?? { ok: false, error: t("gallery.could_not_load") });
};
const install = async (slug: string) => {
@@ -121,7 +123,7 @@ export function GalleryModal({
const r = await installPersona({ gallery_slug: slug });
setBusy(false);
if (!r.ok) {
- setMsg(r.error || "install failed");
+ setMsg(r.error || t("gallery.install_failed"));
return;
}
setInstalled((s) => new Set(s).add(slug));
@@ -143,9 +145,9 @@ export function GalleryModal({
<div className="flex items-center gap-2 mb-4">
{(
[
- ["all", "All"],
- ["openworker", "From OpenWorker"],
- ["team", "From your team"],
+ ["all", t("gallery.filter_all")],
+ ["openworker", t("gallery.filter_brand")],
+ ["team", t("gallery.filter_team")],
] as [Source, string][]
).map(([key, label]) => (
<button
@@ -165,14 +167,14 @@ export function GalleryModal({
{unavailable && cloud?.signed_in && (
<div className="text-[13px] text-muted">
- The gallery is unreachable right now — try again in a moment.
+ {t("gallery.unreachable")}
</div>
)}
{featured.length > 0 && (
<>
<div className="text-[11px] uppercase tracking-[0.05em] text-faint font-semibold mb-2">
- Featured
+ {t("gallery.featured")}
</div>
<div className="flex gap-3 overflow-x-auto hairline-scroll pb-2 mb-5" data-testid="gallery-featured">
{featured.map((p) => (
@@ -198,7 +200,7 @@ export function GalleryModal({
)}
<div className="text-[11px] uppercase tracking-[0.05em] text-faint font-semibold mb-2">
- All coworkers
+ {t("gallery.all_personas")}
</div>
<div className="space-y-2">
{visible.map((p) => {
@@ -215,7 +217,7 @@ export function GalleryModal({
<span className="font-semibold text-[13px]">{p.name}</span>
<span className={CHIP}>{p.family}</span>
<span className="text-[11px] text-faint">
- v{p.version} · {p.publisher}
+ {t("gallery.version_publisher", { version: p.version, publisher: p.publisher })}
</span>
</div>
<div className="text-[13px] text-muted mb-1.5">{p.tagline}</div>
@@ -229,9 +231,9 @@ export function GalleryModal({
</div>
<div className="shrink-0 flex items-center">
{isInstalled ? (
- <span className="text-[12px] text-muted">Installed</span>
+ <span className="text-[12px] text-muted">{t("gallery.installed")}</span>
) : (
- <span className="text-[13px] text-accent">View & install →</span>
+ <span className="text-[13px] text-accent">{t("gallery.view_install")}</span>
)}
</div>
</div>
@@ -240,17 +242,17 @@ export function GalleryModal({
{visible.length === 0 && !unavailable && (
<div className="text-[13px] text-muted py-4">
{source === "team"
- ? "Nothing shared with your team yet."
+ ? t("gallery.empty_team")
: q
- ? "No coworkers match your search."
- : "No coworkers published yet."}
+ ? t("gallery.empty_search")
+ : t("gallery.empty_none")}
</div>
)}
</div>
{source !== "team" && teamCount === 0 && (
<div className="mt-5 pt-3 border-t border-line text-[12px] text-faint" data-testid="gallery-team-teaser">
- From your team — nothing shared yet. Publishing a coworker to your teammates is coming soon.
+ {t("gallery.team_teaser")}
</div>
)}
</div>
@@ -264,12 +266,12 @@ export function GalleryModal({
className="text-[13px] text-muted hover:text-ink mb-3"
onClick={() => setDetailSlug(null)}
>
- ← Gallery
+ {t("gallery.back_to_gallery")}
</button>
{!detail ? (
- <div className="text-[13px] text-muted">Loading…</div>
+ <div className="text-[13px] text-muted">{t("gallery.loading")}</div>
) : !detail.ok || !card ? (
- <div className="text-[13px] text-danger">{detail.error || "could not load details"}</div>
+ <div className="text-[13px] text-danger">{detail.error || t("gallery.could_not_load")}</div>
) : (
<div className="space-y-4">
<div className="flex items-start gap-4">
@@ -280,15 +282,15 @@ export function GalleryModal({
</div>
<div className="text-[13px] text-muted">{card.tagline}</div>
<div className="text-[12px] text-faint mt-1">
- v{card.version} · {card.publisher} · {card.risk_summary}
+ {t("gallery.detail_meta", { version: card.version, publisher: card.publisher, risk: card.risk_summary })}
</div>
</div>
<div className="shrink-0">
{installed.has(detailSlug) ? (
- <span className="text-[13px] text-muted">Installed</span>
+ <span className="text-[13px] text-muted">{t("gallery.installed")}</span>
) : (
<button className={BTN_ACCENT} onClick={() => install(detailSlug)} disabled={busy}>
- {busy ? "Installing…" : "Install"}
+ {busy ? t("gallery.installing") : t("gallery.install")}
</button>
)}
</div>
@@ -298,10 +300,10 @@ export function GalleryModal({
{justInstalled && (
<div className="rounded-lg border border-okLine bg-okSoft px-3.5 py-2.5 flex items-center gap-3">
<span className="flex-1 text-[13px] text-ok">
- Installed — it&rsquo;s waiting in Personas, disabled until you approve and enable it.
+ {t("gallery.installed_waiting")}
</span>
<button className={BTN_ACCENT} onClick={onClose}>
- Done
+ {t("gallery.done")}
</button>
</div>
)}
@@ -317,44 +319,42 @@ export function GalleryModal({
{caps && (
<div className={CARD + " p-4"} data-testid="gallery-capabilities">
<div className="text-[13px] font-semibold mb-2">
- What it can do — verified from its manifest
+ {t("gallery.capabilities_title")}
</div>
<div className="text-[12px] text-faint mb-3">
- Read by this app&rsquo;s own parser, so it matches exactly what the install
- consent will ask you to approve. No executable code is installed.
+ {t("gallery.capabilities_desc")}
</div>
<div className="space-y-2 text-[13px]">
<div>
- <span className="text-muted">Tools: </span>
- {caps.tools.join(", ") || "none"}
+ <span className="text-muted">{t("gallery.tools_label")}</span>
+ {caps.tools.join(", ") || t("gallery.none")}
{caps.risk.length > 0 && (
- <span className="text-faint"> · risk: {caps.risk.join(", ")}</span>
+ <span className="text-faint"> {t("gallery.risk_suffix", { risk: caps.risk.join(", ") })}</span>
)}
</div>
<div>
- <span className="text-muted">Permissions: </span>
- {caps.recommended_mode} mode
- {caps.messaging ? " · can use messaging" : ""}
- {caps.mcp.length > 0 ? ` · MCP: ${caps.mcp.join(", ")}` : ""}
+ <span className="text-muted">{t("gallery.permissions_label")}</span>
+ {t("gallery.mode_suffix", { mode: caps.recommended_mode })}
+ {caps.messaging ? ` · ${t("gallery.can_message")}` : ""}
+ {caps.mcp.length > 0 ? ` · ${t("gallery.mcp_suffix", { mcp: caps.mcp.join(", ") })}` : ""}
</div>
{(detail.recommends?.length ?? 0) > 0 && (
<div>
- <div className="text-muted mb-1.5">Works with these connections:</div>
+ <div className="text-muted mb-1.5">{t("gallery.works_with")}</div>
<div className="space-y-1.5">
{detail.recommends!.map((r) => (
<div key={r.kind + r.ref} className="flex items-baseline gap-2">
<span className={CHIP + " inline-flex items-center gap-1 shrink-0"}>
<BrandIcon name={r.ref} size={12} />
{r.ref}
- {r.tier === "core" ? " · core" : ""}
+ {r.tier === "core" ? ` · ${t("gallery.core_tag")}` : ""}
</span>
<span className="text-[12px] text-faint">{r.reason}</span>
</div>
))}
</div>
<div className="text-[12px] text-faint mt-2">
- You connect these yourself (one click when signed in) — installing the
- coworker grants it nothing until you do.
+ {t("gallery.connect_yourself_note")}
</div>
</div>
)}
@@ -372,23 +372,23 @@ export function GalleryModal({
<div className="absolute left-1/2 top-[6vh] -translate-x-1/2 w-[720px] max-w-[94vw] max-h-[88vh] rounded-xl2 border border-line bg-panel shadow-2xl overflow-hidden flex flex-col">
<div className="px-5 pt-4 pb-3 border-b border-line flex items-center gap-3 shrink-0">
<div className="min-w-0 flex-1">
- <div className="text-[14px] font-semibold">Coworker Gallery</div>
+ <div className="text-[14px] font-semibold">{t("gallery.title")}</div>
<div className="text-[12px] text-muted">
- Curated coworkers · installs stay disabled until you approve them
+ {t("gallery.subtitle")}
</div>
</div>
{cloud?.signed_in && !detailSlug && (
<input
value={query}
onChange={(e) => setQuery(e.target.value)}
- placeholder="Search coworkers"
+ placeholder={t("gallery.search_placeholder")}
className="w-[180px] px-3 py-1.5 rounded-lg border border-line bg-paper text-[13px] text-ink outline-none focus:border-accent"
/>
)}
<button
className="text-faint hover:text-ink shrink-0"
onClick={onClose}
- aria-label="Close gallery"
+ aria-label={t("gallery.close_aria")}
data-testid="gallery-close"
>
<Icon name="x" size={16} />
@@ -398,7 +398,7 @@ export function GalleryModal({
<div className="overflow-y-auto hairline-scroll p-5">
{loading ? (
<div className="space-y-2" data-testid="gallery-loading" aria-busy="true">
- <div className="text-[13px] text-muted mb-3">Loading the gallery…</div>
+ <div className="text-[13px] text-muted mb-3">{t("gallery.loading_gallery")}</div>
{[0, 1, 2].map((i) => (
<div key={i} className={CARD + " p-3.5 animate-pulse"}>
<div className="h-3.5 w-44 rounded bg-line mb-2.5" />
@@ -409,15 +409,13 @@ export function GalleryModal({
) : cloud && !cloud.signed_in ? (
<div className={CARD + " p-5 flex items-center gap-4"} data-testid="gallery-signin">
<div className="min-w-0 flex-1">
- <div className="font-semibold text-[14px] mb-1">Sign in to browse the Gallery</div>
+ <div className="font-semibold text-[14px] mb-1">{t("gallery.signin_title")}</div>
<div className="text-[13px] text-muted leading-relaxed">
- The Gallery is a curated set of coworkers from OpenWorker Cloud and needs a
- (free) cloud sign-in. Installing personas from a folder or Git URL — on the
- Personas page — always works without an account.
+ {t("gallery.signin_desc")}
</div>
</div>
<button className={BTN_ACCENT} onClick={signIn} disabled={signingIn}>
- {signingIn ? "Check your browser…" : "Sign in"}
+ {signingIn ? t("gallery.check_browser") : t("gallery.sign_in")}
</button>
</div>
) : detailSlug ? (
diff --git a/surfaces/gui/src/components/InboxConfigure.tsx b/surfaces/gui/src/components/InboxConfigure.tsx
index 072600a9..7ef0bdf6 100644
--- a/surfaces/gui/src/components/InboxConfigure.tsx
+++ b/surfaces/gui/src/components/InboxConfigure.tsx
@@ -1,4 +1,5 @@
import { useEffect, useState } from "react";
+import { useTranslation } from "react-i18next";
import {
getConnectors,
getDmRoute,
@@ -30,6 +31,7 @@ const SELECT = "px-2.5 py-1.5 rounded-lg border border-line bg-paper text-[13px]
const BTN_ACCENT_SM = "text-[12px] px-2.5 py-1 rounded-md bg-accent text-white disabled:opacity-50";
export function InboxConfigure() {
+ const { t } = useTranslation();
return (
<div data-testid="inbox-configure">
<div className="grid grid-cols-2 gap-4 mb-4">
@@ -40,10 +42,9 @@ export function InboxConfigure() {
{/* Unrouted = delivery FAILURES ("messages that never reached you"), so it lives with
the Inbox now (§28; previously with routing under Connectors, §26). */}
<div className="mt-6" data-testid="unrouted-section">
- <h3 className="text-[14px] font-semibold mb-1">Unrouted</h3>
+ <h3 className="text-[14px] font-semibold mb-1">{t("inbox.unrouted_title")}</h3>
<p className="text-[13px] text-muted mb-3">
- Inbound messages and background-turn failures nothing claimed — nothing vanishes
- silently.
+ {t("inbox.unrouted_sub")}
</p>
<UnroutedTable />
</div>
@@ -59,6 +60,7 @@ function InboxRoutingCard() {
const [target, setTarget] = useState(""); // current default-binding address, e.g. "slack:C0123"
const [draft, setDraft] = useState("");
const [error, setError] = useState<string | null>(null);
+ const { t: tt } = useTranslation();
const load = () => {
getRecentChannels().then(setRecent).catch(() => setRecent([]));
@@ -83,7 +85,7 @@ function InboxRoutingCard() {
const [platform, id] = addr.includes(":") ? addr.split(":", 2) : ["slack", addr];
const result = await setInboxBinding("default", platform, id);
if (!result.ok) {
- setError(result.error || "Could not update Inbox routing.");
+ setError(result.error || tt("inbox.routing_update_failed"));
return;
}
setError(null);
@@ -93,7 +95,7 @@ function InboxRoutingCard() {
const clear = async () => {
const result = await setInboxBinding("default", null, "");
if (!result.ok) {
- setError(result.error || "Could not clear Inbox routing.");
+ setError(result.error || tt("inbox.routing_clear_failed"));
return;
}
setError(null);
@@ -123,13 +125,13 @@ function InboxRoutingCard() {
return (
<div className={CARD + " p-4"} data-testid="inbox-mirror-card">
- <div className="font-semibold text-[13px] mb-1">Unattended approvals</div>
+ <div className="font-semibold text-[13px] mb-1">{tt("inbox.unattended_approvals")}</div>
<p className="text-[12px] text-muted mb-3">
- Channel where an Unattended session posts Approve/Deny buttons. Currently mirroring to{" "}
+ {tt("inbox.mirror_desc_prefix")}{" "}
<strong className="text-ink font-medium" title={target || undefined}>
- {known ? `#${known}` : target || "in-app Inbox only"}
+ {known ? `#${known}` : target || tt("inbox.in_app_inbox_only")}
</strong>
- .
+ {tt("inbox.mirror_desc_suffix")}
</p>
<div className="flex items-center gap-2 flex-wrap">
<span className="text-muted shrink-0">
@@ -141,17 +143,17 @@ function InboxRoutingCard() {
disabled={!draft.trim() || missingSlackOwner}
onClick={save}
>
- Set
+ {tt("inbox.set")}
</button>
{target && (
<button className="text-[12px] text-danger/80 hover:text-danger" onClick={clear}>
- clear
+ {tt("inbox.clear")}
</button>
)}
</div>
{missingSlackOwner && (
<p className="text-[12px] text-warnInk mt-2">
- Choose an approval owner under Integrations → Slack before routing approvals here.
+ {tt("inbox.missing_slack_owner")}
</p>
)}
{error && <p className="text-[12px] text-warnInk mt-2">{error}</p>}
@@ -163,6 +165,7 @@ function InboxRoutingCard() {
function DmRouteCard() {
const [sessions, setSessions] = useState<SessionInfo[]>([]);
const [dm, setDm] = useState<string>("");
+ const { t: tt } = useTranslation();
const load = () => {
getSessions().then(setSessions).catch(() => setSessions([]));
@@ -183,16 +186,16 @@ function DmRouteCard() {
return (
<div className={CARD + " p-4"}>
- <div className="font-semibold text-[13px] mb-1">Direct messages</div>
+ <div className="font-semibold text-[13px] mb-1">{tt("inbox.direct_messages")}</div>
<p className="text-[12px] text-muted mb-3">
- Session that handles DMs to the bot. With none, DMs park under Unrouted below.
+ {tt("inbox.dm_desc")}
</p>
<div className="flex items-center gap-2">
<span className="text-muted shrink-0">
<Icon name="chat" size={16} />
</span>
<select className={"flex-1 " + SELECT} value={dm} onChange={(e) => choose(e.target.value)}>
- <option value="">No session — park DMs</option>
+ <option value="">{tt("inbox.dm_no_session")}</option>
{real.map((s) => (
<option key={s.session_id} value={s.session_id}>
{s.title || s.session_id}
@@ -212,6 +215,7 @@ function SubscriptionsCard() {
const [recent, setRecent] = useState<RecentChannel[]>([]);
const [addSession, setAddSession] = useState("");
const [addChannel, setAddChannel] = useState("");
+ const { t: tt } = useTranslation();
const load = () => {
getSubscriptions().then(setSubs).catch(() => setSubs([]));
@@ -242,17 +246,17 @@ function SubscriptionsCard() {
<span className="text-muted shrink-0">
<Icon name="plug" size={15} />
</span>
- <span className="font-semibold text-[13px]">Channel subscriptions</span>
- <span className="text-[12px] text-muted">— sessions that listen to a channel (inbound)</span>
+ <span className="font-semibold text-[13px]">{tt("inbox.channel_subscriptions")}</span>
+ <span className="text-[12px] text-muted">{tt("inbox.subscriptions_sub")}</span>
</div>
{subs && subs.length > 0 ? (
<table className="w-full text-[13px]">
<thead className="text-[11px] uppercase tracking-[0.04em] text-faint">
<tr className="text-left">
- <th className="font-medium px-4 py-2">Session</th>
- <th className="font-medium px-4 py-2">Listens to</th>
- <th className="font-medium px-4 py-2">Inbox routes to</th>
+ <th className="font-medium px-4 py-2">{tt("inbox.col_session")}</th>
+ <th className="font-medium px-4 py-2">{tt("inbox.col_listens_to")}</th>
+ <th className="font-medium px-4 py-2">{tt("inbox.col_inbox_routes_to")}</th>
<th className="px-4 py-2" />
</tr>
</thead>
@@ -275,9 +279,9 @@ function SubscriptionsCard() {
{s.collision && (
<span
className="ml-1.5 text-[11px] text-warnInk bg-warnSoft/70 border border-warnInk/15 rounded px-1.5 py-0.5"
- title="This channel is also your Inbox-routing target — inbound and outbound on one channel conflate broadcast with request/reply."
+ title={tt("inbox.collision_title")}
>
- ⚠ collides
+ {tt("inbox.collides")}
</span>
)}
</td>
@@ -285,7 +289,7 @@ function SubscriptionsCard() {
<td className="px-4 py-2.5 text-right">
<button
className="text-faint hover:text-danger"
- title="Unsubscribe"
+ title={tt("inbox.unsubscribe")}
onClick={() => remove(s.session_id, s.channel)}
>
×
@@ -297,7 +301,7 @@ function SubscriptionsCard() {
</table>
) : (
<div className="px-4 py-3 text-[13px] text-muted">
- No channel subscriptions yet — add one below or ask a coworker to watch a channel.
+ {tt("inbox.no_subscriptions")}
</div>
)}
@@ -307,7 +311,7 @@ function SubscriptionsCard() {
value={addSession}
onChange={(e) => setAddSession(e.target.value)}
>
- <option value="">Choose a session…</option>
+ <option value="">{tt("inbox.choose_session")}</option>
{real.map((s) => (
<option key={s.session_id} value={s.session_id}>
{s.title || s.session_id}
@@ -316,7 +320,7 @@ function SubscriptionsCard() {
</select>
<ChannelPicker value={addChannel} onChange={setAddChannel} recent={recent} onSubmit={add} />
<button className={BTN_ACCENT_SM} disabled={!addSession || !addChannel.trim()} onClick={add}>
- + Subscribe
+ {tt("inbox.subscribe")}
</button>
</div>
</div>
@@ -327,6 +331,7 @@ function SubscriptionsCard() {
// and background turns that failed (e.g. a dead model). Read-only — for visibility/debugging.
function UnroutedTable() {
const [items, setItems] = useState<UnroutedItem[] | null>(null);
+ const { t: tt } = useTranslation();
useEffect(() => {
const load = () => getUnrouted().then(setItems).catch(() => setItems([]));
@@ -338,7 +343,7 @@ function UnroutedTable() {
if (items && items.length === 0)
return (
<div className={CARD + " p-4 text-[13px] text-muted"}>
- Nothing here — no dropped messages or failed turns.
+ {tt("inbox.unrouted_empty")}
</div>
);
@@ -347,10 +352,10 @@ function UnroutedTable() {
<table className="w-full text-[13px]">
<thead className="text-[11px] uppercase tracking-[0.04em] text-faint">
<tr className="text-left">
- <th className="font-medium px-4 py-2">When</th>
- <th className="font-medium px-4 py-2">Source</th>
- <th className="font-medium px-4 py-2">Reason</th>
- <th className="font-medium px-4 py-2">Message</th>
+ <th className="font-medium px-4 py-2">{tt("inbox.col_when")}</th>
+ <th className="font-medium px-4 py-2">{tt("inbox.col_source")}</th>
+ <th className="font-medium px-4 py-2">{tt("inbox.col_reason")}</th>
+ <th className="font-medium px-4 py-2">{tt("inbox.col_message")}</th>
</tr>
</thead>
<tbody>
diff --git a/surfaces/gui/src/components/InboxItemCard.tsx b/surfaces/gui/src/components/InboxItemCard.tsx
index 005357b5..f5bc18df 100644
--- a/surfaces/gui/src/components/InboxItemCard.tsx
+++ b/surfaces/gui/src/components/InboxItemCard.tsx
@@ -1,4 +1,5 @@
import { useState, type ReactNode } from "react";
+import { useTranslation } from "react-i18next";
import type { InboxItem } from "../api";
import type { QuestionOption } from "../types";
import { humanizeApprovalTitle } from "../humanize";
@@ -90,6 +91,7 @@ function specsFor(item: InboxItem): QSpec[] {
// -- one question (options + free-text escape) --------------------------------
function QuestionBlock({ spec, onAnswer }: { spec: QSpec; onAnswer: (a: string) => void }) {
+ const { t } = useTranslation();
const [selected, setSelected] = useState<string[]>([]);
const [text, setText] = useState("");
const [hoverIdx, setHoverIdx] = useState<number | null>(null);
@@ -112,7 +114,7 @@ function QuestionBlock({ spec, onAnswer }: { spec: QSpec; onAnswer: (a: string)
const recommendedTag = (
<span className="text-[11px] uppercase tracking-[0.04em] font-semibold text-ok bg-okSoft border border-okLine rounded-full px-1.5 py-px shrink-0">
- Recommended
+ {t("inbox.recommended")}
</span>
);
@@ -189,7 +191,7 @@ function QuestionBlock({ spec, onAnswer }: { spec: QSpec; onAnswer: (a: string)
disabled={!selected.length}
onClick={() => onAnswer(selected.join(", "))}
>
- Send{selected.length ? ` (${selected.length})` : ""}
+ {selected.length ? t("inbox.send_count", { count: selected.length }) : t("common.send")}
</button>
</div>
)}
@@ -197,7 +199,7 @@ function QuestionBlock({ spec, onAnswer }: { spec: QSpec; onAnswer: (a: string)
<div className="flex items-center gap-2 mt-2.5">
<input
className={INPUT}
- placeholder={options.length ? "Or type your own answer…" : "Your answer…"}
+ placeholder={options.length ? t("inbox.or_type_answer") : t("inbox.your_answer")}
value={text}
onChange={(e) => setText(e.target.value)}
onKeyDown={(e) => {
@@ -205,7 +207,7 @@ function QuestionBlock({ spec, onAnswer }: { spec: QSpec; onAnswer: (a: string)
}}
/>
<button className={BTN_PRIMARY} disabled={!text.trim()} onClick={() => onAnswer(text)}>
- Send
+ {t("common.send")}
</button>
</div>
)}
@@ -224,6 +226,7 @@ function QuestionCard({
onResolve: (id: string, resolution: string) => void;
chip?: ReactNode;
}) {
+ const { t } = useTranslation();
const specs = specsFor(item);
const grouped = (item.questions?.length ?? 0) > 0;
const [step, setStep] = useState(0);
@@ -252,26 +255,25 @@ function QuestionCard({
{grouped && step > 0 && (
<button
className="text-faint hover:text-ink leading-none text-[13px]"
- title="Previous question"
- aria-label="Previous question"
+ title={t("inbox.previous_question")}
+ aria-label={t("inbox.previous_question")}
onClick={() => setStep(step - 1)}
>
‹
</button>
)}
<span className={grouped ? "text-accent" : undefined}>
- {spec.header || (grouped ? `Question ${step + 1}` : "question")}
+ {spec.header ||
+ (grouped ? t("inbox.question_n", { n: step + 1 }) : t("inbox.question_label"))}
</span>
{grouped && (
<>
<span>·</span>
- <span>
- {step + 1} of {specs.length}
- </span>
+ <span>{t("inbox.step_of", { step: step + 1, total: specs.length })}</span>
{next && (
<>
<span>·</span>
- <span>{(next.header || `Question ${step + 2}`) + " ›"}</span>
+ <span>{(next.header || t("inbox.question_n", { n: step + 2 })) + " ›"}</span>
</>
)}
</>
@@ -299,6 +301,7 @@ export function InboxItemCard({
chip?: ReactNode; // optional "go to session" affordance (shown in the Inbox list, not inline)
compact?: boolean;
}) {
+ const { t } = useTranslation();
const isQuestion = item.kind === "question";
return (
<div
@@ -346,7 +349,7 @@ export function InboxItemCard({
className={item.data?.tool ? BTN_ACCENT : BTN_PRIMARY}
onClick={() => onResolve(item.id, "allow")}
>
- {item.data?.tool ? approvalActionLabels(item.data.tool).allow : "Approve"}
+ {item.data?.tool ? approvalActionLabels(item.data.tool).allow : t("inbox.approve")}
</button>
{/* Task-persistent standing grant (§25) — present only when the approval was
raised inside an automation run AND the call can carry a tool+target rule.
@@ -354,17 +357,20 @@ export function InboxItemCard({
{item.data?.task_id && item.data?.standing_target && (
<button
className={BTN_BORDERED}
- title={`Always allow against ${item.data.standing_target} for “${item.data.task_title || "this automation"}” — revoke any time on its Automations page`}
+ title={t("inbox.always_task_title", {
+ target: item.data.standing_target,
+ task: item.data.task_title || t("approval.btn.this_automation"),
+ })}
onClick={() => onResolve(item.id, "always_task")}
>
- Allow every time
+ {t("approval.btn.allow_every_time")}
</button>
)}
<button
className={item.data?.tool ? BTN_QUIET : BTN_BORDERED}
onClick={() => onResolve(item.id, "deny")}
>
- {item.data?.tool ? approvalActionLabels(item.data.tool).deny : "Deny"}
+ {item.data?.tool ? approvalActionLabels(item.data.tool).deny : t("approval.deny")}
</button>
</div>
) : isQuestion ? (
@@ -374,7 +380,7 @@ export function InboxItemCard({
<button
className={BTN_PRIMARY}
disabled={!item.data?.path}
- title={item.data?.path || "No folder was suggested"}
+ title={item.data?.path || t("inbox.no_folder_suggested")}
onClick={() =>
onResolve(
item.id,
@@ -388,12 +394,12 @@ export function InboxItemCard({
>
{item.data?.path
? item.data?.primary
- ? "Make workspace"
- : "Grant"
- : "Grant (no folder)"}
+ ? t("inbox.make_workspace")
+ : t("inbox.grant")
+ : t("inbox.grant_no_folder")}
</button>
<button className={BTN_BORDERED} onClick={() => onResolve(item.id, JSON.stringify({ granted: false }))}>
- Deny
+ {t("approval.deny")}
</button>
</div>
) : item.kind === "plan" ? (
@@ -402,19 +408,19 @@ export function InboxItemCard({
className={BTN_PRIMARY}
onClick={() => onResolve(item.id, JSON.stringify({ approved: true, mode: "interactive" }))}
>
- Approve
+ {t("inbox.approve")}
</button>
<button
className={BTN_BORDERED}
onClick={() => onResolve(item.id, JSON.stringify({ approved: false, feedback: "" }))}
>
- Reject
+ {t("inbox.reject")}
</button>
</div>
) : (
<div className="flex items-center gap-2 mt-2.5">
<button className={BTN_BORDERED} onClick={() => onResolve(item.id, "seen")}>
- Dismiss
+ {t("inbox.dismiss")}
</button>
</div>
)}
diff --git a/surfaces/gui/src/components/IntegrationsView.tsx b/surfaces/gui/src/components/IntegrationsView.tsx
index 202bec29..6d4dacae 100644
--- a/surfaces/gui/src/components/IntegrationsView.tsx
+++ b/surfaces/gui/src/components/IntegrationsView.tsx
@@ -1,4 +1,5 @@
import { useEffect, useState } from "react";
+import { useTranslation } from "react-i18next";
import { getConnectors } from "../api";
import { ConnectorsSection } from "./connectors/ConnectorsSection";
import { Icon } from "./Icon";
@@ -11,6 +12,7 @@ import { Icon } from "./Icon";
// Activity is the audit log, reached from the account menu.
export function IntegrationsView() {
+ const { t: tt } = useTranslation();
// Sub-nav count: how many connectors exist. Polled so the badge stays live.
const [connCount, setConnCount] = useState<number | null>(null);
@@ -27,11 +29,11 @@ export function IntegrationsView() {
<main className="flex-1 min-w-0 flex bg-paper">
<nav className="page-subnav w-[208px] shrink-0 border-r border-line bg-panel/40 px-3 py-4">
<div className="px-2 text-[13px] font-semibold mb-3 flex items-center gap-2">
- <Icon name="plug" size={16} /> Connectors
+ <Icon name="plug" size={16} /> {tt("integrations.nav_title")}
</div>
<button className="w-full text-left px-2.5 py-2 rounded-lg text-[13px] flex items-center justify-between bg-paper text-accent font-medium">
<span className="flex items-center gap-2 min-w-0">
- <Icon name="plug" size={15} /> Connectors
+ <Icon name="plug" size={15} /> {tt("integrations.tab_connectors")}
</span>
{connCount != null && (
<span className="text-[11px] shrink-0 text-accent">{connCount}</span>
@@ -43,8 +45,8 @@ export function IntegrationsView() {
<div className="max-w-4xl mx-auto px-7 py-6">
<section>
<PanelHead
- title="Connectors"
- sub="Apps and tools your coworkers can use. Connected ones come first."
+ title={tt("integrations.connectors_title")}
+ sub={tt("integrations.connectors_sub")}
/>
<ConnectorsSection />
</section>
diff --git a/surfaces/gui/src/components/ManageTabs.tsx b/surfaces/gui/src/components/ManageTabs.tsx
index 614dafe0..abd28450 100644
--- a/surfaces/gui/src/components/ManageTabs.tsx
+++ b/surfaces/gui/src/components/ManageTabs.tsx
@@ -1,4 +1,5 @@
import { useEffect, useState } from "react";
+import { getI18n, useTranslation } from "react-i18next";
import {
allowUser,
connectConnector,
@@ -25,13 +26,14 @@ import { ProviderCards, ProviderForm, useProviderSetup } from "../providers/Prov
// "2h ago"-style label for the providers' Last-used line (null when never used).
const relTime = (epoch?: number | null): string | null => {
if (!epoch) return null;
+ const t = getI18n().getFixedT(null, "translation");
const secs = Math.max(0, Math.floor(Date.now() / 1000 - epoch));
- if (secs < 90) return "just now";
+ if (secs < 90) return t("manage.reltime_just_now");
const mins = Math.floor(secs / 60);
- if (mins < 60) return `${mins}m ago`;
+ if (mins < 60) return t("manage.reltime_min", { n: mins });
const hrs = Math.floor(mins / 60);
- if (hrs < 48) return `${hrs}h ago`;
- return `${Math.floor(hrs / 24)}d ago`;
+ if (hrs < 48) return t("manage.reltime_hour", { n: hrs });
+ return t("manage.reltime_day", { n: Math.floor(hrs / 24) });
};
// Shared tab bodies for the Settings and Integrations pages (the old top-tab ManageModal was retired
@@ -56,6 +58,7 @@ function initials(name: string): string {
// key…" affordance, the global composer-picker card (gallery view), and the
// per-provider ModelChecklist / read-only model preview (form view).
export function ModelsTab() {
+ const { t } = useTranslation();
const [settings, setSettings] = useState<ModelSettings | null>(null);
const refreshSettings = () => getSettings().then(setSettings).catch(() => setSettings(null));
const ps = useProviderSetup({ onSaved: refreshSettings });
@@ -63,7 +66,7 @@ export function ModelsTab() {
refreshSettings();
}, []);
- if (!settings) return <div className="text-[13px] text-muted">Loading…</div>;
+ if (!settings) return <div className="text-[13px] text-muted">{t("manage.loading")}</div>;
const info = ps.info;
const knownNames = ps.providers.map((p) => p.name);
@@ -88,10 +91,10 @@ export function ModelsTab() {
className="text-[13px] text-danger/80 hover:text-danger hover:underline underline-offset-2"
data-testid="set-remove-key"
onClick={() => {
- if (window.confirm(`Remove the ${info?.title} key from this computer?`)) ps.removeKey();
+ if (window.confirm(t("manage.remove_key_confirm", { title: info?.title || "" }))) ps.removeKey();
}}
>
- Remove key…
+ {t("manage.remove_key")}
</button>
) : null
}
@@ -99,17 +102,15 @@ export function ModelsTab() {
{ps.sel === "openai" && settings.source === "env" && (
<p className="text-[12px] text-muted mt-3 leading-relaxed">
- A key is set via <code>OPENAI_API_KEY</code> in this server's environment. You can override
- it above; the stored key is used only when the environment variable is absent.
+ {t("manage.openai_env_help")}
</p>
)}
{info?.configured ? (
<div className="mt-6">
- <div className={SEC_H + " mb-1.5"}>Models</div>
+ <div className={SEC_H + " mb-1.5"}>{t("manage.models")}</div>
<p className="text-[12px] text-muted mb-2.5 leading-relaxed">
- Ticked models show in the composer's picker; the black badge marks the default for new
- sessions.
+ {t("manage.models_help")}
</p>
<ModelChecklist
provider={ps.sel}
@@ -126,9 +127,9 @@ export function ModelsTab() {
// key unlocks is part of deciding to get one at all (owner ask, 2026-07-04).
(info?.suggested_models?.length || 0) > 0 && (
<div className="mt-6" data-testid="model-preview">
- <div className={SEC_H + " mb-1.5"}>Included models</div>
+ <div className={SEC_H + " mb-1.5"}>{t("manage.included_models")}</div>
<p className="text-[12px] text-muted mb-2.5 leading-relaxed">
- Curated, agent-capable models this provider serves — add your key above to enable them.
+ {t("manage.included_models_help")}
</p>
<div className="space-y-1">
{(info?.suggested_models || []).map((m) => {
@@ -163,6 +164,7 @@ function ComposerPickerCard({
providers: ProviderInfo[];
onChanged: () => void;
}) {
+ const { t } = useTranslation();
const names = providers.map((p) => p.name);
const provOf = (id: string) => {
const i = id.indexOf(":");
@@ -174,10 +176,9 @@ function ComposerPickerCard({
};
return (
<div className="mt-6" data-testid="composer-picker">
- <div className={SEC_H + " mb-1.5"}>In the composer's picker</div>
+ <div className={SEC_H + " mb-1.5"}>{t("manage.composer_picker_title")}</div>
<p className="text-[12px] text-muted mb-2.5 leading-relaxed">
- The models offered when starting a session; the black badge marks the default. Add more
- from a provider's card above.
+ {t("manage.composer_picker_help")}
</p>
<div className="mlist">
{settings.models.map((id) => {
@@ -189,7 +190,7 @@ function ComposerPickerCard({
type="checkbox"
checked
disabled={isDefault}
- title={isDefault ? "The default model is always shown — make another model default first" : "Remove from the picker"}
+ title={isDefault ? t("models.default_locked") : t("manage.remove_from_picker")}
onChange={() => removeModel(id).then((r) => r.ok && onChanged())}
/>
<span className="mlist-name" title={id}>
@@ -198,10 +199,10 @@ function ComposerPickerCard({
</label>
<span className="text-[11px] text-faint mr-2 shrink-0">{tag(id)}</span>
{isDefault ? (
- <span className="mlist-default">default</span>
+ <span className="mlist-default">{t("models.default_badge")}</span>
) : (
<button className="mlist-make" onClick={() => setDefaultModel(id).then(() => onChanged())}>
- Make default
+ {t("models.make_default")}
</button>
)}
</div>
@@ -232,6 +233,7 @@ export function UnauthorizedBlock({
onChanged: () => void;
teamId?: string;
}) {
+ const { t } = useTranslation();
const items = (c.unauthorized ?? []).filter(
(m) => teamId === undefined || m.team_id === teamId,
);
@@ -246,14 +248,14 @@ export function UnauthorizedBlock({
data-testid={teamId ? `unauthorized-${c.name}-${teamId}` : `unauthorized-${c.name}`}
>
<div className={SEC_H + " mb-2"}>
- Messages from senders you haven't allowed · {items.length}
+ {t("manage.parked_title", { n: items.length })}
</div>
<div className="space-y-2">
{items.map((m) => (
<div key={m.id} className="rounded-xl border border-line bg-paper p-2.5">
<div className="flex items-center gap-2 text-[12px] text-muted">
<span className="font-medium text-ink">{m.user_name || m.user_id}</span>
- <span>in {m.chat_name || m.chat_id}</span>
+ <span>{t("manage.parked_in", { chat: m.chat_name || m.chat_id })}</span>
<span className="ml-auto shrink-0">{relTime(m.ts) || ""}</span>
</div>
<div className="text-[13px] mt-1 break-words">{m.text}</div>
@@ -261,26 +263,26 @@ export function UnauthorizedBlock({
<button
className="text-[12px] px-2 py-1 rounded-md bg-accent text-white"
data-testid={`parked-allow-deliver-${m.id}`}
- title="Add the sender to the allow-list and deliver this message now"
+ title={t("manage.parked_allow_deliver_tip")}
onClick={() => act(m.id, "allow_deliver")}
>
- Allow & deliver
+ {t("manage.parked_allow_deliver")}
</button>
<button
className={BTN_BORDERED}
data-testid={`parked-allow-${m.id}`}
- title="Add the sender to the allow-list; this message is discarded"
+ title={t("manage.parked_allow_tip")}
onClick={() => act(m.id, "allow")}
>
- Allow only
+ {t("manage.parked_allow_only")}
</button>
<button
className="text-[12px] px-2 py-1 rounded-md text-faint hover:text-danger"
data-testid={`parked-dismiss-${m.id}`}
- title="Throw this message away"
+ title={t("manage.parked_dismiss_tip")}
onClick={() => act(m.id, "dismiss")}
>
- Dismiss
+ {t("manage.parked_dismiss")}
</button>
</div>
</div>
@@ -294,6 +296,7 @@ export function UnauthorizedBlock({
// Channel-subscriptions table (Integrations ▸ Messaging routing). Subscribing happens from a
// session's Sources ▸ Channels panel; here the owner can see and revoke.
export function ListeningSessionsBlock({ c }: { c: Connector }) {
+ const { t } = useTranslation();
const [subs, setSubs] = useState<Subscription[] | null>(null);
const load = () => getSubscriptions().then(setSubs).catch(() => setSubs([]));
useEffect(() => {
@@ -304,10 +307,10 @@ export function ListeningSessionsBlock({ c }: { c: Connector }) {
const mine = (subs ?? []).filter((s) => platformOf(s.channel) === c.name);
return (
<div className="border-t border-line px-3.5 py-3" data-testid={`listening-${c.name}`}>
- <div className={SEC_H + " mb-2"}>Sessions listening to {c.title} channels · {mine.length}</div>
+ <div className={SEC_H + " mb-2"}>{t("manage.listening_title", { title: c.title, n: mine.length })}</div>
{mine.length === 0 ? (
<div className="text-[12px] text-faint">
- None yet — open a session's Sources ▸ Channels to subscribe it to a channel.
+ {t("manage.listening_empty")}
</div>
) : (
<div className="space-y-1.5">
@@ -322,7 +325,7 @@ export function ListeningSessionsBlock({ c }: { c: Connector }) {
</span>
<button
className="ml-auto text-faint hover:text-danger shrink-0"
- title="Unsubscribe this session"
+ title={t("manage.listening_unsub_tip")}
onClick={async () => {
await unsubscribeChannel(s.session_id, s.channel);
load();
@@ -355,6 +358,7 @@ export function AllowlistBlock({
allowed?: string[];
allowedNames?: Record<string, string | null>;
}) {
+ const { t } = useTranslation();
const allowedUsers = allowed ?? c.allowed_users;
const names = allowedNames ?? c.allowed_user_names;
const recent = (c.recent ?? []).filter(
@@ -365,16 +369,16 @@ export function AllowlistBlock({
return (
<div className="border-t border-line px-3.5 py-3 grid grid-cols-2 gap-5">
<div>
- <div className={SEC_H + " mb-2"}>Allowed to message</div>
+ <div className={SEC_H + " mb-2"}>{t("manage.allowed_to_message")}</div>
<div className="flex flex-wrap gap-1.5">
{allowedUsers.length === 0 && (
- <span className="text-[12px] text-faint">nobody yet — Allow a recent sender →</span>
+ <span className="text-[12px] text-faint">{t("manage.allowed_empty")}</span>
)}
{allowedUsers.map((u) => (
<span
key={u}
className="inline-flex items-center gap-1.5 pl-2 pr-1 py-1 rounded-full bg-paper border border-line text-[12px]"
- title={`id ${u}`}
+ title={t("manage.id_title", { id: u })}
>
<span className="w-4 h-4 rounded-full bg-accentSoft text-accent grid place-items-center text-[9px] font-bold">
{initials(names?.[u] || u)}
@@ -382,7 +386,7 @@ export function AllowlistBlock({
{names?.[u] || u}
<button
className="w-4 h-4 grid place-items-center text-faint hover:text-danger"
- title="remove"
+ title={t("common.remove")}
onClick={async () => {
await disallowUser(c.name, u, teamId);
onChanged();
@@ -395,9 +399,9 @@ export function AllowlistBlock({
</div>
</div>
<div>
- <div className={SEC_H + " mb-2"}>Recent senders</div>
+ <div className={SEC_H + " mb-2"}>{t("manage.recent_senders")}</div>
{unknownRecent.length === 0 ? (
- <div className="text-[12px] text-faint">None yet. Message the bot once and it'll show here.</div>
+ <div className="text-[12px] text-faint">{t("manage.recent_empty")}</div>
) : (
<div className="space-y-1.5">
{unknownRecent.map((r) => (
@@ -405,8 +409,8 @@ export function AllowlistBlock({
<span className="w-5 h-5 rounded-full bg-paper border border-line grid place-items-center text-[9px] font-bold text-muted shrink-0">
{initials(r.user_name || "?")}
</span>
- <span className="min-w-0 truncate" title={`id ${r.user_id}`}>
- {r.user_name || "unknown"} <span className="text-faint">· {r.chat_type}</span>
+ <span className="min-w-0 truncate" title={t("manage.id_title", { id: r.user_id })}>
+ {r.user_name || t("manage.unknown")} <span className="text-faint">· {r.chat_type}</span>
</span>
<button
className="ml-auto text-[12px] px-2 py-0.5 rounded-md bg-accent text-white shrink-0"
@@ -415,7 +419,7 @@ export function AllowlistBlock({
onChanged();
}}
>
- Allow
+ {t("approval.allow")}
</button>
</div>
))}
@@ -427,6 +431,7 @@ export function AllowlistBlock({
}
export function ConnectorTools({ c, onChanged }: { c: Connector; onChanged: () => void }) {
+ const { t } = useTranslation();
const toggle = async (toolName: string, enabled: boolean) => {
await updateConnectorTools(c.name, { [toolName]: enabled });
onChanged();
@@ -434,12 +439,12 @@ export function ConnectorTools({ c, onChanged }: { c: Connector; onChanged: () =
if (!c.tools?.length)
return (
<div className="border-t border-line px-3.5 py-3 text-[13px] text-muted">
- No tools for this connector yet.
+ {t("manage.connector_no_tools")}
</div>
);
return (
<div className="border-t border-line px-3.5 py-3">
- <div className={SEC_H + " mb-2"}>Tools exposed to OpenWorker</div>
+ <div className={SEC_H + " mb-2"}>{t("manage.tools_exposed")}</div>
<div className="space-y-1.5">
{c.tools.map((tool) => (
<label
@@ -455,7 +460,7 @@ export function ConnectorTools({ c, onChanged }: { c: Connector; onChanged: () =
<span className="min-w-0">
<span className="block text-[13px]">{tool.label}</span>
<span className="block text-[12px] text-faint">
- {tool.name} · {tool.kind} · asks approval
+ {t("manage.tool_asks_approval", { name: tool.name, kind: tool.kind })}
</span>
<span className="block text-[12px] text-faint">{tool.description}</span>
</span>
@@ -481,6 +486,7 @@ export function ConnectSetup({
// pill, so don't render the managed block again here.
manualOnly?: boolean;
}) {
+ const { t } = useTranslation();
const [values, setValues] = useState<Record<string, string>>({});
const [busy, setBusy] = useState(false);
const [waiting, setWaiting] = useState(false); // managed flow: browser is open
@@ -492,7 +498,7 @@ export function ConnectSetup({
const res = await connectConnector(c.name, values);
setBusy(false);
if (res.ok) onConnected();
- else setError(res.error || "could not connect");
+ else setError(res.error || t("manage.could_not_connect"));
};
const oneClick = async () => {
@@ -501,7 +507,7 @@ export function ConnectSetup({
// Completion arrives via the tab's poll: the broker form-POSTs the profile
// to the sidecar, the connector flips to connected, this card closes itself.
if (res.ok) setWaiting(true);
- else setError(res.error || "could not start managed connect");
+ else setError(res.error || t("manage.could_not_start_managed"));
};
const mcpOneClick = async () => {
@@ -510,7 +516,7 @@ export function ConnectSetup({
// Completion likewise arrives via the poll — the sidecar flips the connector
// to connected once the local OAuth flow lands.
if (res.ok) setWaiting(true);
- else setError(res.error || "could not start the connect");
+ else setError(res.error || t("manage.could_not_start_connect"));
};
return (
@@ -519,10 +525,10 @@ export function ConnectSetup({
/* MCP-backed one-click needs no cloud sign-in — the OAuth flow is local. */
<div className="space-y-2" data-testid="mcp-connect">
<button className={BTN_ACCENT} onClick={mcpOneClick} disabled={waiting}>
- {waiting ? "Check your browser…" : `Connect ${c.title} with one click`}
+ {waiting ? t("manage.check_browser") : t("manage.connect_one_click", { title: c.title })}
</button>
{c.fields.length > 0 && (
- <div className="text-[12px] text-faint">or connect manually:</div>
+ <div className="text-[12px] text-faint">{t("manage.or_connect_manually")}</div>
)}
</div>
)}
@@ -533,22 +539,22 @@ export function ConnectSetup({
// a visibly-parked button, and the manual path below stays fully live.
<>
<button className={BTN_ACCENT + " opacity-50"} disabled data-testid="managed-coming-soon">
- {`Connect ${c.title} with one click`}
+ {t("manage.connect_one_click", { title: c.title })}
<span className="ml-2 text-[11px] font-medium px-1.5 py-0.5 rounded-full bg-white/25">
- Coming soon
+ {t("manage.coming_soon")}
</span>
</button>
<div className="text-[12px] text-faint">
- One-click sign-in is coming soon — connect manually below for now:
+ {t("manage.one_click_coming")}
</div>
</>
) : cloud?.signed_in ? (
<button className={BTN_ACCENT} onClick={oneClick} disabled={waiting}>
- {waiting ? "Check your browser…" : `Connect ${c.title} with one click`}
+ {waiting ? t("manage.check_browser") : t("manage.connect_one_click", { title: c.title })}
</button>
) : cloud ? (
<CloudSignInInline
- blurb={`Sign-in unlocks the one-click ${c.title} connect — or connect manually below.`}
+ blurb={t("manage.signin_unlocks", { title: c.title })}
/>
) : (
// Status unknown (fetch pending/failed): never show the sign-in ask to a
@@ -556,7 +562,7 @@ export function ConnectSetup({
<CloudStatusPending />
)}
{!c.managed_paused && cloud?.signed_in && (
- <div className="text-[12px] text-faint">or connect manually:</div>
+ <div className="text-[12px] text-faint">{t("manage.or_connect_manually")}</div>
)}
</div>
)}
@@ -571,7 +577,7 @@ export function ConnectSetup({
<label className="conn-field" key={f.key}>
<span className="conn-field-label">
{f.label}
- {!f.required && <em> (optional)</em>}
+ {!f.required && <em> ({t("manage.optional")})</em>}
</span>
<input
type={f.secret ? "password" : "text"}
@@ -585,7 +591,7 @@ export function ConnectSetup({
))}
<div>
<button className={BTN_ACCENT} onClick={submit} disabled={busy}>
- {busy ? "Validating…" : "Connect"}
+ {busy ? t("manage.validating") : t("manage.connect")}
</button>
</div>
{error && <div className="text-[13px] text-danger">{error}</div>}
diff --git a/surfaces/gui/src/components/Markdown.tsx b/surfaces/gui/src/components/Markdown.tsx
index ea8efeb4..e27a6627 100644
--- a/surfaces/gui/src/components/Markdown.tsx
+++ b/surfaces/gui/src/components/Markdown.tsx
@@ -1,4 +1,5 @@
import ReactMarkdown, { defaultUrlTransform } from "react-markdown";
+import { useTranslation } from "react-i18next";
import remarkGfm from "remark-gfm";
import { Icon } from "./Icon";
@@ -29,6 +30,7 @@ function BoardChip({ label }: { label: string }) {
}
function ArtifactChip({ path, title }: { path: string; title: string }) {
+ const { t } = useTranslation();
const file = path.split("/").pop() || path;
return (
<button
@@ -46,7 +48,7 @@ function ArtifactChip({ path, title }: { path: string; title: string }) {
<b>{title || file}</b>
{title && title !== file && <span>{file}</span>}
</span>
- <span className="art-chip-open">Open ›</span>
+ <span className="art-chip-open">{t("rail.open")} ›</span>
</button>
);
}
diff --git a/surfaces/gui/src/components/MemorySection.tsx b/surfaces/gui/src/components/MemorySection.tsx
index 0abefc7c..81be9d32 100644
--- a/surfaces/gui/src/components/MemorySection.tsx
+++ b/surfaces/gui/src/components/MemorySection.tsx
@@ -1,4 +1,5 @@
import { useEffect, useState } from "react";
+import { useTranslation } from "react-i18next";
import {
deleteAllMemory,
deleteMemory,
@@ -25,6 +26,7 @@ const BTN_ACCENT =
"text-[13px] px-3 py-2 rounded-lg bg-accent text-white shrink-0 disabled:opacity-40";
export function MemorySection() {
+ const { t } = useTranslation();
const [settings, setSettings] = useState<MemorySettings | null>(null);
const [entries, setEntries] = useState<MemoryEntry[] | null>(null);
// State-change copy (§5.3): shown under the toggle / list after an action.
@@ -53,51 +55,30 @@ export function MemorySection() {
if (!settings) return;
const next = await setMemorySettings({ enabled: !settings.enabled });
setSettings(next);
- setToggleMsg(
- next.enabled
- ? "Details you share from future conversations will be remembered, so I can be more helpful over time."
- : "I'll stop remembering new things about you. What I already know is kept and still used — delete anything below you'd rather I forget.",
- );
+ setToggleMsg(next.enabled ? t("memory.on_msg") : t("memory.off_msg"));
};
const wipeAll = async () => {
- if (
- !window.confirm(
- "Delete everything that's been remembered about you?\n\n" +
- "This can't be undone. Conversations you already have open still know what " +
- "they knew — new conversations start with a clean slate.",
- )
- )
- return;
+ if (!window.confirm(t("memory.wipe_confirm"))) return;
await deleteAllMemory();
- setListMsg(
- "Everything I remembered has been deleted. New conversations start fresh; ones " +
- "you already have open still know what they knew when they started.",
- );
+ setListMsg(t("memory.wiped_msg"));
refresh();
};
if (!settings || entries === null)
- return <div className="text-[13px] text-muted">Loading…</div>;
+ return <div className="text-[13px] text-muted">{t("memory.loading")}</div>;
return (
<section>
- <PanelHead
- title="Memory"
- sub="Your coworkers can remember useful things about you between conversations. Everything they know is listed here."
- />
+ <PanelHead title={t("settings.tab.memory")} sub={t("memory.section_sub")} />
{/* On/off — one switch, no other setup (§5.4). */}
<div className={CARD + " p-4 mb-4"} data-testid="memory-toggle-card">
<div className="flex items-center gap-3">
- <Toggle checked={settings.enabled} onChange={toggleEnabled} title="Remember new things about you" />
+ <Toggle checked={settings.enabled} onChange={toggleEnabled} title={t("memory.toggle_title")} />
<div className="min-w-0 flex-1">
- <div className={FIELD_LABEL}>Remember new things about me</div>
- <div className="text-[12px] text-muted mt-0.5">
- Lasting preferences you mention in chat get saved and used in future conversations —
- you'll see a small note each time, with one-tap Undo. Turning this off stops new
- saves; anything already below is still used until you delete it.
- </div>
+ <div className={FIELD_LABEL}>{t("memory.toggle_label")}</div>
+ <div className="text-[12px] text-muted mt-0.5">{t("memory.toggle_help")}</div>
</div>
</div>
{toggleMsg && (
@@ -111,22 +92,18 @@ export function MemorySection() {
message ("what I already know is kept, delete it below") points here. */}
<div className={CARD + " p-4 mb-4"} data-testid="memory-list-card">
<div className="flex items-center gap-2">
- <div className={FIELD_LABEL + " flex-1"}>What I've learned about you</div>
+ <div className={FIELD_LABEL + " flex-1"}>{t("memory.learned_title")}</div>
{entries.length > 0 && (
<button
className="text-[12px] text-danger/80 hover:text-danger"
data-testid="memory-delete-all"
onClick={wipeAll}
>
- Forget everything…
+ {t("memory.forget_all")}
</button>
)}
</div>
- <div className={FIELD_HELP}>
- Saved automatically from your conversations. Fix anything that's wrong — or delete it.
- Edits and deletions apply to new conversations; ones you already have open keep what
- they knew when they started.
- </div>
+ <div className={FIELD_HELP}>{t("memory.learned_help")}</div>
{listMsg && (
<div className="text-[13px] text-muted mt-2.5" data-testid="memory-list-msg">
{listMsg}
@@ -135,8 +112,7 @@ export function MemorySection() {
{entries.length === 0 ? (
!listMsg && (
<div className="text-[12px] text-muted mt-3" data-testid="memory-empty">
- Nothing yet. When you mention a lasting preference in chat — or say "remember
- that…" — it will show up here.
+ {t("memory.empty")}
</div>
)
) : (
@@ -162,6 +138,7 @@ function UserRulesCard({
settings: MemorySettings;
onSaved: (s: MemorySettings) => void;
}) {
+ const { t } = useTranslation();
const [draft, setDraft] = useState(settings.user_rules);
const [savedMsg, setSavedMsg] = useState(false);
@@ -174,18 +151,13 @@ function UserRulesCard({
return (
<div className={CARD + " p-4"} data-testid="user-rules-card">
- <div className={FIELD_LABEL}>Your instructions</div>
- <div className={FIELD_HELP}>
- Your coworkers follow these in every conversation.
- </div>
+ <div className={FIELD_LABEL}>{t("memory.rules_title")}</div>
+ <div className={FIELD_HELP}>{t("memory.rules_help")}</div>
<textarea
value={draft}
onChange={(e) => setDraft(e.target.value)}
rows={4}
- placeholder={
- "I use a screen reader — no tables, describe any image\n" +
- "Use DD-MM-YYYY for dates"
- }
+ placeholder={t("memory.rules_placeholder")}
data-testid="user-rules-input"
className="w-full mt-2.5 px-3 py-2.5 rounded-lg border border-line bg-paper text-[13px] text-ink outline-none focus:border-accent resize-y leading-relaxed"
/>
@@ -196,13 +168,10 @@ function UserRulesCard({
disabled={draft === settings.user_rules}
data-testid="user-rules-save"
>
- Save
+ {t("memory.save")}
</button>
{savedMsg && (
- <span className="text-[13px] text-muted">
- Saved — applies to new conversations. Ones you already have open keep the
- instructions they started with.
- </span>
+ <span className="text-[13px] text-muted">{t("memory.rules_saved")}</span>
)}
</div>
</div>
@@ -210,6 +179,7 @@ function UserRulesCard({
}
function MemoryRow({ entry, onChanged }: { entry: MemoryEntry; onChanged: () => void }) {
+ const { t } = useTranslation();
const [editing, setEditing] = useState(false);
const [draft, setDraft] = useState(entry.content);
@@ -243,10 +213,10 @@ function MemoryRow({ entry, onChanged }: { entry: MemoryEntry; onChanged: () =>
/>
<div className="flex items-center gap-2.5 mt-1.5">
<button className={BTN_ACCENT} onClick={() => void save()}>
- Save
+ {t("memory.save")}
</button>
<button className="text-[13px] text-muted hover:text-ink" onClick={() => setEditing(false)}>
- cancel
+ {t("manage.cancel")}
</button>
</div>
</div>
@@ -257,7 +227,7 @@ function MemoryRow({ entry, onChanged }: { entry: MemoryEntry; onChanged: () =>
<div className="min-w-0 flex-1 text-[13px] leading-relaxed">{entry.content}</div>
<button
className="text-faint hover:text-ink shrink-0 mt-0.5"
- title="Fix this"
+ title={t("memory.fix_tip")}
data-testid={`memory-edit-btn-${entry.id}`}
onClick={() => {
setDraft(entry.content);
@@ -268,7 +238,7 @@ function MemoryRow({ entry, onChanged }: { entry: MemoryEntry; onChanged: () =>
</button>
<button
className="text-faint hover:text-danger shrink-0 mt-0.5"
- title="Delete this memory"
+ title={t("memory.delete_tip")}
data-testid={`memory-delete-${entry.id}`}
onClick={() => void remove()}
>
diff --git a/surfaces/gui/src/components/Onboarding.tsx b/surfaces/gui/src/components/Onboarding.tsx
index d0a98d7f..1154b7c0 100644
--- a/surfaces/gui/src/components/Onboarding.tsx
+++ b/surfaces/gui/src/components/Onboarding.tsx
@@ -1,4 +1,5 @@
import { useEffect, useState } from "react";
+import { useTranslation } from "react-i18next";
import {
cloudLogin,
connectManaged,
@@ -28,16 +29,17 @@ import { Spinner } from "./AutomationQuickstart";
// combined grayed "Coming soon" row — both ride the same Google app, gated on
// Google verification/CASA; give them rows when it lands.
const TOOL_ROWS = [
- { name: "outlook", benefit: "Stay on top of email", detail: "Outlook — triage mail, draft replies, run your calendar." },
- { name: "slack", benefit: "Keep up with Slack", detail: "Slack — catch up, answer mentions, post updates." },
- { name: "github", benefit: "Ship code", detail: "GitHub — review PRs, watch issues, reply to @mentions." },
- { name: "notion", benefit: "Keep your notes in reach", detail: "Notion — search pages, query databases, draft docs." },
- { name: "hubspot", benefit: "Keep the CRM current", detail: "HubSpot — update deals, log notes, prep calls." },
- { name: "attio", benefit: "Track every relationship", detail: "Attio — search records, read timelines, log notes." },
+ { name: "outlook", benefitKey: "onboarding.tool_outlook_benefit", detailKey: "onboarding.tool_outlook_detail" },
+ { name: "slack", benefitKey: "onboarding.tool_slack_benefit", detailKey: "onboarding.tool_slack_detail" },
+ { name: "github", benefitKey: "onboarding.tool_github_benefit", detailKey: "onboarding.tool_github_detail" },
+ { name: "notion", benefitKey: "onboarding.tool_notion_benefit", detailKey: "onboarding.tool_notion_detail" },
+ { name: "hubspot", benefitKey: "onboarding.tool_hubspot_benefit", detailKey: "onboarding.tool_hubspot_detail" },
+ { name: "attio", benefitKey: "onboarding.tool_attio_benefit", detailKey: "onboarding.tool_attio_detail" },
];
const TOOLS_SOON = ["gmail", "google_calendar"];
export function Onboarding({ onDone }: { onDone: (next?: "work" | "gallery" | "automations") => void }) {
+ const { t } = useTranslation();
const [step, setStep] = useState(0);
// -- step 1: model (provider gallery ⇄ key form, shared machinery) ---------------
@@ -122,10 +124,9 @@ export function Onboarding({ onDone }: { onDone: (next?: "work" | "gallery" | "a
{step === 0 && (
<section data-testid="ob-step-model" className="flex-1 min-h-0 flex flex-col">
{/* Persistent header — stays put while the region below swaps (§39). */}
- <h1 className="text-[20px] font-semibold">Welcome to OpenWorker<span className="beta-tag">BETA</span></h1>
+ <h1 className="text-[20px] font-semibold">{t("onboarding.welcome")}<span className="beta-tag">BETA</span></h1>
<p className="text-[13px] text-muted mt-0.5 mb-4">
- Pick a model provider to get started — OpenWorker runs on your own key, and your
- key and your data stay on this computer.
+ {t("onboarding.model_intro")}
</p>
{!ps.sel ? (
@@ -144,13 +145,13 @@ export function Onboarding({ onDone }: { onDone: (next?: "work" | "gallery" | "a
<div className="flex items-center gap-3 pt-5">
{!skipConfirm ? (
<button className="text-[13px] text-faint hover:text-muted" onClick={() => setSkipConfirm(true)}>
- Skip setup
+ {t("onboarding.skip_setup")}
</button>
) : (
<span className="text-[13px] text-muted">
- Nothing works without a model —{" "}
+ {t("onboarding.skip_warn_pref")}{" "}
<button className="text-accent" onClick={() => finish()}>
- skip anyway
+ {t("onboarding.skip_anyway")}
</button>
</span>
)}
@@ -160,11 +161,11 @@ export function Onboarding({ onDone }: { onDone: (next?: "work" | "gallery" | "a
onClick={advance}
data-testid="ob-continue"
>
- {ps.verify.state === "testing" ? "Checking…" : "Next"}
+ {ps.verify.state === "testing" ? t("onboarding.checking") : t("onboarding.next")}
</button>
</div>
<p className="text-[11px] text-faint mt-3">
- Models can be enabled or hidden anytime in Settings ▸ Models.
+ {t("onboarding.models_settings_hint")}
</p>
</section>
)}
@@ -176,13 +177,13 @@ export function Onboarding({ onDone }: { onDone: (next?: "work" | "gallery" | "a
slot keeps its place but flips to a green congrats, and every row grows a quiet
Connect pill. The gated Google pair is ONE combined grayed row. */
<section data-testid="ob-step-tools" className="flex-1 min-h-0 flex flex-col">
- <h1 className="text-[20px] font-semibold">Connect your everyday tools</h1>
+ <h1 className="text-[20px] font-semibold">{t("onboarding.connect_tools_title")}</h1>
<p className="text-[13px] text-muted mt-0.5 mb-3">
- Chat can only advise. Connected, your coworker does the actual work:
+ {t("onboarding.connect_tools_intro")}
</p>
<div className="flex-1 min-h-0 overflow-y-auto pr-1" data-testid="ob-tool-gallery">
- {TOOL_ROWS.map(({ name, benefit, detail }) => {
+ {TOOL_ROWS.map(({ name, benefitKey, detailKey }) => {
const c = connectors.find((x) => x.name === name);
if (!c) return null;
return (
@@ -193,20 +194,20 @@ export function Onboarding({ onDone }: { onDone: (next?: "work" | "gallery" | "a
>
<ConnectorBadge connector={c} size={34} title={c.title} />
<span className="min-w-0 flex-1">
- <span className="block text-[13px] font-semibold leading-tight">{benefit}</span>
- <span className="block text-[12px] text-muted truncate">{detail}</span>
+ <span className="block text-[13px] font-semibold leading-tight">{t(benefitKey)}</span>
+ <span className="block text-[12px] text-muted truncate">{t(detailKey)}</span>
</span>
{cloud?.signed_in &&
(c.connected ? (
- <span className="text-[12px] text-ok font-medium shrink-0">✓ Connected</span>
+ <span className="text-[12px] text-ok font-medium shrink-0">{t("onboarding.connected_ok")}</span>
) : pendingTool === name ? (
- <span className="text-[12px] text-muted shrink-0">Check your browser…</span>
+ <span className="text-[12px] text-muted shrink-0">{t("onboarding.check_browser")}</span>
) : (
<button
className="shrink-0 rounded-full border border-line px-4 py-1.5 text-[13px] font-medium hover:border-lineStrong"
onClick={() => startTool(name)}
>
- Connect
+ {t("onboarding.connect")}
</button>
))}
</div>
@@ -222,13 +223,13 @@ export function Onboarding({ onDone }: { onDone: (next?: "work" | "gallery" | "a
</span>
<span className="min-w-0 flex-1">
<span className="block text-[13px] font-semibold leading-tight text-faint">
- Gmail &amp; Google Calendar
+ {t("onboarding.google_pair_title")}
</span>
<span className="block text-[12px] text-faint truncate">
- Coming soon — pending Google&rsquo;s app verification.
+ {t("onboarding.google_pair_detail")}
</span>
</span>
- {cloud?.signed_in && <span className="text-[12px] text-faint shrink-0">Coming soon</span>}
+ {cloud?.signed_in && <span className="text-[12px] text-faint shrink-0">{t("onboarding.coming_soon")}</span>}
</div>
</div>
@@ -239,25 +240,24 @@ export function Onboarding({ onDone }: { onDone: (next?: "work" | "gallery" | "a
<div className="mt-3.5 rounded-xl border border-line bg-paper px-4 py-3 flex items-center gap-3.5 shrink-0">
<span className="flex-1 text-[13px] text-muted leading-snug">
<span className="block text-[13px] font-semibold text-ink mb-0.5">
- Sign in for one-click connections
+ {t("onboarding.signin_for_oneclick")}
</span>
- OpenWorker handles the OAuth for 20+ tools — no dev consoles, no pasted keys.
- Tokens stay on this computer.
+ {t("onboarding.signin_band_desc")}
</span>
{signinPhase ? (
<span className="inline-flex items-center gap-2 text-[13px] text-muted shrink-0">
<Spinner />
{signinPhase === "opening" ? (
- "Opening browser…"
+ t("onboarding.opening_browser")
) : (
<>
- Waiting…{" "}
+ {t("onboarding.waiting")}{" "}
<button
className="underline hover:text-ink"
onClick={() => setSigninPhase(null)}
data-testid="ob-signin-cancel"
>
- Cancel
+ {t("onboarding.cancel")}
</button>
</>
)}
@@ -272,7 +272,7 @@ export function Onboarding({ onDone }: { onDone: (next?: "work" | "gallery" | "a
}}
data-testid="ob-cloud-signin"
>
- Sign in
+ {t("onboarding.sign_in")}
</button>
)}
</div>
@@ -282,11 +282,10 @@ export function Onboarding({ onDone }: { onDone: (next?: "work" | "gallery" | "a
data-testid="ob-tools-signedin"
>
<span className="block text-[13px] font-semibold text-ok mb-0.5">
- 🎉 You&rsquo;re signed in{cloud.account ? ` as ${cloud.account}` : ""}
+ {t("onboarding.signed_in_as", { account: cloud.account ? ` ${cloud.account}` : "" })}
</span>
<span className="block text-[13px] text-muted">
- Connect a tool above with one click — or add them anytime later from the
- Connectors page.
+ {t("onboarding.signed_in_desc")}
</span>
</div>
)}
@@ -299,7 +298,7 @@ export function Onboarding({ onDone }: { onDone: (next?: "work" | "gallery" | "a
onClick={() => setStep(2)}
data-testid="ob-continue-tools"
>
- Next
+ {t("onboarding.next")}
</button>
) : (
<button
@@ -307,13 +306,12 @@ export function Onboarding({ onDone }: { onDone: (next?: "work" | "gallery" | "a
onClick={() => setStep(2)}
data-testid="ob-tools-skip"
>
- Continue without sign-in
+ {t("onboarding.continue_without_signin")}
</button>
)}
</div>
<p className="text-[11px] text-faint mt-3">
- 30+ more tools on the Connectors page — add or remove anytime. Tokens stay on
- this computer.
+ {t("onboarding.more_tools_hint")}
</p>
</section>
)}
@@ -324,8 +322,8 @@ export function Onboarding({ onDone }: { onDone: (next?: "work" | "gallery" | "a
<div className="w-12 h-12 rounded-full bg-okSoft text-ok grid place-items-center mx-auto mb-3 text-[22px]">
✓
</div>
- <h1 className="text-[20px] font-semibold mb-1">You're set up</h1>
- <p className="text-[13px] text-muted mb-5">Two good ways to start:</p>
+ <h1 className="text-[20px] font-semibold mb-1">{t("onboarding.youre_set_up")}</h1>
+ <p className="text-[13px] text-muted mb-5">{t("onboarding.two_ways")}</p>
</div>
<button
@@ -337,9 +335,9 @@ export function Onboarding({ onDone }: { onDone: (next?: "work" | "gallery" | "a
◷
</span>
<span className="flex-1 min-w-0 text-left">
- <b className="block text-[13px]">Create your first automation</b>
+ <b className="block text-[13px]">{t("onboarding.cta_automation_title")}</b>
<span className="text-[12px] text-muted">
- A weekly digest, a morning brief — pick a template, running in two minutes.
+ {t("onboarding.cta_automation_desc")}
</span>
</span>
<span className="text-faint self-center">›</span>
@@ -353,9 +351,9 @@ export function Onboarding({ onDone }: { onDone: (next?: "work" | "gallery" | "a
✦
</span>
<span className="flex-1 min-w-0 text-left">
- <b className="block text-[13px]">Start working with Coworker</b>
+ <b className="block text-[13px]">{t("onboarding.cta_work_title")}</b>
<span className="text-[12px] text-muted">
- Open a session and just ask — analyze files, draft, research, build.
+ {t("onboarding.cta_work_desc")}
</span>
</span>
<span className="text-faint self-center">›</span>
@@ -365,7 +363,7 @@ export function Onboarding({ onDone }: { onDone: (next?: "work" | "gallery" | "a
(owner call 2026-07-12); the finish("gallery") plumbing remains for their return. */}
<p className="text-[11px] text-faint text-center mt-auto pt-5">
- Replay this setup anytime: Settings ▸ Appearance ▸ Run setup again.
+ {t("onboarding.replay_hint")}
</p>
</section>
)}
diff --git a/surfaces/gui/src/components/PersonaView.tsx b/surfaces/gui/src/components/PersonaView.tsx
index 02e64c41..5ba775fc 100644
--- a/surfaces/gui/src/components/PersonaView.tsx
+++ b/surfaces/gui/src/components/PersonaView.tsx
@@ -10,6 +10,7 @@
// <img src> can't carry the sidecar token).
import { useEffect, useState } from "react";
+import { useTranslation } from "react-i18next";
import {
deletePersona,
exportPersona,
@@ -49,6 +50,7 @@ export function PersonaView({
onBack?: () => void;
onOpenIntegrations?: () => void;
}) {
+ const { t } = useTranslation();
const [detail, setDetail] = useState<PersonaDetail | null>(null);
const [byName, setByName] = useState<ConnectorMap>({});
const [error, setError] = useState<string | null>(null);
@@ -75,7 +77,7 @@ export function PersonaView({
urls = loaded.filter(Boolean) as string[];
if (live) setMediaUrls(urls);
})
- .catch(() => live && setError("Could not load this coworker."));
+ .catch(() => live && setError(t("persona.load_error")));
getConnectors()
.then((list) => live && setByName(indexConnectors(list)))
.catch(() => {});
@@ -109,7 +111,7 @@ export function PersonaView({
const dir = await chooseFolder();
if (!dir) return;
const r = await exportPersona(personaId, dir);
- setMsg(r.ok ? `Exported to ${r.path}` : r.error || "export failed");
+ setMsg(r.ok ? t("persona.exported_to", { path: r.path }) : r.error || t("persona.export_failed"));
};
const header = (
@@ -120,12 +122,12 @@ export function PersonaView({
className="inline-flex items-center gap-1 text-[13px] text-muted hover:text-ink"
onClick={onBack}
>
- <Icon name="arrowLeft" size={15} /> Back
+ <Icon name="arrowLeft" size={15} /> {t("persona.back")}
</button>
<span className="text-faint">·</span>
</>
)}
- <span className="text-[13px] font-semibold">Coworker</span>
+ <span className="text-[13px] font-semibold">{t("persona.persona")}</span>
</div>
);
@@ -133,7 +135,7 @@ export function PersonaView({
return (
<main className="flex-1 min-w-0 flex flex-col bg-paper">
{header}
- <div className="p-12 text-center text-faint text-[13px]">{error || "Loading…"}</div>
+ <div className="p-12 text-center text-faint text-[13px]">{error || t("persona.loading")}</div>
</main>
);
}
@@ -186,15 +188,15 @@ export function PersonaView({
<p className="text-[13px] text-muted mt-0.5">{detail.tagline}</p>
</div>
<div className="ml-auto flex items-center gap-2">
- <span className="text-[12px] text-muted">{detail.enabled ? "Enabled" : "Disabled"}</span>
- <Toggle checked={detail.enabled} onChange={toggleEnabled} title="Enable this coworker" />
+ <span className="text-[12px] text-muted">{detail.enabled ? t("persona.enabled") : t("persona.disabled")}</span>
+ <Toggle checked={detail.enabled} onChange={toggleEnabled} title={t("persona.enable_title")} />
</div>
</header>
{/* about: bundle markdown + screenshot carousel */}
{(detail.description || mediaUrls.length > 0) && (
<section>
- <div className={`${SEC_H} mb-1.5`}>About</div>
+ <div className={`${SEC_H} mb-1.5`}>{t("persona.about")}</div>
{detail.description && (
<div className="text-[14px] leading-relaxed text-ink/90">
<Markdown text={detail.description} />
@@ -206,7 +208,7 @@ export function PersonaView({
{mediaUrls.length > 1 && (
<button
className="w-7 h-7 rounded-full border border-line bg-panel text-muted hover:text-ink hover:border-lineStrong shrink-0"
- aria-label="Previous screenshot"
+ aria-label={t("persona.prev_screenshot")}
onClick={() => setShot((s) => (s - 1 + mediaUrls.length) % mediaUrls.length)}
>
‹
@@ -214,14 +216,14 @@ export function PersonaView({
)}
<img
src={mediaUrls[shot]}
- alt={`${detail.name} screenshot ${shot + 1}`}
+ alt={t("persona.screenshot_alt", { name: detail.name, n: shot + 1 })}
className="flex-1 min-w-0 rounded-xl border border-line bg-panel"
data-testid="persona-media"
/>
{mediaUrls.length > 1 && (
<button
className="w-7 h-7 rounded-full border border-line bg-panel text-muted hover:text-ink hover:border-lineStrong shrink-0"
- aria-label="Next screenshot"
+ aria-label={t("persona.next_screenshot")}
onClick={() => setShot((s) => (s + 1) % mediaUrls.length)}
>
›
@@ -233,7 +235,7 @@ export function PersonaView({
{mediaUrls.map((_, i) => (
<button
key={i}
- aria-label={`Screenshot ${i + 1}`}
+ aria-label={t("persona.screenshot_n", { n: i + 1 })}
className={
"w-1.5 h-1.5 rounded-full " + (i === shot ? "bg-accent" : "bg-lineStrong")
}
@@ -251,10 +253,10 @@ export function PersonaView({
{rows.length > 0 && (
<section>
<div className={`${SEC_H} mb-1.5 flex items-baseline`}>
- <span>Connectors</span>
+ <span>{t("persona.connectors")}</span>
<span className="ml-auto flex font-semibold text-[11px] text-faint normal-case tracking-normal">
- <span className={COL_STATUS}>Status</span>
- <span className={COL_ENABLE}>Enable</span>
+ <span className={COL_STATUS}>{t("persona.col_status")}</span>
+ <span className={COL_ENABLE}>{t("persona.col_enable")}</span>
</span>
</div>
<div className={GRP}>
@@ -267,7 +269,7 @@ export function PersonaView({
{r.kind === "mcp" ? (
<span className={TAG_MCP}>MCP</span>
) : r.tier === "core" ? (
- <span className={TAG_CORE}>core</span>
+ <span className={TAG_CORE}>{t("persona.core_tag")}</span>
) : null}
</div>
{r.reason && <div className="text-[12px] text-muted">{r.reason}</div>}
@@ -275,14 +277,14 @@ export function PersonaView({
<span className={COL_STATUS}>
{r.connected ? (
<span className="text-[11px] font-medium px-2 py-0.5 rounded-full bg-okSoft text-ok border border-okLine">
- ● Ready
+ {t("persona.connected")}
</span>
) : (
<button
className={r.tier === "core" && r.kind !== "mcp" ? BTN_ACCENT : BTN_BORDERED}
onClick={onOpenIntegrations}
>
- {r.kind === "mcp" ? "Add" : "Connect"}
+ {r.kind === "mcp" ? t("persona.add") : t("persona.connect")}
</button>
)}
</span>
@@ -294,8 +296,8 @@ export function PersonaView({
onChange={(next) => toggleDefault(r.ref, next)}
title={
r.connected
- ? "On by default for new sessions"
- : "Connect this first"
+ ? t("persona.on_by_default")
+ : t("persona.connect_this_first")
}
/>
) : (
@@ -306,8 +308,7 @@ export function PersonaView({
))}
</div>
<p className="text-[12px] text-faint mt-1.5 px-1">
- Enabled connectors are on when a new session starts — you can still mute any of
- them per session.
+ {t("persona.defaults_footnote")}
</p>
</section>
)}
@@ -315,7 +316,7 @@ export function PersonaView({
{/* advanced: tool calls, collapsed by default (everyday users don't need these) */}
{detail.tools.length > 0 && (
<section>
- <div className={`${SEC_H} mb-1.5`}>Advanced</div>
+ <div className={`${SEC_H} mb-1.5`}>{t("persona.advanced")}</div>
<div className="rounded-xl2 border border-line bg-panel">
<button
className="w-full flex items-center gap-2 px-4 py-2.5 text-left"
@@ -327,7 +328,7 @@ export function PersonaView({
size={12}
className={"text-faint transition-transform" + (showTools ? " rotate-90" : "")}
/>
- <span className="text-[13px]">Tool calls</span>
+ <span className="text-[13px]">{t("persona.tool_calls")}</span>
<span className="ml-auto text-[12px] text-faint">{detail.tools.length}</span>
</button>
{showTools && (
@@ -343,7 +344,7 @@ export function PersonaView({
<section className="flex flex-wrap gap-x-8 gap-y-2 text-[13px]">
{detail.recommended_models.length > 0 && (
<div>
- <span className="text-faint">Models</span> ·{" "}
+ <span className="text-faint">{t("persona.models_label")}</span> ·{" "}
{detail.recommended_models.map((m, i) => (
<span key={m}>
<span className="font-mono">{m}</span>
@@ -354,12 +355,12 @@ export function PersonaView({
)}
{detail.default_permission_mode && (
<div>
- <span className="text-faint">Default mode</span> · {detail.default_permission_mode}
+ <span className="text-faint">{t("persona.default_mode_label")}</span> · {detail.default_permission_mode}
</div>
)}
<div>
- <span className="text-faint">Workspace</span> ·{" "}
- {detail.requires_folder ? "picked folder" : "scratch"}
+ <span className="text-faint">{t("persona.workspace_label")}</span> ·{" "}
+ {detail.requires_folder ? t("persona.workspace_picked") : t("persona.workspace_scratch")}
</div>
</section>
@@ -373,7 +374,7 @@ export function PersonaView({
data-testid="persona-surfaced"
onChange={(e) => patch({ surfaced: e.target.checked })}
/>
- Show in picker
+ {t("persona.show_in_picker")}
</label>
<button
className={BTN_BORDERED}
@@ -381,11 +382,11 @@ export function PersonaView({
data-testid="persona-make-default"
onClick={() => patch({ default: true })}
>
- {detail.default ? "Default for new sessions" : "Make default"}
+ {detail.default ? t("persona.default_for_new") : t("persona.make_default")}
</button>
{!detail.builtin && (
<button className={BTN_BORDERED} data-testid="persona-export" onClick={exportBundle}>
- Export…
+ {t("persona.export")}
</button>
)}
{!detail.builtin &&
@@ -397,13 +398,13 @@ export function PersonaView({
onClick={async () => {
const r = await deletePersona(personaId);
if (r.ok) onBack?.();
- else setMsg(r.error || "delete failed");
+ else setMsg(r.error || t("persona.delete_failed"));
}}
>
- Delete
+ {t("persona.delete")}
</button>
<button className={BTN_BORDERED} onClick={() => setConfirmDel(false)}>
- Keep
+ {t("persona.keep")}
</button>
</span>
) : (
@@ -412,7 +413,7 @@ export function PersonaView({
data-testid="persona-delete"
onClick={() => setConfirmDel(true)}
>
- Delete…
+ {t("persona.delete_ellipsis")}
</button>
))}
{msg && <span className="text-muted">{msg}</span>}
diff --git a/surfaces/gui/src/components/PersonasTab.tsx b/surfaces/gui/src/components/PersonasTab.tsx
index 0b6af122..ff810e32 100644
--- a/surfaces/gui/src/components/PersonasTab.tsx
+++ b/surfaces/gui/src/components/PersonasTab.tsx
@@ -1,4 +1,5 @@
import { useEffect, useRef, useState } from "react";
+import { useTranslation } from "react-i18next";
import {
getPersonasIndex,
getSessions,
@@ -28,6 +29,7 @@ const QUIET_ROW =
"w-full flex items-center gap-2 px-4 pt-2 mt-6 text-[13px] text-muted select-none";
export function PersonasTab({ onOpenPersona }: { onOpenPersona?: (id: string) => void }) {
+ const { t } = useTranslation();
const [personas, setPersonas] = useState<Persona[]>([]);
const [internal, setInternal] = useState(false);
const [mode, setMode] = useState<"git" | "dir" | "zip">("git");
@@ -91,12 +93,12 @@ export function PersonasTab({ onOpenPersona }: { onOpenPersona?: (id: string) =>
const finishInstall = (r: Awaited<ReturnType<typeof installPersona>>) => {
setBusy(false);
if (!r.ok) {
- setMsg(r.error || "install failed");
+ setMsg(r.error || t("personas.install_failed"));
return;
}
setConsent(r.consent || []);
if (r.personas) setPersonas(r.personas);
- setMsg(`Installed ${(r.consent || []).length} coworker(s) — review and enable below.`);
+ setMsg(t("personas.installed", { count: (r.consent || []).length }));
setSrc("");
};
@@ -129,12 +131,12 @@ export function PersonasTab({ onOpenPersona }: { onOpenPersona?: (id: string) =>
const r = await installPersona({ git_url: src.trim() });
setBusy(false);
if (!r.ok) {
- setMsg(r.error || "install failed");
+ setMsg(r.error || t("personas.install_failed"));
return;
}
setConsent(r.consent || []);
if (r.personas) setPersonas(r.personas);
- setMsg(`Installed ${(r.consent || []).length} coworker(s) — review and enable below.`);
+ setMsg(t("personas.installed", { count: (r.consent || []).length }));
setSrc("");
};
@@ -161,10 +163,10 @@ export function PersonasTab({ onOpenPersona }: { onOpenPersona?: (id: string) =>
controls the moment another coworker is made default. */
<span
className="text-[11px] font-medium px-2 py-0.5 rounded-full bg-paper border border-lineStrong text-muted shrink-0"
- title="Default for new sessions"
+ title={t("personas.default_for_new")}
data-testid="persona-default-tag"
>
- Default
+ {t("personas.default_tag")}
</span>
) : (
<>
@@ -173,13 +175,13 @@ export function PersonasTab({ onOpenPersona }: { onOpenPersona?: (id: string) =>
onChange={(next) =>
next ? toggle(p.id, { enabled: true }) : requestDisable(p)
}
- title={p.enabled ? "Disable this coworker" : "Enable this coworker"}
+ title={p.enabled ? t("personas.disable_coworker") : t("personas.enable_coworker")}
/>
{onOpenPersona && (
<button
className="text-faint hover:text-ink shrink-0 p-1"
- title={`Configure ${p.name}`}
- aria-label={`Configure ${p.name}`}
+ title={t("personas.configure_title", { name: p.name })}
+ aria-label={t("personas.configure_title", { name: p.name })}
data-testid={`persona-configure-${p.id}`}
onClick={() => onOpenPersona(p.id)}
>
@@ -195,9 +197,7 @@ export function PersonasTab({ onOpenPersona }: { onOpenPersona?: (id: string) =>
data-testid={`persona-disable-warning-${p.id}`}
>
<span className="min-w-0">
- Disabling archives its {liveCount(p.id)} conversation
- {liveCount(p.id) === 1 ? "" : "s"} — they stay available under “Show
- archived”.
+ {t("personas.disable_warning", { count: liveCount(p.id) })}
</span>
<button
className="text-[12px] px-2.5 py-1.5 rounded-lg bg-accent text-white shrink-0"
@@ -207,10 +207,10 @@ export function PersonasTab({ onOpenPersona }: { onOpenPersona?: (id: string) =>
toggle(p.id, { enabled: false });
}}
>
- Disable
+ {t("personas.disable")}
</button>
<button className={BTN_BORDERED} onClick={() => setConfirmOff(null)}>
- Keep enabled
+ {t("personas.keep_enabled")}
</button>
</div>
)}
@@ -225,8 +225,8 @@ export function PersonasTab({ onOpenPersona }: { onOpenPersona?: (id: string) =>
<div>
{/* One toggle per row (enable implies picker); ★ marks the default. Everything
else — in-picker nuance, default, export, delete — lives on the detail page. */}
- {group("General", personas.filter((p) => p.ships !== false && p.group !== "security"))}
- {group("Security", personas.filter((p) => p.ships !== false && p.group === "security"))}
+ {group(t("personas.group_general"), personas.filter((p) => p.ships !== false && p.group !== "security"))}
+ {group(t("personas.group_security"), personas.filter((p) => p.ships !== false && p.group === "security"))}
{unshipped.length > 0 && (
<>
@@ -240,9 +240,9 @@ export function PersonasTab({ onOpenPersona }: { onOpenPersona?: (id: string) =>
size={12}
className={"transition-transform" + (showUnshipped ? " rotate-90" : "")}
/>
- <span>Not in this release · {unshipped.length} coworkers</span>
+ <span>{t("personas.unshipped_row", { count: unshipped.length })}</span>
<span className="ml-auto text-faint text-[12px]">
- {internal ? "internal build" : "not in this release"}
+ {internal ? t("personas.internal_build") : t("personas.not_in_release")}
</span>
</button>
{showUnshipped && group(null, unshipped)}
@@ -260,8 +260,8 @@ export function PersonasTab({ onOpenPersona }: { onOpenPersona?: (id: string) =>
size={12}
className={"transition-transform" + (showInstall ? " rotate-90" : "")}
/>
- <span>Install a coworker</span>
- <span className="ml-auto text-faint text-[12px]">GitHub · folder · .zip</span>
+ <span>{t("personas.install_coworker")}</span>
+ <span className="ml-auto text-faint text-[12px]">{t("personas.install_sources")}</span>
</button>
{showInstall && (
<div className={CARD + " mt-1.5 p-4"}>
@@ -271,21 +271,21 @@ export function PersonasTab({ onOpenPersona }: { onOpenPersona?: (id: string) =>
value={mode}
onChange={(e) => setMode(e.target.value as "git" | "dir" | "zip")}
>
- <option value="git">GitHub URL</option>
- <option value="dir">Local folder</option>
- <option value="zip">Bundle zip</option>
+ <option value="git">{t("personas.mode_github")}</option>
+ <option value="dir">{t("personas.mode_local")}</option>
+ <option value="zip">{t("personas.mode_zip")}</option>
</select>
{mode === "git" ? (
<>
<input
className={INPUT}
- placeholder="https://github.com/acme/ops-coworker"
+ placeholder={t("personas.placeholder_github")}
value={src}
onChange={(e) => setSrc(e.target.value)}
onKeyDown={(e) => e.key === "Enter" && install()}
/>
<button className={BTN_ACCENT} disabled={busy || !src.trim()} onClick={install}>
- {busy ? "Installing…" : "Install"}
+ {busy ? t("personas.installing") : t("personas.install")}
</button>
</>
) : mode === "dir" ? (
@@ -296,15 +296,15 @@ export function PersonasTab({ onOpenPersona }: { onOpenPersona?: (id: string) =>
data-testid="persona-dir-choose"
onClick={() => void installDir()}
>
- {busy ? "Installing…" : "Choose folder…"}
+ {busy ? t("personas.installing") : t("personas.choose_folder")}
</button>
<span className="text-[12px] text-faint">
- Opens the system folder picker; installs on selection.
+ {t("personas.dir_picker_note")}
</span>
</>
) : (
<label className={BTN_BORDERED + " cursor-pointer"}>
- {busy ? "Installing…" : "Choose a .zip bundle…"}
+ {busy ? t("personas.installing") : t("personas.choose_zip")}
<input
type="file"
accept=".zip"
@@ -322,13 +322,7 @@ export function PersonasTab({ onOpenPersona }: { onOpenPersona?: (id: string) =>
</div>
<div className="flex items-start gap-2 mt-3 text-[12px] text-muted leading-relaxed">
<span className="text-warnInk shrink-0">⚠</span>
- <span>
- Only install coworkers from sources you trust and can hold accountable — a
- coworker runs with access to your system. Files are snapshotted into a managed
- area; no third-party code runs, but the instructions steer the coworker. Best
- used by teams whose lead builds and distributes coworkers through official
- channels.
- </span>
+ <span>{t("personas.install_trust_note")}</span>
</div>
</div>
)}
@@ -342,10 +336,7 @@ export function PersonasTab({ onOpenPersona }: { onOpenPersona?: (id: string) =>
still steers an agent, so who it came from genuinely matters. */}
<div className="flex items-start gap-2.5 rounded-xl border border-warnInk/30 bg-warnSoft px-3.5 py-2.5 text-[13px] text-warnInk">
<Icon name="shield" size={15} className="shrink-0 mt-0.5" />
- <span>
- Only enable coworkers from someone you trust. Nothing here runs third-party
- code — but its instructions will guide the coworker's behavior.
- </span>
+ <span>{t("personas.install_shield_warning")}</span>
</div>
{consent.map((c) => (
<ConsentCard
@@ -365,12 +356,13 @@ export function PersonasTab({ onOpenPersona }: { onOpenPersona?: (id: string) =>
// One phrase per risk class — the plain-language capability summary the consent card leads
// with; unknown classes fall back to their raw id so nothing is silently omitted.
+// Values are i18n keys resolved at render time.
const RISK_PHRASE: Record<string, string> = {
- read: "read files",
- write_local: "create & edit files",
- exec: "run shell commands",
- network: "access the network",
- write_remote: "act on connected services",
+ read: "personas.risk.read",
+ write_local: "personas.risk.write_local",
+ exec: "personas.risk.exec",
+ network: "personas.risk.network",
+ write_remote: "personas.risk.write_remote",
};
function ConsentCard({
@@ -382,10 +374,11 @@ function ConsentCard({
enabled: boolean;
onEnable: () => Promise<void>;
}) {
+ const { t } = useTranslation();
const [showTools, setShowTools] = useState(false);
const [busy, setBusy] = useState(false);
- const phrases = (c.risk.length ? c.risk : ["read"]).map((r) => RISK_PHRASE[r] || r);
- const summary = phrases.join(", ").replace(/, ([^,]*)$/, " and $1");
+ const phrases = (c.risk.length ? c.risk : ["read"]).map((r) => (RISK_PHRASE[r] ? t(RISK_PHRASE[r]) : r));
+ const summary = phrases.join(", ").replace(/, ([^,]*)$/, " " + t("personas.risk_join_and") + " $1");
const recommends = c.recommends || [];
return (
<div className={CARD + " p-3.5"} data-testid={`consent-${c.id}`}>
@@ -396,29 +389,29 @@ function ConsentCard({
{c.description && <div className="text-[12px] text-muted mt-0.5">{c.description}</div>}
{c.replaces && (
<div className="text-[12px] text-muted mt-1.5" data-testid="replaces-note">
- Replaces {c.name}
+ {t("personas.consent_replaces", { name: c.name })}
{c.replaces.version ? ` v${c.replaces.version}` : ""}
- {c.replaces.installed_at ? ` (installed ${c.replaces.installed_at})` : ""}.
+ {c.replaces.installed_at ? " " + t("personas.consent_installed_at", { date: c.replaces.installed_at }) : ""}.
{c.replaces.capabilities_grew
- ? " This update asks for MORE capabilities than the copy it replaces — review below before re-enabling."
- : " Same capabilities as before — it stays enabled."}
+ ? " " + t("personas.consent_caps_grew")
+ : " " + t("personas.consent_caps_same")}
</div>
)}
<div className="text-[13px] text-ink mt-2">
- Can {summary}
+ {t("personas.consent_can", { summary })}
{c.connectors === "all"
- ? " · use ALL your connected services"
+ ? " " + t("personas.consent_all_connectors")
: c.connectors.length
- ? ` · use connectors: ${c.connectors.join(", ")}`
+ ? " " + t("personas.consent_use_connectors", { list: c.connectors.join(", ") })
: ""}
- {c.messaging ? " · send messages" : ""}
- {c.mcp.length ? ` · use MCP: ${c.mcp.join(", ")}` : ""}
+ {c.messaging ? " " + t("personas.consent_send_messages") : ""}
+ {c.mcp.length ? " " + t("personas.consent_use_mcp", { list: c.mcp.join(", ") }) : ""}
<button
className="ml-2 text-accent text-[12px] hover:underline"
data-testid="consent-tools-toggle"
onClick={() => setShowTools((v) => !v)}
>
- {showTools ? "Hide tools" : `Exact tools (${c.tools.length})`}
+ {showTools ? t("personas.consent_hide_tools") : t("personas.consent_exact_tools", { n: c.tools.length })}
</button>
</div>
{showTools && (
@@ -429,7 +422,10 @@ function ConsentCard({
{recommends.map((r) => (
<div key={r.kind + r.ref} className="text-[12px] text-muted">
<span className="text-ink">{r.ref}</span>
- {r.tier === "core" ? " (recommended)" : " (optional)"} — {r.reason}
+ {r.tier === "core"
+ ? " " + t("personas.consent_recommended_tag")
+ : " " + t("personas.consent_optional_tag")}{" "}
+ — {r.reason}
</div>
))}
</div>
@@ -439,7 +435,7 @@ function ConsentCard({
sent the user hunting back up the list. */}
{enabled ? (
<span className="text-[13px] text-muted" data-testid="consent-enabled">
- ✓ Enabled — it's in your coworker picker.
+ {t("personas.consent_enabled_note")}
</span>
) : (
<button
@@ -451,10 +447,12 @@ function ConsentCard({
void onEnable().finally(() => setBusy(false));
}}
>
- {busy ? "Enabling…" : "Enable this coworker"}
+ {busy ? t("personas.enabling") : t("personas.enable_coworker")}
</button>
)}
- <span className="text-[12px] text-faint">Recommended mode: {c.recommended_mode}.</span>
+ <span className="text-[12px] text-faint">
+ {t("personas.consent_recommended_mode", { mode: c.recommended_mode })}
+ </span>
</div>
</div>
);
diff --git a/surfaces/gui/src/components/ProjectBindMenu.tsx b/surfaces/gui/src/components/ProjectBindMenu.tsx
index dca72265..13a4c5d6 100644
--- a/surfaces/gui/src/components/ProjectBindMenu.tsx
+++ b/surfaces/gui/src/components/ProjectBindMenu.tsx
@@ -7,6 +7,7 @@
// surface). Project memory only — global memory never appears here.
import { useEffect, useRef, useState } from "react";
+import { useTranslation } from "react-i18next";
import { getProjectMenu, nameCurrentProject, setProjectBinding } from "../api";
import type { ProjectMenu } from "../api";
import { Icon } from "./Icon";
@@ -28,6 +29,7 @@ export function ProjectBindMenu(props: {
onOpenMemory?: () => void;
}) {
const { sessionId, kind } = props;
+ const { t } = useTranslation();
const [menu, setMenu] = useState<ProjectMenu | null>(null);
const [filter, setFilter] = useState("");
const [naming, setNaming] = useState(false);
@@ -46,7 +48,7 @@ export function ProjectBindMenu(props: {
const bind = async (name: string | null) => {
const res = await setProjectBinding(sessionId, kind, name);
if (!res.ok) {
- setError(res.error || "could not bind");
+ setError(res.error || t("bindmenu.bind_error"));
return;
}
props.onClose();
@@ -57,7 +59,7 @@ export function ProjectBindMenu(props: {
if (!name) return;
const res = await nameCurrentProject(sessionId, kind, name);
if (!res.ok) {
- setError(res.error || "could not name");
+ setError(res.error || t("bindmenu.name_error"));
return;
}
setNaming(false);
@@ -70,7 +72,7 @@ export function ProjectBindMenu(props: {
const shown = q
? named.filter((n) => n.name.toLowerCase().includes(q))
: named.slice(0, MRU_VISIBLE);
- const title = kind === "memory" ? "Project memory" : "Board";
+ const title = kind === "memory" ? t("composer.bind_memory") : t("composer.bind_board");
const radioRow = (
active: boolean,
@@ -108,7 +110,7 @@ export function ProjectBindMenu(props: {
<Icon name="search" size={12} className="text-faint shrink-0" />
<input
className="w-full bg-transparent text-[12.5px] outline-none"
- placeholder="Filter…"
+ placeholder={t("bindmenu.filter_placeholder")}
value={filter}
onChange={(e) => setFilter(e.target.value)}
/>
@@ -116,7 +118,7 @@ export function ProjectBindMenu(props: {
)}
{kind === "board" &&
!q &&
- radioRow(!menu?.bound && !menu?.derived, "none", () => bind(null), "none")}
+ radioRow(!menu?.bound && !menu?.derived, t("bindmenu.none"), () => bind(null), "none")}
{menu?.derived &&
!q &&
radioRow(
@@ -133,7 +135,7 @@ export function ProjectBindMenu(props: {
),
() => bind(null),
"derived",
- menu.derived.kind === "git" ? "this repo" : "this folder",
+ menu.derived.kind === "git" ? t("bindmenu.this_repo") : t("bindmenu.this_folder"),
)}
{shown.map((n) =>
radioRow(
@@ -141,11 +143,11 @@ export function ProjectBindMenu(props: {
n.name,
() => bind(n.name),
n.name,
- menu?.bound === n.name ? "bound" : undefined,
+ menu?.bound === n.name ? t("bindmenu.bound") : undefined,
),
)}
{q && shown.length === 0 && (
- <div className="px-3 py-1.5 text-[12px] text-faint">no matches</div>
+ <div className="px-3 py-1.5 text-[12px] text-faint">{t("bindmenu.no_matches")}</div>
)}
<div className="my-1 border-t border-line" />
{naming ? (
@@ -153,7 +155,9 @@ export function ProjectBindMenu(props: {
<input
ref={nameInput}
className="w-full rounded-lg border border-line bg-transparent px-2 py-1 text-[12.5px] outline-none"
- placeholder={`Name this ${kind}…`}
+ placeholder={
+ kind === "memory" ? t("bindmenu.name_placeholder_memory") : t("bindmenu.name_placeholder_board")
+ }
value={nameDraft}
onChange={(e) => setNameDraft(e.target.value)}
onKeyDown={(e) => {
@@ -167,7 +171,8 @@ export function ProjectBindMenu(props: {
className="w-full flex items-center gap-2.5 px-3 py-1.5 text-[12.5px] text-left text-muted hover:bg-paper"
onClick={() => setNaming(true)}
>
- <Icon name="pencil" size={13} className="shrink-0" /> Name current {kind}…
+ <Icon name="pencil" size={13} className="shrink-0" />{" "}
+ {kind === "memory" ? t("bindmenu.name_current_memory") : t("bindmenu.name_current_board")}
</button>
)}
{kind === "memory" && props.onOpenMemory && (
@@ -178,7 +183,7 @@ export function ProjectBindMenu(props: {
props.onOpenMemory?.();
}}
>
- <Icon name="sliders" size={13} className="shrink-0" /> View &amp; edit…
+ <Icon name="sliders" size={13} className="shrink-0" /> {t("bindmenu.view_edit")}
</button>
)}
{error && <div className="px-3 py-1 text-[11.5px] text-red-500">{error}</div>}
diff --git a/surfaces/gui/src/components/RightRail.tsx b/surfaces/gui/src/components/RightRail.tsx
index 7628fafc..307404d0 100644
--- a/surfaces/gui/src/components/RightRail.tsx
+++ b/surfaces/gui/src/components/RightRail.tsx
@@ -1,4 +1,6 @@
import { useEffect, useRef, useState, type ReactNode } from "react";
+import { useTranslation } from "react-i18next";
+import type { TFunction } from "i18next";
// Emits the asset URL only; the worker itself loads lazily with the pdfjs chunk.
import pdfWorkerUrl from "pdfjs-dist/build/pdf.worker.min.mjs?url";
import {
@@ -107,6 +109,7 @@ export function RightRail({
onOpenWorker,
openBoardKey = 0,
}: Props) {
+ const { t } = useTranslation();
// Seventeenth pass: every panel starts collapsed and nothing auto-expands — a count
// chip is the maximum signal. One exception survives (solo sessions only): Progress
// still auto-opens the first time a live turn has todos.
@@ -256,7 +259,7 @@ export function RightRail({
<>
{/* Leads carry no Progress panel — the board IS the lead's progress surface. */}
{!isLead && (
- <RailSection title="Progress" open={open.progress} onToggle={() => setOpen({ ...open, progress: !open.progress })}>
+ <RailSection title={t("rail.progress_title")} open={open.progress} onToggle={() => setOpen({ ...open, progress: !open.progress })}>
<ProgressSummary running={running} toolNames={toolNames} todo={todo} />
</RailSection>
)}
@@ -265,9 +268,9 @@ export function RightRail({
Hidden entirely until the workspace has items (no chrome for plain sessions). */}
{board?.space && (
<RailSection
- title="Board"
- count={boardChip(board).text}
- countAttention={boardChip(board).attention}
+ title={t("rail.board_title")}
+ count={boardChip(board, t).text}
+ countAttention={boardChip(board, t).attention}
open={open.board}
onToggle={() => setOpen({ ...open, board: !open.board })}
action={
@@ -278,7 +281,7 @@ export function RightRail({
e.stopPropagation();
onExpandBoard?.();
}}
- title="Expand the board"
+ title={t("rail.board_expand")}
>
<Icon name="panelOpen" size={13} />
</button>
@@ -297,7 +300,7 @@ export function RightRail({
entry per team: the lead). */}
{teamMembers.length > 0 && (
<RailSection
- title="Team"
+ title={t("rail.team_title")}
open={open.team}
onToggle={() => setOpen({ ...open, team: !open.team })}
count={String(teamMembers.length)}
@@ -309,18 +312,18 @@ export function RightRail({
key={w.session_id}
data-testid={`team-row-${w.team?.actor || w.session_id}`}
onClick={() => onOpenWorker?.(w)}
- title={`Open ${w.team?.actor || "worker"}'s session`}
+ title={t("rail.team_open_session", { name: w.team?.actor || t("rail.team_worker") })}
>
<span className={"team-dot " + (w.team?.status || "idle")} />
<span className="rail-team-name">{w.team?.actor || w.agent}</span>
- <span className="rail-team-item">{w.team?.current_item || "sleeping"}</span>
- <span className="rail-team-open">open ↗</span>
+ <span className="rail-team-item">{w.team?.current_item || t("rail.team_sleeping")}</span>
+ <span className="rail-team-open">{t("rail.team_open")}</span>
</button>
))}
{teamChatEnabled && onOpenTeamChat && (
<button className="rail-team-row rail-chat-row" data-testid="team-chat-row" onClick={onOpenTeamChat}>
<span className="team-hash">#</span>
- <span className="rail-team-name">team chat</span>
+ <span className="rail-team-name">{t("rail.team_chat")}</span>
{teamChatUnread > 0 && <span className="team-chat-badge">{teamChatUnread}</span>}
</button>
)}
@@ -330,7 +333,7 @@ export function RightRail({
{showArtifacts && (
<RailSection
- title="Artifacts"
+ title={t("rail.artifacts_title")}
count={artifacts.length ? String(artifacts.length) : undefined}
open={open.artifacts}
onToggle={() => setOpen({ ...open, artifacts: !open.artifacts })}
@@ -340,17 +343,17 @@ export function RightRail({
<button
className="rail-mini-btn"
onClick={(e) => { e.stopPropagation(); revealArtifact(sessionId, artifacts[0].path, "reveal"); }}
- title="Show the folder where these files are saved"
+ title={t("rail.show_folder")}
>
<Icon name="folder" size={13} />
</button>
)}
- <button className="rail-mini-btn" onClick={(e) => { e.stopPropagation(); refreshArtifacts(); }} title="Refresh artifacts"><Icon name="refresh" size={13} /></button>
+ <button className="rail-mini-btn" onClick={(e) => { e.stopPropagation(); refreshArtifacts(); }} title={t("rail.refresh")}><Icon name="refresh" size={13} /></button>
</>
}
>
{artifacts.length === 0 ? (
- <div className="rail-muted">No previewable files yet.</div>
+ <div className="rail-muted">{t("rail.artifacts_empty")}</div>
) : (
<div className="artifact-list">
{artifacts.slice(0, 16).map((a) => (
@@ -362,7 +365,7 @@ export function RightRail({
{a.name}
<span className="artifact-row-meta">{formatBytes(a.size)} · {formatTime(a.modified_at)}</span>
</span>
- <span className="artifact-open">Open</span>
+ <span className="artifact-open">{t("rail.open")}</span>
</button>
))}
</div>
@@ -375,7 +378,7 @@ export function RightRail({
drawer for no gain. */}
{board?.space && journal.length > 0 && (
<RailSection
- title="Journal"
+ title={t("rail.journal_title")}
count={String(journal.length)}
open={open.journal}
onToggle={() => setOpen({ ...open, journal: !open.journal })}
@@ -385,7 +388,7 @@ export function RightRail({
<div className="journal-row" key={c.case}>
<Icon name="file" size={13} />
<span className="journal-case">{c.case}</span>
- <span className="journal-count">{c.entries} entr{c.entries === 1 ? "y" : "ies"}</span>
+ <span className="journal-count">{t("rail.journal_entries", { count: c.entries })}</span>
</div>
))}
</div>
@@ -396,7 +399,7 @@ export function RightRail({
Artifacts section stays the curated scratch-only surface. */}
{rootDirs.length > 0 && (
<RailSection
- title="Files"
+ title={t("rail.crumb_files")}
count={String(rootDirs.length)}
open={open.files}
onToggle={() => setOpen({ ...open, files: !open.files })}
@@ -426,11 +429,11 @@ export function RightRail({
<span className="artifact-name">
{r.label || r.path.split("/").pop() || r.path}
<span className="artifact-row-meta">
- {r.writable ? "read-write" : "read-only"}
- {!r.exists ? " · missing" : ""}
+ {r.writable ? t("rail.root_read_write") : t("rail.root_read_only")}
+ {!r.exists ? ` · ${t("root.missing")}` : ""}
</span>
</span>
- <span className="artifact-open">Browse</span>
+ <span className="artifact-open">{t("rail.browse")}</span>
</button>
))}
</div>
@@ -460,18 +463,19 @@ export function RightRail({
// The Board section's header chip: the attention states (blocked/review) when present,
// otherwise a quiet active count. Full per-state summary stays on the topbar button.
-function boardChip(board: Board): { text: string; attention: boolean } {
+function boardChip(board: Board, t: TFunction): { text: string; attention: boolean } {
const counts: Record<string, number> = {};
for (const item of board.items) counts[item.state] = (counts[item.state] || 0) + 1;
const attn: string[] = [];
- if (counts.blocked) attn.push(`${counts.blocked} blocked`);
- if (counts.review) attn.push(`${counts.review} review`);
+ if (counts.blocked) attn.push(t("rail.board_chip_blocked", { count: counts.blocked }));
+ if (counts.review) attn.push(t("rail.board_chip_review", { count: counts.review }));
if (attn.length) return { text: attn.join(" · "), attention: true };
const active = (counts.in_progress || 0) + (counts.open || 0);
- return { text: active ? `${active} active` : "", attention: false };
+ return { text: active ? t("rail.board_chip_active", { count: active }) : "", attention: false };
}
function ProgressSummary({ running, toolNames, todo }: { running: boolean; toolNames: string[]; todo: TodoItem[] }) {
+ const { t } = useTranslation();
if (todo.length) {
return (
<div className="rail-todo-list">
@@ -483,7 +487,7 @@ function ProgressSummary({ running, toolNames, todo }: { running: boolean; toolN
))}
{running && (
<div className="rail-muted">
- {toolNames.length ? `${toolNames.length} tool call${toolNames.length === 1 ? "" : "s"} so far.` : "Working..."}
+ {toolNames.length ? t("rail.tool_calls", { count: toolNames.length }) : t("rail.working")}
</div>
)}
</div>
@@ -492,13 +496,13 @@ function ProgressSummary({ running, toolNames, todo }: { running: boolean; toolN
if (running) {
return (
<div className="rail-muted">
- Working on this task{toolNames.length ? ` with ${toolNames.length} tool call${toolNames.length === 1 ? "" : "s"} so far.` : "."}
+ {toolNames.length ? t("rail.working_task_with_tools", { count: toolNames.length }) : t("rail.working_task")}
</div>
);
}
return (
<div className="rail-muted">
- For longer multi-step tasks, progress will appear here while OpenWorker plans, uses tools, waits for approval, and produces artifacts.
+ {t("rail.empty_state")}
</div>
);
}
@@ -575,6 +579,7 @@ function ArtifactViewer({
// Folder listings: open a child entry in the viewer (files and subfolders alike).
onOpenEntry?: (path: string) => void;
}) {
+ const { t } = useTranslation();
const [reloadKey, setReloadKey] = useState(0);
// UX-038: the ambiguous icon cluster collapsed into ONE labeled ⋯ menu; the
// breadcrumb parent is the back action and ✕ closes. Copy CONTENTS is the
@@ -594,7 +599,7 @@ function ArtifactViewer({
const isApp = content?.kind === "sheet" || content?.kind === "pdf" || content?.kind === "office";
// Text-bearing kinds can copy their contents; images/PDFs/sheets have nothing textual to copy.
const copyableText = typeof content?.content === "string" && !content?.error;
- const crumbRoot = artifact.origin === "files" ? "Files" : "Artifacts";
+ const crumbRoot = artifact.origin === "files" ? t("rail.crumb_files") : t("rail.artifacts_title");
const item = (
testid: string,
icon: Parameters<typeof Icon>[0]["name"],
@@ -623,7 +628,7 @@ function ArtifactViewer({
className="artifact-crumb-link"
data-testid="artifact-crumb-back"
onClick={onBack}
- title={`Back to ${crumbRoot}`}
+ title={t("rail.back_to", { name: crumbRoot })}
>
{crumbRoot}
</button>
@@ -640,8 +645,8 @@ function ArtifactViewer({
await onReload();
setReloadKey((k) => k + 1);
}}
- aria-label="Reload preview"
- title="Reload"
+ aria-label={t("rail.reload_preview")}
+ title={t("rail.reload")}
>
<Icon name="refresh" size={16} />
</button>
@@ -650,8 +655,8 @@ function ArtifactViewer({
<button
className="artifact-icon-btn"
data-testid="artifact-more"
- aria-label="More actions"
- title="More"
+ aria-label={t("rail.more_actions")}
+ title={t("rail.more")}
onClick={() => setMenuOpen((v) => !v)}
>
<Icon name="moreHorizontal" size={16} />
@@ -659,22 +664,22 @@ function ArtifactViewer({
{menuOpen && (
<div className="artifact-menu" data-testid="artifact-menu">
{copyableText &&
- item("artifact-copy-contents", "copy", "Copy contents", () =>
+ item("artifact-copy-contents", "copy", t("rail.copy_contents"), () =>
navigator.clipboard?.writeText(content?.content || ""),
)}
- {item("artifact-copy-path", "file", "Copy path", () =>
+ {item("artifact-copy-path", "file", t("rail.copy_path"), () =>
navigator.clipboard?.writeText(artifact.abs_path || artifact.path),
)}
<div className="artifact-menu-div" />
{isHtml &&
- item("artifact-open-browser", "panelOpen", "Open in browser", () =>
+ item("artifact-open-browser", "panelOpen", t("rail.open_in_browser"), () =>
revealArtifact(sessionId, artifact.path, "open"),
)}
{isApp &&
- item("artifact-open-app", "panelOpen", "Open in default app", () =>
+ item("artifact-open-app", "panelOpen", t("rail.open_in_default"), () =>
revealArtifact(sessionId, artifact.path, "open"),
)}
- {item("artifact-reveal", "folder", "Reveal in Finder", () =>
+ {item("artifact-reveal", "folder", t("rail.reveal_in_finder"), () =>
revealArtifact(sessionId, artifact.path, "reveal"),
)}
</div>
@@ -684,8 +689,8 @@ function ArtifactViewer({
className="artifact-icon-btn"
data-testid="artifact-close"
onClick={onBack}
- aria-label="Close the viewer"
- title="Close"
+ aria-label={t("rail.close_viewer")}
+ title={t("rail.close")}
>
<Icon name="x" size={16} />
</button>
@@ -693,7 +698,7 @@ function ArtifactViewer({
</div>
<div className="artifact-preview">
{!content ? (
- <div className="rail-muted">Loading...</div>
+ <div className="rail-muted">{t("rail.loading")}</div>
) : content.error ? (
<div className="rail-error">{content.error}</div>
) : content.kind === "html" ? (
@@ -730,14 +735,14 @@ function ArtifactViewer({
{!e.dir && <span className="artifact-folder-size">{formatBytes(e.size)}</span>}
</button>
))}
- {!content.entries?.length && <div className="rail-muted">This folder is empty.</div>}
+ {!content.entries?.length && <div className="rail-muted">{t("rail.folder_empty")}</div>}
</div>
) : content.kind === "office" ? (
<div className="artifact-open-prompt">
<Icon name="panelOpen" size={28} />
- <p>This {/\.pptx?$/i.test(artifact.name) ? "PowerPoint" : "Word"} file can’t be previewed here.</p>
+ <p>{t("rail.office_no_preview", { type: /\.pptx?$/i.test(artifact.name) ? "PowerPoint" : "Word" })}</p>
<button className="btn sm" onClick={() => revealArtifact(sessionId, artifact.path, "open")}>
- Open in default app
+ {t("rail.open_in_default")}
</button>
</div>
) : (
@@ -751,6 +756,7 @@ function ArtifactViewer({
const MAX_TABLE_ROWS = 500;
function GridTable({ rows, note }: { rows: unknown[][]; note?: string }) {
+ const { t } = useTranslation();
const [head, ...body] = rows;
return (
<div className="artifact-tablewrap">
@@ -769,7 +775,7 @@ function GridTable({ rows, note }: { rows: unknown[][]; note?: string }) {
{(note || body.length > MAX_TABLE_ROWS) && (
<div className="rail-muted artifact-table-note">
{note}
- {body.length > MAX_TABLE_ROWS ? ` Showing first ${MAX_TABLE_ROWS} of ${body.length} rows.` : ""}
+ {body.length > MAX_TABLE_ROWS ? ` ${t("rail.table_truncated", { max: MAX_TABLE_ROWS, total: body.length })}` : ""}
</div>
)}
</div>
@@ -812,8 +818,9 @@ function parseCsv(text: string): string[][] {
}
function CsvTable({ text }: { text: string }) {
+ const { t } = useTranslation();
const rows = parseCsv(text);
- if (!rows.length) return <div className="rail-muted artifact-table-note">Empty file.</div>;
+ if (!rows.length) return <div className="rail-muted artifact-table-note">{t("rail.empty_file")}</div>;
return <GridTable rows={rows} />;
}
@@ -822,6 +829,7 @@ function CsvTable({ text }: { text: string }) {
// WKWebView has no inline PDF plugin (<embed> shows a gray pane in the Tauri shell), so we
// rasterize pages with pdf.js onto stacked canvases — same lazy-chunk pattern as SheetViewer.
function PdfViewer({ dataUrl }: { dataUrl: string }) {
+ const { t } = useTranslation();
const [error, setError] = useState("");
const [loading, setLoading] = useState(true);
const holder = useRef<HTMLDivElement | null>(null);
@@ -861,16 +869,17 @@ function PdfViewer({ dataUrl }: { dataUrl: string }) {
};
}, [dataUrl]);
- if (error) return <div className="rail-error artifact-table-note">Could not render PDF: {error}</div>;
+ if (error) return <div className="rail-error artifact-table-note">{t("rail.pdf_error", { error })}</div>;
return (
<div className="artifact-pdfjs">
- {loading && <div className="rail-muted artifact-table-note">Rendering PDF…</div>}
+ {loading && <div className="rail-muted artifact-table-note">{t("rail.pdf_rendering")}</div>}
<div ref={holder} />
</div>
);
}
function SheetViewer({ dataUrl }: { dataUrl: string }) {
+ const { t } = useTranslation();
const [sheets, setSheets] = useState<{ name: string; rows: unknown[][] }[] | null>(null);
const [error, setError] = useState("");
const [active, setActive] = useState(0);
@@ -898,8 +907,8 @@ function SheetViewer({ dataUrl }: { dataUrl: string }) {
};
}, [dataUrl]);
- if (error) return <div className="rail-error artifact-table-note">Could not parse spreadsheet: {error}</div>;
- if (!sheets) return <div className="rail-muted artifact-table-note">Parsing spreadsheet…</div>;
+ if (error) return <div className="rail-error artifact-table-note">{t("rail.sheet_error", { error })}</div>;
+ if (!sheets) return <div className="rail-muted artifact-table-note">{t("rail.sheet_parsing")}</div>;
const sheet = sheets[active];
return (
<div className="sheet-viewer">
@@ -912,7 +921,7 @@ function SheetViewer({ dataUrl }: { dataUrl: string }) {
))}
</div>
)}
- {sheet.rows.length ? <GridTable rows={sheet.rows} /> : <div className="rail-muted artifact-table-note">Empty sheet.</div>}
+ {sheet.rows.length ? <GridTable rows={sheet.rows} /> : <div className="rail-muted artifact-table-note">{t("rail.sheet_empty")}</div>}
</div>
);
}
diff --git a/surfaces/gui/src/components/RootRow.tsx b/surfaces/gui/src/components/RootRow.tsx
index dcd5384a..ca22d83d 100644
--- a/surfaces/gui/src/components/RootRow.tsx
+++ b/surfaces/gui/src/components/RootRow.tsx
@@ -1,3 +1,4 @@
+import { useTranslation } from "react-i18next";
import type { RootInfo } from "../api";
import { Icon } from "./Icon";
import { baseName } from "../paths";
@@ -21,9 +22,10 @@ export function RootRow({
onToggle: (r: RootInfo) => void;
onRemove: (path: string) => void;
}) {
+ const { t } = useTranslation();
const label = root.primary
? scratchPrimary
- ? "Temporary folder"
+ ? t("root.temporary_space")
: baseName(root.path)
: root.label;
return (
@@ -32,7 +34,7 @@ export function RootRow({
<span className="root-text" title={root.path}>
<span className="root-label">
{label}
- {root.primary && !scratchPrimary && <span className="root-tag"> main</span>}
+ {root.primary && !scratchPrimary && <span className="root-tag"> {t("root.main")}</span>}
{branch && (
<span className="root-tag root-branch">
{" "}
@@ -42,17 +44,17 @@ export function RootRow({
</span>
<span className="root-path">{root.path}</span>
</span>
- {!root.exists && <span className="root-tag warn">missing</span>}
+ {!root.exists && <span className="root-tag warn">{t("root.missing")}</span>}
<button
className={"root-access" + (root.writable ? " rw" : " ro")}
onClick={() => onToggle(root)}
disabled={busy || root.primary}
- title={root.primary ? "The main workspace is always read-write" : "Toggle read-only / read-write"}
+ title={root.primary ? t("root.primary_always_rw") : t("root.toggle_rw")}
>
- {root.writable ? "Read-write" : "Read-only"}
+ {root.writable ? t("root.read_write") : t("root.read_only")}
</button>
{!root.primary && (
- <button className="root-x" onClick={() => onRemove(root.path)} disabled={busy} title="Remove">
+ <button className="root-x" onClick={() => onRemove(root.path)} disabled={busy} title={t("common.remove")}>
×
</button>
)}
diff --git a/surfaces/gui/src/components/ScheduledView.tsx b/surfaces/gui/src/components/ScheduledView.tsx
index 609ed091..bab346fa 100644
--- a/surfaces/gui/src/components/ScheduledView.tsx
+++ b/surfaces/gui/src/components/ScheduledView.tsx
@@ -1,4 +1,5 @@
import { useEffect, useState } from "react";
+import { Trans, useTranslation } from "react-i18next";
import {
createAutomation,
deleteAutomation,
@@ -64,6 +65,7 @@ interface Props {
}
export function ScheduledView({ onOpenRun, onRunNow, initialOpenId }: Props) {
+ const { t } = useTranslation();
const [tasks, setTasks] = useState<Automation[]>([]);
const [openId, setOpenId] = useState<string | null>(initialOpenId ?? null);
const [showForm, setShowForm] = useState(false);
@@ -123,22 +125,19 @@ export function ScheduledView({ onOpenRun, onRunNow, initialOpenId }: Props) {
<Shell>
<div className="flex items-start gap-3">
<div className="flex-1 min-w-0">
- <PanelHead title="Automations" sub="Recurring tasks OpenWorker runs on a schedule." />
+ <PanelHead title={t("automations.title")} sub={t("automations.sub")} />
</div>
<button
className="text-[13px] px-3 py-1.5 rounded-lg border border-lineStrong bg-panel hover:border-accent hover:text-accent shrink-0"
onClick={() => setShowForm((v) => !v)}
>
- + New automation
+ {t("automations.new_btn")}
</button>
</div>
<div className="text-[12px] text-faint flex gap-1.5 mb-4">
<span aria-hidden>ⓘ</span>
- <span>
- Runs only while openworker-server is up — a missed schedule catches up once when it next
- starts.
- </span>
+ <span>{t("automations.server_hint")}</span>
</div>
{showForm && (
@@ -156,27 +155,29 @@ export function ScheduledView({ onOpenRun, onRunNow, initialOpenId }: Props) {
{empty ? (
!showForm && (
<div className={CARD + " p-4 text-[13px] text-muted"}>
- No scheduled tasks yet — use a template above, click <strong>+ New automation</strong>,
- or just ask OpenWorker in a session.
+ <Trans
+ i18nKey="automations.empty_state"
+ components={{ strong: <strong /> }}
+ />
</div>
)
) : (
<div className="flex flex-col gap-2.5">
- {tasks.map((t) => (
+ {tasks.map((task) => (
<div
className={CARD + " sched-card px-4 py-3 cursor-pointer hover:border-lineStrong transition-colors"}
- key={t.id}
- onClick={() => setOpenId(t.id)}
+ key={task.id}
+ onClick={() => setOpenId(task.id)}
>
<div className="flex items-center justify-between gap-2.5 mb-1">
- <span className="text-[13px] font-semibold truncate">{t.title}</span>
+ <span className="text-[13px] font-semibold truncate">{task.title}</span>
<button
className="sched-card-del"
- title="Delete automation"
- aria-label={`Delete ${t.title}`}
+ title={t("automations.delete_title")}
+ aria-label={t("automations.delete_aria", { title: task.title })}
onClick={async (e) => {
e.stopPropagation();
- await deleteAutomation(t.id);
+ await deleteAutomation(task.id);
refresh();
}}
>
@@ -185,8 +186,8 @@ export function ScheduledView({ onOpenRun, onRunNow, initialOpenId }: Props) {
</div>
<div className="flex items-center gap-1.5 text-[12px] text-muted">
<Icon name="clock" size={13} className="text-faint shrink-0" />
- {t.enabled ? t.schedule : "Paused"} · next {fmt(t.next_run)} · {t.run_count} run{t.run_count === 1 ? "" : "s"}
- {t.last_status ? ` · last ${t.last_status}` : ""}
+ {task.enabled ? task.schedule : t("automations.paused")} · {t("automations.next", { time: fmt(task.next_run) })} · {t("automations.run_count", { count: task.run_count })}
+ {task.last_status ? ` · ${t("automations.last", { status: task.last_status })}` : ""}
</div>
</div>
))}
@@ -205,6 +206,7 @@ function NewAutomationForm({
onCancel: () => void;
onCreate: (p: { title: string; instructions: string; cron?: string }) => void;
}) {
+ const { t } = useTranslation();
const [title, setTitle] = useState("");
const [instructions, setInstructions] = useState("");
const [time, setTime] = useState("09:00");
@@ -215,23 +217,23 @@ function NewAutomationForm({
return (
<div className={CARD + " tmpl-form p-4 mb-4"}>
<div className="text-[11px] uppercase tracking-[0.05em] text-faint mb-2.5">
- New automation
+ {t("automations.new_automation")}
</div>
<input
className="tmpl-input"
- placeholder="Title (e.g. Daily standup notes)"
+ placeholder={t("automations.title_placeholder")}
value={title}
onChange={(e) => setTitle(e.target.value)}
/>
<textarea
className="tmpl-input tmpl-textarea"
- placeholder="What should it do each run? (e.g. Summarize today's calendar and open tasks.)"
+ placeholder={t("automations.instructions_placeholder")}
value={instructions}
onChange={(e) => setInstructions(e.target.value)}
/>
<div className="tmpl-sched">
<label className="tmpl-field">
- <span>At</span>
+ <span>{t("automations.at")}</span>
<input
type="time"
className="tmpl-input tmpl-time"
@@ -240,15 +242,15 @@ function NewAutomationForm({
/>
</label>
<label className="tmpl-field">
- <span>Repeat</span>
+ <span>{t("automations.repeat")}</span>
<select
className="tmpl-input tmpl-select"
value={freq}
onChange={(e) => setFreq(e.target.value)}
>
- <option value="daily">Every day</option>
- <option value="weekdays">Weekdays</option>
- <option value="weekends">Weekends</option>
+ <option value="daily">{t("automations.freq_daily")}</option>
+ <option value="weekdays">{t("automations.freq_weekdays")}</option>
+ <option value="weekends">{t("automations.freq_weekends")}</option>
</select>
</label>
</div>
@@ -264,9 +266,9 @@ function NewAutomationForm({
})
}
>
- {busy ? "Creating…" : "Create automation"}
+ {busy ? t("automations.creating") : t("automations.create_btn")}
</button>
- <button className="link" onClick={onCancel}>cancel</button>
+ <button className="link" onClick={onCancel}>{t("automations.cancel")}</button>
</div>
</div>
);
@@ -288,6 +290,7 @@ function TaskDetail({
) => void;
onRunNow: (taskId: string, title?: string) => void;
}) {
+ const { t: tt } = useTranslation();
const [task, setTask] = useState<Automation | null>(null);
const [runs, setRuns] = useState<AutomationRun[]>([]);
const [editing, setEditing] = useState(false);
@@ -328,7 +331,7 @@ function TaskDetail({
if (!task)
return (
<Shell>
- <div className="text-[13px] text-muted">Loading…</div>
+ <div className="text-[13px] text-muted">{tt("automations.loading")}</div>
</Shell>
);
@@ -367,7 +370,7 @@ function TaskDetail({
return (
<Shell>
<button className="text-[13px] text-muted hover:text-ink mb-3" onClick={onBack}>
- ← Automations
+ {tt("automations.back_to_automations")}
</button>
<div className="sched-detail">
<div className="sched-detail-head">
@@ -376,7 +379,7 @@ function TaskDetail({
className="tmpl-input sched-edit-title"
value={title}
onChange={(e) => setTitle(e.target.value)}
- placeholder="Title"
+ placeholder={tt("automations.title_label")}
/>
) : (
<h2 className="text-[20px] font-semibold tracking-tight">{task.title}</h2>
@@ -385,18 +388,18 @@ function TaskDetail({
{editing ? (
<>
<button className="btn-primary sm" disabled={saving || !title.trim() || !instructions.trim()} onClick={saveEdit}>
- {saving ? "Saving…" : "Save"}
+ {saving ? tt("automations.saving") : tt("automations.save")}
</button>
- <button className="link" onClick={() => setEditing(false)}>cancel</button>
+ <button className="link" onClick={() => setEditing(false)}>{tt("automations.cancel")}</button>
</>
) : (
<>
<button className="btn-primary sm" onClick={() => onRunNow(id, task.title)}>
- ▶ Run now
+ {tt("automations.run_now")}
</button>
- <button className="btn sm" onClick={startEdit}>Edit</button>
+ <button className="btn sm" onClick={startEdit}>{tt("automations.edit")}</button>
<button className="btn sm danger-btn" onClick={remove}>
- <Icon name="trash" size={14} /> Delete
+ <Icon name="trash" size={14} /> {tt("automations.delete")}
</button>
</>
)}
@@ -406,15 +409,15 @@ function TaskDetail({
{editing ? (
<div className="tmpl-sched sched-edit-sched">
<label className="tmpl-field">
- <span>At</span>
+ <span>{tt("automations.at")}</span>
<input type="time" className="tmpl-input tmpl-time" value={time} onChange={(e) => setTime(e.target.value)} />
</label>
<label className="tmpl-field">
- <span>Repeat</span>
+ <span>{tt("automations.repeat")}</span>
<select className="tmpl-input tmpl-select" value={freq} onChange={(e) => setFreq(e.target.value)}>
- <option value="daily">Every day</option>
- <option value="weekdays">Weekdays</option>
- <option value="weekends">Weekends</option>
+ <option value="daily">{tt("automations.freq_daily")}</option>
+ <option value="weekdays">{tt("automations.freq_weekdays")}</option>
+ <option value="weekends">{tt("automations.freq_weekends")}</option>
</select>
</label>
</div>
@@ -424,11 +427,11 @@ function TaskDetail({
<input type="checkbox" checked={task.enabled} onChange={toggle} />
<span className="slider" />
</label>{" "}
- {task.enabled ? `Active · next ${fmt(task.next_run)}` : "Paused"} · {task.schedule}
+ {task.enabled ? tt("automations.active_next", { time: fmt(task.next_run) }) : tt("automations.paused")} · {task.schedule}
</div>
)}
- <div className="sa-sub">Instructions</div>
+ <div className="sa-sub">{tt("automations.instructions_label")}</div>
{editing ? (
<textarea
className="tmpl-input tmpl-textarea sched-edit-instr"
@@ -441,9 +444,9 @@ function TaskDetail({
{(task.always_allowed || []).length > 0 && (
<>
- <div className="sa-sub">Allowed without asking</div>
+ <div className="sa-sub">{tt("automations.allowed_without_asking")}</div>
<div className="dim" style={{ marginBottom: 8, fontSize: 12.5 }}>
- Standing approvals this automation may use — everything else still asks first.
+ {tt("automations.allowed_desc")}
</div>
<div className="sched-grants" data-testid="task-grants">
{(task.always_allowed || []).map((rule) => (
@@ -454,13 +457,13 @@ function TaskDetail({
</span>
<button
className="link"
- title="This automation will ask for approval again"
+ title={tt("automations.revoke_title")}
onClick={async () => {
await updateAutomation(id, { revoke: rule.entry });
refresh();
}}
>
- Revoke
+ {tt("automations.revoke")}
</button>
</div>
))}
@@ -468,11 +471,11 @@ function TaskDetail({
</>
)}
- <div className="sa-sub">Runs</div>
+ <div className="sa-sub">{tt("automations.runs_label")}</div>
<div className="dim" style={{ marginBottom: 8, fontSize: 12.5 }}>
- Each run is a live conversation — open one to see what the agent did and ask a follow-up.
+ {tt("automations.runs_desc")}
</div>
- {runs.length === 0 && <div className="dim">No runs yet.</div>}
+ {runs.length === 0 && <div className="dim">{tt("automations.no_runs")}</div>}
{runs.map((r) => (
<div
className="sched-run open"
@@ -484,18 +487,18 @@ function TaskDetail({
title: task.title,
})
}
- title="Open this run's conversation"
+ title={tt("automations.open_run")}
>
<div className="sched-run-row">
<span>
{seenMark !== null && r.started_at > seenMark && (
- <span className="run-new-pill" data-testid="run-new">new</span>
+ <span className="run-new-pill" data-testid="run-new">{tt("automations.new_pill")}</span>
)}
{fmt(r.started_at)} · <span className={"run-" + r.status}>{r.status}</span> · {r.trigger}
- {r.artifacts.length > 0 && <span className="dim"> · {r.artifacts.length} file(s)</span>}
+ {r.artifacts.length > 0 && <span className="dim"> · {tt("automations.file_count", { count: r.artifacts.length })}</span>}
</span>
<span className="sched-run-go" aria-hidden>
- Open ›
+ {tt("automations.open_go")}
</span>
</div>
{r.result_text && <div className="sched-run-peek">{r.result_text}</div>}
diff --git a/surfaces/gui/src/components/SearchModal.tsx b/surfaces/gui/src/components/SearchModal.tsx
index 8cfd1354..83445a65 100644
--- a/surfaces/gui/src/components/SearchModal.tsx
+++ b/surfaces/gui/src/components/SearchModal.tsx
@@ -1,4 +1,5 @@
import { useEffect, useRef, useState } from "react";
+import { useTranslation } from "react-i18next";
import type { Persona } from "../api";
import type { SessionInfo } from "../types";
import { isProjectScoped, shortPersonaName } from "../personaScope";
@@ -23,6 +24,7 @@ export function SearchModal({
onSelect: (id: string, workspace: string, agent: string) => void;
onClose: () => void;
}) {
+ const { t } = useTranslation();
const [query, setQuery] = useState("");
const [active, setActive] = useState(0);
const inputRef = useRef<HTMLInputElement>(null);
@@ -119,7 +121,7 @@ export function SearchModal({
ref={inputRef}
value={query}
onChange={(e) => setQuery(e.target.value)}
- placeholder="Search chats"
+ placeholder={t("search.placeholder")}
className="flex-1 bg-transparent outline-none text-[14px] text-ink placeholder:text-faint"
/>
<kbd className="text-[11px] text-faint bg-paper border border-line rounded px-1.5 py-0.5 font-sans">
@@ -128,13 +130,13 @@ export function SearchModal({
</div>
<div className="max-h-[52vh] overflow-y-auto hairline-scroll py-2">
{ordered.length === 0 ? (
- <div className="px-4 py-8 text-center text-[13px] text-faint">No chats found.</div>
+ <div className="px-4 py-8 text-center text-[13px] text-faint">{t("search.no_results")}</div>
) : (
<>
{pinned.length > 0 && (
<div className="px-2">
<div className="px-2 py-1 text-[11px] uppercase tracking-[0.05em] text-faint font-semibold">
- Pinned chats
+ {t("search.pinned")}
</div>
{pinned.map((s, i) => row(s, i))}
</div>
@@ -142,7 +144,7 @@ export function SearchModal({
{recent.length > 0 && (
<div className="px-2 mt-1">
<div className="px-2 py-1 text-[11px] uppercase tracking-[0.05em] text-faint font-semibold">
- Recent chats
+ {t("search.recent")}
</div>
{recent.map((s, i) => row(s, pinned.length + i))}
</div>
diff --git a/surfaces/gui/src/components/SendFolderDialog.tsx b/surfaces/gui/src/components/SendFolderDialog.tsx
index 72480ac3..1eadf625 100644
--- a/surfaces/gui/src/components/SendFolderDialog.tsx
+++ b/surfaces/gui/src/components/SendFolderDialog.tsx
@@ -1,4 +1,5 @@
import { useEffect, useState } from "react";
+import { useTranslation } from "react-i18next";
import { getRecentWorkspaces, openWorkspace, type RecentWorkspace } from "../api";
import { chooseFolder } from "../tauri";
import { baseName } from "../paths";
@@ -16,6 +17,7 @@ interface Props {
}
export function SendFolderDialog({ coworkerName, onPick, onTemp, onCancel }: Props) {
+ const { t } = useTranslation();
const [recents, setRecents] = useState<RecentWorkspace[]>([]);
const [error, setError] = useState("");
const [busy, setBusy] = useState(false);
@@ -36,7 +38,7 @@ export function SendFolderDialog({ coworkerName, onPick, onTemp, onCancel }: Pro
setError("");
const res = await openWorkspace(path);
if (res.ok) onPick(res.path, res.git_branch);
- else setError(res.error || "could not open that folder");
+ else setError(res.error || t("folder_gate.open_error"));
};
const browse = async () => {
@@ -52,11 +54,9 @@ export function SendFolderDialog({ coworkerName, onPick, onTemp, onCancel }: Pro
onClick={(e) => e.stopPropagation()}
>
<h3 className="text-[14px] font-semibold text-ink mb-1">
- Where should {coworkerName} work?
+ {t("folder_gate.where_work", { name: coworkerName })}
</h3>
- <p className="text-[13px] text-muted mb-3">
- Code work happens inside a folder — pick your project, or start somewhere temporary.
- </p>
+ <p className="text-[13px] text-muted mb-3">{t("folder_gate.send_sub")}</p>
{recents
.filter((w) => w.exists)
.slice(0, 4)
@@ -78,7 +78,7 @@ export function SendFolderDialog({ coworkerName, onPick, onTemp, onCancel }: Pro
onClick={() => void browse()}
disabled={busy}
>
- Choose a folder…
+ {t("folder_gate.choose_a_folder")}
</button>
<button
className="flex-1 text-center text-[13px] px-2.5 py-2 rounded-lg bg-accent text-white font-semibold hover:opacity-95"
@@ -90,14 +90,11 @@ export function SendFolderDialog({ coworkerName, onPick, onTemp, onCancel }: Pro
}}
disabled={busy}
>
- Use temporary folder
+ {t("folder_gate.use_temp")}
</button>
</div>
{error && <div className="mt-2 text-[12px] text-warnInk">{error}</div>}
- <p className="text-[11px] text-faint mt-2.5">
- A temporary folder is created only when you send, with git ready — you can save it as a
- project later. Your message sends as soon as you choose.
- </p>
+ <p className="text-[11px] text-faint mt-2.5">{t("folder_gate.temp_note")}</p>
</div>
</div>
);
diff --git a/surfaces/gui/src/components/SessionSetupRow.tsx b/surfaces/gui/src/components/SessionSetupRow.tsx
index 0f698370..0faec905 100644
--- a/surfaces/gui/src/components/SessionSetupRow.tsx
+++ b/surfaces/gui/src/components/SessionSetupRow.tsx
@@ -1,4 +1,5 @@
import { useState } from "react";
+import { useTranslation } from "react-i18next";
import { getRecentWorkspaces, openWorkspace, type Persona, type RecentWorkspace } from "../api";
import { chooseFolder } from "../tauri";
import { fullPersonaName } from "../personaScope";
@@ -27,6 +28,7 @@ interface Props {
}
export function SessionSetupRow(props: Props) {
+ const { t } = useTranslation();
const [openMenu, setOpenMenu] = useState<"coworker" | "folder" | null>(null);
const [recents, setRecents] = useState<RecentWorkspace[] | null>(null);
const [error, setError] = useState("");
@@ -44,7 +46,7 @@ export function SessionSetupRow(props: Props) {
const pickFolder = async (path: string) => {
const res = await openWorkspace(path);
if (!res.ok) {
- setError(res.error || "could not open that folder");
+ setError(res.error || t("folder_gate.open_error"));
return;
}
setOpenMenu(null);
@@ -100,7 +102,7 @@ export function SessionSetupRow(props: Props) {
props.onImport();
}}
>
- Import coworker…
+ {t("setup.import_coworker")}
</button>
<button
className="w-full text-left px-2.5 py-1.5 rounded-lg hover:bg-paper text-[12px] text-accent"
@@ -109,7 +111,7 @@ export function SessionSetupRow(props: Props) {
props.onManage();
}}
>
- Manage coworkers…
+ {t("setup.manage_coworkers")}
</button>
</div>
</div>
@@ -121,7 +123,9 @@ export function SessionSetupRow(props: Props) {
<div className="relative">
<button className={chip} data-testid="folder-chip" onClick={() => toggle("folder")}>
<Icon name="folder" size={13} />
- <span className="max-w-[220px] truncate">{props.folderName || "Choose folder"}</span>
+ <span className="max-w-[220px] truncate">
+ {props.folderName || t("setup.choose_folder")}
+ </span>
<Icon name="chevronDown" size={12} className="text-faint" />
</button>
{openMenu === "folder" && (
@@ -148,7 +152,7 @@ export function SessionSetupRow(props: Props) {
className="w-full text-left px-2.5 py-1.5 rounded-lg hover:bg-paper text-[12px] text-accent"
onClick={() => void browse()}
>
- {props.folderName ? "Choose another folder…" : "Choose a folder…"}
+ {props.folderName ? t("setup.choose_another_folder") : t("setup.choose_a_folder")}
</button>
</div>
{error && <div className="px-2.5 py-1 text-[12px] text-warnInk">{error}</div>}
diff --git a/surfaces/gui/src/components/SettingsView.tsx b/surfaces/gui/src/components/SettingsView.tsx
index 000dc658..4c65970a 100644
--- a/surfaces/gui/src/components/SettingsView.tsx
+++ b/surfaces/gui/src/components/SettingsView.tsx
@@ -1,4 +1,6 @@
import { useEffect, useState } from "react";
+import { getI18n, useTranslation } from "react-i18next";
+import { getStoredLanguage, setLanguage as setI18nLanguage, type Lang } from "../i18n";
import {
getSettings,
getTrustedWorkspaces,
@@ -66,16 +68,16 @@ const BTN_BORDERED =
const SET_TABS: {
key: SetTab;
- label: string;
+ labelKey: string;
icon: "sliders" | "code" | "mic" | "archive" | "sparkle" | "book" | "refresh";
}[] = [
- { key: "appearance", label: "General", icon: "sliders" },
- { key: "models", label: "Models", icon: "code" },
- { key: "context", label: "Context optimization", icon: "refresh" },
- { key: "skills", label: "Skills", icon: "book" },
- { key: "voice", label: "Voice input", icon: "mic" },
- { key: "memory", label: "Memory", icon: "archive" },
- { key: "personas", label: "Coworkers", icon: "sparkle" },
+ { key: "appearance", labelKey: "settings.tab.general", icon: "sliders" },
+ { key: "models", labelKey: "settings.tab.models", icon: "code" },
+ { key: "context", labelKey: "settings.tab.context", icon: "refresh" },
+ { key: "skills", labelKey: "settings.tab.skills", icon: "book" },
+ { key: "voice", labelKey: "settings.tab.voice", icon: "mic" },
+ { key: "memory", labelKey: "settings.tab.memory", icon: "archive" },
+ { key: "personas", labelKey: "settings.tab.personas", icon: "sparkle" },
];
export function SettingsView({
@@ -89,11 +91,12 @@ export function SettingsView({
// prefilled — the worker builds the skill and proposes it via save_skill.
onCreateSkill?: (description: string) => void;
}) {
+ const { t } = useTranslation();
// Personas is flag-gated (hidden for launch) — filter the tab AND coerce a stale
// deep-link to it (openSettings("personas") callers) so the page never opens on a
// section with no nav entry.
const personas = showPersonas();
- const tabs = personas ? SET_TABS : SET_TABS.filter((t) => t.key !== "personas");
+ const tabs = personas ? SET_TABS : SET_TABS.filter((tab) => tab.key !== "personas");
const wanted = initialTab && (personas || initialTab !== "personas") ? initialTab : "appearance";
const [tab, setTab] = useState<SetTab>(wanted);
@@ -101,20 +104,20 @@ export function SettingsView({
<main className="flex-1 min-w-0 flex bg-paper">
<nav className="page-subnav w-[208px] shrink-0 border-r border-line bg-panel/40 px-3 py-4">
<div className="px-2 text-[13px] font-semibold mb-3 flex items-center gap-2">
- <Icon name="gear" size={16} /> Settings
+ <Icon name="gear" size={16} /> {t("nav.settings")}
</div>
- {tabs.map((t) => {
- const active = tab === t.key;
+ {tabs.map((tb) => {
+ const active = tab === tb.key;
return (
<button
- key={t.key}
+ key={tb.key}
className={
"w-full text-left px-2.5 py-2 rounded-lg text-[13px] flex items-center gap-2 " +
(active ? "bg-paper text-accent font-medium" : "text-muted hover:bg-paper hover:text-ink")
}
- onClick={() => setTab(t.key)}
+ onClick={() => setTab(tb.key)}
>
- <Icon name={t.icon} size={15} /> {t.label}
+ <Icon name={tb.icon} size={15} /> {t(tb.labelKey)}
</button>
);
})}
@@ -127,8 +130,8 @@ export function SettingsView({
) : tab === "models" ? (
<section>
<PanelHead
- title="Models"
- sub="Providers and the models offered in the composer's picker. Keys are stored only on this computer."
+ title={t("settings.tab.models")}
+ sub={t("settings.models_sub")}
/>
<ModelsTab />
</section>
@@ -158,7 +161,11 @@ export function SettingsView({
// -- Voice input: deliberate model provisioning + compatibility + microphone test (§37) --------
const voiceError = (error: unknown) =>
- error instanceof Error ? error.message : typeof error === "string" ? error : "Voice Input could not complete that action.";
+ error instanceof Error
+ ? error.message
+ : typeof error === "string"
+ ? error
+ : getI18n().getFixedT(null, "translation")("settings.voice_action_failed");
const formatBytes = (bytes: number) => {
if (!bytes) return "0 MiB";
@@ -166,6 +173,7 @@ const formatBytes = (bytes: number) => {
};
function VoiceInputSection() {
+ const { t } = useTranslation();
const [status, setStatus] = useState<DictationStatus | null>(null);
const [progress, setProgress] = useState<DictationDownloadProgress | null>(null);
const [phase, setPhase] = useState<"idle" | "downloading" | "verifying" | "testing" | "transcribing">("idle");
@@ -240,7 +248,7 @@ function VoiceInputSection() {
};
const remove = async () => {
- if (!window.confirm("Delete the local Whisper model and disable Voice Input?")) return;
+ if (!window.confirm(t("settings.voice_delete_confirm"))) return;
setError(null);
try {
publish(await deleteDictationModel());
@@ -259,7 +267,7 @@ function VoiceInputSection() {
setPhase("transcribing");
const transcript = (await stopDictation()).trim();
setTestTranscript(transcript);
- if (!transcript) throw new Error("No speech was detected. Try again and speak for a little longer.");
+ if (!transcript) throw new Error(t("settings.voice_no_speech"));
publish(await markDictationTestPassed());
} else {
setTestTranscript("");
@@ -283,37 +291,38 @@ function VoiceInputSection() {
return (
<section>
<PanelHead
- title="Voice input"
- sub="Speak naturally in the composer. Recordings and transcripts stay on this device."
+ title={t("settings.tab.voice")}
+ sub={t("settings.voice_intro")}
/>
{!desktop ? (
- <div className={CARD + " p-4 text-[13px] text-muted"}>Voice Input setup is available in the OpenWorker desktop app.</div>
+ <div className={CARD + " p-4 text-[13px] text-muted"}>{t("settings.voice_desktop_only")}</div>
) : (
<div className="space-y-4">
<div className="rounded-xl border border-green-200 bg-green-50/70 px-4 py-3 text-[13px] text-green-800">
- <span className="font-medium">Private by design.</span> Audio is held in memory only while you record and is transcribed locally.
+ <span className="font-medium">{t("settings.voice_private_title")}</span>{" "}
+ {t("settings.voice_private_body")}
</div>
<div className={CARD}>
<div className="p-4 flex items-start gap-3">
<Icon name="code" size={18} className="text-accent mt-0.5" />
<div className="min-w-0 flex-1">
- <div className="text-[13px] font-medium">This device</div>
- <div className="text-[12px] text-muted mt-1">{status?.device_summary || "Checking compatibility…"}</div>
+ <div className="text-[13px] font-medium">{t("settings.voice_device_title")}</div>
+ <div className="text-[12px] text-muted mt-1">{status?.device_summary || t("settings.voice_checking")}</div>
{status?.compatibility_reason && <div className="text-[12px] text-red-600 mt-1.5">{status.compatibility_reason}</div>}
</div>
{status && (
<span className={"text-[12px] px-2 py-1 rounded-full " + (status.supported ? "bg-green-50 text-green-700" : "bg-red-50 text-red-600")}>
- {status.supported ? "● Compatible" : "Unsupported"}
+ {status.supported ? `● ${t("settings.voice_compatible")}` : t("settings.voice_unsupported")}
</span>
)}
</div>
<div className="border-t border-line bg-paper/50 px-4 py-3 grid grid-cols-2 gap-3 text-[12px] text-muted">
- <div><span className="block text-ink font-medium">Mac</span>macOS 12+ · Apple Silicon M1+</div>
- <div><span className="block text-ink font-medium">Windows</span>Windows 10 22H2/11 · x64</div>
- <div><span className="block text-ink font-medium">Memory</span>8 GB recommended</div>
- <div><span className="block text-ink font-medium">Processor</span>4 CPU cores recommended</div>
+ <div><span className="block text-ink font-medium">{t("settings.voice_mac")}</span>{t("settings.voice_mac_detail")}</div>
+ <div><span className="block text-ink font-medium">{t("settings.voice_windows")}</span>{t("settings.voice_windows_detail")}</div>
+ <div><span className="block text-ink font-medium">{t("settings.voice_memory")}</span>{t("settings.voice_memory_detail")}</div>
+ <div><span className="block text-ink font-medium">{t("settings.voice_processor")}</span>{t("settings.voice_processor_detail")}</div>
</div>
</div>
@@ -321,29 +330,31 @@ function VoiceInputSection() {
<div className="p-4 flex items-center gap-3">
<div className="w-9 h-9 rounded-lg bg-accentSoft text-accent grid place-items-center font-semibold">W</div>
<div className="min-w-0 flex-1">
- <div className="text-[13px] font-medium">Whisper Base · English</div>
+ <div className="text-[13px] font-medium">{t("settings.voice_whisper_title")}</div>
<div className="text-[12px] text-muted mt-0.5">
- {status?.model_verified ? `Installed and verified · ${formatBytes(status.model_bytes)}` : `Local voice model · ${formatBytes(status?.model_bytes || 147_964_211)}`}
+ {status?.model_verified
+ ? t("settings.voice_installed", { size: formatBytes(status.model_bytes) })
+ : t("settings.voice_not_installed", { size: formatBytes(status?.model_bytes || 147_964_211) })}
</div>
</div>
{status?.model_verified ? (
<>
- <span className="text-[12px] px-2 py-1 rounded-full bg-green-50 text-green-700">Verified</span>
- <button className={BTN_BORDERED} onClick={() => void repair()}>Repair</button>
- <button className="text-[12px] text-red-600 px-2 py-2" onClick={() => void remove()}>Delete</button>
+ <span className="text-[12px] px-2 py-1 rounded-full bg-green-50 text-green-700">{t("settings.voice_verified")}</span>
+ <button className={BTN_BORDERED} onClick={() => void repair()}>{t("settings.voice_repair")}</button>
+ <button className="text-[12px] text-red-600 px-2 py-2" onClick={() => void remove()}>{t("settings.voice_delete")}</button>
</>
) : downloading ? (
- <button className={BTN_BORDERED} onClick={() => void cancelDownload()}>Cancel</button>
+ <button className={BTN_BORDERED} onClick={() => void cancelDownload()}>{t("common.stop")}</button>
) : phase === "verifying" ? (
- <span className="text-[12px] text-muted">Verifying…</span>
+ <span className="text-[12px] text-muted">{t("settings.voice_verifying")}</span>
) : (
- <button className={BTN_ACCENT} disabled={!status?.supported} onClick={() => void download()}>Download model</button>
+ <button className={BTN_ACCENT} disabled={!status?.supported} onClick={() => void download()}>{t("settings.voice_download")}</button>
)}
</div>
{downloading && (
<div className="border-t border-line px-4 py-3">
<div className="h-1.5 rounded-full bg-line overflow-hidden"><div className="h-full bg-accent transition-all" style={{ width: `${progressPercent}%` }} /></div>
- <div className="mt-1.5 text-[12px] text-muted flex"><span>{formatBytes(progress?.downloaded_bytes || 0)} of {formatBytes(progressTotal)}</span><span className="ml-auto">{progressPercent}%</span></div>
+ <div className="mt-1.5 text-[12px] text-muted flex"><span>{t("settings.voice_dl_progress", { done: formatBytes(progress?.downloaded_bytes || 0), total: formatBytes(progressTotal) })}</span><span className="ml-auto">{progressPercent}%</span></div>
</div>
)}
</div>
@@ -352,17 +363,23 @@ function VoiceInputSection() {
<div className="p-4 flex items-center gap-3">
<Icon name="mic" size={18} className={ready ? "text-green-600" : "text-muted"} />
<div className="min-w-0 flex-1">
- <div className="text-[13px] font-medium">Microphone test</div>
+ <div className="text-[13px] font-medium">{t("settings.voice_mic_test_title")}</div>
<div className="text-[12px] text-muted mt-0.5">
- {ready ? "Your microphone and local transcription engine are working." : "Record a short phrase to enable the composer microphone."}
+ {ready ? t("settings.voice_mic_test_ready") : t("settings.voice_mic_test_pending")}
</div>
</div>
- {ready && <span className="text-[12px] px-2 py-1 rounded-full bg-green-50 text-green-700">● Ready</span>}
+ {ready && <span className="text-[12px] px-2 py-1 rounded-full bg-green-50 text-green-700">● {t("settings.voice_ready_badge")}</span>}
<button className={BTN_BORDERED} disabled={!status?.supported || !status?.model_verified || phase === "transcribing"} onClick={() => void toggleTest()}>
- {status?.recording ? "Stop and check" : phase === "transcribing" ? "Transcribing…" : ready ? "Test again" : "Test microphone"}
+ {status?.recording
+ ? t("settings.voice_stop_check")
+ : phase === "transcribing"
+ ? t("settings.voice_transcribing")
+ : ready
+ ? t("settings.voice_test_again")
+ : t("settings.voice_test_mic")}
</button>
</div>
- {status?.recording && <div className="border-t border-line px-4 py-3 text-[12px] text-accent" role="status">● Listening… speak a short phrase, then stop.</div>}
+ {status?.recording && <div className="border-t border-line px-4 py-3 text-[12px] text-accent" role="status">{t("settings.voice_listening")}</div>}
{testTranscript && <div className="border-t border-line bg-paper/50 px-4 py-3 text-[13px]">“{testTranscript}”</div>}
</div>
@@ -380,13 +397,12 @@ function VoiceInputSection() {
// GitHub / folder / zip only. GalleryModal stays in the tree for the gallery's
// possible return as a first-class distribution surface, but nothing mounts it.
function PersonasSection({ onOpenPersona }: { onOpenPersona?: (id: string) => void }) {
+ const { t } = useTranslation();
return (
<section>
- <PanelHead title="Coworkers" sub="Manage your coworkers and add new ones." />
+ <PanelHead title={t("settings.tab.personas")} sub={t("settings.personas_intro")} />
<p className="text-[13px] text-muted leading-relaxed max-w-[560px] mt-5 mb-1">
- Coworkers are agents specialized for a particular role or task. They come equipped
- with the tools and skills to be successful in that role. Enabling a coworker lets
- you pick it when starting a conversation.
+ {t("settings.personas_desc")}
</p>
<PersonasTab onOpenPersona={onOpenPersona} />
</section>
@@ -395,10 +411,13 @@ function PersonasSection({ onOpenPersona }: { onOpenPersona?: (id: string) => vo
// -- Appearance + app behaviour ------------------------------------------------
function AppearanceSection() {
+ const { t } = useTranslation();
const [theme, setTheme] = useThemePref();
const [autostart, setAuto] = useState(false);
const [keepAwake, setKeep] = useState(false);
const desktop = isTauri();
+ // "system" = no explicit choice persisted; the app follows the OS locale.
+ const [currentLang, setCurrentLang] = useState<Lang | "system">(() => getStoredLanguage() ?? "system");
useEffect(() => {
if (isTauri()) {
@@ -413,21 +432,41 @@ function AppearanceSection() {
await setOnboarded(false);
window.dispatchEvent(new CustomEvent("coworker:open-onboarding"));
};
+ const changeLang = (lang: Lang | "system") => {
+ setCurrentLang(lang);
+ void setI18nLanguage(lang === "system" ? null : lang);
+ };
return (
<section>
- <PanelHead title="General" sub="How OpenWorker looks and behaves on this machine." />
+ <PanelHead title={t("settings.general_title")} sub={t("settings.general_sub")} />
<div className={CARD + " p-4 mb-4"}>
- <div className={FIELD_LABEL}>Theme</div>
- <div className="seg mt-2.5" role="radiogroup" aria-label="Appearance">
+ <div className={FIELD_LABEL}>{t("settings.theme")}</div>
+ <div className="seg mt-2.5" role="radiogroup" aria-label={t("settings.appearance_aria")}>
{(["light", "dark", "auto"] as const).map((p) => (
<button key={p} className={p === theme ? "active" : ""} onClick={() => setTheme(p)}>
- {p === "light" ? "Light" : p === "dark" ? "Dark" : "Auto"}
+ {p === "light" ? t("settings.theme_light") : p === "dark" ? t("settings.theme_dark") : t("settings.theme_auto")}
</button>
))}
</div>
- <div className={FIELD_HELP}>Auto follows your Mac&rsquo;s appearance.</div>
+ <div className={FIELD_HELP}>{t("settings.theme_auto_help")}</div>
+ </div>
+
+ <div className={CARD + " p-4 mb-4"}>
+ <div className={FIELD_LABEL}>{t("settings.language")}</div>
+ <div className="seg mt-2.5" role="radiogroup" aria-label={t("settings.language_aria")}>
+ {(["system", "en", "zh"] as const).map((lng) => (
+ <button
+ key={lng}
+ className={lng === currentLang ? "active" : ""}
+ onClick={() => changeLang(lng)}
+ >
+ {lng === "zh" ? t("settings.language_zh") : lng === "en" ? t("settings.language_en") : t("settings.language_system")}
+ </button>
+ ))}
+ </div>
+ <div className={FIELD_HELP}>{t("settings.language_help")}</div>
</div>
<SidebarCard />
@@ -442,19 +481,19 @@ function AppearanceSection() {
{desktop && (
<div className={CARD + " p-4"}>
- <div className={FIELD_LABEL + " mb-2.5"}>Always-on</div>
+ <div className={FIELD_LABEL + " mb-2.5"}>{t("settings.always_on")}</div>
<label className="flex items-start gap-3 py-2">
<input type="checkbox" className="mt-0.5" checked={autostart} onChange={(e) => toggleAuto(e.target.checked)} />
<span>
- <span className="block text-[13px] text-ink">Open at login</span>
- <span className="block text-[12px] text-muted">Launch OpenWorker automatically when you sign in.</span>
+ <span className="block text-[13px] text-ink">{t("settings.open_at_login")}</span>
+ <span className="block text-[12px] text-muted">{t("settings.open_at_login_help")}</span>
</span>
</label>
<label className="flex items-start gap-3 py-2">
<input type="checkbox" className="mt-0.5" checked={keepAwake} onChange={(e) => toggleKeep(e.target.checked)} />
<span>
- <span className="block text-[13px] text-ink">Keep this system awake</span>
- <span className="block text-[12px] text-muted">Prevent idle sleep so scheduled tasks fire on time.</span>
+ <span className="block text-[13px] text-ink">{t("settings.keep_awake")}</span>
+ <span className="block text-[12px] text-muted">{t("settings.keep_awake_help")}</span>
</span>
</label>
</div>
@@ -464,20 +503,21 @@ function AppearanceSection() {
every build, the browser dev shell runs the same first-run flow) and, on
desktop, the manual update check (launch also checks automatically). */}
<div className={CARD + " p-4 mt-4"}>
- <div className={FIELD_LABEL + " mb-2"}>Setup &amp; updates</div>
+ <div className={FIELD_LABEL + " mb-2"}>{t("settings.setup_updates")}</div>
<div className="flex items-center gap-2">
<button className={BTN_BORDERED} onClick={runSetupAgain}>
- Run setup again
+ {t("settings.run_setup_again")}
</button>
{desktop && <UpdateInline />}
</div>
- <div className={FIELD_HELP}>Replays the first-run setup: model, first automation, tips.</div>
+ <div className={FIELD_HELP}>{t("settings.run_setup_help")}</div>
</div>
</section>
);
}
function TrustedWorkspacesCard() {
+ const { t } = useTranslation();
const [workspaces, setWorkspaces] = useState<WorkspaceCommandTrust[] | null>(null);
const refresh = () =>
@@ -490,21 +530,21 @@ function TrustedWorkspacesCard() {
}, []);
const revoke = async (path: string) => {
- if (!window.confirm(`Revoke command trust for ${path}?`)) return;
+ if (!window.confirm(t("settings.trust_revoke_confirm", { path }))) return;
await setWorkspaceTrusted(path, false);
refresh();
};
return (
<div className={CARD + " p-4 mb-4"} data-testid="trusted-workspaces-card">
- <div className={FIELD_LABEL}>Trusted workspaces</div>
+ <div className={FIELD_LABEL}>{t("settings.trusted_workspaces")}</div>
<div className={FIELD_HELP}>
- Trusted projects may manage their command allowances in .coworker/config.toml.
+ {t("settings.trusted_workspaces_help")}
</div>
{workspaces === null ? (
- <div className="text-[12px] text-muted mt-3">Loading…</div>
+ <div className="text-[12px] text-muted mt-3">{t("settings.trust_loading")}</div>
) : workspaces.length === 0 ? (
- <div className="text-[12px] text-muted mt-3">No workspaces are trusted.</div>
+ <div className="text-[12px] text-muted mt-3">{t("settings.trust_empty")}</div>
) : (
<div className="mt-3 divide-y divide-line">
{workspaces.map((workspace) => (
@@ -513,16 +553,16 @@ function TrustedWorkspacesCard() {
<div className="text-[13px] text-ink break-all">{workspace.workspace}</div>
<div className="text-[12px] text-muted mt-0.5">
{workspace.requested_commands.length
- ? `${workspace.requested_commands.length} project command allowance${workspace.requested_commands.length === 1 ? "" : "s"}`
- : "No project command allowances currently declared"}
- {!workspace.exists ? " · Folder unavailable" : ""}
+ ? t("settings.trust_allowances", { count: workspace.requested_commands.length })
+ : t("settings.trust_no_allowances")}
+ {!workspace.exists ? t("settings.trust_folder_unavailable") : ""}
</div>
</div>
<button
className="text-[12px] text-red-600 px-2 py-1"
onClick={() => void revoke(workspace.workspace)}
>
- Revoke
+ {t("settings.trust_revoke")}
</button>
</div>
))}
@@ -533,6 +573,7 @@ function TrustedWorkspacesCard() {
}
function UpdateInline() {
+ const { t } = useTranslation();
const [state, setState] = useState<"idle" | "checking" | "none" | "found" | "installing" | "error">("idle");
const [version, setVersion] = useState("");
@@ -564,7 +605,7 @@ function UpdateInline() {
<span className="inline-flex items-center gap-2.5">
{state === "found" ? (
<button className={BTN_BORDERED} onClick={install} data-testid="settings-update-install">
- Update to v{version} and restart
+ {t("settings.update_install", { version })}
</button>
) : (
<button
@@ -573,16 +614,16 @@ function UpdateInline() {
disabled={state === "checking" || state === "installing"}
data-testid="settings-update-check"
>
- {state === "checking" ? "Checking…" : "Check for updates"}
+ {state === "checking" ? t("settings.checking") : t("settings.check_for_updates")}
</button>
)}
{(state === "none" || state === "error" || state === "installing") && (
<span className="text-[12px] text-muted">
{state === "none"
- ? "You're on the latest version."
+ ? t("settings.update_latest")
: state === "error"
- ? "Couldn't check right now — try again later."
- : "Downloading — OpenWorker restarts by itself when it's ready."}
+ ? t("settings.update_error")
+ : t("settings.update_downloading")}
</span>
)}
</span>
@@ -599,6 +640,7 @@ function UpdateInline() {
// without native PDF support. (Long-history spend is handled by auto-compaction —
// the CompactionCard below, OPE-27.)
function TokenSavingsCard() {
+ const { t } = useTranslation();
const [pdf, setPdf] = useState<PdfSettings | null>(null);
useEffect(() => {
@@ -621,36 +663,33 @@ function TokenSavingsCard() {
if (!pdf) return null;
return (
<div className={CARD + " p-4 mb-4"} data-testid="token-savings-card">
- <div className={FIELD_LABEL}>Token savings</div>
+ <div className={FIELD_LABEL}>{t("settings.token_savings")}</div>
<div className={FIELD_HELP}>
- PDF attachments travel with every turn of a conversation, so large documents multiply
- what you spend on tokens.
+ {t("settings.token_savings_help")}
</div>
- <div className="mt-3 text-[13px] text-ink">PDFs on models without native PDF support</div>
- <div className="seg mt-2" role="radiogroup" aria-label="PDF fallback" data-testid="pdf-fallback">
+ <div className="mt-3 text-[13px] text-ink">{t("settings.pdf_fallback_label")}</div>
+ <div className="seg mt-2" role="radiogroup" aria-label={t("settings.pdf_fallback_aria")} data-testid="pdf-fallback">
<button
className={pdf.pdf_fallback === "text" ? "active" : ""}
onClick={() => save({ pdf_fallback: "text" })}
>
- Extract text
+ {t("settings.pdf_extract_text")}
</button>
<button
className={pdf.pdf_fallback === "images" ? "active" : ""}
onClick={() => save({ pdf_fallback: "images" })}
>
- Send page images
+ {t("settings.pdf_send_images")}
</button>
</div>
<div className={FIELD_HELP}>
- Claude, GPT and Gemini read PDFs natively — this only applies to models that
- don&rsquo;t (GLM, Kimi, DeepSeek, local models…). Text extraction is cheapest; page
- images cost more tokens and need a vision-capable model.
+ {t("settings.pdf_fallback_help")}
</div>
<div className="mt-3 flex items-center gap-5">
<label className="flex items-center gap-2.5">
- <span className="text-[13px] text-ink">Max pages</span>
+ <span className="text-[13px] text-ink">{t("settings.pdf_max_pages")}</span>
<input
type="number"
min={1}
@@ -662,7 +701,7 @@ function TokenSavingsCard() {
/>
</label>
<label className="flex items-center gap-2.5">
- <span className="text-[13px] text-ink">Max size</span>
+ <span className="text-[13px] text-ink">{t("settings.pdf_max_size")}</span>
<input
type="number"
min={1}
@@ -676,8 +715,7 @@ function TokenSavingsCard() {
</label>
</div>
<div className={FIELD_HELP}>
- PDFs over these limits are not attached — you&rsquo;ll see a notice in the composer
- instead.
+ {t("settings.pdf_limits_help")}
</div>
</div>
);
@@ -802,6 +840,7 @@ function CompactionCard() {
// The chip's bar is context-window occupancy; the session total (unbounded) lives in
// the popover. Some people would rather not watch a meter at all, hence the toggle.
function ContextBarCard() {
+ const { t } = useTranslation();
const [shown, setShown] = useState<boolean | null>(null);
useEffect(() => {
@@ -818,7 +857,7 @@ function ContextBarCard() {
if (shown === null) return null;
return (
<div className={CARD + " p-4 mb-4"} data-testid="context-bar-card">
- <div className={FIELD_LABEL}>Composer</div>
+ <div className={FIELD_LABEL}>{t("settings.composer_section")}</div>
<label className="flex items-start gap-3 py-2">
<input
type="checkbox"
@@ -828,11 +867,8 @@ function ContextBarCard() {
onChange={(e) => save(e.target.checked)}
/>
<span>
- <span className="block text-[13px] text-ink">Show the context window bar</span>
- <span className="block text-[12px] text-muted">
- A small meter showing how full the model&rsquo;s context window is. Turn it off
- to show the same thing as a number instead.
- </span>
+ <span className="block text-[13px] text-ink">{t("settings.context_bar_title")}</span>
+ <span className="block text-[12px] text-muted">{t("settings.context_bar_desc")}</span>
</span>
</label>
</div>
@@ -911,6 +947,7 @@ function AutoApproveCard() {
}
function SidebarCard() {
+ const { t } = useTranslation();
const [peek, setPeek] = useState<number | null>(null);
useEffect(() => {
@@ -928,9 +965,9 @@ function SidebarCard() {
if (peek === null) return null;
return (
<div className={CARD + " p-4 mb-4"}>
- <div className={FIELD_LABEL}>Sidebar</div>
+ <div className={FIELD_LABEL}>{t("settings.sidebar_card_title")}</div>
<label className="flex items-center gap-3 mt-2.5">
- <span className="text-[13px] text-ink">Conversations shown per coworker</span>
+ <span className="text-[13px] text-ink">{t("settings.sidebar_per_coworker")}</span>
<input
type="number"
min={1}
@@ -941,7 +978,7 @@ function SidebarCard() {
/>
</label>
<div className={FIELD_HELP}>
- Longer lists collapse behind &ldquo;Show more&rdquo;. Applies per coworker and per project.
+ {t("settings.sidebar_card_help")}
</div>
</div>
);
@@ -950,6 +987,7 @@ function SidebarCard() {
// -- Files (scratch location) — one card inside General (UX-021: a single option
// doesn't earn its own tab) -----------------------------------------------------
function FilesCard() {
+ const { t } = useTranslation();
const [settings, setSettings] = useState<ModelSettings | null>(null);
const [scratchDraft, setScratchDraft] = useState("");
const [scratchMsg, setScratchMsg] = useState<string | null>(null);
@@ -970,10 +1008,10 @@ function FilesCard() {
setScratchMsg(null);
const res = await setScratchBase(scratchDraft.trim());
if (res.ok) {
- setScratchMsg("Saved. New conversations will use this location.");
+ setScratchMsg(t("settings.files_saved"));
refresh();
} else {
- setScratchMsg(res.error || "Could not use that location.");
+ setScratchMsg(res.error || t("settings.files_save_error"));
}
};
const browseScratch = async () => {
@@ -985,12 +1023,12 @@ function FilesCard() {
return (
<div className={CARD + " p-4 mb-4"}>
- <div className={FIELD_LABEL}>Files</div>
+ <div className={FIELD_LABEL}>{t("settings.files_title")}</div>
<div className="flex items-center gap-2 mt-2.5">
<input
className={INPUT}
type="text"
- placeholder="~/OpenWorker"
+ placeholder={t("settings.scratch_placeholder")}
value={scratchDraft}
spellCheck={false}
autoComplete="off"
@@ -998,17 +1036,16 @@ function FilesCard() {
onKeyDown={(e) => e.key === "Enter" && saveScratch()}
/>
{desktop && (
- <button className={BTN_BORDERED} onClick={browseScratch} title="Pick a folder">
- Browse
+ <button className={BTN_BORDERED} onClick={browseScratch} title={t("settings.files_pick_folder")}>
+ {t("settings.files_browse")}
</button>
)}
<button className={BTN_ACCENT} onClick={saveScratch} disabled={!scratchDraft.trim()}>
- Save
+ {t("settings.files_save")}
</button>
</div>
<div className={FIELD_HELP}>
- Each conversation gets its own folder under this location. Existing conversations keep their current
- folder; you can grant access to more folders inside any conversation.
+ {t("settings.files_help")}
</div>
{scratchMsg && <div className="text-[13px] text-muted mt-2.5">{scratchMsg}</div>}
</div>
diff --git a/surfaces/gui/src/components/Sidebar.tsx b/surfaces/gui/src/components/Sidebar.tsx
index beeed874..a5e11fb8 100644
--- a/surfaces/gui/src/components/Sidebar.tsx
+++ b/surfaces/gui/src/components/Sidebar.tsx
@@ -1,4 +1,5 @@
import { useEffect, useMemo, useState, type ReactNode } from "react";
+import { getI18n, useTranslation } from "react-i18next";
import {
announceCloudChanged,
AUTOMATIONS_CHANGED,
@@ -45,11 +46,12 @@ const surfaceFromPersona = (p: Persona) => ({
// Attention = Inbox items awaiting a session (an accent count that bubbles session → persona →
// footer Inbox — all views of the one Inbox queue, never a second list).
function AttnBadge({ n }: { n: number }) {
+ const { t } = useTranslation();
if (!n) return null;
return (
<span
className="text-[11px] font-semibold text-ink bg-faint/30 rounded-full px-1.5 leading-[15px] shrink-0"
- title={`${n} awaiting your attention`}
+ title={t("sidebar.awaiting_attention", { n })}
>
{n > 99 ? "99+" : n}
</span>
@@ -60,11 +62,12 @@ function AttnBadge({ n }: { n: number }) {
// treatment as the attention badge; failure only colors the tooltip's words, not the
// sidebar (owner call 2026-07-20: no color, and the entry alone carries the count).
function UnseenBadge({ n, failed }: { n: number; failed?: boolean }) {
+ const { t } = useTranslation();
if (!n) return null;
return (
<span
className="text-[11px] font-semibold text-ink bg-faint/30 rounded-full px-1.5 leading-[15px] shrink-0"
- title={failed ? `${n} new run${n > 1 ? "s" : ""} — the latest failed` : `${n} new run${n > 1 ? "s" : ""}`}
+ title={failed ? t("sidebar.unseen_failed", { count: n }) : t("sidebar.unseen_new", { count: n })}
>
{n > 99 ? "99+" : n}
</span>
@@ -74,13 +77,14 @@ function UnseenBadge({ n, failed }: { n: number; failed?: boolean }) {
// Liveness = working (in-flight turn) / sleeping (a self-wake is pending). A count-less dot that
// never bubbles — it says "this is alive", not "this needs you".
function LiveDot({ state }: { state?: "working" | "sleeping" | "idle" }) {
+ const { t } = useTranslation();
if (state !== "working" && state !== "sleeping") return null;
return state === "working" ? (
- <span className="w-1.5 h-1.5 rounded-full bg-accent animate-pulse shrink-0" title="Working now" />
+ <span className="w-1.5 h-1.5 rounded-full bg-accent animate-pulse shrink-0" title={t("sidebar.status_working")} />
) : (
<span
className="w-1.5 h-1.5 rounded-full bg-faint/60 shrink-0"
- title="Sleeping (will wake itself)"
+ title={t("sidebar.status_sleeping")}
/>
);
}
@@ -88,12 +92,13 @@ function LiveDot({ state }: { state?: "working" | "sleeping" | "idle" }) {
// §31: a session spawned by a platform mention wears its platform's logo, right-aligned beside
// the title cluster (owner call 2026-07-13). Slack today; the origin key is the platform id.
function OriginIcon({ s }: { s: SessionInfo }) {
+ const { t } = useTranslation();
if (s.origin !== "slack") return null;
return (
<ConnectorIcon
connector={{ logo: "slack", brand_color: "#611f69" }}
size={12}
- title={s.origin_label || "From Slack"}
+ title={s.origin_label || t("sidebar.from_slack")}
/>
);
}
@@ -152,24 +157,26 @@ const compactAge = (iso?: string | null): string => {
if (!iso) return "";
const then = Date.parse(iso);
if (Number.isNaN(then)) return "";
+ const tt = getI18n().getFixedT(null, "translation");
const secs = Math.max(0, Math.floor((Date.now() - then) / 1000));
- if (secs < 60) return "now";
+ if (secs < 60) return tt("sidebar.age_now");
const mins = Math.floor(secs / 60);
- if (mins < 60) return `${mins}m`;
+ if (mins < 60) return tt("sidebar.age_m", { n: mins });
const hrs = Math.floor(mins / 60);
- if (hrs < 24) return `${hrs}h`;
+ if (hrs < 24) return tt("sidebar.age_h", { n: hrs });
const days = Math.floor(hrs / 24);
- if (days < 7) return `${days}d`;
+ if (days < 7) return tt("sidebar.age_d", { n: days });
const weeks = Math.floor(days / 7);
- if (days < 30) return `${weeks}w`;
+ if (days < 30) return tt("sidebar.age_w", { n: weeks });
const months = Math.floor(days / 30);
- if (days < 365) return `${months}mo`;
- return `${Math.floor(days / 365)}y`;
+ if (days < 365) return tt("sidebar.age_mo", { n: months });
+ return tt("sidebar.age_y", { n: Math.floor(days / 365) });
};
// Sessions shown per group before "Show more" comes from Settings (sessions_peek, default 5).
export function Sidebar(props: Props) {
+ const { t } = useTranslation();
const [searchModalOpen, setSearchModalOpen] = useState(false);
const [appMenuOpen, setAppMenuOpen] = useState(false);
// The account row (§26): cloud sign-in status drives the avatar/name/dot; refreshed on
@@ -458,8 +465,8 @@ export function Sidebar(props: Props) {
onClick={(e) => e.stopPropagation()}
>
<button
- title="Session actions"
- aria-label="Session actions"
+ title={t("sidebar.session_actions")}
+ aria-label={t("sidebar.session_actions")}
aria-haspopup="menu"
aria-expanded={menuOpen}
data-testid="row-menu"
@@ -480,20 +487,20 @@ export function Sidebar(props: Props) {
style={{ top: rowMenu!.top, left: rowMenu!.left }}
role="menu"
>
- {item("row-menu-rename", "pencil", "Rename", () => {
+ {item("row-menu-rename", "pencil", t("sidebar.rename"), () => {
setEditingId(s.session_id);
setEditValue(title);
})}
- {item("row-menu-pin", "pin", s.pinned ? "Unpin" : "Pin", () =>
+ {item("row-menu-pin", "pin", s.pinned ? t("sidebar.unpin") : t("sidebar.pin"), () =>
props.onTogglePin(s.session_id, !s.pinned),
)}
- {item("row-menu-archive", "archive", s.archived ? "Unarchive" : "Archive", () =>
+ {item("row-menu-archive", "archive", s.archived ? t("sidebar.unarchive") : t("sidebar.archive"), () =>
props.onArchiveSession(s.session_id, !s.archived),
)}
<div className="h-px bg-line my-1 mx-2" />
{confirmDelId === s.session_id ? (
<button
- title="Click again to permanently delete"
+ title={t("sidebar.confirm_delete")}
className="w-full flex items-center gap-2 px-2.5 py-1.5 text-[13px] text-left font-medium text-danger hover:bg-paper"
data-testid="row-menu-delete"
role="menuitem"
@@ -503,7 +510,7 @@ export function Sidebar(props: Props) {
}}
>
<Icon name="trash" size={13} className="shrink-0" />
- <span className="flex-1">Delete?</span>
+ <span className="flex-1">{t("sidebar.delete_confirm")}</span>
</button>
) : (
<button
@@ -513,7 +520,7 @@ export function Sidebar(props: Props) {
onClick={() => setConfirmDelId(s.session_id)}
>
<Icon name="trash" size={13} className="shrink-0" />
- <span className="flex-1">Delete</span>
+ <span className="flex-1">{t("sidebar.delete")}</span>
</button>
)}
</div>
@@ -670,7 +677,7 @@ export function Sidebar(props: Props) {
pinnedSessions.length > 0 ? (
<div>
<div className="px-1.5 text-[11px] uppercase tracking-[0.07em] text-faint font-semibold mb-1">
- Pinned
+ {t("sidebar.pinned")}
</div>
<div className="space-y-0.5">
{pinnedSessions.map((s) => cardRow(s))}
@@ -685,7 +692,7 @@ export function Sidebar(props: Props) {
automations.length > 0 ? (
<div data-testid="scheduled-band">
<div className="px-1.5 text-[11px] uppercase tracking-[0.07em] text-faint font-semibold mb-1">
- Scheduled
+ {t("sidebar.scheduled")}
</div>
<div className="space-y-0.5">
{automations.map((a) => (
@@ -717,12 +724,12 @@ export function Sidebar(props: Props) {
return (
<div className="relative flex items-center justify-between px-1.5 mb-1" data-testid="recent-header">
<span className="text-[11px] uppercase tracking-[0.07em] text-faint font-semibold">
- Recent
+ {t("sidebar.recent")}
</span>
<button
className="w-6 h-6 grid place-items-center rounded-md text-faint hover:text-ink hover:bg-chromeHover -mr-1"
- title="Group & filter conversations"
- aria-label="Group and filter conversations"
+ title={t("sidebar.group_and_filter_short")}
+ aria-label={t("sidebar.group_and_filter")}
onClick={() => setGroupMenuOpen((v) => !v)}
>
<Icon name="sliders" size={14} />
@@ -736,9 +743,9 @@ export function Sidebar(props: Props) {
data-testid="group-filter-menu"
>
<div className="px-2 pt-1 pb-1 text-[11px] uppercase tracking-[0.06em] text-faint font-semibold">
- Group by
+ {t("sidebar.group_by")}
</div>
- {([["grouped", "Coworker"], ["flat", "Chronological"]] as ["flat" | "grouped", string][]).map(
+ {([["grouped", t("sidebar.group_persona")], ["flat", t("sidebar.group_chrono")]] as ["flat" | "grouped", string][]).map(
([key, label]) => (
<button
key={key}
@@ -755,11 +762,11 @@ export function Sidebar(props: Props) {
<div className="my-1 border-t border-line" />
<div className="px-2 pt-1 pb-1 flex items-center justify-between">
<span className="text-[11px] uppercase tracking-[0.06em] text-faint font-semibold">
- Filter by coworker
+ {t("sidebar.filter_coworker")}
</span>
{filterPersonas.size > 0 && (
<button className="text-[11px] text-accent" onClick={() => setFilterPersonas(new Set())}>
- Clear
+ {t("sidebar.clear")}
</button>
)}
</div>
@@ -786,7 +793,7 @@ export function Sidebar(props: Props) {
})}
</div>
<div className="px-2 pt-1 pb-0.5 text-[11px] text-faint leading-snug">
- None checked shows all.
+ {t("sidebar.filter_all_hint")}
</div>
</>
)}
@@ -875,12 +882,12 @@ export function Sidebar(props: Props) {
rows carry a right-aligned compact age and truncate to PROJECT_PEEK + "Show more". */}
<div className="flex items-center justify-between px-1.5 pt-1">
<span className="text-[11px] uppercase tracking-[0.07em] text-faint font-semibold">
- Projects
+ {t("sidebar.projects")}
</span>
<button
className="w-5 h-5 grid place-items-center rounded text-faint hover:text-ink hover:bg-panel"
- title="New project"
- aria-label="New project"
+ title={t("sidebar.new_project")}
+ aria-label={t("sidebar.new_project")}
onClick={() => props.onNewProject(browseKey)}
>
<Icon name="folderPlus" size={14} />
@@ -889,7 +896,7 @@ export function Sidebar(props: Props) {
<div className="space-y-0.5">
{projectOrder.length === 0 && (
<div className="px-2 py-1.5 text-[12px] text-faint leading-snug">
- No projects yet — start one with the + above.
+ {t("sidebar.no_projects_yet")}
</div>
)}
{projectOrder.map((proj) => {
@@ -939,13 +946,13 @@ export function Sidebar(props: Props) {
className="px-2 py-1 text-[12px] text-faint hover:text-muted"
onClick={() => setProjShowAll((s) => toggleSet(s, proj))}
>
- Show more ({list.length - peek})
+ {t("sidebar.show_more_n", { n: list.length - peek })}
</button>
)}
</div>
) : (
<div className="px-2 py-1.5 pl-[19px] text-[12px] text-faint leading-snug">
- No conversations in this project yet.
+ {t("sidebar.no_project_convos")}
</div>
))}
</div>
@@ -957,7 +964,7 @@ export function Sidebar(props: Props) {
<div className="space-y-0.5">
{mine.filter(matches).length === 0 ? (
<div className="px-2 py-1.5 text-[12px] text-faint leading-snug">
- {normalizedQuery ? "No matching conversations." : "No conversations yet."}
+ {normalizedQuery ? t("sidebar.no_matching") : t("sidebar.no_conversations")}
</div>
) : (
<>
@@ -970,7 +977,7 @@ export function Sidebar(props: Props) {
className="px-2 py-1 text-[12px] text-faint hover:text-muted"
onClick={() => setPersonaShowAll((s) => toggleSet(s, browseKey))}
>
- Show more ({mine.filter(matches).length - peek})
+ {t("sidebar.show_more_n", { n: mine.filter(matches).length - peek })}
</button>
)}
</>
@@ -985,7 +992,7 @@ export function Sidebar(props: Props) {
onClick={() => setShowArchived((v) => !v)}
>
<Icon name={showArchived ? "chevronDown" : "chevronRight"} size={13} className="shrink-0" />
- Archived ({archived.length})
+ {t("sidebar.archived_n", { n: archived.length })}
</button>
{showArchived && (
<div className="space-y-0.5 mt-0.5">{archived.filter(matches).map((s) => sessionRow(s))}</div>
@@ -1010,8 +1017,8 @@ export function Sidebar(props: Props) {
{props.onCollapse && (
<button
className="nav-pin-btn w-7 h-7 grid place-items-center rounded-md text-faint hover:text-ink hover:bg-chromeHover shrink-0"
- title={props.collapsed ? "Dock sidebar (⌘B)" : "Collapse sidebar (⌘B)"}
- aria-label={props.collapsed ? "Dock sidebar" : "Collapse sidebar"}
+ title={props.collapsed ? t("sidebar.dock") + " (⌘B)" : t("sidebar.collapse") + " (⌘B)"}
+ aria-label={props.collapsed ? t("sidebar.dock") : t("sidebar.collapse")}
onClick={props.onCollapse}
>
<Icon name="sidebar" size={16} />
@@ -1028,7 +1035,7 @@ export function Sidebar(props: Props) {
className="w-full flex items-center gap-2.5 px-2.5 py-2 rounded-lg text-[13px] text-left font-medium text-ink hover:bg-chromeHover"
onClick={() => props.onNewSession(props.agent)}
>
- <Icon name="plus" size={15} className="shrink-0" /> New session
+ <Icon name="plus" size={15} className="shrink-0" /> {t("sidebar.new_session")}
</button>
</div>
@@ -1039,7 +1046,7 @@ export function Sidebar(props: Props) {
className="w-full flex items-center gap-2.5 px-2.5 py-2 rounded-lg text-[13px] text-left text-muted hover:bg-chromeHover hover:text-ink"
onClick={() => setSearchModalOpen(true)}
>
- <Icon name="search" size={15} className="shrink-0" /> Search
+ <Icon name="search" size={15} className="shrink-0" /> {t("sidebar.search")}
</button>
</div>
@@ -1055,7 +1062,7 @@ export function Sidebar(props: Props) {
onClick={props.onOpenScheduled}
>
<Icon name="clock" size={15} className="shrink-0" />
- <span className="flex-1">Automations</span>
+ <span className="flex-1">{t("sidebar.automations")}</span>
</button>
</div>
@@ -1117,7 +1124,7 @@ export function Sidebar(props: Props) {
<div className="space-y-0.5">
{recentSessions.length === 0 ? (
<div className="px-2 py-1.5 text-[12px] text-faint leading-snug">
- {normalizedQuery ? "No matching conversations." : "No conversations yet."}
+ {normalizedQuery ? t("sidebar.no_matching") : t("sidebar.no_conversations")}
</div>
) : (
<>
@@ -1131,8 +1138,8 @@ export function Sidebar(props: Props) {
onClick={() => setRecentExpanded((v) => !v)}
>
{recentExpanded
- ? "Show less"
- : `Show ${recentSessions.length - RECENT_PEEK} more`}
+ ? t("sidebar.show_less")
+ : t("sidebar.show_n_more", { n: recentSessions.length - RECENT_PEEK })}
</button>
)}
</>
@@ -1167,7 +1174,7 @@ export function Sidebar(props: Props) {
) : (
<>
<div className="px-3 py-1.5 text-[11px] text-faint border-b border-line">
- Not signed in — one-click connections need OpenWorker Cloud
+ {t("sidebar.not_signed_in")}
</div>
<button
className="w-full flex items-center gap-2.5 px-3 py-1.5 mb-1 text-[13px] text-left text-accent hover:bg-paper"
@@ -1185,33 +1192,32 @@ export function Sidebar(props: Props) {
});
}}
>
- <Icon name="plug" size={15} className="shrink-0" /> Sign in to OpenWorker
- Cloud
+ <Icon name="plug" size={15} className="shrink-0" /> {t("sidebar.sign_in")}
</button>
</>
)}
{appMenuItem(
"inbox",
- "Inbox",
+ t("nav.inbox"),
props.onOpenInbox,
props.inboxActive,
<AttnBadge n={totalAttention} />,
)}
- {appMenuItem("plug", "Connectors", props.onOpenIntegrations, props.integrationsActive)}
+ {appMenuItem("plug", t("nav.connectors"), props.onOpenIntegrations, props.integrationsActive)}
<div className="h-px bg-line my-1 mx-2" />
{appMenuItem(
"gear",
- "Settings",
+ t("nav.settings"),
props.onManage,
false,
<span className="text-[11px] text-faint">⌘ ,</span>,
)}
{/* No Automations here — the sidebar's top nav already carries it. */}
- {appMenuItem("audit", "Activity", props.onOpenAudit, props.auditActive)}
+ {appMenuItem("audit", t("nav.activity"), props.onOpenAudit, props.auditActive)}
{cloud?.signed_in && (
<>
<div className="h-px bg-line my-1 mx-2" />
- {appMenuItem("signOut", "Sign out", async () => {
+ {appMenuItem("signOut", t("sidebar.sign_out"), async () => {
await cloudLogout().catch(() => {});
announceCloudChanged();
})}
@@ -1233,7 +1239,7 @@ export function Sidebar(props: Props) {
}}
aria-haspopup="menu"
aria-expanded={appMenuOpen}
- aria-label={cloud?.signed_in ? `Account: ${accountEmail}` : "Account: not signed in"}
+ aria-label={cloud?.signed_in ? t("sidebar.account_aria", { email: accountEmail }) : t("sidebar.account_not_signed_in_aria")}
>
<span
className={
@@ -1247,12 +1253,12 @@ export function Sidebar(props: Props) {
{cloud?.signed_in ? accountName.slice(0, 1).toUpperCase() : "?"}
</span>
<span className={"truncate " + (cloud?.signed_in ? "" : "text-muted")}>
- {cloud?.signed_in ? accountName : "Not signed in"}
+ {cloud?.signed_in ? accountName : t("sidebar.not_signed_in_row")}
</span>
{cloud?.signed_in && (
<span
className="w-[7px] h-[7px] rounded-full bg-ok shrink-0"
- title="Signed in to OpenWorker Cloud"
+ title={t("sidebar.signed_in_tooltip")}
aria-hidden
/>
)}
@@ -1268,9 +1274,9 @@ export function Sidebar(props: Props) {
data-testid="inbox-chip"
role="button"
aria-label={
- totalAttention > 0 ? `Inbox — ${totalAttention} items need you` : "Inbox"
+ totalAttention > 0 ? t("sidebar.inbox_chip_pending", { n: totalAttention }) : t("nav.inbox")
}
- title={totalAttention > 0 ? `Inbox — ${totalAttention} items need you` : "Inbox"}
+ title={totalAttention > 0 ? t("sidebar.inbox_chip_pending", { n: totalAttention }) : t("nav.inbox")}
onClick={(e) => {
// The chip goes STRAIGHT to Inbox — the menu is the row's target, not the chip's.
e.stopPropagation();
diff --git a/surfaces/gui/src/components/SkillsTab.tsx b/surfaces/gui/src/components/SkillsTab.tsx
index b176bf4f..7a28acfc 100644
--- a/surfaces/gui/src/components/SkillsTab.tsx
+++ b/surfaces/gui/src/components/SkillsTab.tsx
@@ -1,5 +1,6 @@
import { useRef, useState } from "react";
import { useEffect } from "react";
+import { Trans, useTranslation } from "react-i18next";
import {
createSkill,
deleteSkill,
@@ -73,6 +74,7 @@ export function SkillsTab({
// prefilled in the composer — the worker builds the skill and proposes it via save_skill.
onCreateSkill?: (description: string) => void;
}) {
+ const { t } = useTranslation();
const [rows, setRows] = useState<SkillRow[]>([]);
const [editor, setEditor] = useState<Editor | null>(null);
const [upload, setUpload] = useState<SkillUploadPreview | null>(null);
@@ -91,11 +93,9 @@ export function SkillsTab({
// model will be told…") or engineering timing ("from the next message") — owner-driver
// review rounds, 2026-07-27. The engine countermands disabled-but-loaded skills silently;
// the copy promises only the guaranteed part.
- const CONFIRMATION = "— the worker can now use it in every conversation.";
- const OFF_NOTE =
- "turned off everywhere. If a conversation already used it, start a new one for a completely clean slate.";
- const DELETE_NOTE =
- "removed. If a conversation already used it, start a new one for a completely clean slate.";
+ const CONFIRMATION = t("skills.confirmation");
+ const OFF_NOTE = t("skills.off_note");
+ const DELETE_NOTE = t("skills.delete_note");
const refresh = () => listSkills().then(setRows);
useEffect(() => {
@@ -105,7 +105,7 @@ export function SkillsTab({
const fail = (res: { ok?: boolean; error?: string }) => {
setNotice(null);
if (res.ok === false) {
- setError(res.error || "Something went wrong.");
+ setError(res.error || t("skills.error_generic"));
return true;
}
setError("");
@@ -144,7 +144,7 @@ export function SkillsTab({
const res = await confirmSkillUpload(upload.token);
if (fail(res)) return;
setUpload(null);
- setNotice({ name: upload.name || "Skill", text: CONFIRMATION, tone: "ok" });
+ setNotice({ name: upload.name || t("skills.fallback_name"), text: CONFIRMATION, tone: "ok" });
refresh();
};
@@ -164,11 +164,8 @@ export function SkillsTab({
<section>
<div className="flex items-start justify-between gap-3 mb-4">
<div>
- <h2 className="text-[16px] font-semibold">Skills</h2>
- <p className="text-[13px] text-muted mt-1 leading-relaxed">
- Reusable instructions the worker can follow in every conversation. Off here means
- off everywhere.
- </p>
+ <h2 className="text-[16px] font-semibold">{t("settings.tab.skills")}</h2>
+ <p className="text-[13px] text-muted mt-1 leading-relaxed">{t("skills.subtitle")}</p>
</div>
{/* One add-action, three doors behind it (SKILLS-SPEC §5): the list is the page. */}
<div className="relative shrink-0">
@@ -179,7 +176,7 @@ export function SkillsTab({
onClick={() => setAddOpen((v) => !v)}
>
<span className="inline-flex items-center gap-1.5">
- <Icon name="plus" size={13} /> Add skill
+ <Icon name="plus" size={13} /> {t("skills.add_skill")}
</span>
</button>
{addOpen ? (
@@ -198,10 +195,8 @@ export function SkillsTab({
setEditor(emptyEditor());
}}
>
- <div className="text-[13px] font-medium">Write it myself</div>
- <div className="text-[12px] text-muted">
- A name, a description, and the instructions
- </div>
+ <div className="text-[13px] font-medium">{t("skills.door_write")}</div>
+ <div className="text-[12px] text-muted">{t("skills.door_write_sub")}</div>
</button>
<button
role="menuitem"
@@ -211,10 +206,8 @@ export function SkillsTab({
fileInput.current?.click();
}}
>
- <div className="text-[13px] font-medium">Import a file</div>
- <div className="text-[12px] text-muted">
- A .zip or SKILL.md someone shared — you review before it installs
- </div>
+ <div className="text-[13px] font-medium">{t("skills.door_import")}</div>
+ <div className="text-[12px] text-muted">{t("skills.door_import_sub")}</div>
</button>
<button
role="menuitem"
@@ -225,11 +218,8 @@ export function SkillsTab({
onCreateSkill?.("");
}}
>
- <div className="text-[13px] font-medium">Create with OpenWorker</div>
- <div className="text-[12px] text-muted">
- Starts a conversation — the worker builds it and asks before adding it to
- your skills
- </div>
+ <div className="text-[13px] font-medium">{t("skills.door_ai")}</div>
+ <div className="text-[12px] text-muted">{t("skills.door_ai_sub")}</div>
</button>
</div>
</>
@@ -241,7 +231,7 @@ export function SkillsTab({
type="file"
accept=".zip,.md"
className="hidden"
- aria-label="Upload a skill archive"
+ aria-label={t("skills.upload_aria")}
onChange={(e) => {
onPickFile(e.target.files?.[0]);
e.target.value = "";
@@ -268,7 +258,7 @@ export function SkillsTab({
</span>
<button
className="ml-auto shrink-0 opacity-60 hover:opacity-100"
- aria-label="Dismiss"
+ aria-label={t("common.dismiss")}
onClick={() => setNotice(null)}
>
✕
@@ -278,28 +268,26 @@ export function SkillsTab({
{upload ? (
<div className={`${CARD} p-4 mb-4`}>
- <div className="text-[13px] font-medium mb-1">Review before installing</div>
- <p className="text-[13px] text-muted mb-3">
- Read the instructions — installing a skill means the worker will follow them.
- </p>
+ <div className="text-[13px] font-medium mb-1">{t("skills.review_title")}</div>
+ <p className="text-[13px] text-muted mb-3">{t("skills.review_sub")}</p>
<div className="text-[13px] mb-1">
<span className="font-medium">{upload.name}</span>
- <span className="text-muted"> — {upload.description || "no description"}</span>
+ <span className="text-muted"> — {upload.description || t("skills.no_description")}</span>
</div>
<pre className="text-[12px] bg-paper border border-line rounded-lg p-3 whitespace-pre-wrap max-h-64 overflow-y-auto mb-2">
{upload.instructions}
</pre>
{upload.files?.length ? (
<div className="text-[12px] text-muted mb-2">
- Bundled files: {upload.files.join(", ")}
+ {t("skills.bundled_files", { files: upload.files.join(", ") })}
</div>
) : null}
<div className="flex gap-2 mt-3">
<button className={BTN_ACCENT} onClick={confirmUpload}>
- Install skill
+ {t("skills.install_skill")}
</button>
<button className={BTN_BORDERED} onClick={() => setUpload(null)}>
- Cancel
+ {t("folder_gate.cancel")}
</button>
</div>
</div>
@@ -308,37 +296,39 @@ export function SkillsTab({
{editor ? (
<div className={`${CARD} p-4 mb-4`}>
<div className="text-[13px] font-medium mb-3">
- {editor.mode === "new" ? "New skill" : `Edit ${editor.name}`}
+ {editor.mode === "new"
+ ? t("skills.editor_new")
+ : t("skills.editor_edit", { name: editor.name })}
</div>
<label className={FIELD_LABEL} htmlFor="skill-name">
- Name
+ {t("skills.name_label")}
</label>
<input
id="skill-name"
className={`${INPUT} mt-1 mb-3`}
value={editor.name}
disabled={editor.mode === "edit"}
- placeholder="weekly-report"
+ placeholder={t("skills.name_placeholder")}
onChange={(e) => setEditor({ ...editor, name: e.target.value })}
/>
<label className={FIELD_LABEL} htmlFor="skill-desc">
- Description
+ {t("skills.desc_label")}
</label>
<input
id="skill-desc"
className={`${INPUT} mt-1 mb-3`}
value={editor.description}
- placeholder="One line the worker uses to decide when this applies"
+ placeholder={t("skills.desc_placeholder")}
onChange={(e) => setEditor({ ...editor, description: e.target.value })}
/>
<label className={FIELD_LABEL} htmlFor="skill-instructions">
- Instructions
+ {t("skills.instructions_label")}
</label>
<textarea
id="skill-instructions"
className={`${INPUT} mt-1 mb-3 min-h-[140px] font-mono`}
value={editor.instructions}
- placeholder={"1. Gather last week's updates\n2. Write the report, under 300 words"}
+ placeholder={t("skills.instructions_placeholder")}
onChange={(e) => setEditor({ ...editor, instructions: e.target.value })}
/>
<div className="flex gap-2 mt-3">
@@ -347,10 +337,10 @@ export function SkillsTab({
disabled={!editor.name.trim() || !editor.instructions.trim()}
onClick={save}
>
- Save skill
+ {t("skills.save_skill")}
</button>
<button className={BTN_BORDERED} onClick={() => setEditor(null)}>
- Cancel
+ {t("folder_gate.cancel")}
</button>
</div>
</div>
@@ -359,8 +349,7 @@ export function SkillsTab({
<div className={`${CARD} divide-y divide-line`}>
{rows.length === 0 && !editor ? (
<div className="p-5 text-[13px] text-muted">
- No skills yet — <b>Add skill</b> teaches your worker its first one, like
- “prepare my Monday status report”.
+ <Trans i18nKey="skills.empty" components={{ b: <b /> }} />
</div>
) : null}
{rows.map((row) => (
@@ -377,10 +366,10 @@ export function SkillsTab({
{row.files ? (
<button
className="inline-flex items-center gap-1 text-[11px] px-1.5 py-0.5 rounded-md border border-line bg-paper text-muted hover:text-ink hover:border-lineStrong shrink-0"
- title="Show folder"
+ title={t("skills.show_folder")}
onClick={() => revealSkill(row.name)}
>
- <Icon name="folder" size={11} /> {row.files} file{row.files === 1 ? "" : "s"}
+ <Icon name="folder" size={11} /> {t("skills.file_count", { count: row.files })}
</button>
) : null}
</div>
@@ -390,7 +379,7 @@ export function SkillsTab({
</div>
<button
className={BTN_BORDERED}
- title="Edit"
+ title={t("skills.edit_tip")}
onClick={() =>
setEditor({
mode: "edit",
@@ -404,17 +393,21 @@ export function SkillsTab({
</button>
<button
className={BTN_BORDERED}
- aria-label={`Delete ${row.name}`}
+ aria-label={t("skills.delete_aria", { name: row.name })}
onClick={() => remove(row)}
onBlur={() => setArmedDelete(null)}
>
- {armedDelete === row.name ? "Confirm delete" : <Icon name="trash" size={13} />}
+ {armedDelete === row.name ? (
+ t("skills.confirm_delete")
+ ) : (
+ <Icon name="trash" size={13} />
+ )}
</button>
<label className="inline-flex items-center gap-1.5 text-[12px] text-muted">
<input
type="checkbox"
role="switch"
- aria-label={`${row.name} enabled`}
+ aria-label={t("skills.enabled_aria", { name: row.name })}
checked={row.enabled}
onChange={(e) => {
const on = e.target.checked;
@@ -429,7 +422,7 @@ export function SkillsTab({
});
}}
/>
- On
+ {t("skills.on")}
</label>
</div>
))}
diff --git a/surfaces/gui/src/components/TeamChatView.tsx b/surfaces/gui/src/components/TeamChatView.tsx
index 8bcd0281..a0977b1b 100644
--- a/surfaces/gui/src/components/TeamChatView.tsx
+++ b/surfaces/gui/src/components/TeamChatView.tsx
@@ -4,6 +4,7 @@
// No derived board-event clusters (owner call, eighth pass): status lives on the
// board rail one click away — this surface is pure messages.
import { useEffect, useRef, useState } from "react";
+import { useTranslation } from "react-i18next";
import { getTeamChat, postTeamChat, type TeamChat } from "../api";
import { Icon } from "./Icon";
@@ -29,6 +30,7 @@ function clock(ts: string): string {
}
export function TeamChatView({ teamId, onClose }: { teamId: string; onClose: () => void }) {
+ const { t } = useTranslation();
const [chat, setChat] = useState<TeamChat | null>(null);
const [draft, setDraft] = useState("");
const [busy, setBusy] = useState(false);
@@ -72,26 +74,28 @@ export function TeamChatView({ teamId, onClose }: { teamId: string; onClose: ()
// the sidebar stays interactive; back or Esc returns to the session.
<div className="chat-view" data-testid="teamchat-view">
<div className="chat-view-head">
- <button className="artifact-icon-btn" onClick={onClose} aria-label="Back to session" title="Back">
+ <button
+ className="artifact-icon-btn"
+ onClick={onClose}
+ aria-label={t("team.back_to_session")}
+ title={t("rail.back")}
+ >
<Icon name="arrowLeft" size={16} />
</button>
<div className="board-overlay-title">
<span className="chat-hash">#</span>
- <span>team chat</span>
- <span className="board-overlay-space">questions &amp; consensus — status lives on the board</span>
+ <span>{t("rail.team_chat")}</span>
+ <span className="board-overlay-space">{t("team.chat_tagline")}</span>
</div>
</div>
<div className="chat-view-body">
<div className="chat-scroll">
{messages.length === 0 && (
- <div className="chat-empty">
- No messages yet. Agents post here only when something needs a reply —
- @mention a coworker to reach it.
- </div>
+ <div className="chat-empty">{t("team.chat_empty")}</div>
)}
{messages.map((m, i) => {
const grouped = i > 0 && messages[i - 1].author === m.author;
- const label = m.author_role === "user" ? "You" : m.author;
+ const label = m.author_role === "user" ? t("team.you") : m.author;
return (
<div className={"chat-msg" + (grouped ? " grouped" : "")} key={m.seq}>
{!grouped && (
@@ -114,7 +118,7 @@ export function TeamChatView({ teamId, onClose }: { teamId: string; onClose: ()
<input
className="chat-input"
data-testid="chat-input"
- placeholder="Message # team chat… (posts as you — every member sees it)"
+ placeholder={t("team.chat_placeholder")}
value={draft}
onChange={(e) => setDraft(e.target.value)}
onKeyDown={(e) => {
@@ -122,7 +126,7 @@ export function TeamChatView({ teamId, onClose }: { teamId: string; onClose: ()
}}
/>
<button className="btn primary" data-testid="chat-send" disabled={busy || !draft.trim()} onClick={send}>
- Send
+ {t("common.send")}
</button>
</div>
</div>
diff --git a/surfaces/gui/src/components/TeamRequestCard.tsx b/surfaces/gui/src/components/TeamRequestCard.tsx
index ec3d50bf..7c3b863a 100644
--- a/surfaces/gui/src/components/TeamRequestCard.tsx
+++ b/surfaces/gui/src/components/TeamRequestCard.tsx
@@ -4,6 +4,7 @@
// PRE-SPAWNS the worker sessions. The chat checkbox is the USER's call (default
// OFF, ⓘ per mock); no in-card reply surface: editing happens by replying.
import { useState } from "react";
+import { Trans, useTranslation } from "react-i18next";
import type { Item } from "../types";
import { Icon } from "./Icon";
@@ -14,13 +15,14 @@ export function TeamRequestCard({
item: Extract<Item, { kind: "teamreq" }>;
onRespond: (approved: boolean, feedback?: string, enableChat?: boolean) => void;
}) {
+ const { t } = useTranslation();
const [chat, setChat] = useState(!!item.enable_chat);
return (
<div className="dirreq-card teamreq-card" data-testid="teamreq-card">
<div className="teamreq-head">
<Icon name="diamond" size={15} />
<span className="teamreq-title">
- Proposed team — {item.members.length} worker{item.members.length === 1 ? "" : "s"}
+ {t("team.proposed", { count: item.members.length })}
</span>
</div>
{item.note && <div className="teamreq-note">{item.note}</div>}
@@ -44,29 +46,24 @@ export function TeamRequestCard({
onChange={(e) => setChat(e.target.checked)}
/>
<span>
- Enable <b># team chat</b>
+ <Trans i18nKey="team.enable_chat" components={{ b: <b /> }} />
</span>
- <span
- className="teamreq-info"
- title="A group channel for questions and consensus — @mentions wake the mentioned coworker. Status stays on the board either way."
- >
+ <span className="teamreq-info" title={t("team.chat_info")}>
i
</span>
</label>
<div className="dirreq-actions">
- <span className="teamreq-grant">
- Approving grants the lead create, assign &amp; steer — this team only, revocable.
- </span>
+ <span className="teamreq-grant">{t("team.grant_note")}</span>
<span className="spacer" />
<button className="btn" onClick={() => onRespond(false)}>
- Not now
+ {t("team.not_now")}
</button>
<button
className="btn primary"
data-testid="teamreq-approve"
onClick={() => onRespond(true, undefined, chat)}
>
- Create team &amp; start
+ {t("team.create_start")}
</button>
</div>
</div>
diff --git a/surfaces/gui/src/components/ToolRequestCard.tsx b/surfaces/gui/src/components/ToolRequestCard.tsx
index b22d1685..165668c9 100644
--- a/surfaces/gui/src/components/ToolRequestCard.tsx
+++ b/surfaces/gui/src/components/ToolRequestCard.tsx
@@ -1,3 +1,4 @@
+import { Trans, useTranslation } from "react-i18next";
import type { Item } from "../types";
import { Icon } from "./Icon";
@@ -13,17 +14,26 @@ export function ToolRequestCard({
item: ToolReqItem;
onRespond: (approved: boolean) => void;
}) {
+ const { t } = useTranslation();
return (
<div className="dirreq-card">
<div className="dirreq-head">
<Icon name="wrench" size={16} className="ico" />
<span>
- The coworker needs <code>{item.tool}</code>
+ <Trans
+ i18nKey="toolreq.needs"
+ values={{ tool: item.tool }}
+ components={{ code: <code /> }}
+ />
</span>
</div>
{item.reason && (
<div className="dirreq-reason">
- <span className="toolreq-label">Reason:</span> “{item.reason}”
+ <Trans
+ i18nKey="toolreq.reason_line"
+ values={{ reason: item.reason }}
+ components={{ label: <span className="toolreq-label" /> }}
+ />
</div>
)}
{/* The fact strip is the PRODUCT speaking (registry metadata), styled apart from the
@@ -38,23 +48,20 @@ export function ToolRequestCard({
{item.summary && <span className="toolreq-fact">{item.summary}</span>}
</div>
<div className="toolreq-explain">
- OpenWorker installs its own verified copy
- {item.source ? ` from ${item.source}` : ""} — or install it yourself and
- continue.
+ {item.source
+ ? t("toolreq.installs_with_source", { source: item.source })
+ : t("toolreq.installs")}
</div>
</div>
) : (
<div className="toolreq-facts">
- <div className="toolreq-explain">
- OpenWorker has no verified build for this machine — install it yourself if you
- want this check, or continue and the coworker will note the gap.
- </div>
+ <div className="toolreq-explain">{t("toolreq.no_build")}</div>
</div>
)}
<div className="dirreq-actions">
<span className="spacer" />
<button className="btn" data-testid="toolreq-skip" onClick={() => onRespond(false)}>
- Continue without it
+ {t("toolreq.skip")}
</button>
<button
className="btn primary"
@@ -62,7 +69,7 @@ export function ToolRequestCard({
disabled={!item.installable}
onClick={() => onRespond(true)}
>
- Install
+ {t("toolreq.install")}
</button>
</div>
</div>
diff --git a/surfaces/gui/src/components/Transcript.tsx b/surfaces/gui/src/components/Transcript.tsx
index 68b75561..b10f0a19 100644
--- a/surfaces/gui/src/components/Transcript.tsx
+++ b/surfaces/gui/src/components/Transcript.tsx
@@ -1,4 +1,5 @@
import { useState } from "react";
+import { getI18n, useTranslation } from "react-i18next";
import type { ApprovalDecision, Item } from "../types";
import { shortArgs } from "./ApprovalCard";
import { humanizeAsk, humanizeTool, type HumanLine } from "../humanize";
@@ -13,6 +14,7 @@ import { Icon } from "./Icon";
const USER_CLAMP_CHARS = 1200;
function ClampedUserText({ text }: { text: string }) {
+ const { t } = useTranslation();
const [open, setOpen] = useState(false);
if (text.length <= USER_CLAMP_CHARS) return <>{text}</>;
return (
@@ -23,7 +25,7 @@ function ClampedUserText({ text }: { text: string }) {
onClick={() => setOpen((o) => !o)}
className="block ml-auto mt-1.5 text-[13px] font-medium opacity-75 hover:opacity-100"
>
- {open ? "less…" : "more…"}
+ {open ? t("transcript.user_less") : t("transcript.user_more")}
</button>
</>
);
@@ -34,6 +36,7 @@ function ClampedUserText({ text }: { text: string }) {
// so revealing it on group-hover never shifts the layout. `ts` is unix seconds — canonical
// messages carry it, pre-stamp history doesn't, so the time simply omits itself when absent.
function BubbleMeta({ text, ts, align }: { text: string; ts?: number; align: "left" | "right" }) {
+ const { t } = useTranslation();
const [copied, setCopied] = useState(false);
const when = typeof ts === "number" ? new Date(ts * 1000) : null;
const copy = () => {
@@ -58,10 +61,10 @@ function BubbleMeta({ text, ts, align }: { text: string; ts?: number; align: "le
<button
className="flex items-center cursor-pointer hover:text-muted"
data-testid="bubble-copy"
- title="Copy message"
+ title={t("transcript.copy_message")}
onClick={copy}
>
- {copied ? "Copied" : <Icon name="copy" size={11} />}
+ {copied ? t("transcript.copied") : <Icon name="copy" size={11} />}
</button>
{when && (
<span data-testid="bubble-ts" title={when.toLocaleString()}>
@@ -77,6 +80,7 @@ function BubbleMeta({ text, ts, align }: { text: string; ts?: number; align: "le
// collapsed by default, the trace one click away. `live` = still streaming (pulsing label);
// App renders that variant above the transcript, this one rides a finalized assistant item.
export function ThinkingBlock({ text, live }: { text: string; live?: boolean }) {
+ const { t } = useTranslation();
const [open, setOpen] = useState(false);
return (
<div className="thinking">
@@ -87,7 +91,7 @@ export function ThinkingBlock({ text, live }: { text: string; live?: boolean })
>
<Icon name="chevronDown" size={12} className={"thinking-caret" + (open ? " open" : "")} />
<span className={live ? "thinking-live" : undefined}>
- {live ? "Thinking…" : "Thought process"}
+ {live ? t("transcript.thinking_live") : t("transcript.thinking_process")}
</span>
</button>
{open && (
@@ -156,19 +160,22 @@ function buildRows(items: TurnItem[]): TurnRow[] {
}
function originChip(origin: string | undefined, note: string | undefined, grant?: string) {
+ const t = getI18n().getFixedT(null, "translation");
// Replayed user resolutions reuse the card-chip look (live sessions pair the card itself).
if (origin === "user") {
if (grant === "deny")
- return <span className="text-[11px] px-1.5 rounded-full bg-dangerSoft text-danger shrink-0">✕ declined</span>;
+ return <span className="text-[11px] px-1.5 rounded-full bg-dangerSoft text-danger shrink-0">{t("transcript.approval.declined")}</span>;
return (
<span
className="text-[11px] px-1.5 rounded-full bg-okSoft text-ok shrink-0"
title={
- `approved by you${grant ? ` · ${grant.replace(/_/g, " ")}` : ""}` +
- (note ? ` — reviewer wasn't sure: ${note}` : "")
+ (grant
+ ? t("transcript.approval.approved_scope", { scope: grant.replace(/_/g, " ") })
+ : t("transcript.approval.approved_title")) +
+ (note ? t("transcript.approval.reviewer_unsure", { note }) : "")
}
>
- ✓ user-approved
+ {t("transcript.approval.approved")}
</span>
);
}
@@ -177,22 +184,31 @@ function originChip(origin: string | undefined, note: string | undefined, grant?
<span
className="text-[11px] text-faint shrink-0"
data-testid="tool-approval-origin"
- title={origin === "reviewer" ? note || "allowed by the auto-approve reviewer" : "ran without approval — bypass-approvals mode"}
+ title={
+ origin === "reviewer"
+ ? note || t("transcript.approval.reviewer_allowed_title")
+ : t("transcript.approval.bypass_title")
+ }
>
- {origin === "reviewer" ? "auto-approved" : "approval bypassed"}
+ {origin === "reviewer" ? t("transcript.approval.auto_approved") : t("transcript.approval.bypassed")}
</span>
);
}
function approvalChip(resolved: ApprovalDecision | undefined) {
+ const t = getI18n().getFixedT(null, "translation");
if (resolved === "deny")
- return <span className="text-[11px] px-1.5 rounded-full bg-dangerSoft text-danger shrink-0">✕ declined</span>;
+ return <span className="text-[11px] px-1.5 rounded-full bg-dangerSoft text-danger shrink-0">{t("transcript.approval.declined")}</span>;
return (
<span
className="text-[11px] px-1.5 rounded-full bg-okSoft text-ok shrink-0"
- title={resolved ? `approved by you · ${resolved.replace(/_/g, " ")}` : "approved by you"}
+ title={
+ resolved
+ ? t("transcript.approval.approved_scope", { scope: resolved.replace(/_/g, " ") })
+ : t("transcript.approval.approved_title")
+ }
>
- ✓ user-approved
+ {t("transcript.approval.approved")}
</span>
);
}
@@ -216,6 +232,7 @@ function StepRow({
approval?: ApprovalItem;
onAllowAnyway?: (name: string, args: any) => void;
}) {
+ const { t } = useTranslation();
// A reviewer deny (spec §8.4) renders as a card under the step: the FULL reason (the
// agent only got a terse refusal) plus the one-shot "Allow anyway" override.
const [overrideSent, setOverrideSent] = useState(false);
@@ -233,7 +250,11 @@ function StepRow({
// A refused load must not read as a success — "Used skill:" is the trust line
// (SKILLS-SPEC §4.1 #4), so a blocked attempt gets honest wording instead.
tool.name === "load_skill" && tool.preview?.includes('"error"')
- ? { pre: "Tried skill: ", obj: String(tool.args?.name ?? ""), post: " — not available" }
+ ? {
+ pre: t("transcript.step.tried_skill_pre"),
+ obj: String(tool.args?.name ?? ""),
+ post: t("transcript.step.tried_skill_post"),
+ }
: humanizeTool(tool.name, tool.args)
}
/>
@@ -243,18 +264,18 @@ function StepRow({
<span
className="text-[11px] px-1.5 rounded-full bg-tealSoft text-tealInk shrink-0"
data-testid="tool-standing-rule"
- title={`Auto-allowed by this automation's standing approval: ${tool.standingRule}. Revoke on its Automations page.`}
+ title={t("transcript.step.auto_allowed_tip", { name: tool.standingRule })}
>
- auto-allowed
+ {t("transcript.step.auto_allowed")}
</span>
)}
{!!tool.hidden && (
<span
className="text-[11px] text-warnInk shrink-0"
data-testid="tool-hidden-count"
- title="Removed by your privacy filters before the agent saw the results — agents get no trace of these."
+ title={t("transcript.step.hidden_tip")}
>
- {tool.hidden} hidden
+ {t("transcript.step.hidden_count_label", { n: tool.hidden })}
</span>
)}
{failed && <span className="text-[11px] text-danger shrink-0">{tool.status}</span>}
@@ -263,7 +284,7 @@ function StepRow({
className="ml-auto shrink-0 text-[11px] text-faint opacity-0 group-hover:opacity-100 cursor-pointer"
onClick={() => setRaw((v) => !v)}
>
- raw
+ {t("transcript.step.raw")}
</button>
)}
</div>
@@ -278,12 +299,9 @@ function StepRow({
className="ml-8 mr-2 my-1 px-3 py-2 rounded-lg border border-line bg-dangerSoft/40"
data-testid="reviewer-deny-card"
>
- <div className="text-[11px] font-medium text-danger">Blocked by the reviewer</div>
+ <div className="text-[11px] font-medium text-danger">{t("transcript.reviewer.blocked")}</div>
<div className="text-[12px] text-ink mt-0.5">{tool.reviewerReason}</div>
- <div className="text-[11px] text-faint mt-1">
- The agent was told only that it was blocked — not why — so it can&rsquo;t argue
- its way past this. If the action is actually fine, you can run it as proposed:
- </div>
+ <div className="text-[11px] text-faint mt-1">{t("transcript.reviewer.explain")}</div>
{tool.allowAnyway && onAllowAnyway && !overrideSent && (
<button
className="mt-1.5 px-2.5 py-1 rounded-lg border border-line bg-panel text-[12px] text-ink hover:bg-paper"
@@ -293,12 +311,12 @@ function StepRow({
onAllowAnyway(tool.name, tool.args);
}}
>
- Allow anyway
+ {t("transcript.reviewer.allow_anyway")}
</button>
)}
{overrideSent && (
<div className="mt-1.5 text-[11px] text-ok" data-testid="reviewer-override-sent">
- Approved — the agent will retry this exact action.
+ {t("transcript.reviewer.override_sent")}
</div>
)}
</div>
@@ -320,6 +338,7 @@ function TurnGroup({
streamingText?: string;
onAllowAnyway?: (name: string, args: any) => void;
}) {
+ const { t } = useTranslation();
// Turns start COLLAPSED, running or not (owner call 2026-07-14) — the header's live
// line is the pulse; expanding is opt-in.
const rows = buildRows(items);
@@ -333,7 +352,7 @@ function TurnGroup({
const nSteps = rows.filter((r) => r.type !== "narr").length;
const declined = items.filter((it) => it.kind === "approval" && it.resolved === "deny").length;
const hiddenTotal = tools.reduce((n, t) => n + (t.hidden || 0), 0);
- const stepsLabel = `${nSteps} step${nSteps === 1 ? "" : "s"}`;
+ const stepsLabel = t("transcript.turn.steps_label", { count: nSteps });
return (
<details className="stepgroup" open={open}>
@@ -346,12 +365,12 @@ function TurnGroup({
>
<span className={"chev inline-block transition-transform" + (open ? " rotate-90" : "")}>›</span>
<span>
- <span>{running ? `Running ${stepsLabel}…` : stepsLabel}</span>
+ <span>{running ? t("transcript.turn.running", { label: stepsLabel }) : stepsLabel}</span>
{declined > 0 && (
<>
{" · "}
<span className="text-danger" data-testid="stepgroup-declined">
- {declined} declined
+ {t("transcript.turn.declined", { count: declined })}
</span>
</>
)}
@@ -359,7 +378,7 @@ function TurnGroup({
<>
{" · "}
<span className="text-warnInk" data-testid="stepgroup-hidden">
- {hiddenTotal} hidden by your filters
+ {t("transcript.turn.hidden", { count: hiddenTotal })}
</span>
</>
)}
@@ -447,6 +466,7 @@ function McpNotice({
item: Extract<Item, { kind: "notice" }>;
onOpenConnectors?: () => void;
}) {
+ const { t } = useTranslation();
const [open, setOpen] = useState(false);
return (
<div className="mcp-notice" data-testid="mcp-notice">
@@ -458,7 +478,7 @@ function McpNotice({
data-testid="mcp-notice-details"
onClick={() => setOpen((v) => !v)}
>
- Details {open ? "⌃" : "⌄"}
+ {t("transcript.mcp_details")} {open ? "⌃" : "⌄"}
</button>
{onOpenConnectors && (
<button
@@ -466,7 +486,7 @@ function McpNotice({
data-testid="mcp-notice-connectors"
onClick={onOpenConnectors}
>
- Open Connectors
+ {t("transcript.mcp_open_connectors")}
</button>
)}
</div>
@@ -481,6 +501,7 @@ function McpNotice({
export function Transcript({ items, running, streamingText, onRetry, onOpenConnectors, onUndoMemory, onAllowAnyway }: Props) {
+ const { t } = useTranslation();
// §33 grouping: a turn = the maximal run of assistant/tool/resolved-approval items between
// breakers (user, connector, notices, plan/dir requests…). Trailing assistant texts are the
// ANSWER and render as bubbles after the group; interior assistant texts are narration and
@@ -574,7 +595,7 @@ export function Transcript({ items, running, streamingText, onRetry, onOpenConne
);
return (
<div className="group bubble-assistant" key={bi}>
- <div className="who">assistant</div>
+ <div className="who">{t("transcript.who_assistant")}</div>
{item.reasoning && <ThinkingBlock text={item.reasoning} />}
<Markdown text={item.text} />
<BubbleMeta text={item.text} ts={item.ts} align="left" />
@@ -587,7 +608,7 @@ export function Transcript({ items, running, streamingText, onRetry, onOpenConne
<span className={"status " + (item.resolved === "granted" ? "ok" : "denied")}>
{item.resolved === "granted" ? "✓" : "✕"}
</span>
- <span>{item.resolved === "granted" ? "Granted folder access" : "Declined folder access"}</span>
+ <span>{item.resolved === "granted" ? t("transcript.dir_granted") : t("transcript.dir_declined")}</span>
{item.path && <span className="dim">{item.path}</span>}
</div>
);
@@ -595,13 +616,13 @@ export function Transcript({ items, running, streamingText, onRetry, onOpenConne
if (!item.resolved) return null; // pending plan renders in the composer head
return (
<div className="bubble-assistant" key={bi}>
- <div className="who">proposed plan</div>
+ <div className="who">{t("transcript.plan_proposed")}</div>
<Markdown text={item.plan} />
<div className="approval-inline">
<span className={"status " + (item.resolved === "approved" ? "ok" : "denied")}>
{item.resolved === "approved" ? "✓" : "✕"}
</span>
- <span>{item.resolved === "approved" ? "Plan approved" : "Sent back with feedback"}</span>
+ <span>{item.resolved === "approved" ? t("transcript.plan_approved") : t("transcript.plan_rejected")}</span>
</div>
</div>
);
@@ -630,7 +651,7 @@ export function Transcript({ items, running, streamingText, onRetry, onOpenConne
{item.text}
{item.retriable && !running && onRetry && block.i === retryAnchor(items) && (
<button className="btn ml-2" data-testid="notice-retry" onClick={onRetry}>
- Retry
+ {t("transcript.retry")}
</button>
)}
</div>
@@ -646,13 +667,15 @@ export function Transcript({ items, running, streamingText, onRetry, onOpenConne
>
{item.undone ? (
<span data-testid="memory-notice-undone">
- {item.previous ? "Okay — put back the way it was." : "Okay — forgotten."}
+ {item.previous
+ ? t("transcript.memory.undone_restored")
+ : t("transcript.memory.undone_forgotten")}
</span>
) : (
<>
<span className="min-w-0">
<span className="font-medium">
- {item.previous ? "I've updated what I remember" : "I'll remember that"}
+ {item.previous ? t("transcript.memory.updated") : t("transcript.memory.saved")}
</span>
{item.text ? <span className="text-muted"> — {item.text}</span> : null}
</span>
@@ -662,7 +685,7 @@ export function Transcript({ items, running, streamingText, onRetry, onOpenConne
data-testid="memory-notice-undo"
onClick={() => onUndoMemory(item.id, item.previous)}
>
- Undo
+ {t("transcript.memory.undo")}
</button>
)}
</>
diff --git a/surfaces/gui/src/components/UpdateBanner.tsx b/surfaces/gui/src/components/UpdateBanner.tsx
index d84c9498..99abfa89 100644
--- a/surfaces/gui/src/components/UpdateBanner.tsx
+++ b/surfaces/gui/src/components/UpdateBanner.tsx
@@ -1,4 +1,5 @@
import { useEffect, useRef, useState } from "react";
+import { useTranslation } from "react-i18next";
import {
checkForUpdate,
clearPendingUpdate,
@@ -31,6 +32,7 @@ const RECHECK_MS = 30 * 60_000;
type Phase = "downloading" | "ready" | "fallback" | "installing" | "error";
export function UpdateBanner() {
+ const { t } = useTranslation();
const [update, setUpdate] = useState<UpdateInfo | null>(null);
const [phase, setPhase] = useState<Phase>("downloading");
// Per-run, per-version dismissal — no localStorage, so a restart re-offers, and a
@@ -88,13 +90,13 @@ export function UpdateBanner() {
role="status"
data-testid="update-banner"
>
- <div className="text-[13px] font-semibold">Update available</div>
+ <div className="text-[13px] font-semibold">{t("update.banner_title")}</div>
<div className="text-[12px] text-muted mt-0.5">
- OpenWorker v{update.version} is ready to install.
+ {t("update.ready", { version: update.version })}
</div>
{phase === "error" && (
<div className="text-[12px] text-warnInk mt-1.5">
- The update couldn't be installed — it will be offered again next launch.
+ {t("update.install_failed")}
</div>
)}
<div className="flex items-center gap-2 mt-2.5">
@@ -104,7 +106,7 @@ export function UpdateBanner() {
disabled={busy}
data-testid="update-install"
>
- {busy ? "Downloading…" : "Restart to update"}
+ {busy ? t("update.downloading") : t("update.restart_to_update")}
</button>
<button
className="px-2 py-1.5 text-[13px] text-faint hover:text-muted"
@@ -119,7 +121,7 @@ export function UpdateBanner() {
disabled={phase === "installing"}
data-testid="update-later"
>
- Later
+ {t("update.later")}
</button>
</div>
</div>
diff --git a/surfaces/gui/src/components/WorkItemsCard.tsx b/surfaces/gui/src/components/WorkItemsCard.tsx
index 7cbec4a4..5b27f309 100644
--- a/surfaces/gui/src/components/WorkItemsCard.tsx
+++ b/surfaces/gui/src/components/WorkItemsCard.tsx
@@ -3,6 +3,7 @@
// acceptance criteria as the primary text, 3 visible + expander with the true
// count in the header, no in-card reply surface (editing happens by replying).
import { useState } from "react";
+import { useTranslation } from "react-i18next";
import type { Item } from "../types";
import { Icon } from "./Icon";
@@ -19,6 +20,7 @@ export function WorkItemsCard({
item: Extract<Item, { kind: "itemsreq" }>;
onRespond: (approved: boolean, feedback?: string) => void;
}) {
+ const { t } = useTranslation();
const [expanded, setExpanded] = useState(false);
const [openCriteria, setOpenCriteria] = useState<Record<number, boolean>>({});
const visible = expanded ? item.items : item.items.slice(0, 3);
@@ -28,7 +30,7 @@ export function WorkItemsCard({
<div className="itemsreq-head">
<Icon name="table" size={15} />
<span className="itemsreq-title">
- Proposed work items — {item.items.length}
+ {t("team.proposed_items", { count: item.items.length })}
</span>
</div>
{item.note && <div className="itemsreq-note">{item.note}</div>}
@@ -42,7 +44,7 @@ export function WorkItemsCard({
<span className="itemsreq-body">
<span className="itemsreq-item-title">{entry.title}</span>
<span className={"itemsreq-ac" + (long && !open ? " clamped" : "")}>
- <b>Done when:</b> {entry.criteria}
+ <b>{t("team.items_done_when")}</b> {entry.criteria}
</span>
{long && (
<button
@@ -50,7 +52,7 @@ export function WorkItemsCard({
data-testid={`itemsreq-ac-toggle-${i}`}
onClick={() => setOpenCriteria((s) => ({ ...s, [i]: !s[i] }))}
>
- {open ? "Show less" : "Show full criteria"}
+ {open ? t("team.show_less") : t("team.show_full_criteria")}
</button>
)}
</span>
@@ -59,25 +61,23 @@ export function WorkItemsCard({
})}
{hidden > 0 && (
<button className="itemsreq-more" onClick={() => setExpanded(true)}>
- + {hidden} more item{hidden === 1 ? "" : "s"}
+ {t("team.more_items", { count: hidden })}
<Icon name="chevronDown" size={12} />
</button>
)}
</div>
<div className="dirreq-actions">
- <span className="itemsreq-grant">
- Reply to edit the split; approval creates these on the board.
- </span>
+ <span className="itemsreq-grant">{t("team.items_grant")}</span>
<span className="spacer" />
<button className="btn" onClick={() => onRespond(false)}>
- Not now
+ {t("team.not_now")}
</button>
<button
className="btn primary"
data-testid="itemsreq-approve"
onClick={() => onRespond(true)}
>
- Approve items
+ {t("team.approve_items")}
</button>
</div>
</div>
diff --git a/surfaces/gui/src/components/connectors/AddConnectionModal.tsx b/surfaces/gui/src/components/connectors/AddConnectionModal.tsx
index 213c3f34..61783405 100644
--- a/surfaces/gui/src/components/connectors/AddConnectionModal.tsx
+++ b/surfaces/gui/src/components/connectors/AddConnectionModal.tsx
@@ -1,4 +1,5 @@
import { useEffect, useState } from "react";
+import { useTranslation } from "react-i18next";
import {
connectConnector,
connectManaged,
@@ -33,6 +34,7 @@ export function AddConnectionModal({
onClose: () => void;
onChanged: () => void;
}) {
+ const { t } = useTranslation();
// MCP-backed one-click (§42): local OAuth against the vendor's hosted MCP server —
// with manual fields alongside (jira, asana) it's a second mode; alone (monday)
// it IS the connect flow.
@@ -52,20 +54,22 @@ export function AddConnectionModal({
return () => window.removeEventListener("keydown", onKey);
}, [onClose]);
+ const defaultTitle = t("modal.connect_title", { title: c.title });
+
return (
<div className="fixed inset-0 z-40" data-testid="add-connection-modal">
<div className="absolute inset-0 bg-black/30" onClick={onClose} />
<div
className="absolute left-1/2 top-[14%] -translate-x-1/2 w-[480px] max-w-[calc(100vw-2rem)] bg-panel rounded-2xl border border-line shadow-2xl"
role="dialog"
- aria-label={title || `Connect ${c.title}`}
+ aria-label={title || defaultTitle}
>
<div className="flex items-center gap-3 px-5 pt-5">
<ConnectorBadge connector={c} size={34} title={c.title} />
<div className="flex-1 font-semibold text-[16px] tracking-tight">
- {title || `Connect ${c.title}`}
+ {title || defaultTitle}
</div>
- <button className="text-faint hover:text-ink text-[20px] leading-none" onClick={onClose} title="Close">
+ <button className="text-faint hover:text-ink text-[20px] leading-none" onClick={onClose} title={t("modal.close")}>
×
</button>
</div>
@@ -84,7 +88,7 @@ export function AddConnectionModal({
}
onClick={() => setPane(p)}
>
- {p === "one" ? "One click" : "Manual"}
+ {p === "one" ? t("modal.one_click") : t("modal.manual")}
</button>
))}
</div>
@@ -128,6 +132,7 @@ export function AddConnectionModal({
// client secret, no broker, no OpenWorker sign-in required). Poll until the card
// flips to connected, then close.
function McpOneClick({ c, onConnected }: { c: Connector; onConnected: () => void }) {
+ const { t: tt } = useTranslation();
const [waiting, setWaiting] = useState(false);
const [error, setError] = useState<string | null>(null);
useEffect(() => {
@@ -146,14 +151,12 @@ function McpOneClick({ c, onConnected }: { c: Connector; onConnected: () => void
setError(null);
const res = await connectMcpBacked(c.name);
if (res.ok) setWaiting(true);
- else setError(res.error || "could not start the connect");
+ else setError(res.error || tt("modal.could_not_start_connect"));
};
return (
<div className="px-5 py-4 space-y-3">
<p className="text-[13px] text-muted">
- Opens {c.title} in your browser — sign in and approve access there. No tokens
- typed, and no OpenWorker account needed: the sign-in runs entirely on this
- computer.
+ {tt("modal.mcp_blurb", { title: c.title })}
</p>
<button
className={PILL_ACCENT + " w-full !py-2"}
@@ -161,12 +164,11 @@ function McpOneClick({ c, onConnected }: { c: Connector; onConnected: () => void
onClick={go}
disabled={waiting}
>
- {waiting ? "Check your browser…" : `Connect ${c.title}`}
+ {waiting ? tt("cloud.check_browser") : tt("modal.connect_title", { title: c.title })}
</button>
{error && <div className="text-[13px] text-danger">{error}</div>}
<p className="text-[12px] text-faint text-center flex items-center justify-center gap-1.5">
- <span className={TAG_ACCENT}>Recommended</span> agents get a curated set of{" "}
- {c.title} tools · tokens stay on this computer
+ <span className={TAG_ACCENT}>{tt("modal.recommended")}</span> {tt("modal.mcp_recommended_foot", { title: c.title })}
</p>
</div>
);
@@ -175,19 +177,19 @@ function McpOneClick({ c, onConnected }: { c: Connector; onConnected: () => void
// One-click pane for generic managed connectors (Notion, Attio, …): sign in
// with the service in the browser; each consent lands as its own account.
function GenericOneClick({ c, cloud }: { c: Connector; cloud: CloudStatus | null }) {
+ const { t: tt } = useTranslation();
const [waiting, setWaiting] = useState(false);
const [error, setError] = useState<string | null>(null);
const go = async () => {
setError(null);
const res = await connectManaged(c.name);
if (res.ok) setWaiting(true);
- else setError(res.error || "could not start the connect");
+ else setError(res.error || tt("modal.could_not_start_connect"));
};
return (
<div className="px-5 py-4 space-y-3">
<p className="text-[13px] text-muted">
- Opens {c.title} in your browser — approve access there. No tokens typed; connect
- again with another account to add it alongside.
+ {tt("modal.generic_blurb", { title: c.title })}
</p>
{cloud?.signed_in ? (
<button
@@ -196,7 +198,7 @@ function GenericOneClick({ c, cloud }: { c: Connector; cloud: CloudStatus | null
onClick={go}
disabled={waiting}
>
- {waiting ? "Check your browser…" : `Connect ${c.title}`}
+ {waiting ? tt("cloud.check_browser") : tt("modal.connect_title", { title: c.title })}
</button>
) : cloud ? (
<CloudSignInInline />
@@ -205,30 +207,30 @@ function GenericOneClick({ c, cloud }: { c: Connector; cloud: CloudStatus | null
)}
{error && <div className="text-[13px] text-danger">{error}</div>}
<p className="text-[12px] text-faint text-center flex items-center justify-center gap-1.5">
- <span className={TAG_ACCENT}>Recommended</span> tokens stay on this computer
+ <span className={TAG_ACCENT}>{tt("modal.recommended")}</span> {tt("modal.tokens_stay_local")}
</p>
</div>
);
}
function SlackOneClick({ c, cloud }: { c: Connector; cloud: CloudStatus | null }) {
+ const { t: tt } = useTranslation();
const [waiting, setWaiting] = useState(false);
const [error, setError] = useState<string | null>(null);
const go = async () => {
setError(null);
const res = await connectManaged(c.name);
if (res.ok) setWaiting(true);
- else setError(res.error || "could not start the install");
+ else setError(res.error || tt("modal.could_not_start_install"));
};
return (
<div className="px-5 py-4 space-y-3">
<p className="text-[13px] text-muted">
- Opens Slack in your browser — approve @ocw for the workspace. No tokens; works for any
- number of workspaces.
+ {tt("modal.slack_blurb")}
</p>
{cloud?.signed_in ? (
<button className={PILL_ACCENT + " w-full !py-2"} data-testid="modal-add-to-slack" onClick={go} disabled={waiting}>
- {waiting ? "Check your browser…" : "Add to Slack"}
+ {waiting ? tt("cloud.check_browser") : tt("modal.add_to_slack")}
</button>
) : cloud ? (
<CloudSignInInline />
@@ -237,34 +239,33 @@ function SlackOneClick({ c, cloud }: { c: Connector; cloud: CloudStatus | null }
)}
{error && <div className="text-[13px] text-danger">{error}</div>}
<p className="text-[12px] text-faint text-center flex items-center justify-center gap-1.5">
- <span className={TAG_ACCENT}>Recommended</span> relay · tokens stay on this computer
+ <span className={TAG_ACCENT}>{tt("modal.recommended")}</span> {tt("modal.slack_recommended_foot")}
</p>
</div>
);
}
function GithubOneClick({ c, cloud }: { c: Connector; cloud: CloudStatus | null }) {
+ const { t: tt } = useTranslation();
const [waiting, setWaiting] = useState(false);
const [error, setError] = useState<string | null>(null);
const go = async () => {
setError(null);
const res = await connectManaged(c.name);
if (res.ok) setWaiting(true);
- else setError(res.error || "could not start the install");
+ else setError(res.error || tt("modal.could_not_start_install"));
};
return (
<div className="px-5 py-4 space-y-3">
<p className="text-[13px] text-muted">
- Opens GitHub in your browser — approve OpenWorker there. An existing @ocw-agent App
- installation links right up; otherwise you'll pick an account and repos. No tokens
- typed; the agent acts as ocw-agent[bot].
+ {tt("modal.github_blurb")}
</p>
{cloud?.signed_in ? (
/* One button: the broker is authorize-first — it links an existing installation or
redirects the same tab on to the install page (the old "Already installed? Link
it" question and the Configure dead-end are gone). */
<button className={PILL_ACCENT + " w-full !py-2"} data-testid="modal-install-github-app" onClick={() => go()} disabled={waiting}>
- {waiting ? "Check your browser…" : "Connect GitHub"}
+ {waiting ? tt("cloud.check_browser") : tt("modal.connect_github")}
</button>
) : cloud ? (
<CloudSignInInline />
@@ -273,13 +274,14 @@ function GithubOneClick({ c, cloud }: { c: Connector; cloud: CloudStatus | null
)}
{error && <div className="text-[13px] text-danger">{error}</div>}
<p className="text-[12px] text-faint text-center flex items-center justify-center gap-1.5">
- <span className={TAG_ACCENT}>Recommended</span> relay · short-lived tokens, never stored
+ <span className={TAG_ACCENT}>{tt("modal.recommended")}</span> {tt("modal.github_recommended_foot")}
</p>
</div>
);
}
function HubSpotOneClick({ c, cloud }: { c: Connector; cloud: CloudStatus | null }) {
+ const { t: tt } = useTranslation();
const [access, setAccess] = useState<"read" | "write">("read");
const [waiting, setWaiting] = useState(false);
const [error, setError] = useState<string | null>(null);
@@ -287,19 +289,18 @@ function HubSpotOneClick({ c, cloud }: { c: Connector; cloud: CloudStatus | null
setError(null);
const res = await connectManaged(c.name, { access });
if (res.ok) setWaiting(true);
- else setError(res.error || "could not start the connect");
+ else setError(res.error || tt("modal.could_not_start_connect"));
};
return (
<div className="px-5 py-4 space-y-3">
<p className="text-[13px] text-muted">
- Opens HubSpot in your browser — pick the portal there. What agents may do is chosen
- NOW, at consent:
+ {tt("modal.hubspot_blurb")}
</p>
<div className="space-y-1.5" data-testid="hubspot-access">
{(
[
- ["read", "Read-only", "search and read contacts, companies, deals, tickets"],
- ["write", "Read & write", "adds: log notes and tasks, update records, create contacts — never delete"],
+ ["read", tt("modal.hubspot_readonly"), tt("modal.hubspot_readonly_blurb")],
+ ["write", tt("modal.hubspot_readwrite"), tt("modal.hubspot_readwrite_blurb")],
] as const
).map(([value, label, blurb]) => (
<label key={value} className="flex items-start gap-2 text-[13px] cursor-pointer">
@@ -320,7 +321,7 @@ function HubSpotOneClick({ c, cloud }: { c: Connector; cloud: CloudStatus | null
</div>
{cloud?.signed_in ? (
<button className={PILL_ACCENT + " w-full !py-2"} data-testid="modal-connect-hubspot" onClick={go} disabled={waiting}>
- {waiting ? "Check your browser…" : "Connect HubSpot"}
+ {waiting ? tt("cloud.check_browser") : tt("modal.connect_hubspot")}
</button>
) : cloud ? (
<CloudSignInInline />
@@ -329,13 +330,14 @@ function HubSpotOneClick({ c, cloud }: { c: Connector; cloud: CloudStatus | null
)}
{error && <div className="text-[13px] text-danger">{error}</div>}
<p className="text-[12px] text-faint text-center">
- Works for any number of portals · tokens stay on this computer
+ {tt("modal.hubspot_foot")}
</p>
</div>
);
}
function SlackManual({ onConnected }: { onConnected: () => void }) {
+ const { t: tt } = useTranslation();
const [bot, setBot] = useState("");
const [app, setApp] = useState("");
const [busy, setBusy] = useState(false);
@@ -346,23 +348,23 @@ function SlackManual({ onConnected }: { onConnected: () => void }) {
const res = await connectConnector("slack", { bot_token: bot.trim(), app_token: app.trim() });
setBusy(false);
if (res.ok) onConnected();
- else setError(res.error || "could not connect");
+ else setError(res.error || tt("modal.could_not_connect"));
};
return (
<div className="px-5 py-4 space-y-3">
<ol className="list-decimal pl-4 text-[13px] text-muted space-y-1">
- <li>Create an app at api.slack.com/apps</li>
- <li>Enable Socket Mode, add bot scopes, install it to your workspace</li>
- <li>Paste both tokens</li>
+ <li>{tt("modal.slack_manual_step1")}</li>
+ <li>{tt("modal.slack_manual_step2")}</li>
+ <li>{tt("modal.slack_manual_step3")}</li>
</ol>
- <input className={INPUT} type="password" placeholder="Bot token · xoxb-…" value={bot} spellCheck={false} onChange={(e) => setBot(e.target.value)} />
- <input className={INPUT} type="password" placeholder="App token · xapp-…" value={app} spellCheck={false} onChange={(e) => setApp(e.target.value)} />
+ <input className={INPUT} type="password" placeholder={tt("modal.bot_token_placeholder")} value={bot} spellCheck={false} onChange={(e) => setBot(e.target.value)} />
+ <input className={INPUT} type="password" placeholder={tt("modal.app_token_placeholder")} value={app} spellCheck={false} onChange={(e) => setApp(e.target.value)} />
<button className={PILL_LINE + " w-full !py-2"} onClick={submit} disabled={busy || !bot.trim() || !app.trim()}>
- {busy ? "Validating…" : "Connect"}
+ {busy ? tt("modal.validating") : tt("modal.connect")}
</button>
{error && <div className="text-[13px] text-danger">{error}</div>}
<p className="text-[12px] text-warnInk text-center">
- One mode at a time — this pauses any relay workspaces.
+ {tt("modal.slack_manual_pause_note")}
</p>
</div>
);
diff --git a/surfaces/gui/src/components/connectors/CalendarDetail.tsx b/surfaces/gui/src/components/connectors/CalendarDetail.tsx
index 2e95f8f8..f11019ab 100644
--- a/surfaces/gui/src/components/connectors/CalendarDetail.tsx
+++ b/surfaces/gui/src/components/connectors/CalendarDetail.tsx
@@ -1,4 +1,5 @@
import { useState } from "react";
+import { useTranslation } from "react-i18next";
import {
connectManaged,
disconnectGcalAccount,
@@ -15,6 +16,7 @@ import { FOOT, GRP, GRP_H, PILL_ACCENT, ROW, TAG_ACCENT, TAG_WARN, XBTN } from "
// Adding an account launches managed OAuth DIRECTLY (one connect mode, no modal).
export function CalendarDetail({ c, cloud, slack: _slack, onChanged }: DetailProps) {
+ const { t } = useTranslation();
const [busy, setBusy] = useState(false);
const accounts = (c.accounts ?? []) as GmailAccount[]; // email-keyed (pre-generic-layer shape)
@@ -27,7 +29,7 @@ export function CalendarDetail({ c, cloud, slack: _slack, onChanged }: DetailPro
return (
<div data-testid="gcal-detail">
<div className="flex items-center gap-3.5 mb-5">
- <ConnectorBadge connector={c} size={44} title="Google Calendar" />
+ <ConnectorBadge connector={c} size={44} title={t("calendar.google_calendar")} />
<div className="min-w-0 flex-1">
<h2 className="text-[20px] font-semibold tracking-tight leading-tight">
Google Calendar
@@ -37,11 +39,11 @@ export function CalendarDetail({ c, cloud, slack: _slack, onChanged }: DetailPro
<>
<span className="w-2 h-2 rounded-full bg-ok" />
<span data-testid="gcal-status">
- {accounts.length} account{accounts.length === 1 ? "" : "s"}
+ {t("connector.account_count", { count: accounts.length })}
</span>
</>
) : (
- <span>Not connected</span>
+ <span>{t("connector.not_connected")}</span>
)}
</div>
</div>
@@ -52,28 +54,28 @@ export function CalendarDetail({ c, cloud, slack: _slack, onChanged }: DetailPro
disabled={busy || !cloud?.signed_in || c.managed_paused}
title={
c.managed_paused
- ? "One-click Google sign-in is coming soon"
+ ? t("calendar.coming_soon_title")
: cloud?.signed_in
? ""
- : "Sign in to OpenWorker Cloud first"
+ : t("cloud.sign_in_first")
}
>
- {c.managed_paused ? "+ Add account · Coming soon" : busy ? "Check your browser…" : "+ Add account"}
+ {c.managed_paused ? t("calendar.add_account_coming_soon") : busy ? t("cloud.check_browser") : t("calendar.add_account")}
</button>
</div>
{!c.connected && (
<div className={GRP}>
<div className={ROW + " text-[13px] text-muted"}>
- Sign in with Google — each account stays separate, agents say which one they use.
- {cloud?.signed_in ? "" : " Requires cloud sign-in."}
+ {t("calendar.setup_blurb")}
+ {cloud?.signed_in ? "" : " " + t("calendar.requires_cloud")}
</div>
</div>
)}
{accounts.length > 0 && (
<>
- <div className={GRP_H + " !mt-0"}>Accounts</div>
+ <div className={GRP_H + " !mt-0"}>{t("calendar.accounts")}</div>
<div className={GRP} data-testid="gcal-accounts">
{accounts.map((a) => (
<AccountRow key={a.email} a={a} onChanged={onChanged} />
@@ -84,21 +86,21 @@ export function CalendarDetail({ c, cloud, slack: _slack, onChanged }: DetailPro
<ToolsDisclosure c={c} onChanged={onChanged} />
<div className={FOOT + " mt-2"}>
- Creating, changing, or deleting events always asks for your approval first, and the
- approval names the account.
+ {t("calendar.events_approval_foot")}
</div>
</div>
);
}
function AccountRow({ a, onChanged }: { a: GmailAccount; onChanged: () => void }) {
+ const { t } = useTranslation();
const [busy, setBusy] = useState(false);
return (
<div className={ROW} data-testid={`gcal-account-${a.email}`}>
<span className="min-w-0 flex-1 flex items-center gap-2">
<span className="text-[13px] font-medium truncate">{a.email}</span>
- {a.default && <span className={TAG_ACCENT}>Default</span>}
- {a.needs_reauth && <span className={TAG_WARN}>⚠ Sign in again</span>}
+ {a.default && <span className={TAG_ACCENT}>{t("connector.default")}</span>}
+ {a.needs_reauth && <span className={TAG_WARN}>{t("calendar.sign_in_again")}</span>}
</span>
{!a.default && (
<button
@@ -109,12 +111,12 @@ function AccountRow({ a, onChanged }: { a: GmailAccount; onChanged: () => void }
onChanged();
}}
>
- Make default
+ {t("connector.make_default")}
</button>
)}
<button
className={XBTN}
- title="Disconnect this account"
+ title={t("calendar.disconnect_account_title")}
data-testid={`gcal-disconnect-${a.email}`}
disabled={busy}
onClick={async () => {
diff --git a/surfaces/gui/src/components/connectors/ConnectorsList.tsx b/surfaces/gui/src/components/connectors/ConnectorsList.tsx
index 8657d729..69a79695 100644
--- a/surfaces/gui/src/components/connectors/ConnectorsList.tsx
+++ b/surfaces/gui/src/components/connectors/ConnectorsList.tsx
@@ -1,4 +1,5 @@
import { useState } from "react";
+import { useTranslation } from "react-i18next";
import { type CloudStatus, type Connector, type McpServer, type SlackStatus } from "../../api";
import { ConnectorBadge } from "../../connectors/ConnectorIcon";
import { AddConnectionModal } from "./AddConnectionModal";
@@ -28,6 +29,7 @@ export function ConnectorsList({
onOpen: (name: string) => void;
onChanged: () => void;
}) {
+ const { t } = useTranslation();
const [filter, setFilter] = useState("");
const [showAll, setShowAll] = useState(false);
const [connecting, setConnecting] = useState<string | null>(null);
@@ -49,10 +51,10 @@ export function ConnectorsList({
onClick={() => setAddingMcp(true)}
data-testid="add-custom-server"
>
- + Add custom MCP server
+ {t("connector.add_custom_mcp")}
</button>
<input
- placeholder="Search"
+ placeholder={t("connector.search")}
value={filter}
onChange={(e) => setFilter(e.target.value)}
className="w-44 px-3.5 py-1.5 rounded-full border border-line bg-panel text-[13px] outline-none focus:border-accent"
@@ -63,7 +65,7 @@ export function ConnectorsList({
sign-in home, and the connect modals keep their inline sign-in panes. */}
{connected.length > 0 && (
<>
- <div className={GRP_H + " !mt-0"}>Connected · {connected.length}</div>
+ <div className={GRP_H + " !mt-0"}>{t("connector.connected_count", { count: connected.length })}</div>
<div className={GRP}>
{connected.map((c) => (
<button
@@ -75,9 +77,9 @@ export function ConnectorsList({
<ConnectorBadge connector={c} size={34} title={c.title} />
<span className="min-w-0 flex-1">
<span className="font-medium text-[13px]">{c.title}</span>
- <span className="block text-[12px] text-muted">{statusLine(c)}</span>
+ <span className="block text-[12px] text-muted">{statusLine(c, t)}</span>
</span>
- {healthChip(c, slack)}
+ {healthChip(c, slack, t)}
<span className="text-faint text-[14px] shrink-0">›</span>
</button>
))}
@@ -91,7 +93,7 @@ export function ConnectorsList({
onChanged={onChanged}
/>
- <div className={GRP_H}>Available</div>
+ <div className={GRP_H}>{t("connector.available")}</div>
<div className={GRP}>
{shown.map((c) => (
/* The row navigates to the pre-connect detail page (§38); the pill
@@ -115,19 +117,19 @@ export function ConnectorsList({
setConnecting(c.name);
}}
>
- Connect
+ {t("connector.connect")}
</span>
</button>
))}
{shown.length === 0 && (
- <div className={ROW + " text-[13px] text-muted"}>Nothing matches.</div>
+ <div className={ROW + " text-[13px] text-muted"}>{t("connector.nothing_matches")}</div>
)}
</div>
{!showAll && !q && available.length > AVAILABLE_FOLD && (
<div className={FOOT}>
- {available.length - AVAILABLE_FOLD} more ·{" "}
+ {t("connector.more_count", { count: available.length - AVAILABLE_FOLD })}{" "}
<button className="text-muted hover:text-ink" onClick={() => setShowAll(true)}>
- show all
+ {t("connector.show_all")}
</button>
</div>
)}
@@ -145,31 +147,31 @@ export function ConnectorsList({
);
}
-function statusLine(c: Connector): string {
+function statusLine(c: Connector, t: (k: string, opts?: Record<string, unknown>) => string): string {
if (c.name === "slack" && c.mode === "relay") {
const n = c.workspaces?.length ?? 0;
- return `${n} workspace${n === 1 ? "" : "s"} · relay`;
+ return t("connector.slack_status", { count: n });
}
- if ((c.accounts?.length ?? 0) > 1) return `${c.accounts!.length} accounts`;
- if ((c.portals?.length ?? 0) > 1) return `${c.portals!.length} portals`;
- if (c.auth === "none") return "Built in";
- return c.account || "Connected";
+ if ((c.accounts?.length ?? 0) > 1) return t("connector.account_count", { count: c.accounts!.length });
+ if ((c.portals?.length ?? 0) > 1) return t("connector.portal_count", { count: c.portals!.length });
+ if (c.auth === "none") return t("connector.built_in");
+ return c.account || t("connector.connected");
}
-function healthChip(c: Connector, slack: SlackStatus | null) {
+function healthChip(c: Connector, slack: SlackStatus | null, t: (k: string, opts?: Record<string, unknown>) => string) {
// Slack relay gets a LIVE chip from /v1/connectors/slack/status — problems
// surface in the list, never one click deep. Named honestly per layer; we
// never claim "Slack↔cloud down" (the desktop can't see that leg).
if (c.name === "slack" && c.mode === "relay" && slack) {
- if (!slack.signed_in) return <span className={CHIP_WARN}>● Sign-in needed</span>;
- if (slack.relay.state === "offline") return <span className={CHIP_OFF}>● Offline</span>;
+ if (!slack.signed_in) return <span className={CHIP_WARN}>{"● " + t("connector.sign_in_needed")}</span>;
+ if (slack.relay.state === "offline") return <span className={CHIP_OFF}>{"● " + t("connector.offline")}</span>;
if (slack.relay.state === "reconnecting")
- return <span className={CHIP_WARN}>● Reconnecting</span>;
- if (Object.values(slack.teams).some((t) => !t.token_ok))
- return <span className={CHIP_WARN}>⚠ Token</span>;
- return <span className={CHIP_OK}>● Live</span>;
+ return <span className={CHIP_WARN}>{"● " + t("connector.reconnecting")}</span>;
+ if (Object.values(slack.teams).some((tm) => !tm.token_ok))
+ return <span className={CHIP_WARN}>{"⚠ " + t("connector.token")}</span>;
+ return <span className={CHIP_OK}>{"● " + t("connector.live")}</span>;
}
- if (c.two_way && c.connected) return <span className={CHIP_OK}>● Live</span>;
- return <span className={CHIP_OK}>● Ready</span>;
+ if (c.two_way && c.connected) return <span className={CHIP_OK}>{"● " + t("connector.live")}</span>;
+ return <span className={CHIP_OK}>{"● " + t("connector.ready")}</span>;
}
diff --git a/surfaces/gui/src/components/connectors/CustomMcp.tsx b/surfaces/gui/src/components/connectors/CustomMcp.tsx
index 814847c5..532ab5eb 100644
--- a/surfaces/gui/src/components/connectors/CustomMcp.tsx
+++ b/surfaces/gui/src/components/connectors/CustomMcp.tsx
@@ -1,4 +1,5 @@
import { useEffect, useState } from "react";
+import { getI18n, useTranslation } from "react-i18next";
import {
addMcpServer,
connectMcp,
@@ -32,6 +33,7 @@ import {
// Curated OAuth quick-adds: remote MCP servers with browser sign-in (OAuth 2.1 +
// DCR) — no keys to paste, tokens stay in the local secret store.
+// `blurb` is an i18n key, resolved at render time.
export const MCP_PRESETS: {
name: string;
label: string;
@@ -41,27 +43,30 @@ export const MCP_PRESETS: {
{
name: "granola",
label: "Granola",
- blurb: "Meeting notes & transcripts — sign in with your Granola account.",
+ blurb: "mcp.preset_granola_blurb",
config: { type: "http", url: "https://mcp.granola.ai/mcp", auth: "oauth" },
},
];
export function mcpChip(s: McpServer) {
+ const t = getI18n().t;
const isOauth = s.auth === "oauth";
- if (!s.enabled) return <span className={CHIP_OFF}>● Off</span>;
+ if (!s.enabled) return <span className={CHIP_OFF}>● {t("mcp.status_off")}</span>;
if (s.status === "authorizing")
- return <span className={CHIP_WARN}>● {isOauth ? "Signing in…" : "Testing…"}</span>;
- if (s.status === "connected") return <span className={CHIP_OK}>● Live</span>;
+ return <span className={CHIP_WARN}>● {isOauth ? t("mcp.status_signing_in") : t("mcp.status_testing")}</span>;
+ if (s.status === "connected") return <span className={CHIP_OK}>● {t("connector.live")}</span>;
if (s.auth_hint || s.status === "needs_auth")
- return <span className={CHIP_WARN}>● Needs sign-in</span>;
- if (s.status === "error") return <span className={CHIP_ERR}>● Error</span>;
- if (s.last_test_at) return <span className={CHIP_OK}>● Ready</span>;
- return <span className={CHIP_OFF}>● Not tested</span>;
+ return <span className={CHIP_WARN}>● {t("mcp.status_needs_sign_in")}</span>;
+ if (s.status === "error") return <span className={CHIP_ERR}>● {t("mcp.status_error")}</span>;
+ if (s.last_test_at) return <span className={CHIP_OK}>● {t("connector.ready")}</span>;
+ return <span className={CHIP_OFF}>● {t("mcp.status_not_tested")}</span>;
}
export function mcpStatusLine(s: McpServer): string {
+ const t = getI18n().t;
const bits: string[] = [s.transport];
- if (s.status === "connected" && s.tool_count != null) bits.push(`${s.tool_count} tools`);
+ if (s.status === "connected" && s.tool_count != null)
+ bits.push(t("mcp.tool_count", { count: s.tool_count }));
else if (s.transport === "http" && s.config?.url) {
try {
bits.push(new URL(s.config.url).host);
@@ -73,7 +78,7 @@ export function mcpStatusLine(s: McpServer): string {
// something (it re-round-trips the connection and refreshes the tool count).
if (s.last_test_at) {
const rel = relTime(s.last_test_at);
- if (rel) bits.push(`tested ${rel}`);
+ if (rel) bits.push(t("mcp.tested_rel", { rel }));
}
return bits.join(" · ");
}
@@ -96,6 +101,7 @@ export function CustomMcpGroup({
onOpen: (name: string) => void;
onChanged: () => void;
}) {
+ const { t } = useTranslation();
const servers = serversProp;
// A probe in flight ("Testing…" / "Signing in…") settles server-side within seconds,
// but this page has no standing MCP poll — the chip froze on Testing forever
@@ -112,7 +118,7 @@ export function CustomMcpGroup({
return (
<>
- <div className={GRP_H}>Custom · MCP</div>
+ <div className={GRP_H}>{t("mcp.group_custom")}</div>
<div className={GRP} data-testid="custom-mcp-group">
{servers.map((s) => (
<button
@@ -135,7 +141,7 @@ export function CustomMcpGroup({
<McpGlyph />
<span className="min-w-0 flex-1">
<span className="font-medium text-[13px]">{p.label}</span>
- <span className="block text-[12px] text-muted truncate">{p.blurb}</span>
+ <span className="block text-[12px] text-muted truncate">{t(p.blurb)}</span>
</span>
<span
className={PILL_QUIET + " cursor-pointer"}
@@ -146,7 +152,7 @@ export function CustomMcpGroup({
onChanged();
}}
>
- Connect
+ {t("connector.connect")}
</span>
</div>
))}
@@ -193,6 +199,7 @@ export function AddMcpModal({
onClose: () => void;
onChanged: () => void;
}) {
+ const { t } = useTranslation();
const [tab, setTab] = useState<"url" | "json">("url");
const [name, setName] = useState("");
const [url, setUrl] = useState("");
@@ -210,11 +217,11 @@ export function AddMcpModal({
const n = name.trim();
const u = url.trim();
if (!n) {
- setError("Give the server a name.");
+ setError(t("mcp.err_name"));
return;
}
if (!/^https?:\/\/\S+$/.test(u)) {
- setError("Enter the server's full URL (https://…).");
+ setError(t("mcp.err_url"));
return;
}
await addMcpServer(n, { type: "http", url: u });
@@ -231,7 +238,7 @@ export function AddMcpModal({
try {
parsed = JSON.parse(text);
} catch (e: any) {
- setError("Invalid JSON: " + e.message);
+ setError(t("mcp.err_invalid_json", { message: e.message }));
return;
}
// Accept either {mcpServers:{...}}, {name:{...}}, or a single bare config.
@@ -239,7 +246,7 @@ export function AddMcpModal({
const entries =
map && typeof map === "object" && !map.command && !map.url ? Object.entries(map) : null;
if (!entries || entries.length === 0) {
- setError('Paste a `{ "<name>": { … } }` object (or a full mcpServers block).');
+ setError(t("mcp.err_json_shape"));
return;
}
for (const [n, config] of entries) {
@@ -258,29 +265,26 @@ export function AddMcpModal({
<div className="absolute inset-0 bg-black/30" onClick={onClose} />
<div className="absolute left-1/2 top-24 -translate-x-1/2 w-[540px] max-w-[92vw] rounded-xl2 border border-line bg-panel shadow-xl p-5 space-y-3">
<div className="flex items-center justify-between">
- <div className="text-[14px] font-semibold">Add custom MCP server</div>
+ <div className="text-[14px] font-semibold">{t("mcp.add_title")}</div>
<button className="text-faint hover:text-ink text-[16px] leading-none" onClick={onClose}>
×
</button>
</div>
<div className="flex items-center gap-1.5">
<button className={tabBtn(tab === "url")} onClick={() => setTab("url")} data-testid="mcp-add-tab-url">
- Remote URL
+ {t("mcp.tab_remote_url")}
</button>
<button className={tabBtn(tab === "json")} onClick={() => setTab("json")} data-testid="mcp-add-tab-json">
- JSON
+ {t("mcp.tab_json")}
</button>
</div>
{tab === "url" ? (
<>
- <div className="text-[13px] text-muted">
- Connect a hosted MCP server. If it needs sign-in, the row will offer it after the
- first test.
- </div>
+ <div className="text-[13px] text-muted">{t("mcp.add_url_blurb")}</div>
<input
value={name}
onChange={(e) => setName(e.target.value)}
- placeholder="Name (shown in the connectors list)"
+ placeholder={t("mcp.add_name_ph")}
spellCheck={false}
className={INPUT}
data-testid="mcp-add-name"
@@ -301,7 +305,7 @@ export function AddMcpModal({
</>
) : (
<>
- <div className="text-[13px] text-muted">Paste server JSON (name → config):</div>
+ <div className="text-[13px] text-muted">{t("mcp.add_json_blurb")}</div>
<textarea
value={text}
onChange={(e) => setText(e.target.value)}
@@ -313,10 +317,10 @@ export function AddMcpModal({
)}
<div className="flex items-center gap-3">
<button className={PILL_ACCENT} onClick={tab === "url" ? saveUrl : saveJson}>
- {tab === "url" ? "Add & test" : "Add"}
+ {tab === "url" ? t("mcp.add_and_test") : t("manage.add_btn")}
</button>
<button className="text-[13px] text-muted hover:text-ink" onClick={onClose}>
- cancel
+ {t("manage.cancel")}
</button>
</div>
{error && <div className="text-[13px] text-danger">{error}</div>}
@@ -336,6 +340,7 @@ export function McpServerDetail({
onChanged: () => void;
onGone: () => void;
}) {
+ const { t } = useTranslation();
const [tools, setTools] = useState<{ name: string; description: string }[] | null>(null);
const [busy, setBusy] = useState(false);
const [toolErr, setToolErr] = useState<string | null>(null);
@@ -368,7 +373,7 @@ export function McpServerDetail({
const res = await getMcpTools(server.name);
setBusy(false);
if (res.ok) setTools(res.tools);
- else setToolErr(res.error || "failed to connect");
+ else setToolErr(res.error || t("mcp.err_failed_connect"));
};
return (
@@ -384,22 +389,20 @@ export function McpServerDetail({
<div className={GRP}>
<div className={ROW}>
- <span className="text-[13px] flex-1">Enabled</span>
+ <span className="text-[13px] flex-1">{t("persona.enabled")}</span>
<Toggle
checked={server.enabled}
onChange={async () => {
await patchMcpServer(server.name, { enabled: !server.enabled });
onChanged();
}}
- title="Enable this server"
+ title={t("mcp.enable_title")}
/>
</div>
<div className={ROW}>
<span className="text-[13px] flex-1">
- Test connection
- <span className="block text-[12px] text-faint">
- Starts the server and lists its tools — without opening a session.
- </span>
+ {t("mcp.test_connection")}
+ <span className="block text-[12px] text-faint">{t("mcp.test_desc")}</span>
</span>
{server.auth_hint && !isOauth ? (
<span
@@ -408,7 +411,7 @@ export function McpServerDetail({
onClick={signInWithOauth}
data-testid={`mcp-authfix-${server.name}`}
>
- Sign in
+ {t("gallery.sign_in")}
</span>
) : isOauth && server.status === "needs_auth" ? (
<span
@@ -417,7 +420,7 @@ export function McpServerDetail({
onClick={runTest}
data-testid={`mcp-signin-${server.name}`}
>
- Sign in
+ {t("gallery.sign_in")}
</span>
) : (
<span
@@ -426,7 +429,7 @@ export function McpServerDetail({
onClick={authorizing ? undefined : runTest}
data-testid={`mcp-test-${server.name}`}
>
- {authorizing ? "Testing…" : "Test"}
+ {authorizing ? t("mcp.status_testing") : t("provider.test_btn")}
</span>
)}
</div>
@@ -436,15 +439,15 @@ export function McpServerDetail({
</div>
)}
<div className={ROW}>
- <span className="text-[13px] flex-1">Tools</span>
+ <span className="text-[13px] flex-1">{t("available.tools")}</span>
<button className="text-[13px] text-muted hover:text-ink" onClick={loadTools} disabled={busy}>
- {busy ? "…" : tools ? "hide" : "show"}
+ {busy ? "…" : tools ? t("mcp.hide") : t("mcp.show")}
</button>
</div>
{toolErr && <div className="px-4 py-2.5 text-[13px] text-danger">{toolErr}</div>}
{tools && (
<div className="px-4 py-3 flex flex-wrap gap-1.5">
- {tools.length === 0 && <div className="text-[12px] text-faint">No tools.</div>}
+ {tools.length === 0 && <div className="text-[12px] text-faint">{t("manage.mcp_no_tools")}</div>}
{tools.map((t) => (
<span
key={t.name}
@@ -460,7 +463,7 @@ export function McpServerDetail({
<div className={GRP}>
<div className="px-4 py-3">
- <div className="text-[12px] font-semibold text-muted mb-1.5">Configuration</div>
+ <div className="text-[12px] font-semibold text-muted mb-1.5">{t("mcp.configuration")}</div>
<pre className="font-mono text-[12px] text-muted whitespace-pre-wrap break-all">
{JSON.stringify(server.config, null, 2)}
</pre>
@@ -477,7 +480,7 @@ export function McpServerDetail({
}}
data-testid={`mcp-signout-${server.name}`}
>
- Sign out
+ {t("sidebar.sign_out")}
</button>
)}
<button
@@ -489,7 +492,7 @@ export function McpServerDetail({
}}
data-testid={`mcp-remove-${server.name}`}
>
- Remove server
+ {t("mcp.remove_server")}
</button>
</div>
</div>
diff --git a/surfaces/gui/src/components/connectors/GithubDetail.tsx b/surfaces/gui/src/components/connectors/GithubDetail.tsx
index cad97ab0..b7b86e52 100644
--- a/surfaces/gui/src/components/connectors/GithubDetail.tsx
+++ b/surfaces/gui/src/components/connectors/GithubDetail.tsx
@@ -1,4 +1,5 @@
import { useEffect, useState } from "react";
+import { useTranslation } from "react-i18next";
import {
disallowUser,
disconnectGithubInstallation,
@@ -28,18 +29,19 @@ import { FOOT, GRP, GRP_H, PILL_ACCENT, PILL_LINE, ROW, TAG_WARN, XBTN } from ".
const LABEL = "text-[13px] text-muted w-24 shrink-0";
/** The relay status line, one honest layer at a time (the Slack rule). */
-function relayHealth(gh: GithubStatus | null): { dot: string; text: string } {
- if (!gh) return { dot: "bg-ok", text: "Live · managed relay" };
+function relayHealth(gh: GithubStatus | null, t: (k: string) => string): { dot: string; text: string } {
+ if (!gh) return { dot: "bg-ok", text: t("github.relay_live") };
if (!gh.signed_in)
- return { dot: "bg-warnInk", text: "Sign-in needed — relaying is paused" };
+ return { dot: "bg-warnInk", text: t("github.relay_signin_needed") };
if (gh.relay.state === "offline")
- return { dot: "bg-faint/60", text: "Offline — can't reach the relay" };
+ return { dot: "bg-faint/60", text: t("github.relay_offline") };
if (gh.relay.state === "reconnecting")
- return { dot: "bg-warnInk", text: "Reconnecting to the relay…" };
- return { dot: "bg-ok", text: "Live · managed relay" };
+ return { dot: "bg-warnInk", text: t("github.relay_reconnecting") };
+ return { dot: "bg-ok", text: t("github.relay_live") };
}
export function GithubDetail({ c, cloud, onChanged }: DetailProps) {
+ const { t } = useTranslation();
const [adding, setAdding] = useState(false);
const [subs, setSubs] = useState<Subscription[]>([]);
const [status, setStatus] = useState<GithubStatus | null>(null);
@@ -70,17 +72,17 @@ export function GithubDetail({ c, cloud, onChanged }: DetailProps) {
<>
<span
className={
- "w-2 h-2 rounded-full " + (relay ? relayHealth(status).dot : "bg-ok")
+ "w-2 h-2 rounded-full " + (relay ? relayHealth(status, t).dot : "bg-ok")
}
/>
<span data-testid="github-mode-badge">
{relay
- ? relayHealth(status).text
- : "Connected · personal access token"}
+ ? relayHealth(status, t).text
+ : t("github.connected_pat")}
</span>
</>
) : (
- <span>Not connected</span>
+ <span>{t("connector.not_connected")}</span>
)}
</div>
</div>
@@ -90,7 +92,7 @@ export function GithubDetail({ c, cloud, onChanged }: DetailProps) {
data-testid="add-installation-btn"
onClick={() => setAdding(true)}
>
- + Add installation
+ {t("github.add_installation")}
</button>
)}
</div>
@@ -98,9 +100,8 @@ export function GithubDetail({ c, cloud, onChanged }: DetailProps) {
{!c.connected && (
<div className={GRP}>
<div className={ROW + " text-[13px] text-muted"}>
- One @ocw-agent App, installed per account or org — you pick the repos on
- GitHub; each installation keeps its own allow-list.
- {cloud?.signed_in ? "" : " One-click needs cloud sign-in; a PAT works without it."}
+ {t("github.setup_blurb")}
+ {cloud?.signed_in ? "" : " " + t("github.setup_cloud_note")}
</div>
</div>
)}
@@ -120,15 +121,14 @@ export function GithubDetail({ c, cloud, onChanged }: DetailProps) {
{c.connected && !relay && (
<div className={GRP} data-testid="github-manual-card">
<div className={ROW + " text-[13px] text-muted"}>
- Personal access token · tools only. Install the GitHub App to let
- @-mentions and the agent label reach this computer.
+ {t("github.manual_card_note")}
</div>
</div>
)}
{relay && listening.length > 0 && (
<>
- <div className={GRP_H}>Listening</div>
+ <div className={GRP_H}>{t("connector.listening")}</div>
<div className={GRP}>
<ListeningRows subs={listening} onChanged={changed} />
</div>
@@ -138,8 +138,7 @@ export function GithubDetail({ c, cloud, onChanged }: DetailProps) {
<ToolsDisclosure c={c} onChanged={onChanged} />
{c.connected && relay && (
<div className={FOOT + " mt-2"}>
- Triggers: @ocw-agent mentions and the “ocw-agent” label. The agent replies as
- ocw-agent[bot].
+ {t("github.triggers_foot")}
</div>
)}
@@ -147,7 +146,7 @@ export function GithubDetail({ c, cloud, onChanged }: DetailProps) {
<AddConnectionModal
c={c}
cloud={cloud}
- title="Add an installation"
+ title={t("github.add_installation_title")}
onClose={() => setAdding(false)}
onChanged={changed}
/>
@@ -167,6 +166,7 @@ function InstallationGroup({
tokenOk: boolean;
onChanged: () => void;
}) {
+ const { t } = useTranslation();
const [busy, setBusy] = useState(false);
const parked = (c.unauthorized ?? []).filter((m) => m.team_id === inst.installation_id);
const empty = inst.allowed_users.length === 0 && parked.length === 0;
@@ -184,12 +184,12 @@ function InstallationGroup({
<span>
{inst.account_login}{" "}
<span className="font-normal text-faint" title={`installation ${inst.installation_id}`}>
- · {inst.repo_selection === "all" ? "all repos" : "selected repos"}
+ · {inst.repo_selection === "all" ? t("github.all_repos") : t("github.selected_repos")}
</span>
</span>
{!tokenOk && (
<span className={TAG_WARN} data-testid={`token-warn-${inst.installation_id}`}>
- ⚠ Installation revoked — reinstall
+ {t("github.install_revoked")}
</span>
)}
</div>
@@ -197,7 +197,7 @@ function InstallationGroup({
{empty ? (
<div className={ROW}>
<span className="min-w-0 flex-1 text-[13px] text-muted">
- No one allowed yet — @ocw-agent mentions show up here for your OK.
+ {t("github.empty_parked_note")}
</span>
<DisconnectBtn id={inst.installation_id} busy={busy} onClick={disconnect} />
</div>
@@ -223,15 +223,16 @@ function InstallationGroup({
}
function DisconnectBtn({ id, busy, onClick }: { id: string; busy: boolean; onClick: () => void }) {
+ const { t } = useTranslation();
return (
<button
className="text-[13px] text-danger/80 hover:text-danger shrink-0"
data-testid={`disconnect-install-${id}`}
- title="Stops relaying this installation to this computer. The App stays installed on GitHub."
+ title={t("github.disconnect_install_title")}
onClick={onClick}
disabled={busy}
>
- {busy ? "Disconnecting…" : "Disconnect installation"}
+ {busy ? t("connector.disconnecting") : t("github.disconnect_install")}
</button>
);
}
@@ -245,12 +246,13 @@ function PeopleRow({
installationId: string;
onChanged: () => void;
}) {
+ const { t } = useTranslation();
return (
<div className={ROW}>
- <span className={LABEL}>People</span>
+ <span className={LABEL}>{t("connector.people")}</span>
<span className="min-w-0 flex-1 flex flex-wrap items-center gap-1.5">
{allowed.length === 0 && (
- <span className="text-[12px] text-faint">nobody yet — approve a waiting sender below</span>
+ <span className="text-[12px] text-faint">{t("github.nobody_yet")}</span>
)}
{allowed.map((login) => (
<span
@@ -261,7 +263,7 @@ function PeopleRow({
@{login}
<button
className={XBTN}
- title="remove"
+ title={t("common.remove")}
onClick={() => disallowUser("github", login, installationId).then(onChanged)}
>
×
@@ -274,35 +276,36 @@ function PeopleRow({
}
function WaitingRow({ m, onChanged }: { m: ParkedMessage; onChanged: () => void }) {
+ const { t } = useTranslation();
const act = async (action: "dismiss" | "allow" | "allow_deliver") => {
await resolveUnauthorized("github", m.id, action);
onChanged();
};
return (
<div className={ROW + " bg-warnSoft/25"} data-testid={`waiting-${m.id}`}>
- <span className={LABEL}>Waiting</span>
+ <span className={LABEL}>{t("connector.waiting")}</span>
<span className="min-w-0 flex-1">
<span className="font-medium text-[13px]">@{m.user_name || m.user_id}</span>{" "}
- <span className="text-[13px] text-muted">in {m.chat_name || m.chat_id}</span>
+ <span className="text-[13px] text-muted">{t("connector.in_channel", { name: m.chat_name || m.chat_id })}</span>
<span className="block text-[13px] text-muted truncate">“{m.text}”</span>
</span>
<button
className={PILL_ACCENT + " !py-1"}
data-testid={`parked-allow-deliver-${m.id}`}
- title="Allow the sender and deliver this mention now"
+ title={t("github.allow_deliver_title")}
onClick={() => act("allow_deliver")}
>
- Allow & deliver
+ {t("connector.allow_deliver")}
</button>
<button
className={PILL_LINE + " !py-1"}
data-testid={`parked-allow-${m.id}`}
- title="Allow the sender; this mention is discarded"
+ title={t("github.allow_discard_title")}
onClick={() => act("allow")}
>
- Allow
+ {t("connector.allow")}
</button>
- <button className={XBTN + " px-1"} data-testid={`parked-dismiss-${m.id}`} title="Dismiss" onClick={() => act("dismiss")}>
+ <button className={XBTN + " px-1"} data-testid={`parked-dismiss-${m.id}`} title={t("connector.dismiss")} onClick={() => act("dismiss")}>
×
</button>
</div>
@@ -310,9 +313,10 @@ function WaitingRow({ m, onChanged }: { m: ParkedMessage; onChanged: () => void
}
function ListeningRows({ subs, onChanged }: { subs: Subscription[]; onChanged: () => void }) {
+ const { t } = useTranslation();
return (
<div className={ROW} data-testid="listening-github">
- <span className={LABEL}>Listening</span>
+ <span className={LABEL}>{t("connector.listening")}</span>
<span className="min-w-0 flex-1 space-y-1">
{subs.map((s) => (
<span key={s.session_id + s.channel} className="flex items-center gap-2 text-[13px]">
@@ -325,7 +329,7 @@ function ListeningRows({ subs, onChanged }: { subs: Subscription[]; onChanged: (
</span>
<button
className={XBTN + " ml-auto"}
- title="Unsubscribe this session"
+ title={t("connector.unsubscribe_title")}
onClick={async () => {
await unsubscribeChannel(s.session_id, s.channel);
onChanged();
diff --git a/surfaces/gui/src/components/connectors/GmailDetail.tsx b/surfaces/gui/src/components/connectors/GmailDetail.tsx
index fe06b3d9..5fafd589 100644
--- a/surfaces/gui/src/components/connectors/GmailDetail.tsx
+++ b/surfaces/gui/src/components/connectors/GmailDetail.tsx
@@ -1,4 +1,5 @@
import { useState } from "react";
+import { useTranslation } from "react-i18next";
import {
connectManaged,
disconnectGmailAccount,
@@ -19,6 +20,7 @@ import { FOOT, GRP, GRP_H, PILL_ACCENT, ROW, TAG_ACCENT, TAG_WARN, XBTN } from "
const LABEL = "text-[13px] text-muted w-24 shrink-0";
export function GmailDetail({ c, cloud, slack: _slack, onChanged }: DetailProps) {
+ const { t } = useTranslation();
const [busy, setBusy] = useState(false);
const accounts = (c.accounts ?? []) as GmailAccount[]; // email-keyed (pre-generic-layer shape)
@@ -39,11 +41,11 @@ export function GmailDetail({ c, cloud, slack: _slack, onChanged }: DetailProps)
<>
<span className="w-2 h-2 rounded-full bg-ok" />
<span data-testid="gmail-status">
- {accounts.length} account{accounts.length === 1 ? "" : "s"}
+ {t("connector.account_count", { count: accounts.length })}
</span>
</>
) : (
- <span>Not connected</span>
+ <span>{t("connector.not_connected")}</span>
)}
</div>
</div>
@@ -54,28 +56,28 @@ export function GmailDetail({ c, cloud, slack: _slack, onChanged }: DetailProps)
disabled={busy || !cloud?.signed_in || c.managed_paused}
title={
c.managed_paused
- ? "One-click Google sign-in is coming soon"
+ ? t("gmail.coming_soon_title")
: cloud?.signed_in
? ""
- : "Sign in to OpenWorker Cloud first"
+ : t("cloud.sign_in_first")
}
>
- {c.managed_paused ? "+ Add account · Coming soon" : busy ? "Check your browser…" : "+ Add account"}
+ {c.managed_paused ? t("gmail.add_account_coming_soon") : busy ? t("cloud.check_browser") : t("gmail.add_account")}
</button>
</div>
{!c.connected && (
<div className={GRP}>
<div className={ROW + " text-[13px] text-muted"}>
- Sign in with Google — each mailbox stays separate, agents say which one they use.
- {cloud?.signed_in ? "" : " Requires cloud sign-in."}
+ {t("gmail.setup_blurb")}
+ {cloud?.signed_in ? "" : " " + t("gmail.requires_cloud")}
</div>
</div>
)}
{accounts.length > 0 && (
<>
- <div className={GRP_H + " !mt-0"}>Accounts</div>
+ <div className={GRP_H + " !mt-0"}>{t("gmail.accounts")}</div>
<div className={GRP} data-testid="gmail-accounts">
{accounts.map((a) => (
<AccountRow key={a.email} a={a} onChanged={onChanged} />
@@ -88,21 +90,21 @@ export function GmailDetail({ c, cloud, slack: _slack, onChanged }: DetailProps)
<ToolsDisclosure c={c} onChanged={onChanged} />
<div className={FOOT + " mt-2"}>
- Filters are enforced on this computer, before an agent sees results. Hidden counts show
- on the tool card and in Activity — never the content.
+ {t("gmail.filters_foot")}
</div>
</div>
);
}
function AccountRow({ a, onChanged }: { a: GmailAccount; onChanged: () => void }) {
+ const { t } = useTranslation();
const [busy, setBusy] = useState(false);
return (
<div className={ROW} data-testid={`gmail-account-${a.email}`}>
<span className="min-w-0 flex-1 flex items-center gap-2">
<span className="text-[13px] font-medium truncate">{a.email}</span>
- {a.default && <span className={TAG_ACCENT}>Default</span>}
- {a.needs_reauth && <span className={TAG_WARN}>⚠ Sign in again</span>}
+ {a.default && <span className={TAG_ACCENT}>{t("connector.default")}</span>}
+ {a.needs_reauth && <span className={TAG_WARN}>{t("gmail.sign_in_again")}</span>}
</span>
{!a.default && (
<button
@@ -113,12 +115,12 @@ function AccountRow({ a, onChanged }: { a: GmailAccount; onChanged: () => void }
onChanged();
}}
>
- Make default
+ {t("connector.make_default")}
</button>
)}
<button
className={XBTN}
- title="Disconnect this mailbox"
+ title={t("gmail.disconnect_mailbox_title")}
data-testid={`gmail-disconnect-${a.email}`}
disabled={busy}
onClick={async () => {
@@ -135,15 +137,16 @@ function AccountRow({ a, onChanged }: { a: GmailAccount; onChanged: () => void }
}
function FiltersGroup({ c, onChanged }: Pick<DetailProps, "c" | "onChanged">) {
+ const { t } = useTranslation();
const filters = c.filters ?? { senders: [], labels: [] };
return (
<>
- <div className={GRP_H}>Never show agents</div>
+ <div className={GRP_H}>{t("gmail.never_show_agents")}</div>
<div className={GRP} data-testid="gmail-filters">
<ChipListRow
- label="Senders"
+ label={t("gmail.senders")}
testid="gmail-filter-senders"
- placeholder="[email protected] or @domain.com"
+ placeholder={t("gmail.senders_placeholder")}
values={filters.senders}
onSave={async (senders) => {
await setGmailFilters({ senders });
@@ -151,9 +154,9 @@ function FiltersGroup({ c, onChanged }: Pick<DetailProps, "c" | "onChanged">) {
}}
/>
<ChipListRow
- label="Labels"
+ label={t("gmail.labels")}
testid="gmail-filter-labels"
- placeholder="Label name, e.g. Personal"
+ placeholder={t("gmail.labels_placeholder")}
values={filters.labels}
onSave={async (labels) => {
await setGmailFilters({ labels });
@@ -162,7 +165,7 @@ function FiltersGroup({ c, onChanged }: Pick<DetailProps, "c" | "onChanged">) {
/>
</div>
<div className={FOOT}>
- Matching email is silently left out of what agents read — no trace they could probe.
+ {t("gmail.filters_foot_inner")}
</div>
</>
);
@@ -181,6 +184,7 @@ function ChipListRow({
values: string[];
onSave: (next: string[]) => Promise<void>;
}) {
+ const { t } = useTranslation();
const [draft, setDraft] = useState("");
const add = async () => {
const v = draft.trim();
@@ -200,7 +204,7 @@ function ChipListRow({
{v}
<button
className={XBTN}
- title="remove"
+ title={t("common.remove")}
onClick={() => onSave(values.filter((x) => x !== v))}
>
×
diff --git a/surfaces/gui/src/components/connectors/HubSpotDetail.tsx b/surfaces/gui/src/components/connectors/HubSpotDetail.tsx
index ff8f56ce..de74f59e 100644
--- a/surfaces/gui/src/components/connectors/HubSpotDetail.tsx
+++ b/surfaces/gui/src/components/connectors/HubSpotDetail.tsx
@@ -1,4 +1,5 @@
import { useState } from "react";
+import { useTranslation } from "react-i18next";
import {
disconnectHubSpotPortal,
setHubSpotDefaultPortal,
@@ -20,6 +21,7 @@ import { FOOT, GRP, GRP_H, PILL_ACCENT, ROW, TAG_ACCENT, TAG_QUIET, TAG_WARN, XB
const LABEL = "text-[13px] text-muted w-24 shrink-0";
export function HubSpotDetail({ c, cloud, slack: _slack, onChanged }: DetailProps) {
+ const { t } = useTranslation();
const [adding, setAdding] = useState(false);
const portals = c.portals ?? [];
@@ -34,31 +36,30 @@ export function HubSpotDetail({ c, cloud, slack: _slack, onChanged }: DetailProp
<>
<span className="w-2 h-2 rounded-full bg-ok" />
<span data-testid="hubspot-status">
- {portals.length} portal{portals.length === 1 ? "" : "s"}
+ {t("hubspot.portal_count", { count: portals.length })}
</span>
</>
) : (
- <span>Not connected</span>
+ <span>{t("connector.not_connected")}</span>
)}
</div>
</div>
<button className={PILL_ACCENT} data-testid="add-portal-btn" onClick={() => setAdding(true)}>
- + Add portal
+ {t("hubspot.add_portal")}
</button>
</div>
{!c.connected && (
<div className={GRP}>
<div className={ROW + " text-[13px] text-muted"}>
- Connect a portal — read-only or read &amp; write is chosen at consent; there are no
- delete tools either way.
+ {t("hubspot.setup_blurb")}
</div>
</div>
)}
{portals.length > 0 && (
<>
- <div className={GRP_H + " !mt-0"}>Portals</div>
+ <div className={GRP_H + " !mt-0"}>{t("hubspot.portals")}</div>
<div className={GRP} data-testid="hubspot-portals">
{portals.map((p) => (
<PortalRow key={p.hub_id} p={p} onChanged={onChanged} />
@@ -71,15 +72,14 @@ export function HubSpotDetail({ c, cloud, slack: _slack, onChanged }: DetailProp
<ToolsDisclosure c={c} onChanged={onChanged} />
<div className={FOOT + " mt-2"}>
- Hidden fields never reach an agent; stripped counts land in Activity. To limit what a
- HUMAN teammate could ask for, use HubSpot permission sets on the connected user.
+ {t("hubspot.hidden_fields_foot")}
</div>
{adding && (
<AddConnectionModal
c={c}
cloud={cloud}
- title="Add a portal"
+ title={t("hubspot.add_portal_title")}
onClose={() => setAdding(false)}
onChanged={onChanged}
/>
@@ -89,6 +89,7 @@ export function HubSpotDetail({ c, cloud, slack: _slack, onChanged }: DetailProp
}
function PortalRow({ p, onChanged }: { p: HubSpotPortal; onChanged: () => void }) {
+ const { t } = useTranslation();
const [busy, setBusy] = useState(false);
return (
<div className={ROW} data-testid={`hubspot-portal-${p.hub_id}`}>
@@ -96,14 +97,14 @@ function PortalRow({ p, onChanged }: { p: HubSpotPortal; onChanged: () => void }
<span className="text-[13px] font-medium truncate" title={`hub ${p.hub_id}`}>
{p.name}
</span>
- {p.default && <span className={TAG_ACCENT}>Default</span>}
- {p.sandbox && <span className={TAG_WARN}>Sandbox</span>}
+ {p.default && <span className={TAG_ACCENT}>{t("connector.default")}</span>}
+ {p.sandbox && <span className={TAG_WARN}>{t("hubspot.sandbox")}</span>}
{p.access && (
<span className={TAG_QUIET} data-testid={`hubspot-access-tag-${p.hub_id}`}>
- {p.access === "write" ? "read & write" : "read-only"}
+ {p.access === "write" ? t("hubspot.read_write") : t("hubspot.read_only")}
</span>
)}
- {!p.managed && <span className={TAG_QUIET}>private app</span>}
+ {!p.managed && <span className={TAG_QUIET}>{t("hubspot.private_app")}</span>}
</span>
{!p.default && (
<button
@@ -114,12 +115,12 @@ function PortalRow({ p, onChanged }: { p: HubSpotPortal; onChanged: () => void }
onChanged();
}}
>
- Make default
+ {t("connector.make_default")}
</button>
)}
<button
className={XBTN}
- title="Disconnect this portal"
+ title={t("hubspot.disconnect_portal_title")}
data-testid={`hubspot-disconnect-${p.hub_id}`}
disabled={busy}
onClick={async () => {
@@ -136,6 +137,7 @@ function PortalRow({ p, onChanged }: { p: HubSpotPortal; onChanged: () => void }
}
function PrivacyGroup({ c, onChanged }: Pick<DetailProps, "c" | "onChanged">) {
+ const { t } = useTranslation();
const fields = c.hidden_fields ?? [];
const [draft, setDraft] = useState("");
const save = async (next: string[]) => {
@@ -150,10 +152,10 @@ function PrivacyGroup({ c, onChanged }: Pick<DetailProps, "c" | "onChanged">) {
};
return (
<>
- <div className={GRP_H}>Access &amp; privacy</div>
+ <div className={GRP_H}>{t("hubspot.access_privacy")}</div>
<div className={GRP}>
<div className={ROW} data-testid="hubspot-hidden-fields">
- <span className={LABEL}>Hidden fields</span>
+ <span className={LABEL}>{t("hubspot.hidden_fields")}</span>
<span className="min-w-0 flex-1 flex flex-wrap items-center gap-1.5">
{fields.map((f) => (
<span
@@ -161,14 +163,14 @@ function PrivacyGroup({ c, onChanged }: Pick<DetailProps, "c" | "onChanged">) {
className="inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-paper border border-line text-[13px] font-mono"
>
{f}
- <button className={XBTN} title="remove" onClick={() => save(fields.filter((x) => x !== f))}>
+ <button className={XBTN} title={t("common.remove")} onClick={() => save(fields.filter((x) => x !== f))}>
×
</button>
</span>
))}
<input
className="flex-1 min-w-[140px] bg-transparent text-[13px] outline-none placeholder:text-faint"
- placeholder="Property name, e.g. salary"
+ placeholder={t("hubspot.hidden_fields_placeholder")}
value={draft}
onChange={(e) => setDraft(e.target.value)}
onKeyDown={(e) => {
@@ -179,7 +181,7 @@ function PrivacyGroup({ c, onChanged }: Pick<DetailProps, "c" | "onChanged">) {
</span>
</div>
</div>
- <div className={FOOT}>Stripped from every record agents read, across all portals.</div>
+ <div className={FOOT}>{t("hubspot.hidden_fields_foot_inner")}</div>
</>
);
}
diff --git a/surfaces/gui/src/components/connectors/SlackDetail.tsx b/surfaces/gui/src/components/connectors/SlackDetail.tsx
index 3c6f2173..f8868e0c 100644
--- a/surfaces/gui/src/components/connectors/SlackDetail.tsx
+++ b/surfaces/gui/src/components/connectors/SlackDetail.tsx
@@ -1,4 +1,5 @@
import { useEffect, useRef, useState } from "react";
+import { useTranslation } from "react-i18next";
import {
addSlackApprovalOwner,
allowUser,
@@ -41,18 +42,19 @@ const LABEL = "text-[13px] text-muted w-24 shrink-0";
/** The relay status line, one honest layer at a time: sign-in → socket → live.
* Dot color + text; never a synthetic "Slack is down" claim. */
-function relayHealth(slack: SlackStatus | null): { dot: string; text: string } {
- if (!slack) return { dot: "bg-ok", text: "Live · managed relay" };
+function relayHealth(slack: SlackStatus | null, t: (k: string) => string): { dot: string; text: string } {
+ if (!slack) return { dot: "bg-ok", text: t("slack.relay_live") };
if (!slack.signed_in)
- return { dot: "bg-warnInk", text: "Sign-in needed — relaying is paused" };
+ return { dot: "bg-warnInk", text: t("slack.relay_signin_needed") };
if (slack.relay.state === "offline")
- return { dot: "bg-faint/60", text: "Offline — can't reach the relay" };
+ return { dot: "bg-faint/60", text: t("slack.relay_offline") };
if (slack.relay.state === "reconnecting")
- return { dot: "bg-warnInk", text: "Reconnecting to the relay…" };
- return { dot: "bg-ok", text: "Live · managed relay" };
+ return { dot: "bg-warnInk", text: t("slack.relay_reconnecting") };
+ return { dot: "bg-ok", text: t("slack.relay_live") };
}
export function SlackDetail({ c, cloud, slack, onChanged }: DetailProps) {
+ const { t } = useTranslation();
const [adding, setAdding] = useState(false);
const [subs, setSubs] = useState<Subscription[]>([]);
const loadSubs = () => getSubscriptions().then(setSubs).catch(() => setSubs([]));
@@ -78,23 +80,23 @@ export function SlackDetail({ c, cloud, slack, onChanged }: DetailProps) {
<>
<span
className={
- "w-2 h-2 rounded-full " + (relay ? relayHealth(slack).dot : "bg-ok")
+ "w-2 h-2 rounded-full " + (relay ? relayHealth(slack, t).dot : "bg-ok")
}
/>
<span data-testid="slack-mode-badge">
{relay
- ? relayHealth(slack).text
- : "Connected · Socket Mode (manual tokens)"}
+ ? relayHealth(slack, t).text
+ : t("slack.connected_socket_mode")}
</span>
</>
) : (
- <span>Not connected</span>
+ <span>{t("connector.not_connected")}</span>
)}
</div>
</div>
{relay || !c.connected ? (
<button className={PILL_ACCENT} data-testid="add-workspace-btn" onClick={() => setAdding(true)}>
- + Add workspace
+ {t("slack.add_workspace")}
</button>
) : null}
</div>
@@ -102,8 +104,8 @@ export function SlackDetail({ c, cloud, slack, onChanged }: DetailProps) {
{!c.connected && (
<div className={GRP}>
<div className={ROW + " text-[13px] text-muted"}>
- One @ocw app, installed per workspace — each keeps its own allow-list.
- {cloud?.signed_in ? "" : " One-click needs cloud sign-in; Manual works without it."}
+ {t("slack.setup_blurb")}
+ {cloud?.signed_in ? "" : " " + t("slack.setup_cloud_note")}
</div>
</div>
)}
@@ -127,7 +129,7 @@ export function SlackDetail({ c, cloud, slack, onChanged }: DetailProps) {
{/* Manual Socket Mode: one workspace, the flat allow-list (unchanged semantics). */}
{c.connected && !relay && (
<div data-testid="slack-manual-card">
- <div className={GRP_H}>{c.account || "workspace"} <span className="font-normal text-faint">· manual tokens</span></div>
+ <div className={GRP_H}>{c.account || t("slack.workspace_default")} <span className="font-normal text-faint">{t("slack.manual_tokens")}</span></div>
<div className={GRP}>
<PeopleRow
allowed={c.allowed_users}
@@ -158,14 +160,14 @@ export function SlackDetail({ c, cloud, slack, onChanged }: DetailProps) {
<ToolsDisclosure c={c} onChanged={onChanged} />
{c.connected && (
- <div className={FOOT + " mt-2"}>Names come from Slack automatically. IDs show on hover.</div>
+ <div className={FOOT + " mt-2"}>{t("slack.names_foot")}</div>
)}
{adding && (
<AddConnectionModal
c={c}
cloud={cloud}
- title="Add a workspace"
+ title={t("slack.add_workspace_title")}
onClose={() => setAdding(false)}
onChanged={changed}
/>
@@ -187,6 +189,7 @@ function WorkspaceGroup({
tokenOk: boolean;
onChanged: () => void;
}) {
+ const { t } = useTranslation();
const [busy, setBusy] = useState(false);
const parked = (c.unauthorized ?? []).filter((m) => m.team_id === w.team_id);
const listening = subs.filter((s) => s.channel.startsWith(`slack:${w.team_id}/`));
@@ -212,7 +215,7 @@ function WorkspaceGroup({
</span>
{!tokenOk && (
<span className={TAG_WARN} data-testid={`token-warn-${w.team_id}`}>
- ⚠ Token revoked — reinstall
+ {t("slack.token_revoked")}
</span>
)}
</div>
@@ -221,7 +224,7 @@ function WorkspaceGroup({
<>
<div className={ROW}>
<span className="min-w-0 flex-1 text-[13px] text-muted flex items-center gap-2 flex-wrap">
- <span>No one allowed yet — mentions of the bot show up here for your OK.</span>
+ <span>{t("slack.empty_parked_note")}</span>
<PersonPicker teamId={w.team_id} allowed={[]} onChanged={onChanged} />
</span>
<DisconnectBtn teamId={w.team_id} busy={busy} onClick={disconnect} />
@@ -271,15 +274,16 @@ function WorkspaceGroup({
}
function DisconnectBtn({ teamId, busy, onClick }: { teamId: string; busy: boolean; onClick: () => void }) {
+ const { t } = useTranslation();
return (
<button
className="text-[13px] text-danger/80 hover:text-danger shrink-0"
data-testid={`disconnect-workspace-${teamId}`}
- title="Stops relaying this workspace to this computer. The app stays installed in Slack."
+ title={t("slack.disconnect_workspace_title")}
onClick={onClick}
disabled={busy}
>
- {busy ? "Disconnecting…" : "Disconnect workspace"}
+ {busy ? t("connector.disconnecting") : t("slack.disconnect_workspace")}
</button>
);
}
@@ -303,16 +307,17 @@ function PeopleRow({
onRemove: (userId: string) => void;
onChanged: () => void;
}) {
+ const { t } = useTranslation();
// The installer's chip reads "you" — their name may still be unresolved (it's
// fetched lazily for outbound attribution), so fall back to a literal "You".
const label = (u: string) =>
- names?.[u] || (u === installerId ? installerName || "You" : u);
+ names?.[u] || (u === installerId ? installerName || t("slack.you") : u);
return (
<div className={ROW}>
- <span className={LABEL}>People</span>
+ <span className={LABEL}>{t("connector.people")}</span>
<span className="min-w-0 flex-1 flex flex-wrap items-center gap-1.5">
{allowed.length === 0 && (
- <span className="text-[12px] text-faint">nobody yet — pick a name, or approve a waiting sender below</span>
+ <span className="text-[12px] text-faint">{t("slack.nobody_yet")}</span>
)}
{allowed.map((u) => (
<span
@@ -325,16 +330,16 @@ function PeopleRow({
{initials(label(u))}
</span>
{label(u)}
- {u === installerId && <span className="text-[11px] text-faint">· you</span>}
+ {u === installerId && <span className="text-[11px] text-faint">{t("slack.you_suffix")}</span>}
{protectedIds?.includes(u) ? (
<span
className="text-[11px] text-faint"
- title="Remove approval-owner access before removing this person."
+ title={t("slack.owner_protected_title")}
>
- · owner
+ {t("slack.owner_suffix")}
</span>
) : (
- <button className={XBTN} title="remove" onClick={() => onRemove(u)}>
+ <button className={XBTN} title={t("common.remove")} onClick={() => onRemove(u)}>
×
</button>
)}
@@ -354,7 +359,7 @@ function PersonPicker({
allowed,
onChanged,
onPick,
- buttonLabel = "+ Add person",
+ buttonLabel,
testId,
}: {
teamId: string | null;
@@ -364,6 +369,7 @@ function PersonPicker({
buttonLabel?: string;
testId?: string;
}) {
+ const { t: tt } = useTranslation();
const [open, setOpen] = useState(false);
const [q, setQ] = useState("");
const [rows, setRows] = useState<SlackMember[]>([]);
@@ -388,12 +394,12 @@ function PersonPicker({
if (r.ok) {
setRows(r.members || []);
setErr(null);
- } else setErr(r.error || "directory unavailable");
+ } else setErr(r.error || tt("slack.directory_unavailable"));
})
- .catch(() => setErr("directory unavailable"));
+ .catch(() => setErr(tt("slack.directory_unavailable")));
}, 200);
return () => clearTimeout(t);
- }, [open, q, teamId]);
+ }, [open, q, teamId, tt]);
useEffect(() => {
if (!open) return;
@@ -424,10 +430,10 @@ function PersonPicker({
ref={btn}
className="inline-flex items-center px-2 py-0.5 rounded-full border border-dashed border-line text-[13px] text-muted hover:text-ink hover:border-faint"
data-testid={testId || `add-person-${teamId || "default"}`}
- title="Pick from the workspace directory"
+ title={tt("slack.pick_from_directory")}
onClick={toggle}
>
- {buttonLabel}
+ {buttonLabel ?? tt("slack.add_person")}
</button>
{open && (
<div
@@ -438,7 +444,7 @@ function PersonPicker({
<input
autoFocus
className="w-full bg-paper border border-line rounded-lg px-2 py-1 text-[13px] outline-none placeholder:text-faint"
- placeholder="Type a name…"
+ placeholder={tt("slack.type_a_name")}
value={q}
onChange={(e) => setQ(e.target.value)}
onKeyDown={(e) => {
@@ -449,7 +455,7 @@ function PersonPicker({
{err ? (
<div className="px-2 py-1.5 text-[12px] text-warnInk">{err}</div>
) : candidates.length === 0 ? (
- <div className="px-2 py-1.5 text-[12px] text-faint">no matches</div>
+ <div className="px-2 py-1.5 text-[12px] text-faint">{tt("slack.no_matches")}</div>
) : (
candidates.map((m) => (
<button
@@ -467,7 +473,7 @@ function PersonPicker({
<span className="text-[12px] text-faint">@{m.handle}</span>
{m.guest && (
<span className="ml-1.5 text-[11px] text-warnInk bg-warnSoft/70 border border-warnInk/15 rounded px-1 py-0.5">
- guest
+ {tt("slack.guest")}
</span>
)}
</button>
@@ -475,7 +481,7 @@ function PersonPicker({
)}
</div>
<div className="px-2 pb-1 text-[11px] text-faint">
- From your workspace directory — stays on this computer.
+ {tt("slack.directory_foot")}
</div>
</div>
)}
@@ -498,13 +504,14 @@ function ApprovalOwnersRow({
editable: boolean;
onChanged: () => void;
}) {
+ const { t } = useTranslation();
const [err, setErr] = useState<string | null>(null);
const label = (u: string) =>
- names?.[u] || (u === installerId ? installerName || "You" : u);
+ names?.[u] || (u === installerId ? installerName || t("slack.you_fallback") : u);
const remove = async (userId: string) => {
const result = await removeSlackApprovalOwner(userId);
if (!result.ok) {
- setErr(result.error || "could not remove approval owner");
+ setErr(result.error || t("slack.remove_owner_failed"));
return;
}
setErr(null);
@@ -512,11 +519,11 @@ function ApprovalOwnersRow({
};
return (
<div className={ROW} data-testid="slack-approval-owners">
- <span className={LABEL}>Approvals</span>
+ <span className={LABEL}>{t("slack.approvals_label")}</span>
<span className="min-w-0 flex-1 flex flex-wrap items-center gap-1.5">
{owners.length === 0 && (
<span className="text-[12px] text-warnInk">
- Choose at least one owner before routing Inbox approvals to Slack.
+ {t("slack.choose_owner_warning")}
</span>
)}
{owners.map((u) => (
@@ -530,9 +537,9 @@ function ApprovalOwnersRow({
{initials(label(u))}
</span>
{label(u)}
- {u === installerId && <span className="text-[11px] text-faint">· installer</span>}
+ {u === installerId && <span className="text-[11px] text-faint">{t("slack.installer_suffix")}</span>}
{editable && (
- <button className={XBTN} title="remove approval owner" onClick={() => remove(u)}>
+ <button className={XBTN} title={t("slack.remove_owner_title")} onClick={() => remove(u)}>
×
</button>
)}
@@ -544,12 +551,12 @@ function ApprovalOwnersRow({
allowed={owners}
onChanged={onChanged}
onPick={(m) => addSlackApprovalOwner(m.id, m.name)}
- buttonLabel="+ Add owner"
+ buttonLabel={t("slack.add_owner")}
testId="add-approval-owner"
/>
)}
{!editable && owners.length > 0 && (
- <span className="text-[12px] text-faint">Set by the workspace installer.</span>
+ <span className="text-[12px] text-faint">{t("slack.owner_set_by_installer")}</span>
)}
{err && <span className="basis-full text-[12px] text-warnInk">{err}</span>}
</span>
@@ -558,35 +565,36 @@ function ApprovalOwnersRow({
}
function WaitingRow({ m, onChanged }: { m: ParkedMessage; onChanged: () => void }) {
+ const { t } = useTranslation();
const act = async (action: "dismiss" | "allow" | "allow_deliver") => {
await resolveUnauthorized("slack", m.id, action);
onChanged();
};
return (
<div className={ROW + " bg-warnSoft/25"} data-testid={`waiting-${m.id}`}>
- <span className={LABEL}>Waiting</span>
+ <span className={LABEL}>{t("connector.waiting")}</span>
<span className="min-w-0 flex-1">
<span className="font-medium text-[13px]">{m.user_name || m.user_id}</span>{" "}
- <span className="text-[13px] text-muted">in {m.chat_name || m.chat_id}</span>
+ <span className="text-[13px] text-muted">{t("connector.in_channel", { name: m.chat_name || m.chat_id })}</span>
<span className="block text-[13px] text-muted truncate">“{m.text}”</span>
</span>
<button
className={PILL_ACCENT + " !py-1"}
data-testid={`parked-allow-deliver-${m.id}`}
- title="Allow the sender and deliver this message now"
+ title={t("slack.allow_deliver_title")}
onClick={() => act("allow_deliver")}
>
- Allow & deliver
+ {t("connector.allow_deliver")}
</button>
<button
className={PILL_LINE + " !py-1"}
data-testid={`parked-allow-${m.id}`}
- title="Allow the sender; this message is discarded"
+ title={t("slack.allow_discard_title")}
onClick={() => act("allow")}
>
- Allow
+ {t("connector.allow")}
</button>
- <button className={XBTN + " px-1"} data-testid={`parked-dismiss-${m.id}`} title="Dismiss" onClick={() => act("dismiss")}>
+ <button className={XBTN + " px-1"} data-testid={`parked-dismiss-${m.id}`} title={t("connector.dismiss")} onClick={() => act("dismiss")}>
×
</button>
</div>
@@ -594,10 +602,11 @@ function WaitingRow({ m, onChanged }: { m: ParkedMessage; onChanged: () => void
}
function ListeningRows({ subs, onChanged }: { subs: Subscription[]; onChanged: () => void }) {
+ const { t } = useTranslation();
if (subs.length === 0) return null;
return (
<div className={ROW} data-testid="listening-slack">
- <span className={LABEL}>Listening</span>
+ <span className={LABEL}>{t("connector.listening")}</span>
<span className="min-w-0 flex-1 space-y-1">
{subs.map((s) => (
<span key={s.session_id + s.channel} className="flex items-center gap-2 text-[13px]">
@@ -610,7 +619,7 @@ function ListeningRows({ subs, onChanged }: { subs: Subscription[]; onChanged: (
</span>
<button
className={XBTN + " ml-auto"}
- title="Unsubscribe this session"
+ title={t("connector.unsubscribe_title")}
onClick={async () => {
await unsubscribeChannel(s.session_id, s.channel);
onChanged();
diff --git a/surfaces/gui/src/components/connectors/SlackHowItWorks.tsx b/surfaces/gui/src/components/connectors/SlackHowItWorks.tsx
index d5d0f278..03abd5aa 100644
--- a/surfaces/gui/src/components/connectors/SlackHowItWorks.tsx
+++ b/surfaces/gui/src/components/connectors/SlackHowItWorks.tsx
@@ -1,6 +1,11 @@
import { useEffect, useRef, useState } from "react";
+import { useTranslation, getI18n } from "react-i18next";
import type { SlackWorkspace } from "../../api";
+// Module-level t for the mock-screenshot copy below — the scene helpers are
+// plain functions, so they can't call the useTranslation hook themselves.
+const tr = (k: string, opts?: Record<string, unknown>) => getI18n().getFixedT(null, "translation")(k, opts);
+
// UX-027: the post-connect "how mentions reach you" card. A tabbed carousel of
// animated split-scenes — Slack on the left (pinned to light-Slack colors, so it
// reads as a screenshot of Slack), OpenWorker on the right (app tokens). Tabs
@@ -12,11 +17,11 @@ import type { SlackWorkspace } from "../../api";
const KEY = "ocw.slack.howitworks.collapsed";
const DUR = 8000; // per-scene loop, ms
-const TABS = ["Mention → session", "Threads stay connected", "Allow teammates"];
+const TABS = ["slack.hiw_tab_mention", "slack.hiw_tab_threads", "slack.hiw_tab_teammates"];
const CAPTIONS = [
- "Mention @OpenWorker in any channel it's invited to — a session opens here, and the answer lands back in Slack as a thread.",
- "Mention it again inside the thread — the conversation continues in the same session, context intact. The thread is the session.",
- "Teammates aren't auto-trusted: their first mention waits for your OK, then they're on the People list.",
+ "slack.hiw_cap_mention",
+ "slack.hiw_cap_threads",
+ "slack.hiw_cap_teammates",
];
function readCollapsed(): boolean {
@@ -24,6 +29,7 @@ function readCollapsed(): boolean {
}
export function SlackHowItWorks({ workspaces }: { workspaces: SlackWorkspace[] }) {
+ const { t } = useTranslation();
const [collapsed, setCollapsed] = useState(readCollapsed);
const [tab, setTab] = useState(0);
const [cycle, setCycle] = useState(0); // bump = remount the scene = restart its animations
@@ -64,7 +70,7 @@ export function SlackHowItWorks({ workspaces }: { workspaces: SlackWorkspace[] }
(mine &&
(mine.installer_name ||
mine.allowed_user_names?.[mine.installer_user_id ?? ""])) ||
- "You";
+ t("slack.hiw_you");
const meFirst = meName.split(/\s+/)[0];
const meInitial = (meName[0] || "Y").toUpperCase();
@@ -74,15 +80,15 @@ export function SlackHowItWorks({ workspaces }: { workspaces: SlackWorkspace[] }
<div className="mb-5" data-testid="slack-howitworks">
<div className="flex items-baseline gap-2.5">
<h3 className="text-[13px] font-semibold tracking-tight">
- Getting started with Slack &amp; OpenWorker
+ {t("slack.hiw_title")}
</h3>
<button
className="ml-auto shrink-0 inline-flex items-center gap-1.5 text-[12px] text-muted hover:text-ink"
data-testid="hiw-collapse"
- title={collapsed ? "Show how mentions work" : "Collapse — reopen anytime"}
+ title={collapsed ? t("slack.hiw_show") : t("slack.hiw_collapse")}
onClick={toggle}
>
- {collapsed ? "How it works" : "Hide"}
+ {collapsed ? t("slack.hiw_how_it_works") : t("slack.hiw_hide")}
<span
className="text-[9px] transition-transform"
style={collapsed ? { transform: "rotate(-90deg)" } : undefined}
@@ -93,24 +99,24 @@ export function SlackHowItWorks({ workspaces }: { workspaces: SlackWorkspace[] }
</div>
<div className="text-[12px] text-muted mt-0.5">
<span className="text-ok font-bold">✓ </span>
- {ws?.account || "Workspace"} connected
+ {(ws?.account || t("slack.hiw_workspace")) + " " + t("slack.hiw_connected")}
{mine
- ? " — you're on the People list, so your mentions get through."
- : " — here's how mentions reach you."}
+ ? " " + t("slack.hiw_on_people_list")
+ : " " + t("slack.hiw_how_mentions")}
</div>
{!collapsed && (
<div className="mt-3">
<div className="flex gap-1 border-b border-line mb-3">
- {TABS.map((t, i) => (
+ {TABS.map((tb, i) => (
<button
- key={t}
+ key={tb}
className={"hiw-tab" + (i === tab ? " on" : "")}
data-testid={`hiw-tab-${i}`}
style={{ "--hiw-dur": `${DUR}ms` } as React.CSSProperties}
onClick={() => jump(i)}
>
- {t}
+ {t(tb)}
<span className="hiw-prog"><i /></span>
</button>
))}
@@ -122,7 +128,7 @@ export function SlackHowItWorks({ workspaces }: { workspaces: SlackWorkspace[] }
{tab === 2 && <SceneTeammates />}
</div>
<div className="mt-2.5 text-[12px] text-muted" data-testid="hiw-caption">
- {CAPTIONS[tab]}
+ {t(CAPTIONS[tab])}
</div>
</div>
)}
@@ -173,15 +179,15 @@ function SlackRail({ active }: { active: string }) {
return (
<div className="hiw-slrail">
<div className="hiw-ws">{WS_NAME} ▾</div>
- <div className="hiw-slnav"><ThreadsIcon /> Threads</div>
- <div className="hiw-slnav"><SendIcon /> Drafts &amp; sent</div>
- <div className="hiw-sect">Channels</div>
+ <div className="hiw-slnav"><ThreadsIcon /> {tr("slack.hiw_threads")}</div>
+ <div className="hiw-slnav"><SendIcon /> {tr("slack.hiw_drafts")}</div>
+ <div className="hiw-sect">{tr("slack.hiw_channels")}</div>
<div className={"hiw-ch" + (active === "general" ? " on" : "")}># general</div>
<div className={"hiw-ch" + (active === "launch-room" ? " on" : "")}># launch-room</div>
- <div className="hiw-sect">Direct messages</div>
+ <div className="hiw-sect">{tr("slack.hiw_direct_messages")}</div>
<div className="hiw-slnav"><span className="hiw-pres" />Priya N</div>
<div className="hiw-slnav"><span className="hiw-pres" />Emma W</div>
- <div className="hiw-sect">Agents &amp; apps</div>
+ <div className="hiw-sect">{tr("slack.hiw_agents_apps")}</div>
<div className="hiw-slnav"><span className="hiw-appav">OW</span>OpenWorker</div>
</div>
);
@@ -192,7 +198,7 @@ function SlackWin({ children }: { children: React.ReactNode }) {
<div className="hiw-win hiw-sl">
<div className="hiw-sltop">
<span className="hiw-dots"><i /><i /><i /></span>
- <span className="hiw-slsearch">⌕ Describe what you are looking for</span>
+ <span className="hiw-slsearch">⌕ {tr("slack.hiw_search_desc")}</span>
</div>
<div className="hiw-slbody">{children}</div>
</div>
@@ -237,10 +243,10 @@ function OwRail({ hot, hotSub, glow }: { hot?: string; hotSub?: string; glow?: b
return (
<div className="hiw-owrail">
<div className="hiw-brand">OpenWorker</div>
- <div className="hiw-newbtn">+ New session</div>
- <div className="hiw-ownav">⌕ Search</div>
- <div className="hiw-ownav">◷ Automations</div>
- <div className="hiw-sect">RECENT</div>
+ <div className="hiw-newbtn">+ {tr("slack.hiw_new_session")}</div>
+ <div className="hiw-ownav">⌕ {tr("slack.hiw_search")}</div>
+ <div className="hiw-ownav">◷ {tr("slack.hiw_automations")}</div>
+ <div className="hiw-sect">{tr("slack.hiw_recent")}</div>
{hot && (
<div
className={"hiw-sess hot" + (glow ? " hiw-glow hiw-k" : " hiw-stay")}
@@ -250,7 +256,7 @@ function OwRail({ hot, hotSub, glow }: { hot?: string; hotSub?: string; glow?: b
{hotSub}
</div>
)}
- <div className="hiw-sess"><b>Jira vs Linear</b>Coworker</div>
+ <div className="hiw-sess"><b>{tr("slack.hiw_jira_linear")}</b>{tr("slack.hiw_coworker")}</div>
</div>
);
}
@@ -283,58 +289,58 @@ function SceneMention({ meFirst, meInitial }: { meFirst: string; meInitial: stri
return (
<>
<span className="hiw-spark" style={d("1.9s")} />
- <Sticky d="3.1s" pos={{ left: "51%", top: "8%" }}>a @mention starts a NEW session →</Sticky>
- <Sticky d="5.8s" r pos={{ left: "27%", bottom: "5%" }}>the answer comes back as a thread ↑</Sticky>
+ <Sticky d="3.1s" pos={{ left: "51%", top: "8%" }}>{tr("slack.hiw_mention_new")} →</Sticky>
+ <Sticky d="5.8s" r pos={{ left: "27%", bottom: "5%" }}>{tr("slack.hiw_answer_thread")} ↑</Sticky>
<SlackWin>
<SlackRail active="launch-room" />
<div className="hiw-slmain">
- <div className="hiw-slhead"># launch-room <span className="hiw-sub">· 24 members</span></div>
+ <div className="hiw-slhead"># launch-room <span className="hiw-sub">· 24 {tr("slack.hiw_members")}</span></div>
<div className="hiw-slmsgs">
- <SlackDate label="Today" />
+ <SlackDate label={tr("slack.hiw_today")} />
<Msg av="P" avBg="#7c6cd0" name="Priya N" ts="6:31 PM">
- signups are spiking since the post 📈
+ {tr("slack.hiw_msg_signups")}
</Msg>
<Msg
av={meInitial} avBg="#3b82c4" name={meFirst} ts="6:33 PM" delay=".8s"
extra={
<span className="hiw-replybar hiw-k" style={d("4.6s")}>
- <span className="hiw-sav2">OW</span> 1 reply
- <span className="hiw-later">Today at 6:34 PM</span>
+ <span className="hiw-sav2">OW</span> {tr("slack.hiw_1reply")}
+ <span className="hiw-later">{tr("slack.hiw_today_at")} 6:34 PM</span>
</span>
}
>
- <span className="hiw-men">@OpenWorker</span> summarize this thread
+ <span className="hiw-men">@OpenWorker</span> {tr("slack.hiw_summarize")}
</Msg>
</div>
- <SlackComposer placeholder="Message #launch-room" />
+ <SlackComposer placeholder={tr("slack.hiw_msg_launch")} />
<div className="hiw-slthread hiw-k" style={d("5.1s")}>
- <div className="hiw-th">Thread <span className="hiw-sub"># launch-room</span><span className="hiw-x">✕</span></div>
+ <div className="hiw-th">{tr("slack.hiw_thread")} <span className="hiw-sub"># launch-room</span><span className="hiw-x">✕</span></div>
<div className="hiw-tmsgs">
<Msg av={meInitial} avBg="#3b82c4" name={meFirst} ts="6:33 PM">
- <span className="hiw-men">@OpenWorker</span> summarize this thread
+ <span className="hiw-men">@OpenWorker</span> {tr("slack.hiw_summarize")}
</Msg>
- <div className="hiw-cnt">1 reply</div>
+ <div className="hiw-cnt">{tr("slack.hiw_1reply")}</div>
<Msg av="OW" avBg="#4a154b" name="OpenWorker" app ts="6:34 PM">
- Launch traction: signups up 3.4× since the post…
+ {tr("slack.hiw_msg_traction")}
</Msg>
</div>
- <div className="hiw-treply">Reply…</div>
+ <div className="hiw-treply">{tr("slack.hiw_reply")}</div>
</div>
</div>
</SlackWin>
<OwWin>
- <OwRail hot="Summarize #launch-room" hotSub="via Slack · now" glow />
+ <OwRail hot={tr("slack.hiw_summarize_room")} hotSub={tr("slack.hiw_via_slack_now")} glow />
<div className="hiw-owmain">
<div className="hiw-owtitle hiw-k" style={d("2.6s")}>
Summarize #launch-room <span className="hiw-via">via Slack</span>
</div>
<div className="hiw-owchat">
- <div className="hiw-bub user hiw-k" style={d("2.8s")}>@OpenWorker summarize this thread</div>
+ <div className="hiw-bub user hiw-k" style={d("2.8s")}>@OpenWorker {tr("slack.hiw_summarize")}</div>
<div className="hiw-bub agent hiw-k" style={d("3.6s")}>
- Reading the thread… signups up 3.4×, top referrer is the press page. <i>(replying in the Slack thread)</i>
+ {tr("slack.hiw_reading_thread")} <i>({tr("slack.hiw_replying_slack")})</i>
</div>
</div>
- <div className="hiw-owcomposer">Message OpenWorker…</div>
+ <div className="hiw-owcomposer">{tr("slack.hiw_msg_kp")}</div>
</div>
</OwWin>
</>
@@ -346,75 +352,75 @@ function SceneThread({ meFirst, meInitial }: { meFirst: string; meInitial: strin
return (
<>
<span className="hiw-spark" style={d("1.9s")} />
- <Sticky d="3.2s" r pos={{ left: "52%", top: "10%" }}>chatting in the thread continues the SAME conversation →</Sticky>
+ <Sticky d="3.2s" r pos={{ left: "52%", top: "10%" }}>{tr("slack.hiw_thread_same")} →</Sticky>
<SlackWin>
<SlackRail active="launch-room" />
<div className="hiw-slmain">
- <div className="hiw-slhead"># launch-room <span className="hiw-sub">· 24 members</span></div>
+ <div className="hiw-slhead"># launch-room <span className="hiw-sub">· 24 {tr("slack.hiw_members")}</span></div>
<div className="hiw-slmsgs">
- <SlackDate label="Today" />
+ <SlackDate label={tr("slack.hiw_today")} />
<Msg av="P" avBg="#7c6cd0" name="Priya N" ts="6:31 PM">
- signups are spiking since the post 📈
+ {tr("slack.hiw_msg_signups")}
</Msg>
<Msg
av={meInitial} avBg="#3b82c4" name={meFirst} ts="6:33 PM"
extra={
<span className="hiw-replybar">
- <span className="hiw-sav2">OW</span> 2 replies
- <span className="hiw-later">Today at 6:36 PM</span>
+ <span className="hiw-sav2">OW</span> {tr("slack.hiw_2replies")}
+ <span className="hiw-later">{tr("slack.hiw_today_at")} 6:36 PM</span>
</span>
}
>
- <span className="hiw-men">@OpenWorker</span> summarize this thread
+ <span className="hiw-men">@OpenWorker</span> {tr("slack.hiw_summarize")}
</Msg>
</div>
- <SlackComposer placeholder="Message #launch-room" />
+ <SlackComposer placeholder={tr("slack.hiw_msg_launch")} />
{/* thread panel open from the start — the new mentions play INSIDE it */}
<div className="hiw-slthread">
- <div className="hiw-th">Thread <span className="hiw-sub"># launch-room</span><span className="hiw-x">✕</span></div>
+ <div className="hiw-th">{tr("slack.hiw_thread")} <span className="hiw-sub"># launch-room</span><span className="hiw-x">✕</span></div>
<div className="hiw-tmsgs">
<Msg av={meInitial} avBg="#3b82c4" name={meFirst} ts="6:33 PM">
- <span className="hiw-men">@OpenWorker</span> summarize this thread
+ <span className="hiw-men">@OpenWorker</span> {tr("slack.hiw_summarize")}
</Msg>
- <div className="hiw-cnt">2 replies</div>
+ <div className="hiw-cnt">{tr("slack.hiw_2replies")}</div>
<Msg av="OW" avBg="#4a154b" name="OpenWorker" app ts="6:34 PM">
- Launch traction: signups up 3.4×…
+ {tr("slack.hiw_msg_traction")}
</Msg>
<Msg av="P" avBg="#7c6cd0" name="Priya N" ts="6:36 PM" delay=".8s">
- <span className="hiw-men">@OpenWorker</span> break it down by country?
+ <span className="hiw-men">@OpenWorker</span> {tr("slack.hiw_break_country")}
</Msg>
<Msg av="OW" avBg="#4a154b" name="OpenWorker" app ts="6:36 PM" delay="4.8s">
- Top: US 41% · India 22% · Germany 9%…
+ {tr("slack.hiw_top_countries")}
</Msg>
</div>
- <div className="hiw-treply">Reply…</div>
+ <div className="hiw-treply">{tr("slack.hiw_reply")}</div>
</div>
</div>
</SlackWin>
<OwWin>
<div className="hiw-owrail">
<div className="hiw-brand">OpenWorker</div>
- <div className="hiw-newbtn">+ New session</div>
- <div className="hiw-ownav">⌕ Search</div>
- <div className="hiw-ownav">◷ Automations</div>
- <div className="hiw-sect">RECENT</div>
+ <div className="hiw-newbtn">+ {tr("slack.hiw_new_session")}</div>
+ <div className="hiw-ownav">⌕ {tr("slack.hiw_search")}</div>
+ <div className="hiw-ownav">◷ {tr("slack.hiw_automations")}</div>
+ <div className="hiw-sect">{tr("slack.hiw_recent")}</div>
<div className="hiw-sess hot hiw-stay hiw-glow" style={{ "--g": "2.4s" } as React.CSSProperties}>
- <b>Summarize #launch-room</b>via Slack
+ <b>{tr("slack.hiw_summarize_room")}</b>{tr("slack.hiw_via_slack")}
</div>
- <div className="hiw-sess"><b>Jira vs Linear</b>Coworker</div>
+ <div className="hiw-sess"><b>{tr("slack.hiw_jira_linear")}</b>{tr("slack.hiw_coworker")}</div>
</div>
<div className="hiw-owmain">
<div className="hiw-owtitle">
- Summarize #launch-room <span className="hiw-via">via Slack — same session</span>
+ {tr("slack.hiw_summarize_room")} <span className="hiw-via">{tr("slack.hiw_via_slack_same")}</span>
</div>
<div className="hiw-owchat">
- <div className="hiw-bub agent hiw-stay">…signups up 3.4×, top referrer is the press page.</div>
- <div className="hiw-bub user hiw-k" style={d("2.6s")}>break it down by country?</div>
+ <div className="hiw-bub agent hiw-stay">{tr("slack.hiw_signups_referrer")}</div>
+ <div className="hiw-bub user hiw-k" style={d("2.6s")}>{tr("slack.hiw_break_country")}</div>
<div className="hiw-bub agent hiw-k" style={d("3.8s")}>
- Top countries: US 41%, India 22%, Germany 9% — context kept from the whole thread.
+ {tr("slack.hiw_top_countries_full")}
</div>
</div>
- <div className="hiw-owcomposer">Message OpenWorker…</div>
+ <div className="hiw-owcomposer">{tr("slack.hiw_msg_kp")}</div>
</div>
</OwWin>
</>
@@ -426,38 +432,38 @@ function SceneTeammates() {
return (
<>
<span className="hiw-spark" style={d("1.9s")} />
- <Sticky d="3.4s" pos={{ left: "53%", bottom: "10%" }}>first-time senders wait for your OK</Sticky>
+ <Sticky d="3.4s" pos={{ left: "53%", bottom: "10%" }}>{tr("slack.hiw_first_senders")}</Sticky>
<SlackWin>
<SlackRail active="launch-room" />
<div className="hiw-slmain">
- <div className="hiw-slhead"># launch-room <span className="hiw-sub">· 24 members</span></div>
+ <div className="hiw-slhead"># launch-room <span className="hiw-sub">· 24 {tr("slack.hiw_members")}</span></div>
<div className="hiw-slmsgs">
- <SlackDate label="Today" />
+ <SlackDate label={tr("slack.hiw_today")} />
<Msg
av="P" avBg="#7c6cd0" name="Priya N" ts="6:41 PM" delay=".7s"
extra={
<span className="hiw-replybar hiw-k" style={d("5.6s")}>
- <span className="hiw-sav2">OW</span> 1 reply
- <span className="hiw-later">after you allow</span>
+ <span className="hiw-sav2">OW</span> {tr("slack.hiw_1reply")}
+ <span className="hiw-later">{tr("slack.hiw_after_allow")}</span>
</span>
}
>
- <span className="hiw-men">@OpenWorker</span> pull the signup numbers?
+ <span className="hiw-men">@OpenWorker</span> {tr("slack.hiw_pull_numbers")}
</Msg>
</div>
- <SlackComposer placeholder="Message #launch-room" />
+ <SlackComposer placeholder={tr("slack.hiw_msg_launch")} />
</div>
</SlackWin>
<OwWin>
- <OwRail hot="Summarize #launch-room" hotSub="via Slack" />
+ <OwRail hot={tr("slack.hiw_summarize_room")} hotSub={tr("slack.hiw_via_slack")} />
<div className="hiw-owmain">
<div className="hiw-owtitle">Slack — {WS_NAME}</div>
<div className="hiw-waitrow hiw-k hiw-glow" style={d("2s", { "--g": "2.5s" })}>
- <span className="min-w-0"><b>Priya N</b> is waiting</span>
- <span className="hiw-allowbtn ml-auto">Allow &amp; deliver</span>
+ <span className="min-w-0"><b>Priya N</b> {tr("slack.hiw_is_waiting")}</span>
+ <span className="hiw-allowbtn ml-auto">{tr("slack.hiw_allow_deliver")}</span>
</div>
<div className="hiw-waitcap hiw-k" style={d("3.4s")}>
- Each teammate&apos;s <b>first</b> mention waits for your OK — then they&apos;re on the People list and it flows.
+ {tr("slack.hiw_each_teammate_prefix")} <b>{tr("slack.hiw_first")}</b> {tr("slack.hiw_each_teammate_suffix")}
</div>
</div>
</OwWin>
diff --git a/surfaces/gui/src/components/connectors/ToolsDisclosure.tsx b/surfaces/gui/src/components/connectors/ToolsDisclosure.tsx
index 79a527a4..e37ebb87 100644
--- a/surfaces/gui/src/components/connectors/ToolsDisclosure.tsx
+++ b/surfaces/gui/src/components/connectors/ToolsDisclosure.tsx
@@ -1,3 +1,4 @@
+import { useTranslation } from "react-i18next";
import { updateConnectorTools, type Connector } from "../../api";
import { GRP, ROW, TAG_QUIET, TAG_WARN } from "./ui";
@@ -5,15 +6,16 @@ import { GRP, ROW, TAG_QUIET, TAG_WARN } from "./ui";
// (UX-DECISIONS §21): the lever exists everywhere but stays quiet — expanding
// shows one row per tool with its read/write tag; writes always ask first.
export function ToolsDisclosure({ c, onChanged }: { c: Connector; onChanged: () => void }) {
+ const { t } = useTranslation();
if (!c.tools?.length) return null;
- const enabled = c.tools.filter((t) => t.enabled).length;
+ const enabled = c.tools.filter((tool) => tool.enabled).length;
return (
<div className={GRP + " mt-6"}>
<details>
<summary className={ROW + " cursor-pointer hover:bg-paper/60 list-none [&::-webkit-details-marker]:hidden"}>
- <span className="text-[13px] text-muted w-24 shrink-0">› Tools</span>
+ <span className="text-[13px] text-muted w-24 shrink-0">{t("connector.tools_label")}</span>
<span className="min-w-0 flex-1 text-[13px] text-muted">
- {enabled} of {c.tools.length} enabled
+ {t("connector.tools_enabled", { enabled, total: c.tools.length })}
</span>
</summary>
{c.tools.map((tool) => (
@@ -28,7 +30,7 @@ export function ToolsDisclosure({ c, onChanged }: { c: Connector; onChanged: ()
/>
<span className="min-w-0 flex-1 text-[13px] font-medium">{tool.label}</span>
<span className={tool.kind === "write" ? TAG_WARN : TAG_QUIET}>
- {tool.kind === "write" ? "asks first" : "read"}
+ {tool.kind === "write" ? t("connector.asks_first") : t("connector.read")}
</span>
</label>
))}
diff --git a/surfaces/gui/src/i18n.test.ts b/surfaces/gui/src/i18n.test.ts
index ea375661..fb86e911 100644
--- a/surfaces/gui/src/i18n.test.ts
+++ b/surfaces/gui/src/i18n.test.ts
@@ -11,8 +11,8 @@ const IMPORTANT_KEYS = [
"settings.voice_dl_progress",
"settings.voice_installed",
"settings.voice_not_installed",
- "personas.installed",
- "personas.disable_warning",
+ "personas.installed_other",
+ "personas.disable_warning_other",
"personas.tools_label",
"personas.risk_label",
"transcript.step.auto_allowed_tip",
@@ -29,8 +29,8 @@ const values: Record<string, Record<string, string | number>> = {
"settings.voice_dl_progress": { done: "1 MiB", total: "2 MiB" },
"settings.voice_installed": { size: "141 MiB" },
"settings.voice_not_installed": { size: "141 MiB" },
- "personas.installed": { count: 2 },
- "personas.disable_warning": { count: 2 },
+ "personas.installed_other": { count: 2 },
+ "personas.disable_warning_other": { count: 2 },
"personas.tools_label": { tools: "read_file" },
"personas.risk_label": { risk: "read" },
"transcript.step.auto_allowed_tip": { name: "read_file" },
@@ -61,6 +61,14 @@ const flatEn = flatten(en);
const flatZh = flatten(zh);
describe("locale contracts", () => {
+ it("keeps English and Chinese key sets in parity", () => {
+ // Chinese has a single plural category, so `*_one` variants exist only in English.
+ const missingInZh = Object.keys(flatEn).filter((key) => !key.endsWith("_one") && !(key in flatZh));
+ const missingInEn = Object.keys(flatZh).filter((key) => !(key in flatEn));
+ expect(missingInZh, "keys missing from zh.json").toEqual([]);
+ expect(missingInEn, "keys missing from en.json").toEqual([]);
+ });
+
it("keeps interpolation placeholders aligned between English and Chinese", () => {
for (const key of Object.keys(flatEn)) {
if (!(key in flatZh)) continue;
diff --git a/surfaces/gui/src/locales/en.json b/surfaces/gui/src/locales/en.json
index 79c2ebf5..5075ed0c 100644
--- a/surfaces/gui/src/locales/en.json
+++ b/surfaces/gui/src/locales/en.json
@@ -33,8 +33,6 @@
"no_conversations": "No conversations yet.",
"no_matching": "No matching conversations.",
"awaiting_attention": "{{n}} awaiting your attention",
- "unseen_new": "{{n}} new run(s)",
- "unseen_failed": "{{n}} new run(s) — the latest failed",
"from_slack": "From Slack",
"age_now": "now",
"age_m": "{{n}}m",
@@ -52,7 +50,7 @@
"delete_confirm": "Delete?",
"pinned": "Pinned",
"scheduled": "Scheduled",
- "group_persona": "Persona",
+ "group_persona": "Coworker",
"group_chrono": "Chronological",
"clear": "Clear",
"filter_all_hint": "None checked shows all.",
@@ -69,7 +67,12 @@
"not_signed_in_row": "Not signed in",
"inbox_chip_pending": "Inbox — {{n}} items need you",
"start_session_as": "Start a session as",
- "manage_personas": "Manage personas…"
+ "manage_personas": "Manage personas…",
+ "group_and_filter_short": "Group & filter conversations",
+ "unseen_new_one": "{{count}} new run",
+ "unseen_new_other": "{{count}} new runs",
+ "unseen_failed_one": "{{count}} new run — the latest failed",
+ "unseen_failed_other": "{{count}} new runs — the latest failed"
},
"topbar": {
"show_sidebar": "Show sidebar (⌘B)",
@@ -112,8 +115,10 @@
"discuss_desc": "Chat and explore — no edits or commands",
"interactive": "Ask for approval",
"interactive_desc": "Ask before edits and commands",
- "auto": "Full access",
- "auto_desc": "Run everything without asking"
+ "auto": "Bypass approvals",
+ "auto_desc": "Run everything without asking — approvals off",
+ "auto_approve": "Auto-approve",
+ "auto_approve_desc": "Let your session model classify actions and handle approvals, prompting you for anything it's unsure about"
},
"voice": {
"stop_transcribe": "Stop recording and transcribe",
@@ -140,7 +145,14 @@
"none_aria": "No model connected — connect a model",
"loading": "Loading models…",
"loading_title": "Fetching the model list from the server"
- }
+ },
+ "placeholder_gate": "Reply to adjust the proposal — or use the buttons above",
+ "attach_this_message": "This message",
+ "attach_this_session": "This session",
+ "bind_memory": "Project memory",
+ "bind_board": "Board",
+ "reviewer_paused_tip": "paused for this turn — the reviewer blocked several actions in a row, approvals come to you",
+ "paused": "paused"
},
"transcript": {
"copy_message": "Copy message",
@@ -150,16 +162,24 @@
"who_assistant": "assistant",
"retry": "Retry",
"approval": {
- "approved": "✓ approved",
+ "approved": "✓ user-approved",
"declined": "✕ declined",
- "approved_scope": "approved · {{scope}}"
+ "approved_scope": "approved by you · {{scope}}",
+ "approved_title": "approved by you",
+ "reviewer_unsure": " — reviewer wasn't sure: {{note}}",
+ "reviewer_allowed_title": "allowed by the auto-approve reviewer",
+ "bypass_title": "ran without approval — bypass-approvals mode",
+ "auto_approved": "auto-approved",
+ "bypassed": "approval bypassed"
},
"step": {
"raw": "raw",
"auto_allowed": "auto-allowed",
- "auto_allowed_tip": "Auto-allowed by this automation's standing approvals: {{name}}",
+ "auto_allowed_tip": "Auto-allowed by this automation's standing approval: {{name}}. Revoke on its Automations page.",
"hidden_count_label": "{{n}} hidden",
- "hidden_tip": "Removed by your privacy filters before the agent saw the results — agents get no trace of these."
+ "hidden_tip": "Removed by your privacy filters before the agent saw the results — agents get no trace of these.",
+ "tried_skill_pre": "Tried skill: ",
+ "tried_skill_post": " — not available"
},
"turn": {
"running": "Running {{label}}…",
@@ -172,7 +192,24 @@
"dir_granted": "Granted folder access",
"plan_approved": "Plan approved",
"plan_proposed": "proposed plan",
- "plan_rejected": "Sent back with feedback"
+ "plan_rejected": "Sent back with feedback",
+ "mcp_details": "Details",
+ "mcp_open_connectors": "Open Connectors",
+ "user_more": "more…",
+ "user_less": "less…",
+ "reviewer": {
+ "blocked": "Blocked by the reviewer",
+ "explain": "The agent was told only that it was blocked — not why — so it can’t argue its way past this. If the action is actually fine, you can run it as proposed:",
+ "allow_anyway": "Allow anyway",
+ "override_sent": "Approved — the agent will retry this exact action."
+ },
+ "memory": {
+ "saved": "I'll remember that",
+ "updated": "I've updated what I remember",
+ "undone_forgotten": "Okay — forgotten.",
+ "undone_restored": "Okay — put back the way it was.",
+ "undo": "Undo"
+ }
},
"rail": {
"progress_title": "Progress",
@@ -201,14 +238,48 @@
"sheet_empty": "Empty sheet.",
"open_in_default": "Open in default app",
"show_in_folder": "Show in folder",
- "show_folder": "Show the folder where these files are saved"
+ "show_folder": "Show the folder where these files are saved",
+ "board_title": "Board",
+ "board_expand": "Expand the board",
+ "team_title": "Team",
+ "team_open_session": "Open {{name}}'s session",
+ "team_worker": "worker",
+ "team_sleeping": "sleeping",
+ "team_open": "open ↗",
+ "team_chat": "team chat",
+ "back_to": "Back to {{name}}",
+ "crumb_files": "Files",
+ "more_actions": "More actions",
+ "more": "More",
+ "close_viewer": "Close the viewer",
+ "close": "Close",
+ "journal_title": "Journal",
+ "journal_entries_one": "{{count}} entry",
+ "journal_entries_other": "{{count}} entries",
+ "browse": "Browse",
+ "root_read_write": "read-write",
+ "root_read_only": "read-only",
+ "copy_contents": "Copy contents",
+ "open_in_browser": "Open in browser",
+ "reveal_in_finder": "Reveal in Finder",
+ "folder_empty": "This folder is empty.",
+ "table_truncated": "Showing first {{max}} of {{total}} rows.",
+ "board_chip_blocked_one": "{{count}} blocked",
+ "board_chip_blocked_other": "{{count}} blocked",
+ "board_chip_review_one": "{{count}} review",
+ "board_chip_review_other": "{{count}} review",
+ "board_chip_active_one": "{{count}} active",
+ "board_chip_active_other": "{{count}} active"
},
"settings": {
"tab": {
"general": "General",
"models": "Models",
"voice": "Voice input",
- "personas": "Personas"
+ "personas": "Coworkers",
+ "context": "Context optimization",
+ "skills": "Skills",
+ "memory": "Memory"
},
"general_title": "General",
"general_sub": "How OpenWorker looks and behaves on this machine.",
@@ -239,7 +310,7 @@
"update_error": "Couldn't check right now.",
"update_downloading": "Downloading — OpenWorker restarts by itself when it's ready.",
"voice_desktop_only": "Voice Input setup is available in the OpenWorker desktop app.",
- "personas_intro": "Curated coworkers from the OpenWorker team — see what each can do…",
+ "personas_intro": "Manage your coworkers and add new ones.",
"scratch_placeholder": "~/OpenWorker",
"files_browse": "Browse…",
"files_help": "The scratch space where coworkers save produced files. Override per session.",
@@ -254,11 +325,11 @@
"sidebar_card_help": "How many sessions the sidebar peeks before showing.",
"sidebar_card_title": "Sidebar density",
"sidebar_per_coworker": "Sessions per coworker",
- "voice_checking": "Checking…",
+ "voice_checking": "Checking compatibility…",
"voice_compatible": "Compatible",
"voice_delete": "Delete",
"voice_delete_confirm": "Delete this model?",
- "voice_device_title": "Device",
+ "voice_device_title": "This device",
"voice_dl_progress": "{{done}} of {{total}}",
"voice_download": "Download",
"voice_installed": "Installed and verified · {{size}}",
@@ -273,8 +344,8 @@
"voice_mic_test_title": "Microphone test",
"voice_no_speech": "No speech detected — try again.",
"voice_not_installed": "Local voice model · {{size}}",
- "voice_private_body": "The voice model runs entirely on this machine — recordings never leave this device.",
- "voice_private_title": "Fully private",
+ "voice_private_body": "Audio is held in memory only while you record and is transcribed locally.",
+ "voice_private_title": "Private by design.",
"voice_processor": "Processor",
"voice_processor_detail": "Requires Apple Silicon (M1 or later).",
"voice_ready_badge": "Ready",
@@ -283,10 +354,10 @@
"voice_test_again": "Test again",
"voice_test_mic": "Test the microphone",
"voice_transcribing": "Transcribing…",
- "voice_unsupported": "Voice Input isn't supported on this device.",
- "voice_verified": "✓ Verified",
+ "voice_unsupported": "Unsupported",
+ "voice_verified": "Verified",
"voice_verifying": "Verifying…",
- "voice_whisper_title": "Whisper model",
+ "voice_whisper_title": "Whisper Base · English",
"voice_windows": "Windows",
"voice_windows_detail": "Download a whisper.cpp model to enable Voice Input.",
"trusted_workspaces": "Trusted workspaces",
@@ -310,7 +381,11 @@
"pdf_max_pages": "Max pages",
"pdf_max_size": "Max size",
"pdf_limits_help": "PDFs over these limits are not attached — you’ll see a notice in the composer instead.",
- "voice_action_failed": "Voice Input could not complete that action."
+ "voice_action_failed": "Voice Input could not complete that action.",
+ "personas_desc": "Coworkers are agents specialized for a particular role or task. They come equipped with the tools and skills to be successful in that role. Enabling a coworker lets you pick it when starting a conversation.",
+ "composer_section": "Composer",
+ "context_bar_title": "Show the context window bar",
+ "context_bar_desc": "A small meter showing how full the model’s context window is. Turn it off to show the same thing as a number instead."
},
"cloud": {
"check_browser": "Check your browser…",
@@ -323,24 +398,47 @@
"ready": "OpenWorker v{{version}} is ready to install.",
"banner_title": "Update available",
"downloading": "Downloading…",
- "install_failed": "Couldn't install the update.",
+ "install_failed": "The update couldn't be installed — it will be offered again next launch.",
"later": "Later",
"restart_to_update": "Restart to update"
},
"toast": {
"automation_started": "Automation started",
"run_count": "run",
- "view_run": "View run"
+ "view_run": "View run",
+ "automation_fallback": "Automation"
},
"app": {
"notice": {
"max_iterations": "Stopped: max iterations reached.",
"model_switched": "Model switched",
"interrupted": "Interrupted.",
- "error": "Error: "
+ "error": "Error: ",
+ "context_compacted": "Context compacted",
+ "input_rejected": "That message was rejected.",
+ "unknown": "unknown"
},
"jump_to_latest": "Jump to latest",
- "waiting_for_agent": "Waiting for agent..."
+ "waiting_for_agent": "Waiting for agent...",
+ "compacting_context": "Compacting context…",
+ "allow_anyway_message": "I reviewed the blocked {{name}} action — go ahead with it exactly as proposed.",
+ "temp_folder_failed": "Could not create a temporary folder.",
+ "temp_folder_created": "Temporary folder created",
+ "temp_folder_created_git": "Temporary folder created · git initialized",
+ "save_project_failed": "Could not save as a project.",
+ "saved_as_project": "Saved as a project — now working in {{name}}.",
+ "save_as_project": "Save as project…",
+ "build_skill_prefill": "Build a new skill for me: {{description}}",
+ "build_skill_prefill_empty": "Build a new skill for me: (describe what the skill should do)",
+ "sleep": {
+ "label": "Sleeping",
+ "until": " until {{time}}",
+ "team_clause": " while the team works — it also wakes on board activity.",
+ "trigger_clause": " — it wakes on its trigger.",
+ "talk_anytime": "Talk to it anytime.",
+ "ask_status": "Ask for a status",
+ "status_prompt": "Quick status check, please — what's moving, what's blocked, and does anything need me?"
+ }
},
"run_banner": {
"scheduled_run": "Scheduled run",
@@ -357,7 +455,7 @@
"back_to_automations": "← Automations",
"bot_member_hint": "The bot must be a member of the channel — invite @OpenWorker in Slack if it isn't.",
"cancel": "cancel",
- "cloud_brokered": "Connections are brokered by OpenWorker Cloud — your tokens stay on this Mac.",
+ "cloud_brokered": "Connections are brokered by OpenWorker Cloud — your tokens stay on this computer.",
"conn_connected": "connected",
"conn_not_connected": "not connected yet",
"connect": "Connect",
@@ -377,7 +475,6 @@
"delivery_sched": "Delivery & schedule",
"edit": "Edit",
"empty_state": "No scheduled tasks yet — use a template above, click <strong>+ New automation</strong>, or just ask OpenWorker in a session.",
- "file_count": "{{count}} file(s)",
"finish_connecting": "Finish connecting {{name}} in your browser.",
"finish_connecting_desc": "Approve it there, then come back — this page updates by itself.",
"finish_signin_desc": "Finish signing in in your browser — this page updates by itself.",
@@ -411,7 +508,6 @@
"repository": "Repository",
"revoke": "Revoke",
"revoke_title": "This automation will ask for approval again",
- "run_count": "{{count}} run(s)",
"run_now": "▶ Run now",
"runs_desc": "Each run is a live conversation — open one to see what the agent did and ask a follow-up.",
"runs_label": "Runs",
@@ -464,7 +560,11 @@
"tmpl_inbox_blurb": "One short digest of your unread email.",
"why_unread_email": "Your unread email",
"tmpl_cleanup_title": "Folder cleanup",
- "tmpl_cleanup_blurb": "Sort recent Downloads into tidy folders by type."
+ "tmpl_cleanup_blurb": "Sort recent Downloads into tidy folders by type.",
+ "file_count_one": "{{count}} file",
+ "file_count_other": "{{count}} files",
+ "run_count_one": "{{count}} run",
+ "run_count_other": "{{count}} runs"
},
"approval": {
"allow": "Allow",
@@ -480,10 +580,13 @@
},
"scope": {
"connector": "acts on a connected service",
- "stays_mac": "stays on this Mac",
- "leaves_mac": "leaves this Mac → {{dest}}",
+ "stays_mac": "stays on this computer",
+ "leaves_mac": "leaves this computer → {{dest}}",
"connected_chat_fallback": "a connected chat",
- "overwrite_suffix": "· overwrites the existing file"
+ "overwrite_suffix": "· overwrites the existing file",
+ "save_skill": "saves to Settings ▸ Skills",
+ "web_fallback": "the web",
+ "search_provider_dest": "your search provider"
},
"btn": {
"allow_every_time": "Allow every time",
@@ -492,7 +595,15 @@
"deny": "Deny",
"this_automation": "this automation",
"always_task_title": "Always allow {{name}} → {{target}} for “{{task}}” — revoke any time on its Automations page",
- "always_tool_title": "Always allow {{name}} for this session"
+ "always_tool_title": "Always allow {{name}} for this session",
+ "add_to_skills": "Add to my skills",
+ "not_now": "Not now",
+ "always_domain": "Always allow {{host}} this session",
+ "always_domain_title": "Every fetch to {{host}} (and its subdomains) runs without asking for the rest of this session",
+ "always_search": "Always allow searches this session",
+ "always_search_title": "Every web search runs without asking for the rest of this session — the grant ends if you change the search provider",
+ "readonly_session": "Allow read-only commands",
+ "readonly_session_title": "Auto-allow read-only commands (local reads and pipelines only — no network, writes, or interpreters) for the rest of this session"
},
"preview_less": "show less",
"preview_all_lines": "show all {{n}} lines",
@@ -506,7 +617,11 @@
"grant": {
"always_after_approve": "— always allowed once you approve",
"read_only": "— read-only"
- }
+ },
+ "save_skill_footer": "Approving adds it to your skills on this computer — usable in every conversation from then on.",
+ "search_note": "Queries go to your configured search provider.",
+ "search_note_current": "Queries go to your configured search provider (currently: {{provider}}).",
+ "reviewer_unsure": "reviewer wasn’t sure: {{note}}"
},
"search": {
"placeholder": "Search chats",
@@ -546,15 +661,15 @@
"folders": "Folders",
"no_connectors": "No connectors enabled for this session.",
"channels_link": "Channels · {{count}}",
- "toggle_title": "Enabled for this session — tap to mute here",
+ "toggle_title": "On for this session. Off mutes it for this session only — the connector stays connected.",
"mute_hint": "Off mutes it for <b>this session only</b> — the connector stays connected.",
"search_placeholder": "Search connectors…",
"no_match": "No match — see all on the Connectors page below.",
- "add_source": "+ Add a source…",
+ "add_source": "+ Add a source",
"recommended": "Recommended",
"core_tag": "core",
"give_folder": "Give access to a folder…",
- "manage_all": "Manage all connectors (global)",
+ "manage_all": "Manage",
"back_to_sources": "Back to sources",
"connect_title": "Connect {{title}}",
"scope_note": "Connecting makes {{title}} available to all your coworkers — the toggle in this list controls just this session.",
@@ -574,10 +689,11 @@
"allow_writes": "Allow writing (read-write)",
"allow_writes_help": "When granted, the agent can read and write files in this folder.",
"cancel": "Cancel",
- "choose_location": "Choose location"
+ "choose_location": "Choose location",
+ "channel_add_error": "Couldn't add that channel."
},
"root": {
- "temporary_space": "Temporary space",
+ "temporary_space": "Temporary folder",
"main": "main",
"missing": "missing",
"read_write": "Read-write",
@@ -653,7 +769,13 @@
"rel_days_ago": "{{count}}d ago",
"routing_update_failed": "Could not update Inbox routing.",
"routing_clear_failed": "Could not clear Inbox routing.",
- "missing_slack_owner": "Choose an approval owner under Integrations → Slack before routing approvals here."
+ "missing_slack_owner": "Choose an approval owner under Integrations → Slack before routing approvals here.",
+ "make_workspace": "Make workspace",
+ "recommended": "Recommended",
+ "previous_question": "Previous question",
+ "question_n": "Question {{n}}",
+ "question_label": "question",
+ "step_of": "{{step}} of {{total}}"
},
"audit": {
"title": "Activity",
@@ -683,7 +805,10 @@
"choose_location": "Choose location",
"allow_writing": "Allow writing (read-write)",
"decline": "Decline",
- "grant_access": "Grant access"
+ "grant_access": "Grant access",
+ "requesting_workspace": "The agent asks to make a folder this session's workspace",
+ "primary_note": "Granting makes this folder the session's primary working directory (read-write); the scratch directory stays available for temporary files and artifacts.",
+ "make_workspace": "Make workspace"
},
"todo": {
"title": "Tasks"
@@ -698,7 +823,12 @@
"browse": "Browse…",
"create": "Create",
"open": "Open",
- "cancel": "Cancel"
+ "cancel": "Cancel",
+ "where_work": "Where should {{name}} work?",
+ "send_sub": "Code work happens inside a folder — pick your project, or start somewhere temporary.",
+ "choose_a_folder": "Choose a folder…",
+ "use_temp": "Use temporary folder",
+ "temp_note": "A temporary folder is created only when you send, with git ready — you can save it as a project later. Your message sends as soon as you choose."
},
"connector": {
"not_connected": "Not connected",
@@ -715,9 +845,6 @@
"nothing_matches": "Nothing matches.",
"more_count": "{{count}} more ·",
"show_all": "show all",
- "account_count": "{{count}} account(s)",
- "portal_count": "{{count}} portal(s)",
- "slack_status": "{{count}} workspace(s) · relay",
"default": "Default",
"make_default": "Make default",
"people": "People",
@@ -737,7 +864,14 @@
"tools_label": "› Tools",
"tools_enabled": "{{enabled}} of {{total}} enabled",
"asks_first": "asks first",
- "read": "read"
+ "read": "read",
+ "add_custom_mcp": "+ Add custom MCP server",
+ "account_count_one": "{{count}} account",
+ "account_count_other": "{{count}} accounts",
+ "portal_count_one": "{{count}} portal",
+ "portal_count_other": "{{count}} portals",
+ "slack_status_one": "{{count}} workspace · relay",
+ "slack_status_other": "{{count}} workspaces · relay"
},
"github": {
"relay_live": "Live · managed relay",
@@ -884,7 +1018,6 @@
"add_portal_title": "Add a portal",
"setup_blurb": "Connect a portal — read-only or read & write is chosen at consent; there are no delete tools either way.",
"portals": "Portals",
- "portal_count": "{{count}} portal(s)",
"sandbox": "Sandbox",
"read_write": "read & write",
"read_only": "read-only",
@@ -894,7 +1027,9 @@
"hidden_fields": "Hidden fields",
"hidden_fields_placeholder": "Property name, e.g. salary",
"hidden_fields_foot": "Hidden fields never reach an agent; stripped counts land in Activity. To limit what a HUMAN teammate could ask for, use HubSpot permission sets on the connected user.",
- "hidden_fields_foot_inner": "Stripped from every record agents read, across all portals."
+ "hidden_fields_foot_inner": "Stripped from every record agents read, across all portals.",
+ "portal_count_one": "{{count}} portal",
+ "portal_count_other": "{{count}} portals"
},
"calendar": {
"add_account": "+ Add account",
@@ -921,10 +1056,11 @@
"access": "Access",
"access_foot": "Keys and tokens are stored only on this computer. Disconnect anytime.",
"tools": "Tools",
- "tools_added": "{{count}} tool(s) this connector adds",
"hide": "Hide",
"view": "View",
- "asks_first": "asks first"
+ "asks_first": "asks first",
+ "tools_added_one": "{{count}} tool this connector adds",
+ "tools_added_other": "{{count}} tools this connector adds"
},
"modal": {
"connect_title": "Connect {{title}}",
@@ -962,7 +1098,7 @@
"slack_manual_pause_note": "One mode at a time — this pauses any relay workspaces."
},
"gallery": {
- "all_personas": "All personas",
+ "all_personas": "All coworkers",
"back_to_gallery": "← Gallery",
"can_message": "can use messaging",
"capabilities_desc": "Read by this app's own parser, so it matches exactly what the install consent will ask you to approve. No executable code is installed.",
@@ -974,8 +1110,8 @@
"could_not_load": "could not load details",
"detail_meta": "v{{version}} · {{publisher}} · {{risk}}",
"done": "Done",
- "empty_none": "No personas published yet.",
- "empty_search": "No personas match your search.",
+ "empty_none": "No coworkers published yet.",
+ "empty_search": "No coworkers match your search.",
"empty_team": "Nothing shared with your team yet.",
"featured": "Featured",
"filter_all": "All",
@@ -993,13 +1129,13 @@
"none": "none",
"permissions_label": "Permissions: ",
"risk_suffix": " · risk: {{risk}}",
- "search_placeholder": "Search personas",
+ "search_placeholder": "Search coworkers",
"sign_in": "Sign in",
"signin_desc": "The Gallery is a curated set of coworkers from OpenWorker Cloud and needs a (free) cloud sign-in. Installing personas from a folder or Git URL — on the Personas page — always works without an account.",
"signin_title": "Sign in to browse the Gallery",
"subtitle": "Curated coworkers · installs stay disabled until you approve them",
- "team_teaser": "From your team — nothing shared yet. Publishing a persona to your teammates is coming soon.",
- "title": "Persona Gallery",
+ "team_teaser": "From your team — nothing shared yet. Publishing a coworker to your teammates is coming soon.",
+ "title": "Coworker Gallery",
"tools_label": "Tools: ",
"unreachable": "The gallery is unreachable right now — try again in a moment.",
"version_publisher": "v{{version}} · {{publisher}}",
@@ -1101,20 +1237,20 @@
"cta_work_title": "Start working with Coworker",
"google_pair_detail": "Coming soon — pending Google's app verification.",
"google_pair_title": "Gmail & Google Calendar",
- "model_intro": "Pick a model provider to get started — OpenWorker runs on your own key, and your key and your data stay on this Mac.",
+ "model_intro": "Pick a model provider to get started — OpenWorker runs on your own key, and your key and your data stay on this computer.",
"models_settings_hint": "Models can be enabled or hidden anytime in Settings ▸ Models.",
- "more_tools_hint": "30+ more tools on the Connectors page — add or remove anytime. Tokens stay on this Mac.",
+ "more_tools_hint": "30+ more tools on the Connectors page — add or remove anytime. Tokens stay on this computer.",
"next": "Next",
"opening_browser": "Opening browser…",
"replay_hint": "Replay this setup anytime: Settings ▸ Appearance ▸ Run setup again.",
"sign_in": "Sign in",
"signed_in_as": "🎉 You're signed in{{account}}",
"signed_in_desc": "Connect a tool above with one click — or add them anytime later from the Connectors page.",
- "signin_band_desc": "OpenWorker handles the OAuth for 20+ tools — no dev consoles, no pasted keys. Tokens stay on this Mac.",
+ "signin_band_desc": "OpenWorker handles the OAuth for 20+ tools — no dev consoles, no pasted keys. Tokens stay on this computer.",
"signin_for_oneclick": "Sign in for one-click connections",
"skip_anyway": "skip anyway",
"skip_setup": "Skip setup",
- "skip_warn_pref": "Nothing works without a model—",
+ "skip_warn_pref": "Nothing works without a model —",
"two_ways": "Two good ways to start:",
"waiting": "Waiting…",
"youre_set_up": "You're set up",
@@ -1140,23 +1276,45 @@
"connect": "Connect",
"connect_this_first": "Connect this first",
"connect_to_enable": "connect to enable",
- "connected": "connected",
+ "connected": "● Ready",
"connections_desc": "Declared by the persona — wire {{name}} into these to unlock its full workflow.",
"connections_full_benefit": "Connections for full benefit",
"core_tag": "core",
"default_mode_label": "Default mode",
"disabled": "Disabled",
- "enable_title": "Enable this persona",
+ "enable_title": "Enable this coworker",
"enabled": "Enabled",
"hero_art": "{{slug}} artwork",
- "load_error": "Could not load this persona.",
+ "load_error": "Could not load this coworker.",
"loading": "Loading…",
"models_label": "Models",
"new_sessions_default": "New sessions get by default",
"new_sessions_desc": "When you start a {{name}} session these are enabled automatically. You can still mute any of them per session.",
"on_by_default": "On by default for new sessions",
- "persona": "Persona",
- "workspace_label": "Workspace"
+ "persona": "Coworker",
+ "workspace_label": "Workspace",
+ "prev_screenshot": "Previous screenshot",
+ "next_screenshot": "Next screenshot",
+ "screenshot_alt": "{{name}} screenshot {{n}}",
+ "screenshot_n": "Screenshot {{n}}",
+ "connectors": "Connectors",
+ "col_status": "Status",
+ "col_enable": "Enable",
+ "advanced": "Advanced",
+ "tool_calls": "Tool calls",
+ "workspace_picked": "picked folder",
+ "workspace_scratch": "scratch",
+ "show_in_picker": "Show in picker",
+ "default_for_new": "Default for new sessions",
+ "make_default": "Make default",
+ "export": "Export…",
+ "exported_to": "Exported to {{path}}",
+ "export_failed": "export failed",
+ "defaults_footnote": "Enabled connectors are on when a new session starts — you can still mute any of them per session.",
+ "delete": "Delete",
+ "keep": "Keep",
+ "delete_ellipsis": "Delete…",
+ "delete_failed": "delete failed"
},
"personas": {
"add_help": "Load from a local directory or a public GitHub repo. Files are copied into a managed area (a snapshot), so the source can change without affecting the install.",
@@ -1170,26 +1328,69 @@
"delete_title": "Delete {{name}}",
"delete_tooltip": "Delete this persona",
"disable": "Disable",
- "disable_warning": "Disabling archives its {{count}} conversation(s) — they stay available under \"Show archived\".",
"enable_intro": "Enable a coworker, then choose whether it appears in the new-session picker. The starred persona is the default for new sessions.",
"enabled": "Enabled",
"in_picker": "In picker",
"install": "Install",
"install_failed": "Install failed",
- "installed": "Installed {{count}} persona(s) — review and enable below.",
"installing": "Installing…",
"keep": "Keep",
"keep_enabled": "Keep enabled",
"mcp_tag": "mcp",
"messaging_tag": "messaging",
"mode_github": "GitHub URL",
- "mode_local": "Local directory",
- "placeholder_github": "https://github.com/org/repo",
+ "mode_local": "Local folder",
+ "placeholder_github": "https://github.com/acme/ops-coworker",
"placeholder_local": "/path/to/persona/dir",
"recommended_mode": "Recommended mode: {{mode}}. Enable it above to use it.",
"risk_label": "Risk: {{risk}}",
"set_default": "Set default",
- "tools_label": "Tools: {{tools}}"
+ "tools_label": "Tools: {{tools}}",
+ "mode_zip": "Bundle zip",
+ "group_general": "General",
+ "group_security": "Security",
+ "unshipped_row_one": "Not in this release · {{count}} coworker",
+ "unshipped_row_other": "Not in this release · {{count}} coworkers",
+ "internal_build": "internal build",
+ "not_in_release": "not in this release",
+ "install_coworker": "Install a coworker",
+ "install_sources": "GitHub · folder · .zip",
+ "choose_folder": "Choose folder…",
+ "dir_picker_note": "Opens the system folder picker; installs on selection.",
+ "choose_zip": "Choose a .zip bundle…",
+ "install_trust_note": "Only install coworkers from sources you trust and can hold accountable — a coworker runs with access to your system. Files are snapshotted into a managed area; no third-party code runs, but the instructions steer the coworker. Best used by teams whose lead builds and distributes coworkers through official channels.",
+ "disable_warning_one": "Disabling archives its {{count}} conversation — it stays available under \"Show archived\".",
+ "disable_warning_other": "Disabling archives its {{count}} conversations — they stay available under \"Show archived\".",
+ "installed_one": "Installed {{count}} coworker — review and enable below.",
+ "installed_other": "Installed {{count}} coworkers — review and enable below.",
+ "default_tag": "Default",
+ "disable_coworker": "Disable this coworker",
+ "enable_coworker": "Enable this coworker",
+ "enabling": "Enabling…",
+ "install_shield_warning": "Only enable coworkers from someone you trust. Nothing here runs third-party code — but its instructions will guide the coworker's behavior.",
+ "risk": {
+ "read": "read files",
+ "write_local": "create & edit files",
+ "exec": "run shell commands",
+ "network": "access the network",
+ "write_remote": "act on connected services"
+ },
+ "risk_join_and": "and",
+ "consent_replaces": "Replaces {{name}}",
+ "consent_installed_at": "(installed {{date}})",
+ "consent_caps_grew": "This update asks for MORE capabilities than the copy it replaces — review below before re-enabling.",
+ "consent_caps_same": "Same capabilities as before — it stays enabled.",
+ "consent_can": "Can {{summary}}",
+ "consent_all_connectors": "· use ALL your connected services",
+ "consent_use_connectors": "· use connectors: {{list}}",
+ "consent_send_messages": "· send messages",
+ "consent_use_mcp": "· use MCP: {{list}}",
+ "consent_hide_tools": "Hide tools",
+ "consent_exact_tools": "Exact tools ({{n}})",
+ "consent_recommended_tag": "(recommended)",
+ "consent_optional_tag": "(optional)",
+ "consent_enabled_note": "✓ Enabled — it's in your coworker picker.",
+ "consent_recommended_mode": "Recommended mode: {{mode}}."
},
"provider": {
"all_providers": "‹ All providers",
@@ -1206,7 +1407,7 @@
"just_now": "just now",
"minutes_ago": "{{count}}m ago",
"no_key_needed": "No key needed",
- "no_key_needed_desc": "No API key needed — Ollama runs models on this Mac.",
+ "no_key_needed_desc": "No API key needed — Ollama runs models on this computer.",
"no_key_yet": "No key yet?",
"not_set_up": "Not set up",
"running": "✓ Running",
@@ -1214,7 +1415,20 @@
"takes_a_minute": "— takes about a minute.",
"test_btn": "Test",
"tested_saved_pill": "✓ Tested & saved",
- "used_suffix": " · used {{time}}"
+ "used_suffix": " · used {{time}}",
+ "signed_in": "✓ Signed in",
+ "signed_in_as": "✓ Signed in as {{account}}",
+ "sign_in_with_plan": "Sign in with your plan",
+ "sign_out": "Sign out",
+ "oauth_plan_note": "Usage draws on the plan's rolling window, not per-token billing. Sign-in stays on this computer.",
+ "oauth_waiting": "Waiting for the browser…",
+ "sign_in_chatgpt": "Sign in with ChatGPT",
+ "oauth_finish_browser": "Finish signing in in the browser window.",
+ "oauth_reopen": "Reopen the sign-in page",
+ "oauth_start_error": "Couldn't start the sign-in.",
+ "copy_command": "Copy command",
+ "test_save_hint": "Runs one read-only check, then saves.",
+ "test_save_btn": "Test & save"
},
"workspace_trust": {
"title": "Trust this workspace’s commands?",
@@ -1223,5 +1437,216 @@
"keep_asking": "Keep asking",
"saving": "Saving…",
"trust": "Trust workspace"
+ },
+ "board": {
+ "summary_blocked": "{{count}} blocked",
+ "summary_review": "{{count}} review",
+ "summary_in_progress": "{{count}} in progress",
+ "summary_open": "{{count}} open",
+ "no_active_work": "No active work",
+ "open_item": "Open item",
+ "hide_finished": "Hide finished",
+ "finished_show": "{{count}} finished · show",
+ "finished": "Finished",
+ "state_blocked": "Blocked",
+ "state_awaiting_review": "Awaiting review",
+ "state_in_progress": "In progress",
+ "state_queued": "Queued",
+ "state_done": "Done",
+ "state_canceled": "Canceled",
+ "state_in_review": "In review",
+ "blocked_with": "blocked: {{blocker}}",
+ "blocked_label": "blocked",
+ "close_board": "Close board",
+ "open_worker_session": "Open this coworker's session",
+ "filed_by": "filed by {{creator}}",
+ "done_when_line": "<label>Done when</label> — {{criteria}}",
+ "add_note_placeholder": "Add a note…",
+ "add_note_title": "Leaves a note on the item — never changes its state",
+ "changes_placeholder": "What needs to change?",
+ "cancel": "Cancel",
+ "mark_done": "Mark done",
+ "request_changes_ellipsis": "Request changes…",
+ "reopen": "Reopen",
+ "tl_filed": "filed this",
+ "tl_assigned": "assigned to {{assignee}}",
+ "tl_claimed": "claimed this",
+ "tl_started": "started",
+ "tl_moved": "moved to {{state}}",
+ "tl_commented": "commented",
+ "wake_title": "Board wake",
+ "wake_update": "update",
+ "wake_review_one": "{{count}} review",
+ "wake_review_other": "{{count}} reviews",
+ "wake_blocked_one": "{{count}} blocked",
+ "wake_blocked_other": "{{count}} blockeds",
+ "wake_canceled_one": "{{count}} canceled",
+ "wake_canceled_other": "{{count}} canceleds",
+ "wake_move_one": "{{count}} move",
+ "wake_move_other": "{{count}} moves",
+ "wake_filing_one": "{{count}} filing",
+ "wake_filing_other": "{{count}} filings",
+ "wake_claim_one": "{{count}} claim",
+ "wake_claim_other": "{{count}} claims",
+ "wake_assignment_one": "{{count}} assignment",
+ "wake_assignment_other": "{{count}} assignments",
+ "wake_comment_one": "{{count}} comment",
+ "wake_comment_other": "{{count}} comments",
+ "wake_chat_message_one": "{{count}} chat message",
+ "wake_chat_message_other": "{{count}} chat messages",
+ "wake_moved": "{{ref}} → {{to}} by {{actor}}",
+ "wake_filed": "{{actor}} filed {{ref}}",
+ "wake_claimed": "{{actor}} claimed {{ref}}",
+ "wake_assigned": "{{ref}} assigned to you",
+ "wake_commented": "{{actor}} commented on {{ref}}",
+ "wake_chat": "# team chat — {{actor}}",
+ "wake_show_message": "show message",
+ "wake_show_handoff": "show hand-off"
+ },
+ "team": {
+ "back_to_session": "Back to session",
+ "chat_tagline": "questions & consensus — status lives on the board",
+ "chat_empty": "No messages yet. Agents post here only when something needs a reply — @mention a coworker to reach it.",
+ "you": "You",
+ "chat_placeholder": "Message # team chat… (posts as you — every member sees it)",
+ "proposed_one": "Proposed team — {{count}} worker",
+ "proposed_other": "Proposed team — {{count}} workers",
+ "enable_chat": "Enable <b># team chat</b>",
+ "chat_info": "A group channel for questions and consensus — @mentions wake the mentioned coworker. Status stays on the board either way.",
+ "grant_note": "Approving grants the lead create, assign & steer — this team only, revocable.",
+ "not_now": "Not now",
+ "create_start": "Create team & start",
+ "proposed_items": "Proposed work items — {{count}}",
+ "items_done_when": "Done when:",
+ "show_less": "Show less",
+ "show_full_criteria": "Show full criteria",
+ "more_items_one": "+ {{count}} more item",
+ "more_items_other": "+ {{count}} more items",
+ "items_grant": "Reply to edit the split; approval creates these on the board.",
+ "approve_items": "Approve items"
+ },
+ "toolreq": {
+ "needs": "The coworker needs <code>{{tool}}</code>",
+ "reason_line": "<label>Reason:</label> “{{reason}}”",
+ "installs_with_source": "OpenWorker installs its own verified copy from {{source}} — or install it yourself and continue.",
+ "installs": "OpenWorker installs its own verified copy — or install it yourself and continue.",
+ "no_build": "OpenWorker has no verified build for this machine — install it yourself if you want this check, or continue and the coworker will note the gap.",
+ "skip": "Continue without it",
+ "install": "Install"
+ },
+ "skills": {
+ "subtitle": "Reusable instructions the worker can follow in every conversation. Off here means off everywhere.",
+ "confirmation": "— the worker can now use it in every conversation.",
+ "off_note": "turned off everywhere. If a conversation already used it, start a new one for a completely clean slate.",
+ "delete_note": "removed. If a conversation already used it, start a new one for a completely clean slate.",
+ "error_generic": "Something went wrong.",
+ "fallback_name": "Skill",
+ "add_skill": "Add skill",
+ "door_write": "Write it myself",
+ "door_write_sub": "A name, a description, and the instructions",
+ "door_import": "Import a file",
+ "door_import_sub": "A .zip or SKILL.md someone shared — you review before it installs",
+ "door_ai": "Create with OpenWorker",
+ "door_ai_sub": "Starts a conversation — the worker builds it and asks before adding it to your skills",
+ "upload_aria": "Upload a skill archive",
+ "review_title": "Review before installing",
+ "review_sub": "Read the instructions — installing a skill means the worker will follow them.",
+ "no_description": "no description",
+ "bundled_files": "Bundled files: {{files}}",
+ "install_skill": "Install skill",
+ "editor_new": "New skill",
+ "editor_edit": "Edit {{name}}",
+ "name_label": "Name",
+ "name_placeholder": "weekly-report",
+ "desc_label": "Description",
+ "desc_placeholder": "One line the worker uses to decide when this applies",
+ "instructions_label": "Instructions",
+ "instructions_placeholder": "1. Gather last week's updates\n2. Write the report, under 300 words",
+ "save_skill": "Save skill",
+ "empty": "No skills yet — <b>Add skill</b> teaches your worker its first one, like “prepare my Monday status report”.",
+ "show_folder": "Show folder",
+ "file_count_one": "{{count}} file",
+ "file_count_other": "{{count}} files",
+ "edit_tip": "Edit",
+ "delete_aria": "Delete {{name}}",
+ "confirm_delete": "Confirm delete",
+ "enabled_aria": "{{name}} enabled",
+ "on": "On"
+ },
+ "memory": {
+ "section_sub": "Your coworkers can remember useful things about you between conversations. Everything they know is listed here.",
+ "loading": "Loading…",
+ "toggle_title": "Remember new things about you",
+ "toggle_label": "Remember new things about me",
+ "toggle_help": "Lasting preferences you mention in chat get saved and used in future conversations — you'll see a small note each time, with one-tap Undo. Turning this off stops new saves; anything already below is still used until you delete it.",
+ "on_msg": "Details you share from future conversations will be remembered, so I can be more helpful over time.",
+ "off_msg": "I'll stop remembering new things about you. What I already know is kept and still used — delete anything below you'd rather I forget.",
+ "wipe_confirm": "Delete everything that's been remembered about you?\n\nThis can't be undone. Conversations you already have open still know what they knew — new conversations start with a clean slate.",
+ "wiped_msg": "Everything I remembered has been deleted. New conversations start fresh; ones you already have open still know what they knew when they started.",
+ "learned_title": "What I've learned about you",
+ "forget_all": "Forget everything…",
+ "learned_help": "Saved automatically from your conversations. Fix anything that's wrong — or delete it. Edits and deletions apply to new conversations; ones you already have open keep what they knew when they started.",
+ "empty": "Nothing yet. When you mention a lasting preference in chat — or say \"remember that…\" — it will show up here.",
+ "rules_title": "Your instructions",
+ "rules_help": "Your coworkers follow these in every conversation.",
+ "rules_placeholder": "I use a screen reader — no tables, describe any image\nUse DD-MM-YYYY for dates",
+ "save": "Save",
+ "rules_saved": "Saved — applies to new conversations. Ones you already have open keep the instructions they started with.",
+ "fix_tip": "Fix this",
+ "delete_tip": "Delete this memory"
+ },
+ "setup": {
+ "import_coworker": "Import coworker…",
+ "manage_coworkers": "Manage coworkers…",
+ "choose_folder": "Choose folder",
+ "choose_another_folder": "Choose another folder…",
+ "choose_a_folder": "Choose a folder…"
+ },
+ "mcp": {
+ "preset_granola_blurb": "Meeting notes & transcripts — sign in with your Granola account.",
+ "status_off": "Off",
+ "status_signing_in": "Signing in…",
+ "status_testing": "Testing…",
+ "status_needs_sign_in": "Needs sign-in",
+ "status_error": "Error",
+ "status_not_tested": "Not tested",
+ "tool_count_one": "{{count}} tool",
+ "tool_count_other": "{{count}} tools",
+ "tested_rel": "tested {{rel}}",
+ "group_custom": "Custom · MCP",
+ "add_title": "Add custom MCP server",
+ "tab_remote_url": "Remote URL",
+ "tab_json": "JSON",
+ "add_url_blurb": "Connect a hosted MCP server. If it needs sign-in, the row will offer it after the first test.",
+ "add_name_ph": "Name (shown in the connectors list)",
+ "add_json_blurb": "Paste server JSON (name → config):",
+ "add_and_test": "Add & test",
+ "err_name": "Give the server a name.",
+ "err_url": "Enter the server's full URL (https://…).",
+ "err_invalid_json": "Invalid JSON: {{message}}",
+ "err_json_shape": "Paste a `{ \"<name>\": { … } }` object (or a full mcpServers block).",
+ "enable_title": "Enable this server",
+ "test_connection": "Test connection",
+ "test_desc": "Starts the server and lists its tools — without opening a session.",
+ "err_failed_connect": "failed to connect",
+ "hide": "hide",
+ "show": "show",
+ "configuration": "Configuration",
+ "remove_server": "Remove server"
+ },
+ "bindmenu": {
+ "filter_placeholder": "Filter…",
+ "none": "none",
+ "this_repo": "this repo",
+ "this_folder": "this folder",
+ "bound": "bound",
+ "no_matches": "no matches",
+ "name_placeholder_memory": "Name this memory…",
+ "name_placeholder_board": "Name this board…",
+ "name_current_memory": "Name current memory…",
+ "name_current_board": "Name current board…",
+ "view_edit": "View & edit…",
+ "bind_error": "could not bind",
+ "name_error": "could not name"
}
}
diff --git a/surfaces/gui/src/locales/zh.json b/surfaces/gui/src/locales/zh.json
index 1dbdc487..cdac757b 100644
--- a/surfaces/gui/src/locales/zh.json
+++ b/surfaces/gui/src/locales/zh.json
@@ -33,8 +33,6 @@
"no_conversations": "还没有会话。",
"no_matching": "无匹配的会话。",
"awaiting_attention": "{{n}} 项待你处理",
- "unseen_new": "{{n}} 次新运行",
- "unseen_failed": "{{n}} 次新运行 —— 最新一次失败",
"from_slack": "来自 Slack",
"age_now": "刚刚",
"age_m": "{{n}}分钟前",
@@ -52,7 +50,7 @@
"delete_confirm": "删除?",
"pinned": "已置顶",
"scheduled": "定时任务",
- "group_persona": "角色",
+ "group_persona": "同事",
"group_chrono": "时间顺序",
"clear": "清除",
"filter_all_hint": "不勾选则显示全部。",
@@ -69,7 +67,10 @@
"not_signed_in_row": "未登录",
"inbox_chip_pending": "收件箱 —— {{n}} 项待你处理",
"start_session_as": "以此身份开始会话",
- "manage_personas": "管理角色…"
+ "manage_personas": "管理角色…",
+ "group_and_filter_short": "分组与筛选会话",
+ "unseen_new_other": "{{count}} 次新运行",
+ "unseen_failed_other": "{{count}} 次新运行 —— 最新一次失败"
},
"topbar": {
"show_sidebar": "显示侧栏 (⌘B)",
@@ -112,8 +113,10 @@
"discuss_desc": "聊天探索 —— 不做编辑、不执行命令",
"interactive": "需审批",
"interactive_desc": "编辑和执行命令前先询问",
- "auto": "完全访问",
- "auto_desc": "无需询问,全部执行"
+ "auto": "绕过审批",
+ "auto_desc": "无需询问,全部执行 —— 审批已关闭",
+ "auto_approve": "自动审批",
+ "auto_approve_desc": "由会话模型对操作分类并处理审批,拿不准的仍会询问你"
},
"voice": {
"stop_transcribe": "停止录音并转写",
@@ -140,7 +143,14 @@
"none_aria": "未连接模型 —— 请先连接一个模型",
"loading": "正在加载模型…",
"loading_title": "正在从服务器获取模型列表"
- }
+ },
+ "placeholder_gate": "回复以调整提案 —— 或使用上方按钮",
+ "attach_this_message": "本条消息",
+ "attach_this_session": "本次会话",
+ "bind_memory": "项目记忆",
+ "bind_board": "看板",
+ "reviewer_paused_tip": "本回合暂停 —— 审查器连续拦截了多个操作,将改为向你请求批准",
+ "paused": "已暂停"
},
"transcript": {
"copy_message": "复制消息",
@@ -150,16 +160,24 @@
"who_assistant": "助手",
"retry": "重试",
"approval": {
- "approved": "✓ 已批准",
+ "approved": "✓ 你已批准",
"declined": "✕ 已拒绝",
- "approved_scope": "已批准 · {{scope}}"
+ "approved_scope": "你已批准 · {{scope}}",
+ "approved_title": "你已批准",
+ "reviewer_unsure": " —— 审查器不确定:{{note}}",
+ "reviewer_allowed_title": "已由自动批准审查器允许",
+ "bypass_title": "未经批准即运行 —— 跳过批准模式",
+ "auto_approved": "已自动批准",
+ "bypassed": "已跳过批准"
},
"step": {
"raw": "原始",
"auto_allowed": "已自动允许",
- "auto_allowed_tip": "已根据此自动化的常驻授权自动允许:{{name}}",
+ "auto_allowed_tip": "已根据此自动化的常驻授权自动允许:{{name}}。可在其自动化页面撤销。",
"hidden_count_label": "{{n}} 项已隐藏",
- "hidden_tip": "在 agent 看到结果前已被你的隐私过滤器移除 —— agent 不会获知任何痕迹。"
+ "hidden_tip": "在 agent 看到结果前已被你的隐私过滤器移除 —— agent 不会获知任何痕迹。",
+ "tried_skill_pre": "尝试技能:",
+ "tried_skill_post": " —— 不可用"
},
"turn": {
"running": "运行 {{label}}…",
@@ -171,7 +189,24 @@
"dir_granted": "已授予文件夹访问权限",
"plan_approved": "计划已批准",
"plan_proposed": "已提出计划",
- "plan_rejected": "已退回并附上反馈"
+ "plan_rejected": "已退回并附上反馈",
+ "mcp_details": "详情",
+ "mcp_open_connectors": "打开连接器",
+ "user_more": "更多…",
+ "user_less": "收起…",
+ "reviewer": {
+ "blocked": "已被审查者拦截",
+ "explain": "agent 只被告知操作被拦截 —— 而非原因 —— 因此无法辩解绕过。如果该操作确实没问题,你可以按原样执行它:",
+ "allow_anyway": "仍然允许",
+ "override_sent": "已批准 —— agent 将原样重试该操作。"
+ },
+ "memory": {
+ "saved": "我会记住这一点",
+ "updated": "我已更新记忆",
+ "undone_forgotten": "好 —— 已忘记。",
+ "undone_restored": "好 —— 已恢复原样。",
+ "undo": "撤销"
+ }
},
"rail": {
"progress_title": "进度",
@@ -200,14 +235,44 @@
"sheet_empty": "空表格。",
"open_in_default": "用默认应用打开",
"show_in_folder": "在文件夹中显示",
- "show_folder": "显示这些文件的保存位置"
+ "show_folder": "显示这些文件的保存位置",
+ "board_title": "看板",
+ "board_expand": "展开看板",
+ "team_title": "团队",
+ "team_open_session": "打开 {{name}} 的会话",
+ "team_worker": "成员",
+ "team_sleeping": "休眠",
+ "team_open": "打开 ↗",
+ "team_chat": "团队聊天",
+ "back_to": "返回{{name}}",
+ "crumb_files": "文件",
+ "more_actions": "更多操作",
+ "more": "更多",
+ "close_viewer": "关闭预览",
+ "close": "关闭",
+ "journal_title": "日志",
+ "journal_entries_other": "{{count}} 条记录",
+ "browse": "浏览",
+ "root_read_write": "可读写",
+ "root_read_only": "只读",
+ "copy_contents": "复制内容",
+ "open_in_browser": "在浏览器中打开",
+ "reveal_in_finder": "在访达中显示",
+ "folder_empty": "此文件夹为空。",
+ "table_truncated": "显示前 {{max}} 行,共 {{total}} 行。",
+ "board_chip_blocked_other": "{{count}} 个受阻",
+ "board_chip_review_other": "{{count}} 个待审",
+ "board_chip_active_other": "{{count}} 个进行中"
},
"settings": {
"tab": {
"general": "通用",
"models": "模型",
"voice": "语音输入",
- "personas": "角色"
+ "personas": "同事",
+ "context": "上下文优化",
+ "skills": "技能",
+ "memory": "记忆"
},
"general_title": "通用",
"general_sub": "OpenWorker 在本机的外观与行为。",
@@ -238,7 +303,7 @@
"update_error": "暂时无法检查更新。",
"update_downloading": "下载中 —— OpenWorker 准备好后会自动重启。",
"voice_desktop_only": "语音输入设置仅在 OpenWorker 桌面版中可用。",
- "personas_intro": "OpenWorker 团队精选的角色 —— 了解各自能做什么……",
+ "personas_intro": "管理你的同事,并添加新同事。",
"scratch_placeholder": "~/OpenWorker",
"files_browse": "浏览…",
"files_help": "同事保存产出文件的临时目录。可在每会话中覆盖。",
@@ -253,11 +318,11 @@
"sidebar_card_help": "侧栏在显示前预览的会话数。",
"sidebar_card_title": "侧栏密度",
"sidebar_per_coworker": "每个角色的会话数",
- "voice_checking": "检查中…",
+ "voice_checking": "正在检查兼容性…",
"voice_compatible": "兼容",
"voice_delete": "删除",
"voice_delete_confirm": "删除此模型?",
- "voice_device_title": "设备",
+ "voice_device_title": "本设备",
"voice_dl_progress": "{{done}} / {{total}}",
"voice_download": "下载",
"voice_installed": "已安装并验证 · {{size}}",
@@ -272,8 +337,8 @@
"voice_mic_test_title": "麦克风测试",
"voice_no_speech": "未检测到语音 —— 请再试一次。",
"voice_not_installed": "本地语音模型 · {{size}}",
- "voice_private_body": "语音模型完全在本机运行 —— 录音永不离开此设备。",
- "voice_private_title": "完全私密",
+ "voice_private_body": "音频仅在录音期间保留在内存中,并在本地完成转写。",
+ "voice_private_title": "隐私为先。",
"voice_processor": "处理器",
"voice_processor_detail": "需要 Apple Silicon(M1 或更高)。",
"voice_ready_badge": "就绪",
@@ -282,10 +347,10 @@
"voice_test_again": "再测一次",
"voice_test_mic": "测试麦克风",
"voice_transcribing": "转写中…",
- "voice_unsupported": "此设备不支持语音输入。",
- "voice_verified": "✓ 已验证",
+ "voice_unsupported": "不支持",
+ "voice_verified": "已验证",
"voice_verifying": "验证中…",
- "voice_whisper_title": "Whisper 模型",
+ "voice_whisper_title": "Whisper Base · 英语",
"voice_windows": "Windows",
"voice_windows_detail": "下载一个 whisper.cpp 模型以启用语音输入。",
"trusted_workspaces": "受信任的工作区",
@@ -308,7 +373,11 @@
"pdf_max_pages": "最大页数",
"pdf_max_size": "最大大小",
"pdf_limits_help": "超过上述限制的 PDF 不会被附加 —— 输入框中会显示一条提示。",
- "voice_action_failed": "语音输入无法完成该操作。"
+ "voice_action_failed": "语音输入无法完成该操作。",
+ "personas_desc": "同事是专精于特定角色或任务的 agent,自带胜任该角色所需的工具与技能。启用同事后,即可在开始会话时选择它。",
+ "composer_section": "输入框",
+ "context_bar_title": "显示上下文窗口占用条",
+ "context_bar_desc": "一个小指示条,显示模型上下文窗口的占用程度。关闭后将改为以数字形式显示。"
},
"cloud": {
"check_browser": "请查看你的浏览器…",
@@ -321,24 +390,47 @@
"ready": "OpenWorker v{{version}} 已准备好安装。",
"banner_title": "有可用更新",
"downloading": "下载中…",
- "install_failed": "无法安装更新。",
+ "install_failed": "更新未能安装 —— 下次启动时会再次提示。",
"later": "以后",
"restart_to_update": "重启以更新"
},
"toast": {
"automation_started": "自动化已启动",
"run_count": "次运行",
- "view_run": "查看运行"
+ "view_run": "查看运行",
+ "automation_fallback": "自动化"
},
"app": {
"notice": {
"max_iterations": "已停止:达到最大迭代次数。",
"model_switched": "模型已切换",
"interrupted": "已中断。",
- "error": "错误:"
+ "error": "错误:",
+ "context_compacted": "上下文已压缩",
+ "input_rejected": "该消息已被拒绝。",
+ "unknown": "未知"
},
"jump_to_latest": "跳到最新",
- "waiting_for_agent": "正在等待 agent…"
+ "waiting_for_agent": "正在等待 agent…",
+ "compacting_context": "正在压缩上下文…",
+ "allow_anyway_message": "我已审阅被拦截的 {{name}} 操作 —— 请按原样执行。",
+ "temp_folder_failed": "无法创建临时文件夹。",
+ "temp_folder_created": "已创建临时文件夹",
+ "temp_folder_created_git": "已创建临时文件夹 · git 已初始化",
+ "save_project_failed": "无法保存为项目。",
+ "saved_as_project": "已保存为项目 —— 现在在 {{name}} 中工作。",
+ "save_as_project": "保存为项目…",
+ "build_skill_prefill": "为我构建一个新技能:{{description}}",
+ "build_skill_prefill_empty": "为我构建一个新技能:(描述这个技能应做什么)",
+ "sleep": {
+ "label": "休眠中",
+ "until": ",至 {{time}}",
+ "team_clause": ",团队工作期间 —— 看板有动静时也会唤醒。",
+ "trigger_clause": " —— 到触发条件时会唤醒。",
+ "talk_anytime": "随时可以和它对话。",
+ "ask_status": "询问状态",
+ "status_prompt": "请快速汇报一下状态 —— 哪些在推进、哪些被卡住、有没有需要我处理的?"
+ }
},
"run_banner": {
"scheduled_run": "定时任务",
@@ -375,7 +467,6 @@
"delivery_sched": "投递与时间表",
"edit": "编辑",
"empty_state": "还没有定时任务 —— 使用上方模板,点击 <strong>+ 新建自动化</strong>,或在会话里直接让 OpenWorker 做。",
- "file_count": "{{count}} 个文件",
"finish_connecting": "在浏览器中完成 {{name}} 的连接。",
"finish_connecting_desc": "在那里批准,然后回来 —— 本页会自动更新。",
"finish_signin_desc": "在浏览器中完成登录 —— 本页会自动更新。",
@@ -409,7 +500,6 @@
"repository": "仓库",
"revoke": "撤销",
"revoke_title": "此自动化将再次请求批准",
- "run_count": "{{count}} 次运行",
"run_now": "▶ 立即运行",
"runs_desc": "每次运行都是一次实时对话 —— 打开可看到 agent 做了什么并追问。",
"runs_label": "运行记录",
@@ -462,7 +552,9 @@
"tmpl_inbox_blurb": "一份简短的未读邮件摘要。",
"why_unread_email": "您的未读邮件",
"tmpl_cleanup_title": "文件夹整理",
- "tmpl_cleanup_blurb": "按文件类型将最近的下载内容整理到规整的文件夹中。"
+ "tmpl_cleanup_blurb": "按文件类型将最近的下载内容整理到规整的文件夹中。",
+ "file_count_other": "{{count}} 个文件",
+ "run_count_other": "{{count}} 次运行"
},
"approval": {
"allow": "允许",
@@ -481,7 +573,10 @@
"stays_mac": "保留在本机",
"leaves_mac": "离开本机 → {{dest}}",
"connected_chat_fallback": "已连接的聊天",
- "overwrite_suffix": "· 覆盖现有文件"
+ "overwrite_suffix": "· 覆盖现有文件",
+ "save_skill": "保存到 设置 ▸ 技能",
+ "web_fallback": "网络",
+ "search_provider_dest": "你的搜索服务商"
},
"btn": {
"allow_every_time": "每次都允许",
@@ -490,7 +585,15 @@
"deny": "拒绝",
"this_automation": "此自动化",
"always_task_title": "为「{{task}}」总是允许 {{name}} → {{target}} —— 可在其自动化页面随时撤销",
- "always_tool_title": "本次会话总是允许 {{name}}"
+ "always_tool_title": "本次会话总是允许 {{name}}",
+ "add_to_skills": "添加到我的技能",
+ "not_now": "暂不",
+ "always_domain": "本次会话总是允许 {{host}}",
+ "always_domain_title": "本次会话剩余时间内,对 {{host}}(及其子域名)的每次抓取都无需再询问",
+ "always_search": "本次会话总是允许搜索",
+ "always_search_title": "本次会话剩余时间内,每次网页搜索都无需再询问 —— 更换搜索服务商后授权即失效",
+ "readonly_session": "允许只读命令",
+ "readonly_session_title": "本次会话剩余时间内自动允许只读命令(仅限本地读取和管道 —— 不含网络、写入或解释器)"
},
"preview_less": "收起",
"preview_all_lines": "展开全部 {{n}} 行",
@@ -504,7 +607,11 @@
"grant": {
"always_after_approve": "—— 你批准后将总是允许",
"read_only": "—— 只读"
- }
+ },
+ "save_skill_footer": "批准后会将其添加到本机的技能中 —— 此后每个会话都可使用。",
+ "search_note": "查询会发送到你配置的搜索服务商。",
+ "search_note_current": "查询会发送到你配置的搜索服务商(当前:{{provider}})。",
+ "reviewer_unsure": "审查器不确定:{{note}}"
},
"search": {
"placeholder": "搜索会话",
@@ -544,15 +651,15 @@
"folders": "文件夹",
"no_connectors": "本会话未启用任何连接器。",
"channels_link": "频道 · {{count}}",
- "toggle_title": "已为本会话启用 —— 点击在此静音",
+ "toggle_title": "本会话已开启。关闭仅静音本次会话 —— 连接器保持连接。",
"mute_hint": "在本会话内关闭只会静音 <b>本次会话</b> —— 连接器保持连接。",
"search_placeholder": "搜索连接器…",
"no_match": "无匹配 —— 见下方连接器页面的全部列表。",
- "add_source": "+ 添加来源…",
+ "add_source": "+ 添加来源",
"recommended": "推荐",
"core_tag": "核心",
"give_folder": "授权访问一个文件夹…",
- "manage_all": "管理所有连接器(全局)",
+ "manage_all": "管理",
"back_to_sources": "返回来源",
"connect_title": "连接 {{title}}",
"scope_note": "连接后 {{title}} 对所有同事可用 —— 此列表中的开关仅控制本次会话。",
@@ -572,10 +679,11 @@
"allow_writes": "允许写入(读写)",
"allow_writes_help": "授予后,agent 可在该文件夹中读写文件。",
"cancel": "取消",
- "choose_location": "选择位置"
+ "choose_location": "选择位置",
+ "channel_add_error": "无法添加该频道。"
},
"root": {
- "temporary_space": "临时空间",
+ "temporary_space": "临时文件夹",
"main": "主工作区",
"missing": "缺失",
"read_write": "可读写",
@@ -651,7 +759,13 @@
"rel_days_ago": "{{count}} 天前",
"routing_update_failed": "无法更新收件箱路由。",
"routing_clear_failed": "无法清除收件箱路由。",
- "missing_slack_owner": "在将审批路由到此处前,请先在「集成 → Slack」中选择审批负责人。"
+ "missing_slack_owner": "在将审批路由到此处前,请先在「集成 → Slack」中选择审批负责人。",
+ "make_workspace": "设为工作区",
+ "recommended": "推荐",
+ "previous_question": "上一个问题",
+ "question_n": "问题 {{n}}",
+ "question_label": "提问",
+ "step_of": "{{step}} / {{total}}"
},
"audit": {
"title": "活动",
@@ -681,7 +795,10 @@
"choose_location": "选择位置",
"allow_writing": "允许写入(读写)",
"decline": "拒绝",
- "grant_access": "授权访问"
+ "grant_access": "授权访问",
+ "requesting_workspace": "agent 请求将一个文件夹设为本次会话的工作区",
+ "primary_note": "授权后,该文件夹将成为本次会话的主工作目录(读写);临时目录仍可用于存放临时文件和产出文件。",
+ "make_workspace": "设为工作区"
},
"todo": {
"title": "任务"
@@ -696,7 +813,12 @@
"browse": "浏览…",
"create": "创建",
"open": "打开",
- "cancel": "取消"
+ "cancel": "取消",
+ "where_work": "{{name}} 要在哪里工作?",
+ "send_sub": "代码工作在文件夹里进行 —— 选择你的项目,或从临时位置开始。",
+ "choose_a_folder": "选择文件夹…",
+ "use_temp": "使用临时文件夹",
+ "temp_note": "临时文件夹只在你发送时创建,git 已就绪 —— 之后可另存为项目。你一选定,消息即发送。"
},
"connector": {
"not_connected": "未连接",
@@ -713,9 +835,6 @@
"nothing_matches": "没有匹配项。",
"more_count": "还有 {{count}} 个 ·",
"show_all": "显示全部",
- "account_count": "{{count}} 个账户",
- "portal_count": "{{count}} 个门户",
- "slack_status": "{{count}} 个工作区 · 中转",
"default": "默认",
"make_default": "设为默认",
"people": "人员",
@@ -735,7 +854,11 @@
"tools_label": "› 工具",
"tools_enabled": "{{enabled}} / {{total}} 已启用",
"asks_first": "先询问",
- "read": "读取"
+ "read": "读取",
+ "add_custom_mcp": "+ 添加自定义 MCP 服务器",
+ "account_count_other": "{{count}} 个账户",
+ "portal_count_other": "{{count}} 个门户",
+ "slack_status_other": "{{count}} 个工作区 · 中转"
},
"github": {
"relay_live": "在线 · 托管中转",
@@ -882,7 +1005,6 @@
"add_portal_title": "添加门户",
"setup_blurb": "连接一个门户 —— 只读或读写于授权时选择;两种模式都没有删除工具。",
"portals": "门户",
- "portal_count": "{{count}} 个门户",
"sandbox": "沙盒",
"read_write": "读写",
"read_only": "只读",
@@ -892,7 +1014,8 @@
"hidden_fields": "隐藏字段",
"hidden_fields_placeholder": "属性名,例如 salary",
"hidden_fields_foot": "隐藏字段永远不会到达 agent;剥离计数显示在活动中。要限制人类同事能请求的内容,请在已连接用户上使用 HubSpot 权限集。",
- "hidden_fields_foot_inner": "从 agent 读取的每条记录中剥离,跨所有门户。"
+ "hidden_fields_foot_inner": "从 agent 读取的每条记录中剥离,跨所有门户。",
+ "portal_count_other": "{{count}} 个门户"
},
"calendar": {
"add_account": "+ 添加账户",
@@ -919,10 +1042,10 @@
"access": "访问",
"access_foot": "密钥和令牌仅存储在本机。可随时断开。",
"tools": "工具",
- "tools_added": "此连接器新增 {{count}} 个工具",
"hide": "隐藏",
"view": "查看",
- "asks_first": "先询问"
+ "asks_first": "先询问",
+ "tools_added_other": "此连接器新增 {{count}} 个工具"
},
"modal": {
"connect_title": "连接 {{title}}",
@@ -960,7 +1083,7 @@
"slack_manual_pause_note": "一次只能用一种模式 —— 这会暂停所有中转工作区。"
},
"gallery": {
- "all_personas": "全部角色",
+ "all_personas": "全部同事",
"back_to_gallery": "← 画廊",
"can_message": "可使用消息",
"capabilities_desc": "由本应用自己的解析器读取,与安装审批将询问你的内容完全一致。不安装任何可执行代码。",
@@ -972,8 +1095,8 @@
"could_not_load": "无法加载详情",
"detail_meta": "v{{version}} · {{publisher}} · {{risk}}",
"done": "完成",
- "empty_none": "还没有发布的角色。",
- "empty_search": "没有匹配的角色。",
+ "empty_none": "还没有发布的同事。",
+ "empty_search": "没有匹配的同事。",
"empty_team": "你的团队还没有分享任何内容。",
"featured": "精选",
"filter_all": "全部",
@@ -991,13 +1114,13 @@
"none": "无",
"permissions_label": "权限:",
"risk_suffix": " · 风险:{{risk}}",
- "search_placeholder": "搜索角色",
+ "search_placeholder": "搜索同事",
"sign_in": "登录",
"signin_desc": "画廊是来自 OpenWorker Cloud 的精选同事集合,需要(免费的)云登录。从文件夹或 Git URL 安装角色 —— 在角色页 —— 始终无需账户即可使用。",
"signin_title": "登录以浏览画廊",
"subtitle": "精选同事 · 安装后默认禁用,待你审批启用",
- "team_teaser": "来自你的团队 —— 暂无分享。向队友发布角色即将推出。",
- "title": "角色画廊",
+ "team_teaser": "来自你的团队 —— 暂无分享。向队友发布同事即将推出。",
+ "title": "同事画廊",
"tools_label": "工具:",
"unreachable": "画廊暂时无法访问 —— 稍后再试。",
"version_publisher": "v{{version}} · {{publisher}}",
@@ -1138,23 +1261,45 @@
"connect": "连接",
"connect_this_first": "请先连接",
"connect_to_enable": "连接以启用",
- "connected": "已连接",
+ "connected": "● 就绪",
"connections_desc": "由角色声明 —— 把 {{name}} 接入这些连接以解锁它的完整工作流。",
"connections_full_benefit": "充分发挥的连接",
"core_tag": "核心",
"default_mode_label": "默认模式",
"disabled": "已禁用",
- "enable_title": "启用此角色",
+ "enable_title": "启用此同事",
"enabled": "已启用",
"hero_art": "{{slug}} 配图",
- "load_error": "无法加载此角色。",
+ "load_error": "无法加载此同事。",
"loading": "加载中…",
"models_label": "模型",
"new_sessions_default": "新会话默认启用",
"new_sessions_desc": "当你开始一个 {{name}} 会话时,这些会自动启用。你仍可在每个会话中静音任意一个。",
"on_by_default": "新会话默认开启",
- "persona": "角色",
- "workspace_label": "工作区"
+ "persona": "同事",
+ "workspace_label": "工作区",
+ "prev_screenshot": "上一张截图",
+ "next_screenshot": "下一张截图",
+ "screenshot_alt": "{{name}} 截图 {{n}}",
+ "screenshot_n": "截图 {{n}}",
+ "connectors": "连接器",
+ "col_status": "状态",
+ "col_enable": "启用",
+ "advanced": "高级",
+ "tool_calls": "工具调用",
+ "workspace_picked": "选定的文件夹",
+ "workspace_scratch": "临时目录",
+ "show_in_picker": "显示在选择器中",
+ "default_for_new": "新会话默认",
+ "make_default": "设为默认",
+ "export": "导出…",
+ "exported_to": "已导出到 {{path}}",
+ "export_failed": "导出失败",
+ "defaults_footnote": "启用的连接器会在新会话开始时自动开启 —— 你仍可在每个会话中静音任意一个。",
+ "delete": "删除",
+ "keep": "保留",
+ "delete_ellipsis": "删除…",
+ "delete_failed": "删除失败"
},
"personas": {
"add_help": "从本地目录或公开 GitHub 仓库加载。文件会复制到托管区域(快照),因此源文件变更不会影响已安装版本。",
@@ -1168,26 +1313,66 @@
"delete_title": "删除 {{name}}",
"delete_tooltip": "删除此角色",
"disable": "禁用",
- "disable_warning": "禁用后会归档其 {{count}} 个会话 —— 仍可在「显示已归档」中查看。",
"enable_intro": "启用一位同事,然后选择是否显示在新会话选择器中。带星标的角色是新会话的默认角色。",
"enabled": "已启用",
"in_picker": "在选择器中",
"install": "安装",
"install_failed": "安装失败",
- "installed": "已安装 {{count}} 个角色 —— 请在下方审核并启用。",
"installing": "安装中…",
"keep": "保留",
"keep_enabled": "保持启用",
"mcp_tag": "mcp",
"messaging_tag": "消息",
"mode_github": "GitHub URL",
- "mode_local": "本地目录",
- "placeholder_github": "https://github.com/org/repo",
+ "mode_local": "本地文件夹",
+ "placeholder_github": "https://github.com/acme/ops-coworker",
"placeholder_local": "/path/to/persona/dir",
"recommended_mode": "推荐模式:{{mode}}。请在上方启用后使用。",
"risk_label": "风险:{{risk}}",
"set_default": "设为默认",
- "tools_label": "工具:{{tools}}"
+ "tools_label": "工具:{{tools}}",
+ "mode_zip": "Zip 压缩包",
+ "group_general": "通用",
+ "group_security": "安全",
+ "unshipped_row_other": "未包含在本版本 · {{count}} 位同事",
+ "internal_build": "内部构建",
+ "not_in_release": "未包含在本版本",
+ "install_coworker": "安装同事",
+ "install_sources": "GitHub · 文件夹 · .zip",
+ "choose_folder": "选择文件夹…",
+ "dir_picker_note": "打开系统文件夹选择器;选定后即安装。",
+ "choose_zip": "选择 .zip 包…",
+ "install_trust_note": "只从你信任且可追责的来源安装同事 —— 同事运行时可以访问你的系统。文件会快照到托管区域;不会运行第三方代码,但其指令会引导同事的行为。最适合由团队负责人通过官方渠道构建和分发同事的团队。",
+ "disable_warning_other": "禁用后会归档其 {{count}} 个会话 —— 仍可在「显示已归档」中查看。",
+ "installed_other": "已安装 {{count}} 位同事 —— 请在下方审核并启用。",
+ "default_tag": "默认",
+ "disable_coworker": "禁用此同事",
+ "enable_coworker": "启用此同事",
+ "enabling": "启用中…",
+ "install_shield_warning": "只启用来自你信任之人的同事。这里不会运行第三方代码 —— 但其指令会引导同事的行为。",
+ "risk": {
+ "read": "读取文件",
+ "write_local": "创建和编辑文件",
+ "exec": "运行 shell 命令",
+ "network": "访问网络",
+ "write_remote": "操作已连接的服务"
+ },
+ "risk_join_and": "和",
+ "consent_replaces": "替换 {{name}}",
+ "consent_installed_at": "(安装于 {{date}})",
+ "consent_caps_grew": "此更新请求的能力比被替换的副本更多 —— 重新启用前请在下方审核。",
+ "consent_caps_same": "能力与之前相同 —— 保持启用。",
+ "consent_can": "可以{{summary}}",
+ "consent_all_connectors": "· 使用你的全部已连接服务",
+ "consent_use_connectors": "· 使用连接器:{{list}}",
+ "consent_send_messages": "· 发送消息",
+ "consent_use_mcp": "· 使用 MCP:{{list}}",
+ "consent_hide_tools": "隐藏工具",
+ "consent_exact_tools": "具体工具 ({{n}})",
+ "consent_recommended_tag": "(推荐)",
+ "consent_optional_tag": "(可选)",
+ "consent_enabled_note": "✓ 已启用 —— 已在你的同事选择器中。",
+ "consent_recommended_mode": "推荐模式:{{mode}}。"
},
"provider": {
"all_providers": "‹ 全部 provider",
@@ -1212,7 +1397,20 @@
"takes_a_minute": "—— 大约一分钟。",
"test_btn": "测试",
"tested_saved_pill": "✓ 已验证并保存",
- "used_suffix": " · 使用于 {{time}}"
+ "used_suffix": " · 使用于 {{time}}",
+ "signed_in": "✓ 已登录",
+ "signed_in_as": "✓ 已登录:{{account}}",
+ "sign_in_with_plan": "使用套餐登录",
+ "sign_out": "退出登录",
+ "oauth_plan_note": "用量计入套餐的滚动额度,而非按 token 计费。登录信息仅保存在本机。",
+ "oauth_waiting": "等待浏览器…",
+ "sign_in_chatgpt": "使用 ChatGPT 登录",
+ "oauth_finish_browser": "在浏览器窗口中完成登录。",
+ "oauth_reopen": "重新打开登录页",
+ "oauth_start_error": "无法启动登录。",
+ "copy_command": "复制命令",
+ "test_save_hint": "运行一次只读检查,然后保存。",
+ "test_save_btn": "测试并保存"
},
"workspace_trust": {
"title": "信任此工作区的命令?",
@@ -1221,5 +1419,203 @@
"keep_asking": "继续询问",
"saving": "保存中…",
"trust": "信任工作区"
+ },
+ "board": {
+ "summary_blocked": "{{count}} 项受阻",
+ "summary_review": "{{count}} 项待审",
+ "summary_in_progress": "{{count}} 项进行中",
+ "summary_open": "{{count}} 项待处理",
+ "no_active_work": "暂无进行中的工作",
+ "open_item": "打开条目",
+ "hide_finished": "隐藏已完成",
+ "finished_show": "{{count}} 项已完成 · 显示",
+ "finished": "已完成",
+ "state_blocked": "受阻",
+ "state_awaiting_review": "待审核",
+ "state_in_progress": "进行中",
+ "state_queued": "排队中",
+ "state_done": "已完成",
+ "state_canceled": "已取消",
+ "state_in_review": "审核中",
+ "blocked_with": "受阻:{{blocker}}",
+ "blocked_label": "受阻",
+ "close_board": "关闭看板",
+ "open_worker_session": "打开该同事的会话",
+ "filed_by": "由 {{creator}} 创建",
+ "done_when_line": "<label>完成标准</label> —— {{criteria}}",
+ "add_note_placeholder": "添加备注…",
+ "add_note_title": "在条目上留下备注 —— 不会改变其状态",
+ "changes_placeholder": "需要改什么?",
+ "cancel": "取消",
+ "mark_done": "标记完成",
+ "request_changes_ellipsis": "请求修改…",
+ "reopen": "重新打开",
+ "tl_filed": "创建了此条目",
+ "tl_assigned": "指派给 {{assignee}}",
+ "tl_claimed": "认领了此条目",
+ "tl_started": "开始了",
+ "tl_moved": "移至{{state}}",
+ "tl_commented": "发表了评论",
+ "wake_title": "看板动态",
+ "wake_update": "更新",
+ "wake_review_other": "{{count}} 项待审",
+ "wake_blocked_other": "{{count}} 项受阻",
+ "wake_canceled_other": "{{count}} 项已取消",
+ "wake_move_other": "{{count}} 次移动",
+ "wake_filing_other": "{{count}} 项新建",
+ "wake_claim_other": "{{count}} 次认领",
+ "wake_assignment_other": "{{count}} 项指派",
+ "wake_comment_other": "{{count}} 条评论",
+ "wake_chat_message_other": "{{count}} 条聊天消息",
+ "wake_moved": "{{actor}} 将 {{ref}} 移至 {{to}}",
+ "wake_filed": "{{actor}} 创建了 {{ref}}",
+ "wake_claimed": "{{actor}} 认领了 {{ref}}",
+ "wake_assigned": "{{ref}} 已指派给你",
+ "wake_commented": "{{actor}} 评论了 {{ref}}",
+ "wake_chat": "# 团队聊天 —— {{actor}}",
+ "wake_show_message": "显示消息",
+ "wake_show_handoff": "显示交接说明"
+ },
+ "team": {
+ "back_to_session": "返回会话",
+ "chat_tagline": "问题与共识 —— 状态见看板",
+ "chat_empty": "还没有消息。Agent 只在需要回复时才会在这里发言 —— @提及某位同事即可联系它。",
+ "you": "你",
+ "chat_placeholder": "发消息到 # 团队聊天…(以你的身份发送 —— 所有成员可见)",
+ "proposed_other": "提议团队 —— {{count}} 名成员",
+ "enable_chat": "启用 <b># 团队聊天</b>",
+ "chat_info": "用于问题与共识的群聊频道 —— @提及会唤醒被提及的同事。无论是否启用,状态都保留在看板上。",
+ "grant_note": "批准后授予负责人创建、指派与引导权限 —— 仅限本团队,可随时撤销。",
+ "not_now": "暂不",
+ "create_start": "创建团队并开始",
+ "proposed_items": "提议的工作项 —— {{count}}",
+ "items_done_when": "完成标准:",
+ "show_less": "收起",
+ "show_full_criteria": "显示完整标准",
+ "more_items_other": "+ 还有 {{count}} 项",
+ "items_grant": "回复可调整拆分;批准后将在看板上创建这些条目。",
+ "approve_items": "批准工作项"
+ },
+ "toolreq": {
+ "needs": "同事需要 <code>{{tool}}</code>",
+ "reason_line": "<label>原因:</label>“{{reason}}”",
+ "installs_with_source": "OpenWorker 会从 {{source}} 安装自己的已验证副本 —— 也可自行安装后继续。",
+ "installs": "OpenWorker 会安装自己的已验证副本 —— 也可自行安装后继续。",
+ "no_build": "OpenWorker 没有适用于本机的已验证构建 —— 需要此项检查请自行安装,或直接继续,同事会记录这一缺口。",
+ "skip": "跳过并继续",
+ "install": "安装"
+ },
+ "skills": {
+ "subtitle": "可复用的指令,同事在每个会话中都能遵循。在这里关闭即处处关闭。",
+ "confirmation": "—— 同事现在可以在每个会话中使用它。",
+ "off_note": "已处处关闭。若某个会话已经用过它,新开一个会话即可完全干净。",
+ "delete_note": "已移除。若某个会话已经用过它,新开一个会话即可完全干净。",
+ "error_generic": "出了点问题。",
+ "fallback_name": "技能",
+ "add_skill": "添加技能",
+ "door_write": "自己编写",
+ "door_write_sub": "名称、描述和指令",
+ "door_import": "导入文件",
+ "door_import_sub": "他人分享的 .zip 或 SKILL.md —— 安装前先审阅",
+ "door_ai": "用 OpenWorker 创建",
+ "door_ai_sub": "开始一个会话 —— 同事完成后会先询问,再加入你的技能",
+ "upload_aria": "上传技能压缩包",
+ "review_title": "安装前审阅",
+ "review_sub": "请阅读指令 —— 安装技能意味着同事会照着执行。",
+ "no_description": "无描述",
+ "bundled_files": "附带文件:{{files}}",
+ "install_skill": "安装技能",
+ "editor_new": "新建技能",
+ "editor_edit": "编辑 {{name}}",
+ "name_label": "名称",
+ "name_placeholder": "weekly-report",
+ "desc_label": "描述",
+ "desc_placeholder": "一句话,供同事判断何时适用",
+ "instructions_label": "指令",
+ "instructions_placeholder": "1. 收集上周的进展\n2. 撰写报告,300 字以内",
+ "save_skill": "保存技能",
+ "empty": "还没有技能 —— 点 <b>添加技能</b> 教同事第一个技能,比如“准备我的周一状态报告”。",
+ "show_folder": "显示文件夹",
+ "file_count_other": "{{count}} 个文件",
+ "edit_tip": "编辑",
+ "delete_aria": "删除 {{name}}",
+ "confirm_delete": "确认删除",
+ "enabled_aria": "{{name}} 已启用",
+ "on": "开"
+ },
+ "memory": {
+ "section_sub": "同事可以在会话之间记住关于你的有用信息。它们知道的一切都列在这里。",
+ "loading": "加载中…",
+ "toggle_title": "记住关于你的新信息",
+ "toggle_label": "记住关于我的新信息",
+ "toggle_help": "你在聊天中提到的长期偏好会被保存,用于以后的会话 —— 每次保存都有小提示,可一键撤销。关闭后不再保存新内容;下方已有的内容在你删除前仍会使用。",
+ "on_msg": "以后会话中你分享的细节会被记住,让我越来越有帮助。",
+ "off_msg": "我不再记住关于你的新信息。已知的内容会保留并继续使用 —— 想让我忘掉的,在下方删除即可。",
+ "wipe_confirm": "删除已记住的关于你的一切?\n\n此操作无法撤销。已打开的会话仍保留已知的内容 —— 新会话从零开始。",
+ "wiped_msg": "我记住的一切都已删除。新会话从零开始;已打开的会话仍保留开始时已知的内容。",
+ "learned_title": "我对你的了解",
+ "forget_all": "忘掉全部…",
+ "learned_help": "自动从你的会话中保存。有错就改 —— 或直接删除。编辑和删除只影响新会话;已打开的会话保留开始时已知的内容。",
+ "empty": "暂时没有。当你在聊天中提到长期偏好,或说“记住……”,就会显示在这里。",
+ "rules_title": "你的指令",
+ "rules_help": "同事在每个会话中都会遵循这些指令。",
+ "rules_placeholder": "我使用屏幕阅读器 —— 不要表格,描述所有图片\n日期用 DD-MM-YYYY",
+ "save": "保存",
+ "rules_saved": "已保存 —— 适用于新会话。已打开的会话保留开始时的指令。",
+ "fix_tip": "修正",
+ "delete_tip": "删除这条记忆"
+ },
+ "setup": {
+ "import_coworker": "导入同事…",
+ "manage_coworkers": "管理同事…",
+ "choose_folder": "选择文件夹",
+ "choose_another_folder": "选择其他文件夹…",
+ "choose_a_folder": "选择一个文件夹…"
+ },
+ "mcp": {
+ "preset_granola_blurb": "会议笔记与转录——用你的 Granola 账户登录。",
+ "status_off": "已关闭",
+ "status_signing_in": "登录中…",
+ "status_testing": "测试中…",
+ "status_needs_sign_in": "需要登录",
+ "status_error": "错误",
+ "status_not_tested": "未测试",
+ "tool_count_other": "{{count}} 个工具",
+ "tested_rel": "测试于 {{rel}}",
+ "group_custom": "自定义 · MCP",
+ "add_title": "添加自定义 MCP 服务器",
+ "tab_remote_url": "远程 URL",
+ "tab_json": "JSON",
+ "add_url_blurb": "连接托管的 MCP 服务器。如果需要登录,首次测试后该行会提供登录入口。",
+ "add_name_ph": "名称(显示在连接器列表中)",
+ "add_json_blurb": "粘贴服务器 JSON(名称 → 配置):",
+ "add_and_test": "添加并测试",
+ "err_name": "给服务器起个名称。",
+ "err_url": "输入服务器的完整 URL(https://…)。",
+ "err_invalid_json": "无效的 JSON:{{message}}",
+ "err_json_shape": "粘贴 `{ \"<name>\": { … } }` 对象(或完整的 mcpServers 块)。",
+ "enable_title": "启用此服务器",
+ "test_connection": "测试连接",
+ "test_desc": "启动服务器并列出其工具——不打开会话。",
+ "err_failed_connect": "连接失败",
+ "hide": "收起",
+ "show": "展开",
+ "configuration": "配置",
+ "remove_server": "移除服务器"
+ },
+ "bindmenu": {
+ "filter_placeholder": "筛选…",
+ "none": "无",
+ "this_repo": "此仓库",
+ "this_folder": "此文件夹",
+ "bound": "已绑定",
+ "no_matches": "无匹配",
+ "name_placeholder_memory": "为此记忆命名…",
+ "name_placeholder_board": "为此看板命名…",
+ "name_current_memory": "命名当前记忆…",
+ "name_current_board": "命名当前看板…",
+ "view_edit": "查看与编辑…",
+ "bind_error": "绑定失败",
+ "name_error": "命名失败"
}
}
diff --git a/surfaces/gui/src/providers/ProviderSetup.tsx b/surfaces/gui/src/providers/ProviderSetup.tsx
index 9aca2a87..1f7559c9 100644
--- a/surfaces/gui/src/providers/ProviderSetup.tsx
+++ b/surfaces/gui/src/providers/ProviderSetup.tsx
@@ -1,4 +1,6 @@
import { useEffect, useRef, useState, type ReactNode } from "react";
+import { useTranslation } from "react-i18next";
+import type { TFunction } from "i18next";
import {
codexAuthStatus,
codexSignin,
@@ -58,16 +60,17 @@ export function ProviderMark({ name, title, size = 32 }: { name: string; title:
);
}
-/** "2h ago"-style label for a provider's last completion (null when never used). */
-export function relTime(epoch?: number | null): string | null {
+/** "2h ago"-style label for a provider's last completion (null when never used).
+ * Pass a translation function to localize; omit for the legacy English fallback. */
+export function relTime(epoch?: number | null, t?: TFunction): string | null {
if (!epoch) return null;
const secs = Math.max(0, Math.floor(Date.now() / 1000 - epoch));
- if (secs < 90) return "just now";
+ if (secs < 90) return t ? t("provider.just_now") : "just now";
const mins = Math.floor(secs / 60);
- if (mins < 60) return `${mins}m ago`;
+ if (mins < 60) return t ? t("provider.minutes_ago", { count: mins }) : `${mins}m ago`;
const hrs = Math.floor(mins / 60);
- if (hrs < 48) return `${hrs}h ago`;
- return `${Math.floor(hrs / 24)}d ago`;
+ if (hrs < 48) return t ? t("provider.hours_ago", { count: hrs }) : `${hrs}h ago`;
+ return t ? t("provider.days_ago", { count: Math.floor(hrs / 24) }) : `${Math.floor(hrs / 24)}d ago`;
}
export interface ProviderSetupState {
@@ -100,6 +103,7 @@ export interface ProviderSetupState {
}
export function useProviderSetup(opts?: { onSaved?: () => void }): ProviderSetupState {
+ const { t } = useTranslation();
const [providers, setProviders] = useState<ProviderInfo[]>([]);
// null = the gallery; a provider name = that provider's key form.
const [sel, setSel] = useState<string | null>(null);
@@ -159,9 +163,9 @@ export function useProviderSetup(opts?: { onSaved?: () => void }): ProviderSetup
const runTestAndSave = async (): Promise<boolean> => {
if (!sel) return false;
setVerify({ state: "testing" });
- const res = await verifyProvider(sel, fields).catch(() => ({ ok: false, error: "unreachable" }));
+ const res = await verifyProvider(sel, fields).catch(() => ({ ok: false, error: t("provider.err_unreachable") }));
if (!res.ok) {
- setVerify({ state: "error", msg: res.error || "couldn't verify" });
+ setVerify({ state: "error", msg: res.error || t("provider.err_couldnt_verify") });
return false;
}
if (dirty || !info?.configured) await setProvider(sel, fields).catch(() => {});
@@ -224,24 +228,24 @@ export function useProviderSetup(opts?: { onSaved?: () => void }): ProviderSetup
// The card keeps just the state — the account email truncated badly at card
// width (owner-hit 2026-08-21); the detail pane shows who is signed in.
if (p.signed_in)
- return <span className="block text-[12px] text-ok font-medium truncate">✓ Signed in</span>;
- return <span className="block text-[12px] text-faint truncate">Sign in with your plan</span>;
+ return <span className="block text-[12px] text-ok font-medium truncate">{t("provider.signed_in")}</span>;
+ return <span className="block text-[12px] text-faint truncate">{t("provider.sign_in_with_plan")}</span>;
}
if (p.configured && p.needs_key) {
- const used = o?.lastUsed ? relTime(p.last_used_at) : null;
+ const used = o?.lastUsed ? relTime(p.last_used_at, t) : null;
return (
<span className="block text-[12px] text-ok font-medium truncate">
- ✓ Connected{used ? <span className="text-muted font-normal"> · used {used}</span> : ""}
+ {t("provider.connected_ok")}{used ? <span className="text-muted font-normal">{t("provider.used_suffix", { time: used })}</span> : ""}
</span>
);
}
if (!p.needs_key)
return (
<span className="block text-[12px] text-faint truncate">
- {keylessOk.has(p.name) ? <span className="text-ok font-medium">✓ Running</span> : "No key needed"}
+ {keylessOk.has(p.name) ? <span className="text-ok font-medium">{t("provider.running")}</span> : t("provider.no_key_needed")}
</span>
);
- return <span className="block text-[12px] text-faint truncate">Not set up</span>;
+ return <span className="block text-[12px] text-faint truncate">{t("provider.not_set_up")}</span>;
};
return {
@@ -295,6 +299,7 @@ export function useProviderSetup(opts?: { onSaved?: () => void }): ProviderSetup
* Signin runs server-side in the background; this polls the status route until the
* flow flips to signed-in or reports an error. Tokens never reach the GUI. */
function OAuthSignIn({ info, tp, onChanged }: { info: ProviderInfo; tp: string; onChanged: () => Promise<void> }) {
+ const { t } = useTranslation();
const [busy, setBusy] = useState(!!info.authorizing);
const [error, setError] = useState<string | null>(info.last_error || null);
const [reopenUrl, setReopenUrl] = useState<string | null>(null);
@@ -325,7 +330,7 @@ function OAuthSignIn({ info, tp, onChanged }: { info: ProviderInfo; tp: string;
const start = async () => {
setBusy(true);
setError(null);
- await codexSignin().catch(() => setError("Couldn't start the sign-in."));
+ await codexSignin().catch(() => setError(t("provider.oauth_start_error")));
void poll();
};
@@ -334,7 +339,7 @@ function OAuthSignIn({ info, tp, onChanged }: { info: ProviderInfo; tp: string;
<div className="mt-4">
<div className="flex items-center gap-2.5 rounded-xl border border-okLine bg-okSoft px-3 py-2.5">
<span className="text-[13px] text-ink min-w-0 flex-1 truncate" data-testid={`${tp}-oauth-account`}>
- ✓ Signed in{info.account ? ` as ${info.account}` : ""}
+ {info.account ? t("provider.signed_in_as", { account: info.account }) : t("provider.signed_in")}
</span>
<button
className="shrink-0 rounded-lg border border-line bg-panel px-3 py-1.5 text-[13px] text-ink hover:border-lineStrong"
@@ -344,11 +349,11 @@ function OAuthSignIn({ info, tp, onChanged }: { info: ProviderInfo; tp: string;
await onChanged();
}}
>
- Sign out
+ {t("provider.sign_out")}
</button>
</div>
<p className="text-[12px] text-faint mt-2">
- Usage draws on the plan's rolling window, not per-token billing. Sign-in stays on this computer.
+ {t("provider.oauth_plan_note")}
</p>
</div>
);
@@ -361,11 +366,11 @@ function OAuthSignIn({ info, tp, onChanged }: { info: ProviderInfo; tp: string;
disabled={busy}
data-testid={`${tp}-oauth-signin`}
>
- {busy ? "Waiting for the browser…" : "Sign in with ChatGPT"}
+ {busy ? t("provider.oauth_waiting") : t("provider.sign_in_chatgpt")}
</button>
{busy && (
<p className="text-[12px] text-faint mt-2">
- Finish signing in in the browser window.
+ {t("provider.oauth_finish_browser")}
{reopenUrl && (
<>
{" "}
@@ -373,7 +378,7 @@ function OAuthSignIn({ info, tp, onChanged }: { info: ProviderInfo; tp: string;
className="text-muted underline decoration-line underline-offset-2 hover:text-ink"
onClick={() => openExternal(reopenUrl)}
>
- Reopen the sign-in page
+ {t("provider.oauth_reopen")}
</button>
</>
)}
@@ -432,6 +437,7 @@ export function ProviderForm({
tp: string;
footer?: ReactNode;
}) {
+ const { t } = useTranslation();
const { info, sel } = ps;
const label = "block text-[12px] text-muted mt-3 mb-1";
const input =
@@ -475,7 +481,7 @@ export function ProviderForm({
className="absolute right-2 top-1/2 -translate-y-1/2 text-[11px] font-medium text-ok bg-okSoft rounded-full px-2 py-0.5 pointer-events-none"
data-testid={`${tp}-field-saved-${f.key}`}
>
- ✓ Saved
+ {t("provider.saved_pill")}
</span>
)}
{/* §39: state lives IN the field — no status lines below. */}
@@ -484,7 +490,7 @@ export function ProviderForm({
className="absolute right-2 top-1/2 -translate-y-1/2 text-[11px] font-medium text-ok bg-okSoft rounded-full px-2 py-0.5 pointer-events-none"
data-testid={`${tp}-saved-pill`}
>
- {info?.needs_key ? <>✓ Tested &amp; saved</> : <>✓ Detected</>}
+ {info?.needs_key ? t("provider.tested_saved_pill") : t("provider.detected_pill")}
</span>
)}
</div>
@@ -495,7 +501,7 @@ export function ProviderForm({
disabled={ps.verify.state === "testing" || (!ps.secretFilled && !ps.credentialed)}
data-testid={`${tp}-test`}
>
- {ps.verify.state === "testing" ? "…" : info?.needs_key ? "Test" : "Detect"}
+ {ps.verify.state === "testing" ? "…" : info?.needs_key ? t("provider.test_btn") : t("provider.detect_btn")}
</button>
)}
</div>
@@ -506,7 +512,7 @@ export function ProviderForm({
return (
<div>
<button className="text-[13px] text-muted hover:text-ink" onClick={ps.backToGallery} data-testid={`${tp}-back`}>
- ‹ All providers
+ {t("provider.all_providers")}
</button>
<div className="flex items-center gap-3 mt-3 mb-1">
<ProviderMark name={info?.name || ""} title={info?.title || ""} size={36} />
@@ -572,7 +578,7 @@ export function ProviderForm({
<button
className="mt-2.5 inline-flex items-center gap-2 rounded-lg border border-line bg-panel px-2.5 py-1.5 text-[12px] font-mono text-ink hover:border-lineStrong"
onClick={() => void navigator.clipboard?.writeText(selected.command || "")}
- title="Copy command"
+ title={t("provider.copy_command")}
data-testid={`${tp}-cmd-copy`}
>
{selected.command}
@@ -583,10 +589,10 @@ export function ProviderForm({
<div className="mt-3.5 flex items-center justify-between gap-3 border-t border-line pt-3">
{ps.savedState ? (
<span className="text-[12px] font-medium text-ok" data-testid={`${tp}-saved-pill`}>
- ✓ Tested &amp; saved
+ {t("provider.tested_saved_pill")}
</span>
) : (
- <span className="text-[12px] text-faint">Runs one read-only check, then saves.</span>
+ <span className="text-[12px] text-faint">{t("provider.test_save_hint")}</span>
)}
<button
className="shrink-0 rounded-lg border border-accent bg-accent px-4 py-1.5 text-[13px] font-medium text-white hover:brightness-105 disabled:opacity-40"
@@ -594,7 +600,7 @@ export function ProviderForm({
disabled={ps.verify.state === "testing"}
data-testid={`${tp}-test`}
>
- {ps.verify.state === "testing" ? "…" : <>Test &amp; save</>}
+ {ps.verify.state === "testing" ? "…" : t("provider.test_save_btn")}
</button>
</div>
</div>
@@ -603,24 +609,24 @@ export function ProviderForm({
{info?.needs_key && KEY_HELP[sel] && (
<p className="text-[12px] text-faint mt-2">
- No key yet?{" "}
+ {t("provider.no_key_yet")}{" "}
<button
className="text-muted underline decoration-line underline-offset-2 hover:text-ink"
onClick={() => openExternal(KEY_HELP[sel].url)}
>
- Create one at {KEY_HELP[sel].label} ↗
+ {t("provider.create_key_at", { label: KEY_HELP[sel].label })} ↗
</button>{" "}
- — takes about a minute.
+ {t("provider.takes_a_minute")}
</p>
)}
{info && !info.needs_key && info.auth !== "oauth" && (
<p className="text-[12px] text-faint mt-2">
- No API key needed — Ollama runs models on this computer.{" "}
+ {t("provider.no_key_needed_desc")}{" "}
<button
className="text-muted underline decoration-line underline-offset-2 hover:text-ink"
onClick={() => openExternal("https://ollama.com/download")}
>
- Install Ollama ↗
+ {t("provider.install_ollama")} ↗
</button>
</p>
)}
@@ -639,7 +645,7 @@ export function ProviderForm({
onClick={() => ps.setShowEndpoint(true)}
data-testid={`${tp}-endpoint-link`}
>
- Custom endpoint ⌄
+ {t("provider.custom_endpoint")} ⌄
</button>
);
return (
@@ -660,7 +666,7 @@ export function ProviderForm({
className="absolute right-2 top-1/2 -translate-y-1/2 text-[11px] font-medium text-ok bg-okSoft rounded-full px-2 py-0.5 pointer-events-none"
data-testid={`${tp}-field-saved-${ep.key}`}
>
- ✓ Saved
+ {t("provider.saved_pill")}
</span>
)}
</div>