Skip to content

Commit a0c1ed4

Browse files
mattwang44claude
andcommitted
Fix translation issues found in review
Address every entry flagged by at least one of three independent reviewers in the files this sync touches: - mistranslations and omissions (library/intro, bisect, functools, itertools "if at all", weakref "remaining", wrong contributor name in whatsnew/3.11) - broken markup: single instead of double backticks in http.cookiejar - terminology: unify :term:`exhausted` as 耗盡 and translate its glossary entry; modal -> 強制回應; class -> 類別; documentation -> 說明文件; replace Mainland terms (設置, 鏈接, 實現, 交互模式, 鍊表, 運行, ...) - punctuation: half-width brackets and quotes in Chinese text, stray spaces around full-width punctuation, unnecessary or missing escapes Also adopt the better wording from the earlier attempt in #1239 where it is more accurate or more natural (e.g. atexit "signal not handled by Python", numbers, tuple "already in the tuple", tkinter Variable and index docs), drop the stray trailing newline in tutorial/controlflow that made msgfmt fail, and write :term: roles in glossary entries touched by this sync as :term:`中文 <term>` as requested in #1239. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent f5a4715 commit a0c1ed4

46 files changed

Lines changed: 220 additions & 214 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎builtins/functions.po‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,8 +1093,8 @@ msgid ""
10931093
"Create a new dictionary. The :class:`dict` object is the dictionary class. "
10941094
"See also :ref:`typesmapping` for documentation about this class."
10951095
msgstr ""
1096-
"建立一個新的 dictionary(字典)。:class:`dict` 物件是一個 dictionary class。"
1097-
"亦請參閱 :ref:`typesmapping` 來瞭解這個 class。"
1096+
"建立一個新的字典。:class:`dict` 物件是字典類別。關於此類別的說明文件,亦請參"
1097+
"閱 :ref:`typesmapping`。"
10981098

10991099
#: ../../builtins/functions.rst:489
11001100
msgid ""
@@ -1618,8 +1618,8 @@ msgid ""
16181618
"*iterable*. :class:`frozenset` is a built-in class. See also :ref:`types-"
16191619
"set` for documentation about this class."
16201620
msgstr ""
1621-
"回傳一個新的 :class:`frozenset` 物件,它包含選擇性引數 *iterable* 中的元"
1622-
"素。:class:`frozenset` 是一個內建的 class。有關此 class 的文件,亦請參"
1621+
"回傳一個新的 :class:`frozenset` 物件,可選擇性地包含從 *iterable* 取得的元"
1622+
"素。:class:`frozenset` 是一個內建類別。關於此類別的說明文件亦請參"
16231623
"閱 :ref:`types-set`。"
16241624

16251625
#: ../../builtins/functions.rst:872

‎c-api/intro.po‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ msgid ""
984984
"there are two possibilities: the function *steals* a reference to the "
985985
"object, or it does not."
986986
msgstr ""
987-
"相反地,當呼叫的函式傳入物件的參照時,有兩種可能性:函式有\\ *竊取 (steal)* "
987+
"相反地,當呼叫的函式傳入物件的參照時,有兩種可能性:函式\\ *竊取 (steal)*\\ "
988988
"物件的參照,或者沒有。"
989989

990990
#: ../../c-api/intro.rst:646
@@ -1699,9 +1699,9 @@ msgid ""
16991699
msgstr ""
17001700
"定義 ``Py_TRACE_REFS`` 來啟用參照追蹤(參見\\ :option:`設定 --with-trace-"
17011701
"refs 選項 <--with-trace-refs>`)。當有定義時,透過向每個 :c:type:`PyObject` "
1702-
"新增兩個額外欄位來維護有效物件的循環雙向鍊表 (circular doubly linked list)。"
1703-
"全體分配也有被追蹤。退出時將印出所有現行參照。(在交互模式下,這發生在直譯器"
1704-
"運行的每個陳述句之後。)"
1702+
"新增兩個額外欄位來維護一個有效物件的循環雙向鏈結串列 (circular doubly linked "
1703+
"list)。總配置量也會被追蹤。退出時將印出所有現存的參照。(在互動模式下,這會發"
1704+
"生在直譯器執行的每個陳述式之後。)"
17051705

