Files
vibe-kanban/frontend/src/i18n/locales/zh-Hans/settings.json
Alex Netsch ec8666da74 Add configurable working directory for dev server scripts (Vibe Kanban) (#1559)
* The implementation is complete. Here's a summary of all the changes made:

## Summary

Added the ability for users to specify a working directory for dev server scripts:

### Files Changed:

1. **Database migration** - `crates/db/migrations/20251216000000_add_dev_script_working_dir_to_projects.sql`
   - Added `dev_script_working_dir TEXT DEFAULT ''` column

2. **Rust model** - `crates/db/src/models/project.rs`
   - Added `dev_script_working_dir` field to `Project` and `UpdateProject` structs
   - Updated all SQL queries

3. **Dev server execution** - `crates/server/src/routes/task_attempts.rs`
   - `start_dev_server` now passes `project.dev_script_working_dir` to the script executor

4. **Backfill logic** - `crates/services/src/services/container.rs`
   - Changed `backfill_repo_names` to set `dev_script_working_dir` instead of prepending `cd ./repo &&`

5. **Frontend UI** - `frontend/src/pages/settings/ProjectSettings.tsx`
   - Added input field for "Dev Server Working Directory"

6. **Translations** - `frontend/src/i18n/locales/en/settings.json`
   - Added `devWorkingDir` label, placeholder, and helper text

7. **TypeScript types** - `shared/types.ts`
   - Regenerated with `dev_script_working_dir` field

* Cleanup script changes for task attempt 83423e2d-0d45-47fb-a6e4-dd91a2140f91

* Both packages compile successfully. The fix is complete:

1. **`project.rs`**: Removed `.or()` fallback for `dev_script` and `dev_script_working_dir` so `None` now clears the field
2. **`container.rs`**: Updated backfill to explicitly pass the existing project name instead of `None`

* Done. I've completed both review tasks:

1. Removed the comment from `container.rs` line 384
2. Added `devWorkingDir` translations to all four language files (es, ja, ko, zh-Hans) with:
   - `label`: The field label
   - `placeholder`: Example placeholder text
   - `helper`: Description of what the field does

I also updated the `dev.helper` text in each language to reference the new working directory option instead of suggesting users manually `cd` into the repo directory.

* Done. Removed both comments:
1. Removed the comment from the migration file
2. Removed the comment from `task_attempts.rs` line 1267

* Fixed. The TypeScript error in `NoServerContent.tsx` has been resolved by adding `dev_script_working_dir: null` to the `UpdateProject` data. All checks pass:

-  `npm run format` - completed
-  `npm run lint` - passed (frontend and backend)
-  `npx tsc --noEmit` - passed

* The Korean and Chinese translations already had the updated copy without the `cd` reference. The Spanish and Japanese were updated. All the translations now have the proper helper text that references the working directory field instead of telling users to manually `cd` into the repo.

* Done. I've removed the `cd my_website` line from both the Windows and Unix script placeholder examples in `scriptPlaceholders.ts`. Now the placeholder examples just show `npm run dev` without the `cd` command, since users can specify the working directory separately.
2025-12-16 12:19:15 +00:00

407 lines
16 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"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": "包含控制字符。"
}
}
},
"pullRequests": {
"title": "拉取请求",
"description": "配置PR创建行为",
"autoDescription": {
"label": "默认自动生成PR描述",
"helper": "启用后AI代理将在创建PR后自动更新标题和描述。"
},
"customPrompt": {
"useCustom": "使用自定义提示",
"helper": "生成PR描述时AI代理使用的自定义提示。使用{pr_number}和{pr_url}作为占位符。"
}
},
"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": "此脚本从工作树内部运行,在创建后、编码代理启动前执行。用于设置任务,如安装依赖项或准备环境。",
"parallelLabel": "与编码代理并行运行设置脚本",
"parallelHelper": "启用后,设置脚本将与编码代理同时运行,而不是等待设置完成后再启动。"
},
"dev": {
"label": "开发服务器脚本",
"helper": "从任务尝试中启动开发服务器。脚本从工作区目录(每个仓库工作树的上一级)执行,除非在下方指定了工作目录。"
},
"devWorkingDir": {
"label": "开发服务器工作目录",
"placeholder": "例如my-repo",
"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 账户进行身份验证。"
}
}
}
}
}
}