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 rail, Messages list, account menu and create-agent dialog
Kilyn4fe4e1b9e87d
diff --git a/apps/web/AGENTS.md b/apps/web/AGENTS.mdindex 14ffb2da..5781fd0e 100644--- a/apps/web/AGENTS.md+++ b/apps/web/AGENTS.md@@ -262,7 +262,11 @@ build:assets` to check the initial JS budget.- Dates and numbers inside translated text take `formatLocale(language)`.`lib/date-format.ts` stays on `APP_LOCALE` for surfaces that are stillEnglish, so one screen does not mix an English sentence with a Chinese- date.+ date; a translated surface passes its locale or translation to those+ helpers.+ - A label on a translated surface follows the language, so CSS and DOM+ queries never select by its text. Use a class or a `data-*` marker such as+ `data-voice-area`, not `[aria-label="…"]`.- A translated control tells Voice Mode what clicking it does with amarker, never with words in its label: `data-voice-risk="never"` fordeleting, removing, sending, leaving, signing out, paying, archiving ordiff --git a/apps/web/src/app/globals.css b/apps/web/src/app/globals.cssindex 666c102b..c73aafd0 100644--- a/apps/web/src/app/globals.css+++ b/apps/web/src/app/globals.css@@ -2389,8 +2389,8 @@ a[href][aria-disabled="true"],/* A small gap sets the pinned rows apart from the rest, without a divider. */.room-secondary-navigation-list- .group:has([aria-label="Pinned"])- + .group:not(:has([aria-label="Pinned"])) {+ .group:has(.room-pin-badge)+ + .group:not(:has(.room-pin-badge)) {margin-top: 6px;}diff --git a/apps/web/src/features/auth/account-menu.messages.ts b/apps/web/src/features/auth/account-menu.messages.tsnew file mode 100644index 00000000..5bfe3090--- /dev/null+++ b/apps/web/src/features/auth/account-menu.messages.ts@@ -0,0 +1,19 @@+import { defineMessages } from "@/i18n/messages";++export const accountMenuMessages = defineMessages("accountMenu", {+ label: "Account menu",+ settings: "Settings",+ logOut: "Log out",+ loggingOut: "Logging out...",+ version: "Version {version}",+ checking: "Checking for updates…",+ downloading: "Downloading Linger {version}…",+ ready: "Linger {version} is ready to install",+ restartToUpdate: "Restart to Update",+ waiting: "Updating to {version} when tasks finish",+ installing: "Updating to {version}…",+ available: "Linger {version} is available",+ downloadUpdate: "Download Update",+ failed: "Update failed: {error}",+ tryAgain: "Try Again",+});diff --git a/apps/web/src/features/auth/account-menu.tsx b/apps/web/src/features/auth/account-menu.tsxindex d387b491..880ce836 100644--- a/apps/web/src/features/auth/account-menu.tsx+++ b/apps/web/src/features/auth/account-menu.tsx@@ -13,8 +13,12 @@ import {} from "@/features/auth/desktop-update";import { ActorAvatar } from "@/features/rooms/members/actor-avatar";import type { TeamHubCurrentIdentity } from "@/features/teamhub/teamhub-types";+import type { Translate } from "@/i18n/language";+import { useT } from "@/i18n/use-translation";import { cn } from "@/lib/cn";+import { accountMenuMessages } from "./account-menu.messages";+interface UpdatePresentation {// One line under the version; none while nothing is happening.readonly status?: string;@@ -27,40 +31,52 @@ interface UpdatePresentation {}// What the account menu shows for the desktop app's updater state.-function updatePresentation(state: DesktopUpdate["state"]): UpdatePresentation {+function updatePresentation(+ state: DesktopUpdate["state"],+ t: Translate,+): UpdatePresentation {switch (state?.kind) {case "checking":- return { status: "Checking for updates…", attention: false };+ return { status: t(accountMenuMessages.checking), attention: false };case "downloading":return {- status: `Downloading Linger ${state.version}…`,+ status: t(accountMenuMessages.downloading, { version: state.version }),attention: false,};case "ready":return {- status: `Linger ${state.version} is ready to install`,- action: { label: "Restart to Update", run: "install" },+ status: t(accountMenuMessages.ready, { version: state.version }),+ action: {+ label: t(accountMenuMessages.restartToUpdate),+ run: "install",+ },attention: true,};case "waiting":return {- status: `Updating to ${state.version} when tasks finish`,+ status: t(accountMenuMessages.waiting, { version: state.version }),attention: false,};case "installing":- return { status: `Updating to ${state.version}…`, attention: false };+ return {+ status: t(accountMenuMessages.installing, { version: state.version }),+ attention: false,+ };case "available":return {- status: `Linger ${state.version} is available`,- action: { label: "Download Update", run: "install" },+ status: t(accountMenuMessages.available, { version: state.version }),+ action: {+ label: t(accountMenuMessages.downloadUpdate),+ run: "install",+ },attention: true,};case "failed":return {- status: `Update failed: ${state.error}`,+ status: t(accountMenuMessages.failed, { error: state.error }),tone: "danger",detail: state.error,- action: { label: "Try Again", run: "check" },+ action: { label: t(accountMenuMessages.tryAgain), run: "check" },attention: false,};default:@@ -92,7 +108,8 @@ export function AccountMenu({const identifier = identity.account.email;const inSettings = settingsOpen;const desktop = useDesktopUpdate();- const update = updatePresentation(desktop?.state);+ const t = useT();+ const update = updatePresentation(desktop?.state, t);const action = desktop && update.action;const updateItems: ActionMenuItem[] = action? [@@ -114,7 +131,7 @@ export function AccountMenu({: [];return (<ActionMenu- label="Account menu"+ label={t(accountMenuMessages.label)}placement="top-start"buttonClassName={`flex size-11 items-center justify-center rounded-full outline-none transition-colors hover:bg-sidebar-muted aria-expanded:bg-sidebar-muted focus-visible:ring-2 focus-visible:ring-ring md:size-8 ${inSettings ? "bg-sidebar-muted" : ""}`}trigger={@@ -144,7 +161,9 @@ export function AccountMenu({</p>{desktop ? (<div className="mt-2 text-xs">- <p className="text-app-muted">Version {desktop.version}</p>+ <p className="text-app-muted">+ {t(accountMenuMessages.version, { version: desktop.version })}+ </p>{update.status ? (<pclassName={cn(@@ -167,7 +186,7 @@ export function AccountMenu({items={[...updateItems,{- label: "Settings",+ label: t(accountMenuMessages.settings),icon: <Icon icon={Settings01Icon} size={14} />,separatorBefore: updateItems.length > 0,onSelect: () => {@@ -176,7 +195,12 @@ export function AccountMenu({},},{- label: isPending ? "Logging out..." : "Log out",+ voiceRisk: "never",+ label: t(+ isPending+ ? accountMenuMessages.loggingOut+ : accountMenuMessages.logOut,+ ),icon: <Icon icon={Logout01Icon} size={14} />,disabled: isPending,separatorBefore: true,diff --git a/apps/web/src/features/local-computer/computer-platform.tsx b/apps/web/src/features/local-computer/computer-platform.tsxindex 7f73bbd2..08e40261 100644--- a/apps/web/src/features/local-computer/computer-platform.tsx+++ b/apps/web/src/features/local-computer/computer-platform.tsx@@ -1,3 +1,7 @@+import { useT } from "@/i18n/use-translation";++import { computerSetupMessages } from "./computer-setup.messages";+export type ComputerPlatform = "darwin" | "linux" | "win32";export function browserComputerPlatform(): ComputerPlatform {@@ -54,16 +58,17 @@ export function ComputerPlatformSelector({value: ComputerPlatform | "";onChange: (platform: ComputerPlatform) => void;}) {+ const t = useT();return (<label className="mt-3 flex flex-wrap items-center gap-2 text-xs text-muted-foreground">- Computer operating system+ {t(computerSetupMessages.operatingSystem)}<selectclassName="h-8 rounded-md border border-border bg-card px-2 text-sm text-foreground transition-colors duration-150 hover:border-border-hover focus-visible:border-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"value={value}onChange={(event) => onChange(event.target.value as ComputerPlatform)}><option value="" disabled>- Choose operating system+ {t(computerSetupMessages.chooseOperatingSystem)}</option><option value="darwin">macOS</option><option value="win32">Windows</option>diff --git a/apps/web/src/features/local-computer/computer-setup-instructions.tsx b/apps/web/src/features/local-computer/computer-setup-instructions.tsxindex ba84767a..6d98b43f 100644--- a/apps/web/src/features/local-computer/computer-setup-instructions.tsx+++ b/apps/web/src/features/local-computer/computer-setup-instructions.tsx@@ -14,7 +14,10 @@ import {} from "react";import { createPortal } from "react-dom";+import { useT } from "@/i18n/use-translation";import { writeClipboardText } from "@/lib/clipboard";++import { computerSetupMessages } from "./computer-setup.messages";import {browserComputerPlatform,computerCommand,@@ -26,12 +29,13 @@ export function ComputerSetupInstructions({connected = false,waitingForNewComputer = false,}: ComputerSetupInstructionsProps) {+ const t = useT();const [platform, setPlatform] = useState(browserComputerPlatform);const installCommand = computerInstallCommand(platform);return (<section- aria-label="Connect a Local Computer"+ aria-label={t(computerSetupMessages.label)}className="overflow-hidden rounded-xl border border-border bg-card"><div className="border-b border-border p-4">@@ -41,12 +45,14 @@ export function ComputerSetupInstructions({</span><div><h3 className="text-sm font-semibold text-foreground">- Connect a computer+ {t(computerSetupMessages.title)}</h3><p className="mt-0.5 text-sm text-muted-foreground">- {platform === "win32"- ? "Run these commands in PowerShell on the computer you want to connect."- : "Run these commands in a terminal on the computer you want to connect."}+ {t(+ platform === "win32"+ ? computerSetupMessages.runInPowerShell+ : computerSetupMessages.runInTerminal,+ )}</p></div></div>@@ -57,22 +63,24 @@ export function ComputerSetupInstructions({key={platform}command={installCommand}number="1"- title="Install CLI"+ title={t(computerSetupMessages.installCli)}/><SetupStepcommand={`${computerCommand()} login`}number="2"- title="Connect computer"+ title={t(computerSetupMessages.connectComputer)}/><li className="flex gap-3 py-3.5"><StepNumber>3</StepNumber><div className="min-w-0 flex-1 pt-0.5"><p className="text-sm font-medium text-foreground">- {connected- ? "Computer connected"- : waitingForNewComputer- ? "Waiting for a new computer"- : "Waiting for your computer"}+ {t(+ connected+ ? computerSetupMessages.connectedTitle+ : waitingForNewComputer+ ? computerSetupMessages.waitingNewTitle+ : computerSetupMessages.waitingTitle,+ )}</p><pclassName="mt-1.5 flex items-center gap-1.5 text-xs text-muted-foreground"@@ -88,12 +96,14 @@ export function ComputerSetupInstructions({/>)}{connected ? (- "Computer is online. Check its Runtime status before running tasks."+ t(computerSetupMessages.connectedStatus)) : (<span className="town-shimmer-text">- {waitingForNewComputer- ? "Checking for a new Local Computer..."- : "Checking for an online Local Computer..."}+ {t(+ waitingForNewComputer+ ? computerSetupMessages.checkingNew+ : computerSetupMessages.checkingOnline,+ )}</span>)}</p>@@ -154,6 +164,7 @@ export function CopyValueButton({selectionTargetRef: RefObject<HTMLElement | null>;value: string;}) {+ const t = useT();const [copyState, setCopyState] = useState<"idle" | "copied" | "selected" | "failed">("idle");@@ -171,13 +182,13 @@ export function CopyValueButton({return (<><button- aria-label={+ aria-label={t(copied- ? "Command copied"+ ? computerSetupMessages.commandCopied: selected- ? "Command selected"- : "Copy command"- }+ ? computerSetupMessages.commandSelected+ : computerSetupMessages.copyCommand,+ )}className="flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors duration-150 hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"onClick={() => {void (async () => {@@ -203,9 +214,13 @@ export function CopyValueButton({);})();}}- title={- copied ? "Copied" : selected ? "Command selected" : "Copy command"- }+ title={t(+ copied+ ? computerSetupMessages.copied+ : selected+ ? computerSetupMessages.commandSelected+ : computerSetupMessages.copyCommand,+ )}type="button">{copied ? (@@ -222,11 +237,13 @@ export function CopyValueButton({role={copyState === "failed" ? "alert" : "status"}>{copied ? <Icon icon={Tick02Icon} size={14} /> : null}- {copied- ? "Copied to clipboard"- : selected- ? "Command selected. Press Cmd+C or Ctrl+C to copy."- : "Copy is unavailable on this connection."}+ {t(+ copied+ ? computerSetupMessages.copiedToClipboard+ : selected+ ? computerSetupMessages.selectedToCopy+ : computerSetupMessages.copyUnavailable,+ )}</div>,document.body,)diff --git a/apps/web/src/features/local-computer/computer-setup.messages.ts b/apps/web/src/features/local-computer/computer-setup.messages.tsnew file mode 100644index 00000000..93e68aab--- /dev/null+++ b/apps/web/src/features/local-computer/computer-setup.messages.ts@@ -0,0 +1,71 @@+import { defineMessages } from "@/i18n/messages";++/** Connecting a Computer and getting an AI app on it ready to run Agents. */+export const computerSetupMessages = defineMessages("computerSetup", {+ label: "Connect a Local Computer",+ title: "Connect a computer",+ runInPowerShell:+ "Run these commands in PowerShell on the computer you want to connect.",+ runInTerminal:+ "Run these commands in a terminal on the computer you want to connect.",+ installCli: "Install CLI",+ connectComputer: "Connect computer",+ connectedTitle: "Computer connected",+ waitingNewTitle: "Waiting for a new computer",+ waitingTitle: "Waiting for your computer",+ connectedStatus:+ "Computer is online. Check its Runtime status before running tasks.",+ checkingNew: "Checking for a new Local Computer...",+ checkingOnline: "Checking for an online Local Computer...",+ operatingSystem: "Computer operating system",+ chooseOperatingSystem: "Choose operating system",+ copyCommand: "Copy command",+ commandCopied: "Command copied",+ commandSelected: "Command selected",+ copied: "Copied",+ copiedToClipboard: "Copied to clipboard",+ selectedToCopy: "Command selected. Press Cmd+C or Ctrl+C to copy.",+ copyUnavailable: "Copy is unavailable on this connection.",+ serverSummary: "Connect a server · No browser on this computer?",+ serverIntro:+ "Install the CLI using step 1, then use a temporary token instead of browser sign-in. The server only needs an outbound connection.",+ serverName: "Server name",+ serverNamePlaceholder: "My server",+ generating: "Generating…",+ generateToken: "Generate connection token",+ tokenFailed:+ "Could not generate a token. Check your connection and try again.",+ tokenInstructions:+ "Run the command on the server, paste this token at the prompt, then press Enter. Expires at {time}. Keep it private.",+ tokenLabel: "Server connection token",+ waitingForServer:+ "Waiting for the server to connect. If exchange is interrupted, retry the same token before it expires.",+ generateAnother: "Generate another token",+ signInRequired: "{app} sign-in required",+ signInGuidance:+ "Run <code>{command}</code> or update the configured {app} credentials on {computer}, using the same OS user that runs Local Computer.",+ piSignIn:+ "In Pi, enter /login to sign in, or configure an API key in Pi auth.json.",+ antigravitySignIn:+ "Antigravity can also use a Gemini API key set as GEMINI_API_KEY for Local Computer.",+ installRuntime:+ "Install a Runtime on {computer} as the OS user that runs Local Computer. It appears here within a minute.",+ installRuntimePowerShell:+ "Install a Runtime on {computer} as the OS user that runs Local Computer, in PowerShell. It appears here within a minute.",+ runtimeCommand: "{app}: <code>{command}</code>",+ npmNeedsNode: "The npm commands need Node.js.",+ desktopConnectIntro:+ "Connect this computer to run Agents with the Codex or Claude Code installed on it.",+ connecting: "Connecting…",+ connectThisComputer: "Connect this computer",+ lookingForApps: "Looking for Codex and Claude Code on this computer…",+ desktopAuthFailed:+ "This computer's sign-in expired. Choose Reconnect This Computer in the Linger menu bar menu.",+ desktopIdentityConflict:+ "This computer is already registered under another Computer entry. Choose Reconnect This Computer in the Linger menu bar menu.",+ desktopUpgradeRequired: "Update the Linger app to connect this computer.",+ desktopDisconnected:+ "The Linger background service is not running. Quit and reopen the app.",+ desktopRuntimeCrashed:+ "Codex and Claude Code could not be checked because the local runtime stopped. Linger is restarting it.",+});diff --git a/apps/web/src/features/local-computer/desktop-computer-setup.tsx b/apps/web/src/features/local-computer/desktop-computer-setup.tsxindex d0ac7b24..7e637e03 100644--- a/apps/web/src/features/local-computer/desktop-computer-setup.tsx+++ b/apps/web/src/features/local-computer/desktop-computer-setup.tsx@@ -1,6 +1,9 @@import { Button } from "@/components/ui/button";import { Spinner } from "@/components/ui/spinner";+import type { Message } from "@/i18n/messages";+import { useT } from "@/i18n/use-translation";+import { computerSetupMessages } from "./computer-setup.messages";import type {DesktopComputer,DesktopComputerStatus,@@ -13,20 +16,24 @@ export function DesktopComputerSetup({}: {desktop: DesktopComputer;}) {+ const t = useT();if (!desktop.status) return null;if (!desktop.status.computerId) {return (<div className="space-y-2"><p className="text-xs text-app-muted">- Connect this computer to run Agents with the Codex or Claude Code- installed on it.+ {t(computerSetupMessages.desktopConnectIntro)}</p><Buttontone="primary"disabled={desktop.connecting}onClick={desktop.connect}>- {desktop.connecting ? "Connecting…" : "Connect this computer"}+ {t(+ desktop.connecting+ ? computerSetupMessages.connecting+ : computerSetupMessages.connectThisComputer,+ )}</Button>{desktop.error ? (<p role="alert" className="text-xs text-app-danger">@@ -42,7 +49,7 @@ export function DesktopComputerSetup({if (problem) {return (<p role="alert" className="text-xs text-app-danger">- {problem}+ {t(problem)}</p>);}@@ -52,24 +59,26 @@ export function DesktopComputerSetup({role="status"><Spinner size={13} />- Looking for Codex and Claude Code on this computer…+ {t(computerSetupMessages.lookingForApps)}</p>);}// Same states as the desktop tray summary (apps/desktop/src/main/status.ts).-function desktopSetupProblem(status: DesktopComputerStatus) {+function desktopSetupProblem(+ status: DesktopComputerStatus,+): Message<string> | undefined {switch (status.bridge) {case "auth_failed":- return "This computer's sign-in expired. Choose Reconnect This Computer in the Linger menu bar menu.";+ return computerSetupMessages.desktopAuthFailed;case "identity_conflict":- return "This computer is already registered under another Computer entry. Choose Reconnect This Computer in the Linger menu bar menu.";+ return computerSetupMessages.desktopIdentityConflict;case "upgrade_required":- return "Update the Linger app to connect this computer.";+ return computerSetupMessages.desktopUpgradeRequired;case "disconnected":- return "The Linger background service is not running. Quit and reopen the app.";+ return computerSetupMessages.desktopDisconnected;}if (status.runtime === "crashed")- return "Codex and Claude Code could not be checked because the local runtime stopped. Linger is restarting it.";+ return computerSetupMessages.desktopRuntimeCrashed;return undefined;}diff --git a/apps/web/src/features/local-computer/local-runtime-authentication-guidance.tsx b/apps/web/src/features/local-computer/local-runtime-authentication-guidance.tsxindex e54474cb..272bb155 100644--- a/apps/web/src/features/local-computer/local-runtime-authentication-guidance.tsx+++ b/apps/web/src/features/local-computer/local-runtime-authentication-guidance.tsx@@ -1,6 +1,8 @@import type { TeamHubLocalRuntimeType } from "@/features/teamhub/teamhub-types";+import { RichMessage, useT } from "@/i18n/use-translation";import { appNames } from "./computer-readiness";+import { computerSetupMessages } from "./computer-setup.messages";import { loginCommands } from "./local-runtime-commands";export function LocalRuntimeAuthenticationGuidance({@@ -10,26 +12,32 @@ export function LocalRuntimeAuthenticationGuidance({runtimeType: TeamHubLocalRuntimeType;computerName: string;}) {- const name = appNames[runtimeType];- const command = loginCommands[runtimeType];+ const t = useT();+ const app = appNames[runtimeType];return (<>- <p className="font-medium">{name} sign-in required</p>+ <p className="font-medium">+ {t(computerSetupMessages.signInRequired, { app })}+ </p><p className="mt-1 text-muted-foreground">- Run <code className="font-mono">{command}</code> or update the- configured {name} credentials on {computerName}, using the same OS user- that runs Local Computer.+ <RichMessage+ message={computerSetupMessages.signInGuidance}+ tags={{ code: (text) => <code className="font-mono">{text}</code> }}+ values={{+ app,+ command: loginCommands[runtimeType],+ computer: computerName,+ }}+ /></p>{runtimeType === "pi" && (<p className="mt-1 text-muted-foreground">- In Pi, enter /login to sign in, or configure an API key in Pi- auth.json.+ {t(computerSetupMessages.piSignIn)}</p>)}{runtimeType === "antigravity" && (<p className="mt-1 text-muted-foreground">- Antigravity can also use a Gemini API key set as GEMINI_API_KEY for- Local Computer.+ {t(computerSetupMessages.antigravitySignIn)}</p>)}</>diff --git a/apps/web/src/features/local-computer/local-runtime-install-guidance.tsx b/apps/web/src/features/local-computer/local-runtime-install-guidance.tsxindex 3fc59480..f388358d 100644--- a/apps/web/src/features/local-computer/local-runtime-install-guidance.tsx+++ b/apps/web/src/features/local-computer/local-runtime-install-guidance.tsx@@ -1,7 +1,9 @@import type { TeamHubLocalRuntimeType } from "@/features/teamhub/teamhub-types";+import { RichMessage, useT } from "@/i18n/use-translation";import type { ComputerPlatform } from "./computer-platform";import { appNames } from "./computer-readiness";+import { computerSetupMessages } from "./computer-setup.messages";import { installCommand } from "./local-runtime-commands";export function LocalRuntimeInstallGuidance({@@ -13,26 +15,40 @@ export function LocalRuntimeInstallGuidance({platform?: ComputerPlatform;computerName: string;}) {+ const t = useT();if (runtimeTypes.length === 0) return null;return (<div className="text-xs text-muted-foreground"><p>- Install a Runtime on {computerName} as the OS user that runs Local- Computer{platform === "win32" ? ", in PowerShell" : ""}. It appears here- within a minute.+ {t(+ platform === "win32"+ ? computerSetupMessages.installRuntimePowerShell+ : computerSetupMessages.installRuntime,+ { computer: computerName },+ )}</p><ul className="mt-2 flex flex-col gap-1">{runtimeTypes.map((runtimeType) => (<li key={runtimeType}>- {appNames[runtimeType]}:{" "}- <code className="select-all font-mono text-foreground">- {installCommand(runtimeType, platform)}- </code>+ <RichMessage+ message={computerSetupMessages.runtimeCommand}+ tags={{+ code: (text) => (+ <code className="select-all font-mono text-foreground">+ {text}+ </code>+ ),+ }}+ values={{+ app: appNames[runtimeType],+ command: installCommand(runtimeType, platform),+ }}+ /></li>))}</ul>{runtimeTypes.some((runtimeType) => runtimeType !== "claude") ? (- <p className="mt-2">The npm commands need Node.js.</p>+ <p className="mt-2">{t(computerSetupMessages.npmNeedsNode)}</p>) : null}</div>);diff --git a/apps/web/src/features/local-computer/server-connection.tsx b/apps/web/src/features/local-computer/server-connection.tsxindex e1bf8510..4a05524e 100644--- a/apps/web/src/features/local-computer/server-connection.tsx+++ b/apps/web/src/features/local-computer/server-connection.tsx@@ -5,8 +5,11 @@ import { useRef, useState } from "react";import { Button } from "@/components/ui/button";import { teamHubData } from "@/features/teamhub/teamhub-api";import { useTeamHubRuntime } from "@/features/teamhub/teamhub-runtime";+import { formatLocale } from "@/i18n/language";+import { useTranslation } from "@/i18n/use-translation";import { computerCommand } from "./computer-platform";+import { computerSetupMessages } from "./computer-setup.messages";import { CopyValueButton } from "./computer-setup-instructions";import { publishLocalComputerEnrollment } from "./local-computer-enrollment-events";@@ -18,6 +21,7 @@ const base64url = (bytes: Uint8Array) =>export function ServerConnection({ tenantId }: { tenantId: string }) {const { client } = useTeamHubRuntime();+ const { language, t } = useTranslation();const [name, setName] = useState("");const [pending, setPending] = useState(false);const [result, setResult] = useState<{ token: string; expiresAt: string }>();@@ -79,22 +83,21 @@ export function ServerConnection({ tenantId }: { tenantId: string }) {return (<details className="mt-4 rounded-xl border border-border bg-muted/40 p-4"><summary className="cursor-pointer text-sm font-medium text-foreground">- Connect a server · No browser on this computer?+ {t(computerSetupMessages.serverSummary)}</summary><div className="mt-4 space-y-3 text-sm"><p className="text-muted-foreground">- Install the CLI using step 1, then use a temporary token instead of- browser sign-in. The server only needs an outbound connection.+ {t(computerSetupMessages.serverIntro)}</p><label className="block text-foreground">- Server name+ {t(computerSetupMessages.serverName)}<inputclassName="ui-field-control mt-1 block w-full"maxLength={120}value={name}onChange={(event) => setName(event.target.value)}disabled={pending || Boolean(result)}- placeholder="My server"+ placeholder={t(computerSetupMessages.serverNamePlaceholder)}/></label>{!result && (@@ -102,27 +105,34 @@ export function ServerConnection({ tenantId }: { tenantId: string }) {disabled={pending || !name.trim()}onClick={() => void generate()}>- {pending ? "Generating…" : "Generate connection token"}+ {t(+ pending+ ? computerSetupMessages.generating+ : computerSetupMessages.generateToken,+ )}</Button>)}{failed && (<p role="alert" className="text-app-danger">- Could not generate a token. Check your connection and try again.+ {t(computerSetupMessages.tokenFailed)}</p>)}{result && (<><p className="text-muted-foreground">- Run the command on the server, paste this token at the prompt,- then press Enter. Expires at{" "}- {formatDateTime(result.expiresAt, { timeStyle: "short" })}. Keep- it private.+ {t(computerSetupMessages.tokenInstructions, {+ time: formatDateTime(+ result.expiresAt,+ { timeStyle: "short" },+ formatLocale(language),+ ),+ })}</p><div className="flex gap-2 rounded-lg border border-border bg-card p-3"><coderef={tokenRef}className="max-h-28 min-w-0 flex-1 overflow-auto break-all text-xs"- aria-label="Server connection token"+ aria-label={t(computerSetupMessages.tokenLabel)}>{result.token}</code>@@ -144,11 +154,10 @@ export function ServerConnection({ tenantId }: { tenantId: string }) {/></div><p className="text-muted-foreground">- Waiting for the server to connect. If exchange is interrupted,- retry the same token before it expires.+ {t(computerSetupMessages.waitingForServer)}</p><Button onClick={() => setResult(undefined)}>- Generate another token+ {t(computerSetupMessages.generateAnother)}</Button></>)}diff --git a/apps/web/src/features/rooms/agent-create-menu.tsx b/apps/web/src/features/rooms/agent-create-menu.tsxindex ef0d4b03..372146f5 100644--- a/apps/web/src/features/rooms/agent-create-menu.tsx+++ b/apps/web/src/features/rooms/agent-create-menu.tsx@@ -7,6 +7,9 @@ import {import { Icon } from "@/components/ui/icon";import { ActionMenu } from "@/components/ui/action-menu";+import { useT } from "@/i18n/use-translation";++import { roomListMessages } from "./room-list.messages";/** The 26px plus beside a navigation group title (AGENTS and ROOMS). */export const navPlusButtonClass =@@ -21,25 +24,26 @@ export function AgentCreateMenu({onCreateAgent: () => void;onCreateRoom: () => void;}) {+ const t = useT();return (<ActionMenu- label="Create chat"+ label={t(roomListMessages.createChat)}placement="right-start"buttonClassName={navPlusButtonClass}trigger={<Icon icon={PlusSignIcon} size={16} />}items={[{- label: "Create Agent",+ label: t(roomListMessages.createAgent),icon: <Icon icon={BotIcon} size={14} />,onSelect: onCreateAgent,},{- label: "Create Room",+ label: t(roomListMessages.createRoom),icon: <Icon icon={UserGroupIcon} size={14} />,onSelect: onCreateRoom,},{- label: "Agent templates",+ label: t(roomListMessages.agentTemplates),icon: <Icon icon={Copy01Icon} size={14} />,onSelect: onCreateFromTemplate,},diff --git a/apps/web/src/features/rooms/agent-creation-progress.tsx b/apps/web/src/features/rooms/agent-creation-progress.tsxindex 99bc9307..68ae6d32 100644--- a/apps/web/src/features/rooms/agent-creation-progress.tsx+++ b/apps/web/src/features/rooms/agent-creation-progress.tsx@@ -6,7 +6,9 @@ import {Tick02Icon,} from "@hugeicons/core-free-icons";import { Icon } from "@/components/ui/icon";+import { useT } from "@/i18n/use-translation";+import { createAgentMessages } from "./create-agent.messages";import styles from "./agent-creation-progress.module.css";export type AgentCreationStage = "preparing" | "creating" | "opening";@@ -16,18 +18,27 @@ export function AgentCreationProgress({}: {stage: AgentCreationStage;}) {- const steps = ["Connect computer", "Create Agent", "Open chat"];+ const t = useT();+ const steps = [+ t(createAgentMessages.stepConnect),+ t(createAgentMessages.stepCreate),+ t(createAgentMessages.stepOpen),+ ];const activeStep = { preparing: 0, creating: 1, opening: 2 }[stage];- const title = {- preparing: "Finding your computer",- creating: "Bringing your Agent to life",- opening: "Your Agent is ready",- }[stage];- const description = {- preparing: "Looking for a connected computer to get started.",- creating: "Setting up everything for your first conversation.",- opening: "Opening your conversation. Say hello!",- }[stage];+ const title = t(+ {+ preparing: createAgentMessages.preparingTitle,+ creating: createAgentMessages.creatingTitle,+ opening: createAgentMessages.openingTitle,+ }[stage],+ );+ const description = t(+ {+ preparing: createAgentMessages.preparingDescription,+ creating: createAgentMessages.creatingDescription,+ opening: createAgentMessages.openingDescription,+ }[stage],+ );return (<div className="w-full max-w-sm py-3 text-center text-app-ink">@@ -65,7 +76,7 @@ export function AgentCreationProgress({</p></div><ol- aria-label="Agent creation progress"+ aria-label={t(createAgentMessages.progressLabel)}className="mt-7 grid grid-cols-3 gap-2 text-xs leading-4">{steps.map((step, index) => (@@ -92,11 +103,13 @@ export function AgentCreationProgress({</span>{step}<span className="sr-only">- {index < activeStep- ? ": complete"- : index === activeStep- ? ": in progress"- : ": waiting"}+ {t(+ index < activeStep+ ? createAgentMessages.stepComplete+ : index === activeStep+ ? createAgentMessages.stepInProgress+ : createAgentMessages.stepWaiting,+ )}</span></li>))}diff --git a/apps/web/src/features/rooms/chat/voice-mode/live/voice-page-reader.test.ts b/apps/web/src/features/rooms/chat/voice-mode/live/voice-page-reader.test.tsindex dade807b..16f8fec3 100644--- a/apps/web/src/features/rooms/chat/voice-mode/live/voice-page-reader.test.ts+++ b/apps/web/src/features/rooms/chat/voice-mode/live/voice-page-reader.test.ts@@ -21,7 +21,7 @@ beforeEach(() => {});document.title = "Apollo launch";document.body.innerHTML = `- <nav aria-label="Primary navigation"><a href="/m">Message</a></nav>+ <nav aria-label="Primary navigation" data-voice-area="navigation"><a href="/m">Message</a></nav><main><h1>Apollo launch</h1><ul>diff --git a/apps/web/src/features/rooms/chat/voice-mode/live/voice-page-reader.ts b/apps/web/src/features/rooms/chat/voice-mode/live/voice-page-reader.tsindex f7bd6542..6d71cea7 100644--- a/apps/web/src/features/rooms/chat/voice-mode/live/voice-page-reader.ts+++ b/apps/web/src/features/rooms/chat/voice-mode/live/voice-page-reader.ts@@ -5,7 +5,7 @@*/const voiceWindow = '[aria-label="Voice Mode window"]';-const outsideContent = `${voiceWindow}, nav[aria-label="Primary navigation"], nav[aria-label="Room navigation"], aside[aria-label$=" sidebar"], [aria-hidden="true"], [inert]`;+const outsideContent = `${voiceWindow}, [data-voice-area], aside[aria-label$=" sidebar"], [aria-hidden="true"], [inert]`;// The Human's unsent draft and secrets are never read.const privateInput = `input, textarea, select, [aria-label="Message Room"]`;// A chat message row is one block, read with its author and time.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.tsindex 291e5731..f3f37d7e 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@@ -32,7 +32,12 @@ for (const exports of Object.values(messageModules))* Controls named by a risky-sounding message that are not that action, by* `file: namespace.name`, with the reason.*/-const notActions: Record<string, string> = {};+const notActions: Record<string, string> = {+ "/src/features/rooms/room-secondary-navigation.tsx: roomList.deletedChat":+ "says the Agent of a direct chat was deleted; the link only opens the chat",+ "/src/features/rooms/room-secondary-navigation.tsx: roomList.deleted":+ "says the Agent of a direct chat was deleted; the link only opens the chat",+};type Need = "confirm" | "never" | "close";diff --git a/apps/web/src/features/rooms/chat/voice-mode/voice-ui-bridge.test.ts b/apps/web/src/features/rooms/chat/voice-mode/voice-ui-bridge.test.tsindex 51be4823..e32336c4 100644--- a/apps/web/src/features/rooms/chat/voice-mode/voice-ui-bridge.test.ts+++ b/apps/web/src/features/rooms/chat/voice-mode/voice-ui-bridge.test.ts@@ -342,8 +342,8 @@ describe("Voice Mode screen actions", () => {});it("offers visible clickable elements by area and clicks the one chosen", () => {document.body.innerHTML = `- <nav aria-label="Primary navigation"><a href="/workspace">Workspace</a></nav>- <nav aria-label="Room navigation"><button aria-label="Pocket notes"></button></nav>+ <nav aria-label="Primary navigation" data-voice-area="navigation"><a href="/workspace">Workspace</a></nav>+ <nav aria-label="Room navigation" data-voice-area="sidebar"><button aria-label="Pocket notes"></button></nav><main><a href="/doc/1">Q3 Budget.xlsx</a><button>Delete room</button>@@ -474,7 +474,7 @@ describe("Voice Mode screen actions", () => {it("offers the live model risky, hover-only and switch targets, main area first", () => {document.body.innerHTML = `- <nav aria-label="Primary navigation"><a href="/workspace">Workspace</a></nav>+ <nav aria-label="Primary navigation" data-voice-area="navigation"><a href="/workspace">Workspace</a></nav><main><button>Delete room</button><div class="hover"><button>Reply</button></div>@@ -528,7 +528,7 @@ describe("Voice Mode screen actions", () => {it('marks the open item and the one voice clicked last, for "the next one"', () => {document.body.innerHTML = `- <nav aria-label="Room navigation">+ <nav aria-label="Room navigation" data-voice-area="sidebar"><a href="/a">Alpha</a><a href="/b" aria-current="page">Beta</a><a href="/c">Gamma</a>diff --git a/apps/web/src/features/rooms/chat/voice-mode/voice-ui-bridge.ts b/apps/web/src/features/rooms/chat/voice-mode/voice-ui-bridge.tsindex 4095f2f8..379cf68f 100644--- a/apps/web/src/features/rooms/chat/voice-mode/voice-ui-bridge.ts+++ b/apps/web/src/features/rooms/chat/voice-mode/voice-ui-bridge.ts@@ -284,13 +284,12 @@ const clean = (text: string) => text.replace(/\s+/g, " ").trim().slice(0, 120);function elementArea(element: HTMLElement, rect: DOMRect): VoiceElementArea {if (element.closest('[role="dialog"], dialog[open]')) return "dialog";- if (element.closest('nav[aria-label="Primary navigation"]'))- return "navigation";- if (- element.closest(- 'nav[aria-label="Room navigation"], aside[aria-label$=" sidebar"]',- )- )+ // The translated regions carry a marker, because their labels follow the+ // language; the closest one wins, so the rail inside the sidebar stays+ // "navigation".+ const marked = element.closest<HTMLElement>("[data-voice-area]");+ if (marked?.dataset.voiceArea === "navigation") return "navigation";+ if (marked || element.closest('aside[aria-label$=" sidebar"]'))return "sidebar";return rect.left > window.innerWidth * 0.72 ? "panel" : "main";}diff --git a/apps/web/src/features/rooms/create-agent.messages.ts b/apps/web/src/features/rooms/create-agent.messages.tsnew file mode 100644index 00000000..e0a863b0--- /dev/null+++ b/apps/web/src/features/rooms/create-agent.messages.ts@@ -0,0 +1,62 @@+import { defineMessages } from "@/i18n/messages";++import { OFFLINE_COMPUTER_HINT } from "./members/agent-move-target";++/** The create-agent dialog, from choosing a Computer to opening the chat. */+export const createAgentMessages = defineMessages("createAgent", {+ title: "Create local agent",+ connectDescription: "Connect a computer, then choose your runtime and model.",+ chooseDescription: "Choose a computer, runtime and model for your Agent.",+ back: "Back",+ cancel: "Cancel",+ useThisComputer: "Use this computer",+ create: "Create",+ computersUnavailable: "Local Computers are unavailable.",+ retry: "Retry",+ backToComputers: "Back to computer selection",+ connected: "Connected: {name}",+ authorizeWorkspace:+ "Authorize workspace access on this computer before continuing.",+ computer: "Local Computer",+ connectNewComputer: "Connect new computer",+ selectComputer: "Select a Local Computer",+ offlineComputer: "{name} · Offline",+ offlineComputerHint: OFFLINE_COMPUTER_HINT,+ runtime: "Runtime",+ noRuntimes: "No runtimes available",+ model: "Model",+ noModels: "No models available",+ manageModels: "Manage downloaded models in <link>Settings › Models</link>.",+ downloadModel:+ "Download and load a local model in <link>Settings › Models</link> to run Agents with Pi on this computer.",+ noRuntimeModels:+ "No models are available on this Runtime. Check its status and workspace access.",+ thinkingEffort: "Thinking effort",+ effortNotSupported: "Not supported",+ effortNone: "None",+ effortLow: "Low",+ effortMedium: "Medium",+ effortHigh: "High",+ effortExtraHigh: "Extra high",+ effortMaximum: "Maximum",+ effortUltra: "Ultra",+ progressLabel: "Agent creation progress",+ stepConnect: "Connect computer",+ stepCreate: "Create Agent",+ stepOpen: "Open chat",+ stepComplete: ": complete",+ stepInProgress: ": in progress",+ stepWaiting: ": waiting",+ preparingTitle: "Finding your computer",+ preparingDescription: "Looking for a connected computer to get started.",+ creatingTitle: "Bringing your Agent to life",+ creatingDescription: "Setting up everything for your first conversation.",+ openingTitle: "Your Agent is ready",+ openingDescription: "Opening your conversation. Say hello!",+ accountUnconfirmed: "Your account could not be confirmed. Try again.",+ creationFailed: "Agent creation failed.",+ notCreatedTitle: "Agent could not be created",+ agentUnavailable: "This Agent is no longer available.",+ chatNotOpened: "Chat could not be opened",+ setupNeedsAttention: "Agent setup needs attention",+});diff --git a/apps/web/src/features/rooms/mobile-navigation.tsx b/apps/web/src/features/rooms/mobile-navigation.tsxindex 43320a40..03f585e7 100644--- a/apps/web/src/features/rooms/mobile-navigation.tsx+++ b/apps/web/src/features/rooms/mobile-navigation.tsx@@ -3,6 +3,9 @@ import { createContext, useContext } from "react";import { Button } from "@/components/ui/button";import { Icon } from "@/components/ui/icon";+import { useT } from "@/i18n/use-translation";++import { navigationMessages } from "./room-navigation.messages";/** Opens the narrow-screen navigation drawer the Room shell owns. */export const OpenMobileNavigationContext = createContext<() => void>(() => {});@@ -10,9 +13,10 @@ export const OpenMobileNavigationContext = createContext<() => void>(() => {});/** The narrow-screen menu button that opens the navigation drawer. */export function MobileNavigationButton() {const open = useContext(OpenMobileNavigationContext);+ const t = useT();return (<Button- aria-label="Open Room navigation"+ aria-label={t(navigationMessages.openNavigation)}className="md:hidden"onClick={open}size="icon"diff --git a/apps/web/src/features/rooms/pocket-notes/pocket-note-launcher.tsx b/apps/web/src/features/rooms/pocket-notes/pocket-note-launcher.tsxindex 80cc837c..6c271625 100644--- a/apps/web/src/features/rooms/pocket-notes/pocket-note-launcher.tsx+++ b/apps/web/src/features/rooms/pocket-notes/pocket-note-launcher.tsx@@ -1,5 +1,8 @@import { lazy, Suspense, useRef, useState } from "react";import { Icon, type IconSvgElement } from "@/components/ui/icon";+import { useT } from "@/i18n/use-translation";++import { roomListMessages } from "../room-list.messages";// The notepad loads on first open so the sidebar's initial bundle only// carries this trigger.@@ -30,6 +33,7 @@ export function PocketNoteLauncher({anotherMeRoomId?: string;tenantId: string;}) {+ const t = useT();const [open, setOpen] = useState(false);const triggerRef = useRef<HTMLButtonElement>(null);const closeRef = useRef<(() => void) | undefined>(undefined);@@ -38,17 +42,19 @@ export function PocketNoteLauncher({<buttonaria-expanded={open}aria-haspopup="dialog"- aria-label="Pocket Notes"+ aria-label={t(roomListMessages.pocketNotes)}className="xs-nav-btn"onClick={() =>open ? (closeRef.current ?? (() => setOpen(false)))() : setOpen(true)}ref={triggerRef}- title="Pocket Notes"+ title={t(roomListMessages.pocketNotes)}type="button"><Icon icon={noteWriteIcon} size={16} />- <span className="xs-nav-btn-label">Pocket Notes</span>+ <span className="xs-nav-btn-label">+ {t(roomListMessages.pocketNotes)}+ </span></button>{open ? (<Suspense fallback={null}>diff --git a/apps/web/src/features/rooms/quick-create-general-agent-page.tsx b/apps/web/src/features/rooms/quick-create-general-agent-page.tsxindex b700b5c6..62b8182c 100644--- a/apps/web/src/features/rooms/quick-create-general-agent-page.tsx+++ b/apps/web/src/features/rooms/quick-create-general-agent-page.tsx@@ -9,7 +9,9 @@ import type {TeamHubLocalRuntimeType,} from "@/features/teamhub/teamhub-types";import { useTeamHubRuntime } from "@/features/teamhub/teamhub-runtime";+import { useT } from "@/i18n/use-translation";+import { createAgentMessages } from "./create-agent.messages";import {GENERAL_AGENT_DEFAULT_NAME,GENERAL_AGENT_INSTRUCTIONS,@@ -48,6 +50,7 @@ interface AcceptedAgent {export function QuickCreateGeneralAgent(props: QuickCreateGeneralAgentProps) {const { client } = useTeamHubRuntime();+ const t = useT();const identity = useQuery({...teamHubIdentityQueryOptions(client),retry: false,@@ -57,7 +60,7 @@ export function QuickCreateGeneralAgent(props: QuickCreateGeneralAgentProps) {return (<main className="flex flex-col items-center px-4 py-3 text-center"><p className="text-sm text-app-muted" role="alert">- Your account could not be confirmed. Try again.+ {t(createAgentMessages.accountUnconfirmed)}</p><ButtonclassName="mt-5"@@ -65,7 +68,7 @@ export function QuickCreateGeneralAgent(props: QuickCreateGeneralAgentProps) {onClick={() => void identity.refetch()}tone="primary">- Retry+ {t(createAgentMessages.retry)}</Button></main>);@@ -89,6 +92,7 @@ function QuickCreateGeneralAgentFlow({accountId,}: QuickCreateGeneralAgentProps & { keyScope: string; accountId: string }) {const { client } = useTeamHubRuntime();+ const t = useT();const startedTenant = useRef<string | null>(null);const running = useRef(false);const mounted = useRef(true);@@ -132,9 +136,8 @@ function QuickCreateGeneralAgentFlow({setAccepted(acceptedAgent);} catch (cause) {if (!mounted.current) return;- const message =- cause instanceof Error ? cause.message : "Agent creation failed.";- setError(message);+ // An empty message stands for the general one, in the language on screen.+ setError(cause instanceof Error ? cause.message : "");} finally {running.current = false;}@@ -160,16 +163,16 @@ function QuickCreateGeneralAgentFlow({return (<main className="flex h-full min-h-0 flex-1 flex-col items-center justify-center bg-app-surface px-4 py-3 text-center text-app-ink">- {error ? (+ {error !== null ? (<><h1 className="text-base font-semibold">- Agent could not be created+ {t(createAgentMessages.notCreatedTitle)}</h1><p className="mt-2 max-w-sm text-sm text-app-muted" role="alert">- {error}+ {error || t(createAgentMessages.creationFailed)}</p><Button className="mt-5" onClick={() => void create()} tone="primary">- Retry+ {t(createAgentMessages.retry)}</Button></>) : (@@ -193,6 +196,7 @@ function AcceptedAgentChat({onCreated?: () => void;}) {const { client } = useTeamHubRuntime();+ const t = useT();const queryClient = useQueryClient();const navigate = useNavigate();const openingStarted = useRef(false);@@ -267,7 +271,7 @@ function AcceptedAgentChat({const statusError =registration.isSuccess && registration.isFetchedAfterMount && !agentListed- ? "This Agent is no longer available."+ ? t(createAgentMessages.agentUnavailable): null;const error = registration.error ?? chat.error;const errorMessage = error instanceof Error ? error.message : statusError;@@ -276,9 +280,11 @@ function AcceptedAgentChat({{errorMessage ? (<><h1 className="text-base font-semibold">- {chat.isError- ? "Chat could not be opened"- : "Agent setup needs attention"}+ {t(+ chat.isError+ ? createAgentMessages.chatNotOpened+ : createAgentMessages.setupNeedsAttention,+ )}</h1><p className="mt-2 max-w-sm text-sm text-app-muted" role="alert">{errorMessage}@@ -292,7 +298,7 @@ function AcceptedAgentChat({}}tone="primary">- Retry+ {t(createAgentMessages.retry)}</Button></>) : (diff --git a/apps/web/src/features/rooms/quick-create-local-agent-dialog.tsx b/apps/web/src/features/rooms/quick-create-local-agent-dialog.tsxindex 012e5910..0cba8684 100644--- a/apps/web/src/features/rooms/quick-create-local-agent-dialog.tsx+++ b/apps/web/src/features/rooms/quick-create-local-agent-dialog.tsx@@ -21,13 +21,15 @@ import type {TeamHubLocalComputerPage,TeamHubLocalRuntimeType,} from "@/features/teamhub/teamhub-types";+import type { Message } from "@/i18n/messages";+import { RichMessage, useT } from "@/i18n/use-translation";import {QuickCreateGeneralAgent,type LocalAgentTarget,} from "./quick-create-general-agent-page";import { AgentCreationProgress } from "./agent-creation-progress";-import { OFFLINE_COMPUTER_HINT } from "./members/agent-move-target";+import { createAgentMessages } from "./create-agent.messages";const localRuntimeLabels: Record<TeamHubLocalRuntimeType, string> = {claude: "Claude Code",@@ -36,14 +38,14 @@ const localRuntimeLabels: Record<TeamHubLocalRuntimeType, string> = {antigravity: "Antigravity",};-const effortLabels: Record<TeamHubAgentReasoningEffort, string> = {- none: "None",- low: "Low",- medium: "Medium",- high: "High",- xhigh: "Extra high",- max: "Maximum",- ultra: "Ultra",+const effortLabels: Record<TeamHubAgentReasoningEffort, Message<string>> = {+ none: createAgentMessages.effortNone,+ low: createAgentMessages.effortLow,+ medium: createAgentMessages.effortMedium,+ high: createAgentMessages.effortHigh,+ xhigh: createAgentMessages.effortExtraHigh,+ max: createAgentMessages.effortMaximum,+ ultra: createAgentMessages.effortUltra,};export function QuickCreateLocalAgentDialog({@@ -54,6 +56,7 @@ export function QuickCreateLocalAgentDialog({onClose: () => void;}) {const { client } = useTeamHubRuntime();+ const t = useT();const [computerId, setComputerId] = useState("");const [runtimeType, setRuntimeType] = useState<TeamHubLocalRuntimeType>();const [modelId, setModelId] = useState("");@@ -172,9 +175,24 @@ export function QuickCreateLocalAgentDialog({setEffort(undefined);}+ // Where the downloaded models of the selected Computer are managed.+ const modelsLink = (text: string) => (+ <Link+ className="font-medium text-foreground underline underline-offset-2"+ onClick={onClose}+ to={`/t/${encodeURIComponent(tenantId)}/settings/models?computer=${encodeURIComponent(selectedComputerId)}`}+ >+ {text}+ </Link>+ );+if (target)return (- <ModalDialog onClose={onClose} size="md" title="Create local agent">+ <ModalDialog+ onClose={onClose}+ size="md"+ title={t(createAgentMessages.title)}+ ><div className="px-5 py-4"><QuickCreateGeneralAgenttenantId={tenantId}@@ -189,19 +207,23 @@ export function QuickCreateLocalAgentDialog({<ModalDialogonClose={onClose}size="md"- title="Create local agent"- description={+ title={t(createAgentMessages.title)}+ description={t(setupOpen- ? "Connect a computer, then choose your runtime and model."- : "Choose a computer, runtime and model for your Agent."- }+ ? createAgentMessages.connectDescription+ : createAgentMessages.chooseDescription,+ )}footer={!pending ? (<><ButtononClick={connection ? () => setConnection(undefined) : onClose}>- {connection ? "Back" : "Cancel"}+ {t(+ connection+ ? createAgentMessages.back+ : createAgentMessages.cancel,+ )}</Button>{connection ? (<Button@@ -213,7 +235,7 @@ export function QuickCreateLocalAgentDialog({setConnection(undefined);}}>- Use this computer+ {t(createAgentMessages.useThisComputer)}</Button>) : !setupOpen ? (<Button@@ -234,7 +256,7 @@ export function QuickCreateLocalAgentDialog({});}}>- Create+ {t(createAgentMessages.create)}</Button>) : null}</>@@ -251,9 +273,9 @@ export function QuickCreateLocalAgentDialog({role="alert"className="flex items-center justify-between gap-3 text-sm text-app-danger">- Local Computers are unavailable.+ {t(createAgentMessages.computersUnavailable)}<Button onClick={() => void computers.refetch()} size="compact">- Retry+ {t(createAgentMessages.retry)}</Button></div>) : desktop && desktopSetupOpen ? (@@ -266,8 +288,8 @@ export function QuickCreateLocalAgentDialog({tone="ghost"onClick={() => setConnection(undefined)}>- <Icon icon={ArrowLeft01Icon} size={14} /> Back to computer- selection+ <Icon icon={ArrowLeft01Icon} size={14} />{" "}+ {t(createAgentMessages.backToComputers)}</Button>) : null}<ComputerSetupInstructions@@ -276,12 +298,14 @@ export function QuickCreateLocalAgentDialog({/>{connectedComputer ? (<p className="text-sm" role="status">- Connected: {connectedComputer.display_name}+ {t(createAgentMessages.connected, {+ name: connectedComputer.display_name,+ })}</p>) : null}{connectedComputer && !connectedComputer.workspace_grants.length ? (<p className="text-xs text-app-muted" role="status">- Authorize workspace access on this computer before continuing.+ {t(createAgentMessages.authorizeWorkspace)}</p>) : null}<ServerConnection tenantId={tenantId} />@@ -294,7 +318,7 @@ export function QuickCreateLocalAgentDialog({className="text-sm font-medium"htmlFor="local-agent-computer">- Local Computer+ {t(createAgentMessages.computer)}</label><Buttonsize="compact"@@ -310,16 +334,17 @@ export function QuickCreateLocalAgentDialog({}><span className="inline-flex items-center gap-1.5 text-app-info">- <Icon icon={Add01Icon} size={14} /> Connect new computer+ <Icon icon={Add01Icon} size={14} />{" "}+ {t(createAgentMessages.connectNewComputer)}</span></Button></div><Selectid="local-agent-computer"- aria-label="Local Computer"+ aria-label={t(createAgentMessages.computer)}className="min-w-0 w-full"onValueChange={selectComputer}- placeholder="Select a Local Computer"+ placeholder={t(createAgentMessages.selectComputer)}value={selectedComputerId}>{selectableComputers.map((computer) => (@@ -327,14 +352,17 @@ export function QuickCreateLocalAgentDialog({key={computer.computer_id}value={computer.computer_id}>- {computer.display_name}- {computer.status === "online" ? "" : " · Offline"}+ {computer.status === "online"+ ? computer.display_name+ : t(createAgentMessages.offlineComputer, {+ name: computer.display_name,+ })}</SelectItem>))}</Select>{selectedComputer?.status === "offline" ? (<p className="mt-1.5 text-xs text-app-muted" role="status">- {OFFLINE_COMPUTER_HINT}+ {t(createAgentMessages.offlineComputerHint)}</p>) : null}</div>@@ -342,13 +370,13 @@ export function QuickCreateLocalAgentDialog({<><label className="block"><span className="mb-1.5 block text-sm font-medium">- Runtime+ {t(createAgentMessages.runtime)}</span><Select- aria-label="Runtime"+ aria-label={t(createAgentMessages.runtime)}className="min-w-0 w-full"disabled={!selectedComputer.runtimes.length}- placeholder="No runtimes available"+ placeholder={t(createAgentMessages.noRuntimes)}value={selectedRuntime?.type ?? ""}onValueChange={(value) => {setRuntimeType(value as TeamHubLocalRuntimeType);@@ -366,13 +394,13 @@ export function QuickCreateLocalAgentDialog({<div className="space-y-1.5"><label className="block"><span className="mb-1.5 block text-sm font-medium">- Model+ {t(createAgentMessages.model)}</span><Select- aria-label="Model"+ aria-label={t(createAgentMessages.model)}className="min-w-0 w-full"disabled={!modelOptions.length}- placeholder="No models available"+ placeholder={t(createAgentMessages.noModels)}value={selectedModel?.id ?? ""}onValueChange={(value) => {setModelId(value);@@ -388,27 +416,22 @@ export function QuickCreateLocalAgentDialog({</label>{selectedRuntime?.type === "pi" && modelOptions.length > 0 ? (<p className="text-xs text-muted-foreground">- Manage downloaded models in{" "}- <Link- className="font-medium text-foreground underline underline-offset-2"- onClick={onClose}- to={`/t/${encodeURIComponent(tenantId)}/settings/models?computer=${encodeURIComponent(selectedComputer.computer_id)}`}- >- Settings › Models- </Link>- .+ <RichMessage+ message={createAgentMessages.manageModels}+ tags={{ link: modelsLink }}+ /></p>) : null}</div><label className="block"><span className="mb-1.5 block text-sm font-medium">- Thinking effort+ {t(createAgentMessages.thinkingEffort)}</span><Select- aria-label="Thinking effort"+ aria-label={t(createAgentMessages.thinkingEffort)}className="min-w-0 w-full"disabled={!allowedEfforts.length}- placeholder="Not supported"+ placeholder={t(createAgentMessages.effortNotSupported)}value={selectedEffort ?? ""}onValueChange={(value) =>setEffort(value as TeamHubAgentReasoningEffort)@@ -416,7 +439,7 @@ export function QuickCreateLocalAgentDialog({>{allowedEfforts.map((value) => (<SelectItem key={value} value={value}>- {effortLabels[value]}+ {t(effortLabels[value])}</SelectItem>))}</Select>@@ -424,15 +447,10 @@ export function QuickCreateLocalAgentDialog({{!selectedModel && !loginRuntime ? (selectedRuntime?.type === "pi" ? (<p className="text-xs text-muted-foreground" role="status">- Download and load a local model in{" "}- <Link- className="font-medium text-foreground underline underline-offset-2"- onClick={onClose}- to={`/t/${encodeURIComponent(tenantId)}/settings/models?computer=${encodeURIComponent(selectedComputer.computer_id)}`}- >- Settings › Models- </Link>{" "}- to run Agents with Pi on this computer.+ <RichMessage+ message={createAgentMessages.downloadModel}+ tags={{ link: modelsLink }}+ /></p>) : selectedComputer &&selectedRuntime?.status === "not_installed" ? (@@ -445,8 +463,7 @@ export function QuickCreateLocalAgentDialog({</div>) : (<p className="text-xs text-app-muted" role="status">- No models are available on this Runtime. Check its status- and workspace access.+ {t(createAgentMessages.noRuntimeModels)}</p>)) : null}diff --git a/apps/web/src/features/rooms/room-list.messages.ts b/apps/web/src/features/rooms/room-list.messages.tsnew file mode 100644index 00000000..b995f41d--- /dev/null+++ b/apps/web/src/features/rooms/room-list.messages.ts@@ -0,0 +1,51 @@+import { defineMessages } from "@/i18n/messages";++/** The Messages list beside the rail: its toolbar, rows and row actions. */+export const roomListMessages = defineMessages("roomList", {+ navigation: "Room navigation",+ messageActions: "Message actions",+ quickAccess: "Quick access",+ messages: "Messages",+ hideChatList: "Hide Chat list",+ search: "Search",+ searchShortcut: "Search ({shortcut})",+ searchChats: "Search chats",+ noMessages: "No messages yet",+ deleted: "Deleted",+ deletedChat: "{name}, Deleted",+ unreadMentions: {+ one: "{count} unread mention",+ other: "{count} unread mentions",+ },+ unreadMessages: {+ one: "{count} unread message",+ other: "{count} unread messages",+ },+ pinned: "Pinned",+ pin: "Pin",+ unpin: "Unpin",+ pinChat: "Pin {name}",+ unpinChat: "Unpin {name}",+ moreActions: "More actions for {name}",+ delete: "Delete",+ anotherMeChat: "Another Me Chat",+ personalAgent: "Your personal agent",+ agentWorking: "Agent working",+ lastRunFailed: "Last run failed",+ createChat: "Create chat",+ createAgent: "Create Agent",+ createRoom: "Create Room",+ agentTemplates: "Agent templates",+ pocketNotes: "Pocket Notes",+ meetings: "Meetings",+ newMeeting: "New Meeting",+ returnToRecording: "Return to recording",+ startNewMeeting: "Start a new Meeting",+ viewSaveProgress: "View save progress",+ retryVoiceConnection: "Retry voice connection",+ voiceUnavailable: "Voice connection is unavailable. Click to retry.",+ meetingLoading: "Meeting is loading",+ finishVoiceInput: "Finish voice input first",+ recordingElsewhere: "Recording is active in another tab",+ recordingFailed: "Unable to open recording",+});diff --git a/apps/web/src/features/rooms/room-nav-actions.tsx b/apps/web/src/features/rooms/room-nav-actions.tsxindex 10a98601..2793fd58 100644--- a/apps/web/src/features/rooms/room-nav-actions.tsx+++ b/apps/web/src/features/rooms/room-nav-actions.tsx@@ -11,8 +11,10 @@ import type {TeamHubRoomListItem,TeamHubRoomPage,} from "@/features/teamhub/teamhub-types";+import { useT } from "@/i18n/use-translation";import { canDeleteTenantAgent } from "./members/agent-permissions";+import { roomListMessages } from "./room-list.messages";import {teamHubIdentityQueryOptions,tenantAgentsQueryOptions,@@ -82,13 +84,16 @@ export function RoomPinButton({onToggle: () => void;pinned: boolean;}) {- const label = `${pinned ? "Unpin" : "Pin"} ${name}`;+ const t = useT();return (<button- aria-label={label}+ aria-label={t(+ pinned ? roomListMessages.unpinChat : roomListMessages.pinChat,+ { name },+ )}className={roomNavActionClass}onClick={onToggle}- title={pinned ? "Unpin" : "Pin"}+ title={t(pinned ? roomListMessages.unpin : roomListMessages.pin)}type="button">{pinned ? (@@ -115,6 +120,7 @@ export function AgentRowMenu({tenantId: string;}) {const { client } = useTeamHubRuntime();+ const t = useT();const [deleting, setDeleting] = useState(false);const { data: identity } = useQuery(teamHubIdentityQueryOptions(client));const { data: agents } = useQuery({@@ -139,19 +145,20 @@ export function AgentRowMenu({) : (<Icon icon={PinIcon} size={14} />),- label: pinned ? "Unpin" : "Pin",+ label: t(pinned ? roomListMessages.unpin : roomListMessages.pin),onSelect: onTogglePin,},{danger: true,disabled: !canDelete,icon: <Icon icon={Delete02Icon} size={14} />,- label: "Delete",+ voiceRisk: "never",+ label: t(roomListMessages.delete),onSelect: () => setDeleting(true),separatorBefore: true,},]}- label={`More actions for ${name}`}+ label={t(roomListMessages.moreActions, { name })}placement="right-start"/>{deleting && agentId && registrationdiff --git a/apps/web/src/features/rooms/room-navigation.messages.ts b/apps/web/src/features/rooms/room-navigation.messages.tsnew file mode 100644index 00000000..9872ce52--- /dev/null+++ b/apps/web/src/features/rooms/room-navigation.messages.ts@@ -0,0 +1,21 @@+import { defineMessages } from "@/i18n/messages";++/** The rail and the shell around it. */+export const navigationMessages = defineMessages("navigation", {+ sidebar: "Collaboration sidebar",+ primary: "Primary navigation",+ space: "{name}'s space",+ collapseSidebar: "Collapse sidebar",+ expandSidebar: "Expand sidebar",+ showChatList: "Show Chat list",+ messages: "Messages",+ library: "Library",+ wiki: "Wiki",+ connectors: "Connectors",+ openNavigation: "Open Room navigation",+ closeNavigation: "Close Room navigation",+ resizeChatList: "Resize Chat navigation",+ loadingRooms: "Loading Rooms…",+ roomsUnavailable: "Rooms could not be loaded.",+ retryRooms: "Retry Rooms",+});diff --git a/apps/web/src/features/rooms/room-navigation.tsx b/apps/web/src/features/rooms/room-navigation.tsxindex 1be5a777..fa5720a2 100644--- a/apps/web/src/features/rooms/room-navigation.tsx+++ b/apps/web/src/features/rooms/room-navigation.tsx@@ -14,6 +14,7 @@ import { isDesktopShell, useDesktopListCollapsed } from "@/app/desktop-shell";import { BrandMark } from "@/components/ui/brand-mark";import { Icon, type IconSvgElement } from "@/components/ui/icon";import { useRoomListWidth } from "@/components/ui/use-sidebar-width";+import { useT } from "@/i18n/use-translation";import { documentQueryOptions } from "./room-queries";import { useTeamHubRuntime } from "@/features/teamhub/teamhub-runtime";import type {@@ -21,6 +22,7 @@ import type {TeamHubTenant,} from "@/features/teamhub/teamhub-types";+import { navigationMessages } from "./room-navigation.messages";import { useRoomActivity } from "./use-room-activity";const RoomSecondaryNavigation = lazy(async () => ({@@ -57,6 +59,8 @@ export function RoomNavigation({tenant: TeamHubTenant;}) {const location = useLocation();+ const t = useT();+ const spaceName = t(navigationMessages.space, { name: username });const [expanded, setExpanded] = useState(false);// Width also changes when the Room list is dragged wider; animating only while// the rail is toggling keeps the drag following the pointer with no lag.@@ -102,14 +106,16 @@ export function RoomNavigation({<>{mobileOpen ? (<button- aria-label="Close Room navigation"+ data-voice-close+ aria-label={t(navigationMessages.closeNavigation)}className="fixed inset-0 z-30 bg-(--app-overlay) backdrop-blur-sm md:hidden"onClick={onCloseMobile}type="button"/>) : null}<aside- aria-label="Collaboration sidebar"+ aria-label={t(navigationMessages.sidebar)}+ data-voice-area="sidebar"data-animating={railToggling || undefined}data-expanded={expanded}// The Library sidebar continues this rail as its secondary column,@@ -128,7 +134,8 @@ export function RoomNavigation({style={navigationWidth.style}><nav- aria-label="Primary navigation"+ aria-label={t(navigationMessages.primary)}+ data-voice-area="navigation"className="app-primary-navigation flex min-h-0 shrink-0 flex-col bg-card"><div className="primary-navigation-topbar">@@ -137,14 +144,18 @@ export function RoomNavigation({<BrandMark className="room-brand-mark size-6 shrink-0" /><spanclassName="min-w-0 flex-1 truncate text-center text-sm font-medium"- title={`${username}'s space`}+ title={spaceName}>- {username}'s space+ {spaceName}</span></>) : null}<button- aria-label={expanded ? "Collapse sidebar" : "Expand sidebar"}+ aria-label={t(+ expanded+ ? navigationMessages.collapseSidebar+ : navigationMessages.expandSidebar,+ )}aria-expanded={expanded}className="primary-navigation-toggle flex size-8 shrink-0 items-center justify-center rounded-full transition-colors hover:bg-sidebar-muted"onClick={() => {@@ -172,10 +183,10 @@ export function RoomNavigation({// The desktop app's Chat list folds away; this brings it back.<div className="primary-navigation-list-toggle"><button- aria-label="Show Chat list"+ aria-label={t(navigationMessages.showChatList)}className="primary-navigation-toggle flex shrink-0 items-center justify-center text-app-muted transition-colors hover:bg-app-hover hover:text-app-ink"onClick={() => setListCollapsed(false)}- title="Show Chat list"+ title={t(navigationMessages.showChatList)}type="button"><RoomRailGlyph icon={SidebarLeftIcon} />@@ -186,7 +197,7 @@ export function RoomNavigation({<RailLinkactive={roomNavigationVisible}icon={<RoomRailGlyph icon={Message01Icon} />}- label="Messages"+ label={t(navigationMessages.messages)}onNavigate={onCloseMobile}to={roomId@@ -197,21 +208,21 @@ export function RoomNavigation({<RailLinkactive={workspaceVisible}icon={<RoomRailGlyph icon={LibrariesIcon} />}- label="Library"+ label={t(navigationMessages.library)}onNavigate={onCloseMobile}to={`/t/${tenant.id}/library`}/><RailLinkactive={wikiVisible}icon={<RoomRailGlyph icon={BookOpen01Icon} />}- label="Wiki"+ label={t(navigationMessages.wiki)}onNavigate={onCloseMobile}to={`/t/${tenant.id}/library/wiki`}/><RailLinkactive={effectivePathname === `/t/${tenant.id}/apps`}icon={<RoomRailGlyph icon={Plug01Icon} />}- label="Connectors"+ label={t(navigationMessages.connectors)}onNavigate={onCloseMobile}to={`/t/${tenant.id}/apps`}/>@@ -243,7 +254,7 @@ export function RoomNavigation({{secondaryNavigationVisible ? (<div{...navigationWidth.handleProps}- aria-label="Resize Chat navigation"+ aria-label={t(navigationMessages.resizeChatList)}/>) : null}</aside>diff --git a/apps/web/src/features/rooms/room-secondary-navigation.tsx b/apps/web/src/features/rooms/room-secondary-navigation.tsxindex 15ab3a72..c7e34112 100644--- a/apps/web/src/features/rooms/room-secondary-navigation.tsx+++ b/apps/web/src/features/rooms/room-secondary-navigation.tsx@@ -25,6 +25,7 @@ import { Button } from "@/components/ui/button";import { Icon } from "@/components/ui/icon";import { searchShortcutLabel } from "@/features/search/search-shortcut";import { markdownPlainText } from "@/features/teamhub/markdown-plain-text";+import { useT } from "@/i18n/use-translation";import { AgentCreateMenu } from "./agent-create-menu";import type {@@ -41,6 +42,8 @@ import {import { RoomAvatar } from "./members/room-avatar";import { PocketNoteLauncher } from "./pocket-notes/pocket-note-launcher";import { RecordingEntry } from "./voice-control/recording-entry";+import { roomListMessages } from "./room-list.messages";+import { navigationMessages } from "./room-navigation.messages";import { useNavReorderFlip } from "./use-nav-reorder-flip";import {@@ -113,6 +116,10 @@ export function RoomSecondaryNavigation({tenant: TeamHubTenant;}) {usePrefetchTemplateFlow();+ const t = useT();+ const searchTitle = t(roomListMessages.searchShortcut, {+ shortcut: searchShortcutLabel(),+ });const [localAgentOpen, setLocalAgentOpen] = useState(false);const [templateAgentOpen, setTemplateAgentOpen] = useState(false);const runningRooms = new Set(runningRoomIds);@@ -180,35 +187,36 @@ export function RoomSecondaryNavigation({const searchButton = (<buttonaria-keyshortcuts="Control+k Meta+k"- aria-label="Search"+ aria-label={t(roomListMessages.search)}className="room-secondary-navigation-search flex h-7 w-full min-w-0 shrink items-center justify-between gap-1.5 rounded-lg bg-card px-2.5 text-xs text-muted-foreground shadow-outline transition-colors duration-150 hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring max-md:h-11"onClick={() => {onOpenSearch?.();onCloseMobile();}}- title={`Search (${searchShortcutLabel()})`}+ title={searchTitle}type="button">- <span className="truncate">Search chats</span>+ <span className="truncate">{t(roomListMessages.searchChats)}</span><Icon className="shrink-0" icon={Search01Icon} size={14} /></button>);return (<nav- aria-label="Room navigation"+ aria-label={t(roomListMessages.navigation)}+ data-voice-area="sidebar"className="app-secondary-navigation relative flex w-[var(--sidebar-width)] min-w-0 flex-col bg-card">{onCollapse ? (// Shares the 57px height of the chat header so both titles sit on// one line; a hairline fades in under it once the list scrolls.<header- aria-label="Message actions"+ aria-label={t(roomListMessages.messageActions)}className="app-secondary-navigation-header room-secondary-navigation-header relative z-40 flex h-(--app-header-height) shrink-0 items-center justify-between gap-2 pl-px pr-4"role="toolbar"><span className="room-secondary-navigation-title truncate">- Messages+ {t(roomListMessages.messages)}</span><div className="flex items-center gap-0.5"><PocketNoteLauncher@@ -221,10 +229,11 @@ export function RoomSecondaryNavigation({/></div><button- aria-label="Hide Chat list"+ data-voice-close+ aria-label={t(roomListMessages.hideChatList)}className="room-secondary-navigation-collapse flex size-7 shrink-0 items-center justify-center rounded-md text-app-muted transition-colors hover:bg-app-hover hover:text-app-ink"onClick={onCollapse}- title="Hide Chat list"+ title={t(roomListMessages.hideChatList)}type="button"><Icon icon={SidebarLeftIcon} />@@ -233,7 +242,7 @@ export function RoomSecondaryNavigation({) : (<divclassName="xs-nav-quick flex shrink-0 items-center gap-1.5 pl-0 pr-1.5 pt-3"- aria-label="Quick access"+ aria-label={t(roomListMessages.quickAccess)}><PocketNoteLauncheranotherMeRoomId={anotherMeRoomId}@@ -245,8 +254,8 @@ export function RoomSecondaryNavigation({/><buttonaria-keyshortcuts="Control+k Meta+k"- aria-label="Search"- title={`Search (${searchShortcutLabel()})`}+ aria-label={t(roomListMessages.search)}+ title={searchTitle}className="xs-nav-search"onClick={() => {onOpenSearch?.();@@ -262,7 +271,8 @@ export function RoomSecondaryNavigation({<div className="room-nav-controls pr-2 md:hidden"><div className="mt-1 flex items-center justify-end"><Button- aria-label="Close Room navigation"+ data-voice-close+ aria-label={t(navigationMessages.closeNavigation)}className="md:hidden"onClick={onCloseMobile}size="icon"@@ -326,7 +336,7 @@ export function RoomSecondaryNavigation({}}/>}- title="Messages"+ title={t(roomListMessages.messages)}>{visibleChats.map((room) => {if (room.kind === "room")@@ -361,7 +371,8 @@ export function RoomSecondaryNavigation({? markdownPlainText(room.latest_message.raw_message,)- : (room.description ?? "No messages yet")}+ : (room.description ??+ t(roomListMessages.noMessages))}</span></span><RoomRowStatus@@ -500,12 +511,13 @@ function RoomRowTitle({children: ReactNode;pinned: boolean;}) {+ const t = useT();return (<span className="flex min-w-0 items-center gap-1 text-sm leading-[18px] font-medium text-foreground"><span className="min-w-0 truncate">{children}</span>{pinned ? (<span- aria-label="Pinned"+ aria-label={t(roomListMessages.pinned)}className="room-pin-badge town-pill-pop ml-0.5 flex shrink-0 text-muted-foreground"role="img">@@ -534,11 +546,16 @@ function DirectRoomLink({const peer = room.direct_peer!;const displayName = peer.display_name;const inactive = room.direct_peer_active === false;+ const t = useT();const [hovered, setHovered] = useState(false);return (<Linkaria-current={active ? "page" : undefined}- aria-label={`${displayName}${inactive ? ", Deleted" : ""}`}+ aria-label={+ inactive+ ? t(roomListMessages.deletedChat, { name: displayName })+ : displayName+ }className={roomNavClass()}onClick={onNavigate}onPointerEnter={(event) => {@@ -560,10 +577,10 @@ function DirectRoomLink({</RoomRowTitle><span className="mt-0.5 block truncate text-xs leading-4 text-muted-foreground">{inactive- ? "Deleted"+ ? t(roomListMessages.deleted): room.latest_message? markdownPlainText(room.latest_message.raw_message)- : "No messages yet"}+ : t(roomListMessages.noMessages)}</span></span><RoomRowStatus failed={failed} room={room} working={working} />@@ -572,6 +589,7 @@ function DirectRoomLink({}function RoomAttentionBadge({ room }: { room: TeamHubRoomListItem }) {+ const t = useT();if (room.unread_message_count === 0 && room.unread_mention_count === 0) {return null;}@@ -580,9 +598,12 @@ function RoomAttentionBadge({ room }: { room: TeamHubRoomListItem }) {const count = mentions? room.unread_mention_count: room.unread_message_count;- const label = mentions- ? `${count} unread mention${count === 1 ? "" : "s"}`- : `${count} unread message${count === 1 ? "" : "s"}`;+ const label = t(+ mentions+ ? roomListMessages.unreadMentions+ : roomListMessages.unreadMessages,+ { count },+ );return (<span@@ -616,6 +637,7 @@ function AnotherMeCard({tenantId: string;working: boolean;}) {+ const t = useT();const name = room.direct_peer?.display_name ?? "Another Me";const agentRecord = useAgentAvatarRecord(room.direct_peer?.id);const brand = agentAvatarAppearance(@@ -698,7 +720,7 @@ function AnotherMeCard({><Linkaria-current={active ? "page" : undefined}- aria-label="Another Me Chat"+ aria-label={t(roomListMessages.anotherMeChat)}className="workspace-nav-row another-me-card-link flex text-app-ink"onClick={onNavigate}to={`/t/${tenantId}/rooms/${room.id}/chat`}@@ -719,7 +741,7 @@ function AnotherMeCard({<span className="another-me-card-sub mt-0.5 block truncate text-xs leading-4 text-app-muted">{room.latest_message? markdownPlainText(room.latest_message.raw_message)- : "Your personal agent"}+ : t(roomListMessages.personalAgent)}</span></span><RoomRowStatus failed={failed} room={room} working={working} />@@ -737,6 +759,7 @@ function RoomRowStatus({room: TeamHubRoomListItem;working: boolean;}) {+ const t = useT();useRoomRenderTiming("room_list", {roomId: room.id,result: working ? "working" : "stopped",@@ -747,13 +770,13 @@ function RoomRowStatus({<span className="flex size-4 shrink-0 items-center justify-center">{working ? (<svg- aria-label="Agent working"+ aria-label={t(roomListMessages.agentWorking)}className="size-3.5 animate-spin text-app-muted motion-reduce:animate-none"fill="none"role="img"viewBox="0 0 16 16">- <title>Agent working</title>+ <title>{t(roomListMessages.agentWorking)}</title><circlecx="8"cy="8"@@ -771,7 +794,7 @@ function RoomRowStatus({</svg>) : failed ? (<span- aria-label="Last run failed"+ aria-label={t(roomListMessages.lastRunFailed)}className="flex text-app-danger"role="img">diff --git a/apps/web/src/features/rooms/room-shell.tsx b/apps/web/src/features/rooms/room-shell.tsxindex dc886b05..d032af57 100644--- a/apps/web/src/features/rooms/room-shell.tsx+++ b/apps/web/src/features/rooms/room-shell.tsx@@ -25,6 +25,7 @@ import { LOGOUT_ERROR_MESSAGE, useLogout } from "@/features/auth/use-logout";import { Button } from "@/components/ui/button";import { useGlobalSearchShortcut } from "@/features/search/search-shortcut";import { useTeamHubRuntime } from "@/features/teamhub/teamhub-runtime";+import { useT } from "@/i18n/use-translation";import type {TeamHubCurrentIdentity,TeamHubRoomListItem,@@ -45,6 +46,7 @@ import {} from "./chat/voice-mode/voice-mode-session";import { registerVoiceShell } from "./chat/voice-mode/voice-ui-bridge";import { RoomNavigation } from "./room-navigation";+import { navigationMessages } from "./room-navigation.messages";import {AuthenticatedRouteLoading,RoomNavigationLoading,@@ -97,6 +99,7 @@ function RoomShellReady({tenantId: string;}) {const { client } = useTeamHubRuntime();+ const t = useT();const roomsQuery = useQuery(tenantRoomsQueryOptions(client, tenantId));const { data: identity } = useSuspenseQuery(teamHubIdentityQueryOptions(client),@@ -146,8 +149,8 @@ function RoomShellReady({}, []);useEffect(() => {- document.title = `${spaceOwnerName}'s space`;- }, [spaceOwnerName]);+ document.title = t(navigationMessages.space, { name: spaceOwnerName });+ }, [spaceOwnerName, t]);const rooms = roomsQuery.data;return (@@ -177,15 +180,15 @@ function RoomShellReady({navigationPending ? (<><span className="sr-only" role="status">- Loading Rooms…+ {t(navigationMessages.loadingRooms)}</span><RoomNavigationLoading /></>) : roomsQuery.isError ? (<div role="alert">- Rooms could not be loaded.{" "}+ {t(navigationMessages.roomsUnavailable)}{" "}<Button onClick={() => void roomsQuery.refetch()}>- Retry Rooms+ {t(navigationMessages.retryRooms)}</Button></div>) : undefined@@ -270,6 +273,7 @@ function RoomShellContent({const { client } = useTeamHubRuntime();const location = useLocation();const navigate = useNavigate();+ const t = useT();useScrollPaneActivity();const newRoomId =typeof location.state?.newRoomId === "string" &&@@ -375,7 +379,9 @@ function RoomShellContent({<div className="flex h-(--app-header-height) shrink-0 items-center gap-3 border-b border-border/60 bg-app-sidebar px-3 md:hidden"><MobileNavigationButton /><span className="truncate text-sm font-medium">- {spaceOwnerNameFor(identity, tenantId)}'s space+ {t(navigationMessages.space, {+ name: spaceOwnerNameFor(identity, tenantId),+ })}</span></div>)}diff --git a/apps/web/src/features/rooms/voice-control/recording-entry.tsx b/apps/web/src/features/rooms/voice-control/recording-entry.tsxindex fc0b8ac4..96167bb8 100644--- a/apps/web/src/features/rooms/voice-control/recording-entry.tsx+++ b/apps/web/src/features/rooms/voice-control/recording-entry.tsx@@ -4,7 +4,9 @@ import {} from "@hugeicons/core-free-icons";import { use, useEffect, useEffectEvent, useRef, useState } from "react";import { Icon } from "@/components/ui/icon";+import { useT } from "@/i18n/use-translation";+import { roomListMessages } from "../room-list.messages";import { useOptionalVoiceModeSession } from "../chat/voice-mode/voice-mode-session";import { LazyVoiceKeyDialog } from "./lazy-voice-key-dialog";import { openRecordingWindow } from "./recording-window-store";@@ -27,6 +29,7 @@ export function RecordingEntry({anotherMeRoomId?: string;tenantId: string;}) {+ const t = useT();const livekit = useOptionalVoiceControl();const voice = livekit;const voiceMode = useOptionalVoiceModeSession();@@ -51,27 +54,29 @@ export function RecordingEntry({const standby = voice?.listenerStatus === "standby";// Until voice connects, including while it reconnects, the icon spins.const connecting = !voice && !connectionFailed && !needsKey;- const label = recording- ? "Return to recording"- : saving && switchFromLive- ? "Start a new Meeting"- : saving- ? "View save progress"- : connectionFailed- ? "Retry voice connection"- : "Meetings";+ const label = t(+ recording+ ? roomListMessages.returnToRecording+ : saving && switchFromLive+ ? roomListMessages.startNewMeeting+ : saving+ ? roomListMessages.viewSaveProgress+ : connectionFailed+ ? roomListMessages.retryVoiceConnection+ : roomListMessages.meetings,+ );const hint =error ??(connectionFailed- ? "Voice connection is unavailable. Click to retry."+ ? t(roomListMessages.voiceUnavailable): needsKey? label: !voice || !anotherMeRoomId- ? "Meeting is loading"+ ? t(roomListMessages.meetingLoading): voiceInputBusy- ? "Finish voice input first"+ ? t(roomListMessages.finishVoiceInput): standby- ? "Recording is active in another tab"+ ? t(roomListMessages.recordingElsewhere): label);function start() {if (retryConnection) {@@ -110,7 +115,9 @@ export function RecordingEntry({void (voiceMode ? voiceMode.startMeeting(startRecording) : startRecording()).catch((cause: unknown) => {setError(- cause instanceof Error ? cause.message : "Unable to open recording",+ cause instanceof Error+ ? cause.message+ : t(roomListMessages.recordingFailed),);}).finally(() => setPending(false));@@ -150,7 +157,11 @@ export function RecordingEntry({<Icon icon={AiTranscribeAudioIcon} size={16} />)}<span className="xs-nav-btn-label">- {saving && switchFromLive ? "New Meeting" : "Meetings"}+ {t(+ saving && switchFromLive+ ? roomListMessages.newMeeting+ : roomListMessages.meetings,+ )}</span>{recording || connectionFailed ? (<spandiff --git a/apps/web/src/i18n/locales/zh-CN.json b/apps/web/src/i18n/locales/zh-CN.jsonindex f1a64b51..3b9c2d94 100644--- a/apps/web/src/i18n/locales/zh-CN.json+++ b/apps/web/src/i18n/locales/zh-CN.json@@ -22,5 +22,187 @@"interfaceLanguage": "界面语言","interfaceLanguageHint": "仅保存在这台设备上。Agent 和其他人写的内容保持原样,不会被翻译。","languageUnavailable": "无法加载这种语言,请检查网络后重试。"+ },+ "navigation": {+ "sidebar": "协作侧边栏",+ "primary": "主导航",+ "space": "{name} 的空间",+ "collapseSidebar": "收起侧边栏",+ "expandSidebar": "展开侧边栏",+ "showChatList": "显示对话列表",+ "messages": "消息",+ "library": "资料库",+ "wiki": "Wiki",+ "connectors": "连接器",+ "openNavigation": "打开 Room 导航",+ "closeNavigation": "关闭 Room 导航",+ "resizeChatList": "调整对话列表宽度",+ "loadingRooms": "正在加载 Room…",+ "roomsUnavailable": "Room 列表加载失败。",+ "retryRooms": "重新加载"+ },+ "roomList": {+ "navigation": "Room 导航",+ "messageActions": "消息操作",+ "quickAccess": "快捷入口",+ "messages": "消息",+ "hideChatList": "隐藏对话列表",+ "search": "搜索",+ "searchShortcut": "搜索({shortcut})",+ "searchChats": "搜索对话",+ "noMessages": "暂无消息",+ "deleted": "已删除",+ "deletedChat": "{name},已删除",+ "unreadMentions": { "other": "{count} 条未读提及" },+ "unreadMessages": { "other": "{count} 条未读消息" },+ "pinned": "已置顶",+ "pin": "置顶",+ "unpin": "取消置顶",+ "pinChat": "置顶 {name}",+ "unpinChat": "取消置顶 {name}",+ "moreActions": "{name} 的更多操作",+ "delete": "删除",+ "anotherMeChat": "Another Me 对话",+ "personalAgent": "你的专属 Agent",+ "agentWorking": "Agent 正在工作",+ "lastRunFailed": "上次运行失败",+ "createChat": "新建对话",+ "createAgent": "新建 Agent",+ "createRoom": "新建 Room",+ "agentTemplates": "Agent 模板",+ "pocketNotes": "随手记",+ "meetings": "会议",+ "newMeeting": "新会议",+ "returnToRecording": "返回录音",+ "startNewMeeting": "开始新会议",+ "viewSaveProgress": "查看保存进度",+ "retryVoiceConnection": "重试语音连接",+ "voiceUnavailable": "语音连接不可用,点击重试。",+ "meetingLoading": "会议正在加载",+ "finishVoiceInput": "请先完成语音输入",+ "recordingElsewhere": "另一个标签页正在录音",+ "recordingFailed": "无法打开录音"+ },+ "accountMenu": {+ "label": "账号菜单",+ "settings": "设置",+ "logOut": "退出登录",+ "loggingOut": "正在退出…",+ "version": "版本 {version}",+ "checking": "正在检查更新…",+ "downloading": "正在下载 Linger {version}…",+ "ready": "Linger {version} 已可安装",+ "restartToUpdate": "重启并更新",+ "waiting": "任务完成后将更新到 {version}",+ "installing": "正在更新到 {version}…",+ "available": "Linger {version} 可以更新了",+ "downloadUpdate": "下载更新",+ "failed": "更新失败:{error}",+ "tryAgain": "重试"+ },+ "createAgent": {+ "title": "新建本地 Agent",+ "connectDescription": "先连接一台电脑,再选择 Runtime 和模型。",+ "chooseDescription": "为你的 Agent 选择电脑、Runtime 和模型。",+ "back": "返回",+ "cancel": "取消",+ "useThisComputer": "使用这台电脑",+ "create": "创建",+ "computersUnavailable": "本地电脑暂不可用。",+ "retry": "重试",+ "backToComputers": "返回电脑选择",+ "connected": "已连接:{name}",+ "authorizeWorkspace": "请先在这台电脑上授权工作区访问,再继续。",+ "computer": "本地电脑",+ "connectNewComputer": "连接新电脑",+ "selectComputer": "选择一台本地电脑",+ "offlineComputer": "{name} · 离线",+ "offlineComputerHint": "这台电脑处于离线状态,连接后 Agent 就会开始工作。",+ "runtime": "Runtime",+ "noRuntimes": "没有可用的 Runtime",+ "model": "模型",+ "noModels": "没有可用的模型",+ "manageModels": "可以在<link>设置 › 模型</link>中管理已下载的模型。",+ "downloadModel": "请先在<link>设置 › 模型</link>中下载并加载一个本地模型,才能在这台电脑上用 Pi 运行 Agent。",+ "noRuntimeModels": "这个 Runtime 上没有可用的模型,请检查它的状态和工作区访问权限。",+ "thinkingEffort": "思考强度",+ "effortNotSupported": "不支持",+ "effortNone": "无",+ "effortLow": "低",+ "effortMedium": "中",+ "effortHigh": "高",+ "effortExtraHigh": "超高",+ "effortMaximum": "最高",+ "effortUltra": "极限",+ "progressLabel": "Agent 创建进度",+ "stepConnect": "连接电脑",+ "stepCreate": "创建 Agent",+ "stepOpen": "打开对话",+ "stepComplete": ":已完成",+ "stepInProgress": ":进行中",+ "stepWaiting": ":等待中",+ "preparingTitle": "正在查找你的电脑",+ "preparingDescription": "正在查找一台已连接的电脑。",+ "creatingTitle": "正在唤醒你的 Agent",+ "creatingDescription": "正在为你们的第一次对话做好准备。",+ "openingTitle": "你的 Agent 已就绪",+ "openingDescription": "正在打开对话,打个招呼吧!",+ "accountUnconfirmed": "无法确认你的账号,请重试。",+ "creationFailed": "Agent 创建失败。",+ "notCreatedTitle": "未能创建 Agent",+ "agentUnavailable": "这个 Agent 已不可用。",+ "chatNotOpened": "未能打开对话",+ "setupNeedsAttention": "Agent 设置需要处理"+ },+ "computerSetup": {+ "label": "连接本地电脑",+ "title": "连接电脑",+ "runInPowerShell": "在要连接的电脑上,用 PowerShell 运行以下命令。",+ "runInTerminal": "在要连接的电脑上,用终端运行以下命令。",+ "installCli": "安装 CLI",+ "connectComputer": "连接电脑",+ "connectedTitle": "电脑已连接",+ "waitingNewTitle": "正在等待新电脑",+ "waitingTitle": "正在等待你的电脑",+ "connectedStatus": "电脑已在线。运行任务前,请先检查它的 Runtime 状态。",+ "checkingNew": "正在查找新的本地电脑…",+ "checkingOnline": "正在查找在线的本地电脑…",+ "operatingSystem": "电脑操作系统",+ "chooseOperatingSystem": "选择操作系统",+ "copyCommand": "复制命令",+ "commandCopied": "命令已复制",+ "commandSelected": "命令已选中",+ "copied": "已复制",+ "copiedToClipboard": "已复制到剪贴板",+ "selectedToCopy": "命令已选中,按 Cmd+C 或 Ctrl+C 复制。",+ "copyUnavailable": "当前连接下无法复制。",+ "serverSummary": "连接服务器 · 这台电脑上没有浏览器?",+ "serverIntro": "先按第 1 步安装 CLI,再用临时令牌代替浏览器登录。服务器只需要能向外发起连接。",+ "serverName": "服务器名称",+ "serverNamePlaceholder": "我的服务器",+ "generating": "正在生成…",+ "generateToken": "生成连接令牌",+ "tokenFailed": "无法生成令牌,请检查网络后重试。",+ "tokenInstructions": "在服务器上运行这条命令,在提示处粘贴令牌,然后按 Enter。令牌将在 {time} 过期,请勿外传。",+ "tokenLabel": "服务器连接令牌",+ "waitingForServer": "正在等待服务器连接。如果过程中断,请在令牌过期前用同一个令牌重试。",+ "generateAnother": "重新生成令牌",+ "signInRequired": "需要登录 {app}",+ "signInGuidance": "请在 {computer} 上运行 <code>{command}</code>,或更新已配置的 {app} 凭据。操作时请使用运行 Local Computer 的那个系统用户。",+ "piSignIn": "在 Pi 中输入 /login 登录,或在 Pi 的 auth.json 中配置 API key。",+ "antigravitySignIn": "Antigravity 也可以使用 Gemini API key:为 Local Computer 设置 GEMINI_API_KEY 即可。",+ "installRuntime": "请以运行 Local Computer 的系统用户身份,在 {computer} 上安装一个 Runtime。安装后一分钟内会显示在这里。",+ "installRuntimePowerShell": "请以运行 Local Computer 的系统用户身份,在 {computer} 上用 PowerShell 安装一个 Runtime。安装后一分钟内会显示在这里。",+ "runtimeCommand": "{app}:<code>{command}</code>",+ "npmNeedsNode": "npm 命令需要先安装 Node.js。",+ "desktopConnectIntro": "连接这台电脑,就能用它上面安装的 Codex 或 Claude Code 运行 Agent。",+ "connecting": "正在连接…",+ "connectThisComputer": "连接这台电脑",+ "lookingForApps": "正在这台电脑上查找 Codex 和 Claude Code…",+ "desktopAuthFailed": "这台电脑的登录已过期。请在 Linger 的菜单栏菜单中选择 Reconnect This Computer。",+ "desktopIdentityConflict": "这台电脑已登记在另一个电脑条目下。请在 Linger 的菜单栏菜单中选择 Reconnect This Computer。",+ "desktopUpgradeRequired": "请先更新 Linger 应用,再连接这台电脑。",+ "desktopDisconnected": "Linger 后台服务没有运行,请退出并重新打开应用。",+ "desktopRuntimeCrashed": "本地 Runtime 已停止,无法检查 Codex 和 Claude Code。Linger 正在重启它。"}}diff --git a/apps/web/src/i18n/use-translation.test.tsx b/apps/web/src/i18n/use-translation.test.tsxindex d7f5b1b8..0948fdf9 100644--- a/apps/web/src/i18n/use-translation.test.tsx+++ b/apps/web/src/i18n/use-translation.test.tsx@@ -1,6 +1,7 @@import { act, render, screen } from "@testing-library/react";import { describe, expect, it } from "vitest";+import { LocalRuntimeAuthenticationGuidance } from "@/features/local-computer/local-runtime-authentication-guidance";import { settingsMessages } from "@/features/settings/settings.messages";import { setLanguage } from "./language";@@ -21,4 +22,29 @@ describe("translated components", () => {await act(() => setLanguage("en"));expect(screen.getByRole("heading")).toHaveTextContent("Settings");});++ it("keep the elements of a sentence where the translation puts them", async () => {+ render(+ <LocalRuntimeAuthenticationGuidance+ computerName="<code>Studio</code>"+ runtimeType="codex"+ />,+ );+ expect(screen.getByText(/^Run/)).toHaveTextContent(+ "Run codex login or update the configured Codex credentials on <code>Studio</code>,",+ );+ const command = () =>+ [...document.querySelectorAll("code")].map((code) => code.textContent);+ // The Computer's name is text even when it looks like markup.+ expect(command()).toEqual(["codex login"]);++ await act(() => setLanguage("zh-CN"));+ expect(command()).toEqual(["codex login"]);+ const sentence = document.querySelector("code")!.parentElement!;+ const [before, after] = zhCN.computerSetup.signInGuidance+ .replace("{computer}", "<code>Studio</code>")+ .replace("{app}", "Codex")+ .split("<code>{command}</code>");+ expect(sentence.textContent).toBe(`${before}codex login${after}`);+ });});