17061706
#: ../../c-api/intro.rst:1083
17071707
msgid ""

‎c-api/module.po‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ msgid ""
668668
"reference to *value* on success (if it returns ``0``)."
669669
msgstr ""
670670
"類似於 :c:func:`PyModule_AddObjectRef`,但在成功時(如果回傳 ``0``)會"
671-
"\\ :term:`竊取 <steal>`\\ 對 *value* 的參照。"
671+
"「:term:`竊取 <steal>`」對 *value* 的參照。"
672672

673673
#: ../../c-api/module.rst:581
674674
msgid ""

‎c-api/set.po‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ msgstr "已棄用的 API"
227227
msgid ""
228228
"A constant representing the size of an internal preallocated table inside :c:"
229229
"type:`PySetObject` instances."
230-
msgstr "一個常數,代表 :c:type:`PySetObject` 實例內部預分配表格的大小。"
230+
msgstr "一個代表 :c:type:`PySetObject` 實例內部預分配表格大小的常數。"
231231

232232
#: ../../c-api/set.rst:210
233233
msgid ""

‎c-api/tuple.po‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ msgid ""
133133
"reference to an item already in the tuple at the affected position (unless "
134134
"it was NULL)."
135135
msgstr ""
136-
"此函式「:term:`竊取 <steal>`」對 *o* 的參照,並丟棄對元組中受影響位置的項目的"
137-
"參照(除非該項目為 NULL)。"
136+
"此函式「:term:`竊取 <steal>`」對 *o* 的參照,並丟棄元組中該受影響位置上已存在"
137+
"項目的參照(除非該參照為 NULL)。"
138138

139139
#: ../../c-api/tuple.rst:100
140140
msgid ""
@@ -160,8 +160,8 @@ msgid ""
160160
"being replaced; any reference in the tuple at position *pos* will be leaked."
161161
msgstr ""
162162
"此函式「:term:`竊取 <steal>`」對 *o* 的參照,且與 :c:func:`PyTuple_SetItem` "
163-
"不同的是,此函式並 *不* 丟棄任何被替代項目的參照;元組中 *pos* 位置的所有參照"
164-
"皆會被洩漏。"
163+
"不同的是,此函式並\\ *不*\\ 丟棄任何被替換項目的參照;元組中 *pos* 位置的所有"
164+
"參照皆會被洩漏。"
165165

166166
#: ../../c-api/tuple.rst:115
167167
msgid ""
@@ -321,7 +321,7 @@ msgstr ""
321321

322322
#: ../../c-api/tuple.rst:248
323323
msgid "This function \":term:`steals <steal>`\" a reference to *o*."
324-
msgstr "此函式「:term:`竊取 <steal>`」\\ *o* 的參照。"
324+
msgstr "此函式「:term:`竊取 <steal>`」對 *o* 的參照。"
325325

326326
#: ../../c-api/tuple.rst:253
327327
msgid "Alias to :c:func:`PyStructSequence_SetItem`."

‎extending/index.po‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,11 @@ msgid ""
4848
"documents the modules (both built-in and written in Python) that give the "
4949
"language its wide application range."
5050
msgstr ""
51-
"這份說明文件假設你具備 C 與 Python 的基礎知識。關於 Python 的非正式介紹,請參"
51+
"這份說明文件假設你具備 C 和 Python 的基礎知識。關於 Python 的非正式介紹,請參"
5252
"閱 :ref:`tutorial-index`。:ref:`reference-index`\\ 給予此語言更為正式的定"
53-
"義。:ref:`builtins-index` 記錄了內建函式與物件型別,而 :ref:`library-index` "
54-
"則記錄了賦予此語言廣泛應用範圍的(內建的和以 Python 編寫的)模組。"
53+
"義。:ref:`builtins-index`\\ 記錄了內建函式與物件型別,而 :ref:`library-"
54+
"index`\\ 則記錄了賦予此語言廣泛應用範圍的模組(包含內建模組與以 Python 撰寫的"
55+
"模組)。"
5556

