Skip to content

Commit e1eaa21

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 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent f5a4715 commit e1eaa21

28 files changed

Lines changed: 121 additions & 118 deletions

‎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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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 ""

‎glossary.po‎

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -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 iterator`\\ (非同步疊代"
1121+
"器)則會引發 :exc:`StopAsyncIteration`)。"
11181122

11191123
#: ../../glossary.rst:515
11201124
msgid "expression"
@@ -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`."

‎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/sorting.po‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -756,10 +756,9 @@ msgid ""
756756
"decorator is provided to make that task easier."
757757
msgstr ""
758758
"然而,請注意,當 :meth:`~object.__lt__` 沒有被實作時,``<`` 可以回退 (fall "
759-
"back) 使用 :meth:`~object.__gt__`\\ (有關技術上的細節資訊請"
760-
"看 :func:`object.__lt__` )。為了避免意外發生,:pep:`8` 建議所有六種的比較函"
761-
"式都需要被實作。裝飾器 :deco:`~functools.total_ordering` 被提供用來讓任務更為"
762-
"簡單。"
759+
"back) 使用 :meth:`~object.__gt__`\\ (有關此機制的細節請參"
760+
"閱 :func:`object.__lt__`)。為了避免意外,:pep:`8` 建議實作全部六種比較方"
761+
"法。:deco:`~functools.total_ordering` 裝飾器可以讓這項工作更容易。"
763762

764763
#: ../../howto/sorting.rst:381
765764
msgid ""

‎library/abc.po‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ msgstr ""
325325
"類別的元類別是 :class:`ABCMeta` 或是從該類別衍生才能使用此裝飾器。一個具有衍"
326326
"生自 :class:`!ABCMeta` 之元類別的類別不可以被實例化,除非它全部的抽象方法和特"
327327
"性均已被覆寫。抽象方法可透過任何一般的 'super' 呼叫機制來呼叫。:deco:`!"
328-
"abstractmethod` 可被用於為特性和描述器宣告的抽象方法。"
328+
"abstractmethod` 可用來為特性和描述器宣告抽象方法。"
329329

330330
#: ../../library/abc.rst:176
331331
msgid ""
@@ -348,7 +348,7 @@ msgid ""
348348
"the following usage examples::"
349349
msgstr ""
350350
"當 :deco:`!abstractmethod` 與其他方法描述器 (method descriptor) 配合應用時,"
351-
"它應被當最內層的裝飾器,如以下用法範例所示: ::"
351+
"它應被當作最內層的裝飾器,如以下用法範例所示: ::"
352352

353353
#: ../../library/abc.rst:187
354354
msgid ""
@@ -422,7 +422,7 @@ msgid ""
422422
msgstr ""
423423
"為了能正確地與 ABC 機制實作相互操作,描述器必須使用 :attr:`!"
424424
"__isabstractmethod__` 將自身標識為抽象的。一般來說,如果被用於組成描述器的任"
425-
"一方法是抽象的,則此屬性應當為 ``True``。 例如,Python 的內"
425+
"一方法是抽象的,則此屬性應當為 ``True``。例如,Python 的內"
426426
"建 :deco:`property` 所做的就等價於: ::"
427427

428428
#: ../../library/abc.rst:223

‎library/ast.po‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2625,8 +2625,8 @@ msgid ""
26252625
"``handlers`` are interpreted as ``except*`` blocks rather than ``except``."
26262626
msgstr ""
26272627
"``try`` 區塊,後面跟著 ``except*`` 子句。這些屬性與 :class:`Try` 相同,但是 "
2628-
"``handlers`` 中的 :class:`ExceptHandler` 節點被直譯 (interpret) 為 "
2629-
"``except*`` 區塊而不是 ``except``。"
2628+
"``handlers`` 中的 :class:`ExceptHandler` 節點被解讀為 ``except*`` 區塊而不是 "
2629+
"``except``。"
26302630

26312631
#: ../../library/ast.rst:1369
26322632
msgid ""

