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 Agent template dialogs
Kilyn0a8ad1db3a48
diff --git a/apps/web/src/features/rooms/agent-templates/agent-template-contents.tsx b/apps/web/src/features/rooms/agent-templates/agent-template-contents.tsxindex 2e906f08..d140ef5b 100644--- a/apps/web/src/features/rooms/agent-templates/agent-template-contents.tsx+++ b/apps/web/src/features/rooms/agent-templates/agent-template-contents.tsx@@ -12,6 +12,9 @@ import { cadenceLabel } from "../task-sidebar/routine-cadence";import { useOptionalTeamHubRuntime } from "@/features/teamhub/teamhub-runtime";import { externalAppsQueryOptions } from "@/features/apps/connected-apps-queries";+import { useT } from "@/i18n/use-translation";++import { agentTemplateMessages as m } from "./agent-templates.messages";/** One named thing a template carries, with the detail that makes it concrete. */export interface TemplateContentItem {@@ -38,6 +41,7 @@ export function useTemplateContentGroups(template: {skill_bindings: readonly { name: string; skill_id: string }[];}): TemplateContentGroups {const client = useOptionalTeamHubRuntime()?.client;+ const t = useT();const connectorKeys = template.connector_bindings ?? [];const apps = useQuery({...externalAppsQueryOptions(client!),@@ -48,7 +52,7 @@ export function useTemplateContentGroups(template: {);return {connectors: connectorKeys.map((key) => ({- detail: "Needs your authorization",+ detail: t(m.needsAuthorization),key,name: appsByKey.get(key)?.display_name ?? key,})),@@ -81,12 +85,13 @@ export function TemplateContents({enabled: boolean;}[];}) {+ const t = useT();const sections = [{icon: BookOpen01Icon,items: groups.skills,- label: "Skills",- title: "Playbooks it can run",+ label: t(m.skills),+ title: t(m.skillsTitle),},{icon: AlarmClockIcon,@@ -94,18 +99,21 @@ export function TemplateContents({key: routine.key ?? routine.id ?? routine.name,name: routine.name,instruction: routine.instruction,- detail: `${routine.enabled ? "Enabled" : "Paused"} · ${cadenceLabel(routine.cadence)} · ${routine.cadence.timezone}`,+ detail: t(routine.enabled ? m.routineEnabled : m.routinePaused, {+ cadence: cadenceLabel(routine.cadence),+ timezone: routine.cadence.timezone,+ }),})),- label: "Routines",- title: "Jobs that run on their own",- note: "All routines are added automatically to the new Agent’s direct chat. Their enabled or paused state is preserved.",+ label: t(m.routines),+ title: t(m.routinesTitle),+ note: t(m.routinesNote),},{icon: Plug01Icon,items: groups.connectors,- label: "Connectors",+ label: t(m.connectors),note: connectorNote,- title: "Accounts it expects",+ title: t(m.connectorsTitle),},].filter((section) => section.items.length > 0);@@ -114,8 +122,11 @@ export function TemplateContents({return (<div className="space-y-3">{instructions ? (- <section aria-label="Instructions">- <SectionHeading label="Instructions" title="How it works" />+ <section aria-label={t(m.instructions)}>+ <SectionHeading+ label={t(m.instructions)}+ title={t(m.instructionsTitle)}+ /><p className="mt-1.5 max-h-40 overflow-y-auto whitespace-pre-wrap break-words rounded-lg border border-border bg-muted/40 p-3 text-sm leading-5 text-app-body [overflow-wrap:anywhere]">{instructions}</p>diff --git a/apps/web/src/features/rooms/agent-templates/agent-template.ts b/apps/web/src/features/rooms/agent-templates/agent-template.tsindex 2bac47ef..bd25016b 100644--- a/apps/web/src/features/rooms/agent-templates/agent-template.ts+++ b/apps/web/src/features/rooms/agent-templates/agent-template.ts@@ -3,9 +3,12 @@ import type {TeamHubAgentTemplatePublishInput,TeamHubTenantAgent,} from "@/features/teamhub/teamhub-types";+import { type Translate, translate } from "@/i18n/language";import type { AgentAvatarKey } from "../members/agent-avatar";+import { agentTemplateMessages as m } from "./agent-templates.messages";+/*** The portable part of an Agent: identity text, instructions, and the Skill* and Connector selections. Runtime provider, model, reasoning effort, and@@ -55,21 +58,25 @@ export type TemplateResourceCounts = Pick<* kinds it has rather than one string that has to be read apart. Kinds the* template does not carry are left out entirely.*/-export function templateResourceChips(template: TemplateResourceCounts) {+export function templateResourceChips(+ template: TemplateResourceCounts,+ t: Translate = translate,+) {+ const skills = template.skill_bindings.length;+ const routines = template.routines?.length ?? 0;+ const connectors = template.connector_bindings?.length ?? 0;return [- countLabel(template.skill_bindings.length, "Skill"),- countLabel(template.routines?.length ?? 0, "Routine"),- countLabel(template.connector_bindings?.length ?? 0, "Connector"),+ skills ? t(m.skillCount, { count: skills }) : "",+ routines ? t(m.routineCount, { count: routines }) : "",+ connectors ? t(m.connectorCount, { count: connectors }) : "",].filter((part) => part !== "");}/** Single-line summary, for places that have room for only one string. */-export function templateResourceSummary(template: TemplateResourceCounts) {- const parts = templateResourceChips(template);- return parts.length ? parts.join(" · ") : "Instructions only";-}--export function countLabel(total: number, noun: string) {- if (total === 0) return "";- return `${total} ${noun}${total === 1 ? "" : "s"}`;+export function templateResourceSummary(+ template: TemplateResourceCounts,+ t: Translate = translate,+) {+ const parts = templateResourceChips(template, t);+ return parts.length ? parts.join(" · ") : t(m.instructionsOnly);}diff --git a/apps/web/src/features/rooms/agent-templates/agent-templates.messages.ts b/apps/web/src/features/rooms/agent-templates/agent-templates.messages.tsnew file mode 100644index 00000000..50e91998--- /dev/null+++ b/apps/web/src/features/rooms/agent-templates/agent-templates.messages.ts@@ -0,0 +1,67 @@+import { defineMessages } from "@/i18n/messages";++/** The Agent templates dialog, what a template contains, and publishing one. */+export const agentTemplateMessages = defineMessages("agentTemplates", {+ title: "Agent templates",+ closeDialog: "Close Agent templates",+ pickerDescription: "Pick a template, then choose where the Agent runs.",+ loadingTemplates: "Loading templates",+ officialTitle: "Official templates",+ officialEmpty: "This deployment ships no official template.",+ publishedTitle: "Templates from users",+ publishedEmpty: "Nothing published yet. Publish an Agent to share it here.",+ unavailable: "Agent templates are unavailable.",+ publishedBy: "by {name}",+ removeQuestion: "Remove this template?",+ removeNote: "Agents already created from it are not affected.",+ removing: "Removing...",+ removeFromMarketplace: "Remove {name} from the marketplace",+ creationUnavailable: "Agent creation is unavailable.",+ backToTemplates: "Back to templates",+ chooseWhere: "Choose where this Agent runs.",+ name: "Name",+ model: "Model",+ modelLabel: "Agent model",+ reasoning: "Reasoning",+ reasoningLabel: "Agent reasoning effort",+ creating: "Creating...",+ createAgent: "Create Agent",+ checkingSkills: "Checking template Skills...",+ skillsCheckFailed: "Template Skills couldn't be checked.",+ skillAdded: "Added to your Skills",+ skillUnavailable: "Not available here",+ connectorNote:+ "Not granted by creating the Agent. Authorize your own accounts from Connectors afterwards.",+ nothingAvailable: "No template Skills or Connectors are available here.",+ usedAlongside:+ "These are used alongside the Skills already on this Computer.",+ needsAuthorization: "Needs your authorization",+ skills: "Skills",+ skillsTitle: "Playbooks it can run",+ routines: "Routines",+ routinesTitle: "Jobs that run on their own",+ routinesNote:+ "All routines are added automatically to the new Agent’s direct chat. Their enabled or paused state is preserved.",+ routineEnabled: "Enabled · {cadence} · {timezone}",+ routinePaused: "Paused · {cadence} · {timezone}",+ connectors: "Connectors",+ connectorsTitle: "Accounts it expects",+ instructions: "Instructions",+ instructionsTitle: "How it works",+ skillCount: { one: "{count} Skill", other: "{count} Skills" },+ routineCount: { one: "{count} Routine", other: "{count} Routines" },+ connectorCount: { one: "{count} Connector", other: "{count} Connectors" },+ instructionsOnly: "Instructions only",+ publishTitle: "Publish as template",+ publishDescription:+ "Everyone in this deployment will be able to create Agents from it.",+ publish: "Publish",+ templateName: "Template name",+ sharedWithOthers: "Shared with others",+ checkingAgent: "Checking this Agent's Routines and Connectors...",+ publishConnectorNote:+ "Only Connector names are shared. Your connected accounts and credentials stay private, and whoever uses this template authorizes their own.",+ staysPrivate:+ "Runtime, model, and Local Computer stay private to this Agent. You can remove the template later.",+ routinesLoadFailed: "Routines could not be loaded.",+});diff --git a/apps/web/src/features/rooms/agent-templates/create-agent-from-template-dialog.tsx b/apps/web/src/features/rooms/agent-templates/create-agent-from-template-dialog.tsxindex 74590b7d..18fb90e4 100644--- a/apps/web/src/features/rooms/agent-templates/create-agent-from-template-dialog.tsx+++ b/apps/web/src/features/rooms/agent-templates/create-agent-from-template-dialog.tsx@@ -24,6 +24,8 @@ import type {TeamHubAgentReasoningEffort,TeamHubAgentTemplate,} from "@/features/teamhub/teamhub-types";+import { commonMessages } from "@/i18n/common.messages";+import { useT } from "@/i18n/use-translation";import { ActorAvatar } from "../members/actor-avatar";import {@@ -41,6 +43,7 @@ import { createTenantAgent } from "../members/create-tenant-agent";import { useAgentPlacementFlow } from "../members/use-agent-placement-flow";import { templateResourceChips } from "./agent-template";+import { agentTemplateMessages as m } from "./agent-templates.messages";import {TemplateContents,useTemplateContentGroups,@@ -55,7 +58,6 @@ import {withImportedTemplateSkills,} from "./resolve-agent-template-bindings";-const TITLE = "Agent templates";const NO_BINDINGS: ResolvedAgentTemplateBindings = {importableSkills: [],skillBindings: [],@@ -73,10 +75,11 @@ export function CreateAgentFromTemplateDialog({}) {const [template, setTemplate] = useState<TeamHubAgentTemplate | null>(null);const { client } = useTeamHubRuntime();+ const t = useT();const templates = useQuery(agentTemplatesQueryOptions(client, tenantId));return (<ModalDialog- ariaLabel={TITLE}+ ariaLabel={t(m.title)}className="flex flex-col overflow-hidden"onClose={onClose}size="xl"@@ -108,14 +111,14 @@ export function CreateAgentFromTemplateDialog({// behind a click and made the two sources look like separate features.const TEMPLATE_SECTIONS = [{- empty: "This deployment ships no official template.",+ empty: m.officialEmpty,origin: "builtin",- title: "Official templates",+ title: m.officialTitle,},{- empty: "Nothing published yet. Publish an Agent to share it here.",+ empty: m.publishedEmpty,origin: "published",- title: "Templates from users",+ title: m.publishedTitle,},] as const;@@ -137,13 +140,14 @@ function TemplatePicker({tenantId: string;}) {const canRemove = useTemplateRemovalPermission(tenantId);+ const t = useT();return (<div className="flex min-h-0 flex-1 flex-col"><header className="flex shrink-0 items-start justify-between gap-4 px-5 pb-4 pt-5"><div>- <h2 className="text-lg">{TITLE}</h2>+ <h2 className="text-lg">{t(m.title)}</h2><p className="mt-1 text-sm text-app-muted">- Pick a template, then choose where the Agent runs.+ {t(m.pickerDescription)}</p></div><CloseButton onClose={onClose} />@@ -151,14 +155,14 @@ function TemplatePicker({<div className="workspace-scrollbar min-h-0 flex-1 overflow-y-auto px-5 pb-5">{pending ? (<div- aria-label="Loading templates"+ aria-label={t(m.loadingTemplates)}className="space-y-5"role="status">{TEMPLATE_SECTIONS.map((section) => (<section key={section.origin}><h3 className="mb-2.5 text-base font-semibold text-app-ink">- {section.title}+ {t(section.title)}</h3><div className="grid gap-2 sm:grid-cols-2 lg:grid-cols-3">{[0, 1, 2].map((slot) => (@@ -174,9 +178,9 @@ function TemplatePicker({) : error ? (<PickerNotice tone="danger"><span className="flex items-center justify-between gap-3">- Agent templates are unavailable.+ {t(m.unavailable)}<Button onClick={onRetry} size="compact" type="button">- Retry+ {t(commonMessages.retry)}</Button></span></PickerNotice>@@ -189,11 +193,11 @@ function TemplatePicker({return (<section key={section.origin}><h3 className="mb-2.5 text-base font-semibold text-app-ink">- {section.title}+ {t(section.title)}</h3>{listed.length ? (<ul- aria-label={section.title}+ aria-label={t(section.title)}className="grid gap-2 sm:grid-cols-2 lg:grid-cols-3">{listed.map((template, index) => (@@ -224,15 +228,17 @@ function TemplatePicker({</span>{template.published_by ? (<span className="shrink-0 truncate text-xs leading-4 text-muted-foreground">- by {template.published_by.display_name}+ {t(m.publishedBy, {+ name: template.published_by.display_name,+ })}</span>) : null}</span>{/* One chip per resource kind: a combined stringhid which kinds a template actually carries. */}- {templateResourceChips(template).length ? (+ {templateResourceChips(template, t).length ? (<span className="mt-1.5 flex min-w-0 flex-wrap items-center gap-1">- {templateResourceChips(template).map(+ {templateResourceChips(template, t).map((chip) => (<spanclassName="rounded-sm bg-muted px-1.5 py-0.5 text-xs leading-4 text-muted-foreground"@@ -261,7 +267,7 @@ function TemplatePicker({))}</ul>) : (- <PickerNotice>{section.empty}</PickerNotice>+ <PickerNotice>{t(section.empty)}</PickerNotice>)}</section>);@@ -292,6 +298,7 @@ function RemoveTemplateButton({}) {const queryClient = useQueryClient();const { client } = useTeamHubRuntime();+ const t = useT();const [confirming, setConfirming] = useState(false);const remove = useMutation({mutationFn: () =>@@ -313,10 +320,10 @@ function RemoveTemplateButton({return (<span className="absolute inset-0 z-10 flex flex-col justify-center gap-2 rounded-xl bg-card/95 p-4 text-center backdrop-blur-sm"><span className="text-sm font-medium text-app-ink">- Remove this template?+ {t(m.removeQuestion)}</span><span className="text-xs leading-4 text-app-muted">- Agents already created from it are not affected.+ {t(m.removeNote)}</span>{remove.error ? (<span className="text-xs leading-4 text-app-danger" role="alert">@@ -333,9 +340,10 @@ function RemoveTemplateButton({size="compact"type="button">- Cancel+ {t(commonMessages.cancel)}</Button><Button+ data-voice-risk="never"disabled={remove.isPending}onClick={() => remove.mutate()}size="compact"@@ -343,10 +351,10 @@ function RemoveTemplateButton({type="button">{remove.isPending- ? "Removing..."+ ? t(m.removing): remove.error- ? "Try again"- : "Remove"}+ ? t(commonMessages.tryAgain)+ : t(commonMessages.remove)}</Button></span></span>@@ -355,7 +363,8 @@ function RemoveTemplateButton({return (<span className="absolute right-2 top-2"><Button- aria-label={`Remove ${template.name} from the marketplace`}+ data-voice-risk="never"+ aria-label={t(m.removeFromMarketplace, { name: template.name })}className="opacity-0 transition-opacity focus-visible:opacity-100 group-hover:opacity-100"onClick={() => setConfirming(true)}size="compactIcon"@@ -400,6 +409,7 @@ function TemplateSetup({}) {const [name, setName] = useState(template.name);const { client } = useTeamHubRuntime();+ const t = useT();const placement = useAgentPlacementFlow({ tenantId });const modelSelection = useAgentModelSelection(placement.selection.runtimeModels,@@ -454,7 +464,7 @@ function TemplateSetup({const createAgent = useMutation({mutationFn: async () => {if (!resolved) {- throw new Error("Agent creation is unavailable.");+ throw new Error(t(m.creationUnavailable));}const input = {agentType: "general" as const,@@ -530,7 +540,7 @@ function TemplateSetup({<header className="flex shrink-0 items-start justify-between gap-3 px-5 pb-4 pt-5"><div className="flex min-w-0 items-start gap-3"><Button- aria-label="Back to templates"+ aria-label={t(m.backToTemplates)}onClick={onBack}size="icon"tone="ghost"@@ -547,7 +557,7 @@ function TemplateSetup({<div className="min-w-0"><h2 className="truncate text-lg">{template.name}</h2><p className="mt-1 text-sm text-app-muted">- {template.description || "Choose where this Agent runs."}+ {template.description || t(m.chooseWhere)}</p></div></div>@@ -557,7 +567,7 @@ function TemplateSetup({<div className="workspace-scrollbar min-h-0 flex-1 overflow-y-auto px-5 pb-5"><fieldset className="space-y-4" disabled={createAgent.isPending}><Field- label="Name"+ label={t(m.name)}maxLength={120}onChange={(event) => {beginNewCommand();@@ -576,9 +586,11 @@ function TemplateSetup({selection={placement.selection}/><label className="block">- <span className="mb-1.5 block text-sm font-medium">Model</span>+ <span className="mb-1.5 block text-sm font-medium">+ {t(m.model)}+ </span><Select- aria-label="Agent model"+ aria-label={t(m.modelLabel)}className="ui-field-control w-full"disabled={!modelSelection.model}onValueChange={(value) => {@@ -597,10 +609,10 @@ function TemplateSetup({{modelSelection.reasoningEfforts.length > 0 ? (<label className="block"><span className="mb-1.5 block text-sm font-medium">- Reasoning+ {t(m.reasoning)}</span><Select- aria-label="Agent reasoning effort"+ aria-label={t(m.reasoningLabel)}className="ui-field-control w-full"disabled={!modelSelection.reasoningEffort}onValueChange={(value) => {@@ -613,7 +625,7 @@ function TemplateSetup({>{modelSelection.reasoningEfforts.map((effort) => (<SelectItem key={effort} value={effort}>- {reasoningEffortLabel(effort)}+ {reasoningEffortLabel(effort, t)}</SelectItem>))}</Select>@@ -642,11 +654,11 @@ function TemplateSetup({<footer className="flex shrink-0 justify-end gap-2 border-t border-app-border px-5 py-4"><Button onClick={onClose} type="button">- Cancel+ {t(commonMessages.cancel)}</Button><Button disabled={!canSubmit} tone="primary" type="submit"><Icon icon={BotIcon} size={16} />- {createAgent.isPending ? "Creating..." : "Create Agent"}+ {createAgent.isPending ? t(m.creating) : t(m.createAgent)}</Button></footer></form>@@ -672,6 +684,7 @@ function TemplateBindingsNote({resolved?: ResolvedAgentTemplateBindings;template: TeamHubAgentTemplate;}) {+ const t = useT();const connectorKeys = template.connector_bindings ?? [];const hasBindings = template.skill_bindings.length + connectorKeys.length > 0;const appliedGroups = useTemplateContentGroups({@@ -683,15 +696,15 @@ function TemplateBindingsNote({});if (pending) {- return <Note>Checking template Skills...</Note>;+ return <Note>{t(m.checkingSkills)}</Note>;}if (error || !resolved) {return (<Note tone="danger"><span className="flex items-center justify-between gap-3">- Template Skills couldn't be checked.+ {t(m.skillsCheckFailed)}<Button onClick={onRetry} size="compact" type="button">- Retry+ {t(commonMessages.retry)}</Button></span></Note>@@ -704,13 +717,11 @@ function TemplateBindingsNote({connectors: appliedGroups.connectors,skills: [...appliedGroups.skills.map((item) =>- importable.has(item.key)- ? { ...item, detail: "Added to your Skills" }- : item,+ importable.has(item.key) ? { ...item, detail: t(m.skillAdded) } : item,),...resolved.unavailableSkills.map((item) => ({...item,- detail: "Not available here",+ detail: t(m.skillUnavailable),unavailable: true,})),],@@ -721,18 +732,11 @@ function TemplateBindingsNote({connectorKeys.length === 0;return (<div className="space-y-2">- <TemplateContents- connectorNote="Not granted by creating the Agent. Authorize your own accounts from Connectors afterwards."- groups={groups}- />+ <TemplateContents connectorNote={t(m.connectorNote)} groups={groups} />{nothingApplies && hasBindings ? (- <Note>No template Skills or Connectors are available here.</Note>- ) : null}- {!nothingApplies ? (- <Note>- These are used alongside the Skills already on this Computer.- </Note>+ <Note>{t(m.nothingAvailable)}</Note>) : null}+ {!nothingApplies ? <Note>{t(m.usedAlongside)}</Note> : null}</div>);}@@ -749,9 +753,11 @@ function Note({ children, tone }: { children: ReactNode; tone?: "danger" }) {}function CloseButton({ onClose }: { onClose: () => void }) {+ const t = useT();return (<Button- aria-label={`Close ${TITLE}`}+ data-voice-close+ aria-label={t(m.closeDialog)}onClick={onClose}size="icon"tone="ghost"diff --git a/apps/web/src/features/rooms/agent-templates/publish-agent-template-dialog.tsx b/apps/web/src/features/rooms/agent-templates/publish-agent-template-dialog.tsxindex 169c52ab..db0be017 100644--- a/apps/web/src/features/rooms/agent-templates/publish-agent-template-dialog.tsx+++ b/apps/web/src/features/rooms/agent-templates/publish-agent-template-dialog.tsx@@ -6,6 +6,8 @@ import { ModalDialog } from "@/components/ui/modal-dialog";import { teamHubData } from "@/features/teamhub/teamhub-api";import { useTeamHubRuntime } from "@/features/teamhub/teamhub-runtime";import type { TeamHubTenantAgent } from "@/features/teamhub/teamhub-types";+import { commonMessages } from "@/i18n/common.messages";+import { useT } from "@/i18n/use-translation";import { collectTeamHubCursorPages } from "@/features/teamhub/teamhub-cursor-pages";import { tenantRoomsQueryOptions } from "../room-queries";@@ -18,6 +20,7 @@ import {useTemplateContentGroups,} from "./agent-template-contents";import { agentTemplatesQueryKey } from "./agent-template-queries";+import { agentTemplateMessages as m } from "./agent-templates.messages";import { useAgentConnectorKeys } from "./use-agent-connector-keys";/**@@ -34,6 +37,7 @@ export function PublishAgentTemplateDialog({tenantId: string;}) {const { client } = useTeamHubRuntime();+ const t = useT();const queryClient = useQueryClient();const formId = useId();const routines = useQuery({@@ -114,14 +118,14 @@ export function PublishAgentTemplateDialog({return (<ModalDialog- description="Everyone in this deployment will be able to create Agents from it."+ description={t(m.publishDescription)}onClose={onClose}size="md"- title="Publish as template"+ title={t(m.publishTitle)}footer={<><Button onClick={onClose} type="button">- Cancel+ {t(commonMessages.cancel)}</Button><Buttondisabled={@@ -132,7 +136,7 @@ export function PublishAgentTemplateDialog({tone="primary"type="submit">- Publish+ {t(m.publish)}</Button></>}@@ -141,10 +145,10 @@ export function PublishAgentTemplateDialog({<fieldset className="space-y-4" disabled={publish.isPending}><label className="block"><span className="mb-1.5 block text-sm font-medium">- Template name+ {t(m.templateName)}</span><input- aria-label="Template name"+ aria-label={t(m.templateName)}className="ui-field-control w-full"maxLength={120}onChange={(event) => setName(event.target.value)}@@ -152,14 +156,14 @@ export function PublishAgentTemplateDialog({/></label><div>- <p className="mb-2 text-sm font-medium">Shared with others</p>+ <p className="mb-2 text-sm font-medium">{t(m.sharedWithOthers)}</p>{connectors.isPending || routines.isPending ? (<p className="text-sm text-app-muted" role="status">- Checking this Agent's Routines and Connectors...+ {t(m.checkingAgent)}</p>) : (<TemplateContents- connectorNote="Only Connector names are shared. Your connected accounts and credentials stay private, and whoever uses this template authorizes their own."+ connectorNote={t(m.publishConnectorNote)}groups={groups}instructions={registration.instructions}routines={routines.data}@@ -167,15 +171,14 @@ export function PublishAgentTemplateDialog({)}</div><p className="rounded-xl border border-border bg-muted/40 p-3 text-sm leading-5 text-app-muted">- Runtime, model, and Local Computer stay private to this Agent. You- can remove the template later.+ {t(m.staysPrivate)}</p></fieldset>{routines.error ? (<p className="mt-3 text-sm text-app-danger" role="alert">- Routines could not be loaded.{" "}+ {t(m.routinesLoadFailed)}{" "}<Button onClick={() => void routines.refetch()} type="button">- Retry+ {t(commonMessages.retry)}</Button></p>) : null}diff --git a/apps/web/src/i18n/locales/zh-CN.glossary.md b/apps/web/src/i18n/locales/zh-CN.glossary.mdindex 5cfa3f79..a25ce512 100644--- a/apps/web/src/i18n/locales/zh-CN.glossary.md+++ b/apps/web/src/i18n/locales/zh-CN.glossary.md@@ -132,6 +132,9 @@ elsewhere.| Publisher / License | 发布者 / 许可证 | || Parameters | 参数量 | Of a model. || Model source | 模型来源 | |+| Publish (a template) | 发布 | |+| Marketplace | 模板市场 | Where published Agent templates are listed. |+| Official template | 官方模板 | |## Stylediff --git a/apps/web/src/i18n/locales/zh-CN.json b/apps/web/src/i18n/locales/zh-CN.jsonindex f7bd4c51..1da4e49b 100644--- a/apps/web/src/i18n/locales/zh-CN.json+++ b/apps/web/src/i18n/locales/zh-CN.json@@ -1605,5 +1605,63 @@"removeAgentTitle": "移除 {name}?","removeAgentDescription": "这个 Agent 将从所有 Room 中移除,你与它的私聊也会被删除。共享 Room 里的消息仍会保留。","removeAgent": "移除 Agent"+ },+ "agentTemplates": {+ "title": "Agent 模板",+ "closeDialog": "关闭 Agent 模板",+ "pickerDescription": "选一个模板,再选择 Agent 在哪里运行。",+ "loadingTemplates": "正在加载模板",+ "officialTitle": "官方模板",+ "officialEmpty": "当前部署没有提供官方模板。",+ "publishedTitle": "用户发布的模板",+ "publishedEmpty": "还没有人发布模板。把一个 Agent 发布为模板,就能在这里分享。",+ "unavailable": "Agent 模板暂不可用。",+ "publishedBy": "来自 {name}",+ "removeQuestion": "移除这个模板?",+ "removeNote": "已经用它创建的 Agent 不受影响。",+ "removing": "正在移除…",+ "removeFromMarketplace": "从模板市场移除 {name}",+ "creationUnavailable": "暂时无法创建 Agent。",+ "backToTemplates": "返回模板列表",+ "chooseWhere": "选择这个 Agent 在哪里运行。",+ "name": "名称",+ "model": "模型",+ "modelLabel": "Agent 模型",+ "reasoning": "思考强度",+ "reasoningLabel": "Agent 的思考强度",+ "creating": "正在创建…",+ "createAgent": "创建 Agent",+ "checkingSkills": "正在检查模板里的 Skill…",+ "skillsCheckFailed": "无法检查模板里的 Skill。",+ "skillAdded": "已添加到你的 Skill",+ "skillUnavailable": "这里不可用",+ "connectorNote": "创建 Agent 不会自动授权。创建后请在连接器中授权你自己的账号。",+ "nothingAvailable": "这个模板的 Skill 和连接器在这里都不可用。",+ "usedAlongside": "它们会和这台电脑上已有的 Skill 一起使用。",+ "needsAuthorization": "需要你授权",+ "skills": "Skill",+ "skillsTitle": "它能执行的流程",+ "routines": "Routine",+ "routinesTitle": "自动运行的任务",+ "routinesNote": "所有 Routine 都会自动添加到新 Agent 的私聊中,并保留原来的启用或暂停状态。",+ "routineEnabled": "已启用 · {cadence} · {timezone}",+ "routinePaused": "已暂停 · {cadence} · {timezone}",+ "connectors": "连接器",+ "connectorsTitle": "它需要的账号",+ "instructions": "指令",+ "instructionsTitle": "它如何工作",+ "skillCount": { "other": "{count} 个 Skill" },+ "routineCount": { "other": "{count} 个 Routine" },+ "connectorCount": { "other": "{count} 个连接器" },+ "instructionsOnly": "仅含指令",+ "publishTitle": "发布为模板",+ "publishDescription": "当前部署中的所有人都可以用它创建 Agent。",+ "publish": "发布",+ "templateName": "模板名称",+ "sharedWithOthers": "会分享给他人的内容",+ "checkingAgent": "正在检查这个 Agent 的 Routine 和连接器…",+ "publishConnectorNote": "只会分享连接器的名称。你已连接的账号和凭据不会公开,使用这个模板的人需要授权自己的账号。",+ "staysPrivate": "Runtime、模型和本地电脑仅属于这个 Agent,不会分享。之后你可以移除这个模板。",+ "routinesLoadFailed": "无法加载 Routine。"}}