5657
#: ../../extending/index.rst:22
5758
msgid ""

‎faq/design.po‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -523,11 +523,11 @@ msgid ""
523523
"statements. An older alternative is a sequence of ``if... elif... elif... "
524524
"else``."
525525
msgstr ""
526-
"一般來說,結構化的 switch 陳述式會在運算式具有特定值或一組值時,執行一個程式"
527-
"碼區塊。從 Python 3.10 開始,可以使用 ``match ... case`` 陳述式來匹配字面值,"
528-
"或命名空間中的常數。更多關於 :keyword:`match` 陳述式的資訊,請參閱\\ :ref:`規"
529-
"格說明 <match>`\\ 和\\ :ref:`教學 <tut-match>`。較舊的替代方案是一連串的 "
530-
"``if... elif... elif... else``。"
526+
"一般來說,結構化的 switch 陳述式會在運算式具有特定值或一組值時執行對應的程式"
527+
"碼區塊。自 Python 3.10 起,你可以輕鬆地用 ``match ... case`` 陳述式來比對字面"
528+
"值,或是命名空間中的常數。關於 :keyword:`match` 陳述式的更多資訊,請參閱"
529+
"\\ :ref:`規格說明 <match>`\\ 和\\ :ref:`教學 <tut-match>`。較舊的替代方式是使"
530+
"用一連串的 ``if... elif... elif... else``。"
531531

532532
#: ../../faq/design.rst:270
533533
msgid ""

‎glossary.po‎

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ msgid ""
240240
"that it contains :keyword:`yield` expressions for producing a series of "
241241
"values usable in an :keyword:`async for` loop. See :pep:`525`."
242242
msgstr ""
243-
"一個會回傳 :term:`asynchronous generator iterator`\\ (非同步產生器疊代器)的"
244-
"函式。它看起來像一個以 :keyword:`async def` 定義的協程函式 (coroutine "
243+
"一個會回傳\\ :term:`非同步產生器疊代器 <asynchronous generator iterator>`\\ "
244+
"的函式。它看起來像一個以 :keyword:`async def` 定義的協程函式 (coroutine "
245245
"function),但不同的是它包含了 :keyword:`yield` 運算式,能生成一系列可用"
246246
"於 :keyword:`async for` 迴圈的值。請參閱 :pep:`525`。"
247247

@@ -260,8 +260,8 @@ msgstr "asynchronous generator iterator(非同步產生器疊代器)"
260260
#: ../../glossary.rst:116
261261
msgid "An object created by an :term:`asynchronous generator function`."
262262
msgstr ""
263-
"一個由 :term:`asynchronous generator function`\\ (非同步產生器函式)所建立的"
264-
"物件。"
263+
"一個由\\ :term:`非同步產生器函式 <asynchronous generator function>`\\ 所建立"
264+
"的物件。"
265265

266266
#: ../../glossary.rst:118
267267
msgid ""
@@ -1106,7 +1106,7 @@ msgstr ""
11061106

11071107
#: ../../glossary.rst:507
11081108
msgid "exhausted"
1109-
msgstr ""
1109+
msgstr "exhausted(耗盡)"
11101110

11111111
#: ../../glossary.rst:509
11121112
msgid ""
@@ -1115,6 +1115,10 @@ msgid ""
11151115
"func:`next`) raise :exc:`StopIteration` (or :exc:`StopAsyncIteration` in the "
11161116
"case of an :term:`asynchronous iterator`)."
11171117
msgstr ""
1118+
"一個已經產生完它所有值的\\ :term:`疊代器 <iterator>`\\ 被稱為已\\ :dfn:`耗盡 "
1119+
"(exhausted)`。之後再嘗試取得下一個值(例如呼叫 :func:`next`)會引"
1120+
"發 :exc:`StopIteration`\\ (若為\\ :term:`非同步疊代器 <asynchronous "
1121+
"iterator>`\\ 則會引發 :exc:`StopAsyncIteration`)。"
11181122

