feat(web): name the agent-preset surface "Agent 预设" in Chinese

The Chinese copy was mixed: the nav read 智能体 while every other string kept
`preset` untranslated (本会话的 agent preset, 新建 preset, preset 名称).
It is now one register throughout — Agent stays, preset becomes 预设, the
standard Chinese UI word for a named, switchable configuration bundle, which
is what a preset is when a session picks one.

UI copy only. The docs keep `agent preset` as the technical term for the
composition and the `agent-presets` plugin.
This commit is contained in:
Yichen Jiang
2026-08-04 13:40:09 +08:00
parent 9edfdb589d
commit 5b93f48f78
2 changed files with 14 additions and 14 deletions

View File

@@ -52,15 +52,15 @@ export const en: Record<AgentPresetSettingsKey, string> = {
/** Simplified Chinese copy. */
export const zh: Record<AgentPresetSettingsKey, string> = {
title: 'Agent preset',
title: 'Agent 预设',
description: '对此后新建的会话生效。运行中的会话保持它开始时的 preset。',
loading: '正在加载 preset…',
error: '无法加载 agent preset。',
loading: '正在加载预设…',
error: '无法加载 Agent 预设。',
userTrust: '本地',
seatHint: '本会话的 agent preset —— 发送第一条消息前可切换',
lockedHint: '会话开始后,其 agent preset 即固定',
nav: '智能体',
sectionIntro: 'preset 即一个会话的 agent 所运行的插件组装 —— 它的工具、提示词与能力。内置 preset 只读;复制一份即可改成自己的。',
seatHint: '本会话的 Agent 预设 —— 发送第一条消息前可切换',
lockedHint: '会话开始后,其 Agent 预设即固定',
nav: 'Agent 预设',
sectionIntro: '预设即一个会话的 Agent 所运行的插件组装 —— 它的工具、提示词与能力。内置预设只读;复制一份即可改成自己的。',
builtIn: '内置',
defaultBadge: '默认',
setDefault: '设为默认',
@@ -68,21 +68,21 @@ export const zh: Record<AgentPresetSettingsKey, string> = {
view: '查看',
duplicate: '复制',
delete: '删除',
newPreset: '新建 preset',
presetName: 'preset 名称',
newPreset: '新建预设',
presetName: '预设名称',
presetNamePlaceholder: 'my-agent',
copyOf: '复制自',
composition: '组装cordis.yml',
readOnlyNotice: '该 preset 随部署提供,不可编辑。复制一份即可改成自己的。',
readOnlyNotice: '该预设随部署提供,不可编辑。复制一份即可改成自己的。',
save: '保存',
saving: '正在保存…',
cancel: '取消',
close: '关闭',
retry: '重试',
idRequired: '请填写 preset 名称。',
idRequired: '请填写预设名称。',
idInvalid: '只能使用小写字母、数字与连字符,且以字母或数字开头。',
idTaken: '同名 preset 已存在。',
deleteTitle: '删除该 preset',
idTaken: '同名预设已存在。',
deleteTitle: '删除该预设',
deleteDescription: '组装文件将被删除。已在其上运行的会话不受影响;新会话将无法再选择它。',
deleteConfirm: '删除',
deleting: '正在删除…',

View File

@@ -91,7 +91,7 @@ describe('ui-agent-preset apply', () => {
expect(section.component).toBe(AgentPresetSection)
expect(section.options).toMatchObject({ id: 'agent-presets', order: 20 })
// The nav label is a locale-following thunk; owners resolve it at read time.
expect(resolveSlotLabel(section.options.label)).toBe('智能体')
expect(resolveSlotLabel(section.options.label)).toBe('Agent 预设')
})
it('registers into a declaration that arrives after apply', async () => {