Merge pull request #304: fix(i18n): restore locale validation on Windows

# Conflicts:
#	internal/i18n/locales/en-US.json
#	internal/i18n/locales/zh-CN.json
This commit is contained in:
wbtiger 2026-07-14 21:57:40 +08:00
commit a0668a3c96
3 changed files with 8 additions and 60 deletions

2
.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
.gitattributes text eol=lf
internal/i18n/locales/*.json text eol=lf

View File

@ -5,7 +5,6 @@
"cmd.auth.logout.short": "Logout from GitLink",
"cmd.auth.short": "Authentication commands",
"cmd.auth.status.short": "Show authentication status",
"cmd.branch.all.short": "List all branch names (no pagination)",
"cmd.branch.create.short": "Create a branch",
"cmd.branch.delete.short": "Delete a branch",
"cmd.branch.list.short": "List branches",
@ -35,7 +34,7 @@
"cmd.dataset.view.short": "View a repository's dataset",
"cmd.doctor.long": "Run local diagnostics for gitlink-cli configuration, authentication, repository context and API connectivity.",
"cmd.doctor.short": "Diagnose gitlink-cli environment problems",
"cmd.ignore.short": "Gitignore template operations",
"cmd.ignore.short": "Ignore-file template operations",
"cmd.issue.batch_close.long": "Close filtered issues in bulk.\n\nThis command defaults to dry-run mode and only prints matching issues.\nPass --yes to execute remote close operations. Use restrictive filters and a small limit.\n\nExamples:\n gitlink-cli issue +batch-close --owner Gitlink --repo gitlink-cli --older-than-days 60 --limit 20\n gitlink-cli issue +batch-close --owner Gitlink --repo gitlink-cli --older-than-days 60 --limit 20 --yes",
"cmd.issue.batch_close.short": "Close filtered issues in bulk. Defaults to dry-run; pass --yes to execute.",
"cmd.issue.batch_label.long": "Add a label to filtered issues in bulk.\n\nThis command defaults to dry-run mode and only prints matching issues.\nPass --yes to execute remote label operations. The current implementation does not fake label writes when the API endpoint is unavailable.\n\nExamples:\n gitlink-cli issue +batch-label --owner Gitlink --repo gitlink-cli --add-label stale --older-than-days 30 --limit 50\n gitlink-cli issue +batch-label --owner Gitlink --repo gitlink-cli --add-label stale --older-than-days 30 --limit 50 --yes",
@ -45,9 +44,7 @@
"cmd.issue.close.short": "Close an issue",
"cmd.issue.comment.short": "Add a comment to an issue",
"cmd.issue.create.short": "Create a new issue",
"cmd.issue.delete.short": "Delete an issue",
"cmd.issue.list.short": "List issues",
"cmd.issue.reopen.short": "Reopen a closed issue",
"cmd.issue.short": "Issue operations",
"cmd.issue.update.short": "Update an issue",
"cmd.issue.view.short": "View issue details",
@ -56,8 +53,6 @@
"cmd.org.list.short": "List organizations",
"cmd.org.members.short": "List organization members",
"cmd.org.short": "Organization operations",
"cmd.pr.checkout.long": "Fetch the head branch of a pull request into the current git repository and check it out, mirroring `gh pr checkout`. Fork pull requests are fetched from the fork clone URL automatically.",
"cmd.pr.checkout.short": "Check out a pull request branch locally",
"cmd.pr.close.short": "Close a pull request",
"cmd.pr.comment.short": "Add a comment to a pull request",
"cmd.pr.create.short": "Create a pull request",
@ -87,14 +82,11 @@
"cmd.release.list.short": "List releases",
"cmd.release.short": "Release operations",
"cmd.release.view.short": "View release details",
"cmd.repo.blob.short": "Fetch a git blob object by SHA",
"cmd.repo.create.short": "Create a new repository",
"cmd.repo.delete.short": "Delete a repository",
"cmd.repo.fork.short": "Fork a repository",
"cmd.repo.git_tree.short": "List entries of a git tree object by SHA or ref",
"cmd.repo.info.short": "Show repository details",
"cmd.repo.list.short": "List repositories for a user or organization",
"cmd.repo.rename.short": "Rename the current repository",
"cmd.repo.short": "Repository operations",
"cmd.repo.tree.short": "List repository files and directories",
"cmd.root.long": "Manage repositories, issues, pull requests, releases, CI and workflows on GitLink.",
@ -121,7 +113,6 @@
"error.config.save_failed": "failed to save config: {message}",
"error.dataset.delete_confirm": "dataset attachment deletion is destructive; run --dry-run first, then pass --yes to confirm",
"error.missing_required_flag": "required flag --{name} is missing",
"error.pr.checkout_head_missing": "pull request response did not include a head branch; check the PR id",
"error.profile.user_required": "could not determine target user; pass --user or run gitlink-cli auth login",
"error.unsupported_language": "unsupported language: {lang}",
"flag.api.batch_continue_on_error": "Continue running remaining batch requests after a failure",
@ -135,7 +126,6 @@
"flag.api.query": "Query parameters (key=val&key2=val2)",
"flag.auth.token": "Login by pasting an existing token",
"flag.branch.from": "Source branch or commit",
"flag.branch.keyword": "Filter branches by name keyword",
"flag.branch.name": "Branch name",
"flag.ci.build": "Build number",
"flag.ci.stage": "Stage number",
@ -169,7 +159,6 @@
"flag.issue.batch_list.limit": "Maximum issues to return, capped at 100",
"flag.issue.batch_process.limit": "Maximum issues to process, capped at 100",
"flag.issue.body": "Issue description",
"flag.issue.delete.yes": "Confirm issue deletion",
"flag.issue.label": "Label ID",
"flag.issue.label_filter": "Filter by existing label",
"flag.issue.milestone": "Milestone ID",
@ -193,13 +182,11 @@
"flag.pr.assignee_id": "Assignee user ID",
"flag.pr.base": "Target branch",
"flag.pr.body": "PR description",
"flag.pr.checkout_branch": "Local branch name (defaults to the PR head branch)",
"flag.pr.file": "Filter diff by file path",
"flag.pr.head": "Source branch",
"flag.pr.id": "Compatibility alias for --number",
"flag.pr.id": "PR number",
"flag.pr.merge_method": "Merge method: merge, rebase, squash",
"flag.pr.milestone_id": "Milestone ID",
"flag.pr.number": "PR number from the web URL (preferred)",
"flag.pr.priority_id": "Priority ID",
"flag.pr.review_commit": "Commit SHA to attach the review to",
"flag.pr.review_content": "Review content",
@ -224,12 +211,8 @@
"flag.repo": "Repository name (auto-detected from git remote)",
"flag.repo.category": "Filter: manage/mirror/sync/fork/all (default: manage)",
"flag.repo.description": "Repository description",
"flag.repo.git.decode": "Print decoded blob content instead of the JSON envelope",
"flag.repo.git.recursive": "Recurse into subtrees",
"flag.repo.git.sha": "Object SHA (git-tree also accepts a branch/tag ref)",
"flag.repo.name": "Repository name",
"flag.repo.private": "Make repository private (true/false)",
"flag.repo.rename.name": "New repository name and identifier (changes the remote URL)",
"flag.repo.tree.path": "Directory path to list (default: repository root)",
"flag.repo.tree.ref": "Branch, tag, or commit ref",
"flag.search.keyword": "Search keyword",
@ -285,15 +268,5 @@
"success.config.set": "✓ {key} = {value}",
"warning.auth.not_logged_in": "✗ Not logged in",
"warning.auth.token_unverified": "✓ Token stored (but cannot verify: {message})",
"warning.auth.user_unavailable": "✓ Token stored (user info unavailable)",
"cmd.ignore.short": "Ignore file template operations",
"cmd.pipeline.short": "Pipeline operations",
"cmd.compare.short": "Compare branches, tags, or commits",
"cmd.wiki.short": "Wiki page management",
"cmd.health.short": "Project health data collection",
"cmd.workflow.short": "AI agent workflow analysis",
"cmd.label.short": "Issue label operations",
"cmd.license.short": "License operations",
"cmd.member.short": "Repository member operations",
"cmd.milestone.short": "Milestone operations"
"warning.auth.user_unavailable": "✓ Token stored (user info unavailable)"
}

View File

@ -5,7 +5,6 @@
"cmd.auth.logout.short": "退出 GitLink 登录",
"cmd.auth.short": "认证命令",
"cmd.auth.status.short": "显示认证状态",
"cmd.branch.all.short": "列出全部分支名(不分页)",
"cmd.branch.create.short": "创建分支",
"cmd.branch.delete.short": "删除分支",
"cmd.branch.list.short": "列出分支",
@ -35,7 +34,7 @@
"cmd.dataset.view.short": "查看仓库数据集",
"cmd.doctor.long": "诊断 gitlink-cli 的配置、认证、仓库上下文和 API 连通性问题。",
"cmd.doctor.short": "诊断 gitlink-cli 环境问题",
"cmd.ignore.short": "Gitignore 模板操作",
"cmd.ignore.short": "忽略文件模板操作",
"cmd.issue.batch_close.long": "批量关闭筛选后的议题。\n\n该命令默认处于 dry-run 模式,只打印匹配的议题。\n传入 --yes 后执行远端关闭操作。请使用严格筛选条件和较小 limit。\n\n示例\n gitlink-cli issue +batch-close --owner Gitlink --repo gitlink-cli --older-than-days 60 --limit 20\n gitlink-cli issue +batch-close --owner Gitlink --repo gitlink-cli --older-than-days 60 --limit 20 --yes",
"cmd.issue.batch_close.short": "批量关闭筛选后的议题。默认 dry-run传入 --yes 后执行。",
"cmd.issue.batch_label.long": "给筛选后的议题批量添加标签。\n\n该命令默认处于 dry-run 模式,只打印匹配的议题。\n传入 --yes 后执行远端标签操作。当前实现不会在 API 端点不可用时伪造写入结果。\n\n示例\n gitlink-cli issue +batch-label --owner Gitlink --repo gitlink-cli --add-label stale --older-than-days 30 --limit 50\n gitlink-cli issue +batch-label --owner Gitlink --repo gitlink-cli --add-label stale --older-than-days 30 --limit 50 --yes",
@ -45,9 +44,7 @@
"cmd.issue.close.short": "关闭议题",
"cmd.issue.comment.short": "给议题添加评论",
"cmd.issue.create.short": "创建新议题",
"cmd.issue.delete.short": "删除议题",
"cmd.issue.list.short": "列出议题",
"cmd.issue.reopen.short": "重新打开已关闭的议题",
"cmd.issue.short": "议题操作",
"cmd.issue.update.short": "更新议题",
"cmd.issue.view.short": "查看议题详情",
@ -56,8 +53,6 @@
"cmd.org.list.short": "列出组织",
"cmd.org.members.short": "列出组织成员",
"cmd.org.short": "组织操作",
"cmd.pr.checkout.long": "把 PR 的 head 分支抓取到当前 git 仓库并检出,对标 `gh pr checkout`。来自 fork 的 PR 会自动从 fork 克隆地址抓取。",
"cmd.pr.checkout.short": "在本地检出 PR 分支",
"cmd.pr.close.short": "关闭拉取请求",
"cmd.pr.comment.short": "给拉取请求添加评论",
"cmd.pr.create.short": "创建拉取请求",
@ -87,14 +82,11 @@
"cmd.release.list.short": "列出发布",
"cmd.release.short": "发布操作",
"cmd.release.view.short": "查看发布详情",
"cmd.repo.blob.short": "按 SHA 获取 git blob 对象",
"cmd.repo.create.short": "创建新仓库",
"cmd.repo.delete.short": "删除仓库",
"cmd.repo.fork.short": "Fork 仓库",
"cmd.repo.git_tree.short": "按 SHA 或 ref 列出 git tree 对象条目",
"cmd.repo.info.short": "显示仓库详情",
"cmd.repo.list.short": "列出用户或组织的仓库",
"cmd.repo.rename.short": "重命名当前仓库",
"cmd.repo.short": "仓库操作",
"cmd.repo.tree.short": "列出仓库文件和目录",
"cmd.root.long": "用于管理 GitLink 上的仓库、议题、拉取请求、发布、CI 和工作流。",
@ -121,7 +113,6 @@
"error.config.save_failed": "保存配置失败:{message}",
"error.dataset.delete_confirm": "删除数据集附件具有破坏性;请先 --dry-run 预览,再传 --yes 确认",
"error.missing_required_flag": "缺少必需参数 --{name}",
"error.pr.checkout_head_missing": "PR 响应缺少 head 分支,请检查 PR id 是否正确",
"error.profile.user_required": "无法确定目标用户;请通过 --user 指定,或先运行 gitlink-cli auth login 登录",
"error.unsupported_language": "不支持的语言:{lang}",
"flag.api.batch_continue_on_error": "批处理请求失败后继续执行后续请求",
@ -135,7 +126,6 @@
"flag.api.query": "查询参数key=val&key2=val2",
"flag.auth.token": "通过粘贴已有 Token 登录",
"flag.branch.from": "源分支或 Commit",
"flag.branch.keyword": "按名称关键字过滤分支",
"flag.branch.name": "分支名称",
"flag.ci.build": "构建编号",
"flag.ci.stage": "阶段编号",
@ -169,7 +159,6 @@
"flag.issue.batch_list.limit": "最多返回的议题数,上限 100",
"flag.issue.batch_process.limit": "最多处理的议题数,上限 100",
"flag.issue.body": "议题描述",
"flag.issue.delete.yes": "确认删除议题",
"flag.issue.label": "标签 ID",
"flag.issue.label_filter": "按已有标签筛选",
"flag.issue.milestone": "里程碑 ID",
@ -193,13 +182,11 @@
"flag.pr.assignee_id": "指派人用户 ID",
"flag.pr.base": "目标分支",
"flag.pr.body": "PR 描述",
"flag.pr.checkout_branch": "本地分支名(默认使用 PR 的 head 分支名)",
"flag.pr.file": "按文件路径筛选 diff",
"flag.pr.head": "源分支",
"flag.pr.id": "--number 的兼容别名",
"flag.pr.id": "PR 编号",
"flag.pr.merge_method": "合并方式merge、rebase、squash",
"flag.pr.milestone_id": "里程碑 ID",
"flag.pr.number": "网页 URL 中的 PR 编号(首选)",
"flag.pr.priority_id": "优先级 ID",
"flag.pr.review_commit": "关联评审的 Commit SHA",
"flag.pr.review_content": "评审内容",
@ -224,12 +211,8 @@
"flag.repo": "仓库名称(自动从 git remote 检测)",
"flag.repo.category": "筛选manage/mirror/sync/fork/all默认manage",
"flag.repo.description": "仓库描述",
"flag.repo.git.decode": "直接输出解码后的 blob 内容而非 JSON 包裹",
"flag.repo.git.recursive": "递归子目录",
"flag.repo.git.sha": "对象 SHAgit-tree 也接受分支/标签 ref",
"flag.repo.name": "仓库名称",
"flag.repo.private": "设为私有仓库true/false",
"flag.repo.rename.name": "新的仓库名称与标识(会改变远程 URL",
"flag.repo.tree.path": "要列出的目录路径(默认:仓库根目录)",
"flag.repo.tree.ref": "分支、标签或提交引用",
"flag.search.keyword": "搜索关键词",
@ -285,15 +268,5 @@
"success.config.set": "✓ 已设置 {key} = {value}",
"warning.auth.not_logged_in": "✗ 未登录",
"warning.auth.token_unverified": "✓ Token 已保存(但无法验证:{message}",
"warning.auth.user_unavailable": "✓ Token 已保存(用户信息不可用)",
"cmd.ignore.short": "忽略文件模板操作",
"cmd.pipeline.short": "流水线操作",
"cmd.compare.short": "比较分支、标签或提交",
"cmd.wiki.short": "Wiki 页面管理",
"cmd.health.short": "项目健康度数据采集",
"cmd.workflow.short": "AI Agent 工作流分析",
"cmd.label.short": "Issue 标签操作",
"cmd.license.short": "许可证操作",
"cmd.member.short": "仓库成员操作",
"cmd.milestone.short": "里程碑操作"
"warning.auth.user_unavailable": "✓ Token 已保存(用户信息不可用)"
}