Skip to content

an open-source alternative to the dots, bots and muses of the world, run an office of claude code/codex like agents on your laptop, sandboxes or anywhere, uses your existing subscriptions

feat(i18n): localize long-tail components (T1b)

taoooaa606c9c9d69
diff --git a/scripts/merge-i18n-fragments.cjs b/scripts/merge-i18n-fragments.cjs
new file mode 100644
index 00000000..4d1733fb
--- /dev/null
+++ b/scripts/merge-i18n-fragments.cjs
@@ -0,0 +1,68 @@
+#!/usr/bin/env node
+/* T1b fragment merge: fold fragments/g*-{en,zh}.json into locales/{en,zh-CN}.json.
+ * Fails loudly on key collisions with differing values, then verifies parity. */
+const fs = require('fs');
+const path = require('path');
+
+const FRAG = path.join(__dirname, '..', 'src', 'renderer', 'src', 'i18n', 'locales', 'fragments');
+const LOC = path.join(__dirname, '..', 'src', 'renderer', 'src', 'i18n', 'locales');
+
+function deepMerge(base, add, where) {
+ for (const [k, v] of Object.entries(add)) {
+ if (v && typeof v === 'object' && !Array.isArray(v)) {
+ if (!base[k] || typeof base[k] !== 'object' || Array.isArray(base[k])) base[k] = {};
+ deepMerge(base[k], v, `${where}.${k}`);
+ } else {
+ if (k in base && base[k] !== undefined) {
+ if (JSON.stringify(base[k]) !== JSON.stringify(v)) {
+ throw new Error(`KEY COLLISION at ${where}.${k}: "${base[k]}" vs "${v}"`);
+ }
+ continue; // identical duplicate — fine
+ }
+ base[k] = v;
+ }
+ }
+}
+
+function keys(o, p = '') {
+ return Object.entries(o).flatMap(([k, v]) => (v && typeof v === 'object' && !Array.isArray(v) ? keys(v, p + k + '.') : [p + k]));
+}
+function arrays(o, p = '') {
+ const out = [];
+ for (const [k, v] of Object.entries(o)) {
+ const q = p + k;
+ if (Array.isArray(v)) out.push([q, v.length]);
+ else if (v && typeof v === 'object') out.push(...arrays(v, q + '.'));
+ }
+ return out;
+}
+
+const en = JSON.parse(fs.readFileSync(path.join(LOC, 'en.json'), 'utf8'));
+const zh = JSON.parse(fs.readFileSync(path.join(LOC, 'zh-CN.json'), 'utf8'));
+let merged = 0;
+for (const f of fs.readdirSync(FRAG).filter((f) => f.endsWith('-en.json') || f.endsWith('-zh.json')).sort()) {
+ const frag = JSON.parse(fs.readFileSync(path.join(FRAG, f), 'utf8'));
+ const target = f.endsWith('-en.json') ? en : zh;
+ for (const [ns, body] of Object.entries(frag)) {
+ if (!target[ns]) target[ns] = {};
+ deepMerge(target[ns], body, ns);
+ }
+ merged++;
+}
+fs.writeFileSync(path.join(LOC, 'en.json'), JSON.stringify(en, null, 2) + '\n');
+fs.writeFileSync(path.join(LOC, 'zh-CN.json'), JSON.stringify(zh, null, 2) + '\n');
+
+// parity check
+const ek = new Set(keys(en)), zk = new Set(keys(zh));
+const onlyEn = [...ek].filter((k) => !zk.has(k));
+const onlyZh = [...zk].filter((k) => !ek.has(k));
+if (onlyEn.length || onlyZh.length) {
+ console.error('PARITY FAIL — onlyEn:', onlyEn, 'onlyZh:', onlyZh);
+ process.exit(1);
+}
+const ea = arrays(en), za = arrays(zh);
+for (const [p, n] of ea) {
+ const m = za.find((x) => x[0] === p);
+ if (!m || m[1] !== n) { console.error('ARRAY MISMATCH', p, n, m && m[1]); process.exit(1); }
+}
+console.log(`merged ${merged} fragment files; en/zh now ${ek.size} keys each, parity OK`);
diff --git a/src/renderer/src/components/AddAgentModal.tsx b/src/renderer/src/components/AddAgentModal.tsx
index d200f6c1..8bd5fc8d 100644
--- a/src/renderer/src/components/AddAgentModal.tsx
+++ b/src/renderer/src/components/AddAgentModal.tsx
@@ -124,7 +124,6 @@ const SECTIONS: { key: SectionKey; labelKey: string; hintKey: string }[] = [
{ key: 'engine', labelKey: 'addAgent.sections.engine.label', hintKey: 'addAgent.sections.engine.hint' },
{ key: 'briefing', labelKey: 'addAgent.sections.briefing.label', hintKey: 'addAgent.sections.briefing.hint' }
];
-];
function basename(path: string): string {
return path.split('/').filter(Boolean).pop() ?? path;
@@ -543,7 +542,6 @@ export function AddAgentModal({ onClose, config, onConfigChange }: AddAgentModal
{hireMeta.author ? <> · {tr('addAgent.byAuthor', { author: hireMeta.author })}</> : null}
{reviewProgress ? <> · {tr('addAgent.hireProgress', { current: reviewProgress.current, total: reviewProgress.total })}</> : null}
</span>
- </span>
<span>{tr('addAgent.reviewFields')}</span>
{hireMeta.commandFlags && hireMeta.commandFlags.length > 0 && (
<span style={{ display: 'flex', gap: 4, alignItems: 'baseline', flexWrap: 'wrap', marginTop: 2 }}>
diff --git a/src/renderer/src/components/AgentControlStrip.tsx b/src/renderer/src/components/AgentControlStrip.tsx
index 29795d29..bf52a042 100644
--- a/src/renderer/src/components/AgentControlStrip.tsx
+++ b/src/renderer/src/components/AgentControlStrip.tsx
@@ -99,8 +99,6 @@ export function AgentControlStrip({ agentId }: { agentId: string }) {
>
{t('agentControl.stopAfterStep')}
</span>
- </PixelButton>
- </span>
</PixelButton>
{/* Sits with them at the founder's call. It is a different KIND of
control — the two above restrain the agent, this one restrains
diff --git a/src/renderer/src/components/AgentDetailPanel.tsx b/src/renderer/src/components/AgentDetailPanel.tsx
index bee94af1..6c4c0ded 100644
--- a/src/renderer/src/components/AgentDetailPanel.tsx
+++ b/src/renderer/src/components/AgentDetailPanel.tsx
@@ -213,8 +213,6 @@ export function AgentDetailPanel({ agent }: AgentDetailPanelProps) {
: openTerminalState === 'error' ? t('agentDetail.err')
: compactHeader ? '' : t('agentDetail.open')}
</span>
- </PixelButton>
- </span>
</PixelButton>
{isReal && (
<PixelButton variant="destructive" size="sm" onClick={onKill}>
@@ -246,7 +244,6 @@ export function AgentDetailPanel({ agent }: AgentDetailPanelProps) {
<EmptyTab title={t('agentDetail.inFullscreen')}>
{t('agentDetail.fullscreenDesc')}
</EmptyTab>
- </EmptyTab>
) : (
<div style={{ flex: 1, minWidth: 0, minHeight: 0, display: 'flex', flexDirection: 'column' }}>
<div style={{ flex: 1, minHeight: 0, display: 'flex' }}>
diff --git a/src/renderer/src/components/AiEnginesSettings.tsx b/src/renderer/src/components/AiEnginesSettings.tsx
index f21c7c5c..e6e2bf52 100644
--- a/src/renderer/src/components/AiEnginesSettings.tsx
+++ b/src/renderer/src/components/AiEnginesSettings.tsx
@@ -1,4 +1,5 @@
import { useState, useEffect, type CSSProperties } from 'react';
+import { useTranslation } from 'react-i18next';
import type { HarnessConfig, AgentProvider } from '@/store/config';
import { PixelButton } from './PixelButton';
import { ProviderLogo } from './ProviderLogo';
@@ -26,7 +27,8 @@ const BACKENDS: Array<{ id: string; label: string; envVar: string }> = [
{ id: 'groq', label: 'Groq', envVar: 'GROQ_API_KEY' }
];
-/** CLI engines that take a per-provider local base-URL + default model. */
+/** CLI engines that take a per-provider local base-URL + default model. `hint`
+ * values are technical endpoint descriptions — kept English (technical data). */
const CLIS: Array<{ id: AgentProvider; label: string; hint: string }> = [
{ id: 'opencode', label: 'OpenCode', hint: 'http://localhost:11434/v1 (Ollama) — injected as a local provider' },
{ id: 'crush', label: 'Crush', hint: 'OpenAI-compatible endpoint — used as the proxy upstream' },
@@ -59,6 +61,7 @@ const headStyle: CSSProperties = {
const linkStyle: CSSProperties = { color: 'var(--cth-ink-900)', textDecoration: 'underline', cursor: 'pointer' };
export function AiEnginesSettings({ config }: { config: HarnessConfig }) {
+ const { t } = useTranslation();
// Keep the global "OpenAI key present" signal (boolean only) live so the Talk
// button's missing-key warning clears the instant the user saves their OpenAI key
// here — without it the gate only refreshes on next app start. apikey:openai is
@@ -97,17 +100,17 @@ export function AiEnginesSettings({ config }: { config: HarnessConfig }) {
if (r.ok) {
setHasKey((s) => ({ ...s, [backend]: true }));
setDraftKey((s) => ({ ...s, [backend]: '' }));
- setNote((s) => ({ ...s, [backend]: 'saved' }));
+ setNote((s) => ({ ...s, [backend]: t('aiEngines.saved') }));
// OpenAI key gates Talk — mirror presence to the store so the warning clears now.
if (backend === 'openai') setHasOpenAiKey(true);
- } else setNote((s) => ({ ...s, [backend]: r.error ?? 'failed' }));
+ } else setNote((s) => ({ ...s, [backend]: r.error ?? t('aiEngines.failed') }));
} catch (e) { setNote((s) => ({ ...s, [backend]: e instanceof Error ? e.message : String(e) })); }
};
const clearKey = async (backend: string) => {
try {
await window.cth.providerKeyClear(backend);
setHasKey((s) => ({ ...s, [backend]: false }));
- setNote((s) => ({ ...s, [backend]: 'cleared' }));
+ setNote((s) => ({ ...s, [backend]: t('aiEngines.cleared') }));
// OpenAI key gates Talk — clearing it disables Talk; reflect that immediately.
if (backend === 'openai') setHasOpenAiKey(false);
} catch { /* noop */ }
@@ -127,34 +130,32 @@ export function AiEnginesSettings({ config }: { config: HarnessConfig }) {
return (
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
<div>
- <div style={headStyle}>AI ENGINE PROVIDERS (BYOK)</div>
+ <div style={headStyle}>{t('aiEngines.providers')}</div>
<div style={{ fontSize: 12, color: 'var(--cth-ink-700)', lineHeight: '18px' }}>
- API keys + local endpoints for the OpenCode, Crush, pi.dev and Qwen engines.
- Keys are stored <strong>write-only</strong> (encrypted at rest; never shown again)
- and used only when those engines spawn. Claude Code and Codex use their own login.
+ {t('aiEngines.providersDesc')}
</div>
</div>
{/* Backend API keys (write-only) */}
<div style={{ display: 'flex', flexDirection: 'column', gap: 10 }}>
- <div style={headStyle}>API KEYS</div>
+ <div style={headStyle}>{t('aiEngines.apiKeys')}</div>
{BACKENDS.map((b) => (
<div key={b.id} style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
<label style={labelStyle}>
- {b.label} {hasKey[b.id] ? '· set ✓' : ''} <span style={{ opacity: 0.6 }}>({b.envVar})</span>
+ {b.label} {hasKey[b.id] ? `· ${t('aiEngines.setCheck')}` : ''} <span style={{ opacity: 0.6 }}>({b.envVar})</span>
</label>
<div style={{ display: 'flex', gap: 6, alignItems: 'center' }}>
<input
type="password"
autoComplete="off"
- placeholder={hasKey[b.id] ? '•••••••• (stored — type to replace)' : `paste ${b.label} key`}
+ placeholder={hasKey[b.id] ? t('aiEngines.keyStoredPlaceholder') : t('aiEngines.keyPlaceholder', { label: b.label })}
value={draftKey[b.id] ?? ''}
onChange={(e) => setDraftKey((s) => ({ ...s, [b.id]: e.target.value }))}
style={inputStyle}
/>
- <PixelButton variant="secondary" size="sm" onClick={() => saveKey(b.id)}>Save</PixelButton>
+ <PixelButton variant="secondary" size="sm" onClick={() => saveKey(b.id)}>{t('common.save')}</PixelButton>
{hasKey[b.id] && (
- <PixelButton variant="secondary" size="sm" onClick={() => clearKey(b.id)}>Clear</PixelButton>
+ <PixelButton variant="secondary" size="sm" onClick={() => clearKey(b.id)}>{t('common.delete')}</PixelButton>
)}
</div>
{note[b.id] && <div style={{ fontSize: 11, color: 'var(--cth-ink-500)' }}>{note[b.id]}</div>}
@@ -164,7 +165,7 @@ export function AiEnginesSettings({ config }: { config: HarnessConfig }) {
{/* Per-CLI local endpoint + default model */}
<div style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>
- <div style={headStyle}>LOCAL ENDPOINT · DEFAULT MODEL (PER ENGINE)</div>
+ <div style={headStyle}>{t('aiEngines.localEndpoint')}</div>
{CLIS.map((c) => (
<div key={c.id} style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
<label style={{ ...labelStyle, display: 'flex', alignItems: 'center', gap: 6 }}>
@@ -178,7 +179,7 @@ export function AiEnginesSettings({ config }: { config: HarnessConfig }) {
style={inputStyle}
/>
<input
- placeholder="default model (provider/model)"
+ placeholder={t('aiEngines.defaultModelPlaceholder')}
defaultValue={models[c.id] ?? ''}
onBlur={(e) => saveModel(c.id, e.target.value)}
style={{ ...inputStyle, maxWidth: 220 }}
@@ -188,18 +189,18 @@ export function AiEnginesSettings({ config }: { config: HarnessConfig }) {
))}
{/* Local-setup guides (ondev-c part-3) — link the two how-to blogs. */}
<div style={{ fontSize: 12, color: 'var(--cth-ink-700)', lineHeight: '17px' }}>
- Running open models? Step-by-step guides:{' '}
+ {t('aiEngines.runningOpenModels')}{' '}
<a
href={OSS_BLOG_LINKS.openModels}
onClick={(e) => { e.preventDefault(); void window.cth.openExternal(OSS_BLOG_LINKS.openModels); }}
style={linkStyle}
- >run Munder Difflin on open models</a>
+ >{t('aiEngines.runOnOpenModels')}</a>
{' '}·{' '}
<a
href={OSS_BLOG_LINKS.macMini}
onClick={(e) => { e.preventDefault(); void window.cth.openExternal(OSS_BLOG_LINKS.macMini); }}
style={linkStyle}
- >set it up on a Mac Mini</a>.
+ >{t('aiEngines.setUpMacMini')}</a>.
</div>
</div>
@@ -208,10 +209,7 @@ export function AiEnginesSettings({ config }: { config: HarnessConfig }) {
fontSize: 12, color: 'var(--cth-ink-700)', lineHeight: '17px',
padding: 8, boxShadow: 'inset 0 0 0 1px var(--cth-ink-300)', background: 'var(--cth-paper-100)'
}}>
- ⚠ In <strong>auto mode</strong> these engines run with full filesystem + shell access
- (no sandbox) — like Claude's bypass mode. Turn auto mode off (General) to make them
- ask first. Live end-to-end verification with real model calls is pending your keys / a
- local LLM.
+ {t('aiEngines.autoModeCaveat')}
</div>
</div>
);
diff --git a/src/renderer/src/components/CommandCenterPanel.tsx b/src/renderer/src/components/CommandCenterPanel.tsx
index d35fc433..9917cd4f 100644
--- a/src/renderer/src/components/CommandCenterPanel.tsx
+++ b/src/renderer/src/components/CommandCenterPanel.tsx
@@ -220,7 +220,6 @@ export function CommandCenterPanel({ agent, fullscreen = false }: { agent: Agent
>
<Icon name="code" /> {t('commandCenter.ide')}
</span>
- </span>
</PixelButton>
</div>
</div>
diff --git a/src/renderer/src/components/FileTree.tsx b/src/renderer/src/components/FileTree.tsx
index 4908ce8a..87b4c633 100644
--- a/src/renderer/src/components/FileTree.tsx
+++ b/src/renderer/src/components/FileTree.tsx
@@ -1,4 +1,5 @@
import { useCallback, useEffect, useState } from 'react';
+import { useTranslation } from 'react-i18next';
import { Icon } from './Icon';
interface DirEntry {
@@ -35,6 +36,7 @@ function fmtSize(n: number): string {
const HIDE_PATTERNS = [/^\.git$/, /^node_modules$/, /^out$/, /^dist$/];
export function FileTree({ root, activeRel, onOpenFile, onCopyPath }: FileTreeProps) {
+ const { t } = useTranslation();
const [tree, setTree] = useState<NodeState>({
rel: '', name: 'root', isDir: true, expanded: true
});
@@ -106,7 +108,7 @@ export function FileTree({ root, activeRel, onOpenFile, onCopyPath }: FileTreePr
return (
<div>
{node.children?.map(c => renderNode(c, 0))}
- {node.loading && <div style={{ padding: 8, fontSize: 12, color: 'var(--cth-ink-500)' }}>loading…</div>}
+ {node.loading && <div style={{ padding: 8, fontSize: 12, color: 'var(--cth-ink-500)' }}>{t('fileTree.loading')}</div>}
{node.error && <div style={{ padding: 8, fontSize: 12, color: 'var(--cth-coral)' }}>{node.error}</div>}
</div>
);
@@ -144,7 +146,7 @@ export function FileTree({ root, activeRel, onOpenFile, onCopyPath }: FileTreePr
}}>{node.name}</span>
<button
onClick={(e) => { e.stopPropagation(); onCopyPath(node.rel); }}
- title="Copy path to clipboard"
+ title={t('fileTree.copyPathTitle')}
style={{
padding: '0 4px',
fontSize: 10,
@@ -152,13 +154,13 @@ export function FileTree({ root, activeRel, onOpenFile, onCopyPath }: FileTreePr
color: 'var(--cth-ink-500)',
background: 'transparent', border: 'none', cursor: 'pointer'
}}
- >copy</button>
+ >{t('common.copy')}</button>
</div>
{node.isDir && node.expanded && (
<div>
{node.loading && (
<div style={{ padding: '2px 6px', paddingLeft: 24 + depth * 14, fontSize: 12, color: 'var(--cth-ink-500)' }}>
- loading…
+ {t('fileTree.loading')}
</div>
)}
{node.error && (
diff --git a/src/renderer/src/components/FullscreenTerminal.tsx b/src/renderer/src/components/FullscreenTerminal.tsx
index 366470b4..6a6c5e3b 100644
--- a/src/renderer/src/components/FullscreenTerminal.tsx
+++ b/src/renderer/src/components/FullscreenTerminal.tsx
@@ -1,5 +1,6 @@
import { useEffect, useMemo, useRef, useState } from 'react';
import { createPortal } from 'react-dom';
+import { useTranslation } from 'react-i18next';
import { PixelBadge } from './PixelBadge';
import { PixelButton } from './PixelButton';
import { PtyTerminalView } from './PtyTerminalView';
@@ -146,6 +147,7 @@ export interface FullscreenTerminalProps {
}
export function FullscreenTerminal({ config }: FullscreenTerminalProps) {
+ const { t } = useTranslation();
const agents = useStore(s => s.agents);
const restorableAgents = useStore(s => s.restorableAgents);
const fullscreenAgentId = useStore(s => s.fullscreenAgentId);
@@ -311,8 +313,8 @@ export function FullscreenTerminal({ config }: FullscreenTerminalProps) {
<div className="cth-titlebar-nodrag" style={{ marginLeft: 'auto', display: 'flex', alignItems: 'center', gap: 12 }}>
<button
onClick={toggleRoster}
- title={rosterCollapsed ? 'Show the agent list' : 'Hide the agent list — full-width terminal'}
- aria-label={rosterCollapsed ? 'Show the agent list' : 'Hide the agent list'}
+ title={rosterCollapsed ? t('fullscreenTerminal.showAgentList') : t('fullscreenTerminal.hideAgentList')}
+ aria-label={rosterCollapsed ? t('fullscreenTerminal.showAgentList') : t('fullscreenTerminal.hideAgentList')}
aria-pressed={rosterCollapsed}
style={{
display: 'inline-flex', alignItems: 'center', justifyContent: 'center',
@@ -336,8 +338,8 @@ export function FullscreenTerminal({ config }: FullscreenTerminalProps) {
// running TUI. Both entry points must tell them.
notifyThemeChangeAll(next === 'dark' ? 'dark' : 'light');
}}
- title={appThemeNow === 'dark' ? 'Switch to the light theme' : 'Switch to the dark theme'}
- aria-label="Toggle dark mode"
+ title={appThemeNow === 'dark' ? t('fullscreenTerminal.lightTheme') : t('fullscreenTerminal.darkTheme')}
+ aria-label={t('fullscreenTerminal.toggleTheme')}
style={{
display: 'inline-flex', alignItems: 'center', justifyContent: 'center',
width: 28, height: 28, padding: 0,
@@ -378,8 +380,8 @@ export function FullscreenTerminal({ config }: FullscreenTerminalProps) {
</button>
<button
onClick={() => setFullscreen(null)}
- title="Exit focus mode (Esc)"
- aria-label="Exit focus mode"
+ title={t('fullscreenTerminal.exitFullscreen')}
+ aria-label={t('fullscreenTerminal.exitFullscreen')}
style={{
display: 'inline-flex', alignItems: 'center', justifyContent: 'center',
width: 28, height: 28, padding: 0,
@@ -415,7 +417,7 @@ export function FullscreenTerminal({ config }: FullscreenTerminalProps) {
<div style={{ padding: 8, borderBottom: '1px solid var(--cth-ink-300)' }}>
<button
onClick={() => setAddAgentOpen(true)}
- title="Add agent"
+ title={t('fullscreenTerminal.addAgent')}
style={{
width: '100%', height: 32,
background: 'var(--cth-cream-100)',
@@ -428,7 +430,7 @@ export function FullscreenTerminal({ config }: FullscreenTerminalProps) {
cursor: 'pointer'
}}
>
- <Icon name="plus" /> agent
+ <Icon name="plus" /> {t('agentStrip.addAgent')}
</button>
</div>
@@ -514,10 +516,10 @@ export function FullscreenTerminal({ config }: FullscreenTerminalProps) {
onClick={restoreTeam}
disabled={restoring}
style={{ width: '100%' }}
- title={`Respawn from last session: ${restorableAgents.map((a: Agent) => a.name).join(', ')} — same ids, memory and inboxes reattach automatically`}
+ title={t('fullscreenTerminal.respawnTitle', { names: restorableAgents.map((a: Agent) => a.name).join(', ') })}
>
<span style={{ display: 'inline-flex', gap: 6, alignItems: 'center' }}>
- <Icon name="play" /> {restoring ? 'restoring…' : `restore team (${restorableAgents.length})`}
+ <Icon name="play" /> {restoring ? t('agentStrip.restoringTeam') : t('agentStrip.restoreTeam', { count: restorableAgents.length })}
</span>
</PixelButton>
)}
@@ -626,13 +628,14 @@ function shortModel(model?: string): string | null {
/** Context fullness as a 3px rail. Colour tracks pressure rather than identity —
* an agent at 85% is about to compact, and that matters more than its accent. */
function ContextBar({ tokens, limit, accent }: { tokens?: number; limit?: number; accent: string }) {
+ const { t } = useTranslation();
if (tokens === undefined || !limit) return null;
const pct = Math.max(0, Math.min(100, Math.round((tokens / limit) * 100)));
const color = pct >= 85 ? 'var(--cth-coral)' : pct >= 65 ? 'var(--cth-lemon)' : `var(--cth-${accent})`;
const k = (n: number) => (n >= 1000 ? `${Math.round(n / 1000)}k` : String(n));
return (
<div
- title={`Context: ${k(tokens)} / ${k(limit)} tokens (${pct}%)`}
+ title={t('fullscreenTerminal.contextTitle', { used: k(tokens), limit: k(limit), pct })}
style={{ display: 'flex', alignItems: 'center', gap: 5, minWidth: 0 }}
>
<span style={{
@@ -661,6 +664,7 @@ function SidebarRow({
drag: RowDrag;
scale: ReturnType<typeof rosterScale>;
}) {
+ const { t } = useTranslation();
const buttonRef = useRef<HTMLButtonElement>(null);
const noteRef = useRef<HTMLDivElement>(null);
const [notePosition, setNotePosition] = useState<{ left: number; top: number } | null>(null);
@@ -771,8 +775,8 @@ function SidebarRow({
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') { e.stopPropagation(); e.preventDefault(); toggleEditor(); }
}}
- title={agent.note ? 'Edit private note' : 'Add private note'}
- aria-label={`Edit note for ${agent.name}`}
+ title={agent.note ? t('agentCard.editNote') : t('agentCard.addNote')}
+ aria-label={t('agentCard.editNoteAria', { name: agent.name })}
style={{
flexShrink: 0, width: 20, height: 20,
display: 'inline-flex', alignItems: 'center', justifyContent: 'center',
@@ -796,8 +800,8 @@ function SidebarRow({
<span style={{
flexShrink: 0, maxWidth: '52%',
whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis'
- }} title={agent.model ? `Model: ${agent.model}` : 'Runs the CLI default model'}>
- {shortModel(agent.model) ?? 'CLI default'}
+ }} title={agent.model ? t('fullscreenTerminal.modelTitle', { model: agent.model }) : t('fullscreenTerminal.cliDefault')}>
+ {shortModel(agent.model) ?? t('fullscreenTerminal.cliDefault')}
</span>
<span style={{ flexShrink: 0, opacity: 0.5 }}>·</span>
<span style={{
@@ -882,8 +886,8 @@ function SidebarRow({
buttonRef.current?.focus();
}
}}
- placeholder="one line per bullet…"
- aria-label={`Note for ${agent.name}`}
+ placeholder={t('agentStrip.notePlaceholder')}
+ aria-label={t('agentCard.noteAria', { name: agent.name })}
style={{
width: '100%',
height: noteHeight,
@@ -912,6 +916,7 @@ function SidebarRow({
}
function Header({ agent, onEdit }: { agent: Agent; onEdit: () => void }) {
+ const { t } = useTranslation();
const typing = useHasTerminalDraft(agent.ptyId);
const archiveAgent = useStore((st) => st.archiveAgent);
const [openState, setOpenState] = useState<'idle' | 'opening' | 'ok' | 'error'>('idle');
@@ -933,7 +938,7 @@ function Header({ agent, onEdit }: { agent: Agent; onEdit: () => void }) {
* button would read as "restart Michael" while looking like "close". */
const onKill = async () => {
if (!agent.ptyId) return;
- if (!confirm(`Close ${agent.name}? The PTY process will terminate and the agent is archived (kept in history, off the floor).`)) return;
+ if (!confirm(t('agentDetail.killConfirm', { name: agent.name }))) return;
await window.cth.killPty(agent.ptyId);
disposeTerminal(agent.ptyId);
// archiveAgent re-homes focus mode to the next agent, and only leaves it when
@@ -989,11 +994,11 @@ function Header({ agent, onEdit }: { agent: Agent; onEdit: () => void }) {
<PixelButton variant="secondary" size="sm" onClick={() => useStore.getState().setIdeOpen(true, agent.id)}>
<span
className="cth-tip cth-tip-wrap"
- data-tip={`Open the IDE: browse and edit files in ${agent.name}'s workspace, and see their uncommitted changes as a diff.`}
- aria-label="Open the IDE"
+ data-tip={t('fullscreenTerminal.ideTip', { name: agent.name })}
+ aria-label={t('fullscreenTerminal.openIdeAria')}
style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}
>
- <Icon name="code" /> IDE
+ <Icon name="code" /> {t('commandCenter.ide')}
</span>
</PixelButton>
{/* Voice toggle is ALWAYS reachable in fullscreen — it controls Michael (the
@@ -1005,12 +1010,12 @@ function Header({ agent, onEdit }: { agent: Agent; onEdit: () => void }) {
<PixelButton variant="secondary" size="sm" onClick={openTerminal} disabled={openState === 'opening'}>
<span
className="cth-tip cth-tip-wrap"
- data-tip={`Open your system terminal app in ${agent.worktreePath || agent.cwd} — a normal shell in this agent's folder, separate from the agent's own terminal.`}
- aria-label="Open a system terminal in this agent's folder"
+ data-tip={t('fullscreenTerminal.openTerminalTip', { cwd: agent.worktreePath || agent.cwd })}
+ aria-label={t('fullscreenTerminal.openTerminalAria')}
style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}
>
<Icon name="terminal" />
- {openState === 'opening' ? '...' : openState === 'ok' ? 'ok' : openState === 'error' ? 'err' : 'terminal'}
+ {openState === 'opening' ? t('agentDetail.opening') : openState === 'ok' ? t('agentDetail.ok') : openState === 'error' ? t('agentDetail.err') : t('agentDetail.open')}
</span>
</PixelButton>
{/* The badge is a STATUS, not a button, but it sits in a row of them.
@@ -1031,7 +1036,7 @@ function Header({ agent, onEdit }: { agent: Agent; onEdit: () => void }) {
24px box — the button measured the same as its neighbours while
reading taller than them. */}
<span
- title={`Close ${agent.name} — ends the process and archives the agent`}
+ title={t('fullscreenTerminal.closeAgent', { name: agent.name })}
style={{ display: 'inline-flex', alignItems: 'center', lineHeight: 0 }}
>
<Icon name="x" />
diff --git a/src/renderer/src/components/GitTab.tsx b/src/renderer/src/components/GitTab.tsx
index 1191ddb2..bc0f29ef 100644
--- a/src/renderer/src/components/GitTab.tsx
+++ b/src/renderer/src/components/GitTab.tsx
@@ -1,4 +1,6 @@
import { useEffect, useState } from 'react';
+import { useTranslation } from 'react-i18next';
+import type { TFunction } from 'i18next';
import { CommitGraph } from './git/CommitGraph';
import { PixelButton } from './PixelButton';
import { Icon } from './Icon';
@@ -19,13 +21,13 @@ export interface GitTabProps {
cwd: string;
}
-function statusLabel(code: string): string {
- return code === 'M' ? 'modified'
- : code === 'A' ? 'added'
- : code === 'D' ? 'deleted'
- : code === 'R' ? 'renamed'
- : code === '?' ? 'untracked'
- : code === 'U' ? 'unmerged'
+function statusLabelKey(code: string): string {
+ return code === 'M' ? 'gitTab.modified'
+ : code === 'A' ? 'gitTab.added'
+ : code === 'D' ? 'gitTab.deleted'
+ : code === 'R' ? 'gitTab.renamed'
+ : code === '?' ? 'gitTab.untracked'
+ : code === 'U' ? 'gitTab.unmerged'
: code === ' ' ? '' : code;
}
@@ -39,6 +41,7 @@ function statusColor(code: string): string {
}
export function GitTab({ cwd }: GitTabProps) {
+ const { t } = useTranslation();
const [isRepo, setIsRepo] = useState<boolean | null>(null);
const [branch, setBranch] = useState<string | null>(null);
const [detached, setDetached] = useState(false);
@@ -92,7 +95,7 @@ export function GitTab({ cwd }: GitTabProps) {
padding: 16, textAlign: 'center', color: 'var(--cth-ink-500)',
fontFamily: 'var(--cth-font-ui)', fontSize: 14
}}>
- Not a git repo.<br />Run <code style={{ fontFamily: 'var(--cth-font-mono)' }}>git init</code> in the agent's terminal.
+ {t('gitTab.notARepo')}<br />{t('gitTab.notARepoHint')}
</div>
);
}
@@ -118,7 +121,7 @@ export function GitTab({ cwd }: GitTabProps) {
boxShadow: 'inset 0 0 0 1px var(--cth-ink-300)',
color: 'var(--cth-ink-900)'
}}>
- {detached ? 'DETACHED HEAD' : (branch ?? '—')}
+ {detached ? t('gitTab.detachedHead') : (branch ?? '—')}
</span>
{upstream && (
<span style={{ fontSize: 12, color: 'var(--cth-ink-500)' }}>
@@ -127,7 +130,7 @@ export function GitTab({ cwd }: GitTabProps) {
)}
<div style={{ marginLeft: 'auto' }}>
<PixelButton variant="ghost" size="sm" onClick={refresh} disabled={loading}>
- {loading ? '...' : 'refresh'}
+ {loading ? '...' : t('gitTab.refresh')}
</PixelButton>
</div>
</div>
@@ -145,16 +148,16 @@ export function GitTab({ cwd }: GitTabProps) {
{/* Body — scrollable, contains status + branches + graph */}
<div style={{ flex: 1, minHeight: 0, overflow: 'auto' }}>
{/* Status */}
- <Section title="status">
+ <Section title={t('gitTab.sectionStatus')}>
{status && (
<>
- <StatusGroup label="staged" entries={status.staged.map(e => ({ ...e, code: e.index }))} />
- <StatusGroup label="changes" entries={status.unstaged.map(e => ({ ...e, code: e.worktree }))} />
- <StatusGroup label="untracked" entries={status.untracked.map(p => ({ path: p, code: '?' }))} />
+ <StatusGroup label={t('gitTab.staged')} entries={status.staged.map(e => ({ ...e, code: e.index }))} />
+ <StatusGroup label={t('gitTab.changes')} entries={status.unstaged.map(e => ({ ...e, code: e.worktree }))} />
+ <StatusGroup label={t('gitTab.untracked')} entries={status.untracked.map(p => ({ path: p, code: '?' }))} />
{status.staged.length === 0 && status.unstaged.length === 0 && status.untracked.length === 0 && (
<div style={{
padding: '4px 12px', color: 'var(--cth-ink-500)', fontSize: 13
- }}>working tree clean</div>
+ }}>{t('gitTab.clean')}</div>
)}
</>
)}
@@ -162,7 +165,7 @@ export function GitTab({ cwd }: GitTabProps) {
{/* Branches */}
{branches && (branches.local.length > 0 || branches.remote.length > 0) && (
- <Section title="branches">
+ <Section title={t('gitTab.sectionBranches')}>
<div style={{ padding: '0 8px 8px', display: 'flex', flexWrap: 'wrap', gap: 4 }}>
{branches.local.map(b => (
<span key={`l-${b}`} style={{
@@ -189,9 +192,9 @@ export function GitTab({ cwd }: GitTabProps) {
)}
{/* Graph */}
- <Section title="log">
+ <Section title={t('gitTab.sectionLog')}>
{log.length > 0 ? <CommitGraph commits={log} currentBranch={branch} /> : (
- <div style={{ padding: 12, color: 'var(--cth-ink-500)', fontSize: 12 }}>no commits yet</div>
+ <div style={{ padding: 12, color: 'var(--cth-ink-500)', fontSize: 12 }}>{t('gitTab.noCommits')}</div>
)}
</Section>
</div>
@@ -219,6 +222,7 @@ function StatusGroup({ label, entries }: {
label: string;
entries: Array<{ path: string; code: string }>;
}) {
+ const { t } = useTranslation();
if (entries.length === 0) return null;
return (
<div style={{ padding: '4px 0' }}>
@@ -242,10 +246,12 @@ function StatusGroup({ label, entries }: {
flex: 1, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis',
fontFamily: 'var(--cth-font-mono)', fontSize: 13
}} title={e.path}>{e.path}</span>
- <span style={{ fontSize: 11, color: 'var(--cth-ink-500)' }}>{statusLabel(e.code)}</span>
+ <span style={{ fontSize: 11, color: 'var(--cth-ink-500)' }}>
+ {statusLabelKey(e.code) ? t(statusLabelKey(e.code)) : ''}
+ </span>
<button
onClick={() => navigator.clipboard.writeText(e.path).catch(() => {})}
- title="Copy path"
+ title={t('gitTab.copyPath')}
style={{
padding: 0, background: 'transparent', border: 'none',
cursor: 'pointer', color: 'var(--cth-ink-500)'
diff --git a/src/renderer/src/components/IntegrationsRegistry.tsx b/src/renderer/src/components/IntegrationsRegistry.tsx
index c0850028..1620e467 100644
--- a/src/renderer/src/components/IntegrationsRegistry.tsx
+++ b/src/renderer/src/components/IntegrationsRegistry.tsx
@@ -1,4 +1,5 @@
import { useEffect, useState, type CSSProperties } from 'react';
+import { useTranslation } from 'react-i18next';
import { authTypeNeedsSecret as needsSecret } from '@shared/integrations';
import { PixelButton } from './PixelButton';
import {
@@ -94,6 +95,7 @@ function draftFromRecord(r: IntegrationRecordView): Draft {
}
export function IntegrationsRegistry() {
+ const { t: tr } = useTranslation();
const [templates, setTemplates] = useState<IntegrationTemplate[]>([]);
const [records, setRecords] = useState<IntegrationRecordView[]>([]);
@@ -135,14 +137,14 @@ export function IntegrationsRegistry() {
const patch = (p: Partial<Draft>) => setDraft((d) => (d ? { ...d, ...p } : d));
const validate = (d: Draft): string | null => {
- if (!d.label.trim()) return 'Give it a label.';
- if (!slugify(d.id || d.label)) return 'Could not derive a valid id from the label.';
+ if (!d.label.trim()) return tr('integrations.errLabel');
+ if (!slugify(d.id || d.label)) return tr('integrations.errId');
if (d.kind === 'custom-rest') {
const u = d.baseUrl.trim();
- if (!u) return 'Base URL is required.';
- if (!/^https:\/\//.test(u) && !/^http:\/\/(127\.0\.0\.1|localhost|\[::1\])(:\d+)?(\/|$)/.test(u)) return 'Base URL must be https:// (or http://127.0.0.1 / localhost for a local target).';
+ if (!u) return tr('integrations.errBaseUrl');
+ if (!/^https:\/\//.test(u) && !/^http:\/\/(127\.0\.0\.1|localhost|\[::1\])(:\d+)?(\/|$)/.test(u)) return tr('integrations.errBaseUrlFormat');
}
- if (d.authType === 'header' && !/^[A-Za-z0-9-]{1,64}$/.test(d.authHeader.trim())) return 'Header name must be 1–64 chars of A–Z, 0–9, or "-".';
+ if (d.authType === 'header' && !/^[A-Za-z0-9-]{1,64}$/.test(d.authHeader.trim())) return tr('integrations.errHeader');
return null;
};
@@ -170,34 +172,36 @@ export function IntegrationsRegistry() {
try {
const secret = draft.secret.trim().length > 0 ? draft.secret : undefined;
const res = await integrationsClient.save(recordFromDraft(draft, Date.now()), secret);
- if (!res.ok) { setErr(res.error || 'Could not save.'); return; }
+ if (!res.ok) { setErr(res.error || tr('integrations.couldNotSave')); return; }
await refresh();
- flash(draft.isNew ? 'Integration added.' : 'Integration updated.');
+ flash(draft.isNew ? tr('integrations.added') : tr('integrations.updated'));
goList();
- } catch { setErr('Could not save.'); }
+ } catch { setErr(tr('integrations.couldNotSave')); }
finally { setBusy(false); }
};
const onRemove = async (r: IntegrationRecordView) => {
setBusy(true);
- try { await integrationsClient.remove(r.id); setRowTest((m) => { const n = { ...m }; delete n[r.id]; return n; }); await refresh(); flash(`Removed “${r.label}”.`); }
- catch { flash('Could not remove.'); }
+ try { await integrationsClient.remove(r.id); setRowTest((m) => { const n = { ...m }; delete n[r.id]; return n; }); await refresh(); flash(tr('integrations.removed', { label: r.label })); }
+ catch { flash(tr('integrations.couldNotRemove')); }
finally { setBusy(false); }
};
- const fmtTest = (t: TestResult) => t.ok ? `✓ Connected${t.status ? ` (${t.status})` : ''}` : `✕ ${t.error || 'Failed'}${t.status ? ` (${t.status})` : ''}`;
+ const fmtTest = (t: TestResult) => t.ok
+ ? (t.status ? tr('integrations.connectedWith', { status: t.status }) : tr('integrations.connected'))
+ : (t.status ? `${tr('integrations.failed')} ${t.error || ''} (${t.status})` : `${tr('integrations.failed')} ${t.error || ''}`);
const onTestRow = async (r: IntegrationRecordView) => {
setTestingId(r.id);
try { const res = await integrationsClient.test(r.id); setRowTest((m) => ({ ...m, [r.id]: res })); }
- catch { setRowTest((m) => ({ ...m, [r.id]: { ok: false, error: 'Test failed to run.' } })); }
+ catch { setRowTest((m) => ({ ...m, [r.id]: { ok: false, error: tr('integrations.testFailed') } })); }
finally { setTestingId(null); }
};
const onTestCfg = async () => {
if (!draft || draft.isNew) return;
setTesting(true); setCfgTest(null);
try { setCfgTest(await integrationsClient.test(draft.id)); }
- catch { setCfgTest({ ok: false, error: 'Test failed to run.' }); }
+ catch { setCfgTest({ ok: false, error: tr('integrations.testFailed') }); }
finally { setTesting(false); }
};
@@ -205,10 +209,10 @@ export function IntegrationsRegistry() {
if (view === 'gallery') {
return (
<div style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>
- <button type="button" onClick={goList} style={linkBtn}>← Integrations</button>
+ <button type="button" onClick={goList} style={linkBtn}>{tr('integrations.backToList')}</button>
<div>
- <div style={{ ...dispLabel, marginBottom: 4 }}>Pick a template</div>
- <span style={subText}>Choose what you’re connecting. The template sets the defaults. Pick <b>Custom REST</b> for anything not listed.</span>
+ <div style={{ ...dispLabel, marginBottom: 4 }}>{tr('integrations.pickTemplate')}</div>
+ <span style={subText}>{tr('integrations.galleryDesc')}</span>
</div>
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, minmax(0, 1fr))', gap: 8 }}>
{templates.map((t) => {
@@ -223,15 +227,15 @@ export function IntegrationsRegistry() {
<Glyph mono={g.mono} bg={g.bg} />
<div style={{ display: 'flex', flexDirection: 'column', gap: 2, minWidth: 0, overflowWrap: 'anywhere' }}>
<span style={{ fontSize: 12, lineHeight: '17px', color: 'var(--cth-ink-900)', fontWeight: 600 }}>{t.label}</span>
- <span style={hint}>{t.secretHelp || (t.kind === 'custom-rest' ? 'Any HTTP API' : '')}</span>
+ <span style={hint}>{t.secretHelp || (t.kind === 'custom-rest' ? tr('integrations.anyHttpApi') : '')}</span>
</div>
</button>
);
})}
</div>
<div style={{ display: 'flex', gap: 8, justifyContent: 'flex-end' }}>
- <PixelButton variant="secondary" size="sm" onClick={goList}>cancel</PixelButton>
- <PixelButton variant="primary" size="sm" onClick={continueFromGallery} disabled={!picked}>continue →</PixelButton>
+ <PixelButton variant="secondary" size="sm" onClick={goList}>{tr('common.cancel')}</PixelButton>
+ <PixelButton variant="primary" size="sm" onClick={continueFromGallery} disabled={!picked}>{tr('integrations.continue')} →</PixelButton>
</div>
</div>
);
@@ -246,51 +250,51 @@ export function IntegrationsRegistry() {
const isUsable = usable(draft);
return (
<div style={{ display: 'flex', flexDirection: 'column', gap: 14 }}>
- <button type="button" onClick={draft.isNew ? startAdd : goList} style={linkBtn}>{draft.isNew ? '← Templates' : '← Integrations'}</button>
+ <button type="button" onClick={draft.isNew ? startAdd : goList} style={linkBtn}>{draft.isNew ? tr('integrations.backToTemplates') : tr('integrations.backToList')}</button>
<div style={{ display: 'flex', alignItems: 'center', gap: 12, padding: 12, background: 'var(--cth-cream-100)', boxShadow: 'inset 0 0 0 1px var(--cth-ink-300)' }}>
<Glyph mono={g.mono} bg={g.bg} lg />
<div style={{ display: 'flex', flexDirection: 'column', gap: 2 }}>
<span style={{ fontSize: 13, lineHeight: '18px', fontWeight: 600, color: 'var(--cth-ink-900)' }}>{tpl?.label ?? draft.kind}</span>
- <span style={hint}>{needsSecret(draft.authType) ? `Needs a ${secretLabel.toLowerCase()}` : 'Public API — no secret needed'}</span>
+ <span style={hint}>{needsSecret(draft.authType) ? tr('integrations.needsSecret', { label: secretLabel.toLowerCase() }) : tr('integrations.publicApi')}</span>
</div>
</div>
{/* Label */}
<label style={{ display: 'flex', flexDirection: 'column', gap: 5 }}>
- <span style={fieldLabel}>Label</span>
+ <span style={fieldLabel}>{tr('integrations.label')}</span>
<input value={draft.label} onChange={(e) => patch({ label: e.target.value, ...(draft.isNew ? { id: slugify(e.target.value) } : {}) })} placeholder={`e.g. ${tpl?.label ?? 'My API'} (prod)`} style={inputStyle} />
- <span style={hint}>Shown in your list. Id: <code style={{ fontFamily: 'var(--cth-font-mono)' }}>{slugify(draft.id || draft.label) || '—'}</code>{draft.isNew ? '' : ' (fixed)'}</span>
+ <span style={hint}>{tr('integrations.labelHint')}: <code style={{ fontFamily: 'var(--cth-font-mono)' }}>{slugify(draft.id || draft.label) || '—'}</code>{draft.isNew ? '' : ` (${tr('integrations.fixed')})`}</span>
</label>
{/* Base URL — editable for custom-rest, fixed for presets */}
<label style={{ display: 'flex', flexDirection: 'column', gap: 5 }}>
- <span style={fieldLabel}>Base URL</span>
+ <span style={fieldLabel}>{tr('integrations.baseUrl')}</span>
<input value={draft.baseUrl} onChange={(e) => patch({ baseUrl: e.target.value })} placeholder="https://api.example.com" readOnly={draft.kind !== 'custom-rest'} style={{ ...inputStyle, fontFamily: 'var(--cth-font-mono)', opacity: draft.kind !== 'custom-rest' ? 0.7 : 1 }} />
- {draft.kind !== 'custom-rest' && <span style={hint}>Set by the {tpl?.label ?? 'preset'} template.</span>}
+ {draft.kind !== 'custom-rest' && <span style={hint}>{tr('integrations.baseUrlHint', { label: tpl?.label ?? tr('integrations.preset') })}</span>}
</label>
{/* Auth type — selectable only for custom-rest */}
{draft.kind === 'custom-rest' ? (
<label style={{ display: 'flex', flexDirection: 'column', gap: 5, maxWidth: 260 }}>
- <span style={fieldLabel}>Authentication</span>
+ <span style={fieldLabel}>{tr('integrations.authentication')}</span>
<select value={draft.authType} onChange={(e) => patch({ authType: e.target.value as IntegrationAuthType })} style={{ ...inputStyle, fontFamily: 'var(--cth-font-mono)' }}>
{CUSTOM_AUTH.map((a) => <option key={a} value={a}>{AUTH_LABEL[a]}</option>)}
</select>
</label>
) : (
<div style={{ display: 'flex', flexDirection: 'column', gap: 5 }}>
- <span style={fieldLabel}>Authentication</span>
- <span style={hint}>{AUTH_LABEL[draft.authType]} (set by template)</span>
+ <span style={fieldLabel}>{tr('integrations.authentication')}</span>
+ <span style={hint}>{AUTH_LABEL[draft.authType]} ({tr('integrations.setByTemplate')})</span>
</div>
)}
{/* Custom header name (header auth only) */}
{draft.authType === 'header' && (
<label style={{ display: 'flex', flexDirection: 'column', gap: 5, maxWidth: 320 }}>
- <span style={fieldLabel}>Header name</span>
+ <span style={fieldLabel}>{tr('integrations.headerName')}</span>
<input value={draft.authHeader} onChange={(e) => patch({ authHeader: e.target.value })} placeholder="X-Api-Key" style={{ ...inputStyle, fontFamily: 'var(--cth-font-mono)' }} />
- <span style={hint}>The secret is sent as <code style={{ fontFamily: 'var(--cth-font-mono)' }}>{(draft.authHeader.trim() || 'X-Header')}: &lt;secret&gt;</code>.</span>
+ <span style={hint}>{tr('integrations.headerHint', { header: draft.authHeader.trim() || 'X-Header' })}</span>
</label>
)}
@@ -300,17 +304,17 @@ export function IntegrationsRegistry() {
<span style={fieldLabel}>{secretLabel}</span>
{showSavedPill ? (
<div style={{ display: 'flex', gap: 6, alignItems: 'center' }}>
- <span style={{ fontFamily: 'var(--cth-font-mono)', fontSize: 12, color: 'var(--cth-ink-500)', background: 'var(--cth-paper-100)', boxShadow: 'inset 0 0 0 1px var(--cth-ink-300)', padding: '6px 10px', letterSpacing: 2 }}>•••••••• saved</span>
- <PixelButton variant="secondary" size="sm" onClick={() => { setReplacing(true); setShowSecret(false); patch({ secret: '' }); }}>Replace key</PixelButton>
+ <span style={{ fontFamily: 'var(--cth-font-mono)', fontSize: 12, color: 'var(--cth-ink-500)', background: 'var(--cth-paper-100)', boxShadow: 'inset 0 0 0 1px var(--cth-ink-300)', padding: '6px 10px', letterSpacing: 2 }}>•••••••• {tr('integrations.saved')}</span>
+ <PixelButton variant="secondary" size="sm" onClick={() => { setReplacing(true); setShowSecret(false); patch({ secret: '' }); }}>{tr('integrations.replaceKey')}</PixelButton>
</div>
) : (
<>
<div style={{ display: 'flex', gap: 6 }}>
- <input type={showSecret ? 'text' : 'password'} value={draft.secret} onChange={(e) => patch({ secret: e.target.value })} placeholder={`Paste your ${secretLabel.toLowerCase()}`} autoComplete="off" style={{ ...inputStyle, fontFamily: 'var(--cth-font-mono)' }} />
- <PixelButton variant="secondary" size="sm" onClick={() => setShowSecret((s) => !s)} disabled={!draft.secret}>{showSecret ? 'hide' : 'show'}</PixelButton>
+ <input type={showSecret ? 'text' : 'password'} value={draft.secret} onChange={(e) => patch({ secret: e.target.value })} placeholder={`${tr('integrations.pasteYour')} ${secretLabel.toLowerCase()}`} autoComplete="off" style={{ ...inputStyle, fontFamily: 'var(--cth-font-mono)' }} />
+ <PixelButton variant="secondary" size="sm" onClick={() => setShowSecret((s) => !s)} disabled={!draft.secret}>{showSecret ? tr('common.hide') : tr('common.show')}</PixelButton>
</div>
<div style={{ display: 'flex', gap: 6, alignItems: 'flex-start', padding: '7px 9px', background: 'var(--cth-cream-100)', boxShadow: 'inset 0 0 0 1px var(--cth-ink-100, var(--cth-ink-300))', ...hint }}>
- 🔒&nbsp;<span><b style={{ color: 'var(--cth-ink-700)' }}>Write-only.</b> Encrypted in the main process and never shown again. To change it, paste a new key — the old one can’t be read back.{!draft.isNew && draft.hasSecret ? ' Leave blank to keep the saved key.' : ''}</span>
+ 🔒&nbsp;<span><b style={{ color: 'var(--cth-ink-700)' }}>{tr('integrations.writeOnly')}.</b> {tr('integrations.secretDesc')}{!draft.isNew && draft.hasSecret ? ` ${tr('integrations.blankKeepsKey')}` : ''}</span>
</div>
{tpl?.secretHelp && <span style={hint}>{tpl.secretHelp}</span>}
</>
@@ -320,28 +324,28 @@ export function IntegrationsRegistry() {
{/* Enabled gate + worker availability */}
<div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>
- <span style={fieldLabel}>Availability</span>
+ <span style={fieldLabel}>{tr('integrations.availability')}</span>
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
- <PixelButton variant={draft.enabled ? 'primary' : 'secondary'} size="sm" onClick={() => patch({ enabled: !draft.enabled })}>{draft.enabled ? 'enabled' : 'disabled'}</PixelButton>
- <span style={hint}>{isUsable ? 'Available to all workers.' : needsSecret(draft.authType) && !(draft.hasSecret || draft.secret.trim()) ? 'Add a secret and enable to make it available.' : draft.enabled ? 'Ready once saved.' : 'Disabled — no worker can use it.'}</span>
+ <PixelButton variant={draft.enabled ? 'primary' : 'secondary'} size="sm" onClick={() => patch({ enabled: !draft.enabled })}>{draft.enabled ? tr('integrations.enabled') : tr('integrations.disabled')}</PixelButton>
+ <span style={hint}>{isUsable ? tr('integrations.availableToAll') : needsSecret(draft.authType) && !(draft.hasSecret || draft.secret.trim()) ? tr('integrations.addSecretToEnable') : draft.enabled ? tr('integrations.readyOnceSaved') : tr('integrations.disabledNoUse')}</span>
</div>
- <span style={hint}>v1 grants every enabled integration to all workers. Per-worker scoping is coming.</span>
+ <span style={hint}>{tr('integrations.v1Note')}</span>
</div>
{/* Test connection (saved integrations only — broker probes by id) */}
<div style={{ display: 'flex', flexDirection: 'column', gap: 5 }}>
- <span style={fieldLabel}>Test connection</span>
+ <span style={fieldLabel}>{tr('integrations.testConnection')}</span>
<div style={{ display: 'flex', gap: 8, alignItems: 'center', flexWrap: 'wrap' }}>
- <PixelButton variant="secondary" size="sm" onClick={() => { void onTestCfg(); }} disabled={draft.isNew || testing}>{testing ? 'testing…' : 'Test connection'}</PixelButton>
+ <PixelButton variant="secondary" size="sm" onClick={() => { void onTestCfg(); }} disabled={draft.isNew || testing}>{testing ? tr('integrations.testing') : tr('integrations.testConnection')}</PixelButton>
{cfgTest && <span style={{ fontSize: 12, color: cfgTest.ok ? 'var(--cth-mint-700, #1f7a4d)' : 'var(--cth-danger, #6E1423)' }}>{fmtTest(cfgTest)}</span>}
</div>
- <span style={hint}>{draft.isNew ? 'Save the integration first, then test the live connection.' : 'Runs a live read-only probe against the base URL with the stored secret.'}</span>
+ <span style={hint}>{draft.isNew ? tr('integrations.testAfterSave') : tr('integrations.testLiveDesc')}</span>
</div>
<div style={{ display: 'flex', gap: 8, justifyContent: 'flex-end', alignItems: 'center' }}>
{(err || note) && <span style={{ marginRight: 'auto', fontSize: 12, color: err ? 'var(--cth-danger, #6E1423)' : 'var(--cth-ink-500)' }}>{err || note}</span>}
- <PixelButton variant="secondary" size="sm" onClick={goList} disabled={busy}>cancel</PixelButton>
- <PixelButton variant="primary" size="sm" onClick={() => { void onSave(); }} disabled={busy}>{busy ? '…' : draft.isNew ? 'Save integration' : 'Save changes'}</PixelButton>
+ <PixelButton variant="secondary" size="sm" onClick={goList} disabled={busy}>{tr('common.cancel')}</PixelButton>
+ <PixelButton variant="primary" size="sm" onClick={() => { void onSave(); }} disabled={busy}>{busy ? '…' : draft.isNew ? tr('integrations.saveIntegration') : tr('integrations.saveChanges')}</PixelButton>
</div>
</div>
);
@@ -353,29 +357,29 @@ export function IntegrationsRegistry() {
<div style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>
<div style={{ display: 'flex', alignItems: 'flex-start', justifyContent: 'space-between', gap: 16 }}>
<div style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
- <div style={dispLabel}>Integrations</div>
- <span style={{ ...subText, maxWidth: 440 }}>Connect outside tools so your agents can read and act on them. Secrets are stored encrypted in the main process and never shown again.</span>
+ <div style={dispLabel}>{tr('integrations.title')}</div>
+ <span style={{ ...subText, maxWidth: 440 }}>{tr('integrations.titleDesc')}</span>
</div>
- {records.length > 0 && <PixelButton variant="primary" size="sm" onClick={startAdd} disabled={busy || templates.length === 0}>+ add integration</PixelButton>}
+ {records.length > 0 && <PixelButton variant="primary" size="sm" onClick={startAdd} disabled={busy || templates.length === 0}>+ {tr('integrations.addIntegration')}</PixelButton>}
</div>
{records.length === 0 ? (
<div style={{ padding: 24, textAlign: 'center', background: 'var(--cth-paper-100)', boxShadow: 'inset 0 0 0 1px var(--cth-ink-300)' }}>
- <p style={{ margin: '0 0 12px', fontSize: 12, lineHeight: '18px', color: 'var(--cth-ink-500)' }}>No integrations yet. Connect GitHub or a custom REST API so your agents can use it.</p>
- <PixelButton variant="primary" size="sm" onClick={startAdd} disabled={templates.length === 0}>+ add your first integration</PixelButton>
+ <p style={{ margin: '0 0 12px', fontSize: 12, lineHeight: '18px', color: 'var(--cth-ink-500)' }}>{tr('integrations.empty')}</p>
+ <PixelButton variant="primary" size="sm" onClick={startAdd} disabled={templates.length === 0}>+ {tr('integrations.addFirst')}</PixelButton>
</div>
) : (
<>
- <span style={hint}>{records.length} integration{records.length === 1 ? '' : 's'} · {usableCount} available to workers</span>
+ <span style={hint}>{tr('integrations.count', { count: records.length, usable: usableCount })}</span>
<div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
{records.map((r) => {
const g = glyphFor(r.kind, r.label);
const tpl = templates.find((t) => t.kind === r.kind);
const st = !r.enabled
- ? { dot: '○', color: 'var(--cth-ink-500)', text: 'Disabled' }
+ ? { dot: '○', color: 'var(--cth-ink-500)', text: tr('integrations.disabled') }
: needsSecret(r.authType) && !r.hasSecret
- ? { dot: '▲', color: 'var(--cth-danger, #6E1423)', text: 'Needs secret' }
- : { dot: '●', color: 'var(--cth-mint-700, #1f7a4d)', text: 'Enabled' };
+ ? { dot: '▲', color: 'var(--cth-danger, #6E1423)', text: tr('integrations.needsSecretShort') }
+ : { dot: '●', color: 'var(--cth-mint-700, #1f7a4d)', text: tr('integrations.enabled') };
const rt = rowTest[r.id];
return (
<div key={r.id} style={{ display: 'flex', flexDirection: 'column', gap: 6, padding: 10, background: 'var(--cth-paper-100)', boxShadow: 'inset 0 0 0 1px var(--cth-ink-300)' }}>
@@ -387,14 +391,14 @@ export function IntegrationsRegistry() {
</div>
<span style={{ display: 'inline-flex', alignItems: 'center', gap: 5, fontSize: 12, color: st.color, whiteSpace: 'nowrap' }}><span style={{ fontSize: 10 }}>{st.dot}</span> {st.text}</span>
<div style={{ display: 'flex', gap: 6, flexShrink: 0 }}>
- <PixelButton variant="secondary" size="sm" onClick={() => { void onTestRow(r); }} disabled={busy || testingId === r.id}>{testingId === r.id ? '…' : 'test'}</PixelButton>
- <PixelButton variant="ghost" size="sm" onClick={() => startEdit(r)} disabled={busy}>edit</PixelButton>
+ <PixelButton variant="secondary" size="sm" onClick={() => { void onTestRow(r); }} disabled={busy || testingId === r.id}>{testingId === r.id ? '…' : tr('integrations.test')}</PixelButton>
+ <PixelButton variant="ghost" size="sm" onClick={() => startEdit(r)} disabled={busy}>{tr('integrations.edit')}</PixelButton>
<PixelButton variant="ghost" size="sm" onClick={() => { void onRemove(r); }} disabled={busy}>✕</PixelButton>
</div>
</div>
<div style={{ display: 'flex', alignItems: 'center', gap: 8, flexWrap: 'wrap' }}>
<span style={{ ...hint, color: usable(r) ? 'var(--cth-mint-700, #1f7a4d)' : 'var(--cth-ink-500)' }}>
- {usable(r) ? '✓ Available to all workers' : 'Not available to workers yet'}
+ {usable(r) ? tr('integrations.availableToAll') : tr('integrations.notAvailableYet')}
</span>
{rt && <span style={{ fontSize: 12, color: rt.ok ? 'var(--cth-mint-700, #1f7a4d)' : 'var(--cth-danger, #6E1423)' }}>· {fmtTest(rt)}</span>}
</div>
diff --git a/src/renderer/src/components/McpDefaultsSettings.tsx b/src/renderer/src/components/McpDefaultsSettings.tsx
index 4d293f13..37224a0d 100644
--- a/src/renderer/src/components/McpDefaultsSettings.tsx
+++ b/src/renderer/src/components/McpDefaultsSettings.tsx
@@ -1,4 +1,5 @@
import { useState } from 'react';
+import { useTranslation } from 'react-i18next';
import type { HarnessConfig } from '@/store/config';
import { MCP_CATALOG, type McpTier } from '@shared/mcpCatalog';
@@ -7,15 +8,15 @@ export interface McpDefaultsSettingsProps {
}
const TIER_ORDER: McpTier[] = ['safe-readonly', 'write', 'secret'];
-const TIER_LABEL: Record<McpTier, string> = {
- 'safe-readonly': 'Safe & Read-Only (on by default)',
- 'write': 'Write Access (consent required)',
- 'secret': 'Requires Secret / API Key (consent required)'
+const TIER_LABEL_KEY: Record<McpTier, string> = {
+ 'safe-readonly': 'mcpDefaults.tiers.safeReadonly',
+ 'write': 'mcpDefaults.tiers.write',
+ 'secret': 'mcpDefaults.tiers.secret'
};
-const TIER_NOTE: Record<McpTier, string> = {
- 'safe-readonly': 'These servers read data only, need no secrets, and are scoped to the agent workspace. They are enabled for every new agent.',
- 'write': 'These servers can mutate state beyond the workspace. Off by default — enable only after reviewing.',
- 'secret': 'These servers require an API key or credentials. Off by default — add your credentials and enable after consent.'
+const TIER_NOTE_KEY: Record<McpTier, string> = {
+ 'safe-readonly': 'mcpDefaults.tiers.safeReadonlyNote',
+ 'write': 'mcpDefaults.tiers.writeNote',
+ 'secret': 'mcpDefaults.tiers.secretNote'
};
const labelStyle: React.CSSProperties = {
@@ -27,6 +28,7 @@ const labelStyle: React.CSSProperties = {
};
export function McpDefaultsSettings({ config }: McpDefaultsSettingsProps) {
+ const { t } = useTranslation();
const [note, setNote] = useState('');
const enabledFor = (id: string): boolean =>
@@ -38,10 +40,10 @@ export function McpDefaultsSettings({ config }: McpDefaultsSettingsProps) {
await window.cth.updateConfig({
mcpDefaults: { ...(config.mcpDefaults ?? {}), [id]: { enabled: next } }
});
- setNote(`${id}: ${next ? 'enabled' : 'disabled'}`);
+ setNote(t('mcpDefaults.toggleNote', { id, state: next ? t('common.on') : t('common.off') }));
setTimeout(() => setNote(''), 1800);
} catch {
- setNote('could not save');
+ setNote(t('mcpDefaults.couldNotSave'));
setTimeout(() => setNote(''), 2000);
}
};
@@ -51,11 +53,9 @@ export function McpDefaultsSettings({ config }: McpDefaultsSettingsProps) {
return (
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
<div>
- <div style={{ ...labelStyle, marginBottom: 6 }}>Default MCP servers</div>
+ <div style={{ ...labelStyle, marginBottom: 6 }}>{t('mcpDefaults.title')}</div>
<span style={{ fontSize: 12, lineHeight: '16px', color: 'var(--cth-ink-500)' }}>
- These servers are merged into each new agent's session settings. Safe servers are on by
- default; write/secret servers are off until you consent. Changes take effect on the next
- agent spawn — running agents are not affected.
+ {t('mcpDefaults.desc')}
</span>
</div>
@@ -71,10 +71,10 @@ export function McpDefaultsSettings({ config }: McpDefaultsSettingsProps) {
color: isConsent ? '#6E1423' : 'var(--cth-ink-500)',
textTransform: 'uppercase'
}}>
- {TIER_LABEL[tier]}
+ {t(TIER_LABEL_KEY[tier])}
</span>
<span style={{ fontSize: 11, lineHeight: '15px', color: 'var(--cth-ink-400, var(--cth-ink-500))' }}>
- {TIER_NOTE[tier]}
+ {t(TIER_NOTE_KEY[tier])}
</span>
</div>
@@ -125,7 +125,7 @@ export function McpDefaultsSettings({ config }: McpDefaultsSettingsProps) {
textTransform: 'uppercase'
}}
>
- {on ? 'on' : 'off'}
+ {on ? t('common.on') : t('common.off')}
</button>
</div>
);
diff --git a/src/renderer/src/components/MemoryGraphPanel.tsx b/src/renderer/src/components/MemoryGraphPanel.tsx
index 28647b3a..9f614162 100644
--- a/src/renderer/src/components/MemoryGraphPanel.tsx
+++ b/src/renderer/src/components/MemoryGraphPanel.tsx
@@ -1,4 +1,6 @@
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
+import { useTranslation } from 'react-i18next';
+import type { TFunction } from 'i18next';
import { useStore } from '@/store/store';
import { PixelBadge } from './PixelBadge';
import { Icon } from './Icon';
@@ -25,6 +27,7 @@ export function MemoryGraphPanel({
godId: string;
onJumpToMemory: (agentId: string) => void;
}) {
+ const { t } = useTranslation();
const agents = useStore((s) => s.agents);
const [log, setLog] = useState<MessageLogEntry[]>([]);
@@ -186,14 +189,14 @@ export function MemoryGraphPanel({
display: 'flex', alignItems: 'center', gap: 8, padding: '6px 8px', flexShrink: 0,
borderBottom: '1px solid var(--cth-ink-300)', background: 'var(--cth-cream-100)', flexWrap: 'wrap'
}}>
- <Toggle on={showTopics} onClick={() => setShowTopics((v) => !v)} label="topics" />
- <button onClick={refresh} title="Refresh" style={iconBtn}>
- <Icon name="gear" /> refresh
+ <Toggle on={showTopics} onClick={() => setShowTopics((v) => !v)} label={t('memoryGraph.topics')} />
+ <button onClick={refresh} title={t('memoryGraph.refresh')} style={iconBtn}>
+ <Icon name="gear" /> {t('memoryGraph.refresh')}
</button>
<div style={{ flex: 1 }} />
{showTopics && (
<span style={{ fontSize: 11, color: 'var(--cth-ink-500)' }}>
- {loadingTopics ? 'reading memory…' : `showing ${graph.topicShown} of ${graph.topicTotal} topics`}
+ {loadingTopics ? t('memoryGraph.readingMemory') : t('memoryGraph.topicsShown', { shown: graph.topicShown, total: graph.topicTotal })}
</span>
)}
</div>
@@ -366,15 +369,16 @@ export function MemoryGraphPanel({
// ─── tooltip bodies ──────────────────────────────────────────────────────────
function NodeTip({ node, memories }: { node: GraphNode; memories: Record<string, string> }) {
+ const { t } = useTranslation();
if (node.kind === 'agent') {
const mem = memories[node.id];
- const snippet = mem === undefined ? 'loading memory…' : memorySnippet(mem);
+ const snippet = mem === undefined ? t('memoryGraph.loadingMemory') : memorySnippet(mem, t);
return (
<>
<div style={tipTitle}>{node.label}</div>
<div style={{ display: 'flex', alignItems: 'center', gap: 6, margin: '2px 0 4px' }}>
<PixelBadge status={node.status} />
- <span style={{ fontSize: 11, color: 'var(--cth-ink-500)' }}>{node.degree} message link{node.degree === 1 ? '' : 's'}</span>
+ <span style={{ fontSize: 11, color: 'var(--cth-ink-500)' }}>{t('memoryGraph.messageLinks', { count: node.degree })}</span>
</div>
<div style={tipBody}>{snippet}</div>
</>
@@ -397,17 +401,18 @@ function NodeTip({ node, memories }: { node: GraphNode; memories: Record<string,
}
function EdgeTip({ edge, nodeById }: { edge: GraphEdge; nodeById: Map<string, GraphNode> }) {
+ const { t } = useTranslation();
const a = nodeById.get(edge.source)?.label ?? edge.source;
const b = nodeById.get(edge.target)?.label ?? edge.target;
if (edge.kind === 'topic') {
- return <div style={tipBody}>{a} knows about “{b}”</div>;
+ return <div style={tipBody}>{t('memoryGraph.knowsAbout', { a, b })}</div>;
}
const arrow = edge.dir === 'both' ? '↔' : edge.dir === 'bwd' ? '←' : '→';
return (
<>
<div style={tipTitle}>{a} {arrow} {b}</div>
<div style={{ fontSize: 11, color: 'var(--cth-ink-500)', margin: '2px 0' }}>
- {edge.weight} message{edge.weight === 1 ? '' : 's'} · last: {edge.lastAct ?? '—'}
+ {t('memoryGraph.messagesLast', { count: edge.weight, act: edge.lastAct ?? '—' })}
</div>
{edge.lastSubject && <div style={tipBody}>{truncate(edge.lastSubject, 80)}</div>}
</>
@@ -415,13 +420,14 @@ function EdgeTip({ edge, nodeById }: { edge: GraphEdge; nodeById: Map<string, Gr
}
function Legend() {
+ const { t } = useTranslation();
const items: { c: string; label: string }[] = [
- { c: actColor('request'), label: 'request' },
- { c: actColor('query'), label: 'query' },
- { c: actColor('propose'), label: 'propose' },
- { c: actColor('agree'), label: 'agree/done' },
- { c: actColor('refuse'), label: 'refuse' },
- { c: 'var(--cth-ink-300)', label: 'inform/topic' }
+ { c: actColor('request'), label: t('memoryGraph.legendRequest') },
+ { c: actColor('query'), label: t('memoryGraph.legendQuery') },
+ { c: actColor('propose'), label: t('memoryGraph.legendPropose') },
+ { c: actColor('agree'), label: t('memoryGraph.legendAgreeDone') },
+ { c: actColor('refuse'), label: t('memoryGraph.legendRefuse') },
+ { c: 'var(--cth-ink-300)', label: t('memoryGraph.legendInformTopic') }
];
return (
<div style={{
@@ -512,13 +518,13 @@ function truncate(s: string, n: number): string {
}
/** First meaningful line(s) of a memory file, for the hover preview. */
-function memorySnippet(text: string): string {
- if (!text.trim()) return 'No memory recorded yet.';
+function memorySnippet(text: string, t: TFunction): string {
+ if (!text.trim()) return t('memoryGraph.noMemory');
const lines = text
.split('\n')
.map((l) => l.replace(/^[#>\-*\s]+/, '').trim())
.filter((l) => l && !/^_.*_$/.test(l) && !/^memory —/i.test(l));
- return truncate(lines.slice(0, 3).join(' '), 200) || 'No memory recorded yet.';
+ return truncate(lines.slice(0, 3).join(' '), 200) || t('memoryGraph.noMemory');
}
const iconBtn: React.CSSProperties = {
diff --git a/src/renderer/src/components/MemoryPanel.tsx b/src/renderer/src/components/MemoryPanel.tsx
index 0c6a5822..aaa5d650 100644
--- a/src/renderer/src/components/MemoryPanel.tsx
+++ b/src/renderer/src/components/MemoryPanel.tsx
@@ -1,4 +1,5 @@
import { useEffect, useState } from 'react';
+import { useTranslation } from 'react-i18next';
import { PixelPanel } from './PixelPanel';
import { PixelButton } from './PixelButton';
@@ -15,10 +16,10 @@ interface MemoryStatus {
type ModelId = 'minilm' | 'embeddinggemma';
// Plain-language framing of each model — lead with the benefit the user actually
-// chooses between, not the model's codename.
-const MODELS: { id: ModelId; title: string; detail: string }[] = [
- { id: 'minilm', title: 'Fast', detail: 'English only · ~90 MB' },
- { id: 'embeddinggemma', title: 'Multilingual', detail: 'all languages · ~300 MB' },
+// chooses between, not the model's codename. Labels are i18n keys.
+const MODELS: { id: ModelId; titleKey: string; detailKey: string }[] = [
+ { id: 'minilm', titleKey: 'memoryPanel.modelFast', detailKey: 'memoryPanel.modelFastDetail' },
+ { id: 'embeddinggemma', titleKey: 'memoryPanel.modelMultilingual', detailKey: 'memoryPanel.modelMultilingualDetail' },
];
/**
@@ -27,6 +28,7 @@ const MODELS: { id: ModelId; title: string; detail: string }[] = [
* the human-facing window into the same memory.
*/
export function MemoryPanel() {
+ const { t } = useTranslation();
const [open, setOpen] = useState(false);
const [status, setStatus] = useState<MemoryStatus | null>(null);
const [query, setQuery] = useState('');
@@ -53,23 +55,23 @@ export function MemoryPanel() {
setResult('');
try {
const res = await window.cth.searchMemory(query.trim());
- setResult(res.ok ? (res.output || 'Nothing matched yet.') : `Couldn't search: ${res.error}`);
+ setResult(res.ok ? (res.output || t('memoryPanel.nothingMatched')) : `${t('memoryPanel.searchFailed')}: ${res.error}`);
} finally {
setBusy(false);
}
};
const active = status?.active;
- const pill = active ? `🧠 memory · ${status?.model}` : '🧠 memory';
+ const pill = active ? `${t('memoryPanel.pillActive')} · ${status?.model}` : t('memoryPanel.pill');
// One clear state line: is memory working, off, or not set up?
const state: { dot: string; label: string } = !status?.available
- ? { dot: 'var(--cth-coral)', label: 'Not set up' }
+ ? { dot: 'var(--cth-coral)', label: t('memoryPanel.notSetUp') }
: !status.enabled
- ? { dot: 'var(--cth-ink-500)', label: 'Off' }
+ ? { dot: 'var(--cth-ink-500)', label: t('common.off') }
: status.initialized
- ? { dot: 'var(--cth-mint)', label: 'On · ready' }
- : { dot: 'var(--cth-lemon)', label: 'On · getting ready…' };
+ ? { dot: 'var(--cth-mint)', label: t('memoryPanel.onReady') }
+ : { dot: 'var(--cth-lemon)', label: t('memoryPanel.onGettingReady') };
const canSearch = !!status?.available && !!status?.enabled;
@@ -78,7 +80,7 @@ export function MemoryPanel() {
{!open ? (
<button
onClick={() => { setOpen(true); refreshStatus(); }}
- title="Search the shared memory your agents build up"
+ title={t('memoryPanel.openTitle')}
style={{
padding: '5px 10px 3px',
background: active ? 'var(--cth-lemon-light)' : 'var(--cth-cream-200)',
@@ -93,12 +95,12 @@ export function MemoryPanel() {
{pill}
</button>
) : (
- <PixelPanel variant="dialog" title="HIVE MEMORY" noPadding>
+ <PixelPanel variant="dialog" title={t('memoryPanel.title')} noPadding>
<div style={{ display: 'flex', flexDirection: 'column', gap: 12, padding: 14 }}>
{/* What this is — one plain line. */}
<div style={{ fontSize: 12, color: 'var(--cth-ink-700)', lineHeight: 1.5 }}>
- What your agents remember across sessions, shared between them. Search it by meaning, not just exact words.
+ {t('memoryPanel.intro')}
</div>
{/* Status + on/off — the two things the user controls at a glance. */}
@@ -113,7 +115,7 @@ export function MemoryPanel() {
size="sm"
onClick={toggleEnabled}
>
- {status.enabled ? 'Turn off' : 'Turn on'}
+ {status.enabled ? t('memoryPanel.turnOff') : t('memoryPanel.turnOn')}
</PixelButton>
)}
</div>
@@ -124,7 +126,7 @@ export function MemoryPanel() {
fontSize: 12, color: 'var(--cth-ink-700)', lineHeight: 1.6,
background: 'var(--cth-cream-100)', boxShadow: 'inset 0 0 0 1px var(--cth-ink-300)', padding: 10
}}>
- Meaning-based search isn't installed yet.
+ {t('memoryPanel.notInstalled')}
{/* The commands used to be inlined here, hardcoded for macOS
(`curl … | sh`, `source ~/.zshrc`) — dead text under cmd.exe or
PowerShell, on the platform most likely to be missing the tool.
@@ -145,11 +147,11 @@ export function MemoryPanel() {
setOpen(false);
}}
>
- set it up in Prerequisites →
+ {t('memoryPanel.setUpInPrereqs')}
</PixelButton>
</div>
<div style={{ marginTop: 8, color: 'var(--cth-ink-500)' }}>
- Agents still keep plain notes without it.
+ {t('memoryPanel.plainNotesStill')}
</div>
</div>
)}
@@ -158,7 +160,7 @@ export function MemoryPanel() {
{status?.available && (
<div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>
<span style={{ fontSize: 11, color: 'var(--cth-ink-500)', fontFamily: 'var(--cth-font-display)', textTransform: 'uppercase', letterSpacing: 0.5 }}>
- Search language
+ {t('memoryPanel.searchLanguage')}
</span>
<div style={{ display: 'flex', gap: 8 }}>
{MODELS.map((m) => {
@@ -181,9 +183,9 @@ export function MemoryPanel() {
background: sel ? 'var(--cth-ink-900)' : 'transparent',
boxShadow: 'inset 0 0 0 1px var(--cth-ink-100)'
}} />
- {m.title}
+ {t(m.titleKey)}
</div>
- <div style={{ fontSize: 11, color: 'var(--cth-ink-500)', marginTop: 3 }}>{m.detail}</div>
+ <div style={{ fontSize: 11, color: 'var(--cth-ink-500)', marginTop: 3 }}>{t(m.detailKey)}</div>
</button>
);
})}
@@ -199,7 +201,7 @@ export function MemoryPanel() {
value={query}
onChange={(e) => setQuery(e.target.value)}
onKeyDown={(e) => { if (e.key === 'Enter') run(); }}
- placeholder="Search by meaning…"
+ placeholder={t('memoryPanel.searchPlaceholder')}
style={{
flex: 1, padding: '6px 8px 4px',
background: 'var(--cth-paper-100)', border: 'none',
@@ -209,7 +211,7 @@ export function MemoryPanel() {
}}
/>
<PixelButton variant="primary" size="sm" onClick={run} disabled={busy}>
- {busy ? '…' : 'Search'}
+ {busy ? '…' : t('common.search')}
</PixelButton>
</div>
{result && (
@@ -225,7 +227,7 @@ export function MemoryPanel() {
)}
<div style={{ display: 'flex', justifyContent: 'flex-end', borderTop: '1px solid var(--cth-ink-300)', paddingTop: 10 }}>
- <PixelButton variant="ghost" size="sm" onClick={() => setOpen(false)}>Close</PixelButton>
+ <PixelButton variant="ghost" size="sm" onClick={() => setOpen(false)}>{t('common.close')}</PixelButton>
</div>
</div>
</PixelPanel>
diff --git a/src/renderer/src/components/MessageQueueComposer.tsx b/src/renderer/src/components/MessageQueueComposer.tsx
index 8fb25b94..b73aa887 100644
--- a/src/renderer/src/components/MessageQueueComposer.tsx
+++ b/src/renderer/src/components/MessageQueueComposer.tsx
@@ -1,5 +1,6 @@
import { ClipboardEvent, DragEvent, KeyboardEvent, type MouseEvent as ReactMouseEvent, useEffect, useLayoutEffect, useRef, useState } from 'react';
import { createPortal } from 'react-dom';
+import { useTranslation } from 'react-i18next';
import { PixelButton } from './PixelButton';
import { Icon } from './Icon';
import { useStore, type Agent, type QueuedMessage } from '@/store/store';
@@ -28,6 +29,7 @@ export interface MessageQueueComposerProps {
* TUI one-by-one as soon as it goes idle (see useHive's flush loop).
*/
export function MessageQueueComposer({ agent }: MessageQueueComposerProps) {
+ const { t } = useTranslation();
const queue = useStore((s) => s.messageQueues[agent.id]) ?? EMPTY_QUEUE;
const enqueueMessage = useStore((s) => s.enqueueMessage);
const removeQueuedMessage = useStore((s) => s.removeQueuedMessage);
@@ -52,11 +54,11 @@ export function MessageQueueComposer({ agent }: MessageQueueComposerProps) {
const ffHint = !freeflowEnabled
? null
: ffMine && ff.status === 'recording'
- ? '● recording — click stop to transcribe'
+ ? t('queueComposer.recording')
: ffMine && ff.status === 'transcribing'
- ? 'transcribing…'
+ ? t('queueComposer.transcribing')
: ff.error && (ffMine || ff.targetAgentId === null)
- ? `voice: ${ff.error}`
+ ? `${t('queueComposer.voice')}: ${ff.error}`
: null;
// The draft box is the terminal's twin — it should read at the same size the
@@ -161,16 +163,16 @@ export function MessageQueueComposer({ agent }: MessageQueueComposerProps) {
const statusHint = queue.length === 0
? null
: !idle
- ? `${agent.name} is busy — ${queue.length} queued`
+ ? t('queueComposer.busyQueued', { name: agent.name, count: queue.length })
: deliveryPaused && !queue[0]?.manual
- ? 'held — delivery paused floor-wide'
+ ? t('queueComposer.heldFloor')
: block === 'draft'
- ? `held — ${agent.name}'s terminal has unsent text on its prompt`
+ ? t('queueComposer.heldDraft', { name: agent.name })
: block === 'picker'
- ? `held — a slash-command picker is open in ${agent.name}'s terminal`
+ ? t('queueComposer.heldPicker', { name: agent.name })
: block === 'exited'
- ? `held — ${agent.name}'s terminal has exited`
- : `sending to ${agent.name} one-by-one…`;
+ ? t('queueComposer.heldExited', { name: agent.name })
+ : t('queueComposer.sendingOneByOne', { name: agent.name });
return (
<div
@@ -195,7 +197,7 @@ export function MessageQueueComposer({ agent }: MessageQueueComposerProps) {
<span style={{
fontFamily: 'var(--cth-font-display)', fontSize: 9, lineHeight: '12px',
color: 'var(--cth-ink-700)', textAlign: 'center'
- }}>DROP TO ATTACH</span>
+ }}>{t('queueComposer.dropToAttach')}</span>
)}
{/* Header: label, count, status, clear-all */}
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
@@ -203,7 +205,7 @@ export function MessageQueueComposer({ agent }: MessageQueueComposerProps) {
fontFamily: 'var(--cth-font-display)',
fontSize: 9, lineHeight: '12px',
color: 'var(--cth-ink-700)'
- }}>QUEUE</span>
+ }}>{t('queueComposer.queue')}</span>
{queue.length > 0 && (
<span style={{
fontSize: 11, padding: '1px 6px 0',
@@ -215,7 +217,7 @@ export function MessageQueueComposer({ agent }: MessageQueueComposerProps) {
{statusHint && (
<span
title={deliveryPaused && !queue[0]?.manual
- ? 'Auto-delivery is paused for the whole floor. Resume it in the Command Center, or use "send now" on a message below.'
+ ? t('queueComposer.pausedTitle')
: statusHint}
style={{
fontSize: 12,
@@ -246,19 +248,19 @@ export function MessageQueueComposer({ agent }: MessageQueueComposerProps) {
fontFamily: 'var(--cth-font-ui)', fontSize: 12,
color: 'var(--cth-ink-900)', textDecoration: 'underline'
}}
- >{block === 'picker' ? 'close picker' : 'recover prompt'}</button>
+ >{block === 'picker' ? t('queueComposer.closePicker') : t('queueComposer.recoverPrompt')}</button>
)}
{queue.length > 1 && (
<button
onClick={() => clearQueue(agent.id)}
- title="Clear all queued messages"
+ title={t('queueComposer.clearAllTitle')}
style={{
marginLeft: 'auto', flexShrink: 0, whiteSpace: 'nowrap',
border: 'none', background: 'transparent', cursor: 'pointer',
fontFamily: 'var(--cth-font-ui)', fontSize: 12,
color: 'var(--cth-ink-500)'
}}
- >clear all</button>
+ >{t('queueComposer.clearAll')}</button>
)}
</div>
@@ -313,7 +315,7 @@ export function MessageQueueComposer({ agent }: MessageQueueComposerProps) {
}}>{a.name}</span>
<button
onClick={() => removeAttachment(a.path)}
- title="Remove attachment"
+ title={t('queueComposer.removeAttachment')}
style={{
flexShrink: 0, border: 'none', background: 'transparent', cursor: 'pointer',
color: 'var(--cth-ink-500)', padding: 0,
@@ -337,7 +339,7 @@ export function MessageQueueComposer({ agent }: MessageQueueComposerProps) {
onKeyDown={onKey}
onPaste={onPaste}
rows={5}
- placeholder={idle ? `Message ${agent.name}` : `${agent.name} is busy — queue a message`}
+ placeholder={idle ? t('queueComposer.messagePlaceholder', { name: agent.name }) : t('queueComposer.busyPlaceholder', { name: agent.name })}
style={{
width: '100%',
resize: 'vertical',
@@ -367,13 +369,13 @@ export function MessageQueueComposer({ agent }: MessageQueueComposerProps) {
<span style={{ flex: 1 }} />
<PixelButton variant="secondary" size="sm" onClick={pickFiles}>
<span style={{ display: 'inline-flex', gap: 6, alignItems: 'center' }}>
- <Icon name="plus" /> files
+ <Icon name="plus" /> {t('queueComposer.files')}
</span>
</PixelButton>
{freeflowEnabled && <FreeFlowButton agentId={agent.id} hasGroqKey={hasGroqKey} />}
<PixelButton variant="primary" size="sm" onClick={queueIt} disabled={!canSend}>
<span style={{ display: 'inline-flex', gap: 6, alignItems: 'center' }}>
- send <Icon name="arrow-right" />
+ {t('commandBar.send')} <Icon name="arrow-right" />
</span>
</PixelButton>
</div>
@@ -433,6 +435,7 @@ function QueuedMessageRow(
onRemove: () => void;
}
) {
+ const { t } = useTranslation();
const [expanded, setExpanded] = useState(false);
const [clipped, setClipped] = useState(false);
const bodyRef = useRef<HTMLDivElement>(null);
@@ -487,28 +490,28 @@ function QueuedMessageRow(
{(clipped || expanded) && (
<button
onClick={() => setExpanded((e) => !e)}
- title={expanded ? 'Collapse this message' : 'Show the full message'}
+ title={expanded ? t('queueComposer.collapse') : t('queueComposer.showFull')}
style={{
border: 'none', background: 'transparent', cursor: 'pointer', padding: 0,
fontFamily: 'var(--cth-font-ui)', fontSize: 12, lineHeight: '16px',
color: 'var(--cth-ink-500)', textDecoration: 'underline'
}}
- >{expanded ? 'see less' : 'see more'}</button>
+ >{expanded ? t('queueComposer.seeLess') : t('queueComposer.seeMore')}</button>
)}
{paused && !message.manual && (
<button
onClick={onSendNow}
- title="Deliver this message even though auto-delivery is paused. It moves to the front of the queue and types in as soon as the terminal is free."
+ title={t('queueComposer.sendNowTitle')}
style={{
border: 'none', background: 'transparent', cursor: 'pointer', padding: 0,
fontFamily: 'var(--cth-font-ui)', fontSize: 12, lineHeight: '16px',
color: 'var(--cth-ink-900)', textDecoration: 'underline'
}}
- >send now</button>
+ >{t('queueComposer.sendNow')}</button>
)}
{paused && message.manual && (
<span style={{ fontSize: 12, lineHeight: '16px', color: 'var(--cth-ink-500)' }}>
- sending when free…
+ {t('queueComposer.sendingWhenFree')}
</span>
)}
</div>
@@ -516,7 +519,7 @@ function QueuedMessageRow(
</div>
<button
onClick={onRemove}
- title="Remove from queue"
+ title={t('queueComposer.removeFromQueue')}
style={{
flexShrink: 0, border: 'none', background: 'transparent',
cursor: 'pointer',
@@ -543,6 +546,7 @@ function QueuedMessageRow(
* guarantee). `hasGroqKey` is boolean presence only; the key value never gets here.
*/
function FreeFlowButton({ agentId, hasGroqKey }: { agentId: string; hasGroqKey: boolean }) {
+ const { t } = useTranslation();
const ff = useFreeflow();
const mine = ff.targetAgentId === agentId;
const recording = ff.status === 'recording' && mine;
@@ -562,10 +566,10 @@ function FreeFlowButton({ agentId, hasGroqKey }: { agentId: string; hasGroqKey:
const EST_H = 188;
const title = noKey
- ? 'Dictation needs a free Groq API key. Click the info mark for the steps.'
- : recording ? 'Stop & transcribe'
- : transcribing ? 'Transcribing…'
- : 'Free Flow — dictate into the queue. Click, or hold Option (⌥).';
+ ? t('queueComposer.ffNoKeyTitle')
+ : recording ? t('queueComposer.ffStopTranscribe')
+ : transcribing ? t('queueComposer.transcribing')
+ : t('queueComposer.ffTitle');
/** Same placement rule as RealtimeMichaelToggle's hint: prefer above (the
* composer sits low in the panel), flip below only when there is no room, and
@@ -623,7 +627,7 @@ function FreeFlowButton({ agentId, hasGroqKey }: { agentId: string; hasGroqKey:
>
<span style={{ display: 'inline-flex', gap: 6, alignItems: 'center' }}>
<Icon name="mic" />
- {transcribing ? '…' : recording ? 'stop' : 'voice'}
+ {transcribing ? '…' : recording ? t('queueComposer.stop') : t('queueComposer.voice')}
</span>
</PixelButton>
</span>
@@ -637,7 +641,7 @@ function FreeFlowButton({ agentId, hasGroqKey }: { agentId: string; hasGroqKey:
<button
ref={iconRef}
type="button"
- aria-label="How do I enable dictation?"
+ aria-label={t('queueComposer.ffHowEnable')}
aria-expanded={hintOpen}
onClick={toggleHint}
style={{
@@ -668,32 +672,29 @@ function FreeFlowButton({ agentId, hasGroqKey }: { agentId: string; hasGroqKey:
<span style={{
fontFamily: 'var(--cth-font-display)', fontSize: 9, letterSpacing: 0.5,
textTransform: 'uppercase', color: 'var(--cth-ink-500)'
- }}>Set up dictation</span>
+ }}>{t('queueComposer.ffSetupTitle')}</span>
{/* Lead with the cost, because "add an API key" reads as "this will
bill me" and that assumption is what stops people here. */}
<span>
- Speak instead of typing. Groq transcribes it, and their free tier
- covers this — <strong>no card, no cost</strong>.
+ {t('queueComposer.ffSetupIntro')}
</span>
<ol style={{ margin: 0, paddingLeft: 16, display: 'flex', flexDirection: 'column', gap: 3 }}>
<li>
- Create a free key at{' '}
+ {t('queueComposer.ffCreateKey')}{' '}
<a
href="https://console.groq.com/keys"
onClick={(e) => { e.preventDefault(); void window.cth.openExternal('https://console.groq.com/keys'); }}
style={{ color: 'var(--cth-ink-900)' }}
>console.groq.com/keys</a>
</li>
- <li>Paste it into Settings → Voice → Groq API key</li>
- <li>Click <strong>voice</strong>, or hold the <strong>right Option</strong> key to talk</li>
+ <li>{t('queueComposer.ffPasteKey')}</li>
+ <li>{t('queueComposer.ffClickOrHold')}</li>
</ol>
<span style={{ color: 'var(--cth-ink-500)' }}>
- Hold it ALONE for a moment to start; release to transcribe into
- the composer, where you can edit before sending. Either Option key
- works, and Option+key combos still reach the terminal untouched.
+ {t('queueComposer.ffHoldHint')}
</span>
<button
@@ -705,7 +706,7 @@ function FreeFlowButton({ agentId, hasGroqKey }: { agentId: string; hasGroqKey:
fontFamily: 'var(--cth-font-ui)', fontSize: 11, lineHeight: '15px',
color: 'var(--cth-ink-900)', textDecoration: 'underline'
}}
- >set it up now</button>
+ > {t('realtimeToggle.setItUpNow')}</button>
</div>,
document.body
)}
diff --git a/src/renderer/src/components/OnboardingWizard.tsx b/src/renderer/src/components/OnboardingWizard.tsx
index a602f8b6..4ff5f880 100644
--- a/src/renderer/src/components/OnboardingWizard.tsx
+++ b/src/renderer/src/components/OnboardingWizard.tsx
@@ -85,7 +85,6 @@ const PROVIDER_BLURB_KEYS: Partial<Record<AgentProvider, string>> = {
qwen: 'onboarding.providerBlurb.qwen',
cursor: 'onboarding.providerBlurb.cursor'
};
-};
export function OnboardingWizard({ onComplete }: OnboardingWizardProps) {
const { t } = useTranslation();
diff --git a/src/renderer/src/components/RealtimeMichaelToggle.tsx b/src/renderer/src/components/RealtimeMichaelToggle.tsx
index 0dd75bc5..797d0217 100644
--- a/src/renderer/src/components/RealtimeMichaelToggle.tsx
+++ b/src/renderer/src/components/RealtimeMichaelToggle.tsx
@@ -18,21 +18,24 @@
*/
import { useEffect, useRef, useState, type MouseEvent } from 'react';
import { createPortal } from 'react-dom';
+import { useTranslation } from 'react-i18next';
import { PixelButton } from './PixelButton';
import { Icon } from './Icon';
import { useStore } from '@/store/store';
import { useRealtimeMichael, type RealtimeStatus } from '@/realtime/session';
-/** Per-status presentation: button variant, short label, dot color, and (optional)
- * animation for the live-state indicator dot. Maps hook.status → visuals. */
+/** Per-status presentation: button variant, SHORT label, dot color, and (optional)
+ * animation for the live-state indicator dot. Maps hook.status → visuals.
+ * Labels are i18n keys (`realtimeToggle.*`); the long help/title text is
+ * resolved per-render via t() since it can interpolate the error. */
const STATE_VIEW: Record<
RealtimeStatus,
{
variant: 'primary' | 'secondary' | 'destructive';
- label: string;
+ labelKey: string;
dot: string;
anim?: string;
- help: string;
+ helpKey: string;
/** When live, the button fill — a distinct accent so the active mic never
* reads as a flat black 'primary' button. (working uses the destructive
* coral variant, already non-black, so it needs no override.) */
@@ -41,39 +44,39 @@ const STATE_VIEW: Record<
> = {
off: {
variant: 'secondary',
- label: 'talk',
+ labelKey: 'realtimeToggle.talk',
dot: 'var(--cth-ink-300)',
- help: 'Talk to Michael — start the voice session'
+ helpKey: 'realtimeToggle.helpOff'
},
connecting: {
variant: 'secondary',
- label: '…',
+ labelKey: 'realtimeToggle.connecting',
dot: 'var(--cth-lemon)',
anim: 'cth-blink 700ms steps(2, end) infinite',
- help: 'Connecting to Michael…'
+ helpKey: 'realtimeToggle.helpConnecting'
},
listening: {
variant: 'primary',
- label: 'listening',
+ labelKey: 'realtimeToggle.listening',
dot: 'var(--cth-mint)',
anim: 'cth-pulse 1000ms steps(2, end) infinite',
- help: 'Listening — Michael is hearing you (click to stop)',
+ helpKey: 'realtimeToggle.helpListening',
activeBg: 'var(--cth-mint)'
},
responding: {
variant: 'primary',
- label: 'speaking',
+ labelKey: 'realtimeToggle.speaking',
dot: 'var(--cth-sky)',
anim: 'cth-pulse 600ms steps(2, end) infinite',
- help: 'Michael is speaking (click to stop)',
+ helpKey: 'realtimeToggle.helpSpeaking',
activeBg: 'var(--cth-sky)'
},
working: {
variant: 'destructive',
- label: 'working',
+ labelKey: 'realtimeToggle.working',
dot: 'var(--cth-coral)',
anim: 'cth-blink 500ms steps(2, end) infinite',
- help: 'Michael is running a tool — mic muted (click to stop)'
+ helpKey: 'realtimeToggle.helpWorking'
}
};
@@ -83,6 +86,7 @@ export interface RealtimeMichaelToggleProps {
}
export function RealtimeMichaelToggle({ compact = false }: RealtimeMichaelToggleProps) {
+ const { t } = useTranslation();
const hasOpenAiKey = useStore((s) => s.hasOpenAiKey);
const { status, error, connect, disconnect } = useRealtimeMichael();
// Measured viewport coords, not a CSS offset. The agent dock clips its
@@ -104,10 +108,10 @@ export function RealtimeMichaelToggle({ compact = false }: RealtimeMichaelToggle
// The tooltip carries the full WHY; the quiet info affordance below gives a
// discoverable cue so the user never just hits a silently-dead button.
const title = noKey
- ? 'Talk needs your OpenAI API key (used for the Realtime voice API). Add it in Settings → Voice.'
+ ? t('realtimeToggle.noKeyTitle')
: error
- ? `${view.help} — ${error}`
- : view.help;
+ ? `${t(view.helpKey)} — ${error}`
+ : t(view.helpKey);
const onClick = () => {
if (noKey) return;
@@ -216,7 +220,7 @@ export function RealtimeMichaelToggle({ compact = false }: RealtimeMichaelToggle
<Icon name="mic" />
{!compact && (
<span style={{ fontFamily: 'var(--cth-font-ui)' }}>
- {noKey ? 'talk' : view.label}
+ {noKey ? t('realtimeToggle.talk') : t(view.labelKey)}
</span>
)}
</span>
@@ -235,7 +239,7 @@ export function RealtimeMichaelToggle({ compact = false }: RealtimeMichaelToggle
<button
ref={iconRef}
type="button"
- aria-label="Why is Talk disabled?"
+ aria-label={t('realtimeToggle.whyDisabled')}
aria-expanded={hintOpen}
onClick={toggleHint}
style={{
@@ -276,7 +280,7 @@ export function RealtimeMichaelToggle({ compact = false }: RealtimeMichaelToggle
whiteSpace: 'normal'
}}
>
- <span>An <strong>OpenAI API key</strong> is needed to use this feature.</span>
+ <span>{t('realtimeToggle.popoverBody')}</span>
<button
type="button"
onClick={openKeySettings}
@@ -287,7 +291,7 @@ export function RealtimeMichaelToggle({ compact = false }: RealtimeMichaelToggle
color: 'var(--cth-ink-900)', textDecoration: 'underline'
}}
>
- set it up now
+ {t('realtimeToggle.setItUpNow')}
</button>
</div>,
document.body
diff --git a/src/renderer/src/components/SetupPanel.tsx b/src/renderer/src/components/SetupPanel.tsx
index c7b3c8f7..e2144f23 100644
--- a/src/renderer/src/components/SetupPanel.tsx
+++ b/src/renderer/src/components/SetupPanel.tsx
@@ -16,18 +16,20 @@
* confirmation step in front of anything that writes outside the app.
*/
import { useCallback, useEffect, useMemo, useState } from 'react';
+import { useTranslation } from 'react-i18next';
import { PixelButton } from './PixelButton';
import { Icon } from './Icon';
import { useStore } from '@/store/store';
import { setupPrompt, type ToolStatus, type ToolKind } from '../../../shared/toolCatalog';
-const SECTIONS: { kind: ToolKind; title: string; blurb: string }[] = [
- { kind: 'prerequisite', title: 'Prerequisites', blurb: 'The groundwork everything else builds on.' },
- { kind: 'memory', title: 'Memory layer', blurb: 'Meaning-based recall across everything your agents learn.' },
- { kind: 'engine', title: 'Agent engines', blurb: 'The CLIs your agents run on. You need whichever ones you actually use — not all of them.' }
+const SECTIONS: { kind: ToolKind; titleKey: string; blurbKey: string }[] = [
+ { kind: 'prerequisite', titleKey: 'setupPanel.sections.prerequisites.title', blurbKey: 'setupPanel.sections.prerequisites.blurb' },
+ { kind: 'memory', titleKey: 'setupPanel.sections.memory.title', blurbKey: 'setupPanel.sections.memory.blurb' },
+ { kind: 'engine', titleKey: 'setupPanel.sections.engine.title', blurbKey: 'setupPanel.sections.engine.blurb' }
];
function StatusChip({ tool }: { tool: ToolStatus }) {
+ const { t } = useTranslation();
const ready = tool.found;
return (
<span style={{
@@ -37,12 +39,13 @@ function StatusChip({ tool }: { tool: ToolStatus }) {
boxShadow: `inset 0 0 0 1px ${ready ? 'var(--cth-mint)' : 'var(--cth-ink-300)'}`,
color: 'var(--cth-ink-900)'
}}>
- {ready ? 'READY' : tool.essential ? 'MISSING' : 'NOT SET UP'}
+ {ready ? t('setupPanel.statusReady') : tool.essential ? t('setupPanel.statusMissing') : t('setupPanel.statusNotSetUp')}
</span>
);
}
function ToolRow({ tool }: { tool: ToolStatus }) {
+ const { t } = useTranslation();
const [copied, setCopied] = useState(false);
const copy = () => {
void navigator.clipboard.writeText(tool.installCommand).then(
@@ -60,7 +63,7 @@ function ToolRow({ tool }: { tool: ToolStatus }) {
{tool.label.toUpperCase()}
</span>
{tool.essential && !tool.found && (
- <span style={{ fontSize: 10, color: 'var(--cth-ink-500)', flexShrink: 0 }}>recommended</span>
+ <span style={{ fontSize: 10, color: 'var(--cth-ink-500)', flexShrink: 0 }}>{t('setupPanel.recommended')}</span>
)}
<StatusChip tool={tool} />
</div>
@@ -93,7 +96,7 @@ function ToolRow({ tool }: { tool: ToolStatus }) {
background: 'var(--cth-cream-200)', boxShadow: 'inset 0 0 0 1px var(--cth-ink-300)',
border: 'none', cursor: 'pointer', color: 'var(--cth-ink-900)'
}}
- >{copied ? 'copied' : 'copy'}</button>
+ >{copied ? t('common.copy') + ' ✓' : t('common.copy')}</button>
</div>
)}
@@ -105,7 +108,7 @@ function ToolRow({ tool }: { tool: ToolStatus }) {
href={tool.docsUrl}
onClick={(e) => { e.preventDefault(); void window.cth.openExternal(tool.docsUrl!); }}
style={{ color: 'var(--cth-ink-700)' }}
- >docs →</a>
+ >{t('setupPanel.docs')}</a>
)}
</div>
)}
@@ -114,6 +117,7 @@ function ToolRow({ tool }: { tool: ToolStatus }) {
}
export function SetupPanel({ onDone }: { onDone?: () => void } = {}) {
+ const { t } = useTranslation();
const [tools, setTools] = useState<ToolStatus[] | null>(null);
const [busy, setBusy] = useState(false);
const requestDispatchSeed = useStore((s) => s.requestDispatchSeed);
@@ -148,15 +152,15 @@ export function SetupPanel({ onDone }: { onDone?: () => void } = {}) {
<div style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>
<div style={{ display: 'flex', alignItems: 'flex-start', gap: 8, flexWrap: 'wrap' }}>
<div style={{ flex: 1, minWidth: 200 }}>
- <div style={{ fontFamily: 'var(--cth-font-display)', fontSize: 12 }}>PREREQUISITES</div>
+ <div style={{ fontFamily: 'var(--cth-font-display)', fontSize: 12 }}>{t('setupPanel.title')}</div>
<div style={{ fontSize: 12, color: 'var(--cth-ink-500)', marginTop: 2 }}>
{tools === null
- ? 'Checking what is installed…'
- : `${readyCount} of ${tools.length} ready${missingEssential.length ? ` · ${missingEssential.length} recommended missing` : ''}`}
+ ? t('setupPanel.checking')
+ : t('setupPanel.summary', { ready: readyCount, total: tools.length, missing: missingEssential.length })}
</div>
</div>
<PixelButton variant="ghost" size="md" onClick={() => void refresh()} disabled={busy}>
- {busy ? 'checking…' : 're-check'}
+ {busy ? t('setupPanel.checkingBtn') : t('setupPanel.recheck')}
</PixelButton>
</div>
@@ -169,8 +173,8 @@ export function SetupPanel({ onDone }: { onDone?: () => void } = {}) {
}}>
<div style={{ flex: 1, minWidth: 220, fontSize: 12, color: 'var(--cth-ink-700)', lineHeight: 1.5 }}>
{missingEssential.length
- ? <>Michael can install the {missingEssential.length} missing recommended {missingEssential.length === 1 ? 'tool' : 'tools'} for you. This fills in his dispatch box — nothing runs until you press dispatch.</>
- : <>Everything recommended is installed. Individual engines above are optional — set up only the ones you use.</>}
+ ? t('setupPanel.askDesc', { count: missingEssential.length })
+ : t('setupPanel.allReady')}
</div>
<PixelButton
variant="primary"
@@ -179,7 +183,7 @@ export function SetupPanel({ onDone }: { onDone?: () => void } = {}) {
disabled={missingEssential.length === 0}
>
<span style={{ display: 'inline-flex', gap: 4, alignItems: 'center' }}>
- <Icon name="sparkle" /> ask Michael to set up everything
+ <Icon name="sparkle" /> {t('setupPanel.askMichael')}
</span>
</PixelButton>
</div>
@@ -192,8 +196,8 @@ export function SetupPanel({ onDone }: { onDone?: () => void } = {}) {
<div style={{
fontFamily: 'var(--cth-font-display)', fontSize: 10, letterSpacing: 0.5,
color: 'var(--cth-ink-500)', textTransform: 'uppercase'
- }}>{section.title}</div>
- <div style={{ fontSize: 11, color: 'var(--cth-ink-500)', marginTop: -2 }}>{section.blurb}</div>
+ }}>{t(section.titleKey)}</div>
+ <div style={{ fontSize: 11, color: 'var(--cth-ink-500)', marginTop: -2 }}>{t(section.blurbKey)}</div>
<div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>
{rows.map((t) => <ToolRow key={t.id} tool={t} />)}
</div>
diff --git a/src/renderer/src/components/SkillsTab.tsx b/src/renderer/src/components/SkillsTab.tsx
index a4e4b199..606ea8f8 100644
--- a/src/renderer/src/components/SkillsTab.tsx
+++ b/src/renderer/src/components/SkillsTab.tsx
@@ -10,6 +10,7 @@
* click — the catalog links out and the user chooses.
*/
import { useCallback, useEffect, useMemo, useState } from 'react';
+import { useTranslation } from 'react-i18next';
import { PixelButton } from './PixelButton';
import type { LocalSkill, CatalogSkill } from '../../../preload';
@@ -34,6 +35,7 @@ function Chip({ text, tone = 'quiet' }: { text: string; tone?: 'quiet' | 'accent
}
export function SkillsTab({ agentCwd }: { agentCwd?: string }) {
+ const { t } = useTranslation();
const [mode, setMode] = useState<Mode>('installed');
const [query, setQuery] = useState('');
const [local, setLocal] = useState<LocalSkill[] | null>(null);
@@ -61,9 +63,9 @@ export function SkillsTab({ agentCwd }: { agentCwd?: string }) {
setCatalogMeta({ stale: res.stale, error: res.error, fetchedAt: res.fetchedAt });
} catch {
setCatalog([]);
- setCatalogMeta({ stale: true, error: 'could not reach the catalog', fetchedAt: 0 });
+ setCatalogMeta({ stale: true, error: t('skillsTab.catalogUnreachable'), fetchedAt: 0 });
} finally { setBusy(false); }
- }, []);
+ }, [t]);
useEffect(() => { void loadLocal(); }, [loadLocal]);
// The catalog is fetched only when the user actually opens Browse — no network
@@ -118,13 +120,13 @@ export function SkillsTab({ agentCwd }: { agentCwd?: string }) {
try {
const res = await window.cth.skillsInstall(c.url, c.name);
if (res.ok) {
- setAction((a) => ({ ...a, [c.url]: { done: 'Installed' } }));
+ setAction((a) => ({ ...a, [c.url]: { done: t('skillsTab.installed') } }));
void loadLocal(); // the installed pane must reflect it immediately
} else {
setAction((a) => ({ ...a, [c.url]: { error: res.error } }));
}
} catch (e) {
- setAction((a) => ({ ...a, [c.url]: { error: e instanceof Error ? e.message : 'install failed' } }));
+ setAction((a) => ({ ...a, [c.url]: { error: e instanceof Error ? e.message : t('skillsTab.installFailed') } }));
}
};
@@ -134,9 +136,9 @@ export function SkillsTab({ agentCwd }: { agentCwd?: string }) {
try {
const res = await window.cth.skillsUninstall(sk.path);
if (res.ok) { setAction((a) => { const n = { ...a }; delete n[sk.path]; return n; }); void loadLocal(); }
- else setAction((a) => ({ ...a, [sk.path]: { error: res.error ?? 'could not remove it' } }));
+ else setAction((a) => ({ ...a, [sk.path]: { error: res.error ?? t('skillsTab.removeFailed') } }));
} catch (e) {
- setAction((a) => ({ ...a, [sk.path]: { error: e instanceof Error ? e.message : 'uninstall failed' } }));
+ setAction((a) => ({ ...a, [sk.path]: { error: e instanceof Error ? e.message : t('skillsTab.uninstallFailed') } }));
}
};
@@ -168,16 +170,16 @@ export function SkillsTab({ agentCwd }: { agentCwd?: string }) {
flexShrink: 0, display: 'flex', gap: 8, alignItems: 'center', flexWrap: 'wrap',
padding: 10, borderBottom: '1px solid var(--cth-ink-300)'
}}>
- <button onClick={() => setMode('installed')} style={tabBtn('installed', 'installed')}>
- installed{local ? ` (${local.length})` : ''}
+ <button onClick={() => setMode('installed')} style={tabBtn('installed', t('skillsTab.installed'))}>
+ {t('skillsTab.installed')}{local ? ` (${local.length})` : ''}
</button>
- <button onClick={() => setMode('browse')} style={tabBtn('browse', 'browse')}>
- browse{catalog ? ` (${catalog.length})` : ''}
+ <button onClick={() => setMode('browse')} style={tabBtn('browse', t('skillsTab.browse'))}>
+ {t('skillsTab.browse')}{catalog ? ` (${catalog.length})` : ''}
</button>
<input
value={query}
onChange={(e) => setQuery(e.target.value)}
- placeholder={mode === 'installed' ? 'Search installed skills…' : 'Search the skills catalog…'}
+ placeholder={mode === 'installed' ? t('skillsTab.searchInstalled') : t('skillsTab.searchCatalog')}
style={{
flex: 1, minWidth: 140, padding: '4px 8px',
background: 'var(--cth-paper-100)', color: 'var(--cth-ink-900)',
@@ -189,7 +191,7 @@ export function SkillsTab({ agentCwd }: { agentCwd?: string }) {
<select
value={category}
onChange={(e) => setCategory(e.target.value)}
- title="Categories as published by the catalog"
+ title={t('skillsTab.categoryTitle')}
style={{
padding: '4px 6px', maxWidth: 210,
background: 'var(--cth-paper-100)', color: 'var(--cth-ink-900)',
@@ -197,7 +199,7 @@ export function SkillsTab({ agentCwd }: { agentCwd?: string }) {
fontFamily: 'var(--cth-font-ui)', fontSize: 12
}}
>
- <option value="all">all categories</option>
+ <option value="all">{t('skillsTab.allCategories')}</option>
{categories.map(([c, n]) => <option key={c} value={c}>{c} ({n})</option>)}
</select>
)}
@@ -212,7 +214,7 @@ export function SkillsTab({ agentCwd }: { agentCwd?: string }) {
fontFamily: 'var(--cth-font-ui)', fontSize: 12
}}
>
- <option value="all">all publishers</option>
+ <option value="all">{t('skillsTab.allPublishers')}</option>
{owners.map(([o, n]) => <option key={o} value={o}>{o} ({n})</option>)}
</select>
)}
@@ -221,18 +223,18 @@ export function SkillsTab({ agentCwd }: { agentCwd?: string }) {
size="sm"
onClick={() => (mode === 'installed' ? void loadLocal() : void loadCatalog(true))}
disabled={busy}
- >{busy ? 'loading…' : 'refresh'}</PixelButton>
+ >{busy ? t('skillsTab.loading') : t('skillsTab.refresh')}</PixelButton>
</div>
{/* Body */}
<div style={{ flex: 1, minHeight: 0, overflowY: 'auto', padding: 10 }}>
{mode === 'installed' ? (
- local === null ? <Muted>Scanning…</Muted>
+ local === null ? <Muted>{t('skillsTab.scanning')}</Muted>
: shownLocal.length === 0 ? (
<Muted>
{local.length === 0
- ? 'No skills installed yet. Open Browse to see what is available.'
- : 'Nothing matches that search.'}
+ ? t('skillsTab.noSkillsInstalled')
+ : t('skillsTab.nothingMatches')}
</Muted>
) : (
<div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>
@@ -256,28 +258,28 @@ export function SkillsTab({ agentCwd }: { agentCwd?: string }) {
}}>{s.path}</div>
<div style={{ display: 'flex', gap: 6, alignItems: 'center', flexWrap: 'wrap' }}>
<button onClick={() => void window.cth.skillsReveal(s.path)} style={actionBtn('quiet')}>
- open folder
+ {t('skillsTab.openFolder')}
</button>
{s.scope === 'bundled' ? (
// Bundled skills ship inside the app and are re-copied into
// every agent on spawn, so "removing" one would silently come
// back. Say that instead of offering a button that lies.
<span style={{ fontSize: 11, color: 'var(--cth-ink-500)' }}>
- ships with the app
+ {t('skillsTab.shipsWithApp')}
</span>
) : confirming === s.path ? (
<>
<button onClick={() => void uninstall(s)} style={actionBtn('danger')}>
- delete {s.name}?
+ {t('skillsTab.deleteConfirm', { name: s.name })}
</button>
- <button onClick={() => setConfirming(null)} style={actionBtn('quiet')}>cancel</button>
+ <button onClick={() => setConfirming(null)} style={actionBtn('quiet')}>{t('common.cancel')}</button>
</>
) : (
<button
onClick={() => setConfirming(s.path)}
disabled={action[s.path]?.busy}
style={actionBtn('quiet')}
- >{action[s.path]?.busy ? 'removing…' : 'uninstall'}</button>
+ >{action[s.path]?.busy ? t('skillsTab.removing') : t('skillsTab.uninstall')}</button>
)}
{action[s.path]?.error && (
<span style={{ fontSize: 11, color: 'var(--cth-coral)' }}>{action[s.path]?.error}</span>
@@ -287,7 +289,7 @@ export function SkillsTab({ agentCwd }: { agentCwd?: string }) {
))}
</div>
)
- ) : catalog === null ? <Muted>Loading the catalog…</Muted>
+ ) : catalog === null ? <Muted>{t('skillsTab.loadingCatalog')}</Muted>
: (
<>
{catalogMeta?.error && (
@@ -295,12 +297,14 @@ export function SkillsTab({ agentCwd }: { agentCwd?: string }) {
marginBottom: 8, padding: 8, fontSize: 12, color: 'var(--cth-ink-900)',
background: 'var(--cth-coral-light)', boxShadow: 'inset 0 0 0 1px var(--cth-coral)'
}}>
- Showing a cached copy — {catalogMeta.error}.
+ {t('skillsTab.cachedCopy', { error: catalogMeta.error })}
</div>
)}
<div style={{ fontSize: 11, color: 'var(--cth-ink-500)', marginBottom: 8 }}>
- {totalMatching} matching{totalMatching > shownCatalog.length ? ` · showing the first ${shownCatalog.length}` : ''}
- {' · '}curated by abubakarsiddik31/claude-skills-collection
+ {totalMatching > shownCatalog.length
+ ? t('skillsTab.matchingFirst', { count: totalMatching, shown: shownCatalog.length })
+ : t('skillsTab.matching', { count: totalMatching })}
+ {' · '}{t('skillsTab.curatedBy')}
</div>
<div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>
{shownCatalog.map((s) => (
@@ -321,12 +325,12 @@ export function SkillsTab({ agentCwd }: { agentCwd?: string }) {
disabled={!!action[s.url]?.busy || !!action[s.url]?.done}
style={actionBtn(action[s.url]?.done ? 'quiet' : 'primary')}
>
- {action[s.url]?.busy ? 'installing…' : action[s.url]?.done ?? 'install'}
+ {action[s.url]?.busy ? t('skillsTab.installing') : action[s.url]?.done ?? t('skillsTab.install')}
</button>
<button
onClick={() => void window.cth.openExternal(s.url)}
style={actionBtn('quiet')}
- >learn more</button>
+ >{t('skillsTab.learnMore')}</button>
{action[s.url]?.error && (
<span style={{ fontSize: 11, color: 'var(--cth-coral)', flex: 1, minWidth: 0 }}>
{action[s.url]?.error}
diff --git a/src/renderer/src/components/TasksKanban.tsx b/src/renderer/src/components/TasksKanban.tsx
index f2b7aea6..f43fb960 100644
--- a/src/renderer/src/components/TasksKanban.tsx
+++ b/src/renderer/src/components/TasksKanban.tsx
@@ -1,4 +1,5 @@
import { useCallback, useEffect, useRef, useState } from 'react';
+import { useTranslation } from 'react-i18next';
import { PixelPanel } from './PixelPanel';
import { PixelButton } from './PixelButton';
import { PixelBadge } from './PixelBadge';
@@ -51,11 +52,11 @@ export function waitsOnHuman(t: HiveTask): boolean {
type Status = HiveTask['status'];
-const COLUMNS: { key: Status; label: string; accent: string }[] = [
- { key: 'todo', label: 'TODO', accent: 'var(--cth-sky)' },
- { key: 'doing', label: 'DOING', accent: 'var(--cth-lemon)' },
- { key: 'blocked', label: 'BLOCKED', accent: 'var(--cth-coral)' },
- { key: 'done', label: 'DONE', accent: 'var(--cth-mint)' }
+const COLUMNS: { key: Status; labelKey: string; accent: string }[] = [
+ { key: 'todo', labelKey: 'kanban.colTodo', accent: 'var(--cth-sky)' },
+ { key: 'doing', labelKey: 'kanban.colDoing', accent: 'var(--cth-lemon)' },
+ { key: 'blocked', labelKey: 'kanban.colBlocked', accent: 'var(--cth-coral)' },
+ { key: 'done', labelKey: 'kanban.colDone', accent: 'var(--cth-mint)' }
];
const POLL_MS = 5000;
@@ -115,6 +116,7 @@ export function parseTasks(raw: unknown): HiveTask[] {
* god), never by the human inserting cards the orchestrator never heard about.
*/
export function TasksKanban() {
+ const { t } = useTranslation();
const agents = useStore((s) => s.agents);
const [tasks, setTasks] = useState<HiveTask[]>([]);
// Detail view: cards show just the title — clicking one opens the full
@@ -167,10 +169,10 @@ export function TasksKanban() {
borderBottom: '1px solid var(--cth-ink-300)'
}}>
<span style={{ fontFamily: 'var(--cth-font-display)', fontSize: 9, color: 'var(--cth-ink-500)' }}>
- {tasks.length} task{tasks.length === 1 ? '' : 's'}
+ {t('kanban.count', { count: tasks.length })}
</span>
<span style={{ marginLeft: 'auto', fontSize: 11, color: 'var(--cth-ink-300)' }}>
- new work? dispatch it to Michael (monitor tab)
+ {t('kanban.newWorkHint')}
</span>
</div>
@@ -190,7 +192,7 @@ export function TasksKanban() {
background: col.accent, boxShadow: 'inset 0 -1px 0 var(--cth-ink-900)',
fontFamily: 'var(--cth-font-display)', fontSize: 9, color: 'var(--cth-ink-900)'
}}>
- {col.label}
+ {t(col.labelKey)}
<span style={{ marginLeft: 'auto', fontSize: 11, fontFamily: 'var(--cth-font-ui)' }}>{cards.length}</span>
</div>
<div style={{ flex: 1, minHeight: 0, overflowY: 'auto', padding: 6, display: 'flex', flexDirection: 'column', gap: 6 }}>
@@ -228,11 +230,12 @@ function TaskCard({ task, accent, assigneeName, onOpen, onDismiss }: {
onOpen: () => void;
onDismiss: () => void;
}) {
+ const { t } = useTranslation();
return (
<div style={{ position: 'relative', display: 'flex' }}>
<button
onClick={onOpen}
- title="open task details"
+ title={t('kanban.openTaskDetails')}
style={{
flex: 1, minWidth: 0,
display: 'flex', alignItems: 'stretch', gap: 0, padding: 0,
@@ -255,7 +258,7 @@ function TaskCard({ task, accent, assigneeName, onOpen, onDismiss }: {
)}
</span>
{waitsOnHuman(task) && (
- <span title="waiting on YOUR answer — see the ASK ME tab" style={{
+ <span title={t('kanban.needsYouTitle')} style={{
alignSelf: 'center', marginRight: 18, flexShrink: 0,
fontFamily: 'var(--cth-font-display)', fontSize: 10, padding: '2px 5px 1px',
background: 'var(--cth-lilac)', color: 'var(--cth-ink-900)',
@@ -266,8 +269,8 @@ function TaskCard({ task, accent, assigneeName, onOpen, onDismiss }: {
{/* Dismiss — sibling button (not nested) so it never triggers onOpen. */}
<button
onClick={(e) => { e.stopPropagation(); onDismiss(); }}
- title="dismiss this task (removes it from the board)"
- aria-label="dismiss task"
+ title={t('kanban.dismissTitle')}
+ aria-label={t('kanban.dismissAria')}
style={{
position: 'absolute', top: 0, right: 0, width: 16, height: 16, padding: 0,
display: 'flex', alignItems: 'center', justifyContent: 'center', lineHeight: 1,
@@ -298,6 +301,7 @@ export function TaskDetail({ task, all, assigneeName, onMove, onAssign, onClose
onAssign: () => void;
onClose: () => void;
}) {
+ const { t } = useTranslation();
const col = COLUMNS.find((c) => c.key === task.status) ?? COLUMNS[0];
// Belt + suspenders: parseTasks normalizes these, but the ledger is a
// hand-written file — never trust a card's shape at the point of use.
@@ -315,7 +319,7 @@ export function TaskDetail({ task, all, assigneeName, onMove, onAssign, onClose
}}
>
<div onClick={(e) => e.stopPropagation()} style={{ width: 720, maxWidth: '94vw', maxHeight: '90vh', display: 'flex' }}>
- <PixelPanel variant="dialog" title="TASK" noPadding style={{ display: 'flex', flexDirection: 'column', width: '100%', minHeight: 0 }}>
+ <PixelPanel variant="dialog" title={t('kanban.taskTitle')} noPadding style={{ display: 'flex', flexDirection: 'column', width: '100%', minHeight: 0 }}>
<div style={{ padding: 14, display: 'flex', flexDirection: 'column', gap: 10, minHeight: 0, overflowY: 'auto' }}>
{/* Title under a status-colored bar */}
<div style={{ borderLeft: `4px solid ${col.accent}`, paddingLeft: 8 }}>
@@ -329,10 +333,10 @@ export function TaskDetail({ task, all, assigneeName, onMove, onAssign, onClose
<span style={{
fontFamily: 'var(--cth-font-display)', fontSize: 8, padding: '2px 6px 1px',
background: col.accent, color: 'var(--cth-ink-900)', boxShadow: 'inset 0 0 0 1px var(--cth-ink-300)'
- }}>{col.label}</span>
+ }}>{t(col.labelKey)}</span>
{assigneeName
? <PixelBadge status="working" label={assigneeName} />
- : <span style={{ fontSize: 11, color: 'var(--cth-ink-300)' }}>unassigned</span>}
+ : <span style={{ fontSize: 11, color: 'var(--cth-ink-300)' }}>{t('kanban.unassigned')}</span>}
<PriorityDots level={Math.max(1, Math.min(5, task.priority))} />
<span style={{ marginLeft: 'auto', fontSize: 10, color: 'var(--cth-ink-500)', fontFamily: 'var(--cth-font-display)' }}>
{isNaN(created.getTime()) ? '' : created.toLocaleString()}
@@ -346,14 +350,14 @@ export function TaskDetail({ task, all, assigneeName, onMove, onAssign, onClose
fontFamily: 'var(--cth-font-mono)', fontSize: 12, lineHeight: '18px',
color: 'var(--cth-ink-900)', whiteSpace: 'pre-wrap', wordBreak: 'break-word'
}}>
- {task.description?.trim() || <span style={{ color: 'var(--cth-ink-300)' }}>(no description on this card)</span>}
+ {task.description?.trim() || <span style={{ color: 'var(--cth-ink-300)' }}>{t('kanban.noDescription')}</span>}
</div>
{/* The human Q&A trail — every decision documented on the card */}
{(task.humanQA?.length ?? 0) > 0 && (
<div style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
<div style={{ fontFamily: 'var(--cth-font-display)', fontSize: 8, color: 'var(--cth-ink-500)' }}>
- HUMAN Q&A
+ {t('kanban.humanQA')}
</div>
{task.humanQA!.map((e, i) => (
<div key={i} style={{ display: 'flex', flexDirection: 'column', gap: 2 }}>
@@ -376,7 +380,7 @@ export function TaskDetail({ task, all, assigneeName, onMove, onAssign, onClose
</div>
) : (
<div style={{ fontSize: 11, color: 'var(--cth-coral)', fontFamily: 'var(--cth-font-display)' }}>
- AWAITING YOUR ANSWER — ASK ME TAB
+ {t('kanban.awaitingAnswer')}
</div>
)}
</div>
@@ -388,7 +392,7 @@ export function TaskDetail({ task, all, assigneeName, onMove, onAssign, onClose
{deps.length > 0 && (
<div style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
<div style={{ fontFamily: 'var(--cth-font-display)', fontSize: 8, color: 'var(--cth-ink-500)' }}>
- DEPENDS ON
+ {t('kanban.dependsOn')}
</div>
{deps.map((d) => {
const dc = COLUMNS.find((c) => c.key === d.status) ?? COLUMNS[0];
@@ -417,14 +421,14 @@ export function TaskDetail({ task, all, assigneeName, onMove, onAssign, onClose
fontSize: 12, color: 'var(--cth-ink-900)', cursor: 'pointer'
}}
>
- {COLUMNS.map((c) => (<option key={c.key} value={c.key}>{c.label.toLowerCase()}</option>))}
+ {COLUMNS.map((c) => (<option key={c.key} value={c.key}>{t(c.labelKey).toLowerCase()}</option>))}
</select>
<PixelButton variant="secondary" size="sm" onClick={onAssign}>
<span style={{ display: 'inline-flex', alignItems: 'center', gap: 3 }}>
- <Icon name="arrow-right" /> assign
+ <Icon name="arrow-right" /> {t('kanban.assign')}
</span>
</PixelButton>
- <PixelButton variant="ghost" size="sm" onClick={onClose}>close</PixelButton>
+ <PixelButton variant="ghost" size="sm" onClick={onClose}>{t('common.close')}</PixelButton>
</div>
</div>
</PixelPanel>
@@ -434,10 +438,11 @@ export function TaskDetail({ task, all, assigneeName, onMove, onAssign, onClose
}
function PriorityDots({ level }: { level: number }) {
+ const { t } = useTranslation();
// 1 = lowest, 5 = highest. Warmer fill as priority climbs.
const color = level >= 4 ? 'var(--cth-coral)' : level === 3 ? 'var(--cth-lemon)' : 'var(--cth-mint)';
return (
- <span title={`Priority ${level}/5`} style={{ display: 'inline-flex', gap: 1, flexShrink: 0, marginTop: 2 }}>
+ <span title={t('kanban.priority', { level })} style={{ display: 'inline-flex', gap: 1, flexShrink: 0, marginTop: 2 }}>
{[1, 2, 3, 4, 5].map((i) => (
<span key={i} style={{
width: 4, height: 8,
diff --git a/src/renderer/src/components/ThreadsPanel.tsx b/src/renderer/src/components/ThreadsPanel.tsx
index d9e8e759..d16cb9aa 100644
--- a/src/renderer/src/components/ThreadsPanel.tsx
+++ b/src/renderer/src/components/ThreadsPanel.tsx
@@ -1,4 +1,5 @@
import { useEffect, useMemo, useState } from 'react';
+import { useTranslation } from 'react-i18next';
import { PixelPanel } from './PixelPanel';
import { PixelButton } from './PixelButton';
@@ -26,7 +27,7 @@ const ACT_COLOR: Record<string, string> = {
query: 'var(--cth-lemon)', agree: 'var(--cth-mint)', refuse: 'var(--cth-coral)', done: 'var(--cth-mint)'
};
-function groupThreads(msgs: HiveMessage[]): Thread[] {
+function groupThreads(msgs: HiveMessage[], noSubject: string): Thread[] {
const by = new Map<string, HiveMessage[]>();
for (const m of msgs) {
const arr = by.get(m.conversation) ?? [];
@@ -36,7 +37,7 @@ function groupThreads(msgs: HiveMessage[]): Thread[] {
return [...by.entries()]
.map(([conversation, list]) => {
const sorted = [...list].sort((a, b) => (a.created_at < b.created_at ? -1 : 1));
- return { conversation, subject: sorted[0]?.subject || '(no subject)', messages: sorted };
+ return { conversation, subject: sorted[0]?.subject || noSubject, messages: sorted };
})
.sort((a, b) => {
const la = a.messages[a.messages.length - 1].created_at;
@@ -46,6 +47,7 @@ function groupThreads(msgs: HiveMessage[]): Thread[] {
}
export function ThreadsPanel({ agentId }: ThreadsPanelProps) {
+ const { t } = useTranslation();
const [messages, setMessages] = useState<HiveMessage[]>([]);
const [openThreads, setOpenThreads] = useState<Record<string, boolean>>({});
const [expanded, setExpanded] = useState<Record<string, boolean>>({});
@@ -60,11 +62,11 @@ export function ThreadsPanel({ agentId }: ThreadsPanelProps) {
} catch { /* keep last good state */ }
};
load();
- const t = setInterval(load, 3000);
- return () => { alive = false; clearInterval(t); };
+ const timer = setInterval(load, 3000);
+ return () => { alive = false; clearInterval(timer); };
}, [agentId]);
- const threads = useMemo(() => groupThreads(messages), [messages]);
+ const threads = useMemo(() => groupThreads(messages, t('threads.noSubject')), [messages, t]);
const sendReply = async (last: HiveMessage) => {
const body = (drafts[last.conversation] ?? '').trim();
@@ -80,7 +82,7 @@ export function ThreadsPanel({ agentId }: ThreadsPanelProps) {
return (
<div style={{ flex: 1, display: 'flex', alignItems: 'center', justifyContent: 'center', padding: 16, background: 'var(--cth-paper-200)' }}>
<p style={{ margin: 0, fontSize: 13, color: 'var(--cth-ink-700)', textAlign: 'center', maxWidth: 280 }}>
- No conversations yet. Messages this agent receives will appear here as threads.
+ {t('threads.empty')}
</p>
</div>
);
@@ -134,7 +136,7 @@ export function ThreadsPanel({ agentId }: ThreadsPanelProps) {
<button
onClick={() => setExpanded(s => ({ ...s, [m.id]: !isExp }))}
style={{ marginLeft: 6, border: 'none', background: 'transparent', cursor: 'pointer', color: 'var(--cth-sky)', fontFamily: 'var(--cth-font-ui)', fontSize: 12, padding: 0 }}
- >{isExp ? 'less' : 'more'}</button>
+ >{isExp ? t('threads.less') : t('threads.more')}</button>
)}
</div>
</div>
@@ -145,7 +147,7 @@ export function ThreadsPanel({ agentId }: ThreadsPanelProps) {
<textarea
value={drafts[thread.conversation] ?? ''}
onChange={e => setDrafts(d => ({ ...d, [thread.conversation]: e.target.value }))}
- placeholder={`Reply to ${last.from}…`}
+ placeholder={t('threads.replyPlaceholder', { name: last.from })}
rows={2}
style={{
resize: 'vertical', width: '100%', boxSizing: 'border-box', padding: '6px 8px',
@@ -156,7 +158,7 @@ export function ThreadsPanel({ agentId }: ThreadsPanelProps) {
/>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
<PixelButton size="sm" onClick={() => sendReply(last)} disabled={!(drafts[thread.conversation] ?? '').trim()}>
- Send
+ {t('threads.send')}
</PixelButton>
</div>
</div>
diff --git a/src/renderer/src/components/UpdatesSection.tsx b/src/renderer/src/components/UpdatesSection.tsx
index 52d4708a..e5d0bf3c 100644
--- a/src/renderer/src/components/UpdatesSection.tsx
+++ b/src/renderer/src/components/UpdatesSection.tsx
@@ -12,13 +12,15 @@
* disagree about what is installed.
*/
import { useCallback, useEffect, useMemo, useState } from 'react';
+import { Trans, useTranslation } from 'react-i18next';
import { summarizeReleaseNotes } from '@shared/releaseNotes';
-import { describeUpdateSettings, manualDownloadUrl, manualInstallSteps, pendingVersion, reduceStatus, type UpdateStatus } from '@shared/updateState';
+import { describeUpdateSettings, manualDownloadUrl, manualInstallSteps, pendingVersion, reduceStatus, clampPercent, type UpdateStatus } from '@shared/updateState';
import { PixelButton } from './PixelButton';
declare const __APP_VERSION__: string;
export function UpdatesSection() {
+ const { t } = useTranslation();
const [status, setStatus] = useState<UpdateStatus | null>(null);
const [busy, setBusy] = useState(false);
@@ -45,6 +47,64 @@ export function UpdatesSection() {
setManualStarted(pending);
};
+ // The shared describeUpdateSettings() renders English prose (it also feeds the
+ // toolbar badge and the toast, which are not i18n'd yet). For THIS block we
+ // re-derive the three prose fields from the status through i18n, keeping the
+ // shared function as the single source of truth for tone/action/busy.
+ const v = __APP_VERSION__;
+ const localized: { headline: string; detail: string; button: string | null } = (() => {
+ switch (status?.state) {
+ case 'checking':
+ return { headline: t('updatesSection.onVersion', { v }), detail: t('updatesSection.checkingDetail'), button: null };
+ case 'available':
+ return {
+ headline: t('updatesSection.availableHeadline', { version: status.version }),
+ detail: t('updatesSection.availableDetail', { v }),
+ button: t('updatesSection.downloadBtn', { version: status.version })
+ };
+ case 'downloading':
+ return {
+ headline: t('updatesSection.downloadingHeadline', { version: status.version }),
+ detail: t('updatesSection.downloadingDetail', { percent: clampPercent(status.percent) }),
+ button: null
+ };
+ case 'downloaded':
+ return {
+ headline: t('updatesSection.downloadedHeadline', { version: status.version }),
+ detail: t('updatesSection.downloadedDetail', { v }),
+ button: t('updatesSection.restartBtn')
+ };
+ case 'available-manual':
+ return {
+ headline: t('updatesSection.availableHeadline', { version: status.version }),
+ detail: status.reason
+ ? t('updatesSection.manualDetailReason', { reason: status.reason })
+ : t('updatesSection.manualDetail'),
+ button: t('updatesSection.openReleaseBtn')
+ };
+ case 'error':
+ return {
+ headline: t('updatesSection.errorHeadline'),
+ detail: t('updatesSection.errorDetail', { message: status.message, v }),
+ button: t('updatesSection.retryBtn')
+ };
+ case 'not-available':
+ return {
+ headline: t('updatesSection.latestHeadline', { v }),
+ detail: t('updatesSection.latestDetail'),
+ button: t('updatesSection.checkAgainBtn')
+ };
+ case 'idle':
+ default:
+ return {
+ headline: t('updatesSection.onVersion', { v }),
+ detail: t('updatesSection.idleDetail'),
+ button: t('updatesSection.checkBtn')
+ };
+ }
+ })();
+ const viewText = { ...view, headline: localized.headline, detail: localized.detail, button: localized.button };
+
// Same digest the update toast renders (src/shared/releaseNotes.ts), for the
// same reason: the release body is already in hand, and "what would I get?"
// is the second question anyone asks after "is there a new version?". Only
@@ -74,7 +134,7 @@ export function UpdatesSection() {
fontFamily: 'var(--cth-font-display)', fontSize: 8, lineHeight: '12px',
color: 'var(--cth-ink-500)', textTransform: 'uppercase', marginBottom: 10
}}>
- Updates
+ {t('updatesSection.title')}
</div>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 12 }}>
<div style={{ display: 'flex', flexDirection: 'column', gap: 2, minWidth: 0 }}>
@@ -82,12 +142,12 @@ export function UpdatesSection() {
fontSize: 13, lineHeight: '20px', color: 'var(--cth-ink-900)',
// Only an actionable state earns emphasis; "you're up to date" is
// information, not a call to action.
- fontWeight: view.tone === 'ready' ? 600 : 400
+ fontWeight: viewText.tone === 'ready' ? 600 : 400
}}>
- {view.headline}
+ {viewText.headline}
</span>
<span style={{ fontSize: 12, lineHeight: '16px', color: 'var(--cth-ink-500)' }}>
- {view.detail}
+ {viewText.detail}
</span>
</div>
<div style={{ display: 'flex', gap: 8, flexShrink: 0, alignItems: 'center' }}>
@@ -97,27 +157,27 @@ export function UpdatesSection() {
size="sm"
onClick={downloadManually}
style={{ whiteSpace: 'nowrap' }}
- title={`Download the v${pending} installer and replace the app yourself`}
+ title={t('updatesSection.downloadManuallyTitle', { version: pending })}
>
- download manually
+ {t('updatesSection.downloadManually')}
</PixelButton>
)}
- {view.button && (
+ {viewText.button && (
<PixelButton
- variant={view.tone === 'ready' ? 'primary' : 'secondary'}
- size="sm"
- onClick={() => { void onClick(); }}
- disabled={busy || view.busy}
- // The label is a phrase ("Check for updates", "Restart to update"),
- // and this row is a flex line whose left column carries two lines of
- // prose. Without these the button is the flexible item: it gets
- // squeezed, the label wraps to two lines, and because the button's
- // height comes from its size variant the second line prints straight
- // through the bottom border. Refuse to shrink and refuse to wrap —
- // the prose column already has minWidth: 0, so it yields instead.
- style={{ flexShrink: 0, whiteSpace: 'nowrap' }}
- >
- {view.button}
+ variant={viewText.tone === 'ready' ? 'primary' : 'secondary'}
+ size="sm"
+ onClick={() => { void onClick(); }}
+ disabled={busy || viewText.busy}
+ // The label is a phrase ("Check for updates", "Restart to update"),
+ // and this row is a flex line whose left column carries two lines of
+ // prose. Without these the button is the flexible item: it gets
+ // squeezed, the label wraps to two lines, and because the button's
+ // height comes from its size variant the second line prints straight
+ // through the bottom border. Refuse to shrink and refuse to wrap —
+ // the prose column already has minWidth: 0, so it yields instead.
+ style={{ flexShrink: 0, whiteSpace: 'nowrap' }}
+ >
+ {viewText.button}
</PixelButton>
)}
</div>
@@ -128,8 +188,13 @@ export function UpdatesSection() {
color: 'var(--cth-ink-900)', background: 'var(--cth-paper-100)',
border: '2px solid var(--cth-ink-900)'
}}>
- <b>v{manualStarted} is downloading in your browser.</b> When it lands, quit this app, install
- the new version over the current one, open it and pick the same project. On {steps.os}:
+ <Trans i18nKey="updatesSection.manualDownloadingTitle" values={{ version: manualStarted }} components={{ b: <b /> }}>
+ v{manualStarted} is downloading in your browser.
+ </Trans>{' '}
+ <Trans i18nKey="updatesSection.manualDownloadingBody" values={{ os: steps.os }}>
+ When it lands, quit this app, install the new version over the current one, open it and
+ pick the same project. On {steps.os}:
+ </Trans>
<ol style={{ margin: '4px 0 0', paddingLeft: 18, color: 'var(--cth-ink-700)' }}>
{steps.steps.map((t) => <li key={t}>{t}</li>)}
</ol>
diff --git a/src/renderer/src/components/WorkersTab.tsx b/src/renderer/src/components/WorkersTab.tsx
index a841e534..80a403ff 100644
--- a/src/renderer/src/components/WorkersTab.tsx
+++ b/src/renderer/src/components/WorkersTab.tsx
@@ -1,4 +1,5 @@
import { useEffect, useState, useCallback } from 'react';
+import { useTranslation } from 'react-i18next';
import { PixelButton } from './PixelButton';
/**
@@ -47,6 +48,7 @@ const sectionHead: React.CSSProperties = {
};
function StatusBadge({ w }: { w: WorkerSnapshot }) {
+ const { t } = useTranslation();
const releasing = w.status === 'releasing';
return (
<span style={{
@@ -56,12 +58,13 @@ function StatusBadge({ w }: { w: WorkerSnapshot }) {
background: releasing ? 'var(--cth-ink-700)' : 'var(--cth-green, #2f8f4e)',
boxShadow: releasing ? 'none' : 'inset 0 0 0 1px var(--cth-ink-100)'
}}>
- {releasing ? 'stopping' : 'working'}
+ {releasing ? t('workersTab.stopping') : t('workersTab.working')}
</span>
);
}
export function WorkersTab() {
+ const { t } = useTranslation();
const [data, setData] = useState<WorkersData | null>(null);
const [stopping, setStopping] = useState<Record<string, boolean>>({});
@@ -71,8 +74,8 @@ export function WorkersTab() {
useEffect(() => {
refresh();
- const t = setInterval(refresh, POLL_MS);
- return () => clearInterval(t);
+ const timer = setInterval(refresh, POLL_MS);
+ return () => clearInterval(timer);
}, [refresh]);
const stop = useCallback((workerId: string) => {
@@ -90,18 +93,18 @@ export function WorkersTab() {
<div style={{ display: 'flex', flexDirection: 'column', gap: 14, padding: '12px 14px 16px', overflow: 'auto' }}>
<div>
<div style={{ display: 'flex', alignItems: 'baseline', justifyContent: 'space-between' }}>
- <span style={sectionHead}>Live workers</span>
+ <span style={sectionHead}>{t('workersTab.liveWorkers')}</span>
<span style={{ fontFamily: 'var(--cth-font-mono)', fontSize: 11, color: 'var(--cth-ink-700)' }}>
{live.length} / {max}
</span>
</div>
<p style={{ fontFamily: 'var(--cth-font-ui)', fontSize: 11, color: 'var(--cth-ink-700)', margin: '2px 0 8px' }}>
- Isolated workers Michael spins up to handle Slack messages — they run to completion, reply in-thread, then tear down.
+ {t('workersTab.liveIntro')}
</p>
{live.length === 0 ? (
<div style={{ ...card, color: 'var(--cth-ink-700)', fontFamily: 'var(--cth-font-ui)', fontSize: 12 }}>
- No workers running right now.
+ {t('workersTab.noneRunning')}
</div>
) : (
<div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
@@ -115,7 +118,7 @@ export function WorkersTab() {
whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis'
}}>{w.name}</span>
{w.hasSlack && (
- <span title="replies to a Slack thread" style={{
+ <span title={t('workersTab.repliesToSlack')} style={{
fontFamily: 'var(--cth-font-mono)', fontSize: 10, color: 'var(--cth-ink-700)',
boxShadow: 'inset 0 0 0 1px var(--cth-ink-100)', padding: '0 5px'
}}>slack</span>
@@ -125,18 +128,18 @@ export function WorkersTab() {
onClick={() => stop(w.workerId)}
disabled={w.releasing || !!stopping[w.workerId]}
>
- {w.releasing || stopping[w.workerId] ? 'stopping…' : 'stop'}
+ {w.releasing || stopping[w.workerId] ? t('workersTab.stoppingEllipsis') : t('workersTab.stop')}
</PixelButton>
</div>
<div style={metaRow}>
- <span title="worker / PTY id">{w.workerId}</span>
- <span title="base branch the worktree was cut from">base: {w.baseBranch}</span>
- <span title="time since spawn">up {relAge(w.ageMs)}</span>
- <span title="time since last terminal output">
- {w.idleMs === null ? 'pty gone' : `idle ${relAge(w.idleMs)}`}
+ <span title={t('workersTab.workerIdTitle')}>{w.workerId}</span>
+ <span title={t('workersTab.baseBranchTitle')}>{t('workersTab.base', { branch: w.baseBranch })}</span>
+ <span title={t('workersTab.upSinceTitle')}>{t('workersTab.up', { age: relAge(w.ageMs) })}</span>
+ <span title={t('workersTab.idleTitle')}>
+ {w.idleMs === null ? t('workersTab.ptyGone') : t('workersTab.idle', { age: relAge(w.idleMs) })}
</span>
- <span title="cumulative tokens (input+output+cache)">
- tokens {fmtTokens(w.tokensUsed)}{w.tokenCap !== null ? ` / ${fmtTokens(w.tokenCap)}` : ' · uncapped'}
+ <span title={t('workersTab.tokensTitle')}>
+ {t('workersTab.tokens', { value: fmtTokens(w.tokensUsed) })}{w.tokenCap !== null ? ` / ${fmtTokens(w.tokenCap)}` : ` · ${t('workersTab.uncapped')}`}
</span>
</div>
</div>
@@ -147,9 +150,9 @@ export function WorkersTab() {
{preserved.length > 0 && (
<div>
- <span style={sectionHead}>Preserved worktrees ({preserved.length})</span>
+ <span style={sectionHead}>{t('workersTab.preserved', { count: preserved.length })}</span>
<p style={{ fontFamily: 'var(--cth-font-ui)', fontSize: 11, color: 'var(--cth-ink-700)', margin: '2px 0 8px' }}>
- Finished workers whose worktree held un-integrated work — kept (never auto-discarded) and auto-reclaimed once the work lands in its base branch.
+ {t('workersTab.preservedIntro')}
</p>
<div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
{preserved.map((p) => (
@@ -159,8 +162,8 @@ export function WorkersTab() {
</div>
<div style={metaRow}>
<span style={{ wordBreak: 'break-all' }}>{p.wtPath}</span>
- <span>base: {p.baseBranch}</span>
- <span>kept {relAge(Math.max(0, Date.now() - p.preservedAt))} ago</span>
+ <span>{t('workersTab.base', { branch: p.baseBranch })}</span>
+ <span>{t('workersTab.keptAgo', { age: relAge(Math.max(0, Date.now() - p.preservedAt)) })}</span>
</div>
</div>
))}
diff --git a/src/renderer/src/components/triggers/ContextSection.tsx b/src/renderer/src/components/triggers/ContextSection.tsx
index 228ef021..d0acd818 100644
--- a/src/renderer/src/components/triggers/ContextSection.tsx
+++ b/src/renderer/src/components/triggers/ContextSection.tsx
@@ -1,4 +1,5 @@
import { useEffect, useRef, useState, type ReactNode } from 'react';
+import { useTranslation } from 'react-i18next';
import type { ContextRule, ContextTriggerConfig } from '@shared/triggers';
import { getContextTrigger, setContextTrigger } from './api';
import {
@@ -15,6 +16,7 @@ import {
const WRITE_DEBOUNCE_MS = 400;
export function ContextSection({ onSummary }: { onSummary?: (s: string) => void }) {
+ const { t } = useTranslation();
const [cfg, setCfg] = useState<ContextTriggerConfig | null>(null);
const timer = useRef<ReturnType<typeof setTimeout> | null>(null);
@@ -29,9 +31,12 @@ export function ContextSection({ onSummary }: { onSummary?: (s: string) => void
useEffect(() => {
if (!cfg) return;
- const on = [cfg.compact.enabled ? 'compact' : null, cfg.clear.enabled ? 'clear' : null].filter(Boolean);
- onSummary?.(on.length ? on.join(' + ') : 'both off');
- }, [cfg, onSummary]);
+ const on = [
+ cfg.compact.enabled ? t('contextSection.compact') : null,
+ cfg.clear.enabled ? t('contextSection.clear') : null
+ ].filter(Boolean);
+ onSummary?.(on.length ? on.join(' + ') : t('contextSection.bothOff'));
+ }, [cfg, onSummary, t]);
// Optimistic + debounced: the controls answer instantly, and a burst of typing
// in the message box collapses into one write instead of one per keystroke.
@@ -45,39 +50,33 @@ export function ContextSection({ onSummary }: { onSummary?: (s: string) => void
commit({ ...cfg, [key]: { ...cfg[key], ...fields } });
};
- if (!cfg) return <Muted>One sec…</Muted>;
+ if (!cfg) return <Muted>{t('contextSection.loading')}</Muted>;
return (
<>
<Muted>
- A rule fires only when both halves agree: the gap since its last run has passed, AND that
- agent&apos;s context is at least as full as the bar. A bar of 0% means the clock alone.
+ {t('contextSection.intro')}
</Muted>
<div style={{ height: 8 }} />
<RuleCard
- title="Compact"
- blurb="Summarises the context so the thread keeps going."
+ title={t('contextSection.compact')}
+ blurb={t('contextSection.compactBlurb')}
rule={cfg.compact}
- messageLabel="EXTRA FOCUS"
- messageHint="Appended to the provider's compaction command. Empty sends the bare command."
- messagePlaceholder="What the summary must keep…"
+ messageLabel={t('contextSection.extraFocus')}
+ messageHint={t('contextSection.extraFocusHint')}
+ messagePlaceholder={t('contextSection.extraFocusPlaceholder')}
onPatch={(fields) => patch('compact', fields)}
/>
<RuleCard
- title="Clear"
- blurb="Discards the context. Nothing is summarised."
+ title={t('contextSection.clear')}
+ blurb={t('contextSection.clearBlurb')}
rule={cfg.clear}
- messageLabel="COMMAND"
- messageHint="Sent literally. Empty sends the bare clear command."
+ messageLabel={t('contextSection.command')}
+ messageHint={t('contextSection.commandHint')}
messagePlaceholder="/clear"
- caution={
- <>
- Clearing throws context away — it is not a smaller version of compaction. An agent
- mid-task forgets what it was doing. Leave this off unless you keep context another way.
- </>
- }
+ caution={t('contextSection.clearCaution')}
onPatch={(fields) => patch('clear', fields)}
/>
</>
@@ -94,6 +93,7 @@ function RuleCard({ title, blurb, rule, messageLabel, messageHint, messagePlaceh
caution?: ReactNode;
onPatch: (fields: Partial<ContextRule>) => void;
}) {
+ const { t } = useTranslation();
const [open, setOpen] = useState(false);
return (
<SubCard>
@@ -111,13 +111,13 @@ function RuleCard({ title, blurb, rule, messageLabel, messageHint, messagePlaceh
{!open && (
<Hint>
{rule.enabled
- ? <>Every {fmtInterval(rule.everyMs)}, once context passes {rule.minContextPct}%.</>
- : <>Off.</>}
+ ? t('contextSection.hintEvery', { interval: fmtInterval(rule.everyMs), pct: rule.minContextPct })
+ : t('contextSection.off')}
</Hint>
)}
{open && (
<div style={{ marginTop: 4 }}>
- <Field label="NO SOONER THAN EVERY">
+ <Field label={t('contextSection.noSoonerThan')}>
{/* Main clamps a context cadence to 1 minute … 24 hours, so the
picker offers exactly that range and never labels a value it
cannot actually store. */}
@@ -128,16 +128,16 @@ function RuleCard({ title, blurb, rule, messageLabel, messageHint, messagePlaceh
maxMs={86_400_000}
/>
</Field>
- <Field label="CONTEXT BAR">
+ <Field label={t('contextSection.contextBar')}>
<PctField value={rule.minContextPct} onChange={(minContextPct) => onPatch({ minContextPct })} />
- <Hint>How full the window must be before this may run. 0% = time alone.</Hint>
+ <Hint>{t('contextSection.contextBarHint')}</Hint>
</Field>
- <Field label="BAR ON BIG WINDOWS">
+ <Field label={t('contextSection.bigWindows')}>
<PctField
value={rule.minContextPctLargeWindow}
onChange={(minContextPctLargeWindow) => onPatch({ minContextPctLargeWindow })}
/>
- <Hint>Used on ~1M-token windows, where a smaller slice is still an enormous amount of text.</Hint>
+ <Hint>{t('contextSection.bigWindowsHint')}</Hint>
</Field>
<Field label={messageLabel}>
<textarea
diff --git a/src/renderer/src/components/triggers/OrgSection.tsx b/src/renderer/src/components/triggers/OrgSection.tsx
index a9181640..5c57db1a 100644
--- a/src/renderer/src/components/triggers/OrgSection.tsx
+++ b/src/renderer/src/components/triggers/OrgSection.tsx
@@ -1,4 +1,5 @@
import { useEffect, useState } from 'react';
+import { useTranslation } from 'react-i18next';
import { useStore } from '@/store/store';
import { CLONE_NODE_BLURB, type OrgTriggerConfig, type TriggerMode } from '@shared/triggers';
import { getOrgTrigger, setOrgTrigger as persistOrgTrigger } from './api';
@@ -17,6 +18,7 @@ import { Callout, Field, Hint, ModePicker, SecretField, Toggle } from './ui';
* persist on the spot.
*/
export function OrgSection({ onSummary }: { onSummary?: (s: string) => void }) {
+ const { t } = useTranslation();
const cfg = useStore((s) => s.orgTrigger);
const mirror = useStore((s) => s.setOrgTrigger);
const [revealed, setRevealed] = useState(false);
@@ -31,8 +33,8 @@ export function OrgSection({ onSummary }: { onSummary?: (s: string) => void }) {
}, [mirror]);
useEffect(() => {
- onSummary?.(!cfg.apiKey.trim() ? 'no key' : cfg.enabled ? 'on' : 'off');
- }, [cfg, onSummary]);
+ onSummary?.(!cfg.apiKey.trim() ? t('orgSection.noKey') : cfg.enabled ? t('common.on') : t('common.off'));
+ }, [cfg, onSummary, t]);
const apply = (next: OrgTriggerConfig, persist = true) => {
mirror(next);
@@ -45,34 +47,33 @@ export function OrgSection({ onSummary }: { onSummary?: (s: string) => void }) {
<>
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
<span style={{ flex: 1, fontSize: 12, color: 'var(--cth-ink-700)' }}>
- Accept messages from your organisation
+ {t('orgSection.acceptMessages')}
</span>
<Toggle on={cfg.enabled} onClick={() => apply({ ...cfg, enabled: !cfg.enabled })} />
</div>
- <Field label="ORGANISATION KEY">
+ <Field label={t('orgSection.key')}>
<SecretField
value={cfg.apiKey}
revealed={revealed}
onReveal={() => setRevealed((r) => !r)}
- placeholder="paste your key"
+ placeholder={t('orgSection.keyPlaceholder')}
onChange={(apiKey) => apply({ ...cfg, apiKey }, false)}
onBlur={() => apply(cfg)}
/>
<Hint>{CLONE_NODE_BLURB}</Hint>
</Field>
- <Field label="TRUST">
+ <Field label={t('orgSection.trust')}>
<ModePicker value={cfg.mode} onChange={(mode: TriggerMode) => apply({ ...cfg, mode })} />
</Field>
<Callout tone="note">
- Settings only, for now. The org messaging service does not exist yet, so a key here starts no
- connection and nothing is sent or received. It is stored ready for when it does.
+ {t('orgSection.settingsOnly')}
</Callout>
{cfg.enabled && !hasKey && (
- <Callout>This is switched on with no key set, so no teammate can reach you yet.</Callout>
+ <Callout>{t('orgSection.noKeyWarning')}</Callout>
)}
</>
);
diff --git a/src/renderer/src/components/triggers/SchedulesSection.tsx b/src/renderer/src/components/triggers/SchedulesSection.tsx
index da750393..26e779a4 100644
--- a/src/renderer/src/components/triggers/SchedulesSection.tsx
+++ b/src/renderer/src/components/triggers/SchedulesSection.tsx
@@ -1,4 +1,6 @@
import { useEffect, useState } from 'react';
+import { useTranslation } from 'react-i18next';
+import type { TFunction } from 'i18next';
import { PixelButton } from '../PixelButton';
import { useStore } from '@/store/store';
import {
@@ -37,16 +39,19 @@ interface ScheduledMission {
const DEFAULT_INTERVAL_MS = 3_600_000;
-function relTime(ms: number): string {
+/** Relative-time label. Needs the translator because the qualifiers ("ago",
+ * "in", "just now") are UI copy, not data. */
+function relTime(ms: number, t: TFunction): string {
const past = ms >= 0;
const a = Math.abs(ms);
- if (a < 45_000) return 'just now';
+ if (a < 45_000) return t('schedulesSection.justNow');
const mins = Math.round(a / 60_000);
const unit = mins < 60 ? `${mins}m` : mins < 1440 ? `${Math.round(mins / 60)}h` : `${Math.round(mins / 1440)}d`;
- return past ? `${unit} ago` : `in ${unit}`;
+ return past ? t('schedulesSection.ago', { unit }) : t('schedulesSection.in', { unit });
}
export function SchedulesSection({ onSummary }: { onSummary?: (s: string) => void }) {
+ const { t } = useTranslation();
const agents = useStore((s) => s.agents);
const [missions, setMissions] = useState<ScheduledMission[]>([]);
const [adding, setAdding] = useState(false);
@@ -66,8 +71,8 @@ export function SchedulesSection({ onSummary }: { onSummary?: (s: string) => voi
useEffect(() => {
const on = missions.filter((m) => m.enabled).length;
- onSummary?.(missions.length === 0 ? 'none' : `${on} of ${missions.length} on`);
- }, [missions, onSummary]);
+ onSummary?.(missions.length === 0 ? t('schedulesSection.summaryNone') : t('schedulesSection.summary', { on, total: missions.length }));
+ }, [missions, onSummary, t]);
// Optimistic: the list is the truth on screen the moment you click, and the
// write is fire-and-forget (the house pattern across the Command Center).
@@ -100,11 +105,11 @@ export function SchedulesSection({ onSummary }: { onSummary?: (s: string) => voi
const whenIsUsable = !mWeekly || weeklyIsUsable(mWeekly);
const targetName = (to: string) =>
- to === 'broadcast' ? 'everyone' : to === 'god' ? 'Michael' : agents.find((a) => a.id === to)?.name ?? to;
+ to === 'broadcast' ? t('schedulesSection.everyone') : to === 'god' ? 'Michael' : agents.find((a) => a.id === to)?.name ?? to;
return (
<>
- {missions.length === 0 && <Muted>Nothing is scheduled yet.</Muted>}
+ {missions.length === 0 && <Muted>{t('schedulesSection.nothingScheduled')}</Muted>}
{missions.map((m) => (
<MissionRow
key={m.id}
@@ -118,28 +123,28 @@ export function SchedulesSection({ onSummary }: { onSummary?: (s: string) => voi
{!adding && (
<div style={{ marginTop: 8 }}>
- <PixelButton variant="secondary" size="sm" onClick={() => setAdding(true)}>add a schedule</PixelButton>
+ <PixelButton variant="secondary" size="sm" onClick={() => setAdding(true)}>{t('schedulesSection.addSchedule')}</PixelButton>
</div>
)}
{adding && (
<SubCard>
- <div style={{ fontFamily: 'var(--cth-font-display)', fontSize: 8, color: 'var(--cth-ink-500)' }}>NEW SCHEDULE</div>
- <Field label="LABEL">
+ <div style={{ fontFamily: 'var(--cth-font-display)', fontSize: 8, color: 'var(--cth-ink-500)' }}>{t('schedulesSection.newSchedule')}</div>
+ <Field label={t('schedulesSection.label')}>
<input
value={mLabel}
onChange={(e) => setMLabel(e.target.value)}
- placeholder="What this run is for"
+ placeholder={t('schedulesSection.labelPlaceholder')}
style={inputStyle}
/>
</Field>
- <Field label="GOES TO">
+ <Field label={t('schedulesSection.goesTo')}>
<Select value={mTo} onChange={setMTo} style={{ width: '100%' }}>
- <option value="broadcast">everyone</option>
+ <option value="broadcast">{t('schedulesSection.everyone')}</option>
<option value="god">Michael</option>
{agents.filter((a) => !a.isGod).map((a) => <option key={a.id} value={a.id}>{a.name}</option>)}
</Select>
</Field>
- <Field label="WHEN">
+ <Field label={t('schedulesSection.when')}>
<SchedulePicker
intervalMs={mInterval}
weekly={mWeekly}
@@ -147,21 +152,21 @@ export function SchedulesSection({ onSummary }: { onSummary?: (s: string) => voi
onWeekly={setMWeekly}
/>
</Field>
- <Field label="PROMPT">
+ <Field label={t('schedulesSection.prompt')}>
<textarea
value={mBody}
onChange={(e) => setMBody(e.target.value)}
rows={3}
- placeholder="Sent word for word on every run."
+ placeholder={t('schedulesSection.promptPlaceholder')}
style={textareaStyle}
/>
</Field>
<div style={{ display: 'flex', gap: 6, marginTop: 8 }}>
<PixelButton variant="primary" size="sm" onClick={add} disabled={!mLabel.trim() || !mBody.trim() || !whenIsUsable}>
- add
+ {t('common.add')}
</PixelButton>
<PixelButton variant="ghost" size="sm" onClick={() => { setAdding(false); setMLabel(''); setMBody(''); setMWeekly(null); }}>
- cancel
+ {t('common.cancel')}
</PixelButton>
</div>
</SubCard>
@@ -181,6 +186,7 @@ function MissionRow({ mission, targetName, agents, onPatch, onDelete }: {
onPatch: (fields: Partial<ScheduledMission>) => void;
onDelete: () => void;
}) {
+ const { t } = useTranslation();
const [open, setOpen] = useState(false);
const [label, setLabel] = useState(mission.label);
const [to, setTo] = useState(mission.to);
@@ -212,14 +218,18 @@ function MissionRow({ mission, targetName, agents, onPatch, onDelete }: {
|| weeklyKey(weekly) !== weeklyKey(storedWeekly);
const whenIsUsable = !weekly || weeklyIsUsable(weekly);
- const fired = mission.lastFiredAt ? `fired ${relTime(Date.now() - mission.lastFiredAt)}` : 'not yet fired';
+ const fired = mission.lastFiredAt
+ ? t('schedulesSection.fired', { time: relTime(Date.now() - mission.lastFiredAt, t) })
+ : t('schedulesSection.notFired');
// A weekly mission's next run comes from the calendar, not from lastFiredAt +
// interval — and unlike the interval case it is knowable before the first run,
// so a schedule that has never fired can still say when it will.
const nextAt = storedWeekly
? nextWeeklyFireMs(storedWeekly, Date.now())
: mission.lastFiredAt ? mission.lastFiredAt + mission.intervalMs : null;
- const next = mission.enabled && nextAt !== null ? ` · next ${relTime(Date.now() - nextAt)}` : '';
+ const next = mission.enabled && nextAt !== null
+ ? ` · ${t('schedulesSection.next', { time: relTime(Date.now() - nextAt, t) })}`
+ : '';
const save = () => {
const trimmed = label.trim();
@@ -243,14 +253,14 @@ function MissionRow({ mission, targetName, agents, onPatch, onDelete }: {
title={
<span style={{ display: 'flex', alignItems: 'center', gap: 6, minWidth: 0 }}>
<Chip tone={mission.enabled ? 'on' : 'off'}>
- {heartbeat ? '♥ beat' : storedWeekly ? formatWeekly(storedWeekly) : fmtInterval(mission.intervalMs)}
+ {heartbeat ? t('schedulesSection.beat') : storedWeekly ? formatWeekly(storedWeekly) : fmtInterval(mission.intervalMs)}
</Chip>
<span style={{ flex: 1, minWidth: 0, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>
{mission.label}
</span>
</span>
}
- sub={<>→ {targetName(mission.to)} · {fired}{next}</>}
+ sub={<>{`→ ${targetName(mission.to)}`} · {fired}{next}</>}
right={<Toggle on={mission.enabled} onClick={() => onPatch({ enabled: !mission.enabled })} />}
/>
@@ -262,44 +272,44 @@ function MissionRow({ mission, targetName, agents, onPatch, onDelete }: {
background: 'var(--cth-paper-100)', boxShadow: 'inset 0 0 0 1px var(--cth-ink-100)',
fontFamily: 'var(--cth-font-mono)', fontSize: 11, lineHeight: '15px',
color: 'var(--cth-ink-700)', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap'
- }}>{mission.body.trim() || 'No prompt set.'}</div>
+ }}>{mission.body.trim() || t('schedulesSection.noPrompt')}</div>
)}
{open && (
<div style={{ marginTop: 4 }}>
- <Field label="LABEL">
+ <Field label={t('schedulesSection.label')}>
<input value={label} onChange={(e) => setLabel(e.target.value)} style={inputStyle} />
</Field>
- <Field label="GOES TO">
+ <Field label={t('schedulesSection.goesTo')}>
<Select value={to} onChange={setTo} style={{ width: '100%' }}>
- <option value="broadcast">everyone</option>
+ <option value="broadcast">{t('schedulesSection.everyone')}</option>
<option value="god">Michael</option>
{agents.filter((a) => !a.isGod).map((a) => <option key={a.id} value={a.id}>{a.name}</option>)}
</Select>
</Field>
- <Field label="WHEN">
+ <Field label={t('schedulesSection.when')}>
{/* The heartbeat has no calendar: it is a cadence that adapts to how
busy the floor is, so pinning it to Tuesdays would be a lie. */}
{heartbeat
? <SchedulePicker intervalMs={intervalMs} weekly={null} onInterval={setIntervalMs} onWeekly={() => { /* interval only */ }} />
: <SchedulePicker intervalMs={intervalMs} weekly={weekly} onInterval={setIntervalMs} onWeekly={setWeekly} />}
- {heartbeat && <Hint>The beat adapts to how quiet the floor is, so this is the ceiling, not the exact gap.</Hint>}
+ {heartbeat && <Hint>{t('schedulesSection.beatCeiling')}</Hint>}
</Field>
- <Field label="PROMPT">
+ <Field label={t('schedulesSection.prompt')}>
<textarea
value={body}
onChange={(e) => setBody(e.target.value)}
rows={4}
- placeholder="Sent word for word on every run."
+ placeholder={t('schedulesSection.promptPlaceholder')}
style={textareaStyle}
/>
</Field>
<div style={{ display: 'flex', alignItems: 'center', gap: 6, marginTop: 8 }}>
<PixelButton variant="primary" size="sm" onClick={save} disabled={!dirty || !label.trim() || !whenIsUsable}>
- {saved && !dirty ? 'saved' : 'save'}
+ {saved && !dirty ? t('schedulesSection.saved') : t('common.save')}
</PixelButton>
<span style={{ flex: 1 }} />
- <MiniButton tone="danger" onClick={onDelete}>delete</MiniButton>
+ <MiniButton tone="danger" onClick={onDelete}>{t('common.delete')}</MiniButton>
</div>
</div>
)}
diff --git a/src/renderer/src/components/triggers/TriggerHistoryTab.tsx b/src/renderer/src/components/triggers/TriggerHistoryTab.tsx
index 81c94cce..22d2cd29 100644
--- a/src/renderer/src/components/triggers/TriggerHistoryTab.tsx
+++ b/src/renderer/src/components/triggers/TriggerHistoryTab.tsx
@@ -1,4 +1,6 @@
import { useCallback, useEffect, useMemo, useState, type CSSProperties } from 'react';
+import { useTranslation } from 'react-i18next';
+import type { TFunction } from 'i18next';
import { PixelButton } from '../PixelButton';
import type { TriggerHistoryEntry } from '@shared/triggers';
@@ -103,13 +105,13 @@ function buildExchanges(rows: TriggerHistoryEntry[]): Exchange[] {
/* ──────────────────────────────── helpers ────────────────────────────────── */
// Copied, not imported: SchedulesTab.tsx is being deleted.
-function relTime(ms: number): string {
+function relTime(ms: number, t: TFunction): string {
const past = ms >= 0;
const a = Math.abs(ms);
- if (a < 45_000) return 'just now';
+ if (a < 45_000) return t('triggerHistory.justNow');
const mins = Math.round(a / 60_000);
const unit = mins < 60 ? `${mins}m` : mins < 1440 ? `${Math.round(mins / 60)}h` : `${Math.round(mins / 1440)}d`;
- return past ? `${unit} ago` : `in ${unit}`;
+ return past ? t('triggerHistory.ago', { unit }) : t('triggerHistory.in', { unit });
}
const CLAMP_CHARS = 320;
@@ -174,21 +176,23 @@ function Badge({ fill, line, children }: { fill: string; line: string; children:
}
function KindBadge({ kind }: { kind: TriggerHistoryEntry['kind'] }) {
+ const { t } = useTranslation();
return kind === 'directive'
- ? <Badge fill="var(--cth-lemon-light)" line="var(--cth-lemon)">directive</Badge>
- : <Badge fill="var(--cth-sky-light)" line="var(--cth-sky)">communication</Badge>;
+ ? <Badge fill="var(--cth-lemon-light)" line="var(--cth-lemon)">{t('triggerHistory.kindDirective')}</Badge>
+ : <Badge fill="var(--cth-sky-light)" line="var(--cth-sky)">{t('triggerHistory.kindCommunication')}</Badge>;
}
function DecisionBadge({ decision }: { decision: NonNullable<TriggerHistoryEntry['decision']> }) {
+ const { t } = useTranslation();
switch (decision) {
case 'pending':
- return <Badge fill="var(--cth-lemon-light)" line="var(--cth-lemon)">needs you</Badge>;
+ return <Badge fill="var(--cth-lemon-light)" line="var(--cth-lemon)">{t('triggerHistory.decisionPending')}</Badge>;
case 'approved':
- return <Badge fill="var(--cth-mint-light)" line="var(--cth-mint)">approved</Badge>;
+ return <Badge fill="var(--cth-mint-light)" line="var(--cth-mint)">{t('triggerHistory.decisionApproved')}</Badge>;
case 'rejected':
- return <Badge fill="var(--cth-coral-light)" line="var(--cth-coral)">rejected</Badge>;
+ return <Badge fill="var(--cth-coral-light)" line="var(--cth-coral)">{t('triggerHistory.decisionRejected')}</Badge>;
default:
- return <Badge fill="var(--cth-cream-200)" line="var(--cth-ink-300)">auto-allowed</Badge>;
+ return <Badge fill="var(--cth-cream-200)" line="var(--cth-ink-300)">{t('triggerHistory.decisionAuto')}</Badge>;
}
}
@@ -205,18 +209,19 @@ function MessageBlock({
expanded: boolean;
onToggle: () => void;
}) {
+ const { t } = useTranslation();
const body = msg.body ?? '';
const { text, clipped } = useMemo(() => clampBody(body), [body]);
return (
<div style={{ display: 'flex', flexDirection: 'column', gap: 4, minWidth: 0 }}>
<div style={{ display: 'flex', alignItems: 'baseline', gap: 8, justifyContent: 'space-between' }}>
<span style={tinyCaps}>{label}</span>
- <span style={{ ...tinyCaps, flexShrink: 0 }}>{relTime(Date.now() - msg.at)}</span>
+ <span style={{ ...tinyCaps, flexShrink: 0 }}>{relTime(Date.now() - msg.at, t)}</span>
</div>
- <div style={bodyBox}>{body.trim() ? (expanded ? body : text) : '(empty message)'}</div>
+ <div style={bodyBox}>{body.trim() ? (expanded ? body : text) : t('triggerHistory.emptyMessage')}</div>
{clipped && (
<button type="button" onClick={onToggle} style={linkButton}>
- {expanded ? 'show less' : `show all ${body.length} characters`}
+ {expanded ? t('triggerHistory.showLess') : t('triggerHistory.showAll', { count: body.length })}
</button>
)}
</div>
@@ -238,6 +243,7 @@ function ExchangeCard({
busy: Record<string, boolean>;
onDecide: (id: string, decision: 'approved' | 'rejected') => void;
}) {
+ const { t } = useTranslation();
const head = ex.head;
const hasInbound = ex.msgs.some((m) => m.direction === 'inbound');
const decision = head.decision;
@@ -248,8 +254,8 @@ function ExchangeCard({
// is normal — it is a message still in flight, never a failure.
const tail = (() => {
if (pending || ex.answered) return null;
- if (decision === 'rejected') return 'You turned this down. Nothing was sent to the hive.';
- return 'No reply yet. Michael has this one.';
+ if (decision === 'rejected') return t('triggerHistory.tailRejected');
+ return t('triggerHistory.tailNoReply');
})();
return (
@@ -259,19 +265,19 @@ function ExchangeCard({
background: 'var(--cth-lemon-light)', boxShadow: 'inset 0 0 0 1px var(--cth-lemon)',
padding: '4px 6px 3px', ...tinyCaps, color: 'var(--cth-ink-900)'
}}>
- WAITING FOR YOU
+ {t('triggerHistory.waitingForYou')}
</div>
)}
<div style={{ display: 'flex', flexDirection: 'column', gap: 2, minWidth: 0 }}>
<div style={{ display: 'flex', alignItems: 'baseline', gap: 8, justifyContent: 'space-between' }}>
<span style={{ ...uiText, ...ellipsis, minWidth: 0 }} title={head.sourceName}>
- {head.sourceName || 'unnamed source'}
+ {head.sourceName || t('triggerHistory.unnamedSource')}
</span>
- <span style={{ ...tinyCaps, flexShrink: 0 }}>{relTime(Date.now() - ex.latestAt)}</span>
+ <span style={{ ...tinyCaps, flexShrink: 0 }}>{relTime(Date.now() - ex.latestAt, t)}</span>
</div>
<div style={{ ...muted, ...ellipsis, fontSize: 11 }} title={head.peer}>
- {hasInbound ? 'from' : 'to'} {head.peer || 'unknown'}
+ {hasInbound ? t('triggerHistory.from') : t('triggerHistory.to')} {head.peer || t('triggerHistory.unknown')}
</div>
{head.title && (
<div style={{ ...uiText, ...ellipsis, color: 'var(--cth-ink-700)' }} title={head.title}>
@@ -289,7 +295,7 @@ function ExchangeCard({
<MessageBlock
key={m.id}
msg={m}
- label={m.direction === 'inbound' ? 'THEY SENT' : hasInbound ? 'WE REPLIED' : 'WE SENT'}
+ label={m.direction === 'inbound' ? t('triggerHistory.theySent') : hasInbound ? t('triggerHistory.weReplied') : t('triggerHistory.weSent')}
expanded={!!expanded[m.id]}
onToggle={() => toggle(m.id)}
/>
@@ -299,8 +305,8 @@ function ExchangeCard({
<div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>
<div style={{ ...uiText, fontSize: 11, lineHeight: '16px', color: 'var(--cth-ink-700)' }}>
{pending.kind === 'directive'
- ? 'Approve and this goes to Michael, who will put the hive to work on it. Reject and it is dropped — nothing runs.'
- : 'Approve and Michael reads this. Reject and it is dropped — nothing runs.'}
+ ? t('triggerHistory.pendingDirectiveDesc')
+ : t('triggerHistory.pendingDesc')}
</div>
<div style={{ display: 'flex', gap: 6 }}>
<PixelButton
@@ -308,18 +314,18 @@ function ExchangeCard({
size="sm"
disabled={!!busy[pending.id]}
onClick={() => onDecide(pending.id, 'approved')}
- title="Send this message through to Michael"
+ title={t('triggerHistory.approveTitle')}
>
- {busy[pending.id] ? 'one sec…' : 'approve'}
+ {busy[pending.id] ? t('triggerHistory.oneSec') : t('triggerHistory.approve')}
</PixelButton>
<PixelButton
variant="secondary"
size="sm"
disabled={!!busy[pending.id]}
onClick={() => onDecide(pending.id, 'rejected')}
- title="Drop this message. Nothing is sent"
+ title={t('triggerHistory.rejectTitle')}
>
- reject
+ {t('triggerHistory.reject')}
</PixelButton>
</div>
</div>
@@ -328,7 +334,7 @@ function ExchangeCard({
{tail && <div style={{ ...muted, fontSize: 11 }}>{tail}</div>}
{taskId && (
- <div style={{ ...tinyCaps, ...ellipsis }} title={taskId}>TASK {taskId}</div>
+ <div style={{ ...tinyCaps, ...ellipsis }} title={taskId}>{t('triggerHistory.task', { id: taskId })}</div>
)}
</div>
);
@@ -345,22 +351,23 @@ function EmptyState({ title, body }: { title: string; body: string }) {
);
}
-const SECTIONS: { key: Source; label: string; blurb: string }[] = [
+const SECTIONS: { key: Source; labelKey: string; blurbKey: string }[] = [
{
key: 'webhook',
- label: 'Webhooks',
- blurb: 'Everything posted to your webhook endpoints, next to what Michael sent back.'
+ labelKey: 'triggerHistory.sectionWebhooks',
+ blurbKey: 'triggerHistory.sectionWebhooksBlurb'
},
{
key: 'org',
- label: 'Organization',
- blurb: 'Messages from your teammates’ clone nodes, next to what Michael sent back.'
+ labelKey: 'triggerHistory.sectionOrg',
+ blurbKey: 'triggerHistory.sectionOrgBlurb'
}
];
/* ──────────────────────────────── the tab ────────────────────────────────── */
export function TriggerHistoryTab() {
+ const { t } = useTranslation();
const [entries, setEntries] = useState<TriggerHistoryEntry[]>([]);
const [source, setSource] = useState<Source>('webhook');
const [expanded, setExpanded] = useState<Record<string, boolean>>({});
@@ -398,21 +405,21 @@ export function TriggerHistoryTab() {
call({ id, decision })
.then((res) => {
if (res && res.ok === false) {
- setError(res.error || 'That did not go through. Try again.');
+ setError(res.error || t('triggerHistory.decideFailed'));
load();
}
})
- .catch(() => { setError('That did not go through. Try again.'); load(); })
+ .catch(() => { setError(t('triggerHistory.decideFailed')); load(); })
.finally(() => setBusy((b) => { const n = { ...b }; delete n[id]; return n; }));
- }, [load]);
+ }, [load, t]);
const clear = useCallback(() => {
const call = api().clearTriggerHistory;
setConfirmClear(false);
if (!call) return;
setEntries((rows) => rows.filter((r) => r.source !== source));
- call(source).catch(() => { setError('Could not clear it. Try again.'); load(); });
- }, [source, load]);
+ call(source).catch(() => { setError(t('triggerHistory.clearFailed')); load(); });
+ }, [source, load, t]);
const counts = useMemo(() => {
const c: Record<Source, { total: number; pending: number }> = {
@@ -464,7 +471,7 @@ export function TriggerHistoryTab() {
minWidth: 0
}}
>
- <span style={ellipsis}>{s.label.toUpperCase()}</span>
+ <span style={ellipsis}>{t(s.labelKey).toUpperCase()}</span>
{p > 0 && (
<span style={{
...badgeStyle('var(--cth-lemon-light)', 'var(--cth-lemon)'),
@@ -480,7 +487,7 @@ export function TriggerHistoryTab() {
flex: 1, minHeight: 0, overflowY: 'auto', overflowX: 'hidden',
padding: 8, display: 'flex', flexDirection: 'column', gap: 8
}}>
- <div style={{ ...muted, fontSize: 11, lineHeight: '16px' }}>{section.blurb}</div>
+ <div style={{ ...muted, fontSize: 11, lineHeight: '16px' }}>{t(section.blurbKey)}</div>
{pendingCount > 0 && (
<div style={{
@@ -488,8 +495,8 @@ export function TriggerHistoryTab() {
padding: '6px 8px', ...uiText, fontSize: 11, lineHeight: '16px'
}}>
{pendingCount === 1
- ? 'One message is held, waiting on your yes or no.'
- : `${pendingCount} messages are held, waiting on your yes or no.`}
+ ? t('triggerHistory.heldOne')
+ : t('triggerHistory.heldMany', { count: pendingCount })}
</div>
)}
@@ -503,17 +510,13 @@ export function TriggerHistoryTab() {
{exchanges.length === 0 ? (
source === 'org' ? (
<EmptyState
- title="Nothing here yet, and nothing is broken."
- body={'Teammate messaging is not built yet. You can set an org key and pick a mode '
- + 'today, but no one’s clone node can reach yours until the transport ships. '
- + 'When it does, their messages and our replies land here.'}
+ title={t('triggerHistory.emptyOrgTitle')}
+ body={t('triggerHistory.emptyOrgBody')}
/>
) : (
<EmptyState
- title="No webhook messages yet."
- body={'When something posts to one of your endpoints, it lands here with Michael’s '
- + 'reply underneath. Nothing has called in so far. Add an endpoint under Webhooks to '
- + 'get a URL you can hand out.'}
+ title={t('triggerHistory.emptyWebhookTitle')}
+ body={t('triggerHistory.emptyWebhookBody')}
/>
)
) : (
@@ -534,13 +537,12 @@ export function TriggerHistoryTab() {
{confirmClear ? (
<>
<div style={{ ...muted, fontSize: 11, lineHeight: '16px' }}>
- Delete all {counts[source].total} {section.label.toLowerCase()} messages? The record
- is gone for good.
+ {t('triggerHistory.clearConfirm', { count: counts[source].total })}
</div>
<div style={{ display: 'flex', gap: 6 }}>
- <PixelButton variant="destructive" size="sm" onClick={clear}>delete them</PixelButton>
+ <PixelButton variant="destructive" size="sm" onClick={clear}>{t('triggerHistory.deleteThem')}</PixelButton>
<PixelButton variant="ghost" size="sm" onClick={() => setConfirmClear(false)}>
- keep them
+ {t('triggerHistory.keepThem')}
</PixelButton>
</div>
</>
@@ -550,9 +552,9 @@ export function TriggerHistoryTab() {
variant="ghost"
size="sm"
onClick={() => setConfirmClear(true)}
- title="Delete this section’s history"
+ title={t('triggerHistory.clearHistoryTitle')}
>
- clear history
+ {t('triggerHistory.clearHistory')}
</PixelButton>
</div>
)}
diff --git a/src/renderer/src/components/triggers/TriggersTab.tsx b/src/renderer/src/components/triggers/TriggersTab.tsx
index 83b57a3a..60082a4d 100644
--- a/src/renderer/src/components/triggers/TriggersTab.tsx
+++ b/src/renderer/src/components/triggers/TriggersTab.tsx
@@ -1,4 +1,5 @@
import { useState } from 'react';
+import { useTranslation } from 'react-i18next';
import { SchedulesSection } from './SchedulesSection';
import { ContextSection } from './ContextSection';
import { WebhooksSection } from './WebhooksSection';
@@ -17,6 +18,7 @@ import { Muted, Scroll, TriggerCard } from './ui';
* way, so nothing is more than two disclosures from legible.
*/
export function TriggersTab() {
+ const { t } = useTranslation();
const [schedulesSummary, setSchedulesSummary] = useState('');
const [contextSummary, setContextSummary] = useState('');
const [webhooksSummary, setWebhooksSummary] = useState('');
@@ -24,12 +26,12 @@ export function TriggersTab() {
return (
<Scroll>
- <Muted>Everything that can start work without you typing.</Muted>
+ <Muted>{t('triggersTab.intro')}</Muted>
<div style={{ height: 8 }} />
<TriggerCard
- title="SCHEDULES"
- blurb="Run a prompt on a repeating clock."
+ title={t('triggersTab.schedules')}
+ blurb={t('triggersTab.schedulesBlurb')}
summary={schedulesSummary}
defaultOpen
>
@@ -37,24 +39,24 @@ export function TriggersTab() {
</TriggerCard>
<TriggerCard
- title="CONTEXT"
- blurb="Compact or clear an agent as its context fills."
+ title={t('triggersTab.context')}
+ blurb={t('triggersTab.contextBlurb')}
summary={contextSummary}
>
<ContextSection onSummary={setContextSummary} />
</TriggerCard>
<TriggerCard
- title="WEBHOOKS"
- blurb="Let an outside system post work in."
+ title={t('triggersTab.webhooks')}
+ blurb={t('triggersTab.webhooksBlurb')}
summary={webhooksSummary}
>
<WebhooksSection onSummary={setWebhooksSummary} />
</TriggerCard>
<TriggerCard
- title="ORGANISATION"
- blurb="Let a teammate's Munder Difflin message yours."
+ title={t('triggersTab.organisation')}
+ blurb={t('triggersTab.organisationBlurb')}
summary={orgSummary}
>
<OrgSection onSummary={setOrgSummary} />
diff --git a/src/renderer/src/components/triggers/WebhooksSection.tsx b/src/renderer/src/components/triggers/WebhooksSection.tsx
index bf952c19..4f3f2db2 100644
--- a/src/renderer/src/components/triggers/WebhooksSection.tsx
+++ b/src/renderer/src/components/triggers/WebhooksSection.tsx
@@ -1,4 +1,5 @@
import { useEffect, useRef, useState } from 'react';
+import { useTranslation } from 'react-i18next';
import { PixelButton } from '../PixelButton';
import { useStore } from '@/store/store';
import { TRIGGER_MODES, type TriggerMode, type WebhookTrigger } from '@shared/triggers';
@@ -29,6 +30,7 @@ import {
const STATUS_POLL_MS = 5000;
export function WebhooksSection({ onSummary }: { onSummary?: (s: string) => void }) {
+ const { t } = useTranslation();
const hooks = useStore((s) => s.webhookTriggers);
const setHooks = useStore((s) => s.setWebhookTriggers);
const [status, setStatus] = useState<WebhooksStatus>({ running: false, endpoints: [] });
@@ -47,13 +49,13 @@ export function WebhooksSection({ onSummary }: { onSummary?: (s: string) => void
}
const poll = () => { void webhooksStatus().then((s) => { if (alive) setStatus(s); }); };
poll();
- const t = setInterval(poll, STATUS_POLL_MS);
- return () => { alive = false; clearInterval(t); };
+ const timer = setInterval(poll, STATUS_POLL_MS);
+ return () => { alive = false; clearInterval(timer); };
}, [setHooks]);
useEffect(() => {
- onSummary?.(hooks.length === 0 ? 'none' : `${hooks.length} · ${status.running ? 'live' : 'offline'}`);
- }, [hooks, status.running, onSummary]);
+ onSummary?.(hooks.length === 0 ? t('webhooksSection.summaryNone') : t('webhooksSection.summary', { count: hooks.length, state: status.running ? t('webhooksSection.live') : t('webhooksSection.offline') }));
+ }, [hooks, status.running, onSummary, t]);
/** Update the shared mirror; optionally write it through. Main sanitises what
* it stores (it will not enable a secretless endpoint), so we adopt its
@@ -86,12 +88,11 @@ export function WebhooksSection({ onSummary }: { onSummary?: (s: string) => void
return (
<>
<Muted>
- Anyone holding a URL and its secret can post work in. Each endpoint carries its own secret,
- so revoking one caller leaves the others alone.
+ {t('webhooksSection.intro')}
</Muted>
<div style={{ height: 8 }} />
- {hooks.length === 0 && <Muted>No endpoints yet.</Muted>}
+ {hooks.length === 0 && <Muted>{t('webhooksSection.noEndpoints')}</Muted>}
{hooks.map((w) => (
<WebhookRow
key={w.id}
@@ -105,9 +106,9 @@ export function WebhooksSection({ onSummary }: { onSummary?: (s: string) => void
<div style={{ marginTop: 8 }}>
<PixelButton variant="secondary" size="sm" onClick={() => { void add(); }} disabled={minting}>
- {minting ? 'minting…' : 'add webhook'}
+ {minting ? t('webhooksSection.minting') : t('webhooksSection.addWebhook')}
</PixelButton>
- <Hint>A new endpoint starts switched off. Copy its URL and secret, then turn it on.</Hint>
+ <Hint>{t('webhooksSection.newEndpointHint')}</Hint>
</div>
</>
);
@@ -122,6 +123,7 @@ function WebhookRow({ hook, url, serverRunning, onPatch, onDelete }: {
onPatch: (fields: Partial<WebhookTrigger>, persist?: boolean) => void;
onDelete: () => void;
}) {
+ const { t } = useTranslation();
const [open, setOpen] = useState(false);
const [revealed, setRevealed] = useState(false);
const [copied, setCopied] = useState<'url' | 'secret' | null>(null);
@@ -180,25 +182,25 @@ function WebhookRow({ hook, url, serverRunning, onPatch, onDelete }: {
<SubHeader
open={open}
onToggle={() => setOpen((o) => !o)}
- title={hook.name || 'unnamed'}
- sub={<>{modeLabel} · {url ? 'reachable' : serverRunning ? 'no URL yet' : 'server offline'}</>}
+ title={hook.name || t('webhooksSection.unnamed')}
+ sub={<>{modeLabel} · {url ? t('webhooksSection.reachable') : serverRunning ? t('webhooksSection.noUrlYet') : t('webhooksSection.serverOffline')}</>}
right={<Toggle on={hook.enabled} onClick={() => onPatch({ enabled: !hook.enabled })} />}
/>
{open && (
<div style={{ marginTop: 4 }}>
- <Field label="NAME">
+ <Field label={t('webhooksSection.name')}>
{/* Mirror while typing, write through on blur. */}
<input
value={hook.name}
onChange={(e) => onPatch({ name: e.target.value }, false)}
onBlur={() => onPatch({ name: hook.name })}
- placeholder="Who calls this"
+ placeholder={t('webhooksSection.namePlaceholder')}
style={inputStyle}
/>
</Field>
- <Field label="POST TO">
+ <Field label={t('webhooksSection.postTo')}>
{url ? (
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
<span style={{
@@ -208,19 +210,19 @@ function WebhookRow({ hook, url, serverRunning, onPatch, onDelete }: {
color: 'var(--cth-ink-900)', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap'
}}>{url}</span>
<MiniButton onClick={() => copy('url', url)} tone={copied === 'url' ? 'good' : 'plain'}>
- {copied === 'url' ? 'copied' : 'copy'}
+ {copied === 'url' ? `${t('common.copy')} ✓` : t('common.copy')}
</MiniButton>
</div>
) : (
<Hint>
{serverRunning
- ? 'This endpoint has no public address yet. It appears once the tunnel picks it up.'
- : 'The webhook server is not listening, so there is no address to hand out yet.'}
+ ? t('webhooksSection.noAddressYet')
+ : t('webhooksSection.serverNotListening')}
</Hint>
)}
</Field>
- <Field label="SECRET">
+ <Field label={t('webhooksSection.secret')}>
<SecretField
value={hook.secret}
revealed={revealed}
@@ -228,31 +230,31 @@ function WebhookRow({ hook, url, serverRunning, onPatch, onDelete }: {
onCopy={() => copy('secret', hook.secret)}
copied={copied === 'secret'}
/>
- <Hint>Callers echo this in the x-md-webhook-secret header.</Hint>
+ <Hint>{t('webhooksSection.secretHint')}</Hint>
</Field>
- <Field label="TRUST">
+ <Field label={t('webhooksSection.trust')}>
<ModePicker value={hook.mode} onChange={(mode: TriggerMode) => onPatch({ mode })} />
</Field>
- <Field label="BODY SCHEMA">
+ <Field label={t('webhooksSection.bodySchema')}>
{!schemaOpen && (
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
- <MiniButton onClick={() => setSchemaOpen(true)}>edit schema</MiniButton>
+ <MiniButton onClick={() => setSchemaOpen(true)}>{t('webhooksSection.editSchema')}</MiniButton>
<span style={{ fontSize: 11, color: 'var(--cth-ink-500)' }}>
- what an inbound body must look like
+ {t('webhooksSection.schemaDesc')}
</span>
</div>
)}
{schemaOpen && (
<>
<JsonEditor value={schemaText} onChange={(v) => { setSchemaText(v); setSchemaError(null); }} />
- {schemaError && <Callout>Not valid JSON — {schemaError}. Nothing was saved.</Callout>}
+ {schemaError && <Callout>{t('webhooksSection.notValidJson', { error: schemaError })}</Callout>}
<div style={{ display: 'flex', alignItems: 'center', gap: 6, marginTop: 6 }}>
<PixelButton variant="primary" size="sm" onClick={saveSchema}>
- {schemaSaved ? 'saved' : 'save schema'}
+ {schemaSaved ? t('webhooksSection.saved') : t('webhooksSection.saveSchema')}
</PixelButton>
- <PixelButton variant="ghost" size="sm" onClick={() => setSchemaOpen(false)}>close</PixelButton>
+ <PixelButton variant="ghost" size="sm" onClick={() => setSchemaOpen(false)}>{t('common.close')}</PixelButton>
</div>
</>
)}
@@ -260,12 +262,12 @@ function WebhookRow({ hook, url, serverRunning, onPatch, onDelete }: {
<div style={{ display: 'flex', alignItems: 'center', gap: 6, marginTop: 10 }}>
<span style={{ flex: 1 }} />
- {!confirmDelete && <MiniButton tone="danger" onClick={() => setConfirmDelete(true)}>delete</MiniButton>}
+ {!confirmDelete && <MiniButton tone="danger" onClick={() => setConfirmDelete(true)}>{t('common.delete')}</MiniButton>}
{confirmDelete && (
<>
- <span style={{ fontSize: 11, color: 'var(--cth-ink-500)' }}>Sure?</span>
- <MiniButton tone="danger" onClick={onDelete}>delete it</MiniButton>
- <MiniButton onClick={() => setConfirmDelete(false)}>keep</MiniButton>
+ <span style={{ fontSize: 11, color: 'var(--cth-ink-500)' }}>{t('webhooksSection.sure')}</span>
+ <MiniButton tone="danger" onClick={onDelete}>{t('webhooksSection.deleteIt')}</MiniButton>
+ <MiniButton onClick={() => setConfirmDelete(false)}>{t('webhooksSection.keep')}</MiniButton>
</>
)}
</div>
diff --git a/src/renderer/src/components/triggers/ui.tsx b/src/renderer/src/components/triggers/ui.tsx
index 78738fdc..91120c10 100644
--- a/src/renderer/src/components/triggers/ui.tsx
+++ b/src/renderer/src/components/triggers/ui.tsx
@@ -1,4 +1,5 @@
import { useState, type CSSProperties, type ReactNode } from 'react';
+import { useTranslation } from 'react-i18next';
import { TRIGGER_MODES, type TriggerMode } from '@shared/triggers';
import {
WEEKDAY_INITIALS, WEEKDAY_LABELS, formatMinute, normalizeWeekly,
@@ -79,9 +80,10 @@ export function Callout({ children, tone = 'warn' }: { children: ReactNode; tone
/* ─────────────────────────────── controls ────────────────────────────────── */
-export function Toggle({ on, onClick, onLabel = 'on', offLabel = 'off' }: {
+export function Toggle({ on, onClick, onLabel, offLabel }: {
on: boolean; onClick: () => void; onLabel?: string; offLabel?: string;
}) {
+ const { t } = useTranslation();
return (
<button
onClick={onClick}
@@ -91,7 +93,7 @@ export function Toggle({ on, onClick, onLabel = 'on', offLabel = 'off' }: {
boxShadow: `inset 0 0 0 1px ${on ? 'var(--cth-ink-900)' : 'var(--cth-ink-700)'}`,
fontFamily: 'var(--cth-font-ui)', fontSize: 12, color: 'var(--cth-ink-900)'
}}
- >{on ? onLabel : offLabel}</button>
+ >{on ? (onLabel ?? t('common.on')) : (offLabel ?? t('common.off'))}</button>
);
}
@@ -293,6 +295,7 @@ const CUSTOM = '__custom';
export function IntervalPicker({ value, onChange, minMs = MINUTE, maxMs = Number.POSITIVE_INFINITY }: {
value: number; onChange: (ms: number) => void; minMs?: number; maxMs?: number;
}) {
+ const { t } = useTranslation();
const opts = INTERVAL_OPTS.filter((o) => o.ms >= minMs && o.ms <= maxMs);
const preset = opts.some((o) => o.ms === value);
const [custom, setCustom] = useState(!preset);
@@ -308,9 +311,9 @@ export function IntervalPicker({ value, onChange, minMs = MINUTE, maxMs = Number
onChange(Number(v));
}}
>
- {!preset && <option value={CUSTOM}>{fmtInterval(value)} (custom)</option>}
+ {!preset && <option value={CUSTOM}>{fmtInterval(value)} ({t('triggersUi.custom')})</option>}
{opts.map((o) => <option key={o.ms} value={String(o.ms)}>{o.label}</option>)}
- {preset && <option value={CUSTOM}>custom…</option>}
+ {preset && <option value={CUSTOM}>{t('triggersUi.customEllipsis')}</option>}
</Select>
{showCustom && (
<span style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}>
@@ -325,7 +328,7 @@ export function IntervalPicker({ value, onChange, minMs = MINUTE, maxMs = Number
}}
style={{ ...monoInputStyle, width: 68, padding: '3px 5px' }}
/>
- <span style={{ fontSize: 11, color: 'var(--cth-ink-500)' }}>min</span>
+ <span style={{ fontSize: 11, color: 'var(--cth-ink-500)' }}>{t('triggersUi.min')}</span>
</span>
)}
</div>
@@ -374,6 +377,7 @@ export function SecretField({ value, revealed, onReveal, onCopy, copied, placeho
onChange?: (v: string) => void;
onBlur?: () => void;
}) {
+ const { t } = useTranslation();
const readOnly = !onChange;
return (
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
@@ -386,8 +390,8 @@ export function SecretField({ value, revealed, onReveal, onCopy, copied, placeho
onBlur={onBlur}
style={{ ...monoInputStyle, flex: 1, minWidth: 0, padding: '4px 6px' }}
/>
- <MiniButton onClick={onReveal}>{revealed ? 'hide' : 'show'}</MiniButton>
- {onCopy && <MiniButton onClick={onCopy} tone={copied ? 'good' : 'plain'}>{copied ? 'copied' : 'copy'}</MiniButton>}
+ <MiniButton onClick={onReveal}>{revealed ? t('common.hide') : t('common.show')}</MiniButton>
+ {onCopy && <MiniButton onClick={onCopy} tone={copied ? 'good' : 'plain'}>{copied ? `${t('common.copy')} ✓` : t('common.copy')}</MiniButton>}
</div>
);
}
@@ -417,6 +421,7 @@ export function weeklyIsUsable(w: WeeklyDraft): boolean {
export function WeeklyPicker({ value, onChange }: {
value: WeeklyDraft; onChange: (w: WeeklyDraft) => void;
}) {
+ const { t } = useTranslation();
const toggle = (d: number) => onChange({
...value,
days: value.days.includes(d) ? value.days.filter((x) => x !== d) : [...value.days, d].sort((a, b) => a - b)
@@ -451,7 +456,7 @@ export function WeeklyPicker({ value, onChange }: {
})}
</div>
<div style={{ display: 'flex', alignItems: 'center', gap: 6, flexWrap: 'wrap' }}>
- <span style={{ fontSize: 11, color: 'var(--cth-ink-500)' }}>at</span>
+ <span style={{ fontSize: 11, color: 'var(--cth-ink-500)' }}>{t('triggersUi.at')}</span>
{/* A native time field, so typing 0930 works and the value is already
the HH:MM the schedule stores. Minute granularity, not 5-minute
steps: "09:47 on Tuesdays" is a legitimate thing to want. */}
@@ -465,10 +470,10 @@ export function WeeklyPicker({ value, onChange }: {
style={{ ...inputStyle, width: 108, padding: '3px 6px' }}
/>
<span style={{ flex: 1 }} />
- <MiniButton onClick={() => setDays(same([1, 2, 3, 4, 5]) ? [] : [1, 2, 3, 4, 5])}>weekdays</MiniButton>
- <MiniButton onClick={() => setDays(same([0, 1, 2, 3, 4, 5, 6]) ? [] : [0, 1, 2, 3, 4, 5, 6])}>every day</MiniButton>
+ <MiniButton onClick={() => setDays(same([1, 2, 3, 4, 5]) ? [] : [1, 2, 3, 4, 5])}>{t('triggersUi.weekdays')}</MiniButton>
+ <MiniButton onClick={() => setDays(same([0, 1, 2, 3, 4, 5, 6]) ? [] : [0, 1, 2, 3, 4, 5, 6])}>{t('triggersUi.everyDay')}</MiniButton>
</div>
- {value.days.length === 0 && <Hint>Pick at least one day, or this will never run.</Hint>}
+ {value.days.length === 0 && <Hint>{t('triggersUi.pickDayHint')}</Hint>}
</div>
);
}
@@ -487,6 +492,7 @@ export function SchedulePicker({ intervalMs, weekly, onInterval, onWeekly }: {
onInterval: (ms: number) => void;
onWeekly: (w: WeeklyDraft | null) => void;
}) {
+ const { t } = useTranslation();
const tab = (active: boolean): CSSProperties => ({
padding: '3px 10px 2px', border: 'none', cursor: 'pointer',
background: active ? 'var(--cth-cream-100)' : 'transparent',
@@ -497,8 +503,8 @@ export function SchedulePicker({ intervalMs, weekly, onInterval, onWeekly }: {
return (
<div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>
<div style={{ display: 'flex', gap: 4 }}>
- <button type="button" style={tab(!weekly)} onClick={() => onWeekly(null)}>every…</button>
- <button type="button" style={tab(!!weekly)} onClick={() => onWeekly(weekly ?? DEFAULT_WEEKLY)}>on days…</button>
+ <button type="button" style={tab(!weekly)} onClick={() => onWeekly(null)}>{t('triggersUi.every')}</button>
+ <button type="button" style={tab(!!weekly)} onClick={() => onWeekly(weekly ?? DEFAULT_WEEKLY)}>{t('triggersUi.onDays')}</button>
</div>
{weekly
? <WeeklyPicker value={weekly} onChange={onWeekly} />
diff --git a/src/renderer/src/i18n/locales/en.json b/src/renderer/src/i18n/locales/en.json
index afed3500..4e431401 100644
--- a/src/renderer/src/i18n/locales/en.json
+++ b/src/renderer/src/i18n/locales/en.json
@@ -774,5 +774,624 @@
"runningFloor": "running the floor",
"idle": "idle"
}
+ },
+ "setupPanel": {
+ "title": "PREREQUISITES",
+ "checking": "Checking what is installed…",
+ "summary": "{{ready}} of {{total}} ready{{missing}}",
+ "summaryMissing": " · {{count}} recommended missing",
+ "recheck": "re-check",
+ "checkingBtn": "checking…",
+ "statusReady": "READY",
+ "statusMissing": "MISSING",
+ "statusNotSetUp": "NOT SET UP",
+ "recommended": "recommended",
+ "docs": "docs →",
+ "askDesc": "Michael can install the {{count}} missing recommended tool for you. This fills in his dispatch box — nothing runs until you press dispatch.",
+ "askDescPlural": "Michael can install the {{count}} missing recommended tools for you. This fills in his dispatch box — nothing runs until you press dispatch.",
+ "allReady": "Everything recommended is installed. Individual engines above are optional — set up only the ones you use.",
+ "askMichael": "ask Michael to set up everything",
+ "sections": {
+ "prerequisites": {
+ "title": "Prerequisites",
+ "blurb": "The groundwork everything else builds on."
+ },
+ "memory": {
+ "title": "Memory layer",
+ "blurb": "Meaning-based recall across everything your agents learn."
+ },
+ "engine": {
+ "title": "Agent engines",
+ "blurb": "The CLIs your agents run on. You need whichever ones you actually use — not all of them."
+ }
+ }
+ },
+ "aiEngines": {
+ "providers": "AI ENGINE PROVIDERS (BYOK)",
+ "providersDesc": "API keys + local endpoints for the OpenCode, Crush, pi.dev and Qwen engines. Keys are stored write-only (encrypted at rest; never shown again) and used only when those engines spawn. Claude Code and Codex use their own login.",
+ "apiKeys": "API KEYS",
+ "setCheck": "set ✓",
+ "keyStoredPlaceholder": "•••••••• (stored — type to replace)",
+ "keyPlaceholder": "paste {{label}} key",
+ "saved": "saved",
+ "failed": "failed",
+ "cleared": "cleared",
+ "localEndpoint": "LOCAL ENDPOINT · DEFAULT MODEL (PER ENGINE)",
+ "defaultModelPlaceholder": "default model (provider/model)",
+ "runningOpenModels": "Running open models? Step-by-step guides:",
+ "runOnOpenModels": "run Munder Difflin on open models",
+ "setUpMacMini": "set it up on a Mac Mini",
+ "autoModeCaveat": "⚠ In auto mode these engines run with full filesystem + shell access (no sandbox) — like Claude's bypass mode. Turn auto mode off (General) to make them ask first. Live end-to-end verification with real model calls is pending your keys / a local LLM."
+ },
+ "mcpDefaults": {
+ "title": "Default MCP servers",
+ "desc": "These servers are merged into each new agent's session settings. Safe servers are on by default; write/secret servers are off until you consent. Changes take effect on the next agent spawn — running agents are not affected.",
+ "toggleNote": "{{id}}: {{state}}",
+ "couldNotSave": "could not save",
+ "tiers": {
+ "safeReadonly": "Safe & Read-Only (on by default)",
+ "write": "Write Access (consent required)",
+ "secret": "Requires Secret / API Key (consent required)",
+ "safeReadonlyNote": "These servers read data only, need no secrets, and are scoped to the agent workspace. They are enabled for every new agent.",
+ "writeNote": "These servers can mutate state beyond the workspace. Off by default — enable only after reviewing.",
+ "secretNote": "These servers require an API key or credentials. Off by default — add your credentials and enable after consent."
+ }
+ },
+ "devicePicker": {
+ "microphone": "Microphone",
+ "speaker": "Speaker",
+ "systemDefault": "System default",
+ "namesHint": "Device names appear after you first start a voice session and grant mic access. The microphone choice applies the next time Michael connects; the speaker switches live."
+ },
+ "realtimeToggle": {
+ "talk": "talk",
+ "connecting": "…",
+ "listening": "listening",
+ "speaking": "speaking",
+ "working": "working",
+ "helpOff": "Talk to Michael — start the voice session",
+ "helpConnecting": "Connecting to Michael…",
+ "helpListening": "Listening — Michael is hearing you (click to stop)",
+ "helpSpeaking": "Michael is speaking (click to stop)",
+ "helpWorking": "Michael is running a tool — mic muted (click to stop)",
+ "noKeyTitle": "Talk needs your OpenAI API key (used for the Realtime voice API). Add it in Settings → Voice.",
+ "whyDisabled": "Why is Talk disabled?",
+ "popoverBody": "An OpenAI API key is needed to use this feature.",
+ "setItUpNow": "set it up now"
+ },
+ "updatesSection": {
+ "title": "Updates",
+ "onVersion": "You're on v{{v}}",
+ "checkingDetail": "Checking for a newer release…",
+ "availableHeadline": "v{{version}} is available",
+ "availableDetail": "You're on v{{v}}. Download it now — you'll be asked to restart once it's ready.",
+ "downloadBtn": "Download v{{version}}",
+ "downloadingHeadline": "Downloading v{{version}}",
+ "downloadingDetail": "{{percent}}% done. You can keep working; the restart is yours to trigger.",
+ "downloadedHeadline": "v{{version}} is ready to install",
+ "downloadedDetail": "Restart Munder Difflin to finish updating from v{{v}}.",
+ "restartBtn": "Restart to update",
+ "manualDetail": "This install can't update itself — download it from the release page.",
+ "manualDetailReason": "This install can't update itself ({{reason}}) — download it from the release page.",
+ "openReleaseBtn": "Open release page",
+ "errorHeadline": "Update check failed",
+ "errorDetail": "{{message}} (you're on v{{v}}).",
+ "retryBtn": "Try again",
+ "latestHeadline": "v{{v}} is the latest version",
+ "latestDetail": "You're already up to date — nothing to install.",
+ "checkAgainBtn": "Check again",
+ "idleDetail": "Updates are checked automatically every 6 hours. Check now if you want to be sure.",
+ "checkBtn": "Check for updates",
+ "downloadManually": "download manually",
+ "downloadManuallyTitle": "Download the v{{version}} installer and replace the app yourself",
+ "manualDownloadingTitle": "<b>v{{version}} is downloading in your browser.</b>",
+ "manualDownloadingBody": "When it lands, quit this app, install the new version over the current one, open it and pick the same project. On {{os}}:"
+ },
+ "triggersTab": {
+ "intro": "Everything that can start work without you typing.",
+ "schedules": "SCHEDULES",
+ "schedulesBlurb": "Run a prompt on a repeating clock.",
+ "context": "CONTEXT",
+ "contextBlurb": "Compact or clear an agent as its context fills.",
+ "webhooks": "WEBHOOKS",
+ "webhooksBlurb": "Let an outside system post work in.",
+ "organisation": "ORGANISATION",
+ "organisationBlurb": "Let a teammate's Munder Difflin message yours."
+ },
+ "orgSection": {
+ "acceptMessages": "Accept messages from your organisation",
+ "key": "ORGANISATION KEY",
+ "keyPlaceholder": "paste your key",
+ "trust": "TRUST",
+ "settingsOnly": "Settings only, for now. The org messaging service does not exist yet, so a key here starts no connection and nothing is sent or received. It is stored ready for when it does.",
+ "noKeyWarning": "This is switched on with no key set, so no teammate can reach you yet.",
+ "noKey": "no key"
+ },
+ "contextSection": {
+ "loading": "One sec…",
+ "intro": "A rule fires only when both halves agree: the gap since its last run has passed, AND that agent's context is at least as full as the bar. A bar of 0% means the clock alone.",
+ "compact": "Compact",
+ "compactBlurb": "Summarises the context so the thread keeps going.",
+ "clear": "Clear",
+ "clearBlurb": "Discards the context. Nothing is summarised.",
+ "clearCaution": "Clearing throws context away — it is not a smaller version of compaction. An agent mid-task forgets what it was doing. Leave this off unless you keep context another way.",
+ "extraFocus": "EXTRA FOCUS",
+ "extraFocusHint": "Appended to the provider's compaction command. Empty sends the bare command.",
+ "extraFocusPlaceholder": "What the summary must keep…",
+ "command": "COMMAND",
+ "commandHint": "Sent literally. Empty sends the bare clear command.",
+ "bothOff": "both off",
+ "off": "Off.",
+ "hintEvery": "Every {{interval}}, once context passes {{pct}}%.",
+ "noSoonerThan": "NO SOONER THAN EVERY",
+ "contextBar": "CONTEXT BAR",
+ "contextBarHint": "How full the window must be before this may run. 0% = time alone.",
+ "bigWindows": "BAR ON BIG WINDOWS",
+ "bigWindowsHint": "Used on ~1M-token windows, where a smaller slice is still an enormous amount of text."
+ },
+ "schedulesSection": {
+ "justNow": "just now",
+ "ago": "{{unit}} ago",
+ "in": "in {{unit}}",
+ "summaryNone": "none",
+ "summary": "{{on}} of {{total}} on",
+ "nothingScheduled": "Nothing is scheduled yet.",
+ "addSchedule": "add a schedule",
+ "newSchedule": "NEW SCHEDULE",
+ "label": "LABEL",
+ "labelPlaceholder": "What this run is for",
+ "goesTo": "GOES TO",
+ "everyone": "everyone",
+ "prompt": "PROMPT",
+ "promptPlaceholder": "Sent word for word on every run.",
+ "fired": "fired {{time}}",
+ "notFired": "not yet fired",
+ "next": "next {{time}}",
+ "beat": "♥ beat",
+ "noPrompt": "No prompt set.",
+ "saved": "saved",
+ "when": "WHEN",
+ "beatCeiling": "The beat adapts to how quiet the floor is, so this is the ceiling, not the exact gap."
+ },
+ "webhooksSection": {
+ "summaryNone": "none",
+ "summary": "{{count}} · {{state}}",
+ "live": "live",
+ "offline": "offline",
+ "intro": "Anyone holding a URL and its secret can post work in. Each endpoint carries its own secret, so revoking one caller leaves the others alone.",
+ "noEndpoints": "No endpoints yet.",
+ "minting": "minting…",
+ "addWebhook": "add webhook",
+ "newEndpointHint": "A new endpoint starts switched off. Copy its URL and secret, then turn it on.",
+ "unnamed": "unnamed",
+ "reachable": "reachable",
+ "noUrlYet": "no URL yet",
+ "serverOffline": "server offline",
+ "name": "NAME",
+ "namePlaceholder": "Who calls this",
+ "postTo": "POST TO",
+ "noAddressYet": "This endpoint has no public address yet. It appears once the tunnel picks it up.",
+ "serverNotListening": "The webhook server is not listening, so there is no address to hand out yet.",
+ "secret": "SECRET",
+ "secretHint": "Callers echo this in the x-md-webhook-secret header.",
+ "trust": "TRUST",
+ "bodySchema": "BODY SCHEMA",
+ "editSchema": "edit schema",
+ "schemaDesc": "what an inbound body must look like",
+ "notValidJson": "Not valid JSON — {{error}}. Nothing was saved.",
+ "saved": "saved",
+ "saveSchema": "save schema",
+ "sure": "Sure?",
+ "deleteIt": "delete it",
+ "keep": "keep"
+ },
+ "triggersUi": {
+ "custom": "custom",
+ "customEllipsis": "custom…",
+ "min": "min",
+ "every": "every…",
+ "onDays": "on days…",
+ "at": "at",
+ "weekdays": "weekdays",
+ "everyDay": "every day",
+ "pickDayHint": "Pick at least one day, or this will never run."
+ },
+ "triggerHistory": {
+ "justNow": "just now",
+ "ago": "{{unit}} ago",
+ "in": "in {{unit}}",
+ "kindDirective": "directive",
+ "kindCommunication": "communication",
+ "decisionPending": "needs you",
+ "decisionApproved": "approved",
+ "decisionRejected": "rejected",
+ "decisionAuto": "auto-allowed",
+ "emptyMessage": "(empty message)",
+ "showLess": "show less",
+ "showAll": "show all {{count}} characters",
+ "tailRejected": "You turned this down. Nothing was sent to the hive.",
+ "tailNoReply": "No reply yet. Michael has this one.",
+ "waitingForYou": "WAITING FOR YOU",
+ "unnamedSource": "unnamed source",
+ "from": "from",
+ "to": "to",
+ "unknown": "unknown",
+ "theySent": "THEY SENT",
+ "weReplied": "WE REPLIED",
+ "weSent": "WE SENT",
+ "pendingDirectiveDesc": "Approve and this goes to Michael, who will put the hive to work on it. Reject and it is dropped — nothing runs.",
+ "pendingDesc": "Approve and Michael reads this. Reject and it is dropped — nothing runs.",
+ "approveTitle": "Send this message through to Michael",
+ "oneSec": "one sec…",
+ "approve": "approve",
+ "rejectTitle": "Drop this message. Nothing is sent",
+ "reject": "reject",
+ "task": "TASK {{id}}",
+ "sectionWebhooks": "Webhooks",
+ "sectionWebhooksBlurb": "Everything posted to your webhook endpoints, next to what Michael sent back.",
+ "sectionOrg": "Organization",
+ "sectionOrgBlurb": "Messages from your teammates' clone nodes, next to what Michael sent back.",
+ "heldOne": "One message is held, waiting on your yes or no.",
+ "heldMany": "{{count}} messages are held, waiting on your yes or no.",
+ "decideFailed": "That did not go through. Try again.",
+ "clearFailed": "Could not clear it. Try again.",
+ "emptyOrgTitle": "Nothing here yet, and nothing is broken.",
+ "emptyOrgBody": "Teammate messaging is not built yet. You can set an org key and pick a mode today, but no one's clone node can reach yours until the transport ships. When it does, their messages and our replies land here.",
+ "emptyWebhookTitle": "No webhook messages yet.",
+ "emptyWebhookBody": "When something posts to one of your endpoints, it lands here with Michael's reply underneath. Nothing has called in so far. Add an endpoint under Webhooks to get a URL you can hand out.",
+ "clearConfirm": "Delete all {{count}} messages? The record is gone for good.",
+ "deleteThem": "delete them",
+ "keepThem": "keep them",
+ "clearHistoryTitle": "Delete this section's history",
+ "clearHistory": "clear history"
+ },
+ "fileTree": {
+ "loading": "loading…",
+ "copyPathTitle": "Copy path to clipboard"
+ },
+ "fileEditor": {
+ "file": "FILE",
+ "edit": "edit",
+ "preview": "preview",
+ "editTitle": "Edit the source",
+ "previewTitle": "Rendered preview (of the saved file)",
+ "openInIde": "open in IDE",
+ "openInIdeTitle": "Open this file in the full IDE",
+ "closeTitle": "Close (Esc)"
+ },
+ "gitTab": {
+ "notARepo": "Not a git repo.",
+ "notARepoHint": "Run git init in the agent's terminal.",
+ "detachedHead": "DETACHED HEAD",
+ "refresh": "refresh",
+ "sectionStatus": "status",
+ "sectionBranches": "branches",
+ "sectionLog": "log",
+ "staged": "staged",
+ "changes": "changes",
+ "untracked": "untracked",
+ "clean": "working tree clean",
+ "noCommits": "no commits yet",
+ "modified": "modified",
+ "added": "added",
+ "deleted": "deleted",
+ "renamed": "renamed",
+ "unmerged": "unmerged",
+ "copyPath": "Copy path"
+ },
+ "fullscreenTerminal": {
+ "showAgentList": "Show the agent list",
+ "hideAgentList": "Hide the agent list — full-width terminal",
+ "lightTheme": "Switch to the light theme",
+ "darkTheme": "Switch to the dark theme",
+ "toggleTheme": "Toggle dark mode",
+ "exitFullscreen": "Exit focus mode (Esc)",
+ "addAgent": "Add agent",
+ "respawnTitle": "Respawn from last session: {{names}} — same ids, memory and inboxes reattach automatically",
+ "contextTitle": "Context: {{used}} / {{limit}} tokens ({{pct}}%)",
+ "modelTitle": "Model: {{model}}",
+ "cliDefault": "CLI default",
+ "closeAgent": "Close {{name}} — ends the process and archives the agent",
+ "ideTip": "Open the IDE: browse and edit files in {{name}}'s workspace, and see their uncommitted changes as a diff.",
+ "openIdeAria": "Open the IDE",
+ "openTerminalTip": "Open your system terminal app in {{cwd}} — a normal shell in this agent's folder, separate from the agent's own terminal.",
+ "openTerminalAria": "Open a system terminal in this agent's folder"
+ },
+ "memoryPanel": {
+ "pill": "🧠 memory",
+ "pillActive": "🧠 memory",
+ "openTitle": "Search the shared memory your agents build up",
+ "title": "HIVE MEMORY",
+ "intro": "What your agents remember across sessions, shared between them. Search it by meaning, not just exact words.",
+ "notSetUp": "Not set up",
+ "onReady": "On · ready",
+ "onGettingReady": "On · getting ready…",
+ "turnOff": "Turn off",
+ "turnOn": "Turn on",
+ "notInstalled": "Meaning-based search isn't installed yet.",
+ "setUpInPrereqs": "set it up in Prerequisites →",
+ "plainNotesStill": "Agents still keep plain notes without it.",
+ "searchLanguage": "Search language",
+ "modelFast": "Fast",
+ "modelFastDetail": "English only · ~90 MB",
+ "modelMultilingual": "Multilingual",
+ "modelMultilingualDetail": "all languages · ~300 MB",
+ "searchPlaceholder": "Search by meaning…",
+ "nothingMatched": "Nothing matched yet.",
+ "searchFailed": "Couldn't search"
+ },
+ "threads": {
+ "noSubject": "(no subject)",
+ "empty": "No conversations yet. Messages this agent receives will appear here as threads.",
+ "less": "less",
+ "more": "more",
+ "replyPlaceholder": "Reply to {{name}}…",
+ "send": "Send"
+ },
+ "skillsTab": {
+ "installed": "Installed",
+ "browse": "browse",
+ "searchInstalled": "Search installed skills…",
+ "searchCatalog": "Search the skills catalog…",
+ "categoryTitle": "Categories as published by the catalog",
+ "allCategories": "all categories",
+ "allPublishers": "all publishers",
+ "loading": "loading…",
+ "refresh": "refresh",
+ "scanning": "Scanning…",
+ "noSkillsInstalled": "No skills installed yet. Open Browse to see what is available.",
+ "nothingMatches": "Nothing matches that search.",
+ "openFolder": "open folder",
+ "shipsWithApp": "ships with the app",
+ "deleteConfirm": "delete {{name}}?",
+ "removing": "removing…",
+ "uninstall": "uninstall",
+ "loadingCatalog": "Loading the catalog…",
+ "cachedCopy": "Showing a cached copy — {{error}}.",
+ "matching": "{{count}} matching",
+ "matchingFirst": "{{count}} matching · showing the first {{shown}}",
+ "curatedBy": "curated by abubakarsiddik31/claude-skills-collection",
+ "installing": "installing…",
+ "install": "install",
+ "learnMore": "learn more",
+ "installFailed": "install failed",
+ "removeFailed": "could not remove it",
+ "uninstallFailed": "uninstall failed",
+ "catalogUnreachable": "could not reach the catalog"
+ },
+ "workersTab": {
+ "stopping": "stopping",
+ "working": "working",
+ "liveWorkers": "Live workers",
+ "liveIntro": "Isolated workers Michael spins up to handle Slack messages — they run to completion, reply in-thread, then tear down.",
+ "noneRunning": "No workers running right now.",
+ "repliesToSlack": "replies to a Slack thread",
+ "stoppingEllipsis": "stopping…",
+ "stop": "stop",
+ "workerIdTitle": "worker / PTY id",
+ "baseBranchTitle": "base branch the worktree was cut from",
+ "base": "base: {{branch}}",
+ "upSinceTitle": "time since spawn",
+ "up": "up {{age}}",
+ "idleTitle": "time since last terminal output",
+ "ptyGone": "pty gone",
+ "idle": "idle {{age}}",
+ "tokensTitle": "cumulative tokens (input+output+cache)",
+ "tokens": "tokens {{value}}",
+ "uncapped": "uncapped",
+ "preserved": "Preserved worktrees ({{count}})",
+ "preservedIntro": "Finished workers whose worktree held un-integrated work — kept (never auto-discarded) and auto-reclaimed once the work lands in its base branch.",
+ "keptAgo": "kept {{age}} ago"
+ },
+ "memoryGraph": {
+ "topics": "topics",
+ "refresh": "refresh",
+ "readingMemory": "reading memory…",
+ "topicsShown": "showing {{shown}} of {{total}} topics",
+ "loadingMemory": "loading memory…",
+ "messageLinks": "{{count}} message links",
+ "knowsAbout": "{{a}} knows about “{{b}}”",
+ "messagesLast": "{{count}} messages · last: {{act}}",
+ "noMemory": "No memory recorded yet.",
+ "legendRequest": "request",
+ "legendQuery": "query",
+ "legendPropose": "propose",
+ "legendAgreeDone": "agree/done",
+ "legendRefuse": "refuse",
+ "legendInformTopic": "inform/topic"
+ },
+ "integrations": {
+ "errLabel": "Give it a label.",
+ "errId": "Could not derive a valid id from the label.",
+ "errBaseUrl": "Base URL is required.",
+ "errBaseUrlFormat": "Base URL must be https:// (or http://127.0.0.1 / localhost for a local target).",
+ "errHeader": "Header name must be 1–64 chars of A–Z, 0–9, or \"-\".",
+ "couldNotSave": "Could not save.",
+ "added": "Integration added.",
+ "updated": "Integration updated.",
+ "removed": "Removed “{{label}}”.",
+ "couldNotRemove": "Could not remove.",
+ "testFailed": "Test failed to run.",
+ "connected": "✓ Connected",
+ "connectedWith": "✓ Connected ({{status}})",
+ "failed": "✕",
+ "backToList": "← Integrations",
+ "pickTemplate": "Pick a template",
+ "galleryDesc": "Choose what you're connecting. The template sets the defaults. Pick Custom REST for anything not listed.",
+ "anyHttpApi": "Any HTTP API",
+ "continue": "continue",
+ "backToTemplates": "← Templates",
+ "needsSecret": "Needs a {{label}}",
+ "publicApi": "Public API — no secret needed",
+ "label": "Label",
+ "labelHint": "Shown in your list. Id",
+ "fixed": "fixed",
+ "baseUrl": "Base URL",
+ "baseUrlHint": "Set by the {{label}} template.",
+ "preset": "preset",
+ "authentication": "Authentication",
+ "setByTemplate": "set by template",
+ "headerName": "Header name",
+ "headerHint": "The secret is sent as {{header}}: <secret>.",
+ "saved": "saved",
+ "replaceKey": "Replace key",
+ "pasteYour": "Paste your",
+ "writeOnly": "Write-only",
+ "secretDesc": "Encrypted in the main process and never shown again. To change it, paste a new key — the old one can't be read back.",
+ "blankKeepsKey": "Leave blank to keep the saved key.",
+ "availability": "Availability",
+ "enabled": "enabled",
+ "disabled": "disabled",
+ "availableToAll": "✓ Available to all workers",
+ "notAvailableYet": "Not available to workers yet",
+ "addSecretToEnable": "Add a secret and enable to make it available.",
+ "readyOnceSaved": "Ready once saved.",
+ "disabledNoUse": "Disabled — no worker can use it.",
+ "v1Note": "v1 grants every enabled integration to all workers. Per-worker scoping is coming.",
+ "testConnection": "Test connection",
+ "testing": "testing…",
+ "testAfterSave": "Save the integration first, then test the live connection.",
+ "testLiveDesc": "Runs a live read-only probe against the base URL with the stored secret.",
+ "saveIntegration": "Save integration",
+ "saveChanges": "Save changes",
+ "title": "Integrations",
+ "titleDesc": "Connect outside tools so your agents can read and act on them. Secrets are stored encrypted in the main process and never shown again.",
+ "addIntegration": "add integration",
+ "empty": "No integrations yet. Connect GitHub or a custom REST API so your agents can use it.",
+ "addFirst": "add your first integration",
+ "count": "{{count}} integrations · {{usable}} available to workers",
+ "needsSecretShort": "Needs secret",
+ "test": "test",
+ "edit": "edit"
+ },
+ "kanban": {
+ "count": "{{count}} tasks",
+ "newWorkHint": "new work? dispatch it to Michael (monitor tab)",
+ "colTodo": "TODO",
+ "colDoing": "DOING",
+ "colBlocked": "BLOCKED",
+ "colDone": "DONE",
+ "openTaskDetails": "open task details",
+ "needsYouTitle": "waiting on YOUR answer — see the ASK ME tab",
+ "dismissTitle": "dismiss this task (removes it from the board)",
+ "dismissAria": "dismiss task",
+ "taskTitle": "TASK",
+ "unassigned": "unassigned",
+ "noDescription": "(no description on this card)",
+ "humanQA": "HUMAN Q&A",
+ "awaitingAnswer": "AWAITING YOUR ANSWER — ASK ME TAB",
+ "dependsOn": "DEPENDS ON",
+ "assign": "assign",
+ "priority": "Priority {{level}}/5"
+ },
+ "queueComposer": {
+ "recording": "● recording — click stop to transcribe",
+ "transcribing": "transcribing…",
+ "voice": "voice",
+ "busyQueued": "{{name}} is busy — {{count}} queued",
+ "heldFloor": "held — delivery paused floor-wide",
+ "heldDraft": "held — {{name}}'s terminal has unsent text on its prompt",
+ "heldPicker": "held — a slash-command picker is open in {{name}}'s terminal",
+ "heldExited": "held — {{name}}'s terminal has exited",
+ "sendingOneByOne": "sending to {{name}} one-by-one…",
+ "pausedTitle": "Auto-delivery is paused for the whole floor. Resume it in the Command Center, or use \"send now\" on a message below.",
+ "dropToAttach": "DROP TO ATTACH",
+ "queue": "QUEUE",
+ "closePicker": "close picker",
+ "recoverPrompt": "recover prompt",
+ "clearAllTitle": "Clear all queued messages",
+ "clearAll": "clear all",
+ "removeAttachment": "Remove attachment",
+ "messagePlaceholder": "Message {{name}}",
+ "busyPlaceholder": "{{name}} is busy — queue a message",
+ "files": "files",
+ "collapse": "Collapse this message",
+ "showFull": "Show the full message",
+ "seeLess": "see less",
+ "seeMore": "see more",
+ "sendNowTitle": "Deliver this message even though auto-delivery is paused. It moves to the front of the queue and types in as soon as the terminal is free.",
+ "sendNow": "send now",
+ "sendingWhenFree": "sending when free…",
+ "removeFromQueue": "Remove from queue",
+ "ffNoKeyTitle": "Dictation needs a free Groq API key. Click the info mark for the steps.",
+ "ffStopTranscribe": "Stop & transcribe",
+ "ffTitle": "Free Flow — dictate into the queue. Click, or hold Option (⌥).",
+ "stop": "stop",
+ "ffHowEnable": "How do I enable dictation?",
+ "ffSetupTitle": "Set up dictation",
+ "ffSetupIntro": "Speak instead of typing. Groq transcribes it, and their free tier covers this — no card, no cost.",
+ "ffCreateKey": "Create a free key at",
+ "ffPasteKey": "Paste it into Settings → Voice → Groq API key",
+ "ffClickOrHold": "Click voice, or hold the right Option key to talk",
+ "ffHoldHint": "Hold it ALONE for a moment to start; release to transcribe into the composer, where you can edit before sending. Either Option key works, and Option+key combos still reach the terminal untouched."
+ },
+ "idePanel": {
+ "workspace": "{{name}}'s workspace",
+ "workspaceInferred": "No agent was named when the IDE opened — showing {{name}}'s workspace (the current selection)",
+ "assumed": "assumed",
+ "noAgent": "no agent",
+ "noWorkspace": "no workspace",
+ "closeIde": "Close IDE (Esc)",
+ "expandGit": "Expand the git panel",
+ "collapseGit": "Collapse the git panel — more room for the file tree",
+ "rail": {
+ "changes": "changes",
+ "history": "history",
+ "compare": "compare"
+ },
+ "refresh": "Refresh",
+ "files": "files",
+ "rev": "REV",
+ "img": "IMG",
+ "diff": "DIFF",
+ "closeTab": "Close tab",
+ "loadingDiff": "loading diff…",
+ "binaryDiff": "binary file — no text diff",
+ "workingTree": "working tree",
+ "refreshDiff": "Refresh diff",
+ "mdSourceOnly": "Source only",
+ "mdSplit": "Source + preview",
+ "mdPreview": "Rendered preview",
+ "code": "code",
+ "split": "split",
+ "preview": "preview",
+ "viewImage": "view image",
+ "copyPath": "copy path",
+ "saveTitle": "Save (Cmd/Ctrl+S)",
+ "saved": "saved",
+ "save": "save"
+ },
+ "gitPanes": {
+ "jumpConfirm": "Jump the repo to {{sha}} (\"{{subject}}\")?\n\nThis detaches HEAD. Blocked automatically if the tree is dirty or an agent is mid-run.",
+ "nowAt": "now at {{sha}} (detached HEAD)",
+ "loadingHistory": "loading history…",
+ "loadOlder": "load older…",
+ "checkoutTitle": "Check out this commit (detached HEAD)",
+ "jumpHere": "jump here",
+ "loadingFiles": "loading files…",
+ "noFileChanges": "no file changes (merge?)",
+ "comparing": "comparing…",
+ "switchConfirm": "Switch this repo to '{{head}}'?\n\nBlocked automatically if the tree is dirty or an agent is mid-run.",
+ "switchedTo": "switched to {{head}}",
+ "baseTitle": "Base — the branch you're comparing against",
+ "swapTitle": "Swap base ↔ compare",
+ "compareTitle": "Compare — the branch whose changes you're viewing",
+ "aheadBehind": "'{{head}}' is {{ahead}} ahead and {{behind}} behind '{{base}}'",
+ "modeThreeTitle": "Showing what the compare branch ADDS since the common ancestor (PR-style). Click for the literal two-dot difference.",
+ "modeTwoTitle": "Showing the literal difference between the two branch states. Click for PR-style (what compare adds).",
+ "sinceCommonAncestor": "since common ancestor",
+ "literalDifference": "literal difference",
+ "switchToTitle": "Check out '{{head}}'",
+ "switchTo": "switch to {{branch}}",
+ "noDifferences": "no differences"
+ },
+ "imagePreview": {
+ "fitTitle": "Scale the image down to fit the pane",
+ "oneToOneTitle": "Show every pixel at 1:1 (scroll to pan)",
+ "fit": "fit",
+ "viewSourceTitle": "Open the SVG markup in the editor",
+ "viewSource": "view source",
+ "loading": "loading image…",
+ "decodeFailed": "could not decode this image — the file may be corrupt or misnamed"
}
}
diff --git a/src/renderer/src/i18n/locales/zh-CN.json b/src/renderer/src/i18n/locales/zh-CN.json
index c5d642ad..e5add93b 100644
--- a/src/renderer/src/i18n/locales/zh-CN.json
+++ b/src/renderer/src/i18n/locales/zh-CN.json
@@ -774,5 +774,624 @@
"runningFloor": "正在管理楼层",
"idle": "空闲"
}
+ },
+ "setupPanel": {
+ "title": "前置条件",
+ "checking": "正在检查已安装的工具…",
+ "summary": "{{ready}} / {{total}} 就绪{{missing}}",
+ "summaryMissing": " · {{count}} 个推荐项缺失",
+ "recheck": "重新检查",
+ "checkingBtn": "检查中…",
+ "statusReady": "就绪",
+ "statusMissing": "缺失",
+ "statusNotSetUp": "未设置",
+ "recommended": "推荐",
+ "docs": "文档 →",
+ "askDesc": "Michael 可以为你安装 {{count}} 个缺失的推荐工具。这会填好他的派发框——在你按下派发前不会运行任何东西。",
+ "askDescPlural": "Michael 可以为你安装 {{count}} 个缺失的推荐工具。这会填好他的派发框——在你按下派发前不会运行任何东西。",
+ "allReady": "所有推荐项都已安装。上面的单个引擎都是可选的——只设置你实际使用的即可。",
+ "askMichael": "让 Michael 设置一切",
+ "sections": {
+ "prerequisites": {
+ "title": "前置条件",
+ "blurb": "其他一切所依赖的基础。"
+ },
+ "memory": {
+ "title": "记忆层",
+ "blurb": "跨你所有智能体所学内容的语义回忆。"
+ },
+ "engine": {
+ "title": "智能体引擎",
+ "blurb": "你的智能体所运行的 CLI。你只需要实际使用的那些——不是全部。"
+ }
+ }
+ },
+ "aiEngines": {
+ "providers": "AI 引擎提供商(BYOK)",
+ "providersDesc": "OpenCode、Crush、pi.dev 和 Qwen 引擎的 API 密钥与本地端点。密钥只写存储(加密落盘;之后不再显示),且仅在那些引擎启动时使用。Claude Code 和 Codex 使用各自的登录。",
+ "apiKeys": "API 密钥",
+ "setCheck": "已设置 ✓",
+ "keyStoredPlaceholder": "••••••••(已存储——输入以替换)",
+ "keyPlaceholder": "粘贴 {{label}} 密钥",
+ "saved": "已保存",
+ "failed": "失败",
+ "cleared": "已清除",
+ "localEndpoint": "本地端点 · 默认模型(按引擎)",
+ "defaultModelPlaceholder": "默认模型(提供商/模型)",
+ "runningOpenModels": "要跑开源模型?分步指南:",
+ "runOnOpenModels": "在开源模型上运行 Munder Difflin",
+ "setUpMacMini": "在 Mac Mini 上配置",
+ "autoModeCaveat": "⚠ 在自动模式下,这些引擎以完整的文件系统 + shell 访问权限运行(无沙箱)——就像 Claude 的绕过模式。把自动模式关掉(通用页)即可让它们先询问。与真实模型调用的端到端实测仍在等待你的密钥 / 本地 LLM。"
+ },
+ "mcpDefaults": {
+ "title": "默认 MCP 服务器",
+ "desc": "这些服务器会并入每个新智能体的会话设置。安全服务器默认开启;写入/密钥类服务器在你同意前保持关闭。更改在下次生成智能体时生效——正在运行的智能体不受影响。",
+ "toggleNote": "{{id}}:{{state}}",
+ "couldNotSave": "无法保存",
+ "tiers": {
+ "safeReadonly": "安全且只读(默认开启)",
+ "write": "写入访问(需要同意)",
+ "secret": "需要密钥 / API Key(需要同意)",
+ "safeReadonlyNote": "这些服务器只读取数据,不需要密钥,且限定在智能体工作区内。它们对每个新智能体启用。",
+ "writeNote": "这些服务器可以修改工作区之外的状态。默认关闭——审核后再启用。",
+ "secretNote": "这些服务器需要 API 密钥或凭据。默认关闭——添加凭据并在同意后启用。"
+ }
+ },
+ "devicePicker": {
+ "microphone": "麦克风",
+ "speaker": "扬声器",
+ "systemDefault": "系统默认",
+ "namesHint": "设备名称会在你首次启动语音会话并授予麦克风权限后显示。麦克风选择在 Michael 下次连接时生效;扬声器实时切换。"
+ },
+ "realtimeToggle": {
+ "talk": "说话",
+ "connecting": "…",
+ "listening": "聆听中",
+ "speaking": "说话中",
+ "working": "工作中",
+ "helpOff": "与 Michael 对话——启动语音会话",
+ "helpConnecting": "正在连接 Michael…",
+ "helpListening": "聆听中——Michael 正在听你说话(点击停止)",
+ "helpSpeaking": "Michael 正在说话(点击停止)",
+ "helpWorking": "Michael 正在运行工具——麦克风已静音(点击停止)",
+ "noKeyTitle": "Talk 需要你的 OpenAI API 密钥(用于 Realtime 语音 API)。可在设置 → 语音中添加。",
+ "whyDisabled": "为什么 Talk 被禁用?",
+ "popoverBody": "使用此功能需要一个 OpenAI API 密钥。",
+ "setItUpNow": "现在就去设置"
+ },
+ "updatesSection": {
+ "title": "更新",
+ "onVersion": "你当前是 v{{v}}",
+ "checkingDetail": "正在检查新版本…",
+ "availableHeadline": "v{{version}} 已可用",
+ "availableDetail": "你当前是 v{{v}}。立即下载——下载完成后会提示你重启。",
+ "downloadBtn": "下载 v{{version}}",
+ "downloadingHeadline": "正在下载 v{{version}}",
+ "downloadingDetail": "已完成 {{percent}}%。你可以继续工作;重启由你自己决定。",
+ "downloadedHeadline": "v{{version}} 已就绪,可安装",
+ "downloadedDetail": "重启 Munder Difflin 以完成从 v{{v}} 的更新。",
+ "restartBtn": "重启以更新",
+ "manualDetail": "此安装无法自行更新——请从发布页面下载。",
+ "manualDetailReason": "此安装无法自行更新({{reason}})——请从发布页面下载。",
+ "openReleaseBtn": "打开发布页面",
+ "errorHeadline": "更新检查失败",
+ "errorDetail": "{{message}}(你当前是 v{{v}})。",
+ "retryBtn": "重试",
+ "latestHeadline": "v{{v}} 是最新版本",
+ "latestDetail": "你已经是最新版本——无需安装。",
+ "checkAgainBtn": "再次检查",
+ "idleDetail": "更新每 6 小时自动检查一次。想确认的话可以现在检查。",
+ "checkBtn": "检查更新",
+ "downloadManually": "手动下载",
+ "downloadManuallyTitle": "下载 v{{version}} 安装程序并自行替换应用",
+ "manualDownloadingTitle": "<b>v{{version}} 正在你的浏览器中下载。</b>",
+ "manualDownloadingBody": "下载完成后,退出本应用,将新版本覆盖安装到当前版本之上,重新打开并选择同一个项目。在 {{os}} 上:"
+ },
+ "triggersTab": {
+ "intro": "所有无需你输入就能启动工作的方式。",
+ "schedules": "计划任务",
+ "schedulesBlurb": "按固定周期运行提示词。",
+ "context": "上下文",
+ "contextBlurb": "当智能体的上下文占满时压缩或清空。",
+ "webhooks": "Webhook",
+ "webhooksBlurb": "让外部系统把工作投进来。",
+ "organisation": "组织",
+ "organisationBlurb": "让队友的 Munder Difflin 给你的发消息。"
+ },
+ "orgSection": {
+ "acceptMessages": "接受来自你组织的消息",
+ "key": "组织密钥",
+ "keyPlaceholder": "粘贴你的密钥",
+ "trust": "信任",
+ "settingsOnly": "目前仅限设置。组织消息服务尚不存在,所以这里的密钥不会启动任何连接,也不会发送或接收任何内容。它会保存好,等服务就绪后使用。",
+ "noKeyWarning": "此项已开启但没有设置密钥,所以目前还没有队友能联系到你。",
+ "noKey": "无密钥"
+ },
+ "contextSection": {
+ "loading": "稍等…",
+ "intro": "规则只有在两半都满足时才触发:距离上次运行的时间已过,且该智能体的上下文至少达到指示条的量。指示条为 0% 意味着只看时钟。",
+ "compact": "压缩",
+ "compactBlurb": "对上下文做摘要,让对话继续下去。",
+ "clear": "清空",
+ "clearBlurb": "丢弃上下文。不做任何摘要。",
+ "clearCaution": "清空会把上下文扔掉——它不是压缩的缩小版。正在执行任务的智能体会忘记自己在做什么。除非你以其他方式保留上下文,否则请保持关闭。",
+ "extraFocus": "额外重点",
+ "extraFocusHint": "追加到提供方的压缩命令之后。留空则发送裸命令。",
+ "extraFocusPlaceholder": "摘要必须保留的内容…",
+ "command": "命令",
+ "commandHint": "原样发送。留空则发送裸清空命令。",
+ "bothOff": "都关闭",
+ "off": "关闭。",
+ "hintEvery": "每 {{interval}} 一次,且上下文超过 {{pct}}% 时。",
+ "noSoonerThan": "不早于每",
+ "contextBar": "上下文指示条",
+ "contextBarHint": "窗口满到什么程度才允许运行。0% = 只看时间。",
+ "bigWindows": "大窗口指示条",
+ "bigWindowsHint": "用于约 1M 令牌的窗口,那里即使较小的占比也是海量文本。"
+ },
+ "schedulesSection": {
+ "justNow": "刚刚",
+ "ago": "{{unit}} 前",
+ "in": "{{unit}} 后",
+ "summaryNone": "无",
+ "summary": "{{on}} / {{total}} 开启",
+ "nothingScheduled": "还没有计划任务。",
+ "addSchedule": "添加计划",
+ "newSchedule": "新计划",
+ "label": "名称",
+ "labelPlaceholder": "这次运行是做什么的",
+ "goesTo": "发送给",
+ "everyone": "所有人",
+ "prompt": "提示词",
+ "promptPlaceholder": "每次运行逐字发送。",
+ "fired": "{{time}} 前触发",
+ "notFired": "尚未触发",
+ "next": "下次 {{time}}",
+ "beat": "♥ 心跳",
+ "noPrompt": "未设置提示词。",
+ "saved": "已保存",
+ "when": "何时",
+ "beatCeiling": "心跳频率会根据楼层的繁忙程度调整,因此这是上限,而非精确间隔。"
+ },
+ "webhooksSection": {
+ "summaryNone": "无",
+ "summary": "{{count}} · {{state}}",
+ "live": "在线",
+ "offline": "离线",
+ "intro": "任何持有 URL 和密钥的人都能把工作投进来。每个端点有各自的密钥,所以撤销一个调用方不会影响其他调用方。",
+ "noEndpoints": "还没有端点。",
+ "minting": "生成中…",
+ "addWebhook": "添加 webhook",
+ "newEndpointHint": "新端点默认关闭。复制它的 URL 和密钥,然后开启。",
+ "unnamed": "未命名",
+ "reachable": "可达",
+ "noUrlYet": "尚无 URL",
+ "serverOffline": "服务器离线",
+ "name": "名称",
+ "namePlaceholder": "谁来调用它",
+ "postTo": "POST 到",
+ "noAddressYet": "此端点还没有公共地址。隧道接上后就会显示。",
+ "serverNotListening": "webhook 服务器未在监听,所以还没有可提供的地址。",
+ "secret": "密钥",
+ "secretHint": "调用方在 x-md-webhook-secret 请求头中回显此值。",
+ "trust": "信任",
+ "bodySchema": "请求体 Schema",
+ "editSchema": "编辑 schema",
+ "schemaDesc": "入站请求体必须符合的样子",
+ "notValidJson": "不是有效的 JSON——{{error}}。未保存任何内容。",
+ "saved": "已保存",
+ "saveSchema": "保存 schema",
+ "sure": "确定?",
+ "deleteIt": "删除",
+ "keep": "保留"
+ },
+ "triggersUi": {
+ "custom": "自定义",
+ "customEllipsis": "自定义…",
+ "min": "分",
+ "every": "每隔…",
+ "onDays": "按星期…",
+ "at": "在",
+ "weekdays": "工作日",
+ "everyDay": "每天",
+ "pickDayHint": "至少选择一天,否则它将永远不会运行。"
+ },
+ "triggerHistory": {
+ "justNow": "刚刚",
+ "ago": "{{unit}} 前",
+ "in": "{{unit}} 后",
+ "kindDirective": "指令",
+ "kindCommunication": "沟通",
+ "decisionPending": "需要你",
+ "decisionApproved": "已批准",
+ "decisionRejected": "已拒绝",
+ "decisionAuto": "自动放行",
+ "emptyMessage": "(空消息)",
+ "showLess": "显示更少",
+ "showAll": "显示全部 {{count}} 个字符",
+ "tailRejected": "你拒绝了这条。没有向 hive 发送任何内容。",
+ "tailNoReply": "尚无回复。Michael 在跟进。",
+ "waitingForYou": "等待你",
+ "unnamedSource": "未命名来源",
+ "from": "来自",
+ "to": "发给",
+ "unknown": "未知",
+ "theySent": "对方发送",
+ "weReplied": "我们回复",
+ "weSent": "我们发送",
+ "pendingDirectiveDesc": "批准后这条会发给 Michael,他会让 hive 投入工作。拒绝则丢弃——什么都不会运行。",
+ "pendingDesc": "批准后 Michael 会阅读这条。拒绝则丢弃——什么都不会运行。",
+ "approveTitle": "把这条消息转给 Michael",
+ "oneSec": "稍等…",
+ "approve": "批准",
+ "rejectTitle": "丢弃这条消息。不发送任何内容",
+ "reject": "拒绝",
+ "task": "任务 {{id}}",
+ "sectionWebhooks": "Webhook",
+ "sectionWebhooksBlurb": "投递到你的 webhook 端点的一切,以及 Michael 回复的内容。",
+ "sectionOrg": "组织",
+ "sectionOrgBlurb": "来自队友克隆节点的消息,以及 Michael 回复的内容。",
+ "heldOne": "有 1 条消息被暂存,等待你的决定。",
+ "heldMany": "有 {{count}} 条消息被暂存,等待你的决定。",
+ "decideFailed": "没有送达。请重试。",
+ "clearFailed": "无法清除。请重试。",
+ "emptyOrgTitle": "这里还没有内容,一切正常。",
+ "emptyOrgBody": "队友消息功能尚未构建。你现在可以设置组织密钥并选择模式,但在传输服务上线前,没有人的克隆节点能联系到你的。上线后,他们的消息和我们的回复都会出现在这里。",
+ "emptyWebhookTitle": "还没有 webhook 消息。",
+ "emptyWebhookBody": "当有内容投递到你的端点时,它会出现在这里,下面是 Michael 的回复。目前还没有调用进来。在 Webhook 下添加一个端点,即可获得一个可以分发出去的 URL。",
+ "clearConfirm": "删除全部 {{count}} 条消息?记录将永久消失。",
+ "deleteThem": "删除",
+ "keepThem": "保留",
+ "clearHistoryTitle": "删除此分区的历史记录",
+ "clearHistory": "清除历史记录"
+ },
+ "fileTree": {
+ "loading": "加载中…",
+ "copyPathTitle": "复制路径到剪贴板"
+ },
+ "fileEditor": {
+ "file": "文件",
+ "edit": "编辑",
+ "preview": "预览",
+ "editTitle": "编辑源代码",
+ "previewTitle": "渲染预览(基于已保存的文件)",
+ "openInIde": "在 IDE 中打开",
+ "openInIdeTitle": "在完整 IDE 中打开此文件",
+ "closeTitle": "关闭(Esc)"
+ },
+ "gitTab": {
+ "notARepo": "不是 git 仓库。",
+ "notARepoHint": "在智能体的终端里运行 git init。",
+ "detachedHead": "游离 HEAD",
+ "refresh": "刷新",
+ "sectionStatus": "状态",
+ "sectionBranches": "分支",
+ "sectionLog": "日志",
+ "staged": "已暂存",
+ "changes": "更改",
+ "untracked": "未跟踪",
+ "clean": "工作区干净",
+ "noCommits": "尚无提交",
+ "modified": "已修改",
+ "added": "已添加",
+ "deleted": "已删除",
+ "renamed": "已重命名",
+ "unmerged": "未合并",
+ "copyPath": "复制路径"
+ },
+ "fullscreenTerminal": {
+ "showAgentList": "显示智能体列表",
+ "hideAgentList": "隐藏智能体列表——全宽终端",
+ "lightTheme": "切换到浅色主题",
+ "darkTheme": "切换到深色主题",
+ "toggleTheme": "切换深色模式",
+ "exitFullscreen": "退出聚焦模式(Esc)",
+ "addAgent": "添加智能体",
+ "respawnTitle": "从上次会话重新生成:{{names}}——ID 相同,记忆和收件箱会自动重新挂载",
+ "contextTitle": "上下文:{{used}} / {{limit}} 令牌({{pct}}%)",
+ "modelTitle": "模型:{{model}}",
+ "cliDefault": "CLI 默认",
+ "closeAgent": "关闭 {{name}}——结束进程并归档智能体",
+ "ideTip": "打开 IDE:浏览并编辑 {{name}} 工作区中的文件,并将他们未提交的更改作为差异查看。",
+ "openIdeAria": "打开 IDE",
+ "openTerminalTip": "在 {{cwd}} 中打开你的系统终端应用 —— 位于该智能体文件夹中的普通 shell,与该智能体自己的终端相互独立。",
+ "openTerminalAria": "在该智能体的文件夹中打开系统终端"
+ },
+ "memoryPanel": {
+ "pill": "🧠 记忆",
+ "pillActive": "🧠 记忆",
+ "openTitle": "搜索你的智能体积累的共享记忆",
+ "title": "HIVE 记忆",
+ "intro": "你的智能体跨会话记住的内容,彼此共享。按语义搜索,而不只是精确匹配关键词。",
+ "notSetUp": "未设置",
+ "onReady": "开 · 就绪",
+ "onGettingReady": "开 · 准备中…",
+ "turnOff": "关闭",
+ "turnOn": "开启",
+ "notInstalled": "语义搜索尚未安装。",
+ "setUpInPrereqs": "在前置条件中设置 →",
+ "plainNotesStill": "没有它,智能体仍然会记普通笔记。",
+ "searchLanguage": "搜索语言",
+ "modelFast": "快速",
+ "modelFastDetail": "仅英文 · 约 90 MB",
+ "modelMultilingual": "多语言",
+ "modelMultilingualDetail": "所有语言 · 约 300 MB",
+ "searchPlaceholder": "按语义搜索…",
+ "nothingMatched": "还没有匹配项。",
+ "searchFailed": "无法搜索"
+ },
+ "threads": {
+ "noSubject": "(无主题)",
+ "empty": "还没有对话。该智能体收到的消息会以对话线程的形式显示在这里。",
+ "less": "收起",
+ "more": "更多",
+ "replyPlaceholder": "回复 {{name}}…",
+ "send": "发送"
+ },
+ "skillsTab": {
+ "installed": "已安装",
+ "browse": "浏览",
+ "searchInstalled": "搜索已安装的技能…",
+ "searchCatalog": "搜索技能目录…",
+ "categoryTitle": "目录发布的分类",
+ "allCategories": "全部分类",
+ "allPublishers": "全部发布者",
+ "loading": "加载中…",
+ "refresh": "刷新",
+ "scanning": "扫描中…",
+ "noSkillsInstalled": "还没有安装技能。打开「浏览」看看有哪些可用。",
+ "nothingMatches": "没有匹配该搜索的内容。",
+ "openFolder": "打开文件夹",
+ "shipsWithApp": "随应用内置",
+ "deleteConfirm": "删除 {{name}}?",
+ "removing": "删除中…",
+ "uninstall": "卸载",
+ "loadingCatalog": "正在加载目录…",
+ "cachedCopy": "显示缓存的副本——{{error}}。",
+ "matching": "{{count}} 个匹配",
+ "matchingFirst": "{{count}} 个匹配 · 显示前 {{shown}} 个",
+ "curatedBy": "由 abubakarsiddik31/claude-skills-collection 精选",
+ "installing": "安装中…",
+ "install": "安装",
+ "learnMore": "了解更多",
+ "installFailed": "安装失败",
+ "removeFailed": "无法移除",
+ "uninstallFailed": "卸载失败",
+ "catalogUnreachable": "无法访问目录"
+ },
+ "workersTab": {
+ "stopping": "停止中",
+ "working": "工作中",
+ "liveWorkers": "活跃工人",
+ "liveIntro": "Michael 为处理 Slack 消息而启动的隔离工人——它们运行到完成、在会话线程中回复,然后自动拆除。",
+ "noneRunning": "当前没有运行中的工人。",
+ "repliesToSlack": "回复到 Slack 会话线程",
+ "stoppingEllipsis": "停止中…",
+ "stop": "停止",
+ "workerIdTitle": "工人 / PTY ID",
+ "baseBranchTitle": "工作树所基于的分支",
+ "base": "base:{{branch}}",
+ "upSinceTitle": "自生成以来的时间",
+ "up": "已运行 {{age}}",
+ "idleTitle": "自上次终端输出以来的时间",
+ "ptyGone": "PTY 已消失",
+ "idle": "空闲 {{age}}",
+ "tokensTitle": "累计令牌(输入+输出+缓存)",
+ "tokens": "令牌 {{value}}",
+ "uncapped": "无上限",
+ "preserved": "保留的工作树({{count}})",
+ "preservedIntro": "已完成工人的工作树中保留着未整合的工作——保留(绝不自动丢弃),并在工作合入其基础分支后自动回收。",
+ "keptAgo": "{{age}} 前保留"
+ },
+ "memoryGraph": {
+ "topics": "主题",
+ "refresh": "刷新",
+ "readingMemory": "正在读取记忆…",
+ "topicsShown": "显示 {{shown}} / {{total}} 个主题",
+ "loadingMemory": "正在加载记忆…",
+ "messageLinks": "{{count}} 条消息连接",
+ "knowsAbout": "{{a}} 知道关于「{{b}}」",
+ "messagesLast": "{{count}} 条消息 · 最近:{{act}}",
+ "noMemory": "尚未记录记忆。",
+ "legendRequest": "请求",
+ "legendQuery": "询问",
+ "legendPropose": "提议",
+ "legendAgreeDone": "同意/完成",
+ "legendRefuse": "拒绝",
+ "legendInformTopic": "告知/主题"
+ },
+ "integrations": {
+ "errLabel": "请给它一个名称。",
+ "errId": "无法从该名称派生出有效的 ID。",
+ "errBaseUrl": "必须填写基础 URL。",
+ "errBaseUrlFormat": "基础 URL 必须是 https://(或用于本地目标的 http://127.0.0.1 / localhost)。",
+ "errHeader": "请求头名称必须是 1–64 个字符,由 A–Z、0–9 或 \"-\" 组成。",
+ "couldNotSave": "无法保存。",
+ "added": "集成已添加。",
+ "updated": "集成已更新。",
+ "removed": "已移除「{{label}}」。",
+ "couldNotRemove": "无法移除。",
+ "testFailed": "测试运行失败。",
+ "connected": "✓ 已连接",
+ "connectedWith": "✓ 已连接({{status}})",
+ "failed": "✕",
+ "backToList": "← 集成",
+ "pickTemplate": "选择模板",
+ "galleryDesc": "选择你要连接的内容。模板会设置默认值。未列出的服务请选「自定义 REST」。",
+ "anyHttpApi": "任意 HTTP API",
+ "continue": "继续",
+ "backToTemplates": "← 模板",
+ "needsSecret": "需要一个 {{label}}",
+ "publicApi": "公共 API——无需密钥",
+ "label": "名称",
+ "labelHint": "显示在你的列表中。ID",
+ "fixed": "固定",
+ "baseUrl": "基础 URL",
+ "baseUrlHint": "由 {{label}} 模板设置。",
+ "preset": "预设",
+ "authentication": "认证",
+ "setByTemplate": "由模板设置",
+ "headerName": "请求头名称",
+ "headerHint": "密钥以 {{header}}: <secret> 的形式发送。",
+ "saved": "已保存",
+ "replaceKey": "替换密钥",
+ "pasteYour": "粘贴你的",
+ "writeOnly": "只写",
+ "secretDesc": "在主进程中加密存储,之后不再显示。要更改,请粘贴新密钥——旧密钥无法读回。",
+ "blankKeepsKey": "留空以保留已保存的密钥。",
+ "availability": "可用性",
+ "enabled": "已启用",
+ "disabled": "已禁用",
+ "availableToAll": "✓ 所有工人可用",
+ "notAvailableYet": "工人尚不可用",
+ "addSecretToEnable": "添加密钥并启用即可使其可用。",
+ "readyOnceSaved": "保存后即就绪。",
+ "disabledNoUse": "已禁用——没有工人可以使用它。",
+ "v1Note": "v1 将每个已启用的集成授予所有工人。按工人细粒度授权即将推出。",
+ "testConnection": "测试连接",
+ "testing": "测试中…",
+ "testAfterSave": "先保存集成,再测试实时连接。",
+ "testLiveDesc": "使用已存储的密钥对基础 URL 执行一次实时只读探测。",
+ "saveIntegration": "保存集成",
+ "saveChanges": "保存更改",
+ "title": "集成",
+ "titleDesc": "连接外部工具,让你的智能体能够读取并对它们采取行动。密钥在主进程中加密存储,之后不再显示。",
+ "addIntegration": "添加集成",
+ "empty": "还没有集成。连接 GitHub 或自定义 REST API,让你的智能体可以使用它。",
+ "addFirst": "添加你的第一个集成",
+ "count": "{{count}} 个集成 · {{usable}} 个对工人可用",
+ "needsSecretShort": "需要密钥",
+ "test": "测试",
+ "edit": "编辑"
+ },
+ "kanban": {
+ "count": "{{count}} 项任务",
+ "newWorkHint": "有新工作?派发给 Michael(监控标签页)",
+ "colTodo": "待办",
+ "colDoing": "进行中",
+ "colBlocked": "已阻塞",
+ "colDone": "已完成",
+ "openTaskDetails": "打开任务详情",
+ "needsYouTitle": "等待你的回答——见「问我」标签页",
+ "dismissTitle": "忽略此任务(从看板上移除)",
+ "dismissAria": "忽略任务",
+ "taskTitle": "任务",
+ "unassigned": "未分配",
+ "noDescription": "(此卡片没有描述)",
+ "humanQA": "人工问答",
+ "awaitingAnswer": "等待你的回答——「问我」标签页",
+ "dependsOn": "依赖",
+ "assign": "分配",
+ "priority": "优先级 {{level}}/5"
+ },
+ "queueComposer": {
+ "recording": "● 录音中——点击停止转写",
+ "transcribing": "转写中…",
+ "voice": "语音",
+ "busyQueued": "{{name}} 正在忙——{{count}} 条排队中",
+ "heldFloor": "暂挂——投递已全楼层暂停",
+ "heldDraft": "暂挂——{{name}} 的终端提示行有未发送文本",
+ "heldPicker": "暂挂——{{name}} 的终端里有一个斜杠命令选择器开着",
+ "heldExited": "暂挂——{{name}} 的终端已退出",
+ "sendingOneByOne": "正在逐条发送给 {{name}}…",
+ "pausedTitle": "整个楼层的自动投递已暂停。在命令中心恢复,或对下面的消息使用「立即发送」。",
+ "dropToAttach": "拖放以附加",
+ "queue": "队列",
+ "closePicker": "关闭选择器",
+ "recoverPrompt": "恢复提示",
+ "clearAllTitle": "清空所有排队消息",
+ "clearAll": "全部清空",
+ "removeAttachment": "移除附件",
+ "messagePlaceholder": "给 {{name}} 发消息",
+ "busyPlaceholder": "{{name}} 正在忙——排队发消息",
+ "files": "文件",
+ "collapse": "收起此消息",
+ "showFull": "显示完整消息",
+ "seeLess": "收起",
+ "seeMore": "展开",
+ "sendNowTitle": "即使自动投递已暂停也投递此消息。它会移到队列最前,终端一空闲就输入。",
+ "sendNow": "立即发送",
+ "sendingWhenFree": "空闲后发送…",
+ "removeFromQueue": "从队列移除",
+ "ffNoKeyTitle": "听写需要一个免费的 Groq API 密钥。点击信息标记查看步骤。",
+ "ffStopTranscribe": "停止并转写",
+ "ffTitle": "自由输入——向队列听写。点击,或按住 Option(⌥)。",
+ "stop": "停止",
+ "ffHowEnable": "如何启用听写?",
+ "ffSetupTitle": "设置听写",
+ "ffSetupIntro": "说话代替打字。Groq 负责转写,其免费额度足以覆盖——无需绑卡,零成本。",
+ "ffCreateKey": "在以下地址免费创建密钥",
+ "ffPasteKey": "粘贴到设置 → 语音 → Groq API 密钥",
+ "ffClickOrHold": "点击「语音」,或按住右侧 Option 键说话",
+ "ffHoldHint": "单独按住一会儿即可开始;松开后转写到编辑器,发送前可修改。两个 Option 键都可以,Option+按键组合仍会原样到达终端。"
+ },
+ "idePanel": {
+ "workspace": "{{name}} 的工作区",
+ "workspaceInferred": "IDE 打开时未指定智能体——正在显示 {{name}} 的工作区(当前选中项)",
+ "assumed": "推测",
+ "noAgent": "无智能体",
+ "noWorkspace": "无工作区",
+ "closeIde": "关闭 IDE(Esc)",
+ "expandGit": "展开 git 面板",
+ "collapseGit": "折叠 git 面板——为文件树腾出空间",
+ "rail": {
+ "changes": "更改",
+ "history": "历史",
+ "compare": "比较"
+ },
+ "refresh": "刷新",
+ "files": "文件",
+ "rev": "版本",
+ "img": "图",
+ "diff": "差异",
+ "closeTab": "关闭标签页",
+ "loadingDiff": "正在加载差异…",
+ "binaryDiff": "二进制文件——无文本差异",
+ "workingTree": "工作区",
+ "refreshDiff": "刷新差异",
+ "mdSourceOnly": "仅源码",
+ "mdSplit": "源码 + 预览",
+ "mdPreview": "渲染预览",
+ "code": "代码",
+ "split": "分栏",
+ "preview": "预览",
+ "viewImage": "查看图片",
+ "copyPath": "复制路径",
+ "saveTitle": "保存(Cmd/Ctrl+S)",
+ "saved": "已保存",
+ "save": "保存"
+ },
+ "gitPanes": {
+ "jumpConfirm": "把仓库跳转到 {{sha}}(\"{{subject}}\")?\n\n这会脱离 HEAD。若工作区不干净或有智能体正在运行,将自动阻止。",
+ "nowAt": "现在位于 {{sha}}(游离 HEAD)",
+ "loadingHistory": "正在加载历史…",
+ "loadOlder": "加载更早…",
+ "checkoutTitle": "检出此提交(游离 HEAD)",
+ "jumpHere": "跳到这里",
+ "loadingFiles": "正在加载文件…",
+ "noFileChanges": "无文件更改(合并?)",
+ "comparing": "比较中…",
+ "switchConfirm": "把这个仓库切换到 '{{head}}'?\n\n若工作区不干净或有智能体正在运行,将自动阻止。",
+ "switchedTo": "已切换到 {{head}}",
+ "baseTitle": "基准——你正在与之比较的分支",
+ "swapTitle": "交换基准 ↔ 比较",
+ "compareTitle": "比较——正在查看其更改的分支",
+ "aheadBehind": "'{{head}}' 领先 {{ahead}}、落后 {{behind}}(相对 '{{base}}')",
+ "modeThreeTitle": "显示比较分支自共同祖先以来新增的内容(PR 风格)。点击切换为字面的两点差异。",
+ "modeTwoTitle": "显示两个分支状态之间的字面差异。点击切换为 PR 风格(比较分支新增了什么)。",
+ "sinceCommonAncestor": "自共同祖先以来",
+ "literalDifference": "字面差异",
+ "switchToTitle": "检出 '{{head}}'",
+ "switchTo": "切换到 {{branch}}",
+ "noDifferences": "无差异"
+ },
+ "imagePreview": {
+ "fitTitle": "缩小图片以适配面板",
+ "oneToOneTitle": "以 1:1 显示每个像素(滚动平移)",
+ "fit": "适配",
+ "viewSourceTitle": "在编辑器中打开 SVG 标记",
+ "viewSource": "查看源码",
+ "loading": "正在加载图片…",
+ "decodeFailed": "无法解码此图片——文件可能已损坏或扩展名有误"
}
}
diff --git a/src/renderer/src/ide/GitPanes.tsx b/src/renderer/src/ide/GitPanes.tsx
index d51aae74..65e13ef0 100644
--- a/src/renderer/src/ide/GitPanes.tsx
+++ b/src/renderer/src/ide/GitPanes.tsx
@@ -5,6 +5,7 @@
* process; these panes only render what the IPC returns.
*/
import { useCallback, useEffect, useState } from 'react';
+import { useTranslation } from 'react-i18next';
import { CommitGraph } from '@/components/git/CommitGraph';
import { Icon } from '@/components/Icon';
@@ -60,6 +61,7 @@ export function HistoryPane({ gitRoot, onOpenRevDiff }: {
/** Open a Monaco diff of `path` between `revA` (parent/base) and `revB`. */
onOpenRevDiff: (revA: string, revB: string, path: string, label: string) => void;
}) {
+ const { t } = useTranslation();
const [commits, setCommits] = useState<GitCommitRow[]>([]);
const [branch, setBranch] = useState<string | null>(null);
const [loading, setLoading] = useState(true);
@@ -93,21 +95,21 @@ export function HistoryPane({ gitRoot, onOpenRevDiff }: {
}, [commits, gitRoot]);
const jump = async (c: GitCommitRow) => {
- if (!window.confirm(`Jump the repo to ${c.shortSha} ("${c.subject.slice(0, 60)}")?\n\nThis detaches HEAD. Blocked automatically if the tree is dirty or an agent is mid-run.`)) return;
+ if (!window.confirm(t('gitPanes.jumpConfirm', { sha: c.shortSha, subject: c.subject.slice(0, 60) }))) return;
const res = await window.cth.gitCheckout(gitRoot, c.sha, true);
- setNote(res.ok ? `now at ${c.shortSha} (detached HEAD)` : res.error);
+ setNote(res.ok ? t('gitPanes.nowAt', { sha: c.shortSha }) : res.error);
if (res.ok) void load(page);
};
return (
<div style={{ display: 'flex', flexDirection: 'column', minHeight: 0, flex: 1 }}>
<div style={{ flex: 1, minHeight: 0, overflow: 'auto' }}>
- {loading && commits.length === 0 && <div style={noteStyle}>loading history…</div>}
- {!loading && commits.length === 0 && <div style={noteStyle}>no commits</div>}
+ {loading && commits.length === 0 && <div style={noteStyle}>{t('gitPanes.loadingHistory')}</div>}
+ {!loading && commits.length === 0 && <div style={noteStyle}>{t('gitTab.noCommits')}</div>}
<CommitGraph commits={commits} currentBranch={branch} onCommitClick={(sha) => { void pick(sha); }} />
{commits.length >= page * 200 && (
<div style={{ padding: '4px 12px' }}>
- <button style={smallBtn} onClick={() => setPage((p) => p + 1)}>load older…</button>
+ <button style={smallBtn} onClick={() => setPage((p) => p + 1)}>{t('gitPanes.loadOlder')}</button>
</div>
)}
</div>
@@ -124,19 +126,19 @@ export function HistoryPane({ gitRoot, onOpenRevDiff }: {
<span style={{
flex: 1, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis'
}} title={selected.subject}>{selected.subject}</span>
- <button style={smallBtn} onClick={() => void jump(selected)} title="Check out this commit (detached HEAD)">
- <Icon name="arrow-right" /> jump here
+ <button style={smallBtn} onClick={() => void jump(selected)} title={t('gitPanes.checkoutTitle')}>
+ <Icon name="arrow-right" /> {t('gitPanes.jumpHere')}
</button>
- <button style={{ ...smallBtn, width: 20, justifyContent: 'center' }} onClick={() => setSelected(null)} title="Close">✕</button>
+ <button style={{ ...smallBtn, width: 20, justifyContent: 'center' }} onClick={() => setSelected(null)} title={t('common.close')}>✕</button>
</div>
{/* `flex: 1` is load-bearing: without it this scroller sizes to its
CONTENT, overflows the parent's maxHeight and never reaches its own
scroll threshold, so a commit touching many files runs off the
bottom with no way to scroll to the rest. */}
<div style={{ flex: 1, overflow: 'auto', minHeight: 0 }}>
- {!files && !note && <div style={noteStyle}>loading files…</div>}
+ {!files && !note && <div style={noteStyle}>{t('gitPanes.loadingFiles')}</div>}
{note && <div style={{ ...noteStyle, color: 'var(--cth-ink-700)' }}>{note}</div>}
- {files && files.length === 0 && <div style={noteStyle}>no file changes (merge?)</div>}
+ {files && files.length === 0 && <div style={noteStyle}>{t('gitPanes.noFileChanges')}</div>}
{files?.map((f) => (
<FileRow
key={f.path}
@@ -157,6 +159,7 @@ export function ComparePane({ gitRoot, onOpenRevDiff }: {
gitRoot: string;
onOpenRevDiff: (revA: string, revB: string, path: string, label: string) => void;
}) {
+ const { t } = useTranslation();
const [branches, setBranches] = useState<string[]>([]);
const [base, setBase] = useState('');
const [head, setHead] = useState('');
@@ -178,7 +181,7 @@ export function ComparePane({ gitRoot, onOpenRevDiff }: {
useEffect(() => {
if (!base || !head) { setResult(null); return; }
let alive = true;
- setNote('comparing…');
+ setNote(t('gitPanes.comparing'));
void window.cth.gitCompareRefs(gitRoot, base, head, mode).then((res) => {
if (!alive) return;
if ('error' in res) { setNote(res.error); setResult(null); return; }
@@ -186,13 +189,13 @@ export function ComparePane({ gitRoot, onOpenRevDiff }: {
setResult(res);
});
return () => { alive = false; };
- }, [gitRoot, base, head, mode]);
+ }, [gitRoot, base, head, mode, t]);
const switchTo = async () => {
if (!head) return;
- if (!window.confirm(`Switch this repo to '${head}'?\n\nBlocked automatically if the tree is dirty or an agent is mid-run.`)) return;
+ if (!window.confirm(t('gitPanes.switchConfirm', { head }))) return;
const res = await window.cth.gitCheckout(gitRoot, head.replace(/^origin\//, ''), false);
- setNote(res.ok ? `switched to ${head}` : res.error);
+ setNote(res.ok ? t('gitPanes.switchedTo', { head }) : res.error);
};
const sel: React.CSSProperties = {
@@ -205,18 +208,18 @@ export function ComparePane({ gitRoot, onOpenRevDiff }: {
<div style={{ display: 'flex', flexDirection: 'column', minHeight: 0, flex: 1 }}>
<div style={{ display: 'flex', flexDirection: 'column', gap: 4, padding: '6px 12px', flexShrink: 0 }}>
<div style={{ display: 'flex', gap: 4, alignItems: 'center' }}>
- <select value={base} onChange={(e) => setBase(e.target.value)} style={sel} title="Base — the branch you're comparing against">
+ <select value={base} onChange={(e) => setBase(e.target.value)} style={sel} title={t('gitPanes.baseTitle')}>
{branches.map((b) => <option key={b} value={b}>{b}</option>)}
</select>
- <button style={{ ...smallBtn, width: 22, justifyContent: 'center' }} title="Swap base ↔ compare"
+ <button style={{ ...smallBtn, width: 22, justifyContent: 'center' }} title={t('gitPanes.swapTitle')}
onClick={() => { setBase(head); setHead(base); }}>⇄</button>
- <select value={head} onChange={(e) => setHead(e.target.value)} style={sel} title="Compare — the branch whose changes you're viewing">
+ <select value={head} onChange={(e) => setHead(e.target.value)} style={sel} title={t('gitPanes.compareTitle')}>
{branches.map((b) => <option key={b} value={b}>{b}</option>)}
</select>
</div>
<div style={{ display: 'flex', gap: 6, alignItems: 'center', fontSize: 11, color: 'var(--cth-ink-500)' }}>
{result && (
- <span title={`'${head}' is ${result.ahead} ahead and ${result.behind} behind '${base}'`}>
+ <span title={t('gitPanes.aheadBehind', { head, ahead: result.ahead, behind: result.behind, base })}>
↑{result.ahead} ↓{result.behind}
</span>
)}
@@ -224,18 +227,18 @@ export function ComparePane({ gitRoot, onOpenRevDiff }: {
style={{ ...smallBtn, background: mode === 'three' ? 'var(--cth-sky-light)' : 'var(--cth-cream-100)' }}
onClick={() => setMode((m) => (m === 'three' ? 'two' : 'three'))}
title={mode === 'three'
- ? 'Showing what the compare branch ADDS since the common ancestor (PR-style). Click for the literal two-dot difference.'
- : 'Showing the literal difference between the two branch states. Click for PR-style (what compare adds).'}
- >{mode === 'three' ? 'since common ancestor' : 'literal difference'}</button>
+ ? t('gitPanes.modeThreeTitle')
+ : t('gitPanes.modeTwoTitle')}
+ >{mode === 'three' ? t('gitPanes.sinceCommonAncestor') : t('gitPanes.literalDifference')}</button>
<span style={{ flex: 1 }} />
- <button style={smallBtn} onClick={() => void switchTo()} title={`Check out '${head}'`}>
- <Icon name="arrow-right" /> switch to {head.split('/').pop()}
+ <button style={smallBtn} onClick={() => void switchTo()} title={t('gitPanes.switchToTitle', { head })}>
+ <Icon name="arrow-right" /> {t('gitPanes.switchTo', { branch: head.split('/').pop() })}
</button>
</div>
</div>
<div style={{ flex: 1, minHeight: 0, overflow: 'auto', borderTop: '1px solid var(--cth-ink-100)' }}>
{note && <div style={noteStyle}>{note}</div>}
- {result && result.files.length === 0 && !note && <div style={noteStyle}>no differences</div>}
+ {result && result.files.length === 0 && !note && <div style={noteStyle}>{t('gitPanes.noDifferences')}</div>}
{result?.files.map((f) => (
<FileRow
key={f.path}
diff --git a/src/renderer/src/ide/IdePanel.tsx b/src/renderer/src/ide/IdePanel.tsx
index 098d4b55..b21c8bb4 100644
--- a/src/renderer/src/ide/IdePanel.tsx
+++ b/src/renderer/src/ide/IdePanel.tsx
@@ -1,4 +1,5 @@
import { useCallback, useDeferredValue, useEffect, useMemo, useRef, useState } from 'react';
+import { useTranslation } from 'react-i18next';
import { useStore, type Agent } from '@/store/store';
import { FileTree } from '@/components/FileTree';
import { Icon } from '@/components/Icon';
@@ -93,6 +94,7 @@ function pickIdeTarget(): IdeTarget {
}
export function IdePanel() {
+ const { t } = useTranslation();
const setIdeOpen = useStore((s) => s.setIdeOpen);
const [target] = useState<IdeTarget>(pickIdeTarget);
const root = target.root;
@@ -385,8 +387,8 @@ export function IdePanel() {
<span style={{ display: 'inline-flex', alignItems: 'baseline', gap: 6, minWidth: 0 }}>
<span
title={target.inferred
- ? `No agent was named when the IDE opened — showing ${target.agent.name}'s workspace (the current selection)`
- : `${target.agent.name}'s workspace`}
+ ? t('idePanel.workspaceInferred', { name: target.agent.name })
+ : t('idePanel.workspace', { name: target.agent.name })}
style={{
fontFamily: 'var(--cth-font-ui)', fontSize: 13, fontWeight: 600,
color: 'var(--cth-ink-900)',
@@ -403,26 +405,26 @@ export function IdePanel() {
// Never assert a name we had to guess at. One quiet word is enough
// to stop someone trusting the wrong agent's directory.
<span style={{ fontFamily: 'var(--cth-font-ui)', fontSize: 11, color: 'var(--cth-ink-500)' }}>
- (assumed)
+ ({t('idePanel.assumed')})
</span>
)}
</span>
) : (
<span style={{ fontFamily: 'var(--cth-font-ui)', fontSize: 13, color: 'var(--cth-ink-500)' }}>
- no agent
+ {t('idePanel.noAgent')}
</span>
)}
<span title={root ?? ''} style={{
fontFamily: 'var(--cth-font-mono)', fontSize: 13, color: 'var(--cth-ink-500)',
whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', maxWidth: '30vw'
}}>
- {root ? basename(root) : 'no workspace'}
+ {root ? basename(root) : t('idePanel.noWorkspace')}
</span>
<button
className="cth-titlebar-nodrag"
onClick={() => setIdeOpen(false)}
- title="Close IDE (Esc)"
- aria-label="Close IDE"
+ title={t('idePanel.closeIde')}
+ aria-label={t('idePanel.closeIde')}
style={{
marginLeft: 'auto',
display: 'inline-flex', alignItems: 'center', justifyContent: 'center',
@@ -460,8 +462,8 @@ export function IdePanel() {
}}>
<button
onClick={toggleGitRail}
- title={gitCollapsed ? 'Expand the git panel' : 'Collapse the git panel — more room for the file tree'}
- aria-label={gitCollapsed ? 'Expand the git panel' : 'Collapse the git panel'}
+ title={gitCollapsed ? t('idePanel.expandGit') : t('idePanel.collapseGit')}
+ aria-label={gitCollapsed ? t('idePanel.expandGit') : t('idePanel.collapseGit')}
aria-expanded={!gitCollapsed}
style={{
...iconBtn,
@@ -493,11 +495,11 @@ export function IdePanel() {
background: railTab === k && !gitCollapsed ? 'var(--cth-sky-light)' : 'transparent',
boxShadow: railTab === k && !gitCollapsed ? 'inset 0 0 0 1px var(--cth-ink-300)' : 'none'
}}
- >{k}</button>
+ >{t(`idePanel.rail.${k}`)}</button>
))}
<span style={{ flex: 1 }} />
{railTab === 'changes' && !gitCollapsed && (
- <button onClick={() => refreshStatus()} title="Refresh" style={iconBtn}>
+ <button onClick={() => refreshStatus()} title={t('idePanel.refresh')} style={iconBtn}>
<Icon name="web" />
</button>
)}
@@ -511,10 +513,10 @@ export function IdePanel() {
off the bottom with no way to reach the end. */}
<div style={{ flex: 1, overflow: 'auto', minHeight: 0 }}>
{isRepo === false && (
- <div style={{ padding: '6px 12px', fontSize: 12, color: 'var(--cth-ink-500)' }}>not a git repo</div>
+ <div style={{ padding: '6px 12px', fontSize: 12, color: 'var(--cth-ink-500)' }}>{t('gitTab.notARepo')}</div>
)}
{isRepo && changedFiles.length === 0 && (
- <div style={{ padding: '6px 12px', fontSize: 12, color: 'var(--cth-ink-500)' }}>working tree clean</div>
+ <div style={{ padding: '6px 12px', fontSize: 12, color: 'var(--cth-ink-500)' }}>{t('gitTab.clean')}</div>
)}
{changedFiles.map((f) => {
const active = activeKey === tabKey('diff', f.path);
@@ -551,7 +553,7 @@ export function IdePanel() {
)}
{/* FILES */}
<div style={{ flex: 1, minHeight: 0, display: 'flex', flexDirection: 'column', borderTop: '1px solid var(--cth-ink-300)' }}>
- <SectionHeader title="files" />
+ <SectionHeader title={t('idePanel.files')} />
<div style={{ flex: 1, minHeight: 0 }}>
<FileTree root={root} activeRel={activeEditRel} onOpenFile={openEdit} onCopyPath={copyAbs} />
</div>
@@ -568,15 +570,15 @@ export function IdePanel() {
display: 'flex', alignItems: 'stretch', overflowX: 'auto', flexShrink: 0,
background: 'var(--cth-cream-200)', borderBottom: '1px solid var(--cth-ink-700)', minHeight: 30
}}>
- {tabs.map((t) => {
- const active = t.key === activeKey;
- const buf = editBuffers[t.rel];
- const dirty = t.mode === 'edit' && buf?.status === 'ready' && buf.content !== buf.original;
+ {tabs.map((tab) => {
+ const active = tab.key === activeKey;
+ const buf = editBuffers[tab.rel];
+ const dirty = tab.mode === 'edit' && buf?.status === 'ready' && buf.content !== buf.original;
return (
<div
- key={t.key}
- onClick={() => setActiveKey(t.key)}
- title={t.rel}
+ key={tab.key}
+ onClick={() => setActiveKey(tab.key)}
+ title={tab.rel}
style={{
display: 'inline-flex', alignItems: 'center', gap: 6, padding: '0 8px', height: 30,
cursor: 'pointer', flexShrink: 0, maxWidth: 240,
@@ -586,21 +588,21 @@ export function IdePanel() {
fontFamily: 'var(--cth-font-ui)', fontSize: 12, color: 'var(--cth-ink-900)'
}}
>
- {t.mode !== 'edit' && (
+ {tab.mode !== 'edit' && (
<span style={{
fontFamily: 'var(--cth-font-display)', fontSize: 7, padding: '1px 3px',
- background: t.mode === 'revdiff' ? 'var(--cth-lilac-light)'
- : t.mode === 'image' ? 'var(--cth-peach-light)'
+ background: tab.mode === 'revdiff' ? 'var(--cth-lilac-light)'
+ : tab.mode === 'image' ? 'var(--cth-peach-light)'
: 'var(--cth-sky-light)',
color: 'var(--cth-ink-900)'
- }}>{t.mode === 'revdiff' ? (t.revLabel ?? 'REV') : t.mode === 'image' ? 'IMG' : 'DIFF'}</span>
+ }}>{tab.mode === 'revdiff' ? (tab.revLabel ?? t('idePanel.rev')) : tab.mode === 'image' ? t('idePanel.img') : t('idePanel.diff')}</span>
)}
<span style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>
- {basename(t.rel)}{dirty ? ' •' : ''}
+ {basename(tab.rel)}{dirty ? ' •' : ''}
</span>
<button
- onClick={(e) => { e.stopPropagation(); closeTab(t.key); }}
- title="Close tab"
+ onClick={(e) => { e.stopPropagation(); closeTab(tab.key); }}
+ title={t('idePanel.closeTab')}
style={{ ...iconBtn, width: 16, height: 16 }}
>
<Icon name="x" />
@@ -690,9 +692,9 @@ export function IdePanel() {
{activeTab?.mode === 'revdiff' && (() => {
const d = diffData[activeTab.key];
- if (!d || d.status === 'loading') return <Centered>loading diff…</Centered>;
+ if (!d || d.status === 'loading') return <Centered>{t('idePanel.loadingDiff')}</Centered>;
if (d.status === 'error') return <Centered tone="error">{d.error}</Centered>;
- if (d.status === 'binary') return <Centered>binary file — no text diff</Centered>;
+ if (d.status === 'binary') return <Centered>{t('idePanel.binaryDiff')}</Centered>;
return (
<div style={{ height: '100%', display: 'flex', flexDirection: 'column' }}>
<div style={{
@@ -717,9 +719,9 @@ export function IdePanel() {
{activeTab?.mode === 'diff' && (() => {
const d = diffData[activeTab.rel];
- if (!d || d.status === 'loading') return <Centered>loading diff…</Centered>;
+ if (!d || d.status === 'loading') return <Centered>{t('idePanel.loadingDiff')}</Centered>;
if (d.status === 'error') return <Centered tone="error">{d.error}</Centered>;
- if (d.status === 'binary') return <Centered>binary file — no text diff</Centered>;
+ if (d.status === 'binary') return <Centered>{t('idePanel.binaryDiff')}</Centered>;
return (
<div style={{ height: '100%', display: 'flex', flexDirection: 'column' }}>
<div style={{
@@ -729,12 +731,12 @@ export function IdePanel() {
}}>
<span style={{ color: 'var(--cth-ink-500)' }}>HEAD</span>
<Icon name="arrow-right" />
- <span>working tree</span>
+ <span>{t('idePanel.workingTree')}</span>
<span style={{
flex: 1, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap',
fontFamily: 'var(--cth-font-mono)', textAlign: 'right'
}} title={activeTab.rel}>{activeTab.rel}</span>
- <button onClick={() => ensureDiff(activeTab.rel, true)} title="Refresh diff" style={iconBtn}>
+ <button onClick={() => ensureDiff(activeTab.rel, true)} title={t('idePanel.refreshDiff')} style={iconBtn}>
<Icon name="web" />
</button>
</div>
@@ -772,6 +774,7 @@ function EditorBar({ rel, dirty, saveState, onSave, onCopy, mdView, onMdView, on
/** Set only for files that are ALSO images (SVG) — jumps back to the picture. */
onViewImage?: () => void;
}) {
+ const { t } = useTranslation();
return (
<div style={ideBarStyle}>
<Icon name="code" />
@@ -784,23 +787,23 @@ function EditorBar({ rel, dirty, saveState, onSave, onCopy, mdView, onMdView, on
<button
key={v}
onClick={() => onMdView(v)}
- title={v === 'code' ? 'Source only' : v === 'split' ? 'Source + preview' : 'Rendered preview'}
+ title={v === 'code' ? t('idePanel.mdSourceOnly') : v === 'split' ? t('idePanel.mdSplit') : t('idePanel.mdPreview')}
style={{
...textBtn,
background: mdView === v ? 'var(--cth-sky-light)' : 'var(--cth-cream-100)',
boxShadow: mdView === v ? 'inset 0 0 0 1px var(--cth-ink-500)' : 'inset 0 0 0 1px var(--cth-ink-100)'
}}
- >{v}</button>
+ >{v === 'code' ? t('idePanel.code') : v === 'split' ? t('idePanel.split') : t('idePanel.preview')}</button>
))}
</span>
)}
{onViewImage && (
- <button onClick={onViewImage} title="Show this file as an image" style={textBtn}>view image</button>
+ <button onClick={onViewImage} title={t('idePanel.viewImage')} style={textBtn}>{t('idePanel.viewImage')}</button>
)}
- <button onClick={onCopy} title="Copy absolute path" style={textBtn}>copy path</button>
- <button onClick={onSave} disabled={!dirty || saveState === 'saving'} title="Save (Cmd/Ctrl+S)"
+ <button onClick={onCopy} title={t('idePanel.copyPath')} style={textBtn}>{t('idePanel.copyPath')}</button>
+ <button onClick={onSave} disabled={!dirty || saveState === 'saving'} title={t('idePanel.saveTitle')}
style={{ ...textBtn, opacity: dirty ? 1 : 0.5 }}>
- {saveState === 'saving' ? '...' : saveState === 'saved' ? 'saved' : saveState === 'error' ? 'err' : 'save'}
+ {saveState === 'saving' ? '...' : saveState === 'saved' ? t('idePanel.saved') : saveState === 'error' ? t('agentDetail.err') : t('idePanel.save')}
</button>
</div>
);
diff --git a/src/renderer/src/ide/ImagePreview.tsx b/src/renderer/src/ide/ImagePreview.tsx
index fe4ea3ed..079643d2 100644
--- a/src/renderer/src/ide/ImagePreview.tsx
+++ b/src/renderer/src/ide/ImagePreview.tsx
@@ -15,6 +15,7 @@
* editable — so the tab strip reads as one surface rather than two.
*/
import { useState } from 'react';
+import { useTranslation } from 'react-i18next';
import { Icon } from '@/components/Icon';
import { useWorkspaceImage } from '@/hooks/useWorkspaceImage';
import { formatBytes, isSvgPath } from '@shared/imageTypes';
@@ -33,6 +34,7 @@ export interface ImagePreviewProps {
}
export function ImagePreview({ root, rel, onCopyPath, onViewSource }: ImagePreviewProps) {
+ const { t } = useTranslation();
const img = useWorkspaceImage(root, rel);
// Fit is the default because the common case is a full-screen screenshot that
// is far wider than the pane; showing it at 1:1 first would open every tab
@@ -63,19 +65,19 @@ export function ImagePreview({ root, rel, onCopyPath, onViewSource }: ImagePrevi
<button
key={String(v)}
onClick={() => setFit(v)}
- title={v ? 'Scale the image down to fit the pane' : 'Show every pixel at 1:1 (scroll to pan)'}
+ title={v ? t('imagePreview.fitTitle') : t('imagePreview.oneToOneTitle')}
style={{
...ideTextBtn,
background: fit === v ? 'var(--cth-sky-light)' : 'var(--cth-cream-100)',
boxShadow: fit === v ? 'inset 0 0 0 1px var(--cth-ink-500)' : 'inset 0 0 0 1px var(--cth-ink-100)'
}}
- >{v ? 'fit' : '1:1'}</button>
+ >{v ? t('imagePreview.fit') : '1:1'}</button>
))}
</span>
{onViewSource && (
- <button onClick={onViewSource} title="Open the SVG markup in the editor" style={ideTextBtn}>
- view source
+ <button onClick={onViewSource} title={t('imagePreview.viewSourceTitle')} style={ideTextBtn}>
+ {t('imagePreview.viewSource')}
</button>
)}
<button onClick={onCopyPath} title="Copy absolute path" style={ideTextBtn}>copy path</button>
@@ -99,11 +101,11 @@ export function ImagePreview({ root, rel, onCopyPath, onViewSource }: ImagePrevi
backgroundSize: '16px 16px',
backgroundPosition: '0 0, 0 8px, 8px -8px, -8px 0px'
}}>
- {img.status === 'loading' && <Centered>loading image…</Centered>}
+ {img.status === 'loading' && <Centered>{t('imagePreview.loading')}</Centered>}
{img.status === 'error' && <Centered tone="error">{img.error}</Centered>}
{img.status === 'ready' && decodeFailed && (
<Centered tone="error">
- could not decode this image — the file may be corrupt or misnamed
+ {t('imagePreview.decodeFailed')}
</Centered>
)}
{img.status === 'ready' && !decodeFailed && (
diff --git a/src/renderer/src/realtime/DevicePicker.tsx b/src/renderer/src/realtime/DevicePicker.tsx
index f86e3bf1..11736f21 100644
--- a/src/renderer/src/realtime/DevicePicker.tsx
+++ b/src/renderer/src/realtime/DevicePicker.tsx
@@ -17,6 +17,7 @@
* Branch feat/realtime-michael. See board.md "🎙 REALTIME MICHAEL".
*/
import { useCallback, useEffect, useState } from 'react';
+import { useTranslation } from 'react-i18next';
import { useRealtimeMichael } from './session';
interface AudioDevice {
@@ -58,6 +59,7 @@ const selectStyle: React.CSSProperties = {
};
export function RealtimeDevicePicker(): React.ReactElement {
+ const { t } = useTranslation();
const { deviceId, setDeviceId, outputDeviceId, setOutputDeviceId } = useRealtimeMichael();
const [mics, setMics] = useState<AudioDevice[]>([]);
const [speakers, setSpeakers] = useState<AudioDevice[]>([]);
@@ -87,13 +89,13 @@ export function RealtimeDevicePicker(): React.ReactElement {
return (
<div style={{ display: 'flex', flexDirection: 'column', gap: 12, width: 280 }}>
<div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>
- <span style={labelStyle}>Microphone</span>
+ <span style={labelStyle}>{t('devicePicker.microphone')}</span>
<select
value={deviceId ?? ''}
onChange={(e) => setDeviceId(e.target.value || null)}
style={selectStyle}
>
- <option value="">System default</option>
+ <option value="">{t('devicePicker.systemDefault')}</option>
{mics.map((m) => (
<option key={m.deviceId} value={m.deviceId}>
{m.label}
@@ -104,13 +106,13 @@ export function RealtimeDevicePicker(): React.ReactElement {
{CAN_PICK_SPEAKER && (
<div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>
- <span style={labelStyle}>Speaker</span>
+ <span style={labelStyle}>{t('devicePicker.speaker')}</span>
<select
value={outputDeviceId ?? ''}
onChange={(e) => setOutputDeviceId(e.target.value || null)}
style={selectStyle}
>
- <option value="">System default</option>
+ <option value="">{t('devicePicker.systemDefault')}</option>
{speakers.map((s) => (
<option key={s.deviceId} value={s.deviceId}>
{s.label}
@@ -122,8 +124,7 @@ export function RealtimeDevicePicker(): React.ReactElement {
{!labelled && (
<span style={{ fontSize: 12, lineHeight: '16px', color: 'var(--cth-ink-500)' }}>
- Device names appear after you first start a voice session and grant mic access.
- The microphone choice applies the next time Michael connects; the speaker switches live.
+ {t('devicePicker.namesHint')}
</span>
)}
</div>
diff --git a/test/hire-import.test.cjs b/test/hire-import.test.cjs
index 2216b613..a0b46191 100644
--- a/test/hire-import.test.cjs
+++ b/test/hire-import.test.cjs
@@ -73,7 +73,7 @@ test('closing a hire review clears the remaining batch', () => {
test('review UI exposes progress and an explicit skip without auto-spawn', () => {
const modal = readFileSync('src/renderer/src/components/AddAgentModal.tsx', 'utf8');
assert.match(modal, /hireQueueProgress\(hireQueue\)/);
- assert.match(modal, />skip hire<\/PixelButton>/);
+ assert.match(modal, />\{tr\('addAgent\.skipHire'\)\}<\/PixelButton>/);
assert.match(modal, /finishPendingHire\(\)/);
const start = modal.indexOf('const importHire = async');
const end = modal.indexOf('const submit = async', start);