11191123
#: ../../glossary.rst:515
11201124
msgid "expression"
@@ -1131,7 +1135,7 @@ msgid ""
11311135
msgstr ""
11321136
"一段可以被評估並求值的語法。換句話說,一個運算式就是文字、名稱、屬性存取、運"
11331137
"算子或函式呼叫等運算式元件的累積,而這些元件都能回傳一個值。並非所有的語言構"
1134-
"造都是運算式。另外有一些 :term:`statement`\\ (陳述式)不能被用作運算式,例"
1138+
"造都是運算式。另外有一些\\ :term:`陳述式 <statement>`\\ 不能被用作運算式,例"
11351139
"如 :keyword:`while`。賦值 (assignment) 也是陳述式,而不是運算式。"
11361140

11371141
#: ../../glossary.rst:524
@@ -1457,7 +1461,7 @@ msgid ""
14571461
"a series of values usable in a :keyword:`for`\\-loop or that can be "
14581462
"retrieved one at a time with the :func:`next` function. See :ref:`yieldexpr`."
14591463
msgstr ""
1460-
"一個會回傳 :term:`generator`\\ (產生器)物件的函式。它看起來像一個正常的函"
1464+
"一個會回傳\\ :term:`產生器 <generator>`\\ 物件的函式。它看起來像一個正常的函"
14611465
"式,但不同的是它包含了 :keyword:`yield` 運算式,能產生一系列的值,這些值可用"
14621466
"於 :keyword:`for` 迴圈,或是以 :func:`next` 函式,每次檢索其中的一個值。請參"
14631467
"閱 :ref:`yieldexpr`。"
@@ -1471,8 +1475,8 @@ msgid ""
14711475
"An object created by a :term:`generator function` or a :term:`generator "
14721476
"expression`."
14731477
msgstr ""
1474-
"一個由 :term:`generator function`\\ (產生器函式)或 :term:`generator "
1475-
"expression`\\ (產生器運算式)所建立的物件。"
1478+
"一個由\\ :term:`產生器函式 <generator function>`\\ 或\\ :term:`產生器運算式 "
1479+
"<generator expression>`\\ 所建立的物件。"
14761480

14771481
#: ../../glossary.rst:673
14781482
msgid ""
@@ -1535,7 +1539,7 @@ msgid ""
15351539
"See also the :term:`single dispatch` glossary entry, the :deco:`functools."
15361540
"singledispatch` decorator, and :pep:`443`."
15371541
msgstr ""
1538-
"另請參閱 :term:`single dispatch`\\ (單一調度)術語表條"
1542+
"另請參閱\\ :term:`單一調度 <single dispatch>`\\ 術語表條"
15391543
"目、:deco:`functools.singledispatch` 裝飾器和 :pep:`443`。"
15401544

