From 52c84f0cce3ed784125cd4cdea316af2870345bf Mon Sep 17 00:00:00 2001 From: CG-man Date: Fri, 5 Dec 2025 15:29:23 +0800 Subject: [PATCH] Add internationalization support for Simplified Chinese (vibe-kanban 1e5a14ae) --- .../src/services/config/versions/v6.rs | 1 + frontend/src/i18n/config.ts | 12 + frontend/src/i18n/languages.ts | 4 +- frontend/src/i18n/locales/zh-Hans/common.json | 88 ++++ .../i18n/locales/zh-Hans/organization.json | 78 ++++ .../src/i18n/locales/zh-Hans/projects.json | 51 +++ .../src/i18n/locales/zh-Hans/settings.json | 387 ++++++++++++++++ frontend/src/i18n/locales/zh-Hans/tasks.json | 431 ++++++++++++++++++ shared/types.ts | 2 +- 9 files changed, 1052 insertions(+), 2 deletions(-) create mode 100644 frontend/src/i18n/locales/zh-Hans/common.json create mode 100644 frontend/src/i18n/locales/zh-Hans/organization.json create mode 100644 frontend/src/i18n/locales/zh-Hans/projects.json create mode 100644 frontend/src/i18n/locales/zh-Hans/settings.json create mode 100644 frontend/src/i18n/locales/zh-Hans/tasks.json diff --git a/crates/services/src/services/config/versions/v6.rs b/crates/services/src/services/config/versions/v6.rs index 00ea20ae..35b49487 100644 --- a/crates/services/src/services/config/versions/v6.rs +++ b/crates/services/src/services/config/versions/v6.rs @@ -19,6 +19,7 @@ pub enum UiLanguage { Ja, // Force Japanese Es, // Force Spanish Ko, // Force Korean + ZhHans, // Force Simplified Chinese } #[derive(Clone, Debug, Serialize, Deserialize, TS)] diff --git a/frontend/src/i18n/config.ts b/frontend/src/i18n/config.ts index e033d117..567f6d89 100644 --- a/frontend/src/i18n/config.ts +++ b/frontend/src/i18n/config.ts @@ -24,6 +24,11 @@ import koSettings from './locales/ko/settings.json'; import koProjects from './locales/ko/projects.json'; import koTasks from './locales/ko/tasks.json'; import koOrganization from './locales/ko/organization.json'; +import zhHansCommon from './locales/zh-Hans/common.json'; +import zhHansSettings from './locales/zh-Hans/settings.json'; +import zhHansProjects from './locales/zh-Hans/projects.json'; +import zhHansTasks from './locales/zh-Hans/tasks.json'; +import zhHansOrganization from './locales/zh-Hans/organization.json'; const resources = { en: { @@ -54,6 +59,13 @@ const resources = { tasks: koTasks, organization: koOrganization, }, + 'zh-Hans': { + common: zhHansCommon, + settings: zhHansSettings, + projects: zhHansProjects, + tasks: zhHansTasks, + organization: zhHansOrganization, + }, }; i18n diff --git a/frontend/src/i18n/languages.ts b/frontend/src/i18n/languages.ts index b7407a92..ca09b168 100644 --- a/frontend/src/i18n/languages.ts +++ b/frontend/src/i18n/languages.ts @@ -11,9 +11,10 @@ export const UI_TO_I18N = { JA: 'ja', ES: 'es', KO: 'ko', + ZH_HANS: 'zh-Hans', } as const; -const SUPPORTED_UI_LANGUAGES = ['BROWSER', 'EN', 'JA', 'ES', 'KO'] as const; +const SUPPORTED_UI_LANGUAGES = ['BROWSER', 'EN', 'JA', 'ES', 'KO', 'ZH_HANS'] as const; export const SUPPORTED_I18N_CODES = Object.values(UI_TO_I18N); const FALLBACK_ENDONYMS = { @@ -21,6 +22,7 @@ const FALLBACK_ENDONYMS = { ja: '日本語', es: 'Español', ko: '한국어', + 'zh-Hans': '简体中文', } as const; /** diff --git a/frontend/src/i18n/locales/zh-Hans/common.json b/frontend/src/i18n/locales/zh-Hans/common.json new file mode 100644 index 00000000..1b7c51a0 --- /dev/null +++ b/frontend/src/i18n/locales/zh-Hans/common.json @@ -0,0 +1,88 @@ +{ + "buttons": { + "save": "保存", + "cancel": "取消", + "send": "发送", + "delete": "删除", + "edit": "编辑", + "create": "创建", + "continue": "继续", + "reset": "重置", + "manage": "管理", + "connect": "连接", + "disconnect": "断开连接", + "close": "关闭", + "replay": "重播" + }, + "states": { + "loading": "加载中...", + "saving": "保存中...", + "error": "错误", + "success": "成功", + "reconnecting": "重新连接中" + }, + "language": { + "browserDefault": "浏览器默认" + }, + "conversation": { + "plan": "计划", + "planToggle": { + "show": "显示计划", + "hide": "隐藏计划" + }, + "toolDetailsToggle": { + "show": "显示详情", + "hide": "隐藏详情" + }, + "args": "参数", + "output": "输出", + "result": "结果", + "deniedByUser": "用户拒绝了 {{toolName}}" + }, + "branchSelector": { + "placeholder": "选择分支", + "searchPlaceholder": "搜索分支...", + "empty": "未找到分支", + "badges": { + "current": "当前", + "remote": "远程" + }, + "currentDisabled": "无法选择当前分支" + }, + "breadcrumb": { + "more": "更多" + }, + "orgMembers": { + "moreCount": "还有 {{count}} 位" + }, + "orgSwitcher": { + "title": "切换组织", + "description": "选择要切换到的组织。", + "loadError": "加载组织失败。请重试。", + "noOrganizations": "您不是任何组织的成员。", + "menuItem": "组织", + "loadingPlaceholder": "加载组织中...", + "selectPlaceholder": "选择组织", + "currentBadge": "(当前)" + }, + "signOut": "退出登录", + "devMode": { + "banner": "开发模式 - 这是开发版本" + }, + "oauth": { + "title": "登录 Vibe Kanban", + "description": "登录以加入组织并与团队共享任务", + "continueWithGitHub": "使用 GitHub 继续", + "continueWithGoogle": "使用 Google 继续", + "waitingTitle": "完成身份验证", + "waitingDescription": "已打开弹出窗口进行身份验证", + "waitingForAuth": "等待身份验证...", + "popupInstructions": "如果弹出窗口未打开,请检查您的弹窗拦截器设置。", + "back": "返回", + "successTitle": "身份验证成功!", + "welcomeBack": "欢迎回来,{{name}}", + "errorTitle": "身份验证失败", + "errorDescription": "验证您的账户时出现问题", + "tryAgain": "重试" + } +} \ No newline at end of file diff --git a/frontend/src/i18n/locales/zh-Hans/organization.json b/frontend/src/i18n/locales/zh-Hans/organization.json new file mode 100644 index 00000000..7e434620 --- /dev/null +++ b/frontend/src/i18n/locales/zh-Hans/organization.json @@ -0,0 +1,78 @@ +{ + "createDialog": { + "title": "创建新组织", + "description": "创建新组织以与您的团队协作。", + "nameLabel": "组织名称", + "namePlaceholder": "例如:Acme 公司", + "slugLabel": "短标识", + "slugPlaceholder": "例如:acme-corporation", + "slugHelper": "用于 URL。仅限小写字母、数字和连字符。", + "creating": "创建中...", + "createButton": "创建组织" + }, + "inviteDialog": { + "title": "邀请成员", + "description": "发送邀请加入您的组织。", + "emailLabel": "电子邮件地址", + "emailPlaceholder": "colleague@example.com", + "roleLabel": "角色", + "rolePlaceholder": "选择角色", + "roleHelper": "管理员可以管理成员和组织设置。", + "sending": "发送中...", + "sendButton": "发送邀请" + }, + "roles": { + "member": "成员", + "admin": "管理员" + }, + "memberList": { + "title": "成员", + "description": "管理 {{orgName}} 中的成员及其角色", + "inviteButton": "邀请成员", + "loading": "加载成员中...", + "none": "未找到成员", + "you": "您" + }, + "invitationList": { + "title": "待处理邀请", + "description": "查看 {{orgName}} 的待处理邀请", + "loading": "加载邀请中...", + "none": "没有待处理的邀请", + "invited": "邀请于 {{date}}", + "pending": "待处理" + }, + "settings": { + "title": "组织设置", + "description": "管理组织成员和权限", + "selectLabel": "选择组织", + "selectPlaceholder": "选择组织", + "selectHelper": "选择要查看和管理其成员的组织", + "noOrganizations": "没有可用的组织", + "loadingOrganizations": "加载组织中...", + "loadError": "加载组织失败", + "dangerZone": "危险区域", + "dangerZoneDescription": "不可逆和破坏性操作", + "deleteOrganization": "删除组织", + "deleteOrganizationDescription": "永久删除此组织及其所有数据", + "confirmDelete": "您确定要删除 {{orgName}} 吗?此操作无法撤消。", + "deleteSuccess": "组织删除成功", + "deleteError": "删除组织失败" + }, + "loginRequired": { + "title": "需要登录", + "description": "您需要登录才能管理组织设置。", + "action": "登录" + }, + "confirmRemoveMember": "您确定要从组织中移除此成员吗?", + "sharedProjects": { + "title": "共享项目", + "description": "{{orgName}} 中的远程项目及其与本地项目的链接", + "loading": "加载项目中...", + "noProjects": "此组织中未找到共享项目", + "notLinked": "未链接", + "linkedTo": "链接到:{{projectName}}", + "linked": "已链接", + "linkProject": "链接项目...", + "noAvailableProjects": "没有可用的项目" + } +} diff --git a/frontend/src/i18n/locales/zh-Hans/projects.json b/frontend/src/i18n/locales/zh-Hans/projects.json new file mode 100644 index 00000000..13cbf88e --- /dev/null +++ b/frontend/src/i18n/locales/zh-Hans/projects.json @@ -0,0 +1,51 @@ +{ + "title": "项目", + "subtitle": "管理您的项目并跟踪其进度", + "createProject": "创建项目", + "linkToOrganization": "链接到远程项目", + "loading": "加载项目中...", + "errors": { + "fetchFailed": "获取项目失败" + }, + "empty": { + "title": "还没有项目", + "description": "通过创建您的第一个项目开始。", + "createFirst": "创建您的第一个项目" + }, + "linkDialog": { + "title": "将项目链接到远程项目", + "description": "将此本地项目链接到远程项目以进行协作和同步。", + "projectLabel": "项目", + "organizationLabel": "组织", + "loadingOrganizations": "加载组织中...", + "noOrganizations": "没有可用的组织。请先创建组织。", + "selectOrganization": "选择组织", + "loginRequired": { + "title": "需要登录", + "description": "您需要登录才能链接项目。", + "action": "登录" + }, + "linkModeLabel": "链接模式", + "linkToExisting": "链接到现有", + "createNew": "新建", + "remoteProjectLabel": "远程项目", + "loadingRemoteProjects": "加载远程项目中...", + "noRemoteProjects": "在此组织中未找到远程项目。请尝试创建新项目。", + "selectRemoteProject": "选择远程项目", + "newProjectNameLabel": "新远程项目名称", + "newProjectNamePlaceholder": "输入项目名称", + "linking": "链接中...", + "linkButton": "链接项目", + "errors": { + "selectOrganization": "请选择组织", + "selectRemoteProject": "请选择远程项目", + "enterProjectName": "请输入项目名称", + "linkFailed": "链接项目失败" + } + }, + "unlinkFromOrganization": "取消链接远程项目", + "viewProject": "查看项目", + "openInIDE": "在 IDE 中打开", + "createdDate": "创建于 {{date}}", + "copyFilesPlaceholderWithSearch": "文件路径或 glob 模式(例如:.env、config/*.json)" +} \ No newline at end of file diff --git a/frontend/src/i18n/locales/zh-Hans/settings.json b/frontend/src/i18n/locales/zh-Hans/settings.json new file mode 100644 index 00000000..b5efecc6 --- /dev/null +++ b/frontend/src/i18n/locales/zh-Hans/settings.json @@ -0,0 +1,387 @@ +{ + "settings": { + "layout": { + "nav": { + "title": "设置", + "general": "常规", + "generalDesc": "主题、通知和偏好设置", + "projects": "项目", + "projectsDesc": "项目脚本和配置", + "agents": "代理", + "agentsDesc": "编码代理配置", + "mcp": "MCP 服务器", + "mcpDesc": "模型上下文协议服务器", + "organizations": "组织设置", + "organizationsDesc": "管理组织成员和权限" + } + }, + "general": { + "loading": "加载设置中...", + "loadError": "加载配置失败。", + "save": { + "button": "保存设置", + "success": "✓ 设置保存成功!", + "error": "保存配置失败", + "unsavedChanges": "• 您有未保存的更改", + "discard": "放弃" + }, + "appearance": { + "title": "外观", + "description": "自定义应用程序的外观和感觉。", + "theme": { + "label": "主题", + "placeholder": "选择主题", + "helper": "选择您喜欢的配色方案。" + }, + "language": { + "label": "语言", + "placeholder": "选择语言", + "helper": "选择您喜欢的语言。浏览器默认将跟随您的系统语言。" + } + }, + "taskExecution": { + "title": "任务执行", + "description": "配置任务的执行和处理方式。", + "executor": { + "label": "默认代理配置", + "placeholder": "选择配置文件", + "helper": "选择创建任务尝试时使用的默认代理配置。" + }, + "variant": "默认", + "defaultLabel": "默认" + }, + "editor": { + "title": "编辑器", + "description": "配置您的代码编辑体验。", + "type": { + "label": "编辑器类型", + "placeholder": "选择编辑器", + "helper": "选择您喜欢的代码编辑器界面。" + }, + "customCommand": { + "label": "自定义编辑器命令", + "placeholder": "例如:code、subl、vim", + "helper": "输入启动自定义编辑器的命令。这将用于打开文件。" + }, + "remoteSsh": { + "host": { + "label": "远程 SSH 主机(可选)", + "placeholder": "例如:主机名或 IP 地址", + "helper": "如果 Vibe Kanban 在远程服务器上运行,请设置此项。设置后,点击在编辑器中打开将生成 URL 以通过 SSH 打开编辑器,而不是执行本地命令。" + }, + "user": { + "label": "远程 SSH 用户(可选)", + "placeholder": "例如:用户名", + "helper": "远程连接的 SSH 用户名。如果未设置,VS Code 将使用您的 SSH 配置或提示您输入。" + } + }, + "availability": { + "checking": "检查可用性...", + "available": "可用", + "notFound": "在 PATH 中未找到" + } + }, + "github": { + "title": "GitHub 集成", + "cliSetup": { + "title": "GitHub CLI 设置", + "description": "需要 GitHub CLI 身份验证才能创建拉取请求并与 GitHub 仓库交互。", + "setupWillTitle": "此设置将:", + "steps": { + "checkInstalled": "检查是否安装了 GitHub CLI (gh)", + "installHomebrew": "如果需要,通过 Homebrew 安装它(macOS)", + "authenticate": "使用 OAuth 进行 GitHub 身份验证" + }, + "setupNote": "设置将在聊天窗口中运行。您需要在浏览器中完成身份验证。", + "runSetup": "运行设置", + "running": "运行中...", + "errors": { + "brewMissing": "未安装 Homebrew。安装它以启用自动设置。", + "notSupported": "此平台不支持自动设置。请手动安装 GitHub CLI。", + "setupFailed": "运行 GitHub CLI 设置失败。" + }, + "help": { + "homebrew": { + "description": "自动安装需要 Homebrew。从", + "brewSh": "brew.sh", + "manualInstall": "安装 Homebrew,然后重新运行设置。或者,使用以下命令手动安装 GitHub CLI:", + "afterInstall": "安装后,使用以下命令进行身份验证:" + }, + "manual": { + "description": "从", + "officialDocs": "官方文档", + "andAuthenticate": "安装 GitHub CLI,然后使用您的 GitHub 账户进行身份验证。" + } + } + } + }, + "git": { + "title": "Git", + "description": "配置 git 分支命名偏好", + "branchPrefix": { + "label": "分支前缀", + "placeholder": "vk", + "helper": "自动生成的分支名称的前缀。留空表示无前缀。", + "preview": "预览:", + "previewWithPrefix": "{{prefix}}/1a2b-task-name", + "previewNoPrefix": "1a2b-task-name", + "errors": { + "slash": "前缀不能包含 '/'。", + "startsWithDot": "前缀不能以 '.' 开头。", + "endsWithDot": "前缀不能以 '.' 或 '.lock' 结尾。", + "invalidSequence": "包含无效序列(..、@{)。", + "invalidChars": "包含无效字符。", + "controlChars": "包含控制字符。" + } + } + }, + "notifications": { + "title": "通知", + "description": "控制何时以及如何接收通知。", + "sound": { + "label": "声音通知", + "helper": "任务尝试完成运行时播放声音。", + "fileLabel": "声音", + "filePlaceholder": "选择声音", + "fileHelper": "选择任务完成时播放的声音。点击音量按钮预览。" + }, + "push": { + "label": "推送通知", + "helper": "任务尝试完成运行时显示系统通知。" + } + }, + "privacy": { + "title": "隐私", + "description": "通过共享匿名使用数据帮助改进 Vibe-Kanban。", + "telemetry": { + "label": "启用遥测", + "helper": "启用匿名使用事件跟踪以帮助改进应用程序。不会收集提示或项目信息。" + } + }, + "taskTemplates": { + "title": "标签", + "description": "创建可使用 @tag_name 插入到任务描述中的可重用文本片段。" + }, + "tags": { + "manager": { + "title": "任务标签", + "addTag": "添加标签", + "noTags": "还没有标签。为常见任务描述创建可重用的文本片段。在任何任务中使用 @tag_name。", + "table": { + "tagName": "标签名称", + "content": "内容", + "actions": "操作" + }, + "actions": { + "editTag": "编辑标签", + "deleteTag": "删除标签" + }, + "deleteConfirm": "您确定要删除标签 {{tagName}} 吗?" + }, + "dialog": { + "createTitle": "创建标签", + "editTitle": "编辑标签", + "tagName": { + "label": "标签名称", + "required": "*", + "hint": "在任务描述中使用 @ 加此名称:@{{tagName}}", + "placeholder": "例如:bug_fix、test_plan、api_docs", + "error": "标签名称不能包含空格。请使用下划线代替(例如:my_tag)" + }, + "content": { + "label": "内容", + "required": "*", + "hint": "当您在任务描述中使用 @{{tagName}} 时将插入的文本", + "placeholder": "输入使用此标签时将插入的文本" + }, + "errors": { + "nameRequired": "标签名称是必需的", + "saveFailed": "保存标签失败" + }, + "buttons": { + "cancel": "取消", + "create": "创建", + "update": "更新" + } + } + }, + "safety": { + "title": "安全和免责声明", + "description": "重置安全警告和入门流程的确认。", + "disclaimer": { + "title": "免责声明确认", + "description": "重置安全免责声明。", + "button": "重置" + }, + "onboarding": { + "title": "入门流程", + "description": "重置入门流程。", + "button": "重置" + } + } + }, + "agents": { + "title": "编码代理配置", + "description": "使用不同的配置自定义编码代理的行为。", + "loading": "加载代理配置中...", + "save": { + "button": "保存代理配置", + "success": "✓ 执行器配置保存成功!" + }, + "availability": { + "checking": "检查中...", + "loginDetected": "检测到最近使用", + "loginDetectedTooltip": "找到此代理的最近身份验证凭据", + "installationFound": "检测到以前使用", + "installationFoundTooltip": "找到代理配置。您可能需要登录才能使用它。", + "notFound": "未找到", + "notFoundTooltip": "未检测到以前的使用。代理可能需要安装和/或登录。" + }, + "editor": { + "formLabel": "编辑 JSON", + "agentLabel": "代理", + "agentPlaceholder": "选择执行器类型", + "configLabel": "配置", + "configPlaceholder": "选择配置", + "createNew": "新建...", + "deleteTitle": "无法删除最后一个配置", + "deleteButton": "删除 {{name}}", + "deleteText": "删除", + "jsonLabel": "代理配置(JSON)", + "jsonPlaceholder": "加载配置文件中...", + "jsonLoading": "加载中...", + "pathLabel": "配置文件位置:" + }, + "errors": { + "deleteFailed": "删除配置失败。请重试。", + "saveFailed": "保存代理配置失败。请重试。", + "saveConfigFailed": "保存配置失败。请重试。" + } + }, + "mcp": { + "title": "MCP 服务器配置", + "description": "配置模型上下文协议服务器,使用自定义工具和资源扩展编码代理功能。", + "loading": "加载 MCP 配置中...", + "applying": "应用配置中...", + "labels": { + "agent": "代理", + "agentPlaceholder": "选择执行器", + "agentHelper": "选择要为其配置 MCP 服务器的代理。", + "serverConfig": "服务器配置(JSON)", + "popularServers": "热门服务器", + "serverHelper": "点击卡片将该 MCP 服务器插入到上面的 JSON 中。", + "saveLocation": "更改将保存到:" + }, + "loadingStates": { + "jsonEditor": "加载中...", + "configuration": "加载当前 MCP 服务器配置..." + }, + "errors": { + "loadFailed": "加载配置失败。", + "invalidJson": "无效的 JSON 格式", + "validationError": "验证错误", + "saveFailed": "保存 MCP 服务器失败", + "applyFailed": "应用 MCP 服务器配置失败", + "addServerFailed": "添加预配置服务器失败", + "mcpError": "MCP 配置错误:{{error}}", + "notSupported": "不支持 MCP", + "supportMessage": "要使用 MCP 服务器,请在上方选择支持 MCP 的其他执行器(Claude、Amp、Gemini、Codex 或 Opencode)。" + }, + "save": { + "button": "保存 MCP 配置", + "success": "设置已保存!", + "successMessage": "✓ MCP 配置保存成功!", + "loading": "加载当前 MCP 服务器配置..." + } + }, + "projects": { + "title": "项目配置", + "description": "配置特定于项目的脚本和设置。", + "loading": "加载项目中...", + "loadError": "加载项目失败。", + "selector": { + "label": "选择项目", + "placeholder": "选择要配置的项目", + "helper": "选择项目以查看和编辑其配置。", + "noProjects": "没有可用的项目" + }, + "general": { + "title": "常规设置", + "description": "配置基本项目信息。", + "name": { + "label": "项目名称", + "placeholder": "输入项目名称", + "helper": "此项目的显示名称。" + }, + "repoPath": { + "label": "Git 仓库路径", + "placeholder": "/path/to/your/existing/repo", + "helper": "磁盘上 git 仓库的绝对路径。" + } + }, + "scripts": { + "title": "脚本和配置", + "description": "为此项目配置设置、开发和清理脚本。", + "setup": { + "label": "设置脚本", + "helper": "此脚本将在创建工作树后、编码代理启动前运行。用于设置任务,如安装依赖项或准备环境。" + }, + "dev": { + "label": "开发服务器脚本", + "helper": "此脚本可以从任务尝试中运行以启动开发服务器。用于快速启动项目的开发服务器以测试更改。" + }, + "cleanup": { + "label": "清理脚本", + "helper": "此脚本仅在进行了更改后才在编码代理执行后运行。用于质量保证任务,如运行 linter、格式化程序、测试或其他验证步骤。如果没有进行更改,则跳过此脚本。" + }, + "copyFiles": { + "label": "复制文件", + "helper": "要从原始项目目录复制到工作树的文件的逗号分隔列表。这些文件将在创建工作树后但在运行设置脚本之前复制。对环境特定文件(如 .env、配置文件和本地设置)很有用。确保这些文件被 gitignore,否则它们可能会被提交!" + } + }, + "save": { + "button": "保存项目设置", + "success": "✓ 项目设置保存成功!", + "error": "保存项目设置失败", + "unsavedChanges": "• 您有未保存的更改", + "discard": "放弃", + "confirmSwitch": "您有未保存的更改。您确定要切换项目吗?您的更改将丢失。" + } + } + }, + "integrations": { + "github": { + "cliSetup": { + "title": "GitHub CLI 设置", + "description": "需要 GitHub CLI 身份验证才能创建拉取请求并与 GitHub 仓库交互。", + "setupWillTitle": "此设置将:", + "steps": { + "checkInstalled": "检查是否安装了 GitHub CLI (gh)", + "installHomebrew": "如果需要,通过 Homebrew 安装它(macOS)", + "authenticate": "使用 OAuth 进行 GitHub 身份验证" + }, + "setupNote": "设置将在聊天窗口中运行。您需要在浏览器中完成身份验证。", + "runSetup": "运行设置", + "running": "运行中...", + "errors": { + "brewMissing": "未安装 Homebrew。安装它以启用自动设置。", + "notSupported": "此平台不支持自动设置。请手动安装 GitHub CLI。", + "setupFailed": "运行 GitHub CLI 设置失败。" + }, + "help": { + "homebrew": { + "description": "自动安装需要 Homebrew。从", + "brewSh": "brew.sh", + "manualInstall": "安装 Homebrew,然后重新运行设置。或者,使用以下命令手动安装 GitHub CLI:", + "afterInstall": "安装后,使用以下命令进行身份验证:" + }, + "manual": { + "description": "从", + "officialDocs": "官方文档", + "andAuthenticate": "安装 GitHub CLI,然后使用您的 GitHub 账户进行身份验证。" + } + } + } + } + } +} \ No newline at end of file diff --git a/frontend/src/i18n/locales/zh-Hans/tasks.json b/frontend/src/i18n/locales/zh-Hans/tasks.json new file mode 100644 index 00000000..2ae0ee97 --- /dev/null +++ b/frontend/src/i18n/locales/zh-Hans/tasks.json @@ -0,0 +1,431 @@ +{ + "loading": "加载任务中...", + "empty": { + "noTasks": "未找到此项目的任务。", + "createFirst": "创建第一个任务", + "noSearchResults": "没有任务匹配您的搜索。" + }, + "actions": { + "addTask": "添加任务" + }, + "filters": { + "sharedToggleAria": "切换共享任务", + "sharedToggleTooltip": "显示/隐藏共享内容" + }, + "rebase": { + "common": { + "action": "变基", + "inProgress": "变基中...", + "withTarget": "变基到 {{branch}}" + }, + "dialog": { + "title": "变基任务尝试", + "description": "选择一个新的基础分支以将此任务尝试变基到其上。", + "upstreamLabel": "上游分支", + "upstreamPlaceholder": "选择上游分支", + "targetLabel": "目标分支", + "targetPlaceholder": "选择目标分支", + "advanced": "高级" + }, + "status": { + "inProgress": "变基进行中{{counts}}", + "needed": "需要变基{{dirty}}{{counts}}", + "dirtyMarker": "(脏)" + } + }, + "branches": { + "changeTarget": { + "dialog": { + "title": "更改目标分支", + "description": "为任务尝试选择新的目标分支。", + "placeholder": "选择目标分支", + "action": "更改分支", + "inProgress": "更改中..." + } + } + }, + "preview": { + "title": "预览", + "selectAttempt": "选择尝试以查看预览", + "troubleAlert": { + "title": "我们在预览您的应用程序时遇到问题:", + "item1": "开发服务器是否成功启动?可能有一个您需要解决的错误,或者可能需要安装依赖项。", + "item2": "您的开发服务器是否以格式打印 URL 和端口到终端", + "item2Suffix": "?(这就是我们如何知道它正在运行)", + "item3": "您是否安装了 Web Companion(点击编辑所需)?如果没有,请", + "item3Link": "按照此处的安装说明操作" + }, + "noServer": { + "title": "没有运行开发服务器", + "startPrompt": "请启动开发服务器以查看预览", + "setupPrompt": "要使用实时预览和点击编辑,请为此项目添加开发服务器脚本。", + "companionPrompt": "要使用点击编辑功能,请将浏览器伴侣添加到您的项目。", + "companionLink": "查看安装指南", + "startButton": "启动开发服务器", + "editButton": "编辑开发脚本", + "stopAndEditButton": "停止开发服务器并解决问题" + }, + "devScript": { + "saveAndStart": "保存并启动", + "saveOnly": "仅保存", + "saveChanges": "保存更改", + "cancel": "取消", + "errors": { + "notLoaded": "项目未加载", + "empty": "开发脚本不能为空" + } + }, + "logs": { + "title": "开发服务器日志", + "hide": "隐藏", + "show": "显示" + }, + "iframe": { + "title": "开发服务器预览" + }, + "toolbar": { + "refresh": "刷新预览", + "copyUrl": "复制 URL", + "openInTab": "在新标签页中打开", + "stopDevServer": "停止开发服务器" + } + }, + "diff": { + "viewModes": { + "inline": "内联视图", + "split": "分割视图" + }, + "ignoreWhitespace": "忽略空格更改", + "errorLoadingDiff": "加载差异失败:{{error}}", + "expandAll": "展开所有差异", + "collapseAll": "折叠所有差异", + "filesChanged_one": "{{count}} 个文件已更改", + "filesChanged_other": "{{count}} 个文件已更改", + "noChanges": "尚未进行任何更改" + }, + "taskPanel": { + "noTaskSelected": "未选择任务", + "loadingAttempts": "加载尝试中...", + "errorLoadingAttempts": "加载尝试失败", + "attemptsCount": "尝试({{count}})", + "noAttempts": "还没有尝试" + }, + "processes": { + "selectAttempt": "选择尝试以查看执行进程。", + "errorLoadingUpdates": "加载进程的实时更新失败。", + "reconnecting": "重新连接中...", + "loading": "加载执行进程中...", + "noProcesses": "未找到此尝试的执行进程。", + "processId": "进程 ID:{{id}}", + "deleted": "已删除", + "deletedTooltip": "因恢复而删除:时间轴已恢复到检查点,后续执行已被移除", + "agent": "代理:", + "exit": "退出:{{code}}", + "started": "开始:{{date}}", + "completed": "完成:{{date}}", + "detailsTitle": "进程详情", + "backToList": "返回列表", + "loadingDetails": "加载进程详情中...", + "errorLoadingDetails": "加载进程详情失败。请重试。", + "copyLogs": "复制日志", + "logsCopied": "已复制!" + }, + "taskHeader": { + "editTask": "编辑任务", + "deleteTask": "删除任务", + "closePanel": "关闭面板" + }, + "navigateToParent": "导航到父任务尝试", + "toolbar": { + "actions": "操作", + "noAttempts": "还没有尝试", + "startFirstAttempt": "开始您的第一次尝试以开始处理此任务", + "startAttempt": "开始尝试" + }, + "followUp": { + "stop": "停止", + "clearReviewComments": "清除审查评论", + "resolveConflicts": "解决冲突", + "send": "发送", + "unqueuing": "取消队列中...", + "edit": "编辑", + "queuing": "排队中...", + "queueForNextTurn": "排队到下一轮", + "queue": "队列", + "cancelQueue": "取消队列", + "queuedMessage": "消息已排队 - 将在当前运行完成时执行", + "runSetupScript": "运行设置脚本", + "runCleanupScript": "运行清理脚本", + "noSetupScript": "未为此项目配置设置脚本", + "noCleanupScript": "未为此项目配置清理脚本", + "scriptsDisabledWhileRunning": "进程运行时无法运行脚本" + }, + "todos": { + "title_one": "待办事项({{count}})", + "title_other": "待办事项({{count}})" + }, + "attempt": { + "actions": { + "openInIde": "在 IDE 中打开", + "openMenu": "打开菜单", + "startDevServer": "启动开发服务器", + "stopDevServer": "停止开发服务器" + }, + "labels": { + "attempt": "尝试", + "agent": "代理", + "branch": "分支", + "diffs": "差异", + "summaryAndActions": "摘要和操作" + }, + "agent": "代理", + "path": "路径", + "openInEditor": "在 {{editor}} 中查看更改", + "copied": "已复制!", + "clickToCopy": "复制工作树路径", + "stopDev": "停止开发", + "pauseDev": "暂停开发", + "startDev": "启动开发", + "viewDevLogs": "查看开发服务器日志", + "stopping": "停止中...", + "stopAttempt": "停止尝试", + "newAttempt": "新尝试", + "viewHistory": "查看尝试历史", + "createSubtask": "创建子任务", + "preview": "预览", + "diffs": "差异", + "gitActions": "Git 操作", + "tryAgain": "重试", + "runSetup": "运行设置", + "setupHelpText": "{{agent}} 未正确设置。点击运行设置以安装并登录。", + "devScriptMissingTooltip": "要启动开发服务器,请为此项目添加开发脚本" + }, + "git": { + "labels": { + "taskBranch": "任务分支" + }, + "branch": { + "current": "当前" + }, + "forcePushDialog": { + "title": "需要强制推送", + "description": "远程分支{{branchLabel}}已与您的本地分支分离。常规推送被拒绝。", + "warning": "强制推送将用您的本地更改覆盖远程更改。此操作无法撤消。", + "note": "仅当您确定要替换远程分支历史记录时才继续。", + "error": "强制推送失败" + }, + "status": { + "commits_one": "提交", + "commits_other": "提交", + "conflicts": "冲突", + "upToDate": "最新", + "ahead": "领先", + "behind": "落后" + }, + "states": { + "merged": "已合并!", + "merging": "合并中...", + "merge": "合并", + "rebasing": "变基中...", + "rebase": "变基", + "pushed": "已推送!", + "pushing": "推送中...", + "push": "推送", + "forcePush": "强制推送", + "forcePushing": "强制推送中...", + "creating": "创建中...", + "createPr": "创建 PR" + }, + "errors": { + "changeTargetBranch": "更改目标分支失败", + "pushChanges": "推送更改失败", + "mergeChanges": "合并更改失败", + "rebaseBranch": "变基分支失败" + }, + "pr": { + "open": "打开 PR #{{number}}", + "number": "PR #{{number}}" + }, + "actions": { + "title": "Git 操作", + "prMerged": "PR #{{number}} 已合并", + "loginRequired": { + "title": "登录以管理 git 操作", + "description": "登录 Vibe Kanban,以便您可以推送分支、合并更改或为此任务打开拉取请求。", + "action": "登录" + } + } + }, + "createAttemptDialog": { + "title": "创建尝试", + "description": "使用编码代理开始新的尝试。将创建 git 工作树和任务分支。", + "baseBranch": "基础分支", + "loadingBranches": "加载分支中...", + "selectBranch": "选择分支", + "error": "创建尝试失败。请重试。", + "creating": "创建中...", + "start": "开始" + }, + "viewProcessesDialog": { + "title": "执行进程" + }, + "viewRelatedTasksDialog": { + "title": "相关任务", + "empty": "此尝试没有相关任务", + "error": "加载相关任务失败", + "tasksCount": "任务({{count}})", + "columns": { + "title": "标题", + "description": "描述", + "status": "状态" + } + }, + "attemptHeaderActions": { + "preview": "预览", + "diffs": "差异", + "relatedTasks": "相关任务" + }, + "actionsMenu": { + "attempt": "尝试", + "openInIde": "在 IDE 中打开尝试", + "viewProcesses": "查看进程", + "viewRelatedTasks": "查看相关任务", + "createNewAttempt": "创建新尝试", + "createSubtask": "创建子任务", + "gitActions": "Git 操作", + "editBranchName": "编辑分支名称", + "task": "任务", + "share": "共享", + "reassign": "重新分配", + "stopShare": "停止共享", + "duplicate": "复制" + }, + "editBranchName": { + "dialog": { + "title": "编辑分支名称", + "description": "输入分支的新名称。如果存在未关闭的 PR,则无法重命名。", + "branchNameLabel": "分支名称", + "placeholder": "例如:feature/my-branch", + "renaming": "重命名中...", + "action": "重命名分支" + } + }, + "stopShareDialog": { + "title": "停止共享任务", + "description": "停止与您的组织共享 {{title}} ?", + "warning": "停止与您的组织共享任务,但保留您的本地任务。", + "confirm": "停止共享任务", + "inProgress": "停止共享中...", + "genericError": "停止共享任务失败。请重试。" + }, + "shareDialog": { + "title": "共享任务", + "description": "与您的组织共享 {{title}} ?", + "success": "任务共享成功。", + "genericError": "共享任务失败。请重试。", + "loadingSystem": "加载账户状态中...", + "loginRequired": { + "title": "登录以继续", + "description": "您需要登录才能共享任务。我们将重定向您到登录页面。", + "action": "前往登录" + }, + "githubRequired": { + "title": "连接 GitHub", + "description": "连接您的 GitHub 账户以共享任务。此项目必须在 GitHub 上有远程仓库。", + "action": "连接 GitHub" + }, + "linkProjectRequired": { + "description": "在共享任务之前,将此项目链接到组织。", + "action": "链接项目" + }, + "confirmationTitle": "确认共享", + "confirmationBody": "共享将发布此任务到您的共享工作区。", + "cancel": "取消", + "confirm": "共享任务", + "inProgress": "共享中...", + "closeButton": "关闭" + }, + "createPrDialog": { + "title": "创建 GitHub 拉取请求", + "description": "在 GitHub 上为此任务尝试创建拉取请求。", + "titleLabel": "标题", + "titlePlaceholder": "输入 PR 标题", + "descriptionLabel": "描述(可选)", + "descriptionPlaceholder": "输入 PR 描述", + "baseBranchLabel": "基础分支", + "loadingBranches": "加载分支中...", + "selectBaseBranch": "选择基础分支", + "creating": "创建中...", + "createButton": "创建 PR", + "errors": { + "insufficientPermissions": "权限不足。请确保 GitHub CLI 具有必要的权限。", + "repoNotFoundOrNoAccess": "未找到仓库或无访问权限。请检查您的仓库访问权限并确保您已通过身份验证。", + "failedToCreate": "创建 GitHub PR 失败", + "gitCliNotLoggedIn": "Git 未通过身份验证。运行 gh auth login(或配置 Git 凭据)然后重试。", + "gitCliNotInstalled": "未安装 Git CLI。安装 Git 以创建 PR。", + "targetBranchNotFound": "远程上不存在目标分支 {{branch}}。请在创建拉取请求之前确保该分支存在。" + }, + "loginRequired": { + "title": "登录以创建拉取请求", + "description": "您需要登录才能为此任务打开拉取请求。我们将带您到登录页面。", + "action": "登录" + } + }, + "showcases": { + "taskPanel": { + "companion": { + "title": "Vibe Kanban Companion 点选功能", + "description": "点击预览窗口中的任何 UI 组件以精确选择它。编码代理接收确切的 DOM 选择器和组件层次结构,消除模糊的反馈。" + }, + "installation": { + "title": "开发服务器和 Companion 安装", + "description": "为预览设置开发服务器命令,在设置中可配置设置脚本。使用编码代理自动安装 Vibe Kanban Web Companion。" + }, + "codeReview": { + "title": "内置代码审查", + "description": "使用加号图标直接在差异视图中添加特定行的评论。所有反馈都被收集并作为完整审查发送给编码代理。" + }, + "pullRequest": { + "title": "从任务创建 PR", + "description": "直接从任务尝试合并您的更改或创建拉取请求。PR 对话框会从您的任务详情预填充标题和描述,以简化工作流程。" + }, + "tags": { + "title": "自定义提示标签", + "description": "将自定义提示保存为标签,并将其嵌入到新任务或后续消息中。重用常见说明以保持工作流程的一致性。" + } + }, + "buttons": { + "previous": "上一个", + "next": "下一个", + "finish": "完成" + } + }, + "taskFormDialog": { + "createTitle": "创建新任务", + "editTitle": "编辑任务", + "titlePlaceholder": "任务标题", + "descriptionPlaceholder": "添加更多详情(可选)。输入 @ 搜索文件。", + "statusLabel": "状态", + "statusOptions": { + "todo": "待办", + "inprogress": "进行中", + "inreview": "审查中", + "done": "完成", + "cancelled": "已取消" + }, + "startLabel": "开始", + "attachImage": "附加图片", + "dropImagesHere": "在此处放置图片", + "updating": "更新中...", + "updateTask": "更新任务", + "starting": "开始中...", + "creating": "创建中...", + "create": "创建", + "discardDialog": { + "title": "放弃未保存的更改?", + "description": "您有未保存的更改。您确定要放弃它们吗?", + "continueEditing": "继续编辑", + "discardChanges": "放弃更改" + } + } +} \ No newline at end of file diff --git a/shared/types.ts b/shared/types.ts index e1847560..bdfec67b 100644 --- a/shared/types.ts +++ b/shared/types.ts @@ -286,7 +286,7 @@ export type GitHubConfig = { pat: string | null, oauth_token: string | null, use export enum SoundFile { ABSTRACT_SOUND1 = "ABSTRACT_SOUND1", ABSTRACT_SOUND2 = "ABSTRACT_SOUND2", ABSTRACT_SOUND3 = "ABSTRACT_SOUND3", ABSTRACT_SOUND4 = "ABSTRACT_SOUND4", COW_MOOING = "COW_MOOING", PHONE_VIBRATION = "PHONE_VIBRATION", ROOSTER = "ROOSTER" } -export type UiLanguage = "BROWSER" | "EN" | "JA" | "ES" | "KO"; +export type UiLanguage = "BROWSER" | "EN" | "JA" | "ES" | "KO" | "ZH_HANS"; export type ShowcaseState = { seen_features: Array, };