Skip to content

feat(i18n): add Chinese (zh-CN) localization for agent names#338

Open
charlie-cao wants to merge 1 commit intomsitarzewski:mainfrom
charlie-cao:feat/zh-cn-localization
Open

feat(i18n): add Chinese (zh-CN) localization for agent names#338
charlie-cao wants to merge 1 commit intomsitarzewski:mainfrom
charlie-cao:feat/zh-cn-localization

Conversation

@charlie-cao
Copy link
Copy Markdown

🇨🇳 Chinese (zh-CN) Localization for Agent Names

What

Adds a PowerShell script and JSON mapping file to localize agent name and description fields in YAML frontmatter to Simplified Chinese. This makes agent names readable in Copilot Chat's agent picker for Chinese-speaking users.

Files Added

File Description
scripts/i18n/agent-names-zh.json Mapping of 130+ English agent names → Chinese translations
scripts/i18n/localize-agents-zh.ps1 PowerShell script to batch-update installed agent files
scripts/i18n/README.md Usage documentation

Usage

After installing agents with install.sh --tool copilot:

powershell -ExecutionPolicy Bypass -File scripts/i18n/localize-agents-zh.ps1

How It Works

  1. Reads agent-names-zh.json (UTF-8 encoded) for the translation map
  2. For each .md file in target directories (~/.github/agents/, ~/.copilot/agents/)
  3. Extracts name: from YAML frontmatter → looks up Chinese translation → replaces in-place
  4. Script is pure ASCII (avoids PowerShell encoding issues); all Chinese text lives in the JSON

Before / After

# Before
name: Security Engineer
description: Threat modeling, secure code review, security architecture

# After
name: 安全工程师
description: 威胁建模、安全代码审查与应用安全架构专家

Testing

  • Tested on Windows 11 + PowerShell 5.1
  • All 144 agents display Chinese names in VS Code Copilot Chat agent picker
  • Only modifies installed copies (in ~/.github/agents/), not source files
  • Re-runnable: safe to execute after each install.sh update

Notes

  • This is a non-breaking addition — only adds files under scripts/i18n/
  • Opens the door for other locales (ja, ko, etc.) using the same pattern
  • JSON is the single source of truth for translations

Add PowerShell script and JSON mapping file to localize agent name and
description fields in YAML frontmatter to Simplified Chinese.

- scripts/i18n/agent-names-zh.json: 130+ agent name translations
- scripts/i18n/localize-agents-zh.ps1: batch update installer
- scripts/i18n/README.md: usage documentation

Tested on Windows 11 with PowerShell 5.1 and VS Code Copilot Agent mode.
All 144 agents display Chinese names in Copilot Chat agent picker.
@mhc222
Copy link
Copy Markdown

mhc222 commented Mar 30, 2026

Code Review

No issues found.


Reviewed by Code Reviewer agent. Issues are only reported at confidence ≥80/100.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants