Files
market/scripts/i18n/glossary.json
Yige 1f7c8b9673 feat: skills i18n 改造(schemaVersion 1.1,零向后兼容) (#1)
* feat: skills i18n 改造 — schemaVersion 1.1,零向后兼容

把 21 个 skills + 1 个 agent + manifest/categories 全量迁移到 schemaVersion 1.1
的 i18n 结构,配套 CI AI 翻译流水线(GitHub Models)与本地工具链。

## 关键变更

### 数据结构(破坏性,schemaVersion 1.0 → 1.1)
- SKILL.md: 顶层 name 改为 ASCII slug(== 目录名,符合 agentskills.io 规范);
  中文显示名/short_desc/description 全部迁入 metadata.i18n.<locale>
- agents/<id>/agent.json: shortDesc/fullDesc/tags/persona.{role,traits} 迁入
  i18n.<locale>;changelog[].changes 改为 { <locale>: string[] } 对象
- categories.json: 每个分类的 label/description 迁入 i18n.<locale>,顶层只剩
  color/icon
- manifest.json: 加 supportedLocales / defaultLocale;顶层 description 迁入
  i18n.<locale>

### Body 文件结构
- 根 SKILL.md = frontmatter + default_locale (en-US) body
- SKILL.<locale>.md = 各 locale 的 markdown body(首行 <!-- locale: xx --> 自校验)

### 工具链(scripts/i18n/)
- glossary.json: zh→en 术语表 + do_not_translate 白名单
- schema/skill-frontmatter.schema.json: i18n frontmatter JSON Schema
- validate-i18n.py: 8 条校验规则(name 合规 / locale 完整性 / hash 一致性等)
- translate.py: GitHub Models / Anthropic 双 backend,sha256 增量翻译
- migrate.py: 一次性迁移脚本(旧格式 → i18n 结构)

### CI(.github/workflows/)
- i18n-validate.yml: PR 触发跑 validate + translate --check
- i18n-translate.yml: PR 触发用 GitHub Models(默认 openai/gpt-5-mini)翻译缺失
  locale,自动追加 commit;可切到 ANTHROPIC_API_KEY 走 Claude

### 文档
- docs/I18N.md: 作者贡献指南(schema 说明 / 提交流程 / 常见问题)
- README.md: 加多语言段落

## 验证

- uv run scripts/i18n/validate-i18n.py: OK,49 文件 0 错误
- uv run scripts/i18n/translate.py --check: 0 stale locale
- 21 skills 标题数 zh-CN == en-US 严格对齐(最大 66=66)
- skills-ref 规范校验:全部通过(顶层 name ASCII slug + description 单字段)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(i18n): 修复 PR #1 review 反馈的 6 项问题

- schema: translated_by 正则放宽为 ^(human|ai:[A-Za-z0-9._:/-]+)$,接受
  'ai:github:openai/gpt-5-mini' 这类 backend:model 形式(CI 翻译输出格式)
- README + docs/I18N.md: 修正"CI 用 Claude API"误导描述,正确说明默认是
  GitHub Models(openai/gpt-5-mini)+ GITHUB_TOKEN,可选切到 Anthropic
- skills/minimax-tts/SKILL.md & SKILL.zh-CN.md: 删除多余的 ``` 闭合,避免
  Markdown 后续渲染错乱
- skills/docx/SKILL.md: 翻译时丢失的 • Unicode escape 示例已恢复,
  与 zh-CN 版本对齐

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 00:26:33 +08:00

228 lines
5.9 KiB
JSON

{
"$schema": "./schema/glossary.schema.json",
"_comment": "DesireCore Market i18n glossary. Used by translate.py to keep terminology consistent across skills. Add domain-specific entries as new skills are added.",
"version": "1.0.0",
"default_source_locale": "zh-CN",
"default_target_locale": "en-US",
"terms": {
"zh-CN_to_en-US": {
"智能体": "Agent",
"技能": "Skill",
"工具": "Tool",
"市场": "Market",
"工作流": "workflow",
"黄金样本": "gold sample",
"触发词": "trigger keyword",
"落地页": "landing page",
"仪表盘": "Dashboard",
"海报": "poster",
"登录态": "logged-in session",
"联网访问": "Web Access",
"网页抓取": "page fetching",
"网络搜索": "web search",
"联网搜索": "web search",
"调研": "research",
"公文": "official document",
"备忘录": "memo",
"合同": "contract",
"信函": "letter",
"信函模板": "letter template",
"报告": "report",
"发票": "invoice",
"目录": "table of contents",
"页眉页脚": "header and footer",
"页码": "page number",
"脚注": "footnote",
"尾注": "endnote",
"修订": "tracked changes",
"批注": "comment",
"签名": "signature",
"表单": "form",
"字段": "field",
"电子表格": "spreadsheet",
"工作表": "worksheet",
"数据透视表": "pivot table",
"图表": "chart",
"幻灯片": "slide",
"演示文稿": "presentation",
"幻灯片母版": "slide master",
"环境配置": "environment setup",
"运行环境": "runtime",
"容器": "container",
"沙箱": "sandbox",
"镜像": "image",
"权限": "permission",
"白名单": "allowlist",
"黑名单": "blocklist",
"凭据": "credential",
"密钥": "secret",
"存储桶": "bucket",
"对象存储": "object storage",
"上传": "upload",
"下载": "download",
"拷贝": "copy",
"迁移": "migration",
"校验": "validation",
"回退": "fallback",
"回滚": "rollback",
"审批": "approval",
"审计": "audit",
"灰度": "canary release",
"发布": "release",
"通道": "channel",
"稳定通道": "stable channel",
"金丝雀通道": "canary channel",
"维护者": "maintainer",
"贡献者": "contributor",
"作者": "author",
"风险等级": "risk level",
"图片生成": "image generation",
"语音合成": "text-to-speech",
"视频生成": "video generation",
"邮箱操作": "Email Operations",
"邮件": "email",
"收件箱": "inbox",
"草稿": "draft",
"标签": "label",
"分类": "category",
"附件": "attachment",
"自动回复": "auto-reply",
"群发": "bulk send",
"智能回复": "smart reply",
"团队管理": "team management",
"技能管理": "skills management",
"调度": "orchestration",
"中枢": "central",
"中枢调度器": "central orchestrator",
"数字员工": "digital worker",
"人格": "persona",
"原则": "principle",
"持久化": "persistence",
"系统中枢": "system core",
"节流": "throttling",
"限流": "rate limiting",
"重试": "retry",
"幂等": "idempotency",
"命令行": "CLI",
"脚本": "script",
"二进制": "binary",
"依赖": "dependency",
"包管理器": "package manager",
"镜像源": "registry mirror",
"节省 Token": "save tokens",
"节省成本": "save cost",
"安装": "install",
"卸载": "uninstall",
"升级": "upgrade",
"降级": "downgrade",
"热更新": "hot-reload",
"冷启动": "cold start",
"调试": "debug",
"远程调试": "remote debugging",
"断点": "breakpoint",
"排查": "troubleshoot",
"技能创建器": "skill creator",
"技能创作": "skill authoring",
"技能模板": "skill template",
"前端设计": "Frontend Design",
"网页设计": "web design",
"UI 设计": "UI design",
"界面设计": "interface design",
"组件": "component",
"美化": "polish",
"样式": "style",
"主题": "theme",
"配色": "color scheme",
"字体": "font",
"字号": "font size",
"栅格": "grid",
"暗色模式": "dark mode",
"亮色模式": "light mode",
"无障碍": "accessibility",
"响应式": "responsive",
"动效": "motion / animation",
"交互": "interaction",
"用户体验": "UX",
"用户界面": "UI",
"渲染": "render",
"构建": "build",
"打包": "bundle",
"热重载": "hot reload"
}
},
"do_not_translate": [
"anthropic",
"claude",
"DesireCore",
"AgentFS",
"MCP",
"Claude Code",
"Anthropic",
"Markdown",
"YAML",
"JSON",
"SVG",
"PDF",
"DOCX",
"PPTX",
"XLSX",
"S3",
"MinIO",
"MiniMax",
"OpenAI",
"Kling",
"Jina",
"Reader",
"Playwright",
"CDP",
"Chrome",
"GitHub",
"Gmail",
"Outlook",
"IMAP",
"SMTP",
"WSL",
"WSL2",
"Docker",
"Podman",
"Kubernetes",
"Node.js",
"Python",
"TypeScript",
"JavaScript",
"Bash",
"BeautifulSoup",
"LibreOffice",
"Poppler",
"Pandoc",
"Tesseract",
"Unicode",
"UTF-8",
"REST",
"API",
"URL",
"HTTP",
"HTTPS",
"OAuth",
"JWT",
"Lucide",
"React",
"Vue",
"Next.js",
"Tailwind",
"CSS",
"HTML",
"SKILL.md",
"frontmatter",
"metadata"
],
"preserve_patterns": [
"^```[\\s\\S]*?```$",
"`[^`\\n]+`",
"https?://[^\\s)]+",
"<[a-zA-Z][\\s\\S]*?>",
"\\$[A-Z_][A-Z0-9_]*",
"\\b[a-z][a-zA-Z0-9_]*\\.[a-z][a-zA-Z0-9_]*\\b"
]
}