fix(i18n): localize sidebar, settings tabs, and settings section titles

Three connected bugs where the Label/SettingsSection APIs took a `String`,
which routes through the StringProtocol overloads and bypasses localization
entirely. Identified by the user after testing zh-Hans / de / fr — the
sidebar menu items, Settings tab bar, and Settings section headers all
remained English under any App Language override.

- SidebarSection now exposes displayName: LocalizedStringResource; SidebarView
  builds Label via the Text/Image builders so the catalog key is actually
  used.
- SettingsTab gets the same displayName treatment; the .tabItem Label builds
  through the Text/Image builder too.
- SettingsSection.title changes from String → LocalizedStringKey so literal
  call sites (all ~20 of them) now extract into the catalog. Two call sites
  that were passing String variables (PlatformsView, CredentialPoolsView) are
  wrapped via LocalizedStringKey(...) — brand/provider names fall through to
  English as before. AuxiliaryTab's static task list gets a LocalizedStringKey
  column so its section titles extract too.

This change newly extracts 65 previously-invisible section-title keys into
the catalog; translations added for all six locales. Catalog: 575 → 644
source keys, each locale translated for 583 of them (brand names / protocol
names / format-only keys intentionally fall through).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alan Wizemann
2026-04-21 03:32:32 +02:00
parent 1726a613a5
commit f47034d4ad
14 changed files with 3078 additions and 17 deletions
+65
View File
@@ -20,11 +20,14 @@
"%lld tools": "%lld 个工具",
"30 Days": "30 天",
"7 Days": "7 天",
"90 Days": "90 天",
"A QR code will appear below. Scan it with WhatsApp on your phone. The session is saved to ~/.hermes/platforms/whatsapp/ so you won't need to scan again after restarts.": "二维码将在下方显示。用手机上的 WhatsApp 扫描。会话保存在 ~/.hermes/platforms/whatsapp/,重启后无需再次扫描。",
"API Key": "API 密钥",
"API keys are never displayed in full. Scarf only shows the last 4 characters for identification. Full key values are stored by hermes in ~/.hermes/auth.json.": "API 密钥永远不会完整显示。Scarf 仅显示后 4 位用于识别。完整密钥由 hermes 存储在 ~/.hermes/auth.json。",
"Access Control": "访问控制",
"Actions": "操作",
"Active": "活跃",
"Active Personality": "活跃人格",
"Active profile": "当前配置",
"Activity": "活动",
"Activity Patterns": "活动模式",
@@ -42,6 +45,7 @@
"Add from Preset": "从预设添加",
"Add rotation credentials so hermes can failover between keys when one hits rate limits.": "添加轮换凭证,以便 hermes 在某个密钥达到速率限制时能切换到其他密钥。",
"Add your first command": "添加第一个命令",
"Advanced": "高级",
"After approving in your browser, the provider shows a code. Paste it below and submit.": "在浏览器中批准后,提供方会显示一个代码。将其粘贴到下方并提交。",
"Agent": "Agent",
"All": "全部",
@@ -49,25 +53,34 @@
"All Sessions": "所有会话",
"All Time": "全部时间",
"All installed hub skills are up to date.": "所有已安装的 Hub 技能均为最新。",
"App Credentials": "应用凭证",
"Approval": "审批",
"Approvals": "审批",
"Approve": "批准",
"Archive": "归档",
"Args (one per line)": "参数(每行一个)",
"Arguments": "参数",
"Assistant Message": "助手消息",
"Auth": "认证",
"Authentication": "认证",
"Authentication uses ssh-agent": "使用 ssh-agent 进行认证",
"Authorization Code": "授权码",
"Authorization URL": "授权 URL",
"Aux Models": "辅助模型",
"Auxiliary tasks use separate, typically cheaper models. Leave Provider as `auto` to inherit the main provider.": "辅助任务使用独立的、通常更便宜的模型。将 Provider 保持为 `auto` 以继承主提供方。",
"Back": "返回",
"Back to Catalog": "返回目录",
"Backend": "后端",
"Backup & Restore": "备份与恢复",
"Backup Now": "立即备份",
"Becomes the key under mcp_servers: in config.yaml.": "将作为 config.yaml 中 mcp_servers: 下的键。",
"Behavior": "行为",
"Browse": "浏览",
"Browse Hub": "浏览 Hub",
"Browse the Hub": "浏览 Hub",
"Browse...": "浏览...",
"Browser": "浏览器",
"Built-in Memory": "内置记忆",
"By Day": "按天",
"By Hour": "按小时",
"Call timeout": "调用超时",
@@ -81,6 +94,7 @@
"Check for Updates": "检查更新",
"Check for Updates…": "检查更新…",
"Checking…": "检查中…",
"Checkpoints": "检查点",
"Choose a cron job from the list": "从列表中选择一个定时任务",
"Choose a profile to inspect.": "选择一个配置进行查看。",
"Choose a project from the sidebar to view its dashboard.": "从侧边栏选择项目以查看其仪表盘。",
@@ -98,16 +112,21 @@
"Close Window": "关闭窗口",
"Code: %@": "代码:%@",
"Command": "命令",
"Command Allowlist": "命令白名单",
"Command looks destructive. Double-check before saving.": "该命令看起来具有破坏性。保存前请仔细确认。",
"Component": "组件",
"Compress": "压缩",
"Compress Conversation": "压缩对话",
"Compress conversation (/compress)": "压缩对话 (/compress)",
"Compression": "压缩",
"Config Diagnostics": "配置诊断",
"Configure": "配置",
"Connect timeout": "连接超时",
"Connected": "已连接",
"Connected — can't read Hermes state": "已连接 — 无法读取 Hermes 状态",
"Connection": "连接",
"Container Limits": "容器限制",
"Context & Compression": "上下文与压缩",
"Continue Last Session": "继续上次会话",
"Copied": "已复制",
"Copy": "复制",
@@ -132,21 +151,26 @@
"Cron Jobs": "定时任务",
"Current: %@": "当前:%@",
"Custom…": "自定义…",
"Daemon Endpoint": "守护进程端点",
"Daemon running": "守护进程运行中",
"Dashboard": "仪表盘",
"Default": "默认",
"Default: ~/.hermes": "默认:~/.hermes",
"Defaults to ~/.ssh/config or current user": "默认使用 ~/.ssh/config 或当前用户",
"Defined Personalities": "已定义人格",
"Delegation": "委派",
"Delete": "删除",
"Delete %@?": "删除 %@?",
"Delete Session?": "删除会话?",
"Delete profile '%@'?": "删除配置 '%@'?",
"Delete...": "删除...",
"Deliver: %@": "投递:%@",
"Details": "详情",
"Diagnostic Output": "诊断输出",
"Diagnostics": "诊断",
"Disable": "禁用",
"Disabled": "已禁用",
"Display": "显示",
"Docs": "文档",
"Done": "完成",
"Edit": "编辑",
@@ -160,10 +184,13 @@
"Enable 2FA on your email account and generate an app password. Regular account passwords will fail. Always set allowed senders — otherwise anyone knowing the address can message the agent.": "为你的邮箱账户启用双重验证并生成应用专用密码。普通账户密码将无法使用。务必设置允许的发件人 — 否则任何知道邮件地址的人都可以向 agent 发消息。",
"Enable the webhook platform to accept event-driven agent triggers. The HMAC secret is used as a fallback when individual routes don't provide their own.": "启用 webhook 平台以接受事件驱动的 agent 触发。当单独的路由未提供自己的密钥时,使用 HMAC 密钥作为回退。",
"Enabled": "已启用",
"End-to-End Encryption (experimental)": "端到端加密(实验性)",
"Entity Filters (config.yaml only)": "实体过滤器(仅限 config.yaml)",
"Env vars, headers, and tool filters can be edited after the server is added.": "添加服务器后可以编辑环境变量、请求头和工具过滤器。",
"Environment Variables": "环境变量",
"Error": "错误",
"Errors": "错误",
"Event Filters": "事件过滤器",
"Exclude": "排除",
"Execute": "执行",
"Expected at %@": "预期位于 %@",
@@ -172,18 +199,23 @@
"Export…": "导出…",
"Expose prompts": "暴露提示",
"Expose resources": "暴露资源",
"External Provider": "外部提供方",
"Feedback": "反馈",
"Fetch": "拉取",
"Files": "文件",
"Filter logs...": "筛选日志...",
"Filter servers...": "筛选服务器...",
"Filter skills...": "筛选技能...",
"Filter to session %@": "筛选到会话 %@",
"Flush Memories": "清空记忆",
"Focus topic (optional)": "聚焦主题(可选)",
"Full copy of active profile (all state)": "当前配置的完整副本(所有状态)",
"Gateway": "Gateway",
"Gateway Running": "Gateway 运行中",
"Gateway Stopped": "Gateway 已停止",
"Gateway restart required": "需要重启 Gateway",
"General": "常规",
"Global Settings": "全局设置",
"Header": "请求头",
"Headers": "请求头",
"Health": "健康",
@@ -195,7 +227,10 @@
"Hide": "隐藏",
"Hide Output": "隐藏输出",
"Hide details": "隐藏详情",
"Home Channel": "主频道",
"Homeserver": "主服务器",
"Host key changed": "主机密钥已变更",
"Human Delay": "人类延迟",
"ID: %@": "ID:%@",
"If this is the first connection, ensure your key is loaded with `ssh-add` and that the remote accepts it.": "如果这是首次连接,请确保已通过 `ssh-add` 加载你的密钥,并且远端接受该密钥。",
"If you trust the change, remove the stale entry and reconnect:": "如果你信任此变更,请移除过期条目并重新连接:",
@@ -217,6 +252,7 @@
"Last probe: %@": "上次探测:%@",
"Last run: %@": "上次运行:%@",
"Last updated: %@": "最后更新:%@",
"Layout": "布局",
"Leave blank to infer from the model ID's prefix (\"openai/...\" → openai).": "留空则从模型 ID 的前缀推断(\"openai/...\" → openai)。",
"Leave blank unless Hermes is installed at a non-default path (systemd services often live at /var/lib/hermes/.hermes; Docker sidecars vary). Test Connection auto-suggests a value when it detects one of the known alternates.": "除非 Hermes 安装在非默认路径,否则请留空(systemd 服务通常在 /var/lib/hermes/.hermes,Docker sidecar 则各不相同)。检测到已知替代路径时,测试连接会自动建议值。",
"Level": "级别",
@@ -227,7 +263,9 @@
"Loading session…": "正在加载会话…",
"Local": "本地",
"Local (stdio)": "本地 (stdio)",
"Locale": "区域",
"Log File": "日志文件",
"Logging": "日志",
"Logs": "日志",
"MCP Servers": "MCP 服务器",
"MCP Servers (%lld)": "MCP 服务器 (%lld)",
@@ -241,11 +279,14 @@
"Messages will appear here as the conversation progresses.": "消息将随对话进行显示在此处。",
"Migrate": "迁移",
"Missing required config:": "缺少必需的配置:",
"Modal": "模态",
"Model": "模型",
"Model ID": "模型 ID",
"Models": "模型",
"Monitor": "监控",
"Name": "名称",
"Name (no leading slash)": "名称(不带前导斜杠)",
"Network": "网络",
"New Session": "新建会话",
"New Webhook Subscription": "新建 Webhook 订阅",
"New name for '%@'": "'%@' 的新名称",
@@ -283,6 +324,7 @@
"None": "无",
"Notable Sessions": "重要会话",
"OAuth login for %@": "%@ 的 OAuth 登录",
"OK": "确定",
"Open BotFather": "打开 BotFather",
"Open Developer Portal": "打开开发者门户",
"Open Local": "打开本地",
@@ -294,6 +336,7 @@
"Open in Editor": "在编辑器中打开",
"Open in new window": "在新窗口中打开",
"Open session": "打开会话",
"Optional": "可选",
"Optional — defaults to hostname": "可选 — 默认为主机名",
"Optionally focus the summary on a specific topic. Leave blank to compress evenly.": "可选地将摘要聚焦到特定主题。留空则均匀压缩。",
"Other": "其他",
@@ -304,11 +347,13 @@
"Pair Device": "配对设备",
"Paired Users": "已配对用户",
"Paste code here…": "在此粘贴代码…",
"Paths": "路径",
"Pause": "暂停",
"Pending Approvals": "待批准",
"Per-route subscriptions (events, prompt template, delivery target) are managed in the Webhooks sidebar — not here. This panel only controls whether the webhook platform is listening at all.": "按路由的订阅(事件、提示模板、投递目标)在 Webhooks 侧边栏中管理 — 不在此处。本面板仅控制 webhook 平台是否监听。",
"Period": "周期",
"Personalities": "人格",
"Personality": "人格",
"Pick an MCP server to add.": "选择要添加的 MCP 服务器。",
"Pick one from the list, or add a new server from the toolbar.": "从列表中选择,或从工具栏添加新服务器。",
"Platforms": "平台",
@@ -327,6 +372,7 @@
"Provider": "提供方",
"Push to Talk": "按住说话",
"Push to talk (Ctrl+B)": "按住说话 (Ctrl+B)",
"Push-to-Talk": "按住说话",
"Quick Commands": "快捷命令",
"Quick commands are shell shortcuts hermes exposes in chat as `/command_name`. They live under `quick_commands:` in config.yaml.": "快捷命令是 hermes 在聊天中以 `/command_name` 形式暴露的 shell 快捷方式。它们位于 config.yaml 的 `quick_commands:` 下。",
"Quit Scarf": "退出 Scarf",
@@ -338,6 +384,7 @@
"Recent Sessions": "最近会话",
"Reconnect": "重新连接",
"Recording…": "录制中…",
"Redaction": "脱敏",
"Refresh": "刷新",
"Reload": "重新加载",
"Remote (HTTP)": "远程 (HTTP)",
@@ -353,6 +400,8 @@
"Rename Profile": "重命名配置",
"Rename Session": "重命名会话",
"Rename...": "重命名...",
"Required": "必需",
"Required Tokens": "必需令牌",
"Requires: %@": "需要:%@",
"Reset Cooldowns": "重置冷却",
"Restart": "重启",
@@ -391,6 +440,7 @@
"Search or browse skills published to registries like skills.sh, GitHub, and the official hub.": "搜索或浏览发布到 skills.sh、GitHub 和官方 Hub 等注册表的技能。",
"Search registries": "搜索注册表",
"Search…": "搜索…",
"Security": "安全",
"Select": "选择",
"Select Model": "选择模型",
"Select a Job": "选择任务",
@@ -402,12 +452,14 @@
"Select an MCP Server": "选择 MCP 服务器",
"Send message (Enter)": "发送消息 (Enter)",
"Series": "系列",
"Server": "服务器",
"Server No Longer Exists": "服务器已不存在",
"Server name": "服务器名称",
"Servers": "服务器",
"Service": "服务",
"Service definition stale": "服务定义已过期",
"Session": "会话",
"Session Search": "会话搜索",
"Session title": "会话标题",
"Sessions": "会话",
"Settings": "设置",
@@ -424,7 +476,9 @@
"Site": "站点",
"Skills": "技能",
"Skills (%lld)": "技能 (%lld)",
"Skills Hub": "技能 Hub",
"Source": "来源",
"Speech-to-Text": "语音转文字",
"Start": "启动",
"Start Daemon": "启动守护进程",
"Start Hermes": "启动 Hermes",
@@ -449,6 +503,7 @@
"Test Connection": "测试连接",
"Test failed": "测试失败",
"Test passed": "测试通过",
"Text-to-Speech": "文字转语音",
"The agent hasn't advertised any slash commands yet. Keep typing to send as a message, or press Esc.": "agent 尚未公布任何斜杠命令。继续输入作为消息发送,或按 Esc。",
"The remote's SSH fingerprint no longer matches what your `~/.ssh/known_hosts` file expected. This usually means the remote was reinstalled — or, less commonly, that someone is intercepting the connection.": "远端的 SSH 指纹与你 `~/.ssh/known_hosts` 文件中预期的不再匹配。这通常意味着远端已重装 — 较少见的情况是有人在拦截连接。",
"The server this window was opened with has been removed from your registry.": "打开此窗口所用的服务器已从你的注册表中移除。",
@@ -465,14 +520,17 @@
"This will permanently delete the session and all its messages.": "这将永久删除该会话及其所有消息。",
"Timeout: %llds (%@)": "超时:%1$lld 秒 (%2$@)",
"Timeouts": "超时",
"Tirith Sandbox": "Tirith 沙箱",
"To skip the passphrase prompt at every reboot, add `--apple-use-keychain` to cache it in macOS Keychain.": "要跳过每次重启时的密码短语提示,添加 `--apple-use-keychain` 以将其缓存到 macOS Keychain 中。",
"Toggle text-to-speech (/voice tts)": "切换文字转语音 (/voice tts)",
"Toggle voice mode (/voice)": "切换语音模式 (/voice)",
"Token on disk. Clear to re-authenticate next time the gateway connects.": "令牌已保存到磁盘。清除后,gateway 下次连接时将重新认证。",
"Tool Approval Required": "需要工具批准",
"Tool Filters": "工具过滤器",
"Tool Progress": "工具进度",
"Tools": "工具",
"Top Tools": "常用工具",
"Turns & Reasoning": "轮次与推理",
"Uninstall": "卸载",
"Unknown: %@": "未知:%@",
"Update": "更新",
@@ -489,14 +547,21 @@
"Used as the YAML key. Lowercase, no spaces.": "用作 YAML 键。小写,不含空格。",
"View": "查看",
"View All": "查看全部",
"Vision": "视觉",
"Voice": "语音",
"Voice Off": "语音关",
"Voice On": "语音开",
"Waiting for authorization URL…": "等待授权 URL…",
"Waiting for first probe": "等待首次探测",
"Waiting for hermes to prompt for the code…": "等待 hermes 提示输入代码…",
"Web Extract": "网页提取",
"Webhook (advanced)": "Webhook(高级)",
"Webhook (hermes side)": "Webhook(hermes 侧)",
"Webhook Security": "Webhook 安全",
"Webhook platform not enabled": "未启用 webhook 平台",
"Webhooks": "Webhooks",
"Webhooks let external services trigger agent responses. Each subscription gets its own URL endpoint.": "Webhooks 允许外部服务触发 agent 响应。每个订阅都有自己的 URL 端点。",
"Website Blocklist": "网站黑名单",
"WhatsApp uses the Baileys library to emulate a WhatsApp Web session. Pair this Mac as a linked device by running the pairing wizard and scanning the QR code with your phone (Settings → Linked Devices → Link a Device).": "WhatsApp 使用 Baileys 库模拟 WhatsApp Web 会话。通过运行配对向导并用手机扫描二维码,将此 Mac 配对为关联设备(设置 → 关联设备 → 关联一台设备)。",
"Working": "工作中",
"e.g. anthropic": "例如 anthropic",