Skip to content

Translate howto/free-threading-python.po - #1266

Open
ken71301 wants to merge 2 commits into
python:3.15from
ken71301:howto/free-threading-python
Open

ken71301 wants to merge 2 commits into
python:3.15from
ken71301:howto/free-threading-python

Conversation

@ken71301

@ken71301 ken71301 commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Translate howto/free-threading-python.po (Python support for free threading).

  • Translates all 58 untranslated entries and fixes the PO header (Project-Id-Version: Python 3.15, translator, revision date).
  • Terminology follows glossary.po and existing usage: 自由執行緒, 全域直譯器鎖, 擴充模組, 不滅, 參照計數, 建置 for "build".
  • sphinx-lint passes. I rendered the page against the 3.15 CPython docs: all 58 entries show up in the built page and no Chinese touches Latin text without a space.

Points for reviewers to decide:

  • The two flag descriptions keep true / false in English (預設為 true / 預設為 false) instead of 真 / 假, because 預設為假 reads unnaturally. The rest of the repo uses 真 / 假, so I'm happy to switch back.
  • "per-thread reference counting" is 執行緒各自的參照計數 (with the English term at first use), because 每執行緒 reads awkwardly.
  • "thread-local objects" is 執行緒局部物件, matching c-api/tls.po and whatsnew/3.13.po. library/decimal.po and whatsnew/3.12.po use 執行緒區域.
  • Terms with no existing precedent in the repo: 駐留 (intern), 配置器 (allocator), 堆積 (heap), 位元組碼求值器 (bytecode evaluator).

Also includes a small docs commit for the translate-po skill (.claude/skills/translate-po/), found while reviewing the rendered page:

  • \\ renders as nothing, so it removes the required CJK-Latin space. Use a plain space before roles that render Latin text (:ref: without a title, :mod:, :func:, :class:), and keep \\ for roles that render Chinese (e.g. :term: with a translated title). The skill's examples taught the wrong default and are fixed.
  • Added the README's parentheses rule: English-only brackets are half-width with spaces around them, Chinese content uses full-width; annotate a term on first use only.

🤖 Generated with Claude Code

ken and others added 2 commits November 7, 2026 16:39
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Use a plain space before roles that render Latin text (:ref:, :mod:,
  :func:, :class:); `\ ` removes the required CJK-Latin space. Keep `\ `
  only for roles that render Chinese.
- Fix examples that taught `參閱\ :mod:` as the default.
- Add the parentheses rule: English-only brackets are half-width with
  spaces, Chinese content uses full-width; annotate a term on first use.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@mattwang44 mattwang44 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work! only a few questions

"When building CPython from source, the :option:`--disable-gil` configure "
"option should be used to build a free-threaded Python interpreter."
msgstr ""
"從原始碼建置 CPython 時,應使用 :option:`--disable-gil` configure 選項來建置"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

configure 要翻譯嗎?

"enabled at runtime using the environment variable :envvar:`PYTHON_GIL` or "
"the command-line option :option:`-X gil`."
msgstr ""
"自由執行緒的 CPython 建置支援在執行時,透過環境變數 :envvar:`PYTHON_GIL` 或命"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runtime 一詞目前傾向不翻譯

msgstr ""
"在自由執行緒建置中,部分物件是\\ :term:`不滅的 <immortal>`。不滅物件不會被釋"
"放,其參照計數也永遠不會被修改。這樣做是為了避免參照計數的競爭 (contention),"
"否則會妨礙多執行緒的有效擴充 (scaling)。"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這裡的 scaling 確切是什麼意思?翻成「擴充」我好像沒辦法聯想到 scaling

"在自由執行緒建置中,mimalloc 將記憶體管理於數個獨立的堆積 (heap) 中(目前為四"
"個)。例如,所有支援 GC 的物件都從各自專屬的堆積中配置。使用獨立堆積意味著某"
"個堆積中的空閒記憶體無法用於使用另一個堆積的配置。此外,部分堆積在釋放支撐該"
"堆積的記憶體(在 mimalloc 術語中稱為「頁面 (pages)」)時,會設定為使用 QSBR"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

page 翻成「分頁」是不是比較普遍?

This branch has not been deployed

No deployments
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