Files
nexus/wiki/sources/i18n-readme.md
2026-05-03 05:42:12 +08:00

2.4 KiB
Raw Blame History

title, type, tags, date
title type tags date
Chinese (zh-CN) Localization source
2026-05-02

Source File

Summary用中文描述

  • 核心主题:将 GitHub Copilot Agent 的 name 和 description 字段本地化为简体中文
  • 问题域AI Agent 在 Copilot Chat Agent 选择器中的中文用户本地化体验
  • 方法/机制:通过 PowerShell 脚本读取 JSON 翻译映射表,自动替换 YAML frontmatter 中的 name/description 字段
  • 结论/价值:实现 Agent 界面的中文本地化提升中文用户的使用体验JSON 文件作为翻译的唯一数据源

Key Claims用中文描述

  • PowerShell 脚本 localize-agents-zh.ps1 读取 UTF-8 编码的 agent-names-zh.json 翻译映射表
  • 脚本仅修改已安装副本(~/.github/agents/~/.copilot/agents/),不修改源文件
  • 仅替换 YAML frontmatter 中的 name:description: 字段
  • JSON 文件是翻译的唯一真实来源,新增 Agent 需先添加到 JSON 中
  • 脚本采用纯 ASCII 编码(避免 PowerShell 编码问题),所有中文文本存储在 JSON 文件中
  • 每次运行 install.sh --tool copilot 更新后需重新运行本地化脚本

Key Quotes

"Only modifies installed copies (in ~/.github/agents/), not source files" — 关键约束:只修改安装副本 "JSON file is the single source of truth for translations — add new agents there" — JSON 文件作为翻译唯一数据源的设计原则 "Script is pure ASCII (avoids PowerShell encoding issues); all Chinese text lives in the JSON" — 纯 ASCII 脚本 + UTF-8 JSON 的分工设计

Key Concepts

  • Global-First-Architecture:国际化/本地化i18n/l10n作为产品架构的先天前提条件而非上线后的补救措施
  • YAML-ConfigurationYAML frontmatter 配置格式,存储 Agent 的 name 和 description 元数据

Key Entities

  • The-Agency:开源多 Agent 框架,提供了 Copilot Agent 的安装脚本 install.sh --tool copilot
  • GitHub-Copilot:微软的 AI 编程助手,其 Chat 支持自定义 AgentAgent 以 Markdown + YAML frontmatter 格式定义

Connections

Contradictions

  • 无明显冲突