mirror of
https://github.com/msitarzewski/agency-agents
synced 2026-04-25 11:18:05 +00:00
Adds Chinese (zh-CN) localization tooling: agent-names-zh.json translation map (130+ entries) and localize-agents-zh.ps1 PowerShell script for localizing agent names in Copilot agent picker.
🇨🇳 Chinese (zh-CN) Localization
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
| File | Description |
|---|---|
agent-names-zh.json |
Mapping of English agent names → Chinese translations (130+ entries) |
localize-agents-zh.ps1 |
PowerShell script that reads the JSON and updates installed agent files |
Usage
After installing agents with install.sh --tool copilot:
# Localize agent names to Chinese
powershell -ExecutionPolicy Bypass -File scripts/i18n/localize-agents-zh.ps1
By default, the script processes:
%USERPROFILE%\.github\agents\%USERPROFILE%\.copilot\agents\
Pass custom paths if needed:
powershell -File scripts/i18n/localize-agents-zh.ps1 -TargetDirs @("C:\custom\path\agents")
How It Works
- Reads
agent-names-zh.json(UTF-8 encoded) for the translation map - For each
.mdfile in the target directories:- Extracts the
name:field from YAML frontmatter - Looks up the Chinese translation
- Replaces
name:anddescription:fields - Writes back as UTF-8
- Extracts the
Result
Before:
---
name: Security Engineer
description: Threat modeling, secure code review, security architecture
---
After:
---
name: 安全工程师
description: 威胁建模、安全代码审查与应用安全架构专家
---
Notes
- Only modifies installed copies (in
~/.github/agents/), not source files - Re-run after each
install.shupdate (which overwrites with English originals) - JSON file is the single source of truth for translations — add new agents there
- Script is pure ASCII (avoids PowerShell encoding issues); all Chinese text lives in the JSON