‎library/atexit.po‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ msgid ""
9595
"state, which could lead to crashes rather than clean shutdown."
9696
msgstr ""
9797
"在退出處理函式中嘗試啟動新執行緒或以 :func:`os.fork` 建立新行程,現在會導"
98-
"致 :exc:`RuntimeError`。在此之前,這可能會導致 Python 主要 runtime 執行緒釋放"
99-
"執行緒狀態,而內部 :mod:`threading` 例程或新行程嘗試使用該狀態所形成的競態條"
100-
"件 (race condition),進而導致崩潰 (crash) 而不是完整關閉中止。"
98+
"致 :exc:`RuntimeError`。在此之前,這可能會在 Python 主 runtime 執行緒釋放執行"
99+
"緒狀態、而內部 :mod:`threading` 例程或新行程又嘗試使用該狀態時產生競態條件 "
100+
"(race condition),進而導致崩潰 (crash) 而非正常關閉。"
101101

102102
#: ../../library/atexit.rst:58
103103
msgid ""

‎library/bisect.po‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,11 @@ msgid ""
218218
"searching an array of precomputed keys to locate the insertion point (as "
219219
"shown in the examples section below)."
220220
msgstr ""
221-
"搜尋函式為無狀態的 (stateless),且鍵函式會在使用過後被丟棄。因此,如果搜尋函"
222-
"式被使用於迴圈當中,鍵函式會不斷被重複呼叫於相同的 list 元素。如果鍵函式執行"
223-
"速度不快,請考慮將其以 :py:deco:`functools.cache` 包裝起來以減少重複的計算。"
224-
"另外,也可以透過搜尋預先計算好的鍵列表 (array of precomputed keys) 來定位插入"
225-
"點(如下方範例所示)。"
221+
"搜尋函式為無狀態的 (stateless),且會在使用過後丟棄鍵函式的結果。因此,如果搜"
222+
"尋函式被使用於迴圈當中,鍵函式可能會在相同的陣列元素上被一再呼叫。如果鍵函式"
223+
"執行速度不快,請考慮將其以 :py:deco:`functools.cache` 包裝起來以避免重複的計"
224+
"算。另外,也可以考慮搜尋一個預先計算好的鍵陣列 (array of precomputed keys) 來"
225+
"定位插入點(如下方範例所示)。"
226226

227227
#: ../../library/bisect.rst:141
228228
msgid ""

‎library/collections.po‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,10 +1066,10 @@ msgid ""
10661066
"`~deque.rotate` method::"
10671067
msgstr ""
10681068
"一個\\ `輪詢調度器 <https://en.wikipedia.org/wiki/Round-"
1069-
"robin_scheduling>`_\\ 可以透過在 :class:`deque` 中放入 iterator 來實現,值自"
1070-
"目前 iterator 的位置 0 取出,如果 iterator 已經\\ :term:`消耗完畢 "
1071-
"<exhausted>`\\ 就用 :meth:`~deque.popleft` 將其從佇列中移除,否則利"
1072-
"用 :meth:`~deque.rotate` 來將其移至佇列尾端: ::"
1069+
"robin_scheduling>`_\\ 可以透過在 :class:`deque` 中放入 iterator 來實作,值自"
1070+
"目前 iterator 的位置 0 取出,如果 iterator 已經\\ :term:`耗盡 <exhausted>`\\ "
1071+
"就用 :meth:`~deque.popleft` 將其從佇列中移除,否則利用 :meth:`~deque.rotate` "
1072+
"來將其移至佇列尾端: ::"
10731073

10741074
#: ../../library/collections.rst:693
10751075
msgid ""
@@ -1978,8 +1978,8 @@ msgid ""
19781978
"An :class:`OrderedDict` would also be useful for implementing variants of :"
19791979
"deco:`functools.lru_cache`:"
19801980
msgstr ""
1981-
":class:`OrderedDict` 在實現一個 :deco:`functools.lru_cache` 的變形版本時也非"
1982-
"常有用:"
1981+
":class:`OrderedDict` 在實作 :deco:`functools.lru_cache` 的變形版本時也非常有"
1982+
"用:"
19831983

19841984
#: ../../library/collections.rst:1229
19851985
msgid ""

0 commit comments

Comments
 (0)