15411545
#: ../../glossary.rst:701
@@ -1940,17 +1944,16 @@ msgid ""
19401944
"an empty container."
19411945
msgstr ""
19421946
"一個表示資料流的物件。重複地呼叫疊代器的 :meth:`~iterator.__next__` method"
1943-
"(或是將它傳遞給內建函式 :func:`next`\\ )會依序回傳資料流中的各項目。當不再"
1944-
"有資料時,則會引發 :exc:`StopIteration` 例外。此時,該疊代器物件已被"
1945-
"\\ :term:`用盡 <exhausted>`,而任何對其 :meth:`!__next__` method 的進一步呼"
1946-
"叫,都只會再次引發 :exc:`StopIteration`。疊代器必須有一"
1947-
"個 :meth:`~iterator.__iter__` method,它會回傳疊代器物件本身,所以每個疊代器"
1948-
"也都是可疊代物件,且可以用於大多數適用其他可疊代物件的場合。一個明顯的例外,"
1949-
"是嘗試多遍疊代 (multiple iteration passes) 的程式碼。一個容器物件(像"
1950-
"是 :class:`list`)在每次你將它傳遞給 :func:`iter` 函式或在 :keyword:`for` 迴"
1951-
"圈中使用它時,都會產生一個全新的疊代器。使用疊代器嘗試此事(多遍疊代)時,只"
1952-
"會回傳在前一遍疊代中被用過的、同一個已被用盡的疊代器物件,使其看起來就像一個"
1953-
"空的容器。"
1947+
"(或是將它傳遞給內建函式 :func:`next`)會依序回傳資料流中的各項目。當不再有資"
1948+
"料時,則會引發 :exc:`StopIteration` 例外。此時,該疊代器物件已\\ :term:`耗盡 "
1949+
"<exhausted>`,而任何對其 :meth:`!__next__` method 的進一步呼叫,都只會再次引"
1950+
"發 :exc:`StopIteration`。疊代器必須有一個 :meth:`~iterator.__iter__` method,"
1951+
"它會回傳疊代器物件本身,所以每個疊代器也都是可疊代物件,且可以用於大多數適用"
1952+
"其他可疊代物件的場合。一個明顯的例外,是嘗試多遍疊代 (multiple iteration "
1953+
"passes) 的程式碼。一個容器物件(像是 :class:`list`)在每次你將它傳遞"
1954+
"給 :func:`iter` 函式或在 :keyword:`for` 迴圈中使用它時,都會產生一個全新的疊"
1955+
"代器。使用疊代器嘗試此事(多遍疊代)時,只會回傳在前一遍疊代中被用過的、同一"
1956+
"個已耗盡的疊代器物件,使其看起來就像一個空的容器。"
19541957

19551958
#: ../../glossary.rst:891
19561959
msgid "More information can be found in :ref:`typeiter`."
@@ -2091,7 +2094,7 @@ msgid ""
20912094
"array in other languages than to a linked list since access to elements is "
20922095
"*O*\\ (1). See :ref:`time-complexity`."
20932096
msgstr ""
2094-
"一個 Python 內建的 :term:`sequence` (序列)。儘管它的名字是 list,它其實更類"
2097+
"一個 Python 內建的\\ :term:`序列 <sequence>`。儘管它的名字是 list,它其實更類"
20952098
"似其他語言中的一個陣列 (array) 而較不像一個鏈結串列 (linked list),因為存取元"
20962099
"素的時間複雜度是 *O*\\ (1)。請參閱 :ref:`time-complexity`。"
20972100

‎howto/annotations.po‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ msgid ""
311311
"have found the root unwrapped function."
312312
msgstr ""
313313
"如果 ``o`` 是使用 :func:`functools.update_wrapper`、:deco:`functools.wraps` "
314-
"或 :func:`functools.partial` 包裝的 callable ,請依據需求,透過存取 "
314+
"或 :func:`functools.partial` 包裝的 callable,請依據需求,透過存取 "
315315
"``o.__wrapped__`` 或 ``o.func`` 來疊代解開它,直到找到根解包函式。"
316316

317317
#: ../../howto/annotations.rst:160

‎howto/curses.po‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ msgstr ""
767767
" if c == 'p':\n"
768768
" PrintDocument()\n"
769769
" elif c == 'q':\n"
770-
" break # 離開 while 迴圈\n"
770+
" break # 跳出 while 迴圈\n"
771771
" elif c == curses.KEY_HOME:\n"
772772
" x = y = 0"
773773

@@ -799,7 +799,7 @@ msgid ""
799799
msgstr ""
800800
"curses.echo() # 啟用字元回顯\n"
801801
"\n"
802-
"# 讀取最多 15 個位元組的一行,游標位於最上方那一行\n"
802+
"# 取得最多 15 個位元組的一行,游標位於頂端那一行\n"
803803
"s = stdscr.getstr(0,0, 15)"
804804

805805
#: ../../howto/curses.rst:501

0 commit comments

Comments
 (0)