Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

feat(web): translate the Computers settings

Kilynd488825d3277
diff --git a/apps/web/src/features/local-computer/agent-availability.ts b/apps/web/src/features/local-computer/agent-availability.ts
index 08146a4d..59897649 100644
--- a/apps/web/src/features/local-computer/agent-availability.ts
+++ b/apps/web/src/features/local-computer/agent-availability.ts
@@ -7,6 +7,9 @@ import type {
TeamHubTenantAgent,
TeamHubTenantAgentAvailabilitySnapshot,
} from "@/features/teamhub/teamhub-types";
+import type { Translate } from "@/i18n/language";
+
+import { computersMessages } from "./computers.messages";
export interface AgentAvailability {
readonly available: boolean;
@@ -52,29 +55,36 @@ export function projectAgentAvailabilitySnapshots(
export function agentStatusSummary(
agentAvailabilities: ReadonlyMap<string, AgentAvailability>,
agents: TeamHubTenantAgent[],
+ t: Translate,
): string | undefined {
const counts = { error: 0, offline: 0, online: 0, unknown: 0 };
for (const agent of agents)
- counts[availabilityOf(agentAvailabilities, agent).status] += 1;
+ counts[availabilityOf(agentAvailabilities, agent, t).status] += 1;
const parts = [
counts.error
- ? `${counts.error} need${counts.error === 1 ? "s" : ""} attention`
+ ? t(computersMessages.agentsNeedAttention, { count: counts.error })
+ : null,
+ counts.offline
+ ? t(computersMessages.agentsOffline, { count: counts.offline })
+ : null,
+ counts.unknown
+ ? t(computersMessages.agentsStatusUnavailable, { count: counts.unknown })
: null,
- counts.offline ? `${counts.offline} offline` : null,
- counts.unknown ? `${counts.unknown} status unavailable` : null,
].filter(Boolean);
return parts.length ? parts.join(" · ") : undefined;
}
+/** An Agent TeamHub has not reported yet reads as "Status unavailable". */
export function availabilityOf(
agentAvailabilities: ReadonlyMap<string, AgentAvailability>,
agent: TeamHubTenantAgent,
+ t: Translate,
): AgentAvailability {
return (
agentAvailabilities.get(agent.actor.id) ?? {
activeTaskCount: 0,
available: false,
- label: "Status unavailable",
+ label: t(computersMessages.statusUnavailable),
status: "unknown",
}
);
diff --git a/apps/web/src/features/local-computer/browser-connection/browser-connection-copy.ts b/apps/web/src/features/local-computer/browser-connection/browser-connection-copy.ts
index c91db2bb..8ed8976e 100644
--- a/apps/web/src/features/local-computer/browser-connection/browser-connection-copy.ts
+++ b/apps/web/src/features/local-computer/browser-connection/browser-connection-copy.ts
@@ -1,5 +1,8 @@
import { TeamHubError } from "@/features/teamhub/teamhub-error";
import type { TeamHubBrowserConnectionStatus } from "@/features/teamhub/teamhub-types";
+import type { Translate } from "@/i18n/language";
+
+import { computersMessages } from "../computers.messages";
export const PLAYWRIGHT_EXTENSION_URL =
"https://chromewebstore.google.com/detail/playwright-extension/mmlmfjhmonkocbjadbfplnigmagldckm";
@@ -8,92 +11,90 @@ type BrowserConnectionTone = "success" | "warning" | "neutral";
export function browserConnectionStateCopy(
state: TeamHubBrowserConnectionStatus["state"],
+ t: Translate,
): { label: string; short: string; tone: BrowserConnectionTone } {
switch (state) {
case "connected":
return {
- short: "Connected",
- label: "Connected. Browser tasks use your Chrome and its sign-ins.",
+ short: t(computersMessages.connected),
+ label: t(computersMessages.browserConnectedLabel),
tone: "success",
};
case "token_invalid":
return {
- short: "Token expired",
- label:
- "Token expired. Copy a new token from the extension, then reconnect.",
+ short: t(computersMessages.tokenExpired),
+ label: t(computersMessages.tokenExpiredLabel),
tone: "warning",
};
case "browser_unavailable":
return {
- short: "Chrome unavailable",
- label:
- "Can't reach your Chrome. Make sure Chrome is open on this Computer, then reconnect.",
+ short: t(computersMessages.chromeUnavailable),
+ label: t(computersMessages.chromeUnavailableLabel),
tone: "warning",
};
case "extension_unavailable":
return {
- short: "Extension unavailable",
- label:
- "Playwright Extension not found. Install and enable it in Chrome, then reconnect.",
+ short: t(computersMessages.extensionUnavailable),
+ label: t(computersMessages.extensionNotFound),
tone: "warning",
};
case "not_connected":
return {
- short: "Not connected",
- label:
- "Not connected. Agent browser tasks wait until you connect your everyday Chrome.",
+ short: t(computersMessages.notConnected),
+ label: t(computersMessages.notConnectedLabel),
tone: "warning",
};
case "isolated":
return {
- short: "Not connected",
- label:
- "Not connected. Agents use a separate browser without your sign-ins.",
+ short: t(computersMessages.notConnected),
+ label: t(computersMessages.isolatedLabel),
tone: "neutral",
};
case "unsupported":
return {
- short: "Not supported",
- label:
- "This Computer can't use your browser. Agents use a separate browser without your sign-ins.",
+ short: t(computersMessages.notSupported),
+ label: t(computersMessages.unsupportedLabel),
tone: "neutral",
};
default:
// A newer Computer may report a state this Web build does not know.
return {
- short: "Browser status",
- label: "Browser status unknown",
+ short: t(computersMessages.browserStatus),
+ label: t(computersMessages.browserStatusUnknown),
tone: "neutral",
};
}
}
-export function browserConnectionErrorMessage(error: unknown): string {
+export function browserConnectionErrorMessage(
+ error: unknown,
+ t: Translate,
+): string {
const code = error instanceof TeamHubError ? error.code : undefined;
switch (code) {
case "INVALID_BROWSER_TOKEN":
- return "Can't read this token. Copy the full line that starts with PLAYWRIGHT_MCP_EXTENSION_TOKEN=, or only the token after the equals sign.";
+ return t(computersMessages.browserInvalidToken);
case "LOCAL_COMPUTER_OFFLINE":
- return "This Computer is offline. Make sure it's on and running Linger Computer.";
+ return t(computersMessages.browserComputerOffline);
case "LOCAL_COMPUTER_NOT_FOUND":
- return "Can't find this Computer. It may have been removed.";
+ return t(computersMessages.browserComputerNotFound);
case "BROWSER_CONNECTION_UNSUPPORTED":
- return "Linger Computer on this Computer is out of date. Update it, then connect your browser.";
+ return t(computersMessages.browserOutdated);
case "BROWSER_CONNECTION_TIMEOUT":
- return "Connection timed out. Make sure Chrome is open and the extension is enabled, then try again.";
+ return t(computersMessages.browserTimeout);
case "BROWSER_TOKEN_REJECTED":
- return "The extension didn't accept this token. Copy the current token from the extension, then reconnect.";
+ return t(computersMessages.browserTokenRejected);
case "BROWSER_EXTENSION_UNAVAILABLE":
- return "Playwright Extension not found. Install and enable it in Chrome, then reconnect.";
+ return t(computersMessages.extensionNotFound);
case "BROWSER_UNAVAILABLE":
- return "Google Chrome isn't installed on this Computer. Install Chrome first.";
+ return t(computersMessages.chromeNotInstalled);
case "BROWSER_BUSY":
- return "An Agent task is using this Chrome. Connect after it finishes.";
+ return t(computersMessages.browserBusy);
case "BROWSER_CONNECTION_INVALID":
- return "The saved browser connection on this Computer is damaged. Paste a token to reconnect.";
+ return t(computersMessages.browserConnectionDamaged);
case "BROWSER_CONNECTION_FAILED":
- return "This Computer couldn't connect to your browser. Try again later.";
+ return t(computersMessages.browserConnectFailed);
default:
- return "Can't connect to the browser right now. Try again later.";
+ return t(computersMessages.browserConnectUnavailable);
}
}
diff --git a/apps/web/src/features/local-computer/browser-connection/browser-connection-dialog.tsx b/apps/web/src/features/local-computer/browser-connection/browser-connection-dialog.tsx
index 0323f078..d9248487 100644
--- a/apps/web/src/features/local-computer/browser-connection/browser-connection-dialog.tsx
+++ b/apps/web/src/features/local-computer/browser-connection/browser-connection-dialog.tsx
@@ -12,7 +12,10 @@ import { StatusPill } from "@/components/ui/status-pill";
import { TeamHubError } from "@/features/teamhub/teamhub-error";
import { useTeamHubRuntime } from "@/features/teamhub/teamhub-runtime";
import type { TeamHubBrowserConnectionStatus } from "@/features/teamhub/teamhub-types";
+import { commonMessages } from "@/i18n/common.messages";
+import { RichMessage, useT } from "@/i18n/use-translation";
+import { computersMessages } from "../computers.messages";
import { localComputersQueryOptions } from "../local-computer-queries";
import {
browserConnectionQueryKey,
@@ -46,6 +49,7 @@ export function BrowserConnectionDialog({
reason?: string;
tenantId: string;
}) {
+ const t = useT();
const { client } = useTeamHubRuntime();
const queryClient = useQueryClient();
const inventory = useQuery(localComputersQueryOptions(client, tenantId));
@@ -72,7 +76,8 @@ export function BrowserConnectionDialog({
const [pastedToken, setPastedToken] = useState("");
const [editing, setEditing] = useState(false);
const [pending, setPending] = useState<PendingAction>(null);
- const [failure, setFailure] = useState<string | null>(null);
+ // The error is kept, not its text, so the text follows the language.
+ const [failure, setFailure] = useState<{ error: unknown } | null>(null);
function selectComputer(computerId: string) {
setRequestedComputerId(computerId);
@@ -97,7 +102,7 @@ export function BrowserConnectionDialog({
);
setEditing(false);
} catch (error) {
- setFailure(browserConnectionErrorMessage(error));
+ setFailure({ error });
} finally {
setPending(null);
}
@@ -132,18 +137,16 @@ export function BrowserConnectionDialog({
return (
<ModalDialog
- ariaLabel="Connect my browser"
+ ariaLabel={t(computersMessages.connectMyBrowser)}
className="fixed inset-0 z-50 m-auto max-h-[calc(100dvh-2rem)] w-[calc(100%-2rem)] max-w-[480px] overflow-auto rounded-xl border border-border bg-popover p-0 shadow-lg backdrop:bg-[var(--app-overlay)]"
onClose={requestClose}
>
<div className="p-5">
<header className="mb-5 flex items-start justify-between gap-4">
<div>
- <h2 className="text-lg">Connect my browser</h2>
+ <h2 className="text-lg">{t(computersMessages.connectMyBrowser)}</h2>
<p className="mt-1 text-sm text-muted-foreground">
- Let Agent browser tasks on this Computer use your everyday Chrome
- and its sign-ins. The token goes only to your Computer and never
- appears in chat.
+ {t(computersMessages.connectMyBrowserIntro)}
</p>
{reason ? (
<p className="mt-2 text-sm font-medium text-foreground">
@@ -152,7 +155,8 @@ export function BrowserConnectionDialog({
) : null}
</div>
<Button
- aria-label="Close"
+ data-voice-close
+ aria-label={t(commonMessages.close)}
disabled={pending !== null}
onClick={requestClose}
size="icon"
@@ -164,32 +168,37 @@ export function BrowserConnectionDialog({
{inventory.isPending ? (
<p className="text-sm text-muted-foreground" role="status">
- Loading your Computers…
+ {t(computersMessages.loadingComputers)}
</p>
) : inventory.isError ? (
<FormFeedback tone="danger">
- Can't load your Computers right now.
+ {t(computersMessages.cannotLoadComputers)}
</FormFeedback>
) : !computer ? (
<FormFeedback tone="info">
{lockedComputerId
- ? "This Computer is no longer connected to your account."
- : "You don't have a Local Computer yet. Connect one in Settings > Computers first. Cloud Computers can't use your browser."}
+ ? t(computersMessages.computerNoLongerConnected)
+ : t(computersMessages.noLocalComputerYet)}
</FormFeedback>
) : (
<div className="space-y-5">
{lockedComputerId ? (
<p className="text-sm text-foreground">
- Computer:{" "}
- <span className="font-medium">{computer.display_name}</span>
+ <RichMessage
+ message={computersMessages.computerNamed}
+ tags={{
+ name: (text) => <span className="font-medium">{text}</span>,
+ }}
+ values={{ computer: computer.display_name }}
+ />
</p>
) : (
<label className="block">
<span className="mb-1.5 block text-sm font-medium text-foreground">
- Computer
+ {t(computersMessages.computer)}
</span>
<Select
- aria-label="Computer"
+ aria-label={t(computersMessages.computer)}
className="ui-field-control w-full text-sm"
disabled={pending !== null}
onValueChange={selectComputer}
@@ -199,7 +208,9 @@ export function BrowserConnectionDialog({
<SelectItem key={item.computer_id} value={item.computer_id}>
{item.status === "online"
? item.display_name
- : `${item.display_name} (offline)`}
+ : t(computersMessages.computerOfflineOption, {
+ computer: item.display_name,
+ })}
</SelectItem>
))}
</Select>
@@ -226,7 +237,7 @@ export function BrowserConnectionDialog({
setEditing(true);
}}
>
- Reconfigure
+ {t(computersMessages.reconfigure)}
</Button>
<Button
disabled={pending !== null}
@@ -241,7 +252,9 @@ export function BrowserConnectionDialog({
}
tone="danger"
>
- {pending === "disconnect" ? "Disconnecting…" : "Disconnect"}
+ {pending === "disconnect"
+ ? t(computersMessages.disconnecting)
+ : t(computersMessages.disconnect)}
</Button>
</div>
) : null}
@@ -250,27 +263,34 @@ export function BrowserConnectionDialog({
<form className="space-y-4" onSubmit={submit}>
<ol className="list-decimal space-y-1.5 pl-5 text-sm text-foreground">
<li>
- Install{" "}
- <a
- className="inline-flex items-center gap-1 font-medium text-app-link underline-offset-2 hover:underline"
- href={PLAYWRIGHT_EXTENSION_URL}
- rel="noreferrer"
- target="_blank"
- >
- Playwright Extension
- <Icon icon={LinkSquare02Icon} size={14} />
- </a>{" "}
- in Chrome
+ <RichMessage
+ message={computersMessages.installExtensionStep}
+ tags={{
+ link: (text) => (
+ <a
+ className="inline-flex items-center gap-1 font-medium text-app-link underline-offset-2 hover:underline"
+ href={PLAYWRIGHT_EXTENSION_URL}
+ rel="noreferrer"
+ target="_blank"
+ >
+ {text}
+ <Icon icon={LinkSquare02Icon} size={14} />
+ </a>
+ ),
+ }}
+ />
</li>
<li>
- Click the extension icon and copy the token it shows (the
- full{" "}
- <code className="break-all text-xs">
- PLAYWRIGHT_MCP_EXTENSION_TOKEN=…
- </code>{" "}
- line also works)
+ <RichMessage
+ message={computersMessages.copyTokenStep}
+ tags={{
+ code: (text) => (
+ <code className="break-all text-xs">{text}</code>
+ ),
+ }}
+ />
</li>
- <li>Paste it below and connect</li>
+ <li>{t(computersMessages.pasteTokenStep)}</li>
</ol>
<Field
autoCapitalize="off"
@@ -279,13 +299,13 @@ export function BrowserConnectionDialog({
data-1p-ignore=""
data-lpignore="true"
disabled={pending !== null}
- label="Extension token"
+ label={t(computersMessages.extensionToken)}
name="playwright-extension-token"
onChange={(event) => {
setFailure(null);
setPastedToken(event.target.value);
}}
- placeholder="Paste token"
+ placeholder={t(computersMessages.pasteToken)}
spellCheck={false}
type="password"
value={pastedToken}
@@ -299,7 +319,7 @@ export function BrowserConnectionDialog({
setEditing(false);
}}
>
- Cancel
+ {t(commonMessages.cancel)}
</Button>
) : null}
<Button
@@ -308,15 +328,17 @@ export function BrowserConnectionDialog({
type="submit"
>
{pending === "configure"
- ? "Connecting, up to 1 minute…"
- : "Connect"}
+ ? t(computersMessages.connectingUpToMinute)
+ : t(computersMessages.connect)}
</Button>
</div>
</form>
) : null}
{failure ? (
- <FormFeedback tone="danger">{failure}</FormFeedback>
+ <FormFeedback tone="danger">
+ {browserConnectionErrorMessage(failure.error, t)}
+ </FormFeedback>
) : null}
</div>
)}
@@ -336,24 +358,25 @@ function BrowserConnectionStatusSection({
loading: boolean;
online: boolean;
}) {
+ const t = useT();
if (!online) {
return (
<FormFeedback tone="info">
- This Computer is offline. Make sure it's on and running Linger Computer.
+ {t(computersMessages.browserComputerOffline)}
</FormFeedback>
);
}
if (loading) {
return (
<p className="text-sm text-muted-foreground" role="status">
- Checking browser status…
+ {t(computersMessages.checkingBrowserStatus)}
</p>
);
}
if (!current) {
return (
<FormFeedback tone="danger">
- {browserConnectionErrorMessage(error)}
+ {browserConnectionErrorMessage(error, t)}
</FormFeedback>
);
}
@@ -365,7 +388,8 @@ function BrowserConnectionSummary({
}: {
status: TeamHubBrowserConnectionStatus;
}) {
- const copy = browserConnectionStateCopy(status.state);
+ const t = useT();
+ const copy = browserConnectionStateCopy(status.state, t);
return (
<div className="space-y-2" role="status">
<StatusPill tone={copy.tone}>{copy.short}</StatusPill>
diff --git a/apps/web/src/features/local-computer/browser-connection/computer-browser-connection.tsx b/apps/web/src/features/local-computer/browser-connection/computer-browser-connection.tsx
index 362668a8..b1a6c3ce 100644
--- a/apps/web/src/features/local-computer/browser-connection/computer-browser-connection.tsx
+++ b/apps/web/src/features/local-computer/browser-connection/computer-browser-connection.tsx
@@ -5,7 +5,10 @@ import { lazy, Suspense, useState } from "react";
import { Button } from "@/components/ui/button";
import { Icon } from "@/components/ui/icon";
import { useTeamHubRuntime } from "@/features/teamhub/teamhub-runtime";
+import type { Translate } from "@/i18n/language";
+import { useT } from "@/i18n/use-translation";
+import { computersMessages } from "../computers.messages";
import { ComputerRow, ProgressChip, RowMark, StatusDot } from "../computer-row";
import { browserConnectionQueryOptions } from "./browser-connection-api";
import {
@@ -32,6 +35,7 @@ export function ComputerBrowserConnection({
tenantId: string;
variant: "chip" | "row";
}) {
+ const t = useT();
const { client } = useTeamHubRuntime();
const [open, setOpen] = useState(false);
const status = useQuery({
@@ -45,15 +49,15 @@ export function ComputerBrowserConnection({
if (variant === "chip" && online && status.isPending) return null;
const connected = state === "connected";
const copy = status.data
- ? browserConnectionStateCopy(status.data.state)
+ ? browserConnectionStateCopy(status.data.state, t)
: null;
const explanation = !online
- ? "Unavailable while this computer is offline."
+ ? t(computersMessages.browserUnavailableOffline)
: status.data
- ? browserExplanation(status.data.state)
+ ? browserExplanation(status.data.state, t)
: status.isError
- ? browserConnectionErrorMessage(status.error)
- : "Checking browser status…";
+ ? browserConnectionErrorMessage(status.error, t)
+ : t(computersMessages.checkingBrowserStatus);
const dialog = open ? (
<Suspense fallback={null}>
<BrowserConnectionDialog
@@ -70,11 +74,11 @@ export function ComputerBrowserConnection({
<ProgressChip
hint={
connected
- ? "Agents can use your Chrome"
- : "Optional · let Agents use your Chrome"
+ ? t(computersMessages.agentsCanUseChrome)
+ : t(computersMessages.chromeOptional)
}
icon={ChromeIcon}
- label={connected ? "Chrome" : "Connect Chrome"}
+ label={connected ? "Chrome" : t(computersMessages.connectChrome)}
onClick={connected || !online ? undefined : () => setOpen(true)}
state={connected ? "done" : "optional"}
/>
@@ -92,7 +96,9 @@ export function ComputerBrowserConnection({
size="compact"
tone={connected ? "ghost" : "secondary"}
>
- {connected ? "Manage" : "Connect"}
+ {connected
+ ? t(computersMessages.manage)
+ : t(computersMessages.connect)}
</Button>
) : null
}
@@ -131,15 +137,18 @@ export function ComputerBrowserConnection({
* The second line of the Chrome row. Browser tools work without a connection;
* connecting only decides whose Chrome, and so whose sign-ins, they use.
*/
-function browserExplanation(state: TeamHubBrowserConnectionStatus["state"]) {
+function browserExplanation(
+ state: TeamHubBrowserConnectionStatus["state"],
+ t: Translate,
+) {
switch (state) {
case "connected":
- return "Agents use your sign-ins.";
+ return t(computersMessages.agentsUseSignIns);
case "isolated":
- return "Agents browse without your sign-ins.";
+ return t(computersMessages.agentsBrowseWithoutSignIns);
case "not_connected":
- return "Agents ask before browsing.";
+ return t(computersMessages.agentsAskBeforeBrowsing);
default:
- return browserConnectionStateCopy(state).label;
+ return browserConnectionStateCopy(state, t).label;
}
}
diff --git a/apps/web/src/features/local-computer/computer-agent-chips.tsx b/apps/web/src/features/local-computer/computer-agent-chips.tsx
index a282188d..ec3ecb5a 100644
--- a/apps/web/src/features/local-computer/computer-agent-chips.tsx
+++ b/apps/web/src/features/local-computer/computer-agent-chips.tsx
@@ -4,11 +4,14 @@ import { useState } from "react";
import { Icon } from "@/components/ui/icon";
import { ActorAvatar } from "@/features/rooms/members/actor-avatar";
import type { TeamHubTenantAgent } from "@/features/teamhub/teamhub-types";
+import type { Translate } from "@/i18n/language";
+import { useT } from "@/i18n/use-translation";
import { cn } from "@/lib/cn";
import { availabilityOf, type AgentAvailability } from "./agent-availability";
import { Hint } from "./computer-hint";
import { appNames } from "./computer-readiness";
+import { computersMessages } from "./computers.messages";
/** Two rows of five avatars, the last slot showing the rest. */
const collapsedCount = 9;
@@ -38,18 +41,19 @@ export function AgentChips({
agents: TeamHubTenantAgent[];
onOpenAgent: (actorId: string) => void;
}) {
+ const t = useT();
const [expanded, setExpanded] = useState(false);
if (agents.length === 0)
return (
<p className="flex items-center gap-2 px-2 py-2 text-sm text-muted-foreground">
<Icon icon={BotIcon} size={16} />
- No Agents on this computer yet. Create one from Chats.
+ {t(computersMessages.noAgents)}
</p>
);
const sorted = [...agents].sort(
(left, right) =>
- statusOrder[availabilityOf(agentAvailabilities, left).status] -
- statusOrder[availabilityOf(agentAvailabilities, right).status] ||
+ statusOrder[availabilityOf(agentAvailabilities, left, t).status] -
+ statusOrder[availabilityOf(agentAvailabilities, right, t).status] ||
left.actor.display_name.localeCompare(right.actor.display_name),
);
const visible = expanded ? sorted : sorted.slice(0, collapsedCount);
@@ -59,7 +63,7 @@ export function AgentChips({
{visible.map((agent) => (
<AgentChip
agent={agent}
- availability={availabilityOf(agentAvailabilities, agent)}
+ availability={availabilityOf(agentAvailabilities, agent, t)}
key={agent.actor.id}
onOpen={() => onOpenAgent(agent.actor.id)}
/>
@@ -74,7 +78,7 @@ export function AgentChips({
{expanded ? "–" : `+${hidden}`}
</span>
<span className="text-xs text-muted-foreground">
- {expanded ? "Less" : "More"}
+ {t(expanded ? computersMessages.less : computersMessages.more)}
</span>
</button>
) : null}
@@ -91,10 +95,11 @@ function AgentChip({
availability: AgentAvailability;
onOpen: () => void;
}) {
+ const t = useT();
const tone = chipTone(availability);
return (
<Hint
- text={`${agent.actor.display_name} · ${availabilityText(agent, availability)}`}
+ text={`${agent.actor.display_name} · ${availabilityText(agent, availability, t)}`}
>
<button className={tileClassName} onClick={onOpen} type="button">
<span
@@ -155,6 +160,7 @@ function chipTone(
function availabilityText(
agent: TeamHubTenantAgent,
availability: AgentAvailability,
+ t: Translate,
) {
const runtimeType =
availability.localRuntimeStatus?.runtime_type ??
@@ -166,12 +172,12 @@ function availabilityText(
return [
availability.label,
app,
- tasks ? `${tasks} task${tasks === 1 ? "" : "s"} running` : null,
+ tasks ? t(computersMessages.tasksRunning, { count: tasks }) : null,
]
.filter(Boolean)
.join(" · ");
}
if (needsSignIn(availability) && app)
- return `${availability.label} · ${app} sign-in needed`;
+ return `${availability.label} · ${t(computersMessages.appSignInNeeded, { app })}`;
return reason ? `${availability.label} · ${reason}` : availability.label;
}
diff --git a/apps/web/src/features/local-computer/computer-app-setup-dialog.tsx b/apps/web/src/features/local-computer/computer-app-setup-dialog.tsx
index ab31f605..858f4ed1 100644
--- a/apps/web/src/features/local-computer/computer-app-setup-dialog.tsx
+++ b/apps/web/src/features/local-computer/computer-app-setup-dialog.tsx
@@ -12,12 +12,15 @@ import type {
TeamHubLocalComputerPage,
TeamHubLocalRuntimeType,
} from "@/features/teamhub/teamhub-types";
+import { commonMessages } from "@/i18n/common.messages";
+import { useT } from "@/i18n/use-translation";
import { cn } from "@/lib/cn";
import { appIcons } from "./computer-app-icons";
import { Hint } from "./computer-hint";
import { appNames, appOrder, appStatus } from "./computer-readiness";
import { CopyValueButton } from "./computer-setup-instructions";
+import { computersMessages } from "./computers.messages";
import { installCommand, loginCommands } from "./local-runtime-commands";
type LocalComputer = TeamHubLocalComputerPage["items"][number];
@@ -41,6 +44,7 @@ export function AppSetupDialog({
computer: LocalComputer;
onClose: () => void;
}) {
+ const t = useT();
const [app, setApp] = useState(initialApp);
const [waiting, setWaiting] = useState(false);
const status = appStatus(computer, app);
@@ -82,11 +86,13 @@ export function AppSetupDialog({
role="status"
>
{!online ? (
- `${computer.display_name} is offline`
+ t(computersMessages.computerOffline, {
+ computer: computer.display_name,
+ })
) : ready ? (
<>
<Icon icon={Tick02Icon} size={14} />
- {name} is ready
+ {t(computersMessages.appReady, { app: name })}
</>
) : waiting ? (
<>
@@ -95,11 +101,15 @@ export function AppSetupDialog({
icon={Loading03Icon}
size={14}
/>
- <span className="town-shimmer-text">Checking {name}…</span>
+ <span className="town-shimmer-text">
+ {t(computersMessages.checkingApp, { app: name })}
+ </span>
</>
) : null}
</span>
- <Button onClick={onClose}>Close</Button>
+ <Button data-voice-close onClick={onClose}>
+ {t(commonMessages.close)}
+ </Button>
</>
}
onClose={onClose}
@@ -107,16 +117,21 @@ export function AppSetupDialog({
title={
<span className="flex flex-wrap items-center gap-2">
<Icon icon={appIcons[app]} size={16} />
- {outdated
- ? `Update ${name}`
- : installed
- ? `Sign in to ${name}`
- : `Set up ${name}`}
+ {t(
+ outdated
+ ? computersMessages.updateApp
+ : installed
+ ? computersMessages.signInToApp
+ : computersMessages.setUpApp,
+ { app: name },
+ )}
<Hint
focusable
className="text-muted-foreground/70"
placement="bottom"
- text={`On ${computer.display_name}, in the same account you used to connect it.`}
+ text={t(computersMessages.setupAccountHint, {
+ computer: computer.display_name,
+ })}
>
<span className="inline-flex">
<Icon icon={InformationCircleIcon} size={14} />
@@ -152,7 +167,7 @@ export function AppSetupDialog({
) : null}
<ol className="grid grid-cols-3 gap-3">
<VisualStep
- label="Install"
+ label={t(computersMessages.stepInstall)}
number={1}
state={installed ? "done" : "current"}
>
@@ -161,10 +176,10 @@ export function AppSetupDialog({
<VisualStep
hint={
app === "pi"
- ? "Then type /login in Pi"
- : "A sign-in page opens in your browser"
+ ? t(computersMessages.piLoginHint)
+ : t(computersMessages.signInPageHint)
}
- label="Sign in"
+ label={t(computersMessages.signIn)}
number={2}
state={ready ? "done" : installed ? "current" : "todo"}
>
@@ -173,12 +188,16 @@ export function AppSetupDialog({
<MiniWindow>
<Icon icon={appIcons[app]} size={14} />
<span className="rounded-md bg-primary px-2.5 py-0.5 text-[12px] font-medium text-primary-foreground">
- Sign in
+ {t(computersMessages.signIn)}
</span>
</MiniWindow>
</div>
</VisualStep>
- <VisualStep label="Ready" number={3} state={ready ? "done" : "todo"}>
+ <VisualStep
+ label={t(computersMessages.ready)}
+ number={3}
+ state={ready ? "done" : "todo"}
+ >
<span className="inline-flex h-8 items-center gap-1.5 rounded-full bg-card pr-2.5 pl-2 text-xs shadow-outline">
<Icon icon={appIcons[app]} size={14} />
{name}
@@ -190,8 +209,10 @@ export function AppSetupDialog({
<div className="mt-4">
<p className="text-xs text-muted-foreground">
{current === "install"
- ? `Paste into Terminal on ${computer.display_name}`
- : "Run this, then sign in on the page that opens"}
+ ? t(computersMessages.pasteIntoTerminal, {
+ computer: computer.display_name,
+ })
+ : t(computersMessages.runThenSignIn)}
</p>
<CommandLine
command={current === "install" ? install : login}
diff --git a/apps/web/src/features/local-computer/computer-detail.tsx b/apps/web/src/features/local-computer/computer-detail.tsx
index 72d40e22..1cc9e847 100644
--- a/apps/web/src/features/local-computer/computer-detail.tsx
+++ b/apps/web/src/features/local-computer/computer-detail.tsx
@@ -28,6 +28,10 @@ import type {
TeamHubLocalRuntimeType,
TeamHubTenantAgent,
} from "@/features/teamhub/teamhub-types";
+import { commonMessages } from "@/i18n/common.messages";
+import type { Translate } from "@/i18n/language";
+import type { Message } from "@/i18n/messages";
+import { useT, useTranslation } from "@/i18n/use-translation";
import { cn } from "@/lib/cn";
import {
@@ -57,6 +61,7 @@ import {
} from "./computer-readiness";
import { relativeTime } from "./computer-relative-time";
import { ComputerRow, ProgressChip, RowMark, StatusDot } from "./computer-row";
+import { computersMessages } from "./computers.messages";
import { isUpgradeRecommended } from "./computer-version";
type LocalComputer = TeamHubLocalComputerPage["items"][number];
@@ -86,6 +91,7 @@ export function ComputerDetail({
onOpenAgent: (actorId: string) => void;
onRemove?: () => void;
}) {
+ const t = useT();
const [reportedComputer, setReportedComputer] = useState(latestComputer);
if (
reportedComputer.computer_id !== latestComputer.computer_id ||
@@ -120,7 +126,9 @@ export function ComputerDetail({
return (
<div
- aria-label={`${computer.display_name} details`}
+ aria-label={t(computersMessages.detailsLabel, {
+ computer: computer.display_name,
+ })}
className="w-full"
role="region"
>
@@ -135,8 +143,8 @@ export function ComputerDetail({
/>
<Group
count={agents.length}
- summary={agentStatusSummary(agentAvailabilities, agents)}
- title="Agents"
+ summary={agentStatusSummary(agentAvailabilities, agents, t)}
+ title={t(computersMessages.agents)}
>
<AgentChips
agentAvailabilities={agentAvailabilities}
@@ -145,8 +153,8 @@ export function ComputerDetail({
/>
</Group>
<Group
- hint="Agents use these apps on this computer to do the work. One ready app is enough."
- title="AI apps"
+ hint={t(computersMessages.aiAppsHint)}
+ title={t(computersMessages.aiApps)}
>
{appOrder.map((app) => (
<AppRow
@@ -159,7 +167,7 @@ export function ComputerDetail({
))}
</Group>
{localModelsHref ? (
- <Group title="Local models">
+ <Group title={t(computersMessages.localModels)}>
<Link
className="flex min-h-14 w-full items-center gap-3 rounded-lg py-2 pr-2.5 pl-2 transition-colors duration-150 hover:bg-sidebar-muted/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring motion-reduce:transition-none"
to={localModelsHref}
@@ -169,10 +177,10 @@ export function ComputerDetail({
</RowMark>
<span className="min-w-0 flex-1 text-left">
<span className="block truncate text-sm text-foreground">
- Manage local models
+ {t(computersMessages.manageLocalModels)}
</span>
<span className="block truncate text-sm text-muted-foreground">
- Download and load models that run on this computer
+ {t(computersMessages.manageLocalModelsHint)}
</span>
</span>
<Icon
@@ -184,18 +192,18 @@ export function ComputerDetail({
</Group>
) : null}
{displayStatus === "offline" ? null : (
- <Group defaultOpen={false} title="Access">
+ <Group defaultOpen={false} title={t(computersMessages.access)}>
{browserConnection?.("row")}
<WorkspaceRows computer={computer} />
</Group>
)}
<Group
defaultOpen={false}
- title="Advanced"
+ title={t(computersMessages.advanced)}
trailing={
isUpgradeRecommended(computer) && !computer.upgrade_required ? (
<span className="rounded-md bg-[var(--app-status-warning-surface)] px-1.5 text-xs text-app-warning">
- Update
+ {t(computersMessages.update)}
</span>
) : null
}
@@ -217,21 +225,28 @@ export function ComputerDetail({
) : null}
{updateOpen ? (
<ModalDialog
- footer={<Button onClick={() => setUpdateOpen(false)}>Close</Button>}
+ footer={
+ <Button data-voice-close onClick={() => setUpdateOpen(false)}>
+ {t(commonMessages.close)}
+ </Button>
+ }
onClose={() => setUpdateOpen(false)}
size="md"
title={
computer.upgrade_required
- ? "Update required"
+ ? t(computersMessages.updateRequired)
: computer.recommended_version
- ? `Update to ${computer.recommended_version}`
- : "Update Linger Computer"
+ ? t(computersMessages.updateTo, {
+ version: computer.recommended_version,
+ })
+ : t(computersMessages.updateLingerComputer)
}
>
<div className="px-5 py-4 text-sm text-muted-foreground">
<p>
- Wait for running tasks to finish, then run this on{" "}
- {computer.display_name}. Your Agents stay connected.
+ {t(computersMessages.updateInstructions, {
+ computer: computer.display_name,
+ })}
</p>
<UpgradeCommand
key={computer.computer_id}
@@ -261,26 +276,27 @@ function ComputerSummary({
onUpdate: () => void;
readiness: ComputerReadiness;
}) {
+ const t = useT();
const action =
readiness.kind === "update" ? (
<Button onClick={onUpdate} tone="primary">
- Update
+ {t(computersMessages.update)}
</Button>
) : readiness.kind === "signIn" ? (
<Button onClick={() => onSetUp(readiness.app)} tone="primary">
- Sign in to {appNames[readiness.app]}
+ {t(computersMessages.signInToApp, { app: appNames[readiness.app] })}
</Button>
) : readiness.kind === "updateApp" ? (
<Button onClick={() => onSetUp(readiness.app)} tone="primary">
- Update {appNames[readiness.app]}
+ {t(computersMessages.updateApp, { app: appNames[readiness.app] })}
</Button>
) : readiness.kind === "check" ? (
<RuntimeCheckCard align="end" app={readiness.app} computer={computer}>
- <Button tone="primary">Check again</Button>
+ <Button tone="primary">{t(computersMessages.checkAgain)}</Button>
</RuntimeCheckCard>
) : readiness.kind === "setUp" ? (
<Button onClick={() => onSetUp(readiness.app, true)} tone="primary">
- Set up {appNames[readiness.app]}
+ {t(computersMessages.setUpApp, { app: appNames[readiness.app] })}
</Button>
) : null;
@@ -292,7 +308,11 @@ function ComputerSummary({
placement="bottom"
text={[
platformLabel(computer.platform),
- computer.daemon_version ? `App ${computer.daemon_version}` : null,
+ computer.daemon_version
+ ? t(computersMessages.appVersion, {
+ version: computer.daemon_version,
+ })
+ : null,
]
.filter(Boolean)
.join(" · ")}
@@ -323,51 +343,57 @@ function ComputerSummary({
>
{computer.upgrade_required ? (
<ProgressChip
- hint="This app version is too old to run Agents"
+ hint={t(computersMessages.lingerTooOld)}
icon={LaptopIcon}
attentionIcon={RefreshIcon}
- label="Update"
+ label={t(computersMessages.update)}
onClick={onUpdate}
state="attention"
/>
) : (
<ProgressChip
- hint="The Linger app is running"
+ hint={t(computersMessages.lingerRunning)}
icon={LaptopIcon}
- label="Connected"
+ label={t(computersMessages.connected)}
state="done"
/>
)}
<span aria-hidden className="w-6 border-t border-border-hover" />
{readiness.kind === "ready" ? (
<ProgressChip
- hint={`Agents use ${appNames[readiness.app]} here`}
+ hint={t(computersMessages.agentsUseApp, {
+ app: appNames[readiness.app],
+ })}
icon={appIcons[readiness.app]}
label={appNames[readiness.app]}
state="done"
/>
) : readiness.kind === "signIn" ? (
<ProgressChip
- hint={`${appNames[readiness.app]} is installed but signed out`}
+ hint={t(computersMessages.appSignedOut, {
+ app: appNames[readiness.app],
+ })}
icon={appIcons[readiness.app]}
attentionIcon={Key01Icon}
- label="Sign in"
+ label={t(computersMessages.signIn)}
onClick={() => onSetUp(readiness.app)}
state="attention"
/>
) : readiness.kind === "updateApp" ? (
<ProgressChip
attentionIcon={RefreshIcon}
- hint={`${appNames[readiness.app]} is too old to run Agents`}
+ hint={t(computersMessages.appTooOld, {
+ app: appNames[readiness.app],
+ })}
icon={appIcons[readiness.app]}
- label="Update"
+ label={t(computersMessages.update)}
onClick={() => onSetUp(readiness.app)}
state="attention"
/>
) : readiness.kind === "check" ? (
<ProgressChip
attentionIcon={Search01Icon}
- hint={runtimeMessage(computer, readiness.app)}
+ hint={runtimeMessage(computer, readiness.app, t)}
icon={appIcons[readiness.app]}
label={appNames[readiness.app]}
state="attention"
@@ -375,7 +401,7 @@ function ComputerSummary({
) : (
<ProgressChip
attentionIcon={Add01Icon}
- hint="Agents need Claude Code, Codex or Pi on this computer"
+ hint={t(computersMessages.needAiApp)}
icon={appIcons.claude}
label={appNames.claude}
onClick={() => onSetUp("claude", true)}
@@ -403,29 +429,39 @@ function SummaryStatus({
computer: LocalComputer;
readiness: ComputerReadiness;
}) {
+ const translation = useTranslation();
+ const { t } = translation;
if (readiness.kind === "reconnecting")
- return <span className="town-shimmer-text">Reconnecting…</span>;
+ return (
+ <span className="town-shimmer-text">
+ {t(computersMessages.reconnecting)}
+ </span>
+ );
if (readiness.kind === "offline")
return (
<>
<StatusDot tone="neutral" />
{computer.last_seen_at
- ? `Offline · ${relativeTime(computer.last_seen_at)}`
- : "Offline"}
+ ? t(computersMessages.offlineSince, {
+ time: relativeTime(computer.last_seen_at, translation),
+ })
+ : t(computersMessages.offline)}
</>
);
if (readiness.kind === "update")
return (
<>
<StatusDot tone="warning" />
- Update required
+ {t(computersMessages.updateRequired)}
</>
);
if (readiness.kind === "check")
return (
<>
<StatusDot tone="warning" />
- Couldn't check {appNames[readiness.app]}
+ {t(computersMessages.couldNotCheckApp, {
+ app: appNames[readiness.app],
+ })}
</>
);
if (readiness.kind === "ready")
@@ -433,14 +469,16 @@ function SummaryStatus({
<>
<StatusDot tone="success" />
{computer.active_operations
- ? `Ready · ${computer.active_operations} running`
- : "Ready"}
+ ? t(computersMessages.readyRunning, {
+ count: computer.active_operations,
+ })
+ : t(computersMessages.ready)}
</>
);
return (
<>
<StatusDot tone="warning" />
- One step left
+ {t(computersMessages.oneStepLeft)}
</>
);
}
@@ -452,22 +490,19 @@ function OfflineSteps({
computer: LocalComputer;
onConnect?: () => void;
}) {
+ const t = useT();
const step =
"inline-flex h-8 items-center gap-2 rounded-full bg-card pr-3 pl-1.5 text-xs text-secondary-foreground shadow-outline";
const bubble =
"flex size-[22px] items-center justify-center rounded-full bg-muted";
return (
<div className="mt-3 flex flex-wrap items-center gap-2.5 rounded-xl bg-muted px-3.5 py-3">
- <Hint
- focusable
- placement="bottom"
- text="Turn it on and connect to the internet. It usually reconnects by itself."
- >
+ <Hint focusable placement="bottom" text={t(computersMessages.turnOnHint)}>
<span className={step}>
<span className={bubble}>
<Icon icon={PowerIcon} size={12} />
</span>
- Turn it on
+ {t(computersMessages.turnOn)}
</span>
</Hint>
<Icon
@@ -480,9 +515,11 @@ function OfflineSteps({
content={
<>
<span className="block text-sm font-medium text-foreground">
- Still offline after a minute?
+ {t(computersMessages.stillOffline)}
</span>
- Run in Terminal on {computer.display_name}:
+ {t(computersMessages.runInTerminalOn, {
+ computer: computer.display_name,
+ })}
<CommandLine command={`${computerCommand()} daemon start`} />
</>
}
@@ -491,7 +528,7 @@ function OfflineSteps({
<span className={bubble}>
<Icon icon={PlayIcon} size={12} />
</span>
- Start the app
+ {t(computersMessages.startApp)}
</span>
</HintCard>
{onConnect ? (
@@ -501,15 +538,12 @@ function OfflineSteps({
icon={ArrowRight01Icon}
size={14}
/>
- <Hint
- placement="bottom"
- text="Reset or replaced it? Connect it again."
- >
+ <Hint placement="bottom" text={t(computersMessages.reconnectHint)}>
<button className={step} onClick={onConnect} type="button">
<span className={bubble}>
<Icon icon={Link01Icon} size={12} />
</span>
- Reconnect
+ {t(computersMessages.reconnect)}
</button>
</Hint>
</>
@@ -598,23 +632,26 @@ function AppRow({
onSetUp: () => void;
online: boolean;
}) {
+ const t = useT();
const runtime = computer.runtimes.find((item) => item.type === app);
const status = runtime?.status ?? "not_installed";
const name = appNames[app];
const hint =
[name, runtime?.version].filter(Boolean).join(" ") +
- ` · ${appDescriptions[app]}`;
+ ` · ${t(appDescriptions[app])}`;
if (status === "not_installed")
return (
<ComputerRow
action={
online ? (
<Button onClick={onSetUp} size="compact" tone="secondary">
- Add
+ {t(computersMessages.add)}
</Button>
) : null
}
- hint={`${appDescriptions[app]} · optional`}
+ hint={t(computersMessages.optionalApp, {
+ description: t(appDescriptions[app]),
+ })}
// The app's own mark, faded: the plus is the Add button's job.
mark={
<RowMark dashed>
@@ -625,34 +662,20 @@ function AppRow({
/>
</RowMark>
}
- subtitle="Not installed"
+ subtitle={t(computersMessages.notInstalled)}
title={<span className="text-muted-foreground">{name}</span>}
/>
);
- const subtitle = !online
- ? {
- authentication_required: "Last seen signed out",
- error: "Last check failed",
- incompatible: "Last seen outdated",
- ready: "Last seen ready",
- unknown: "Not checked yet",
- }[status]
- : {
- authentication_required: "Signed out",
- error: "Couldn't check",
- incompatible: "Update needed",
- ready: "Ready",
- unknown: "Couldn't check",
- }[status];
+ const subtitle = t((online ? onlineAppStates : offlineAppStates)[status]);
const action = !online ? null : status === "ready" ? (
<Icon className="text-app-success" icon={Tick02Icon} size={16} />
) : status === "authentication_required" ? (
<Button onClick={onSetUp} size="compact">
- Sign in
+ {t(computersMessages.signIn)}
</Button>
) : status === "incompatible" ? (
<Button onClick={onSetUp} size="compact">
- Update
+ {t(computersMessages.update)}
</Button>
) : (
<RuntimeCheckCard app={app} computer={computer} focusable>
@@ -680,10 +703,37 @@ function AppRow({
);
}
-function runtimeMessage(computer: LocalComputer, app: TeamHubLocalRuntimeType) {
+type InstalledAppStatus = Exclude<
+ LocalComputer["runtimes"][number]["status"],
+ "not_installed"
+>;
+
+const onlineAppStates: Record<InstalledAppStatus, Message<string>> = {
+ authentication_required: computersMessages.signedOut,
+ error: computersMessages.couldNotCheck,
+ incompatible: computersMessages.updateNeeded,
+ ready: computersMessages.ready,
+ unknown: computersMessages.couldNotCheck,
+};
+
+/** What an offline Computer last reported about an app. */
+const offlineAppStates: Record<InstalledAppStatus, Message<string>> = {
+ authentication_required: computersMessages.lastSeenSignedOut,
+ error: computersMessages.lastCheckFailed,
+ incompatible: computersMessages.lastSeenOutdated,
+ ready: computersMessages.lastSeenReady,
+ unknown: computersMessages.notCheckedYet,
+};
+
+/** The reason the Computer gave, or a plain "couldn't check" without one. */
+function runtimeMessage(
+ computer: LocalComputer,
+ app: TeamHubLocalRuntimeType,
+ t: Translate,
+) {
return (
computer.runtimes.find((item) => item.type === app)?.message ??
- `Couldn't check ${appNames[app]}`
+ t(computersMessages.couldNotCheckApp, { app: appNames[app] })
);
}
@@ -701,6 +751,7 @@ function RuntimeCheckCard({
computer: LocalComputer;
focusable?: boolean;
}) {
+ const t = useT();
return (
<HintCard
align={align}
@@ -708,9 +759,11 @@ function RuntimeCheckCard({
content={
<>
<span className="block text-sm font-medium text-foreground">
- {runtimeMessage(computer, app)}
+ {runtimeMessage(computer, app, t)}
</span>
- Check again in Terminal on {computer.display_name}:
+ {t(computersMessages.checkAgainOn, {
+ computer: computer.display_name,
+ })}
<CommandLine command={`${computerCommand()} runtime check`} />
</>
}
@@ -721,9 +774,10 @@ function RuntimeCheckCard({
}
function WorkspaceRows({ computer }: { computer: LocalComputer }) {
+ const t = useT();
return computer.workspace_grants.map((grant) => (
<ComputerRow
- hint="Where Agents keep their work on this computer"
+ hint={t(computersMessages.workspaceHint)}
key={grant.grant_id}
mark={
<RowMark>
@@ -732,8 +786,8 @@ function WorkspaceRows({ computer }: { computer: LocalComputer }) {
}
subtitle={
grant.mode === "read-only"
- ? "Agents can view here"
- : "Agents can edit here"
+ ? t(computersMessages.agentsCanView)
+ : t(computersMessages.agentsCanEdit)
}
title={grant.label}
/>
@@ -749,23 +803,24 @@ function AdvancedRows({
onRemove?: () => void;
onUpdate: () => void;
}) {
+ const t = useT();
const command = computerCommand();
- const tools: [IconSvgElement, string, string][] = [
- [Activity01Icon, "Status", `${command} daemon status`],
- [RefreshIcon, "Restart", `${command} daemon restart`],
- [Search01Icon, "Re-check", `${command} runtime check`],
- [Link01Icon, "Reconnect", `${command} login`],
- [StopIcon, "Stop", `${command} daemon stop`],
+ const tools: [IconSvgElement, Message<string>, string][] = [
+ [Activity01Icon, computersMessages.toolStatus, `${command} daemon status`],
+ [RefreshIcon, computersMessages.toolRestart, `${command} daemon restart`],
+ [Search01Icon, computersMessages.toolRecheck, `${command} runtime check`],
+ [Link01Icon, computersMessages.reconnect, `${command} login`],
+ [StopIcon, computersMessages.toolStop, `${command} daemon stop`],
];
const row = "flex min-h-11 items-center gap-3 px-2.5";
const label = "w-28 shrink-0 text-sm text-muted-foreground";
return (
<>
<div className={row}>
- <span className={label}>App</span>
+ <span className={label}>{t(computersMessages.app)}</span>
<span className="flex flex-wrap items-center gap-1.5">
<span className="rounded-md bg-muted px-2 py-0.5 text-xs text-secondary-foreground">
- {computer.daemon_version ?? "Not reported"}
+ {computer.daemon_version ?? t(computersMessages.notReported)}
</span>
{computer.upgrade_required || isUpgradeRecommended(computer) ? (
<button
@@ -775,37 +830,43 @@ function AdvancedRows({
>
<Icon icon={RefreshIcon} size={12} />
{computer.recommended_version
- ? `${computer.recommended_version} available`
- : "Update"}
+ ? t(computersMessages.versionAvailable, {
+ version: computer.recommended_version,
+ })
+ : t(computersMessages.update)}
</button>
) : null}
</span>
</div>
<div className={row}>
- <span className={label}>Computer ID</span>
+ <span className={label}>{t(computersMessages.computerId)}</span>
<span className="min-w-0 truncate font-mono text-xs text-muted-foreground">
{computer.computer_id}
</span>
</div>
<div className={cn(row, "items-start py-1.5")}>
- <span className={cn(label, "pt-1.5")}>Troubleshoot</span>
+ <span className={cn(label, "pt-1.5")}>
+ {t(computersMessages.troubleshoot)}
+ </span>
<span className="flex flex-wrap gap-1">
{tools.map(([icon, name, toolCommand]) => (
<HintCard
content={
<>
<span className="block text-sm font-medium text-foreground">
- {name}
+ {t(name)}
</span>
- Run in Terminal on {computer.display_name}:
+ {t(computersMessages.runInTerminalOn, {
+ computer: computer.display_name,
+ })}
<CommandLine command={toolCommand} />
</>
}
- key={name}
+ key={name.id}
>
<Button tone="ghost">
<Icon icon={icon} size={14} />
- {name}
+ {t(name)}
</Button>
</HintCard>
))}
@@ -815,13 +876,14 @@ function AdvancedRows({
<div className={row}>
<span className={label} />
<Button
- aria-label="Remove"
+ data-voice-risk="never"
+ aria-label={t(commonMessages.remove)}
className="-ml-3 border-transparent"
onClick={onRemove}
tone="danger"
>
<Icon icon={Delete02Icon} size={14} />
- Remove computer
+ {t(computersMessages.removeComputer)}
</Button>
</div>
) : null}
@@ -830,6 +892,7 @@ function AdvancedRows({
}
function UpgradeCommand({ platform }: { platform?: ComputerPlatform }) {
+ const t = useT();
const [selected, setSelected] = useState<ComputerPlatform | "">("");
const target = selected || platform || "";
return (
@@ -839,7 +902,7 @@ function UpgradeCommand({ platform }: { platform?: ComputerPlatform }) {
<>
{target === "win32" ? (
<p className="mt-2 text-xs text-muted-foreground">
- Run in PowerShell on this Windows computer.
+ {t(computersMessages.runInPowerShellWindows)}
</p>
) : null}
<CommandLine command={computerInstallCommand(target)} key={target} />
diff --git a/apps/web/src/features/local-computer/computer-directory.tsx b/apps/web/src/features/local-computer/computer-directory.tsx
index d7c50033..67d66612 100644
--- a/apps/web/src/features/local-computer/computer-directory.tsx
+++ b/apps/web/src/features/local-computer/computer-directory.tsx
@@ -6,6 +6,7 @@ import type {
TeamHubLocalComputerPage,
TeamHubTenantAgent,
} from "@/features/teamhub/teamhub-types";
+import { useTranslation } from "@/i18n/use-translation";
import { cn } from "@/lib/cn";
import { appIcons } from "./computer-app-icons";
@@ -18,6 +19,7 @@ import {
appStatus,
computerReadiness,
} from "./computer-readiness";
+import { computersMessages } from "./computers.messages";
type LocalComputer = TeamHubLocalComputerPage["items"][number];
@@ -31,8 +33,9 @@ export function ComputerDirectory({
computers: LocalComputer[];
onSelect: (computerId: string) => void;
}) {
+ const { t } = useTranslation();
return (
- <ul aria-label="Local computers directory" className="grid gap-1">
+ <ul aria-label={t(computersMessages.directoryLabel)} className="grid gap-1">
{computers.map((computer) => (
<li key={computer.computer_id}>
<DirectoryRow
@@ -58,6 +61,8 @@ function DirectoryRow({
computer: LocalComputer;
onSelect: () => void;
}) {
+ const translation = useTranslation();
+ const { t } = translation;
const displayStatus = useComputerConnectionStatus(
computer.computer_id,
computer.status,
@@ -66,27 +71,31 @@ function DirectoryRow({
const offline = displayStatus !== "online";
const subtitle =
readiness.kind === "reconnecting" ? (
- <span className="town-shimmer-text">Reconnecting…</span>
+ <span className="town-shimmer-text">
+ {t(computersMessages.reconnecting)}
+ </span>
) : readiness.kind === "offline" ? (
computer.last_seen_at ? (
- `Offline · ${relativeTime(computer.last_seen_at)}`
+ t(computersMessages.offlineSince, {
+ time: relativeTime(computer.last_seen_at, translation),
+ })
) : (
- "Offline"
+ t(computersMessages.offline)
)
) : readiness.kind === "update" ? (
- "Update required"
+ t(computersMessages.updateRequired)
) : readiness.kind === "signIn" ? (
- `Sign in to ${appNames[readiness.app]}`
+ t(computersMessages.signInToApp, { app: appNames[readiness.app] })
) : readiness.kind === "updateApp" ? (
- `Update ${appNames[readiness.app]}`
+ t(computersMessages.updateApp, { app: appNames[readiness.app] })
) : readiness.kind === "check" ? (
- `Couldn't check ${appNames[readiness.app]}`
+ t(computersMessages.couldNotCheckApp, { app: appNames[readiness.app] })
) : readiness.kind === "setUp" ? (
- `Set up ${appNames[readiness.app]}`
+ t(computersMessages.setUpApp, { app: appNames[readiness.app] })
) : computer.active_operations ? (
- `Ready · ${computer.active_operations} running`
+ t(computersMessages.readyRunning, { count: computer.active_operations })
) : (
- "Ready"
+ t(computersMessages.ready)
);
const apps = appOrder.filter(
(app) => appStatus(computer, app) !== "not_installed",
diff --git a/apps/web/src/features/local-computer/computer-empty-states.tsx b/apps/web/src/features/local-computer/computer-empty-states.tsx
index e3cdee04..4df12901 100644
--- a/apps/web/src/features/local-computer/computer-empty-states.tsx
+++ b/apps/web/src/features/local-computer/computer-empty-states.tsx
@@ -7,8 +7,12 @@ import {
import { Icon } from "@/components/ui/icon";
import { Button } from "@/components/ui/button";
import { ModalDialog } from "@/components/ui/modal-dialog";
+import { commonMessages } from "@/i18n/common.messages";
+import { useT } from "@/i18n/use-translation";
+import { computerSetupMessages } from "./computer-setup.messages";
import { ComputerSetupInstructions } from "./computer-setup-instructions";
+import { computersMessages } from "./computers.messages";
import { ServerConnection } from "./server-connection";
export function UnavailableComputer({
@@ -18,23 +22,26 @@ export function UnavailableComputer({
onBack: () => void;
onConnect: () => void;
}) {
+ const t = useT();
return (
<div className="flex min-h-full items-center justify-center px-6 py-12 text-center">
<div className="max-w-md">
<span className="mx-auto flex size-12 items-center justify-center rounded-xl bg-muted text-muted-foreground">
<Icon icon={AlertCircleIcon} size={20} />
</span>
- <h1 className="mt-4 text-lg">Computer unavailable</h1>
+ <h1 className="mt-4 text-lg">
+ {t(computersMessages.unavailableTitle)}
+ </h1>
<p className="mt-2 text-sm text-muted-foreground">
- This Computer is offline or no longer available to your account.
+ {t(computersMessages.unavailableBody)}
</p>
<div className="mt-5 flex justify-center gap-2">
<Button onClick={onBack} tone="primary">
- Back to computers
+ {t(computersMessages.backToComputers)}
</Button>
<Button onClick={onConnect}>
<Icon icon={ComputerTerminal01Icon} size={16} />
- Setup commands
+ {t(computersMessages.setupCommands)}
</Button>
</div>
</div>
@@ -53,17 +60,18 @@ export function ConnectComputerDialog({
onClose: () => void;
onDone: () => void;
}) {
+ const t = useT();
return (
<ModalDialog
- description="Install the CLI, then authorize this workspace from your terminal."
+ description={t(computersMessages.connectDialogDescription)}
onClose={onClose}
size="md"
- title="Connect Local Computer"
+ title={t(computersMessages.connectDialogTitle)}
footer={
<>
- <Button onClick={onClose}>Cancel</Button>
+ <Button onClick={onClose}>{t(commonMessages.cancel)}</Button>
<Button disabled={!connected} onClick={onDone} tone="primary">
- Done
+ {t(commonMessages.done)}
</Button>
</>
}
@@ -78,18 +86,19 @@ export function ConnectComputerDialog({
/** Every Computer was removed; the built-in local Computer normally prevents this. */
export function NoComputers({ onConnect }: { onConnect: () => void }) {
+ const t = useT();
return (
<div className="flex flex-col items-center pt-16 text-center">
<span className="flex size-16 items-center justify-center rounded-[20%] bg-muted text-foreground">
<Icon icon={LaptopIcon} size={28} />
</span>
- <h2 className="mt-6 text-xl">Run Agents on your computer</h2>
+ <h2 className="mt-6 text-xl">{t(computersMessages.noComputersTitle)}</h2>
<p className="mt-1.5 text-sm text-muted-foreground">
- About 2 minutes to set up.
+ {t(computersMessages.noComputersBody)}
</p>
<Button className="mt-6" onClick={onConnect} tone="primary">
<Icon icon={Add01Icon} size={14} />
- Connect a computer
+ {t(computerSetupMessages.title)}
</Button>
</div>
);
diff --git a/apps/web/src/features/local-computer/computer-readiness.ts b/apps/web/src/features/local-computer/computer-readiness.ts
index b68c07bc..65ed63c7 100644
--- a/apps/web/src/features/local-computer/computer-readiness.ts
+++ b/apps/web/src/features/local-computer/computer-readiness.ts
@@ -3,7 +3,10 @@ import type {
TeamHubLocalRuntimeType,
} from "@/features/teamhub/teamhub-types";
+import type { Message } from "@/i18n/messages";
+
import type { ComputerDisplayStatus } from "./computer-connection-status";
+import { computersMessages } from "./computers.messages";
type LocalComputer = TeamHubLocalComputerPage["items"][number];
type RuntimeStatus = LocalComputer["runtimes"][number]["status"];
@@ -24,20 +27,20 @@ export const appNames = {
} satisfies Record<TeamHubLocalRuntimeType, string>;
export const appDescriptions = {
- claude: "Anthropic's coding agent",
- codex: "OpenAI's coding agent",
- pi: "Open-source coding agent",
- antigravity: "Google's coding agent",
-} satisfies Record<TeamHubLocalRuntimeType, string>;
+ claude: computersMessages.descriptionClaude,
+ codex: computersMessages.descriptionCodex,
+ pi: computersMessages.descriptionPi,
+ antigravity: computersMessages.descriptionAntigravity,
+} satisfies Record<TeamHubLocalRuntimeType, Message<string>>;
export const runtimeStatusLabels = {
- authentication_required: "Sign-in required",
- error: "Could not check",
- incompatible: "Update needed",
- not_installed: "Not installed",
- ready: "Ready",
- unknown: "Checking",
-} satisfies Record<RuntimeStatus, string>;
+ authentication_required: computersMessages.statusSignInRequired,
+ error: computersMessages.statusCouldNotCheck,
+ incompatible: computersMessages.updateNeeded,
+ not_installed: computersMessages.notInstalled,
+ ready: computersMessages.ready,
+ unknown: computersMessages.statusChecking,
+} satisfies Record<RuntimeStatus, Message<string>>;
export type ComputerReadiness =
| { kind: "reconnecting" }
diff --git a/apps/web/src/features/local-computer/computer-relative-time.ts b/apps/web/src/features/local-computer/computer-relative-time.ts
index ee58639b..6cf142d9 100644
--- a/apps/web/src/features/local-computer/computer-relative-time.ts
+++ b/apps/web/src/features/local-computer/computer-relative-time.ts
@@ -1,7 +1,23 @@
-/** "2 hours ago" for a past instant, used for when a Computer was last seen. */
-const relativeFormat = new Intl.RelativeTimeFormat("en", { numeric: "auto" });
+import { commonMessages } from "@/i18n/common.messages";
+import { formatLocale, type Translation } from "@/i18n/language";
-export function relativeTime(value: string) {
+const relativeFormats = new Map<string, Intl.RelativeTimeFormat>();
+
+function relativeFormat(locale: string) {
+ let format = relativeFormats.get(locale);
+ if (!format) {
+ format = new Intl.RelativeTimeFormat(locale, { numeric: "auto" });
+ relativeFormats.set(locale, format);
+ }
+ return format;
+}
+
+/**
+ * "2 hours ago" for a past instant, used for when a Computer was last seen.
+ * It follows the language of `translation`, and is English without one.
+ */
+export function relativeTime(value: string, translation?: Translation) {
+ const format = relativeFormat(formatLocale(translation?.language ?? "en"));
const seconds = Math.round((new Date(value).getTime() - Date.now()) / 1_000);
const units: [Intl.RelativeTimeFormatUnit, number][] = [
["day", 86_400],
@@ -10,7 +26,9 @@ export function relativeTime(value: string) {
];
for (const [unit, size] of units) {
if (Math.abs(seconds) >= size)
- return relativeFormat.format(Math.round(seconds / size), unit);
+ return format.format(Math.round(seconds / size), unit);
}
- return "just now";
+ return translation
+ ? translation.t(commonMessages.justNow)
+ : commonMessages.justNow.source;
}
diff --git a/apps/web/src/features/local-computer/computers-page.tsx b/apps/web/src/features/local-computer/computers-page.tsx
index 359c7cc5..1f275b11 100644
--- a/apps/web/src/features/local-computer/computers-page.tsx
+++ b/apps/web/src/features/local-computer/computers-page.tsx
@@ -17,6 +17,7 @@ import { useTeamHubRuntime } from "@/features/teamhub/teamhub-runtime";
import { Add01Icon, ArrowLeft01Icon } from "@hugeicons/core-free-icons";
import { Button } from "@/components/ui/button";
import { Icon } from "@/components/ui/icon";
+import { useT } from "@/i18n/use-translation";
import { ComputerBrowserConnection } from "./browser-connection/computer-browser-connection";
import { ComputerDetail } from "./computer-detail";
@@ -27,6 +28,8 @@ import {
NoComputers,
UnavailableComputer,
} from "./computer-empty-states";
+import { computerSetupMessages } from "./computer-setup.messages";
+import { computersMessages } from "./computers.messages";
import {
localComputersQueryKey,
localComputersQueryOptions,
@@ -35,6 +38,7 @@ import { subscribeLocalComputerEnrollment } from "./local-computer-enrollment-ev
import { RemoveComputerDialog } from "./remove-computer-dialog";
export function ComputersPage() {
+ const t = useT();
const { client } = useTeamHubRuntime();
const queryClient = useQueryClient();
const tenantId = requireRoomRouteParam(useParams().tenantId, "Tenant");
@@ -192,7 +196,7 @@ export function ComputersPage() {
<h1 className="flex items-center gap-1 text-2xl text-foreground">
{requestedComputerId && inventory.items.length > 1 ? (
<Button
- aria-label="All computers"
+ aria-label={t(computersMessages.allComputers)}
onClick={showDirectory}
size="icon"
tone="ghost"
@@ -200,16 +204,16 @@ export function ComputersPage() {
<Icon icon={ArrowLeft01Icon} size={16} />
</Button>
) : null}
- Computers
+ {t(computersMessages.pageTitle)}
</h1>
{inventory.items.length ? (
<Button
- aria-label="Connect a Local Computer"
+ aria-label={t(computerSetupMessages.label)}
onClick={openSetup}
size="compact"
>
<Icon icon={Add01Icon} size={14} />
- Connect
+ {t(computersMessages.connect)}
</Button>
) : null}
</header>
diff --git a/apps/web/src/features/local-computer/computers.messages.ts b/apps/web/src/features/local-computer/computers.messages.ts
new file mode 100644
index 00000000..f038b807
--- /dev/null
+++ b/apps/web/src/features/local-computer/computers.messages.ts
@@ -0,0 +1,289 @@
+import { defineMessages } from "@/i18n/messages";
+
+/** Settings › Computers: the list, one Computer's detail, and its dialogs. */
+export const computersMessages = defineMessages("computers", {
+ // The page and the list of Computers.
+ pageTitle: "Computers",
+ allComputers: "All computers",
+ connect: "Connect",
+ directoryLabel: "Local computers directory",
+ reconnecting: "Reconnecting…",
+ offline: "Offline",
+ offlineSince: "Offline · {time}",
+ updateRequired: "Update required",
+ signInToApp: "Sign in to {app}",
+ updateApp: "Update {app}",
+ couldNotCheckApp: "Couldn't check {app}",
+ setUpApp: "Set up {app}",
+ ready: "Ready",
+ readyRunning: "Ready · {count} running",
+ oneStepLeft: "One step left",
+
+ // Empty and unavailable states.
+ unavailableTitle: "Computer unavailable",
+ unavailableBody:
+ "This Computer is offline or no longer available to your account.",
+ backToComputers: "Back to computers",
+ setupCommands: "Setup commands",
+ connectDialogTitle: "Connect Local Computer",
+ connectDialogDescription:
+ "Install the CLI, then authorize this workspace from your terminal.",
+ noComputersTitle: "Run Agents on your computer",
+ noComputersBody: "About 2 minutes to set up.",
+
+ // One Computer's detail.
+ detailsLabel: "{computer} details",
+ agents: "Agents",
+ aiApps: "AI apps",
+ aiAppsHint:
+ "Agents use these apps on this computer to do the work. One ready app is enough.",
+ localModels: "Local models",
+ manageLocalModels: "Manage local models",
+ manageLocalModelsHint: "Download and load models that run on this computer",
+ access: "Access",
+ advanced: "Advanced",
+ update: "Update",
+ updateTo: "Update to {version}",
+ updateLingerComputer: "Update Linger Computer",
+ updateInstructions:
+ "Wait for running tasks to finish, then run this on {computer}. Your Agents stay connected.",
+ checkAgain: "Check again",
+ appVersion: "App {version}",
+ lingerTooOld: "This app version is too old to run Agents",
+ lingerRunning: "The Linger app is running",
+ connected: "Connected",
+ agentsUseApp: "Agents use {app} here",
+ appSignedOut: "{app} is installed but signed out",
+ signIn: "Sign in",
+ appTooOld: "{app} is too old to run Agents",
+ needAiApp: "Agents need Claude Code, Codex or Pi on this computer",
+ turnOn: "Turn it on",
+ turnOnHint:
+ "Turn it on and connect to the internet. It usually reconnects by itself.",
+ startApp: "Start the app",
+ stillOffline: "Still offline after a minute?",
+ runInTerminalOn: "Run in Terminal on {computer}:",
+ reconnect: "Reconnect",
+ reconnectHint: "Reset or replaced it? Connect it again.",
+ add: "Add",
+ optionalApp: "{description} · optional",
+ notInstalled: "Not installed",
+ lastSeenSignedOut: "Last seen signed out",
+ lastCheckFailed: "Last check failed",
+ lastSeenOutdated: "Last seen outdated",
+ lastSeenReady: "Last seen ready",
+ notCheckedYet: "Not checked yet",
+ signedOut: "Signed out",
+ couldNotCheck: "Couldn't check",
+ updateNeeded: "Update needed",
+ checkAgainOn: "Check again in Terminal on {computer}:",
+ workspaceHint: "Where Agents keep their work on this computer",
+ agentsCanView: "Agents can view here",
+ agentsCanEdit: "Agents can edit here",
+ app: "App",
+ notReported: "Not reported",
+ versionAvailable: "{version} available",
+ computerId: "Computer ID",
+ troubleshoot: "Troubleshoot",
+ toolStatus: "Status",
+ toolRestart: "Restart",
+ toolRecheck: "Re-check",
+ toolStop: "Stop",
+ removeComputer: "Remove computer",
+ runInPowerShellWindows: "Run in PowerShell on this Windows computer.",
+
+ // AI apps and their state, as other pages list them too.
+ descriptionClaude: "Anthropic's coding agent",
+ descriptionCodex: "OpenAI's coding agent",
+ descriptionPi: "Open-source coding agent",
+ descriptionAntigravity: "Google's coding agent",
+ statusSignInRequired: "Sign-in required",
+ statusCouldNotCheck: "Could not check",
+ statusChecking: "Checking",
+
+ // The Agents on a Computer.
+ noAgents: "No Agents on this computer yet. Create one from Chats.",
+ less: "Less",
+ more: "More",
+ tasksRunning: {
+ one: "{count} task running",
+ other: "{count} tasks running",
+ },
+ appSignInNeeded: "{app} sign-in needed",
+ statusUnavailable: "Status unavailable",
+ agentsNeedAttention: {
+ one: "{count} needs attention",
+ other: "{count} need attention",
+ },
+ agentsOffline: "{count} offline",
+ agentsStatusUnavailable: "{count} status unavailable",
+
+ // Setting up one AI app.
+ computerOffline: "{computer} is offline",
+ appReady: "{app} is ready",
+ checkingApp: "Checking {app}…",
+ setupAccountHint:
+ "On {computer}, in the same account you used to connect it.",
+ stepInstall: "Install",
+ piLoginHint: "Then type /login in Pi",
+ signInPageHint: "A sign-in page opens in your browser",
+ pasteIntoTerminal: "Paste into Terminal on {computer}",
+ runThenSignIn: "Run this, then sign in on the page that opens",
+
+ // The page the CLI opens to connect a Computer.
+ connectName: "Connect {computer}",
+ reconnectName: "Reconnect {computer}",
+ localRuntimeAccess: "Local runtime access",
+ localRuntimeAccessBody:
+ "The Computer will appear as an available runtime for your account.",
+ loadingSpaces: "Loading spaces...",
+ spacesUnavailable: "Spaces are unavailable.",
+ noSpace: "No space is available for this account.",
+ space: "Space",
+ signedInAs: "Signed in as <email>{email}</email>",
+ confirmReplacement: "Confirm Local Computer replacement",
+ replacementRemoved:
+ "This Computer was removed from the signed-in account. Continuing stops the old local daemon and connects this machine as a new Computer for the account shown above. The old Computer and its Agents are not deleted from the server.",
+ replacementWrongAccount:
+ "This Computer cannot be renewed by the signed-in account. Continuing stops the old local daemon and connects this machine as a new Computer for the account shown above. The old Computer and its Agents are not deleted from the server.",
+ keepCurrentSetup: "Keep current setup",
+ replaceLocalIdentity: "Replace local identity",
+ connectFailed: "The Computer could not be connected. Run setup again.",
+ signingOut: "Signing out...",
+ useAnotherAccount: "Use another account",
+ connectingRequest: "Connecting...",
+ reconnectComputer: "Reconnect computer",
+ invalidRequestTitle: "Connection request is invalid",
+ invalidRequestBody: "Return to the terminal and run setup again.",
+ couldNotConnect: "Could not connect",
+
+ // The gate shown until a Computer can run Another Me.
+ gateKicker: "Before you start",
+ gateTitle: "Connect your computer",
+ gateIntro:
+ "Your Agents run on your own computer with Claude Code, Codex or Pi. Connect one to start.",
+ gateReady: "Your computer is ready. Creating your Another Me...",
+ installTheCli: "Install the CLI",
+ setUpAiApp: "Set up an AI app",
+ availableOnceOnline: "Available once your computer is online.",
+ signOut: "Sign out",
+ waitingForComputer:
+ "Waiting for your computer. Approve the request when it opens in your browser.",
+ computerNeedsUpdate:
+ "{computer} needs an update. Run the command in step 1 again on it.",
+ computerOfflineStart:
+ "{computer} is offline. Start it with <code>{command}</code>.",
+ computerOnline: "{computer} is online.",
+ oneReadyAppEnough: "One ready app is enough.",
+ orRunLocalModel:
+ "Or run a model on {computer} itself: load one in <link>Settings › Models</link>.",
+ checkingComputer: "Checking {computer}. Changes show up within a minute.",
+
+ // Removing a Computer.
+ removeTitle: "Remove Local Computer",
+ removeDescription:
+ "This revokes <strong>{computer}</strong> and removes it from this workspace. Reconnecting requires a new setup.",
+ noOtherComputer:
+ "No other computer can take these Agents. Connect your new computer first.",
+ moveAndRemove: {
+ one: "Move {count} Agent and remove",
+ other: "Move {count} Agents and remove",
+ },
+ moveDeleteAndRemove: "Move, delete and remove",
+ deleteAndRemove: "Delete and remove",
+ deleteAgentHint:
+ "Removes this Agent from every Room and deletes your direct chat with it.",
+ anotherMeNeedsComputer:
+ "Another Me can't be deleted. Connect another computer to move it.",
+ agentNeedsComputer:
+ "Connect another computer to move this Agent, or delete it.",
+ assignedAgents: "Assigned Agents",
+ assignedAgentsMoveFirst: "Assigned Agents move first",
+ targetFor: "Target for {name}",
+ chooseTarget: "Choose a target",
+ deleteAgentInstead: "Delete this Agent instead",
+ moveFailed: "Failed: {message}",
+ deleted: "Deleted",
+ deleting: "Deleting…",
+ moved: "Moved",
+ moving: "Moving…",
+
+ // Connecting the user's Chrome to a Computer.
+ connectMyBrowser: "Connect my browser",
+ connectMyBrowserIntro:
+ "Let Agent browser tasks on this Computer use your everyday Chrome and its sign-ins. The token goes only to your Computer and never appears in chat.",
+ loadingComputers: "Loading your Computers…",
+ cannotLoadComputers: "Can't load your Computers right now.",
+ computerNoLongerConnected:
+ "This Computer is no longer connected to your account.",
+ noLocalComputerYet:
+ "You don't have a Local Computer yet. Connect one in Settings > Computers first. Cloud Computers can't use your browser.",
+ computer: "Computer",
+ computerNamed: "Computer: <name>{computer}</name>",
+ computerOfflineOption: "{computer} (offline)",
+ reconfigure: "Reconfigure",
+ disconnect: "Disconnect",
+ disconnecting: "Disconnecting…",
+ installExtensionStep: "Install <link>Playwright Extension</link> in Chrome",
+ copyTokenStep:
+ "Click the extension icon and copy the token it shows (the full <code>PLAYWRIGHT_MCP_EXTENSION_TOKEN=…</code> line also works)",
+ pasteTokenStep: "Paste it below and connect",
+ extensionToken: "Extension token",
+ pasteToken: "Paste token",
+ connectingUpToMinute: "Connecting, up to 1 minute…",
+ checkingBrowserStatus: "Checking browser status…",
+ browserComputerOffline:
+ "This Computer is offline. Make sure it's on and running Linger Computer.",
+ browserUnavailableOffline: "Unavailable while this computer is offline.",
+ agentsCanUseChrome: "Agents can use your Chrome",
+ chromeOptional: "Optional · let Agents use your Chrome",
+ connectChrome: "Connect Chrome",
+ manage: "Manage",
+ agentsUseSignIns: "Agents use your sign-ins.",
+ agentsBrowseWithoutSignIns: "Agents browse without your sign-ins.",
+ agentsAskBeforeBrowsing: "Agents ask before browsing.",
+
+ // What a Computer reports about its browser.
+ browserConnectedLabel:
+ "Connected. Browser tasks use your Chrome and its sign-ins.",
+ tokenExpired: "Token expired",
+ tokenExpiredLabel:
+ "Token expired. Copy a new token from the extension, then reconnect.",
+ chromeUnavailable: "Chrome unavailable",
+ chromeUnavailableLabel:
+ "Can't reach your Chrome. Make sure Chrome is open on this Computer, then reconnect.",
+ extensionUnavailable: "Extension unavailable",
+ extensionNotFound:
+ "Playwright Extension not found. Install and enable it in Chrome, then reconnect.",
+ notConnected: "Not connected",
+ notConnectedLabel:
+ "Not connected. Agent browser tasks wait until you connect your everyday Chrome.",
+ isolatedLabel:
+ "Not connected. Agents use a separate browser without your sign-ins.",
+ notSupported: "Not supported",
+ unsupportedLabel:
+ "This Computer can't use your browser. Agents use a separate browser without your sign-ins.",
+ browserStatus: "Browser status",
+ browserStatusUnknown: "Browser status unknown",
+
+ // Why connecting the browser failed.
+ browserInvalidToken:
+ "Can't read this token. Copy the full line that starts with PLAYWRIGHT_MCP_EXTENSION_TOKEN=, or only the token after the equals sign.",
+ browserComputerNotFound:
+ "Can't find this Computer. It may have been removed.",
+ browserOutdated:
+ "Linger Computer on this Computer is out of date. Update it, then connect your browser.",
+ browserTimeout:
+ "Connection timed out. Make sure Chrome is open and the extension is enabled, then try again.",
+ browserTokenRejected:
+ "The extension didn't accept this token. Copy the current token from the extension, then reconnect.",
+ chromeNotInstalled:
+ "Google Chrome isn't installed on this Computer. Install Chrome first.",
+ browserBusy: "An Agent task is using this Chrome. Connect after it finishes.",
+ browserConnectionDamaged:
+ "The saved browser connection on this Computer is damaged. Paste a token to reconnect.",
+ browserConnectFailed:
+ "This Computer couldn't connect to your browser. Try again later.",
+ browserConnectUnavailable:
+ "Can't connect to the browser right now. Try again later.",
+});
diff --git a/apps/web/src/features/local-computer/connect-computer-page.tsx b/apps/web/src/features/local-computer/connect-computer-page.tsx
index 93da9842..123c7afd 100644
--- a/apps/web/src/features/local-computer/connect-computer-page.tsx
+++ b/apps/web/src/features/local-computer/connect-computer-page.tsx
@@ -19,7 +19,10 @@ import {
import { teamHubData } from "@/features/teamhub/teamhub-api";
import { TeamHubError } from "@/features/teamhub/teamhub-error";
import { useTeamHubRuntime } from "@/features/teamhub/teamhub-runtime";
+import { RichMessage, useT } from "@/i18n/use-translation";
+import { computerSetupMessages } from "./computer-setup.messages";
+import { computersMessages } from "./computers.messages";
import { publishLocalComputerEnrollment } from "./local-computer-enrollment-events";
const PKCE_PATTERN = /^[A-Za-z0-9_-]{43}$/;
@@ -37,6 +40,7 @@ export function ConnectComputerPage({
}: {
navigateToCallback?: (url: string) => void;
}) {
+ const t = useT();
const [searchParams] = useSearchParams();
const request = useMemo(
() => parseConnectRequest(searchParams),
@@ -134,8 +138,12 @@ export function ConnectComputerPage({
Linger Computer
</p>
<h1 className="truncate text-lg">
- {request.existingComputerId ? "Reconnect" : "Connect"}{" "}
- {request.displayName}
+ {t(
+ request.existingComputerId
+ ? computersMessages.reconnectName
+ : computersMessages.connectName,
+ { computer: request.displayName },
+ )}
</h1>
</div>
</header>
@@ -148,31 +156,34 @@ export function ConnectComputerPage({
size={20}
/>
<div>
- <p className="text-sm font-medium">Local runtime access</p>
+ <p className="text-sm font-medium">
+ {t(computersMessages.localRuntimeAccess)}
+ </p>
<p className="mt-1 text-sm text-muted-foreground">
- The Computer will appear as an available runtime for your
- account.
+ {t(computersMessages.localRuntimeAccessBody)}
</p>
</div>
</div>
{tenants.isPending ? (
<p className="text-sm text-muted-foreground" role="status">
- Loading spaces...
+ {t(computersMessages.loadingSpaces)}
</p>
) : tenants.error ? (
<p className="text-sm text-app-danger" role="alert">
- Spaces are unavailable.
+ {t(computersMessages.spacesUnavailable)}
</p>
) : tenants.data.items.length === 0 ? (
<p className="text-sm text-muted-foreground" role="status">
- No space is available for this account.
+ {t(computersMessages.noSpace)}
</p>
) : (
<label className="block">
- <span className="mb-1.5 block text-sm font-medium">Space</span>
+ <span className="mb-1.5 block text-sm font-medium">
+ {t(computersMessages.space)}
+ </span>
<Select
- aria-label="Space"
+ aria-label={t(computersMessages.space)}
className="ui-field-control w-full text-sm"
onValueChange={setRequestedTenantId}
value={selectedTenant?.id ?? ""}
@@ -188,10 +199,15 @@ export function ConnectComputerPage({
{session.data ? (
<p className="text-sm text-muted-foreground">
- Signed in as{" "}
- <span className="font-medium text-foreground">
- {session.data.identity.account.email}
- </span>
+ <RichMessage
+ message={computersMessages.signedInAs}
+ tags={{
+ email: (text) => (
+ <span className="font-medium text-foreground">{text}</span>
+ ),
+ }}
+ values={{ email: session.data.identity.account.email }}
+ />
</p>
) : null}
@@ -208,22 +224,23 @@ export function ConnectComputerPage({
/>
<div>
<p className="text-sm font-medium text-foreground">
- Confirm Local Computer replacement
+ {t(computersMessages.confirmReplacement)}
</p>
<p className="mt-1 text-sm text-muted-foreground">
- {replacementReason === "removed"
- ? "This Computer was removed from the signed-in account."
- : "This Computer cannot be renewed by the signed-in account."}{" "}
- Continuing stops the old local daemon and connects this
- machine as a new Computer for the account shown above. The
- old Computer and its Agents are not deleted from the server.
+ {t(
+ replacementReason === "removed"
+ ? computersMessages.replacementRemoved
+ : computersMessages.replacementWrongAccount,
+ )}
</p>
</div>
</div>
<div className="flex flex-wrap justify-end gap-2">
- <Button onClick={cancelReplacement}>Keep current setup</Button>
+ <Button onClick={cancelReplacement}>
+ {t(computersMessages.keepCurrentSetup)}
+ </Button>
<Button onClick={confirmReplacement} tone="danger">
- Replace local identity
+ {t(computersMessages.replaceLocalIdentity)}
</Button>
</div>
</div>
@@ -232,7 +249,7 @@ export function ConnectComputerPage({
className="rounded-lg border border-[var(--app-status-danger-border)] bg-[var(--app-status-danger-surface)] px-3 py-2.5 text-sm text-app-danger"
role="alert"
>
- The Computer could not be connected. Run setup again.
+ {t(computersMessages.connectFailed)}
</p>
) : null}
@@ -252,7 +269,9 @@ export function ConnectComputerPage({
tone="ghost"
>
<Icon icon={Logout01Icon} size={16} />
- {switchAccount.isPending ? "Signing out..." : "Use another account"}
+ {switchAccount.isPending
+ ? t(computersMessages.signingOut)
+ : t(computersMessages.useAnotherAccount)}
</Button>
<Button
disabled={
@@ -265,10 +284,10 @@ export function ConnectComputerPage({
tone="primary"
>
{enrollment.isPending
- ? "Connecting..."
+ ? t(computersMessages.connectingRequest)
: request.existingComputerId
- ? "Reconnect computer"
- : "Connect computer"}
+ ? t(computersMessages.reconnectComputer)
+ : t(computerSetupMessages.connectComputer)}
</Button>
</footer>
</section>
@@ -282,12 +301,13 @@ const requiresLocalIdentityReplacement = (error: unknown): boolean =>
(error.status === 404 && error.code === "INVALID_ENROLLMENT"));
function InvalidConnectionRequest() {
+ const t = useT();
return (
<main className="flex min-h-dvh items-center justify-center bg-background px-6 text-center text-foreground">
<div className="max-w-sm">
- <h1 className="text-lg">Connection request is invalid</h1>
+ <h1 className="text-lg">{t(computersMessages.invalidRequestTitle)}</h1>
<p className="mt-2 text-sm text-muted-foreground">
- Return to the terminal and run setup again.
+ {t(computersMessages.invalidRequestBody)}
</p>
</div>
</main>
diff --git a/apps/web/src/features/local-computer/desktop-computer.ts b/apps/web/src/features/local-computer/desktop-computer.ts
index 0577d8dc..c52455cb 100644
--- a/apps/web/src/features/local-computer/desktop-computer.ts
+++ b/apps/web/src/features/local-computer/desktop-computer.ts
@@ -1,5 +1,9 @@
import { useCallback, useEffect, useState } from "react";
+import { translate } from "@/i18n/language";
+
+import { computersMessages } from "./computers.messages";
+
// The part of the desktop shell API (`window.lingerDesktop`, exposed by the
// Electron preload) that the Agent creation flow uses. In a browser it is
// absent and the CLI setup instructions are shown instead.
@@ -65,7 +69,9 @@ export function useDesktopComputer(): DesktopComputer | undefined {
)
.catch((reason: unknown) =>
setError(
- reason instanceof Error ? reason.message : "Could not connect",
+ reason instanceof Error
+ ? reason.message
+ : translate(computersMessages.couldNotConnect),
),
)
.finally(() => setConnecting(false));
diff --git a/apps/web/src/features/local-computer/local-computer-gate.tsx b/apps/web/src/features/local-computer/local-computer-gate.tsx
index 15fe1da7..02edd739 100644
--- a/apps/web/src/features/local-computer/local-computer-gate.tsx
+++ b/apps/web/src/features/local-computer/local-computer-gate.tsx
@@ -12,6 +12,7 @@ import type {
TeamHubLocalComputerPage,
TeamHubLocalRuntimeType,
} from "@/features/teamhub/teamhub-types";
+import { RichMessage, useT } from "@/i18n/use-translation";
import { cn } from "@/lib/cn";
import { CommandLine } from "./computer-app-setup-dialog";
@@ -27,6 +28,8 @@ import {
appStatus,
runtimeStatusLabels,
} from "./computer-readiness";
+import { computerSetupMessages } from "./computer-setup.messages";
+import { computersMessages } from "./computers.messages";
import { useDesktopComputer } from "./desktop-computer";
import { DesktopComputerSetup } from "./desktop-computer-setup";
import { localComputersQueryOptions } from "./local-computer-queries";
@@ -57,6 +60,7 @@ export function LocalComputerGate({
signingOut: boolean;
tenantId: string;
}) {
+ const t = useT();
const { client } = useTeamHubRuntime();
const desktop = useDesktopComputer();
const [platform, setPlatform] = useState(browserComputerPlatform);
@@ -87,13 +91,14 @@ export function LocalComputerGate({
role="dialog"
>
<header className="border-b border-border px-6 pb-4 pt-5">
- <p className="text-xs text-muted-foreground">Before you start</p>
+ <p className="text-xs text-muted-foreground">
+ {t(computersMessages.gateKicker)}
+ </p>
<h2 className="mt-1 text-lg" id="local-computer-gate-title">
- Connect your computer
+ {t(computersMessages.gateTitle)}
</h2>
<p className="mt-1 text-sm text-muted-foreground">
- Your Agents run on your own computer with Claude Code, Codex or Pi.
- Connect one to start.
+ {t(computersMessages.gateIntro)}
</p>
{desktop ? null : (
<ComputerPlatformSelector onChange={setPlatform} value={platform} />
@@ -106,7 +111,7 @@ export function LocalComputerGate({
role="status"
>
<Spinner size={14} />
- Your computer is ready. Creating your Another Me...
+ {t(computersMessages.gateReady)}
</p>
) : (
<ol className="divide-y divide-border px-6">
@@ -114,7 +119,7 @@ export function LocalComputerGate({
<GateStep
number={1}
state="current"
- title="Connect this computer"
+ title={t(computerSetupMessages.connectThisComputer)}
>
<DesktopComputerSetup desktop={desktop} />
</GateStep>
@@ -123,7 +128,7 @@ export function LocalComputerGate({
<GateStep
number={1}
state={computer ? "done" : "current"}
- title="Install the CLI"
+ title={t(computersMessages.installTheCli)}
>
<CommandLine
command={computerInstallCommand(platform)}
@@ -133,7 +138,7 @@ export function LocalComputerGate({
<GateStep
number={2}
state={online ? "done" : computer ? "current" : "next"}
- title="Connect this computer"
+ title={t(computerSetupMessages.connectThisComputer)}
>
<CommandLine command={`${command} login`} />
<ConnectionStatus command={command} computer={computer} />
@@ -143,13 +148,13 @@ export function LocalComputerGate({
<GateStep
number={desktop && !computer ? 2 : 3}
state={online ? "current" : "next"}
- title="Set up an AI app"
+ title={t(computersMessages.setUpAiApp)}
>
{computer && online ? (
<AppSetup computer={computer} tenantId={tenantId} />
) : (
<p className="mt-1 text-xs text-muted-foreground">
- Available once your computer is online.
+ {t(computersMessages.availableOnceOnline)}
</p>
)}
</GateStep>
@@ -162,8 +167,15 @@ export function LocalComputerGate({
)}
<footer className="flex justify-end border-t border-border bg-muted/40 px-6 py-3">
- <Button disabled={signingOut} onClick={onSignOut} tone="ghost">
- {signingOut ? "Signing out..." : "Sign out"}
+ <Button
+ data-voice-risk="never"
+ disabled={signingOut}
+ onClick={onSignOut}
+ tone="ghost"
+ >
+ {signingOut
+ ? t(computersMessages.signingOut)
+ : t(computersMessages.signOut)}
</Button>
</footer>
</section>
@@ -178,6 +190,7 @@ function ConnectionStatus({
command: string;
computer: LocalComputer | undefined;
}) {
+ const t = useT();
if (!computer)
return (
<p
@@ -185,27 +198,35 @@ function ConnectionStatus({
role="status"
>
<Spinner size={12} />
- Waiting for your computer. Approve the request when it opens in your
- browser.
+ {t(computersMessages.waitingForComputer)}
</p>
);
if (computer.upgrade_required)
return (
<p className="mt-2 text-xs text-app-warning" role="status">
- {computer.display_name} needs an update. Run the command in step 1 again
- on it.
+ {t(computersMessages.computerNeedsUpdate, {
+ computer: computer.display_name,
+ })}
</p>
);
if (computer.status !== "online")
return (
<p className="mt-2 text-xs text-app-warning" role="status">
- {computer.display_name} is offline. Start it with{" "}
- <code className="font-mono">{command} daemon start</code>.
+ <RichMessage
+ message={computersMessages.computerOfflineStart}
+ tags={{
+ code: (text) => <code className="font-mono">{text}</code>,
+ }}
+ values={{
+ command: `${command} daemon start`,
+ computer: computer.display_name,
+ }}
+ />
</p>
);
return (
<p className="mt-2 text-xs text-app-success" role="status">
- {computer.display_name} is online.
+ {t(computersMessages.computerOnline, { computer: computer.display_name })}
</p>
);
}
@@ -217,6 +238,7 @@ function AppSetup({
computer: LocalComputer;
tenantId: string;
}) {
+ const t = useT();
const missing = appOrder.filter(
(app) => appStatus(computer, app) === "not_installed",
);
@@ -225,7 +247,9 @@ function AppSetup({
);
return (
<div className="mt-2 space-y-3">
- <p className="text-xs text-muted-foreground">One ready app is enough.</p>
+ <p className="text-xs text-muted-foreground">
+ {t(computersMessages.oneReadyAppEnough)}
+ </p>
<ul className="divide-y divide-border rounded-lg border border-border">
{appOrder.map((app) => (
<AppRow app={app} key={app} status={appStatus(computer, app)} />
@@ -247,21 +271,29 @@ function AppSetup({
/>
) : null}
<p className="text-xs text-muted-foreground">
- Or run a model on {computer.display_name} itself: load one in{" "}
- <Link
- className="text-foreground underline underline-offset-2"
- to={`/t/${encodeURIComponent(tenantId)}/settings/models?computer=${encodeURIComponent(computer.computer_id)}`}
- >
- Settings › Models
- </Link>
- .
+ <RichMessage
+ message={computersMessages.orRunLocalModel}
+ tags={{
+ link: (text) => (
+ <Link
+ className="text-foreground underline underline-offset-2"
+ to={`/t/${encodeURIComponent(tenantId)}/settings/models?computer=${encodeURIComponent(computer.computer_id)}`}
+ >
+ {text}
+ </Link>
+ ),
+ }}
+ values={{ computer: computer.display_name }}
+ />
</p>
<p
className="flex items-center gap-1.5 text-xs text-muted-foreground"
role="status"
>
<Spinner size={12} />
- Checking {computer.display_name}. Changes show up within a minute.
+ {t(computersMessages.checkingComputer, {
+ computer: computer.display_name,
+ })}
</p>
</div>
);
@@ -274,6 +306,7 @@ function AppRow({
app: TeamHubLocalRuntimeType;
status: RuntimeStatus;
}) {
+ const t = useT();
return (
<li className="flex items-center justify-between gap-3 px-3 py-2 text-sm">
{appNames[app]}
@@ -287,7 +320,7 @@ function AppRow({
: "text-muted-foreground",
)}
>
- {runtimeStatusLabels[status]}
+ {t(runtimeStatusLabels[status])}
</span>
</li>
);
diff --git a/apps/web/src/features/local-computer/remove-computer-agent-row.tsx b/apps/web/src/features/local-computer/remove-computer-agent-row.tsx
index 2fb66409..1dd1dbf2 100644
--- a/apps/web/src/features/local-computer/remove-computer-agent-row.tsx
+++ b/apps/web/src/features/local-computer/remove-computer-agent-row.tsx
@@ -1,7 +1,9 @@
import { Select, SelectItem } from "@/components/ui/select";
import type { AgentMoveTargetOption } from "@/features/rooms/members/agent-move-target";
import type { TeamHubTenantAgent } from "@/features/teamhub/teamhub-types";
+import { useT } from "@/i18n/use-translation";
+import { computersMessages } from "./computers.messages";
import type { AgentMoveProgress } from "./use-move-agents-then-remove";
export const DELETE_AGENT_CHOICE = "delete";
@@ -23,6 +25,7 @@ export function RemoveComputerAgentRow({
progress?: AgentMoveProgress;
value: string;
}) {
+ const t = useT();
const name = agent.actor.display_name;
const anotherMe = agent.agent_type === "anotherme";
return (
@@ -36,11 +39,11 @@ export function RemoveComputerAgentRow({
) : null}
</p>
<Select
- aria-label={`Target for ${name}`}
+ aria-label={t(computersMessages.targetFor, { name })}
className="ui-field-control w-full"
disabled={disabled}
onValueChange={onChange}
- placeholder="Choose a target"
+ placeholder={t(computersMessages.chooseTarget)}
value={value}
>
{options.map((option) => (
@@ -50,18 +53,18 @@ export function RemoveComputerAgentRow({
))}
{anotherMe ? null : (
<SelectItem value={DELETE_AGENT_CHOICE}>
- Delete this Agent instead
+ {t(computersMessages.deleteAgentInstead)}
</SelectItem>
)}
</Select>
<p className="text-xs text-app-muted">{hint}</p>
{progress?.state === "failed" ? (
<p className="text-xs text-app-danger" role="alert">
- Failed: {progress.message}
+ {t(computersMessages.moveFailed, { message: progress.message })}
</p>
) : progress ? (
<p className="text-xs text-app-subtle" role="status">
- {progressLabel[progress.state]}
+ {t(progressLabel[progress.state])}
</p>
) : null}
</li>
@@ -69,8 +72,8 @@ export function RemoveComputerAgentRow({
}
const progressLabel = {
- deleted: "Deleted",
- deleting: "Deleting…",
- moved: "Moved",
- moving: "Moving…",
+ deleted: computersMessages.deleted,
+ deleting: computersMessages.deleting,
+ moved: computersMessages.moved,
+ moving: computersMessages.moving,
} as const;
diff --git a/apps/web/src/features/local-computer/remove-computer-dialog.tsx b/apps/web/src/features/local-computer/remove-computer-dialog.tsx
index 091a694c..cd4a168b 100644
--- a/apps/web/src/features/local-computer/remove-computer-dialog.tsx
+++ b/apps/web/src/features/local-computer/remove-computer-dialog.tsx
@@ -13,7 +13,11 @@ import {
} from "@/features/rooms/members/agent-move-target";
import { useTeamHubRuntime } from "@/features/teamhub/teamhub-runtime";
import type { TeamHubTenantAgent } from "@/features/teamhub/teamhub-types";
+import { commonMessages } from "@/i18n/common.messages";
+import { RichMessage, useT } from "@/i18n/use-translation";
+import { computerSetupMessages } from "./computer-setup.messages";
+import { computersMessages } from "./computers.messages";
import {
DELETE_AGENT_CHOICE,
RemoveComputerAgentRow,
@@ -23,12 +27,9 @@ import {
useMoveAgentsThenRemove,
} from "./use-move-agents-then-remove";
+/** The English notice, for callers that look for it by its text. */
export const NO_OTHER_COMPUTER_NOTICE =
- "No other computer can take these Agents. Connect your new computer first.";
-
-function moveLabel(count: number) {
- return `Move ${count} Agent${count === 1 ? "" : "s"} and remove`;
-}
+ computersMessages.noOtherComputer.source;
export function RemoveComputerDialog({
agents,
@@ -52,6 +53,7 @@ export function RemoveComputerDialog({
pending: boolean;
tenantId: string;
}) {
+ const t = useT();
const { client } = useTeamHubRuntime();
// Rows keep the Agents assigned when the dialog opened, so finished ones
// stay listed with their outcome while the refreshed list shrinks.
@@ -87,11 +89,11 @@ export function RemoveComputerDialog({
),
)
: plan?.action === "delete"
- ? "Removes this Agent from every Room and deletes your direct chat with it."
+ ? t(computersMessages.deleteAgentHint)
: candidates.length === 0
? agent.agent_type === "anotherme"
- ? "Another Me can't be deleted. Connect another computer to move it."
- : "Connect another computer to move this Agent, or delete it."
+ ? t(computersMessages.anotherMeNeedsComputer)
+ : t(computersMessages.agentNeedsComputer)
: describeMissingDefault(row, candidates);
return { candidates, hint, options, plan, row };
});
@@ -105,16 +107,16 @@ export function RemoveComputerDialog({
({ plan }) => plan?.action === "delete",
).length;
const label = move.failed
- ? "Retry"
+ ? t(commonMessages.retry)
: remaining.length === 0
- ? "Remove"
+ ? t(commonMessages.remove)
: !ready
- ? moveLabel(remaining.length)
+ ? t(computersMessages.moveAndRemove, { count: remaining.length })
: moves && deletes
- ? "Move, delete and remove"
+ ? t(computersMessages.moveDeleteAndRemove)
: deletes
- ? "Delete and remove"
- : moveLabel(moves);
+ ? t(computersMessages.deleteAndRemove)
+ : t(computersMessages.moveAndRemove, { count: moves });
async function confirm() {
if (!ready || busy) return;
@@ -127,20 +129,21 @@ export function RemoveComputerDialog({
return (
<ModalDialog
description={
- <>
- This revokes <strong>{computer.display_name}</strong> and removes it
- from this workspace. Reconnecting requires a new setup.
- </>
+ <RichMessage
+ message={computersMessages.removeDescription}
+ tags={{ strong: (text) => <strong>{text}</strong> }}
+ values={{ computer: computer.display_name }}
+ />
}
onClose={() => {
if (!move.running) onClose();
}}
size="md"
- title="Remove Local Computer"
+ title={t(computersMessages.removeTitle)}
footer={
<>
<Button disabled={move.running} onClick={onClose}>
- Cancel
+ {t(commonMessages.cancel)}
</Button>
<Button
disabled={!ready || busy}
@@ -159,16 +162,16 @@ export function RemoveComputerDialog({
className="flex flex-wrap items-center justify-between gap-3 rounded-lg border border-[var(--app-status-warning-border)] bg-[var(--app-status-warning-surface)] px-3 py-2.5 text-sm text-app-warning"
role="status"
>
- <p>{NO_OTHER_COMPUTER_NOTICE}</p>
+ <p>{t(computersMessages.noOtherComputer)}</p>
<Button onClick={onConnect} size="compact">
- Connect a computer
+ {t(computerSetupMessages.title)}
</Button>
</div>
) : null}
{rows.length ? (
- <section aria-label="Assigned Agents">
+ <section aria-label={t(computersMessages.assignedAgents)}>
<h3 className="text-xs font-medium text-muted-foreground">
- Assigned Agents move first
+ {t(computersMessages.assignedAgentsMoveFirst)}
</h3>
<ul className="mt-1 divide-y divide-border">
{plans.map(({ hint, options, row }) => (
diff --git a/apps/web/src/features/rooms/chat/voice-mode/voice-risk-markers.test.ts b/apps/web/src/features/rooms/chat/voice-mode/voice-risk-markers.test.ts
index e7603a72..cca71517 100644
--- a/apps/web/src/features/rooms/chat/voice-mode/voice-risk-markers.test.ts
+++ b/apps/web/src/features/rooms/chat/voice-mode/voice-risk-markers.test.ts
@@ -41,6 +41,8 @@ const notActions: Record<string, string> = {
"says the Agent of a direct chat was deleted; the link only opens the chat",
"/src/features/rooms/chat/voice-mode/voice-mode-controls.tsx: voiceMode.dictationHint":
"describes the button that starts Voice Mode, which sends nothing itself",
+ "/src/features/local-computer/remove-computer-agent-row.tsx: computers.deleteAgentInstead":
+ "chooses what removing the computer does; the marked Remove button does it",
};
type Need = "confirm" | "never" | "close";
diff --git a/apps/web/src/features/rooms/members/edit-agent-runtime-dialog.tsx b/apps/web/src/features/rooms/members/edit-agent-runtime-dialog.tsx
index 7c78304c..e2bb3c09 100644
--- a/apps/web/src/features/rooms/members/edit-agent-runtime-dialog.tsx
+++ b/apps/web/src/features/rooms/members/edit-agent-runtime-dialog.tsx
@@ -173,7 +173,7 @@ export function EditAgentRuntimeDialog({
{runtimeLabels[item.type]}
{item.status === "ready"
? ""
- : ` · ${runtimeStatusLabels[item.status]}`}
+ : ` · ${runtimeStatusLabels[item.status].source}`}
</SelectItem>
))}
</Select>
diff --git a/apps/web/src/i18n/locales/zh-CN.json b/apps/web/src/i18n/locales/zh-CN.json
index dd749df1..e2470040 100644
--- a/apps/web/src/i18n/locales/zh-CN.json
+++ b/apps/web/src/i18n/locales/zh-CN.json
@@ -888,6 +888,226 @@
"microphoneHardwareRecording": "硬件录音正在使用麦克风",
"microphoneOtherTab": "麦克风正在另一个标签页中使用"
},
+ "computers": {
+ "pageTitle": "电脑",
+ "allComputers": "全部电脑",
+ "connect": "连接",
+ "directoryLabel": "本地电脑列表",
+ "reconnecting": "正在重新连接…",
+ "offline": "离线",
+ "offlineSince": "离线 · {time}",
+ "updateRequired": "需要更新",
+ "signInToApp": "登录 {app}",
+ "updateApp": "更新 {app}",
+ "couldNotCheckApp": "无法检查 {app}",
+ "setUpApp": "设置 {app}",
+ "ready": "就绪",
+ "readyRunning": "就绪 · {count} 个运行中",
+ "oneStepLeft": "还差一步",
+ "unavailableTitle": "电脑不可用",
+ "unavailableBody": "这台电脑已离线,或你的账号已无法访问它。",
+ "backToComputers": "返回电脑列表",
+ "setupCommands": "连接命令",
+ "connectDialogTitle": "连接本地电脑",
+ "connectDialogDescription": "先安装 CLI,再在终端里授权这个工作区。",
+ "noComputersTitle": "在你的电脑上运行 Agent",
+ "noComputersBody": "设置大约需要 2 分钟。",
+ "detailsLabel": "{computer} 详情",
+ "agents": "Agent",
+ "aiApps": "AI 应用",
+ "aiAppsHint": "Agent 用这台电脑上的这些应用来完成工作,有一个就绪就够了。",
+ "localModels": "本地模型",
+ "manageLocalModels": "管理本地模型",
+ "manageLocalModelsHint": "下载并加载在这台电脑上运行的模型",
+ "access": "访问权限",
+ "advanced": "高级",
+ "update": "更新",
+ "updateTo": "更新到 {version}",
+ "updateLingerComputer": "更新 Linger Computer",
+ "updateInstructions": "等运行中的任务结束后,在 {computer} 上运行这条命令。你的 Agent 会保持连接。",
+ "checkAgain": "重新检查",
+ "appVersion": "应用 {version}",
+ "lingerTooOld": "当前应用版本过旧,无法运行 Agent",
+ "lingerRunning": "Linger 应用正在运行",
+ "connected": "已连接",
+ "agentsUseApp": "Agent 在这台电脑上使用 {app}",
+ "appSignedOut": "{app} 已安装,但还没有登录",
+ "signIn": "登录",
+ "appTooOld": "{app} 版本过旧,无法运行 Agent",
+ "needAiApp": "Agent 需要这台电脑上装有 Claude Code、Codex 或 Pi",
+ "turnOn": "开机",
+ "turnOnHint": "开机并连上网络,它通常会自动重新连接。",
+ "startApp": "启动应用",
+ "stillOffline": "一分钟后仍然离线?",
+ "runInTerminalOn": "在 {computer} 的终端中运行:",
+ "reconnect": "重新连接",
+ "reconnectHint": "重置或更换过这台电脑?重新连接一次。",
+ "add": "添加",
+ "optionalApp": "{description} · 可选",
+ "notInstalled": "未安装",
+ "lastSeenSignedOut": "上次在线时未登录",
+ "lastCheckFailed": "上次检查失败",
+ "lastSeenOutdated": "上次在线时版本过旧",
+ "lastSeenReady": "上次在线时已就绪",
+ "notCheckedYet": "尚未检查",
+ "signedOut": "未登录",
+ "couldNotCheck": "无法检查",
+ "updateNeeded": "需要更新",
+ "checkAgainOn": "在 {computer} 的终端中重新检查:",
+ "workspaceHint": "Agent 在这台电脑上存放工作内容的位置",
+ "agentsCanView": "Agent 可以查看这里的内容",
+ "agentsCanEdit": "Agent 可以编辑这里的内容",
+ "app": "应用",
+ "notReported": "未上报",
+ "versionAvailable": "可更新到 {version}",
+ "computerId": "电脑 ID",
+ "troubleshoot": "排查问题",
+ "toolStatus": "状态",
+ "toolRestart": "重启",
+ "toolRecheck": "重新检查",
+ "toolStop": "停止",
+ "removeComputer": "移除电脑",
+ "runInPowerShellWindows": "请在这台 Windows 电脑上用 PowerShell 运行。",
+ "descriptionClaude": "Anthropic 的编程 Agent",
+ "descriptionCodex": "OpenAI 的编程 Agent",
+ "descriptionPi": "开源编程 Agent",
+ "descriptionAntigravity": "Google 的编程 Agent",
+ "statusSignInRequired": "需要登录",
+ "statusCouldNotCheck": "无法检查",
+ "statusChecking": "正在检查",
+ "noAgents": "这台电脑上还没有 Agent,可以在“消息”中创建。",
+ "less": "收起",
+ "more": "更多",
+ "tasksRunning": {
+ "other": "{count} 个任务运行中"
+ },
+ "appSignInNeeded": "需要登录 {app}",
+ "statusUnavailable": "无法获取状态",
+ "agentsNeedAttention": {
+ "other": "{count} 个需要处理"
+ },
+ "agentsOffline": "{count} 个离线",
+ "agentsStatusUnavailable": "{count} 个无法获取状态",
+ "computerOffline": "{computer} 已离线",
+ "appReady": "{app} 已就绪",
+ "checkingApp": "正在检查 {app}…",
+ "setupAccountHint": "请在 {computer} 上操作,并使用连接它时的同一个系统账号。",
+ "stepInstall": "安装",
+ "piLoginHint": "然后在 Pi 中输入 /login",
+ "signInPageHint": "浏览器会打开登录页面",
+ "pasteIntoTerminal": "粘贴到 {computer} 的终端中",
+ "runThenSignIn": "运行这条命令,然后在打开的页面上登录",
+ "connectName": "连接 {computer}",
+ "reconnectName": "重新连接 {computer}",
+ "localRuntimeAccess": "本地 Runtime 访问",
+ "localRuntimeAccessBody": "这台电脑将作为可用的 Runtime 出现在你的账号中。",
+ "loadingSpaces": "正在加载空间…",
+ "spacesUnavailable": "无法加载空间。",
+ "noSpace": "这个账号下没有可用的空间。",
+ "space": "空间",
+ "signedInAs": "当前登录账号:<email>{email}</email>",
+ "confirmReplacement": "确认替换本地电脑",
+ "replacementRemoved": "这台电脑已从当前登录的账号中移除。继续操作会停止旧的本地后台服务,并把这台机器作为一台新电脑连接到上方显示的账号。旧电脑和它的 Agent 不会从服务器上删除。",
+ "replacementWrongAccount": "当前登录的账号无法为这台电脑续期。继续操作会停止旧的本地后台服务,并把这台机器作为一台新电脑连接到上方显示的账号。旧电脑和它的 Agent 不会从服务器上删除。",
+ "keepCurrentSetup": "保留当前设置",
+ "replaceLocalIdentity": "替换本地身份",
+ "connectFailed": "无法连接这台电脑,请重新运行设置命令。",
+ "signingOut": "正在退出登录…",
+ "useAnotherAccount": "使用其他账号",
+ "connectingRequest": "正在连接…",
+ "reconnectComputer": "重新连接电脑",
+ "invalidRequestTitle": "连接请求无效",
+ "invalidRequestBody": "请回到终端,重新运行设置命令。",
+ "couldNotConnect": "无法连接",
+ "gateKicker": "开始之前",
+ "gateTitle": "连接你的电脑",
+ "gateIntro": "你的 Agent 通过 Claude Code、Codex 或 Pi 在你自己的电脑上运行。先连接一台电脑再开始。",
+ "gateReady": "你的电脑已就绪,正在创建你的 Another Me…",
+ "installTheCli": "安装 CLI",
+ "setUpAiApp": "设置一个 AI 应用",
+ "availableOnceOnline": "电脑上线后即可操作。",
+ "signOut": "退出登录",
+ "waitingForComputer": "正在等待你的电脑。浏览器中打开请求后,请点击批准。",
+ "computerNeedsUpdate": "{computer} 需要更新,请在它上面重新运行第 1 步的命令。",
+ "computerOfflineStart": "{computer} 已离线,可以用 <code>{command}</code> 启动它。",
+ "computerOnline": "{computer} 已在线。",
+ "oneReadyAppEnough": "有一个应用就绪就够了。",
+ "orRunLocalModel": "也可以直接在 {computer} 上运行模型:到<link>设置 › 模型</link>中加载一个。",
+ "checkingComputer": "正在检查 {computer},变化会在一分钟内显示。",
+ "removeTitle": "移除本地电脑",
+ "removeDescription": "这会撤销 <strong>{computer}</strong> 的授权,并把它从这个工作区移除。之后要重新连接,需要再设置一次。",
+ "noOtherComputer": "没有其他电脑可以接收这些 Agent,请先连接新电脑。",
+ "moveAndRemove": {
+ "other": "移动 {count} 个 Agent 并移除"
+ },
+ "moveDeleteAndRemove": "移动、删除并移除",
+ "deleteAndRemove": "删除并移除",
+ "deleteAgentHint": "这会把这个 Agent 从所有 Room 中移除,并删除你和它的私聊。",
+ "anotherMeNeedsComputer": "Another Me 无法删除,请连接另一台电脑后再移动它。",
+ "agentNeedsComputer": "请连接另一台电脑来移动这个 Agent,或者删除它。",
+ "assignedAgents": "已分配的 Agent",
+ "assignedAgentsMoveFirst": "先移动已分配的 Agent",
+ "targetFor": "{name} 的目标位置",
+ "chooseTarget": "选择目标位置",
+ "deleteAgentInstead": "改为删除这个 Agent",
+ "moveFailed": "失败:{message}",
+ "deleted": "已删除",
+ "deleting": "正在删除…",
+ "moved": "已移动",
+ "moving": "正在移动…",
+ "connectMyBrowser": "连接我的浏览器",
+ "connectMyBrowserIntro": "让这台电脑上的 Agent 浏览器任务使用你日常用的 Chrome 和其中的登录状态。令牌只会发送到你的电脑,不会出现在对话中。",
+ "loadingComputers": "正在加载你的电脑…",
+ "cannotLoadComputers": "暂时无法加载你的电脑。",
+ "computerNoLongerConnected": "这台电脑已不再连接到你的账号。",
+ "noLocalComputerYet": "你还没有本地电脑,请先在“设置 › 电脑”中连接一台。云端电脑无法使用你的浏览器。",
+ "computer": "电脑",
+ "computerNamed": "电脑:<name>{computer}</name>",
+ "computerOfflineOption": "{computer}(离线)",
+ "reconfigure": "重新配置",
+ "disconnect": "断开连接",
+ "disconnecting": "正在断开连接…",
+ "installExtensionStep": "在 Chrome 中安装 <link>Playwright Extension</link>",
+ "copyTokenStep": "点击扩展程序图标,复制它显示的令牌(复制完整的 <code>PLAYWRIGHT_MCP_EXTENSION_TOKEN=…</code> 一行也可以)",
+ "pasteTokenStep": "粘贴到下方并连接",
+ "extensionToken": "扩展程序令牌",
+ "pasteToken": "粘贴令牌",
+ "connectingUpToMinute": "正在连接,最多需要 1 分钟…",
+ "checkingBrowserStatus": "正在检查浏览器状态…",
+ "browserComputerOffline": "这台电脑已离线。请确认它已开机,并且正在运行 Linger Computer。",
+ "browserUnavailableOffline": "这台电脑离线时不可用。",
+ "agentsCanUseChrome": "Agent 可以使用你的 Chrome",
+ "chromeOptional": "可选 · 让 Agent 使用你的 Chrome",
+ "connectChrome": "连接 Chrome",
+ "manage": "管理",
+ "agentsUseSignIns": "Agent 使用你的登录状态。",
+ "agentsBrowseWithoutSignIns": "Agent 浏览时不带你的登录状态。",
+ "agentsAskBeforeBrowsing": "Agent 浏览前会先询问你。",
+ "browserConnectedLabel": "已连接。浏览器任务会使用你的 Chrome 和其中的登录状态。",
+ "tokenExpired": "令牌已过期",
+ "tokenExpiredLabel": "令牌已过期。请从扩展程序复制新的令牌,然后重新连接。",
+ "chromeUnavailable": "Chrome 不可用",
+ "chromeUnavailableLabel": "无法连接你的 Chrome。请确认这台电脑上的 Chrome 已打开,然后重新连接。",
+ "extensionUnavailable": "扩展程序不可用",
+ "extensionNotFound": "未找到 Playwright Extension。请在 Chrome 中安装并启用它,然后重新连接。",
+ "notConnected": "未连接",
+ "notConnectedLabel": "未连接。Agent 的浏览器任务会等你连接日常使用的 Chrome 后再继续。",
+ "isolatedLabel": "未连接。Agent 使用独立的浏览器,不带你的登录状态。",
+ "notSupported": "不支持",
+ "unsupportedLabel": "这台电脑无法使用你的浏览器。Agent 使用独立的浏览器,不带你的登录状态。",
+ "browserStatus": "浏览器状态",
+ "browserStatusUnknown": "浏览器状态未知",
+ "browserInvalidToken": "无法识别这个令牌。请复制以 PLAYWRIGHT_MCP_EXTENSION_TOKEN= 开头的完整一行,或只复制等号后面的令牌。",
+ "browserComputerNotFound": "找不到这台电脑,它可能已被移除。",
+ "browserOutdated": "这台电脑上的 Linger Computer 版本过旧。请先更新,再连接浏览器。",
+ "browserTimeout": "连接超时。请确认 Chrome 已打开、扩展程序已启用,然后重试。",
+ "browserTokenRejected": "扩展程序没有接受这个令牌。请从扩展程序复制当前的令牌,然后重新连接。",
+ "chromeNotInstalled": "这台电脑上没有安装 Google Chrome,请先安装 Chrome。",
+ "browserBusy": "有 Agent 任务正在使用这个 Chrome,请等它结束后再连接。",
+ "browserConnectionDamaged": "这台电脑上保存的浏览器连接已损坏,请粘贴令牌重新连接。",
+ "browserConnectFailed": "这台电脑无法连接你的浏览器,请稍后重试。",
+ "browserConnectUnavailable": "暂时无法连接浏览器,请稍后重试。"
+ },
"runtimeStatus": {
"stateCanceled": "已取消",
"stateCompleted": "已完成",