This repo contains Traditional Chinese translations of the Python docs. The
content is organized as .po files at the root and within topic folders such
as library/, tutorial/, reference/, c-api/, and using/. Terminology
references live in glossary.po, and overall workflow guidance is in
README.rst. There is no application source code; most changes are to .po
files and translation metadata.
make allbuilds the full docs with Sphinx and validates rST syntax. It may clone CPython into a sibling../cpythondirectory if missing.make lintruns a quick rST syntax check without a full build.make build path/to/file.pobuilds a single translation file (faster for spot-checking).pre-commit installenables PO-format checks at commit time (recommended).
- Only edit
msgstr; do not changemsgid. - Keep PO lines <= 79 chars (Poedit or
powrapcan wrap). - Preserve rST roles, directives, and link targets exactly.
- Follow the project glossary and translation rules (see
glossary.poand the project wiki). - Branch names typically mirror the file path, e.g.,
library/math.
There is no unit test suite. Validate changes by running make lint or
make all and ensuring there are no warnings. If you build a specific file,
confirm the generated HTML in ../cpython/Doc/build/html.
- Open an issue to claim a translation task before starting.
- Base your branch on
upstream/3.13. - Use clear commit messages; the repo example is
Working on path/to/file.po. - In PRs, summarize the files translated, link the issue, and note any build
checks you ran (e.g.,
make lint).
Use these skills located in .claude/skills/ and project root:
| Skill | Location | When to Use |
|---|---|---|
doc-translate |
doc-translate/SKILL.md |
General EN->zh_TW translation rules |
rst-translate |
rst-translate/SKILL.md |
Strings with reST syntax |
translate-po |
.claude/skills/translate-po.md |
Core translation workflow |
validate-translation |
.claude/skills/validate-translation.md |
After translating, validate quality |
terminology-check |
.claude/skills/terminology-check.md |
Check terminology consistency |
Purpose: Translate PO file entries with full context awareness.
Workflow:
- Read the target PO file and identify untranslated entries
- For each entry, use
translate-poskill - Apply
terminology-checkfor consistency - Validate with
validate-translation - Save with proper formatting (79 char lines)
Invocation: When asked to translate a PO file or entries.
Purpose: Review existing translations, especially fuzzy entries.
Workflow:
- Find fuzzy entries with
make fuzzyor grep for#, fuzzy - For each fuzzy entry:
- Compare msgid changes (check translator comments)
- Update msgstr to match new msgid
- Apply
terminology-checkfor zh_CN variants - Validate with
validate-translation
- Remove fuzzy flag after review
- Run
make lintto verify
Invocation: When asked to review translations or fix fuzzy entries.
Purpose: Comprehensive quality assurance for translations.
Workflow:
- Run
validate-translationon target files - Run
terminology-checkfor consistency - Check reST syntax with
make lint - Generate quality report with issues found
- Prioritize fixes by severity (ERROR > WARNING > INFO)
Invocation: When asked to check translation quality or before PR.
- Chinese: full-width punctuation
「」()、,。 - English: half-width punctuation
(),.;:!? - Spacing: add space between CJK and Latin text
- Lines: max 79 characters
- High-freq terms stay English:
int,str,list,dict,iterator,generator
函數 -> 函式 對象 -> 物件 返回 -> 回傳
模塊 -> 模組 字符串 -> 字串 迭代 -> 疊代
調用 -> 呼叫 內存 -> 記憶體 異步 -> 非同步
CJK before role: 參閱\\ :mod:`os`
CJK after link: `連結 <url>`_\\ 中