|
| 1 | +--- |
| 2 | +name: doc-translate |
| 3 | +description: Use when translating English content to Traditional Chinese in this repo (python-docs-zh-tw), especially for PO/reStructuredText content. |
| 4 | +metadata: |
| 5 | + short-description: Translate EN to zh-tw for docs |
| 6 | +--- |
| 7 | + |
| 8 | +# doc-translate |
| 9 | + |
| 10 | +## Scope |
| 11 | +- Translate English documentation to Traditional Chinese for this repo. |
| 12 | +- Preserve reStructuredText/PO formatting and links exactly. |
| 13 | + |
| 14 | +## Workflow |
| 15 | +1) Read the full source section before translating to preserve meaning and context. |
| 16 | +2) Translate with the rules below; keep PO syntax intact. |
| 17 | +3) Check line length (PO), spacing, and punctuation rules. |
| 18 | +4) Confirm glossary terms and high-frequency words are handled as specified. |
| 19 | + |
| 20 | +## Translation Rules |
| 21 | +- Chinese sentences use fullwidth punctuation; English sentences keep halfwidth punctuation. |
| 22 | + - Example: 「」()、,。 |
| 23 | + - Example: Python is supported by Python Software Foundation (PSF). |
| 24 | +- Mixed Chinese/English should include spaces between Chinese and English words; no extra space between English words and symbols. |
| 25 | + - Example: 使用 CPU 運算、使用「CPU」運算 |
| 26 | +- Proper nouns should follow the glossary translation when available. |
| 27 | +- Proper nouns may remain untranslated (e.g., CPU, Unicode). |
| 28 | +- For uncommon or uncertain terms, add a parenthetical note or keep the original term; annotate only on first occurrence per page. |
| 29 | + - Example: 正規表示式 (regular expression) |
| 30 | + - Example: Network News Transfer Protocol、Portable Network Graphics(可攜式網路圖形) |
| 31 | +- PO lines should be <= 79 characters (Poedit handles this; `powrap` is optional). |
| 32 | +- High-frequency terms should stay in English (even if glossary includes a translation). |
| 33 | + - Example: int, float, str, bytes, list, tuple, dict, set, iterator, generator, iterable, pickle |
| 34 | + |
| 35 | +## Parentheses |
| 36 | +- If parentheses contain Chinese, use fullwidth parentheses. |
| 37 | +- If parentheses contain only English, use halfwidth parentheses and keep English spacing. |
| 38 | + - Example: list(串列)是 Python 中很常見的資料型別。 |
| 39 | + - Example: 在本情況使用 zip(*[iter(x)]*n) 是很常見的情況(Python 慣例)。 |
| 40 | + - Example: 在超文件標示語言 (HTML) 中應注意跳脫符號。 |
| 41 | + |
| 42 | +## Related Skills |
| 43 | +- Use `rst-translate` when the string includes reStructuredText syntax. |
| 44 | + |
| 45 | +## References |
| 46 | +- Local glossary: `glossary.po` |
| 47 | +- Terminology excerpt: `doc-translate/references/terminology.md` |
| 48 | +- Term list (wiki): https://github.com/python/python-docs-zh-tw/wiki/%E8%A1%93%E8%AA%9E%E5%88%97%E8%A1%A8 |
| 49 | +- Official glossary: https://docs.python.org/zh-tw/3/glossary.html |
0 commit comments