Skip to content

Commit ebc6d6b

Browse files
committed
Translate fuzzy entries from upstream sync (cpython 7a7da86d)
Translates 91 new/fuzzy entries introduced by 5 new upstream sync commits across 21 files (c-api: buffer, code, gen, intro, set, typeobj; library: asyncio, asyncio-graph, asyncio-tools, ctypes, glob, http.server, imaplib, mimetypes, os, re, string, tkinter, tkinter.font, urllib.parse; reference: compound_stmts). Also resolves 5 merge-conflict hunks in tkinter.po from rebasing prior fix commits onto the new upstream commits. Clarifies CLAUDE.md's reST escaping guidance: the `\ ` zero-width separator is only required before OPENING full-width punctuation ((「『) touching a role/literal/emphasis close, not before closing/medial punctuation (。,:;!?」』)), per corpus-wide grep evidence. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QP5Xz4JpfsP7ZsfFVprnxr
1 parent 9c6e3c7 commit ebc6d6b

22 files changed

Lines changed: 286 additions & 56 deletions

CLAUDE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ make progress # Check translation progress
3434
### reST Syntax
3535
- Preserve `:mod:`, `:func:`, `:class:`, `:term:`, `:ref:`, `:pep:` roles
3636
- Use `\\ ` as zero-width separator when Chinese precedes reST syntax
37+
- `\\ ` is also required when a role/literal/emphasis close is immediately followed by an
38+
**opening** full-width punctuation mark (``, ``, ``) — confirmed by corpus-wide grep:
39+
~1 unescaped vs ~473 escaped occurrences. Example: `` :class:`Widget`\\ ( ``.
40+
- `\\ ` is **not** needed before **closing/medial** full-width punctuation (``, ``, ``,
41+
``, ``, ``, ``, ``, ``) — this is the dominant, unescaped, CI-passing convention
42+
throughout the corpus (thousands of unescaped examples vs. a handful of escaped outliers).
43+
Do not add `\\ ` there even if it looks visually similar to the open-paren case.
3744

3845
## Key Resources
3946

c-api/buffer.po

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -362,11 +362,8 @@ msgid ""
362362
msgstr ""
363363

364364
#: ../../c-api/buffer.rst:266
365-
#, fuzzy
366365
msgid "This is an alias to :c:macro:`PyBUF_WRITABLE`."
367-
msgstr ""
368-
"這是 :c:macro:`PyBUF_WRITABLE` 的\\ :term:`軟性棄用 <soft deprecated>`\\ 別"
369-
"名。"
366+
msgstr "此為 :c:macro:`PyBUF_WRITABLE` 的別名。"
370367

371368
#: ../../c-api/buffer.rst:272
372369
msgid ""

c-api/code.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ msgstr ""
264264

265265
#: ../../c-api/code.rst:217
266266
msgid "This is a function that does nothing."
267-
msgstr ""
267+
msgstr "此函式不執行任何操作。"
268268

269269
#: ../../c-api/code.rst:219
270270
msgid ""

c-api/gen.po

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,8 @@ msgid "Deprecated API"
137137
msgstr "已棄用的 API"
138138

139139
#: ../../c-api/gen.rst:94
140-
#, fuzzy
141140
msgid "This is an API that was included in Python's C API by mistake."
142-
msgstr ""
143-
"這是一個被\\ :term:`軟性棄用 <soft deprecated>`\\ 的 API,它被錯誤地包含在 "
144-
"Python 的 C API 中。"
141+
msgstr "這是一個被錯誤地包含在 Python 的 C API 中的 API。"
145142

146143
#: ../../c-api/gen.rst:97
147144
msgid "It is solely here for completeness; do not use this API."

c-api/intro.po

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -773,20 +773,16 @@ msgid "Consider using the C99 standard suffixes ``LL`` and ``LLU`` directly."
773773
msgstr ""
774774

775775
#: ../../c-api/intro.rst:511
776-
#, fuzzy
777776
msgid "This is an alias to :c:func:`!memcpy`."
778-
msgstr "這現在是 ``va_copy`` 的別名。"
777+
msgstr "此為 :c:func:`!memcpy` 的別名。"
779778

780779
#: ../../c-api/intro.rst:513
781780
msgid "Use :c:func:`!memcpy` directly instead."
782-
msgstr ""
781+
msgstr "請直接使用 :c:func:`!memcpy`。"
783782

784783
#: ../../c-api/intro.rst:518
785-
#, fuzzy
786784
msgid "This is an alias to the C99-standard ``va_copy`` function."
787-
msgstr ""
788-
"這是 C99 標準 ``va_copy`` 函式的已\\ :term:`軟性棄用 <soft deprecated>`\\ 別"
789-
"名。"
785+
msgstr "此為 C99 標準 ``va_copy`` 函式的別名。"
790786

791787
#: ../../c-api/intro.rst:520
792788
msgid ""

c-api/set.po

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,13 +224,10 @@ msgid "Deprecated API"
224224
msgstr "已棄用的 API"
225225

226226
#: ../../c-api/set.rst:207
227-
#, fuzzy
228227
msgid ""
229228
"A constant representing the size of an internal preallocated table inside :c:"
230229
"type:`PySetObject` instances."
231-
msgstr ""
232-
"一個被\\ :term:`軟性棄用 <soft deprecated>`\\ 的常數,代表 :c:type:"
233-
"`PySetObject` 實例內部預分配表格的大小。"
230+
msgstr "一個代表 :c:type:`PySetObject` 實例內部預分配表格大小的常數。"
234231

235232
#: ../../c-api/set.rst:210
236233
msgid ""

c-api/typeobj.po

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2547,6 +2547,8 @@ msgid ""
25472547
"This macro does nothing. Historically, this would indicate that the :c:"
25482548
"member:`~PyTypeObject.tp_version_tag` field was available and initialized."
25492549
msgstr ""
2550+
"此巨集不執行任何操作。過去,這曾用於表示 :c:member:`~PyTypeObject."
2551+
"tp_version_tag` 欄位可用且已初始化。"
25502552

25512553
#: ../../c-api/typeobj.rst:1499
25522554
msgid ""

library/asyncio-graph.po

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ msgstr ""
1818
"Content-Transfer-Encoding: 8bit\n"
1919

2020
#: ../../library/asyncio-graph.rst:8
21-
#, fuzzy
2221
msgid "Call graph introspection"
23-
msgstr "呼叫圖內省(Call Graph Introspection)"
22+
msgstr "呼叫圖內省"
2423

2524
#: ../../library/asyncio-graph.rst:10
2625
msgid "**Source code:** :source:`Lib/asyncio/graph.py`"
@@ -39,12 +38,12 @@ msgstr ""
3938

4039
#: ../../library/asyncio-graph.rst:22
4140
msgid ":ref:`asyncio-introspection-tools`"
42-
msgstr ""
41+
msgstr ":ref:`asyncio-introspection-tools`"
4342

4443
#: ../../library/asyncio-graph.rst:23
4544
msgid ""
4645
"Command-line tools for inspecting tasks in another running Python process."
47-
msgstr ""
46+
msgstr "用於檢查另一個執行中的 Python 行程中任務的命令列工具。"
4847

4948
#: ../../library/asyncio-graph.rst:31
5049
msgid ""

library/asyncio-tools.po

Lines changed: 115 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ msgstr ""
1919

2020
#: ../../library/asyncio-tools.rst:7
2121
msgid "Command-line introspection tools"
22-
msgstr ""
22+
msgstr "命令列內省工具"
2323

2424
#: ../../library/asyncio-tools.rst:9
2525
msgid "**Source code:** :source:`Lib/asyncio/tools.py`"
26-
msgstr ""
26+
msgstr "**原始碼:**\\ :source:`Lib/asyncio/tools.py`"
2727

2828
#: ../../library/asyncio-tools.rst:13
2929
msgid ""
@@ -32,16 +32,21 @@ msgid ""
3232
"without modifying it or restarting it. The :mod:`!asyncio.tools` submodule "
3333
"implements this interface."
3434
msgstr ""
35+
":mod:`!asyncio` 模組可以透過 ``python -m asyncio`` 作為指令碼叫用,以檢查另一"
36+
"個執行中 Python 行程的任務圖,而不需修改或重新啟動該行程。:mod:`!asyncio."
37+
"tools` 子模組實作了此介面。"
3538

3639
#: ../../library/asyncio-tools.rst:18
3740
msgid "The following commands inspect the process identified by ``PID``:"
38-
msgstr ""
41+
msgstr "以下指令用於檢查以 ``PID`` 識別的行程:"
3942

4043
#: ../../library/asyncio-tools.rst:20
4144
msgid ""
4245
"$ python -m asyncio pstree [--retries N] PID\n"
4346
"$ python -m asyncio ps [--retries N] PID"
4447
msgstr ""
48+
"$ python -m asyncio pstree [--retries N] PID\n"
49+
"$ python -m asyncio ps [--retries N] PID"
4550

4651
#: ../../library/asyncio-tools.rst:25
4752
msgid ""
@@ -50,26 +55,30 @@ msgid ""
5055
"inspect another process. See the :ref:`permission-requirements <permission-"
5156
"requirements>` for details."
5257
msgstr ""
58+
"這些指令會讀取目標行程的狀態,而不會在其中執行任何程式碼。它們僅在受支援的平"
59+
"台上可用,且可能需要權限才能檢查其他行程。詳情請參閱\\ :ref:`permission-"
60+
"requirements <permission-requirements>`。"
5361

5462
#: ../../library/asyncio-tools.rst:31
5563
msgid ":ref:`asyncio-graph`"
56-
msgstr ""
64+
msgstr ":ref:`asyncio-graph`"
5765

5866
#: ../../library/asyncio-tools.rst:32
5967
msgid ""
6068
"Programmatic APIs for inspecting the async call graph of a task or future in "
6169
"the current process."
62-
msgstr ""
70+
msgstr "用於檢查目前行程中某個任務或 future 的非同步呼叫圖的程式化 API。"
6371

6472
#: ../../library/asyncio-tools.rst:35
6573
msgid ""
6674
"The command examples below use this program, which creates a task hierarchy "
6775
"suitable for inspection and prints its process ID:"
6876
msgstr ""
77+
"以下指令範例使用這個程式,它會建立一個適合檢查的任務階層,並印出其行程 ID:"
6978

7079
#: ../../library/asyncio-tools.rst:38
7180
msgid "example.py"
72-
msgstr ""
81+
msgstr "example.py"
7382

7483
#: ../../library/asyncio-tools.rst:38
7584
msgid ""
@@ -99,27 +108,56 @@ msgid ""
99108
"\n"
100109
"asyncio.run(main())"
101110
msgstr ""
111+
"import asyncio\n"
112+
"import os\n"
113+
"\n"
114+
"async def play(track):\n"
115+
" await asyncio.sleep(3600)\n"
116+
" print(f\"🎵 Finished: {track}\")\n"
117+
"\n"
118+
"async def album(name, tracks):\n"
119+
" async with asyncio.TaskGroup() as tg:\n"
120+
" for track in tracks:\n"
121+
" tg.create_task(play(track), name=track)\n"
122+
"\n"
123+
"async def main():\n"
124+
" print(f\"PID: {os.getpid()}\")\n"
125+
" async with asyncio.TaskGroup() as tg:\n"
126+
" tg.create_task(\n"
127+
" album(\"Sundowning\", [\"TNDNBTG\", \"Levitate\"]),\n"
128+
" name=\"Sundowning\",\n"
129+
" )\n"
130+
" tg.create_task(\n"
131+
" album(\"TMBTE\", [\"DYWTYLM\", \"Aqua Regia\"]),\n"
132+
" name=\"TMBTE\",\n"
133+
" )\n"
134+
"\n"
135+
"asyncio.run(main())"
102136

103137
#: ../../library/asyncio-tools.rst:67
104138
msgid "Run the program in one terminal and leave it running:"
105-
msgstr ""
139+
msgstr "在一個終端機中執行此程式,並讓它持續執行:"
106140

107141
#: ../../library/asyncio-tools.rst:69
108142
msgid ""
109143
"$ python example.py\n"
110144
"PID: 12345"
111145
msgstr ""
146+
"$ python example.py\n"
147+
"PID: 12345"
112148

113149
#: ../../library/asyncio-tools.rst:74
114150
msgid ""
115151
"Then pass the printed process ID to the commands from another terminal. "
116152
"Thread IDs, task IDs, file paths, and line numbers vary between runs and "
117153
"source layouts."
118154
msgstr ""
155+
"然後在另一個終端機中,將印出的行程 ID 傳給這些指令。執行緒 ID、任務 ID、檔案"
156+
"路徑和行號會因每次執行和原始碼配置的不同而有所差異。"
119157

120158
#: ../../library/asyncio-tools.rst:81
121159
msgid "Command-line options"
122-
msgstr ""
160+
msgstr "命令列選項"
123161

124162
#: ../../library/asyncio-tools.rst:85
125163
msgid ""
@@ -129,6 +167,9 @@ msgid ""
129167
"task hierarchy is blocked and where in its coroutine stack execution has "
130168
"paused:"
131169
msgstr ""
170+
"以樹狀結構顯示任務與協程之間的關係。每個任務都會顯示其完整的協程堆疊,並巢狀"
171+
"顯示在正在等待它的任務(如果有的話)之下。此子指令有助於快速找出任務階層中哪"
172+
"個分支被阻塞,以及其協程堆疊中執行暫停的位置:"
132173

133174
#: ../../library/asyncio-tools.rst:91
134175
msgid ""
@@ -162,13 +203,44 @@ msgid ""
162203
" └── play example.py:4\n"
163204
" └── sleep Lib/asyncio/tasks.py:702"
164205
msgstr ""
206+
"$ python -m asyncio pstree 12345\n"
207+
"└── (T) Task-1\n"
208+
" └── main example.py:12\n"
209+
" └── TaskGroup.__aexit__ Lib/asyncio/taskgroups.py:75\n"
210+
" └── TaskGroup._aexit Lib/asyncio/taskgroups.py:124\n"
211+
" ├── (T) Sundowning\n"
212+
" │ └── album example.py:7\n"
213+
" │ └── TaskGroup.__aexit__ Lib/asyncio/taskgroups."
214+
"py:75\n"
215+
" │ └── TaskGroup._aexit Lib/asyncio/taskgroups."
216+
"py:124\n"
217+
" │ ├── (T) TNDNBTG\n"
218+
" │ │ └── play example.py:4\n"
219+
" │ │ └── sleep Lib/asyncio/tasks.py:702\n"
220+
" │ └── (T) Levitate\n"
221+
" │ └── play example.py:4\n"
222+
" │ └── sleep Lib/asyncio/tasks.py:702\n"
223+
" └── (T) TMBTE\n"
224+
" └── album example.py:7\n"
225+
" └── TaskGroup.__aexit__ Lib/asyncio/taskgroups."
226+
"py:75\n"
227+
" └── TaskGroup._aexit Lib/asyncio/taskgroups."
228+
"py:124\n"
229+
" ├── (T) DYWTYLM\n"
230+
" │ └── play example.py:4\n"
231+
" │ └── sleep Lib/asyncio/tasks.py:702\n"
232+
" └── (T) Aqua Regia\n"
233+
" └── play example.py:4\n"
234+
" └── sleep Lib/asyncio/tasks.py:702"
165235

166236
#: ../../library/asyncio-tools.rst:119
167237
msgid ""
168238
"If the await graph contains a cycle, ``pstree`` reports an error instead of "
169239
"printing a tree. A cycle in the await graph is unusual and typically "
170240
"indicates a programming error:"
171241
msgstr ""
242+
"如果等待圖中包含循環,``pstree`` 會回報錯誤,而不會印出樹狀圖。等待圖中出現循"
243+
"環的情況並不常見,通常代表程式有問題:"
172244

173245
#: ../../library/asyncio-tools.rst:123
174246
msgid ""
@@ -177,19 +249,26 @@ msgid ""
177249
"\n"
178250
"cycle: Task-2 → Task-3 → Task-2"
179251
msgstr ""
252+
"$ python -m asyncio pstree 12345\n"
253+
"ERROR: await-graph contains cycles - cannot print a tree!\n"
254+
"\n"
255+
"cycle: Task-2 → Task-3 → Task-2"
180256

181257
#: ../../library/asyncio-tools.rst:132
182258
msgid ""
183259
"Display a flat table of all pending tasks in the process *PID*. Each row "
184260
"shows the event-loop thread ID, task ID and name, coroutine stack, and the "
185261
"awaiting task's stack, name, and ID, if any."
186262
msgstr ""
263+
"顯示行程 *PID* 中所有擱置中任務的平面表格。每一列會顯示事件迴圈的執行緒 ID、"
264+
"任務 ID 與名稱、協程堆疊,以及等待該任務的任務之堆疊、名稱與 ID(如果有的"
265+
"話)。"
187266

188267
#: ../../library/asyncio-tools.rst:136
189268
msgid ""
190269
"This subcommand prints all tasks regardless of whether the await graph "
191270
"contains cycles:"
192-
msgstr ""
271+
msgstr "無論等待圖中是否包含循環,此子指令都會印出所有任務:"
193272

194273
#: ../../library/asyncio-tools.rst:139
195274
msgid ""
@@ -221,3 +300,30 @@ msgid ""
221300
"play TaskGroup._aexit -> TaskGroup."
222301
"__aexit__ -> album TMBTE 0x10a439d70"
223302
msgstr ""
303+
"$ python -m asyncio ps 12345\n"
304+
"tid task id task name coroutine "
305+
"stack awaiter "
306+
"chain awaiter name awaiter id\n"
307+
"------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n"
308+
"18445801 0x10a456060 Task-1 TaskGroup._aexit -> "
309+
"TaskGroup.__aexit__ -> "
310+
"main "
311+
"0x0\n"
312+
"18445801 0x10a439f60 Sundowning TaskGroup._aexit -> "
313+
"TaskGroup.__aexit__ -> album TaskGroup._aexit -> TaskGroup.__aexit__ -> "
314+
"main Task-1 0x10a456060\n"
315+
"18445801 0x10a439d70 TMBTE TaskGroup._aexit -> "
316+
"TaskGroup.__aexit__ -> album TaskGroup._aexit -> TaskGroup.__aexit__ -> "
317+
"main Task-1 0x10a456060\n"
318+
"18445801 0x10a2a3a80 TNDNBTG sleep -> "
319+
"play TaskGroup._aexit -> TaskGroup."
320+
"__aexit__ -> album Sundowning 0x10a439f60\n"
321+
"18445801 0x10a2a38a0 Levitate sleep -> "
322+
"play TaskGroup._aexit -> TaskGroup."
323+
"__aexit__ -> album Sundowning 0x10a439f60\n"
324+
"18445801 0x10a2d7150 DYWTYLM sleep -> "
325+
"play TaskGroup._aexit -> TaskGroup."
326+
"__aexit__ -> album TMBTE 0x10a439d70\n"
327+
"18445801 0x10a6bdaa0 Aqua Regia sleep -> "
328+
"play TaskGroup._aexit -> TaskGroup."
329+
"__aexit__ -> album TMBTE 0x10a439d70"

library/asyncio.po

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ msgstr "高階 API"
2727

2828
#: ../../library/asyncio.rst:119
2929
msgid "Introspection APIs"
30-
msgstr ""
30+
msgstr "內省 API"
3131

3232
#: ../../library/asyncio.rst:126
3333
msgid "Low-level APIs"
@@ -126,18 +126,20 @@ msgstr ":ref:`同步 <asyncio-sync>`\\ 並行程式碼;"
126126

127127
#: ../../library/asyncio.rst:50
128128
msgid "For **introspection**, asyncio provides APIs and tools for:"
129-
msgstr ""
129+
msgstr "為了\\ **內省**,asyncio 提供了下列 API 與工具:"
130130

131131
#: ../../library/asyncio.rst:52
132132
msgid ""
133133
"inspecting the :ref:`async call graph <asyncio-graph>` of tasks and futures;"
134-
msgstr ""
134+
msgstr "檢查任務與 future 的\\ :ref:`非同步呼叫圖 <asyncio-graph>`;"
135135

136136
#: ../../library/asyncio.rst:54
137137
msgid ""
138138
"inspecting tasks in another running Python process with :ref:`command-line "
139139
"tools <asyncio-introspection-tools>`;"
140140
msgstr ""
141+
"使用\\ :ref:`命令列工具 <asyncio-introspection-tools>`\\ 檢查另一個執行中的 "
142+
"Python 行程中的任務;"
141143

142144
#: ../../library/asyncio.rst:57
143145
msgid ""

0 commit comments

Comments
 (0)