Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

fix(desktop): localize daemon controls (#7749)

Sodab69b13b037c1
diff --git a/apps/desktop/src/renderer/src/components/daemon-i18n.ts b/apps/desktop/src/renderer/src/components/daemon-i18n.ts
new file mode 100644
index 0000000000..2be996712d
--- /dev/null
+++ b/apps/desktop/src/renderer/src/components/daemon-i18n.ts
@@ -0,0 +1,28 @@
+import type { useT } from "@multica/views/i18n";
+import type { DaemonState } from "../../../shared/daemon-types";
+
+export type DaemonTranslator = ReturnType<typeof useT<"settings">>["t"];
+
+export function daemonStateLabel(
+ state: DaemonState,
+ t: DaemonTranslator,
+): string {
+ switch (state) {
+ case "stopped":
+ return t(($) => $.desktop.daemon.state_stopped);
+ case "starting":
+ return t(($) => $.desktop.daemon.state_starting);
+ case "running":
+ return t(($) => $.desktop.daemon.state_running);
+ case "stopping":
+ return t(($) => $.desktop.daemon.state_stopping);
+ case "cli_not_found":
+ return t(($) => $.desktop.daemon.state_cli_not_found);
+ case "installing_cli":
+ return t(($) => $.desktop.daemon.state_installing_cli);
+ case "recovery_paused":
+ return t(($) => $.desktop.daemon.state_recovery_paused);
+ case "auth_expired":
+ return t(($) => $.desktop.daemon.state_auth_expired);
+ }
+}
diff --git a/apps/desktop/src/renderer/src/components/daemon-localization.test.tsx b/apps/desktop/src/renderer/src/components/daemon-localization.test.tsx
new file mode 100644
index 0000000000..25c30554dd
--- /dev/null
+++ b/apps/desktop/src/renderer/src/components/daemon-localization.test.tsx
@@ -0,0 +1,86 @@
+import { act, render, screen } from "@testing-library/react";
+import type { ReactNode } from "react";
+import { beforeEach, describe, expect, it, vi } from "vitest";
+import { I18nProvider } from "@multica/core/i18n/react";
+import { RESOURCES } from "@multica/views/locales";
+import type { DaemonStatus } from "../../../shared/daemon-types";
+import { DaemonPanel } from "./daemon-panel";
+import { DaemonSettingsTab } from "./daemon-settings-tab";
+
+vi.mock("sonner", () => ({
+ toast: { error: vi.fn(), success: vi.fn() },
+}));
+
+vi.mock("../platform/daemon-reauth", () => ({
+ reauthenticateDaemon: vi.fn(),
+}));
+
+let emitLogLine: (line: string) => void = () => {};
+
+function installDaemonAPI(status: DaemonStatus) {
+ Object.defineProperty(window, "daemonAPI", {
+ configurable: true,
+ value: {
+ getPrefs: vi.fn().mockResolvedValue({ autoStart: true, autoStop: false }),
+ setPrefs: vi.fn().mockResolvedValue({ autoStart: true, autoStop: false }),
+ isCliInstalled: vi.fn().mockResolvedValue(true),
+ getStatus: vi.fn().mockResolvedValue(status),
+ onStatusChange: vi.fn(() => () => {}),
+ startLogStream: vi.fn(),
+ stopLogStream: vi.fn(),
+ onLogLine: vi.fn((handler: (line: string) => void) => {
+ emitLogLine = handler;
+ return () => {};
+ }),
+ },
+ });
+}
+
+function renderInSimplifiedChinese(element: ReactNode) {
+ return render(
+ <I18nProvider locale="zh-Hans" resources={RESOURCES}>
+ {element}
+ </I18nProvider>,
+ );
+}
+
+beforeEach(() => {
+ emitLogLine = () => {};
+});
+
+describe("Desktop daemon localization with real zh-Hans resources", () => {
+ it("lets the locale own the externally managed sentence ending", async () => {
+ installDaemonAPI({ state: "running", externallyManaged: true });
+
+ renderInSimplifiedChinese(<DaemonSettingsTab />);
+
+ expect(
+ await screen.findByText(
+ "登录时启动守护进程。应用打开期间,它会同时监控自动启动和手动启动的守护进程。",
+ ),
+ ).toBeInTheDocument();
+ const command = screen.getByText("multica daemon stop");
+ expect(command.closest("p")).toHaveTextContent(/multica daemon stop。$/);
+ });
+
+ it("renders repeated log messages with straight double quotes", async () => {
+ installDaemonAPI({ state: "running" });
+ renderInSimplifiedChinese(
+ <DaemonPanel
+ open
+ onOpenChange={vi.fn()}
+ status={{ state: "running" }}
+ runtimeCount={0}
+ />,
+ );
+
+ await act(async () => {
+ emitLogLine("12:00:00.000 INF poll complete component=daemon");
+ emitLogLine("12:00:01.000 INF poll complete component=daemon");
+ });
+
+ expect(
+ await screen.findByText('另有 1 条"poll complete"——点击展开'),
+ ).toBeInTheDocument();
+ });
+});
diff --git a/apps/desktop/src/renderer/src/components/daemon-panel.tsx b/apps/desktop/src/renderer/src/components/daemon-panel.tsx
index 4edf278683..c3a5d2459c 100644
--- a/apps/desktop/src/renderer/src/components/daemon-panel.tsx
+++ b/apps/desktop/src/renderer/src/components/daemon-panel.tsx
@@ -25,12 +25,13 @@ import {
DialogTitle,
} from "@multica/ui/components/ui/dialog";
import { toast } from "sonner";
+import { useT } from "@multica/views/i18n";
import type { DaemonStatus } from "../../../shared/daemon-types";
import {
DAEMON_STATE_COLORS,
- DAEMON_STATE_LABELS,
formatUptime,
} from "../../../shared/daemon-types";
+import { daemonStateLabel } from "./daemon-i18n";
import { parseLogLine, type LogLevel, type ParsedLogLine } from "./parse-daemon-log";
interface DaemonPanelProps {
@@ -64,6 +65,7 @@ export function DaemonPanel({
status,
runtimeCount,
}: DaemonPanelProps) {
+ const { t } = useT("settings");
const [logs, setLogs] = useState<ParsedLogLine[]>([]);
const [search, setSearch] = useState("");
// Each level chip is an independent toggle. DEBUG is off by default so
@@ -198,12 +200,12 @@ export function DaemonPanel({
const text = filtered.map((l) => l.raw).join("\n");
if (await copyText(text)) {
toast.success(
- `Copied ${filtered.length} line${filtered.length === 1 ? "" : "s"}`,
+ t(($) => $.desktop.daemon.copied_lines, { count: filtered.length }),
);
} else {
- toast.error("Failed to copy");
+ toast.error(t(($) => $.desktop.daemon.copy_failed));
}
- }, [filtered]);
+ }, [filtered, t]);
const handleClear = useCallback(() => {
setLogs([]);
@@ -251,14 +253,14 @@ export function DaemonPanel({
<div className="flex min-w-0 items-center gap-2">
<Server className="size-4 shrink-0 text-muted-foreground" />
<DialogTitle className="text-body font-medium">
- Local daemon logs
+ {t(($) => $.desktop.daemon.logs_title)}
</DialogTitle>
<ContextBadge status={status} runtimeCount={runtimeCount} />
</div>
<button
type="button"
onClick={() => onOpenChange(false)}
- aria-label="Close"
+ aria-label={t(($) => $.desktop.daemon.close)}
className="flex size-7 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
>
<X className="size-4" />
@@ -273,7 +275,7 @@ export function DaemonPanel({
<input
value={search}
onChange={(e) => setSearch(e.target.value)}
- placeholder="Search…"
+ placeholder={t(($) => $.desktop.daemon.search)}
className="h-7 w-full rounded-md border bg-background pl-7 pr-2 text-caption placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"
/>
</div>
@@ -304,7 +306,7 @@ export function DaemonPanel({
disabled={filtered.length === 0}
>
<CopyIcon className="size-3.5 mr-1.5" />
- Copy
+ {t(($) => $.desktop.daemon.copy)}
</Button>
<Button
variant="ghost"
@@ -314,7 +316,7 @@ export function DaemonPanel({
disabled={logs.length === 0}
>
<Trash2 className="size-3.5 mr-1.5" />
- Clear
+ {t(($) => $.desktop.daemon.clear)}
</Button>
</div>
</div>
@@ -365,10 +367,13 @@ export function DaemonPanel({
paused" (it isn't — data keeps flowing into the buffer). */}
<div className="flex shrink-0 items-center justify-between border-t bg-muted/30 px-4 py-1.5 text-caption text-muted-foreground">
<span className="tabular-nums">
- Showing {filtered.length} of {logs.length}
+ {t(($) => $.desktop.daemon.showing_logs, {
+ shown: filtered.length,
+ total: logs.length,
+ })}
{logs.length === MAX_LOG_LINES && (
<span className="ml-1 text-muted-foreground">
- (buffer full)
+ {t(($) => $.desktop.daemon.buffer_full)}
</span>
)}
</span>
@@ -379,7 +384,7 @@ export function DaemonPanel({
className="inline-flex items-center gap-1 rounded-md px-2 py-0.5 hover:bg-muted hover:text-foreground"
>
<ArrowDown className="size-3" />
- Jump to latest
+ {t(($) => $.desktop.daemon.jump_latest)}
</button>
)}
</div>
@@ -397,6 +402,7 @@ function ContextBadge({
status: DaemonStatus;
runtimeCount: number;
}) {
+ const { t } = useT("settings");
const isRunning = status.state === "running";
return (
<span className="inline-flex items-center gap-1.5 rounded-md border bg-background px-1.5 py-0.5 text-caption font-normal">
@@ -412,7 +418,7 @@ function ContextBadge({
isRunning ? "text-foreground" : "text-muted-foreground",
)}
>
- {DAEMON_STATE_LABELS[status.state]}
+ {daemonStateLabel(status.state, t)}
</span>
{isRunning && status.uptime && (
<span className="text-muted-foreground">
@@ -421,7 +427,7 @@ function ContextBadge({
)}
{isRunning && runtimeCount > 0 && (
<span className="text-muted-foreground">
- · {runtimeCount} runtime{runtimeCount === 1 ? "" : "s"}
+ · {t(($) => $.desktop.daemon.runtime_count, { count: runtimeCount })}
</span>
)}
</span>
@@ -559,6 +565,7 @@ function GroupRows({
onToggleFields: (id: number) => void;
search: string;
}) {
+ const { t } = useT("settings");
// Folded: show the first occurrence so the user still sees a sample
// (timestamp, level, message), then a click-to-expand placeholder for
// the suppressed run. The placeholder uses a dashed border + italics
@@ -579,8 +586,10 @@ function GroupRows({
>
<span>···</span>
<span>
- {rest.length} more &ldquo;{truncateValue(first.message, 48)}
- &rdquo; — click to expand
+ {t(($) => $.desktop.daemon.more_repeated, {
+ count: rest.length,
+ message: truncateValue(first.message, 48),
+ })}
</span>
</button>
</>
@@ -612,7 +621,11 @@ function GroupRows({
className="my-0.5 ml-2 inline-flex w-fit items-center gap-2 rounded border border-dashed border-muted-foreground/25 px-2 py-0.5 text-micro italic text-muted-foreground hover:text-foreground"
>
<span>···</span>
- <span>collapse {rest.length + 1} repeated</span>
+ <span>
+ {t(($) => $.desktop.daemon.collapse_repeated, {
+ count: rest.length + 1,
+ })}
+ </span>
</button>
</>
);
@@ -627,17 +640,18 @@ function EmptyState({
hasFilter: boolean;
isRunning: boolean;
}) {
+ const { t } = useT("settings");
let title: string;
let subtitle: string;
if (hasFilter) {
- title = "No matching log lines";
- subtitle = "Try a different search or level toggle.";
+ title = t(($) => $.desktop.daemon.no_matching_logs);
+ subtitle = t(($) => $.desktop.daemon.no_matching_logs_description);
} else if (!isRunning) {
- title = "Daemon isn't running";
- subtitle = "Start the daemon to see logs here.";
+ title = t(($) => $.desktop.daemon.not_running);
+ subtitle = t(($) => $.desktop.daemon.not_running_description);
} else if (!hasLogs) {
- title = "Waiting for logs…";
- subtitle = "New entries will appear in real time.";
+ title = t(($) => $.desktop.daemon.waiting_logs);
+ subtitle = t(($) => $.desktop.daemon.waiting_logs_description);
} else {
title = "";
subtitle = "";
diff --git a/apps/desktop/src/renderer/src/components/daemon-runtime-card.test.tsx b/apps/desktop/src/renderer/src/components/daemon-runtime-card.test.tsx
index 0c3873d77c..33e3df4342 100644
--- a/apps/desktop/src/renderer/src/components/daemon-runtime-card.test.tsx
+++ b/apps/desktop/src/renderer/src/components/daemon-runtime-card.test.tsx
@@ -3,6 +3,18 @@ import { render, screen } from "@testing-library/react";
import type { DaemonStatus } from "../../../shared/daemon-types";
+const translations = {
+ desktop: {
+ daemon: {
+ view_logs: "查看日志",
+ managed_externally: "由应用外部管理",
+ start: "启动",
+ restart: "重启",
+ stop: "停止",
+ },
+ },
+};
+
// The component only needs these to render; stub them so the test focuses on
// the externally-managed branching, not data fetching.
vi.mock("@tanstack/react-query", () => ({
@@ -17,6 +29,12 @@ vi.mock("@multica/core/runtimes", () => ({
vi.mock("@multica/core/agents", () => ({
agentTaskSnapshotOptions: () => ({ queryKey: ["snapshot"] }),
}));
+vi.mock("@multica/views/i18n", () => ({
+ useT: () => ({
+ t: (selector: (resources: typeof translations) => string) =>
+ selector(translations),
+ }),
+}));
vi.mock("./daemon-panel", () => ({ DaemonPanel: () => null }));
vi.mock("../platform/daemon-reauth", () => ({
reauthenticateDaemon: vi.fn(),
@@ -42,11 +60,12 @@ describe("DaemonRuntimeActions — externally managed daemon (#3916)", () => {
stubDaemonAPI({ state: "running", daemonId: "d1", externallyManaged: true });
render(<DaemonRuntimeActions />);
- // View logs still renders, confirming the running branch mounted.
- expect(await screen.findByText("View logs")).toBeInTheDocument();
- expect(screen.getByText("Managed outside the app")).toBeInTheDocument();
- expect(screen.queryByText("Restart")).not.toBeInTheDocument();
- expect(screen.queryByText("Stop")).not.toBeInTheDocument();
+ // The translated view-logs label still renders, confirming the running
+ // branch mounted and uses the selected locale.
+ expect(await screen.findByText("查看日志")).toBeInTheDocument();
+ expect(screen.getByText("由应用外部管理")).toBeInTheDocument();
+ expect(screen.queryByText("重启")).not.toBeInTheDocument();
+ expect(screen.queryByText("停止")).not.toBeInTheDocument();
});
it("shows Stop/Restart for a normally-managed running daemon (no 误伤)", async () => {
@@ -57,10 +76,10 @@ describe("DaemonRuntimeActions — externally managed daemon (#3916)", () => {
});
render(<DaemonRuntimeActions />);
- expect(await screen.findByText("Restart")).toBeInTheDocument();
- expect(screen.getByText("Stop")).toBeInTheDocument();
+ expect(await screen.findByText("重启")).toBeInTheDocument();
+ expect(screen.getByText("停止")).toBeInTheDocument();
expect(
- screen.queryByText("Managed outside the app"),
+ screen.queryByText("由应用外部管理"),
).not.toBeInTheDocument();
});
});
@@ -70,6 +89,6 @@ describe("DaemonRuntimeActions — recovery budget", () => {
stubDaemonAPI({ state: "recovery_paused" });
render(<DaemonRuntimeActions />);
- expect(await screen.findByText("Start")).toBeInTheDocument();
+ expect(await screen.findByText("启动")).toBeInTheDocument();
});
});
diff --git a/apps/desktop/src/renderer/src/components/daemon-runtime-card.tsx b/apps/desktop/src/renderer/src/components/daemon-runtime-card.tsx
index 45111f418e..fdf1ee123c 100644
--- a/apps/desktop/src/renderer/src/components/daemon-runtime-card.tsx
+++ b/apps/desktop/src/renderer/src/components/daemon-runtime-card.tsx
@@ -23,16 +23,18 @@ import {
DialogTitle,
} from "@multica/ui/components/ui/dialog";
import { toast } from "sonner";
+import { useT } from "@multica/views/i18n";
import { DaemonPanel } from "./daemon-panel";
import { reauthenticateDaemon } from "../platform/daemon-reauth";
import type { DaemonStatus } from "../../../shared/daemon-types";
-import { DAEMON_STATE_LABELS } from "../../../shared/daemon-types";
+import { daemonStateLabel } from "./daemon-i18n";
/**
* Desktop-only controls for the daemon embedded in this Electron app. The
* shared runtimes page renders this inside the selected local machine header.
*/
export function DaemonRuntimeActions() {
+ const { t } = useT("settings");
const [status, setStatus] = useState<DaemonStatus>({ state: "stopped" });
const [panelOpen, setPanelOpen] = useState(false);
const [actionLoading, setActionLoading] = useState(false);
@@ -77,17 +79,21 @@ export function DaemonRuntimeActions() {
const result = await window.daemonAPI.start();
if (!result.success) {
setActionLoading(false);
- toast.error("Failed to start daemon", { description: result.error });
+ toast.error(t(($) => $.desktop.daemon.start_failed), {
+ description: result.error,
+ });
}
- }, []);
+ }, [t]);
const performStop = useCallback(async () => {
setActionLoading(true);
const result = await window.daemonAPI.stop();
if (!result.success) {
- toast.error("Failed to stop daemon", { description: result.error });
+ toast.error(t(($) => $.desktop.daemon.stop_failed), {
+ description: result.error,
+ });
}
- }, []);
+ }, [t]);
const handleStopClick = useCallback(() => {
if (affectedTasks.length === 0) {
@@ -101,13 +107,15 @@ export function DaemonRuntimeActions() {
setActionLoading(true);
const result = await window.daemonAPI.restart();
if (!result.success) {
- toast.error("Failed to restart daemon", { description: result.error });
+ toast.error(t(($) => $.desktop.daemon.restart_failed), {
+ description: result.error,
+ });
return;
}
- toast.success("Restarting daemon", {
- description: "Runtimes will be back online in a few seconds.",
+ toast.success(t(($) => $.desktop.daemon.restarting), {
+ description: t(($) => $.desktop.daemon.restarting_description),
});
- }, []);
+ }, [t]);
const handleRetryInstall = useCallback(async () => {
setActionLoading(true);
@@ -120,11 +128,11 @@ export function DaemonRuntimeActions() {
const handleReauth = useCallback(async () => {
setActionLoading(true);
- await reauthenticateDaemon();
+ await reauthenticateDaemon(t);
// onStatusChange resets actionLoading on the next status push; reset here
// too in case reauth logged out (unmount) or produced no status change.
setActionLoading(false);
- }, []);
+ }, [t]);
const isRunning = status.state === "running";
// The daemon runs somewhere the app can't drive (e.g. inside WSL2): the
@@ -148,12 +156,12 @@ export function DaemonRuntimeActions() {
<>
<Button size="sm" variant="ghost" onClick={() => setPanelOpen(true)}>
<ScrollText className="size-3.5 mr-1.5" />
- View logs
+ {t(($) => $.desktop.daemon.view_logs)}
</Button>
{externallyManaged ? (
<span className="inline-flex items-center gap-1.5 text-caption text-muted-foreground">
<Info className="size-3.5 shrink-0" />
- Managed outside the app
+ {t(($) => $.desktop.daemon.managed_externally)}
</span>
) : (
<>
@@ -164,7 +172,7 @@ export function DaemonRuntimeActions() {
disabled={actionLoading}
>
<RotateCw className="size-3.5 mr-1.5" />
- Restart
+ {t(($) => $.desktop.daemon.restart)}
</Button>
<Button
size="sm"
@@ -173,7 +181,7 @@ export function DaemonRuntimeActions() {
disabled={actionLoading}
>
<Square className="size-3.5 mr-1.5" />
- Stop
+ {t(($) => $.desktop.daemon.stop)}
</Button>
</>
)}
@@ -187,7 +195,7 @@ export function DaemonRuntimeActions() {
) : (
<Play className="size-3.5 mr-1.5" />
)}
- Start
+ {t(($) => $.desktop.daemon.start)}
</Button>
)}
@@ -199,7 +207,7 @@ export function DaemonRuntimeActions() {
disabled={actionLoading}
>
<RotateCw className="size-3.5 mr-1.5" />
- Retry setup
+ {t(($) => $.desktop.daemon.retry_setup)}
</Button>
)}
@@ -207,7 +215,7 @@ export function DaemonRuntimeActions() {
<>
<span className="inline-flex items-center gap-1.5 text-caption text-destructive">
<AlertCircle className="size-3.5 shrink-0" />
- Sign-in expired
+ {t(($) => $.desktop.daemon.signin_expired)}
</span>
<Button size="sm" onClick={handleReauth} disabled={actionLoading}>
{actionLoading ? (
@@ -215,7 +223,7 @@ export function DaemonRuntimeActions() {
) : (
<LogIn className="size-3.5 mr-1.5" />
)}
- Sign in again
+ {t(($) => $.desktop.daemon.signin_again)}
</Button>
</>
)}
@@ -223,7 +231,7 @@ export function DaemonRuntimeActions() {
{(isTransitioning || isInstalling) && (
<Button size="sm" variant="outline" disabled>
<Activity className="size-3.5 mr-1.5 animate-pulse" />
- {DAEMON_STATE_LABELS[status.state]}
+ {daemonStateLabel(status.state, t)}
</Button>
)}
</div>
@@ -261,8 +269,7 @@ function StopConfirmDialog({
affectedCount: number;
onConfirm: () => void;
}) {
- const plural = affectedCount === 1 ? "" : "s";
- const verb = affectedCount === 1 ? "is" : "are";
+ const { t } = useT("settings");
return (
<Dialog open={open} onOpenChange={onOpenChange}>
@@ -273,22 +280,23 @@ function StopConfirmDialog({
</div>
<DialogHeader className="flex-1 gap-1">
<DialogTitle className="text-body font-semibold">
- Stop daemon with {affectedCount} active task{plural}?
+ {t(($) => $.desktop.daemon.stop_confirm_title, {
+ count: affectedCount,
+ })}
</DialogTitle>
<DialogDescription className="text-caption leading-relaxed">
- {affectedCount} task{plural} {verb} currently running on this
- device. Stopping now will interrupt {affectedCount === 1 ? "it" : "them"}{" "}
- — affected tasks get marked <strong>failed</strong> once the
- timeout hits. The daemon won&apos;t auto-restart.
+ {t(($) => $.desktop.daemon.stop_confirm_description, {
+ count: affectedCount,
+ })}
</DialogDescription>
</DialogHeader>
</div>
<DialogFooter>
<Button variant="ghost" onClick={() => onOpenChange(false)}>
- Cancel
+ {t(($) => $.desktop.daemon.cancel)}
</Button>
<Button variant="destructive" onClick={onConfirm}>
- Stop daemon
+ {t(($) => $.desktop.daemon.stop_daemon)}
</Button>
</DialogFooter>
</DialogContent>
diff --git a/apps/desktop/src/renderer/src/components/daemon-settings-tab.tsx b/apps/desktop/src/renderer/src/components/daemon-settings-tab.tsx
index f3c5ba44c0..c875c0f948 100644
--- a/apps/desktop/src/renderer/src/components/daemon-settings-tab.tsx
+++ b/apps/desktop/src/renderer/src/components/daemon-settings-tab.tsx
@@ -10,13 +10,14 @@ import {
SettingsSection,
SettingsTab,
} from "@multica/views/settings";
+import { useT } from "@multica/views/i18n";
import { reauthenticateDaemon } from "../platform/daemon-reauth";
import type { DaemonPrefs, DaemonStatus } from "../../../shared/daemon-types";
import {
DAEMON_STATE_COLORS,
- DAEMON_STATE_LABELS,
formatUptime,
} from "../../../shared/daemon-types";
+import { daemonStateLabel } from "./daemon-i18n";
// One row inside the diagnostics block. Values that are likely to be
// long IDs / URLs render as monospaced + truncated with a tooltip.
@@ -46,6 +47,7 @@ function DiagnosticsRow({
}
export function DaemonSettingsTab() {
+ const { t } = useT("settings");
const [prefs, setPrefs] = useState<DaemonPrefs>({ autoStart: true, autoStop: false });
const [cliInstalled, setCliInstalled] = useState<boolean | null>(null);
const [saving, setSaving] = useState(false);
@@ -61,9 +63,9 @@ export function DaemonSettingsTab() {
const handleReauth = useCallback(async () => {
setReauthLoading(true);
- await reauthenticateDaemon();
+ await reauthenticateDaemon(t);
setReauthLoading(false);
- }, []);
+ }, [t]);
const updatePref = useCallback(
async (key: keyof DaemonPrefs, value: boolean) => {
@@ -71,16 +73,20 @@ export function DaemonSettingsTab() {
try {
const updated = await window.daemonAPI.setPrefs({ [key]: value });
setPrefs(updated);
- toast.success("Daemon settings saved", { id: "settings-auto-save" });
+ toast.success(t(($) => $.desktop.daemon.settings_saved), {
+ id: "settings-auto-save",
+ });
} catch (error) {
toast.error(
- error instanceof Error ? error.message : "Failed to save daemon settings",
+ error instanceof Error
+ ? error.message
+ : t(($) => $.desktop.daemon.settings_save_failed),
);
} finally {
setSaving(false);
}
},
- [],
+ [t],
);
// The daemon runs somewhere the app can't drive (e.g. inside WSL2 behind a
@@ -91,8 +97,8 @@ export function DaemonSettingsTab() {
return (
<SettingsTab
- title="Daemon"
- description="Configure how the local agent daemon behaves with the desktop app."
+ title={t(($) => $.desktop.daemon.title)}
+ description={t(($) => $.desktop.daemon.description)}
>
{status.state === "auth_expired" && (
@@ -100,11 +106,10 @@ export function DaemonSettingsTab() {
<AlertCircle className="mt-0.5 size-4 shrink-0 text-destructive" />
<div className="min-w-0 flex-1">
<p className="text-body font-medium text-destructive">
- Sign-in expired
+ {t(($) => $.desktop.daemon.signin_expired)}
</p>
<p className="mt-0.5 text-body text-muted-foreground">
- The local daemon couldn&apos;t authenticate, so this device
- can&apos;t take tasks. Sign in again to restore it.
+ {t(($) => $.desktop.daemon.signin_expired_description)}
</p>
</div>
<Button
@@ -114,7 +119,7 @@ export function DaemonSettingsTab() {
disabled={reauthLoading}
>
<LogIn className="size-3.5 mr-1.5" />
- Sign in again
+ {t(($) => $.desktop.daemon.signin_again)}
</Button>
</div>
)}
@@ -123,19 +128,18 @@ export function DaemonSettingsTab() {
<div className="mt-4 flex items-start gap-3 rounded-lg border bg-muted/30 px-4 py-3">
<Info className="mt-0.5 size-4 shrink-0 text-muted-foreground" />
<p className="min-w-0 text-body text-muted-foreground">
- This device&apos;s daemon runs outside the app — for example inside
- WSL2 — so the app can&apos;t start or stop it. Start or stop it from
- that environment with{" "}
+ {t(($) => $.desktop.daemon.external_description_before)}{" "}
<code className="font-mono text-caption">multica daemon start</code> /{" "}
- <code className="font-mono text-caption">multica daemon stop</code>.
+ <code className="font-mono text-caption">multica daemon stop</code>
+ {t(($) => $.desktop.daemon.external_description_after)}
</p>
</div>
)}
<SettingsCard>
<SettingsRow
- label="Auto-start on launch"
- description="Start the daemon when you log in. While the app is open, it supervises both auto-started and manually started daemons."
+ label={t(($) => $.desktop.daemon.auto_start_title)}
+ description={t(($) => $.desktop.daemon.auto_start_description)}
>
<Switch
checked={prefs.autoStart}
@@ -145,8 +149,8 @@ export function DaemonSettingsTab() {
</SettingsRow>
<SettingsRow
- label="Auto-stop on quit"
- description="Stop the daemon when the desktop app is closed. Disable this to keep the daemon running in the background."
+ label={t(($) => $.desktop.daemon.auto_stop_title)}
+ description={t(($) => $.desktop.daemon.auto_stop_description)}
>
<Switch
checked={prefs.autoStop}
@@ -156,13 +160,13 @@ export function DaemonSettingsTab() {
</SettingsRow>
<SettingsRow
- label="CLI Status"
+ label={t(($) => $.desktop.daemon.cli_status)}
description={
cliInstalled === null
- ? "Checking…"
+ ? t(($) => $.desktop.daemon.cli_checking)
: cliInstalled
- ? "multica CLI is installed and available in PATH."
- : "multica CLI not found. Install it to enable daemon management."
+ ? t(($) => $.desktop.daemon.cli_installed)
+ : t(($) => $.desktop.daemon.cli_missing)
}
>
{cliInstalled === false && (
@@ -175,7 +179,7 @@ export function DaemonSettingsTab() {
)
}
>
- Installation Guide
+ {t(($) => $.desktop.daemon.installation_guide)}
</Button>
)}
{cliInstalled !== false && <span />}
@@ -186,13 +190,13 @@ export function DaemonSettingsTab() {
on logs. These fields matter for support tickets and bug reports,
not for everyday use. */}
<SettingsSection
- title="Diagnostics"
- description="Identification and connection details. Useful when filing a bug report or investigating why a runtime isn't showing up."
+ title={t(($) => $.desktop.daemon.diagnostics_title)}
+ description={t(($) => $.desktop.daemon.diagnostics_description)}
>
<SettingsCard>
<div className="px-4 py-2">
<DiagnosticsRow
- label="State"
+ label={t(($) => $.desktop.daemon.state)}
value={
<span className="inline-flex items-center gap-1.5">
<span
@@ -201,12 +205,12 @@ export function DaemonSettingsTab() {
DAEMON_STATE_COLORS[status.state],
)}
/>
- {DAEMON_STATE_LABELS[status.state]}
+ {daemonStateLabel(status.state, t)}
</span>
}
/>
<DiagnosticsRow
- label="Uptime"
+ label={t(($) => $.desktop.daemon.uptime)}
value={status.uptime ? formatUptime(status.uptime) : "—"}
/>
<DiagnosticsRow
@@ -215,25 +219,25 @@ export function DaemonSettingsTab() {
mono={!!status.pid}
/>
<DiagnosticsRow
- label="Daemon ID"
+ label={t(($) => $.desktop.daemon.daemon_id)}
value={status.daemonId ?? "—"}
mono={!!status.daemonId}
/>
<DiagnosticsRow
- label="Profile"
+ label={t(($) => $.desktop.daemon.profile)}
value={status.profile || "default"}
/>
<DiagnosticsRow
- label="Server URL"
+ label={t(($) => $.desktop.daemon.server_url)}
value={status.serverUrl ?? "—"}
mono={!!status.serverUrl}
/>
<DiagnosticsRow
- label="Device name"
+ label={t(($) => $.desktop.daemon.device_name)}
value={status.deviceName ?? "—"}
/>
<DiagnosticsRow
- label="Workspaces"
+ label={t(($) => $.desktop.daemon.workspaces)}
value={
typeof status.workspaceCount === "number"
? status.workspaceCount
diff --git a/apps/desktop/src/renderer/src/platform/daemon-reauth.test.ts b/apps/desktop/src/renderer/src/platform/daemon-reauth.test.ts
index 3595df8d7a..2e4e40544a 100644
--- a/apps/desktop/src/renderer/src/platform/daemon-reauth.test.ts
+++ b/apps/desktop/src/renderer/src/platform/daemon-reauth.test.ts
@@ -16,6 +16,20 @@ vi.mock("sonner", () => ({
}));
import { reauthenticateDaemon } from "./daemon-reauth";
+import type { DaemonTranslator } from "../components/daemon-i18n";
+
+const translations = {
+ desktop: {
+ daemon: {
+ reconnect_failed: "无法重新连接守护进程",
+ try_again_moment: "请稍后重试。",
+ try_again: "请重试。",
+ },
+ },
+};
+
+const t = ((selector: (resources: typeof translations) => string) =>
+ selector(translations)) as DaemonTranslator;
const daemonAPI = {
reauthenticate: vi.fn(),
@@ -33,7 +47,7 @@ describe("reauthenticateDaemon", () => {
localStorage.setItem("multica_token", "jwt-abc");
daemonAPI.reauthenticate.mockResolvedValue({ ok: true });
- await reauthenticateDaemon();
+ await reauthenticateDaemon(t);
expect(daemonAPI.reauthenticate).toHaveBeenCalledWith("jwt-abc", "user-1");
expect(logout).not.toHaveBeenCalled();
@@ -47,7 +61,7 @@ describe("reauthenticateDaemon", () => {
reason: "session_invalid",
});
- await reauthenticateDaemon();
+ await reauthenticateDaemon(t);
expect(logout).toHaveBeenCalledOnce();
expect(toastError).not.toHaveBeenCalled();
@@ -63,24 +77,28 @@ describe("reauthenticateDaemon", () => {
message: "mint PAT failed: 503 Service Unavailable",
});
- await reauthenticateDaemon();
+ await reauthenticateDaemon(t);
expect(logout).not.toHaveBeenCalled();
- expect(toastError).toHaveBeenCalledOnce();
+ expect(toastError).toHaveBeenCalledWith("无法重新连接守护进程", {
+ description: "mint PAT failed: 503 Service Unavailable",
+ });
});
it("does NOT log out when the IPC call itself throws unexpectedly", async () => {
localStorage.setItem("multica_token", "jwt-abc");
daemonAPI.reauthenticate.mockRejectedValue(new Error("ipc boom"));
- await reauthenticateDaemon();
+ await reauthenticateDaemon(t);
expect(logout).not.toHaveBeenCalled();
- expect(toastError).toHaveBeenCalledOnce();
+ expect(toastError).toHaveBeenCalledWith("无法重新连接守护进程", {
+ description: "ipc boom",
+ });
});
it("routes to login when there is no session token", async () => {
- await reauthenticateDaemon();
+ await reauthenticateDaemon(t);
expect(logout).toHaveBeenCalledOnce();
expect(daemonAPI.reauthenticate).not.toHaveBeenCalled();
@@ -90,7 +108,7 @@ describe("reauthenticateDaemon", () => {
localStorage.setItem("multica_token", "jwt-abc");
mockGetState.mockReturnValue({ user: null, logout });
- await reauthenticateDaemon();
+ await reauthenticateDaemon(t);
expect(logout).toHaveBeenCalledOnce();
expect(daemonAPI.reauthenticate).not.toHaveBeenCalled();
diff --git a/apps/desktop/src/renderer/src/platform/daemon-reauth.ts b/apps/desktop/src/renderer/src/platform/daemon-reauth.ts
index 5ed5f2ef75..ec902a0f15 100644
--- a/apps/desktop/src/renderer/src/platform/daemon-reauth.ts
+++ b/apps/desktop/src/renderer/src/platform/daemon-reauth.ts
@@ -1,5 +1,6 @@
import { useAuthStore } from "@multica/core/auth";
import { toast } from "sonner";
+import type { DaemonTranslator } from "../components/daemon-i18n";
/**
* Re-establish the local daemon's credentials after it failed to authenticate
@@ -18,7 +19,9 @@ import { toast } from "sonner";
* out. The 401-vs-transient classification happens in the main process where the
* real HTTP status is available; here we just act on the verdict.
*/
-export async function reauthenticateDaemon(): Promise<void> {
+export async function reauthenticateDaemon(
+ t: DaemonTranslator,
+): Promise<void> {
const user = useAuthStore.getState().user;
const token = localStorage.getItem("multica_token");
if (!user || !token) {
@@ -36,13 +39,17 @@ export async function reauthenticateDaemon(): Promise<void> {
return;
}
// Transient failure — keep the user signed in and let them retry.
- toast.error("Couldn't reconnect the daemon", {
- description: result.message || "Please try again in a moment.",
+ toast.error(t(($) => $.desktop.daemon.reconnect_failed), {
+ description:
+ result.message || t(($) => $.desktop.daemon.try_again_moment),
});
} catch (err) {
// An unexpected IPC error is not an auth failure — never log out on it.
- toast.error("Couldn't reconnect the daemon", {
- description: err instanceof Error ? err.message : "Please try again.",
+ toast.error(t(($) => $.desktop.daemon.reconnect_failed), {
+ description:
+ err instanceof Error
+ ? err.message
+ : t(($) => $.desktop.daemon.try_again),
});
}
}
diff --git a/apps/desktop/src/shared/daemon-types.ts b/apps/desktop/src/shared/daemon-types.ts
index 37ea0f26b9..e687740b7d 100644
--- a/apps/desktop/src/shared/daemon-types.ts
+++ b/apps/desktop/src/shared/daemon-types.ts
@@ -63,17 +63,6 @@ export const DAEMON_STATE_COLORS: Record<DaemonState, string> = {
auth_expired: "bg-red-500",
};
-export const DAEMON_STATE_LABELS: Record<DaemonState, string> = {
- running: "Running",
- stopped: "Stopped",
- starting: "Starting…",
- stopping: "Stopping…",
- installing_cli: "Setting up…",
- cli_not_found: "Setup Failed",
- recovery_paused: "Recovery paused",
- auth_expired: "Sign-in required",
-};
-
export function formatUptime(uptime?: string): string {
if (!uptime) return "";
const match = uptime.match(/(?:(\d+)h)?(\d+)m/);
diff --git a/packages/views/locales/en/settings.json b/packages/views/locales/en/settings.json
index cd7b8816c4..2f8a3aaca6 100644
--- a/packages/views/locales/en/settings.json
+++ b/packages/views/locales/en/settings.json
@@ -1148,6 +1148,84 @@
"downloading": "v{{version}} is downloading in the background — you'll be notified when it's ready to install.",
"check_now": "Check now",
"checking": "Checking…"
+ },
+ "daemon": {
+ "title": "Daemon",
+ "description": "Configure how the local agent daemon behaves with the desktop app.",
+ "settings_saved": "Daemon settings saved",
+ "settings_save_failed": "Failed to save daemon settings",
+ "signin_expired": "Sign-in expired",
+ "signin_expired_description": "The local daemon couldn't authenticate, so this device can't take tasks. Sign in again to restore it.",
+ "signin_again": "Sign in again",
+ "external_description_before": "This device's daemon runs outside the app — for example inside WSL2 — so the app can't start or stop it. Start or stop it from that environment with",
+ "external_description_after": ".",
+ "auto_start_title": "Auto-start on launch",
+ "auto_start_description": "Start the daemon when you log in. While the app is open, it supervises both auto-started and manually started daemons.",
+ "auto_stop_title": "Auto-stop on quit",
+ "auto_stop_description": "Stop the daemon when the desktop app is closed. Disable this to keep the daemon running in the background.",
+ "cli_status": "CLI Status",
+ "cli_checking": "Checking…",
+ "cli_installed": "multica CLI is installed and available in PATH.",
+ "cli_missing": "multica CLI not found. Install it to enable daemon management.",
+ "installation_guide": "Installation Guide",
+ "diagnostics_title": "Diagnostics",
+ "diagnostics_description": "Identification and connection details. Useful when filing a bug report or investigating why a runtime isn't showing up.",
+ "state": "State",
+ "uptime": "Uptime",
+ "daemon_id": "Daemon ID",
+ "profile": "Profile",
+ "server_url": "Server URL",
+ "device_name": "Device name",
+ "workspaces": "Workspaces",
+ "state_stopped": "Stopped",
+ "state_starting": "Starting…",
+ "state_running": "Running",
+ "state_stopping": "Stopping…",
+ "state_cli_not_found": "Setup Failed",
+ "state_installing_cli": "Setting up…",
+ "state_recovery_paused": "Recovery paused",
+ "state_auth_expired": "Sign-in required",
+ "start_failed": "Failed to start daemon",
+ "stop_failed": "Failed to stop daemon",
+ "restart_failed": "Failed to restart daemon",
+ "restarting": "Restarting daemon",
+ "restarting_description": "Runtimes will be back online in a few seconds.",
+ "view_logs": "View logs",
+ "managed_externally": "Managed outside the app",
+ "restart": "Restart",
+ "stop": "Stop",
+ "start": "Start",
+ "retry_setup": "Retry setup",
+ "stop_confirm_title_one": "Stop daemon with {{count}} active task?",
+ "stop_confirm_title_other": "Stop daemon with {{count}} active tasks?",
+ "stop_confirm_description_one": "{{count}} task is currently running on this device. Stopping now will interrupt it — affected tasks get marked failed once the timeout hits. The daemon won't auto-restart.",
+ "stop_confirm_description_other": "{{count}} tasks are currently running on this device. Stopping now will interrupt them — affected tasks get marked failed once the timeout hits. The daemon won't auto-restart.",
+ "cancel": "Cancel",
+ "stop_daemon": "Stop daemon",
+ "logs_title": "Local daemon logs",
+ "close": "Close",
+ "search": "Search…",
+ "copy": "Copy",
+ "clear": "Clear",
+ "copied_lines_one": "Copied {{count}} line",
+ "copied_lines_other": "Copied {{count}} lines",
+ "copy_failed": "Failed to copy",
+ "showing_logs": "Showing {{shown}} of {{total}}",
+ "buffer_full": "(buffer full)",
+ "jump_latest": "Jump to latest",
+ "runtime_count_one": "{{count}} runtime",
+ "runtime_count_other": "{{count}} runtimes",
+ "more_repeated": "{{count}} more “{{message}}” — click to expand",
+ "collapse_repeated": "collapse {{count}} repeated",
+ "no_matching_logs": "No matching log lines",
+ "no_matching_logs_description": "Try a different search or level toggle.",
+ "not_running": "Daemon isn't running",
+ "not_running_description": "Start the daemon to see logs here.",
+ "waiting_logs": "Waiting for logs…",
+ "waiting_logs_description": "New entries will appear in real time.",
+ "reconnect_failed": "Couldn't reconnect the daemon",
+ "try_again_moment": "Please try again in a moment.",
+ "try_again": "Please try again."
}
},
"members": {
diff --git a/packages/views/locales/ja/settings.json b/packages/views/locales/ja/settings.json
index 34b86e166c..65ca04f3e7 100644
--- a/packages/views/locales/ja/settings.json
+++ b/packages/views/locales/ja/settings.json
@@ -1145,6 +1145,80 @@
"downloading": "v{{version}} をバックグラウンドでダウンロード中です。インストールの準備が整うとお知らせします。",
"check_now": "今すぐ確認",
"checking": "確認中…"
+ },
+ "daemon": {
+ "title": "デーモン",
+ "description": "ローカルエージェントのデーモンとデスクトップアプリの連携方法を設定します。",
+ "settings_saved": "デーモン設定を保存しました",
+ "settings_save_failed": "デーモン設定を保存できませんでした",
+ "signin_expired": "ログインの有効期限が切れました",
+ "signin_expired_description": "ローカルデーモンを認証できないため、このデバイスは作業を受け取れません。再度ログインしてください。",
+ "signin_again": "再度ログイン",
+ "external_description_before": "このデバイスのデーモンはアプリの外部(WSL2 など)で実行されているため、アプリから起動や停止はできません。その環境で次を実行してください:",
+ "external_description_after": "。",
+ "auto_start_title": "起動時に自動開始",
+ "auto_start_description": "ログイン時にデーモンを起動します。アプリが開いている間は、自動起動したデーモンと手動で起動したデーモンの両方を監視します。",
+ "auto_stop_title": "終了時に自動停止",
+ "auto_stop_description": "デスクトップアプリを閉じたときにデーモンを停止します。無効にするとバックグラウンドで実行を続けます。",
+ "cli_status": "CLI の状態",
+ "cli_checking": "確認中…",
+ "cli_installed": "multica CLI はインストール済みで PATH から利用できます。",
+ "cli_missing": "multica CLI が見つかりません。デーモンを管理するにはインストールしてください。",
+ "installation_guide": "インストールガイド",
+ "diagnostics_title": "診断情報",
+ "diagnostics_description": "識別情報と接続の詳細です。バグ報告やランタイムが表示されない問題の調査に役立ちます。",
+ "state": "状態",
+ "uptime": "稼働時間",
+ "daemon_id": "デーモン ID",
+ "profile": "プロファイル",
+ "server_url": "サーバー URL",
+ "device_name": "デバイス名",
+ "workspaces": "ワークスペース",
+ "state_stopped": "停止中",
+ "state_starting": "起動中…",
+ "state_running": "実行中",
+ "state_stopping": "停止中…",
+ "state_cli_not_found": "セットアップに失敗しました",
+ "state_installing_cli": "セットアップ中…",
+ "state_recovery_paused": "復旧を一時停止",
+ "state_auth_expired": "ログインが必要です",
+ "start_failed": "デーモンを起動できませんでした",
+ "stop_failed": "デーモンを停止できませんでした",
+ "restart_failed": "デーモンを再起動できませんでした",
+ "restarting": "デーモンを再起動しています",
+ "restarting_description": "ランタイムは数秒後にオンラインへ戻ります。",
+ "view_logs": "ログを表示",
+ "managed_externally": "アプリ外で管理されています",
+ "restart": "再起動",
+ "stop": "停止",
+ "start": "起動",
+ "retry_setup": "セットアップを再試行",
+ "stop_confirm_title_other": "実行中の作業 {{count}} 件を中断してデーモンを停止しますか?",
+ "stop_confirm_description_other": "このデバイスで {{count}} 件の作業が実行中です。今停止すると作業は中断され、タイムアウト後に失敗としてマークされます。デーモンは自動再起動しません。",
+ "cancel": "キャンセル",
+ "stop_daemon": "デーモンを停止",
+ "logs_title": "ローカルデーモンのログ",
+ "close": "閉じる",
+ "search": "検索…",
+ "copy": "コピー",
+ "clear": "クリア",
+ "copied_lines_other": "{{count}} 行をコピーしました",
+ "copy_failed": "コピーできませんでした",
+ "showing_logs": "{{total}} 行中 {{shown}} 行を表示",
+ "buffer_full": "(バッファがいっぱいです)",
+ "jump_latest": "最新へ移動",
+ "runtime_count_other": "{{count}} ランタイム",
+ "more_repeated": "ほか {{count}} 件の「{{message}}」— クリックして展開",
+ "collapse_repeated": "重複 {{count}} 件を折りたたむ",
+ "no_matching_logs": "一致するログがありません",
+ "no_matching_logs_description": "検索語またはログレベルを変更してください。",
+ "not_running": "デーモンは実行されていません",
+ "not_running_description": "デーモンを起動すると、ここにログが表示されます。",
+ "waiting_logs": "ログを待機中…",
+ "waiting_logs_description": "新しいログがリアルタイムで表示されます。",
+ "reconnect_failed": "デーモンに再接続できませんでした",
+ "try_again_moment": "しばらくしてからもう一度お試しください。",
+ "try_again": "もう一度お試しください。"
}
},
"members": {
diff --git a/packages/views/locales/ko/settings.json b/packages/views/locales/ko/settings.json
index 2cd0524ebe..d64ae6e793 100644
--- a/packages/views/locales/ko/settings.json
+++ b/packages/views/locales/ko/settings.json
@@ -883,6 +883,80 @@
"downloading": "v{{version}}을(를) 백그라운드에서 다운로드 중입니다. 설치 준비가 끝나면 알림을 드립니다.",
"check_now": "지금 확인",
"checking": "확인 중..."
+ },
+ "daemon": {
+ "title": "데몬",
+ "description": "로컬 에이전트 데몬이 데스크톱 앱과 동작하는 방식을 설정합니다.",
+ "settings_saved": "데몬 설정을 저장했습니다",
+ "settings_save_failed": "데몬 설정을 저장하지 못했습니다",
+ "signin_expired": "로그인이 만료되었습니다",
+ "signin_expired_description": "로컬 데몬을 인증할 수 없어 이 기기에서 작업을 받을 수 없습니다. 다시 로그인해 복구하세요.",
+ "signin_again": "다시 로그인",
+ "external_description_before": "이 기기의 데몬은 앱 외부(예: WSL2)에서 실행되므로 앱에서 시작하거나 중지할 수 없습니다. 해당 환경에서 다음 명령을 실행하세요:",
+ "external_description_after": ".",
+ "auto_start_title": "앱 실행 시 자동 시작",
+ "auto_start_description": "로그인할 때 데몬을 시작합니다. 앱이 열려 있는 동안 자동으로 시작된 데몬과 수동으로 시작된 데몬을 모두 관리합니다.",
+ "auto_stop_title": "앱 종료 시 자동 중지",
+ "auto_stop_description": "데스크톱 앱을 닫을 때 데몬을 중지합니다. 끄면 데몬이 백그라운드에서 계속 실행됩니다.",
+ "cli_status": "CLI 상태",
+ "cli_checking": "확인 중...",
+ "cli_installed": "multica CLI가 설치되어 PATH에서 사용할 수 있습니다.",
+ "cli_missing": "multica CLI를 찾을 수 없습니다. 데몬을 관리하려면 설치하세요.",
+ "installation_guide": "설치 안내",
+ "diagnostics_title": "진단 정보",
+ "diagnostics_description": "식별 및 연결 세부 정보입니다. 버그를 신고하거나 런타임이 표시되지 않는 문제를 조사할 때 유용합니다.",
+ "state": "상태",
+ "uptime": "가동 시간",
+ "daemon_id": "데몬 ID",
+ "profile": "프로필",
+ "server_url": "서버 URL",
+ "device_name": "기기 이름",
+ "workspaces": "워크스페이스",
+ "state_stopped": "중지됨",
+ "state_starting": "시작 중...",
+ "state_running": "실행 중",
+ "state_stopping": "중지 중...",
+ "state_cli_not_found": "설정 실패",
+ "state_installing_cli": "설정 중...",
+ "state_recovery_paused": "복구 일시 중지",
+ "state_auth_expired": "로그인 필요",
+ "start_failed": "데몬을 시작하지 못했습니다",
+ "stop_failed": "데몬을 중지하지 못했습니다",
+ "restart_failed": "데몬을 다시 시작하지 못했습니다",
+ "restarting": "데몬을 다시 시작하는 중",
+ "restarting_description": "런타임이 몇 초 후 다시 온라인 상태가 됩니다.",
+ "view_logs": "로그 보기",
+ "managed_externally": "앱 외부에서 관리됨",
+ "restart": "다시 시작",
+ "stop": "중지",
+ "start": "시작",
+ "retry_setup": "설정 재시도",
+ "stop_confirm_title_other": "활성 작업 {{count}}개를 중단하고 데몬을 중지할까요?",
+ "stop_confirm_description_other": "이 기기에서 작업 {{count}}개가 실행 중입니다. 지금 중지하면 작업이 중단되고 시간 초과 후 실패로 표시됩니다. 데몬은 자동으로 다시 시작되지 않습니다.",
+ "cancel": "취소",
+ "stop_daemon": "데몬 중지",
+ "logs_title": "로컬 데몬 로그",
+ "close": "닫기",
+ "search": "검색...",
+ "copy": "복사",
+ "clear": "지우기",
+ "copied_lines_other": "{{count}}줄을 복사했습니다",
+ "copy_failed": "복사하지 못했습니다",
+ "showing_logs": "{{total}}줄 중 {{shown}}줄 표시",
+ "buffer_full": "(버퍼가 가득 참)",
+ "jump_latest": "최신 로그로 이동",
+ "runtime_count_other": "런타임 {{count}}개",
+ "more_repeated": "“{{message}}” 로그 {{count}}개 더 있음 — 클릭하여 펼치기",
+ "collapse_repeated": "반복 로그 {{count}}개 접기",
+ "no_matching_logs": "일치하는 로그가 없습니다",
+ "no_matching_logs_description": "검색어나 로그 레벨을 변경해 보세요.",
+ "not_running": "데몬이 실행 중이 아닙니다",
+ "not_running_description": "데몬을 시작하면 여기에 로그가 표시됩니다.",
+ "waiting_logs": "로그를 기다리는 중...",
+ "waiting_logs_description": "새 로그가 실시간으로 표시됩니다.",
+ "reconnect_failed": "데몬에 다시 연결하지 못했습니다",
+ "try_again_moment": "잠시 후 다시 시도하세요.",
+ "try_again": "다시 시도하세요."
}
},
"members": {
diff --git a/packages/views/locales/zh-Hans/settings.json b/packages/views/locales/zh-Hans/settings.json
index f82796d648..07af1516f7 100644
--- a/packages/views/locales/zh-Hans/settings.json
+++ b/packages/views/locales/zh-Hans/settings.json
@@ -1145,6 +1145,80 @@
"downloading": "v{{version}} 正在后台下载——准备好安装时会通知你。",
"check_now": "立即检查",
"checking": "检查中..."
+ },
+ "daemon": {
+ "title": "守护进程",
+ "description": "配置本地智能体守护进程与桌面应用协同工作的方式。",
+ "settings_saved": "守护进程设置已保存",
+ "settings_save_failed": "保存守护进程设置失败",
+ "signin_expired": "登录已过期",
+ "signin_expired_description": "本地守护进程无法完成身份验证,因此此设备暂时不能接收 task。请重新登录以恢复运行。",
+ "signin_again": "重新登录",
+ "external_description_before": "此设备的守护进程在应用之外运行(例如 WSL2 中),因此应用无法启动或停止它。请在相应环境中运行",
+ "external_description_after": "。",
+ "auto_start_title": "启动应用时自动运行",
+ "auto_start_description": "登录时启动守护进程。应用打开期间,它会同时监控自动启动和手动启动的守护进程。",
+ "auto_stop_title": "退出应用时自动停止",
+ "auto_stop_description": "关闭桌面应用时停止守护进程。关闭此选项可让守护进程继续在后台运行。",
+ "cli_status": "CLI 状态",
+ "cli_checking": "检查中...",
+ "cli_installed": "multica CLI 已安装,并可通过 PATH 调用。",
+ "cli_missing": "未找到 multica CLI。安装后才能管理守护进程。",
+ "installation_guide": "安装指南",
+ "diagnostics_title": "诊断信息",
+ "diagnostics_description": "设备标识与连接详情,可用于提交错误报告或排查运行时未显示的问题。",
+ "state": "状态",
+ "uptime": "运行时长",
+ "daemon_id": "守护进程 ID",
+ "profile": "配置档案",
+ "server_url": "服务器 URL",
+ "device_name": "设备名称",
+ "workspaces": "工作区",
+ "state_stopped": "已停止",
+ "state_starting": "正在启动...",
+ "state_running": "运行中",
+ "state_stopping": "正在停止...",
+ "state_cli_not_found": "设置失败",
+ "state_installing_cli": "正在设置...",
+ "state_recovery_paused": "恢复已暂停",
+ "state_auth_expired": "需要登录",
+ "start_failed": "启动守护进程失败",
+ "stop_failed": "停止守护进程失败",
+ "restart_failed": "重启守护进程失败",
+ "restarting": "正在重启守护进程",
+ "restarting_description": "运行时将在几秒后恢复在线。",
+ "view_logs": "查看日志",
+ "managed_externally": "由应用外部管理",
+ "restart": "重启",
+ "stop": "停止",
+ "start": "启动",
+ "retry_setup": "重试设置",
+ "stop_confirm_title_other": "停止守护进程并中断 {{count}} 个活动 task?",
+ "stop_confirm_description_other": "此设备当前有 {{count}} 个 task 正在运行。立即停止会中断这些 task;超时后,受影响的 task 会被标记为失败。守护进程不会自动重启。",
+ "cancel": "取消",
+ "stop_daemon": "停止守护进程",
+ "logs_title": "本地守护进程日志",
+ "close": "关闭",
+ "search": "搜索...",
+ "copy": "复制",
+ "clear": "清空",
+ "copied_lines_other": "已复制 {{count}} 行",
+ "copy_failed": "复制失败",
+ "showing_logs": "显示 {{shown}} / {{total}} 行",
+ "buffer_full": "(缓冲区已满)",
+ "jump_latest": "跳至最新日志",
+ "runtime_count_other": "{{count}} 个运行时",
+ "more_repeated": "另有 {{count}} 条\"{{message}}\"——点击展开",
+ "collapse_repeated": "收起 {{count}} 条重复日志",
+ "no_matching_logs": "没有匹配的日志",
+ "no_matching_logs_description": "请更换搜索词或日志级别。",
+ "not_running": "守护进程未运行",
+ "not_running_description": "启动守护进程后,日志会显示在这里。",
+ "waiting_logs": "正在等待日志...",
+ "waiting_logs_description": "新日志会实时显示在这里。",
+ "reconnect_failed": "无法重新连接守护进程",
+ "try_again_moment": "请稍后重试。",
+ "try_again": "请重试。"
}
},
"members": {