Skip to content

Commit c9ffeb0

Browse files
committed
Sync with cpython and translate new/fuzzy entries from upstream sync
Resets to python/python-docs-zh-tw cron/sync/3.14 (cpython 44b4029a), pulls in library/concurrent.futures.po's latest doc refresh, and translates the accumulated backlog of new/fuzzy msgids versus the 3.14 branch: 1229 entries in library/tkinter.po (upstream doc rewrite), library/tkinter.ttk.po, library/dataclasses.po, library/curses.po, library/os.po, a brand-new library/asyncio-threading.po, and 43 other files, for 1328 entries total across 49 files. Co-authored-by: Claude <noreply@anthropic.com>
1 parent 83a0099 commit c9ffeb0

49 files changed

Lines changed: 2881 additions & 746 deletions

Some content is hidden

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

c-api/bytes.po

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,10 @@ msgid ""
312312
"\"stolen\", the value of *\\*bytes* will be set to ``NULL``, and the "
313313
"appropriate exception will be set."
314314
msgstr ""
315+
"在 *\\*bytes* 中建立一個新的 bytes 物件,其內容為 *newpart* 附加到 *bytes* 之"
316+
"後的結果;呼叫者將擁有新的參照。*bytes* 舊值的參照將被「竊取」。如果無法建立"
317+
"新物件,*bytes* 的舊參照仍將被「竊取」,*\\*bytes* 的值將被設為 ``NULL``,並"
318+
"會設定適當的例外。"
315319

316320
#: ../../c-api/bytes.rst:190 ../../c-api/bytes.rst:200
317321
msgid ""

c-api/dict.po

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ msgid ""
110110
"on success or ``-1`` on failure. This function *does not* \":term:`steal`\" "
111111
"a reference to *val*."
112112
msgstr ""
113+
"以 *key* 為鍵,將 *val* 插入至字典 *p* 中。*key* 必須是 :term:`可雜湊的 "
114+
"<hashable>`,否則將引發 :exc:`TypeError`。成功時回傳 ``0``,失敗時回傳 "
115+
"``-1``。此函式\\ *不會*\\ 「竊取」對 *val* 的參照。"
113116

114117
#: ../../c-api/dict.rst:103
115118
msgid ""

c-api/exceptions.po

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ msgstr ""
543543
msgid ""
544544
"This call \":term:`steals <steal>`\" a reference to *exc*, which must be a "
545545
"valid exception."
546-
msgstr ""
546+
msgstr "此呼叫「竊取」對 *exc* 的參照,*exc* 必須為一個有效的例外。"
547547

548548
#: ../../c-api/exceptions.rst:516
549549
msgid "Use :c:func:`PyErr_GetRaisedException` instead."
@@ -699,6 +699,10 @@ msgid ""
699699
"arguments. This function is kept for backwards compatibility. Prefer using :"
700700
"c:func:`PyErr_SetHandledException`."
701701
msgstr ""
702+
"設定例外資訊,如同從 ``sys.exc_info()`` 得知的資訊一般。這裡指的是一個 *已經"
703+
"被捕捉* 的例外,而不是剛被引發的例外。此函式「竊取」這些引數的參照。若要清除"
704+
"例外狀態,請為所有三個引數傳入 ``NULL``。此函式是為了向下相容而保留,建議改"
705+
"用 :c:func:`PyErr_SetHandledException`。"
702706

703707
#: ../../c-api/exceptions.rst:653
704708
msgid ""
@@ -715,6 +719,8 @@ msgid ""
715719
"argument). The function still \":term:`steals <steal>`\" references of all "
716720
"three arguments."
717721
msgstr ""
722+
"引數 ``type`` 和 ``traceback`` 已不再使用,可以為 NULL。直譯器現在會從例外實"
723+
"例(引數 ``value``)中衍生出它們。此函式仍會「竊取」所有三個引數的參照。"
718724

719725
#: ../../c-api/exceptions.rst:668
720726
msgid "Signal Handling"
@@ -933,6 +939,8 @@ msgid ""
933939
"clear it. There is no type check to make sure that *ctx* is an exception "
934940
"instance. This \":term:`steals <steal>`\" a reference to *ctx*."
935941
msgstr ""
942+
"將與該例外關聯的情境設定為 *ctx*。使用 ``NULL`` 來清除它。這裡不會檢查型別以"
943+
"確保 *ctx* 是一個例外實例。此函式「竊取」對 *ctx* 的參照。"
936944

937945
#: ../../c-api/exceptions.rst:861
938946
msgid ""
@@ -949,6 +957,8 @@ msgid ""
949957
"exception instance or ``None``. This \":term:`steals <steal>`\" a reference "
950958
"to *cause*."
951959
msgstr ""
960+
"將與該例外關聯的成因設定為 *cause*。使用 ``NULL`` 來清除它。這裡不會檢查型別"
961+
"以確保 *cause* 是一個例外實例或 ``None``。此函式「竊取」對 *cause* 的參照。"
952962

953963
#: ../../c-api/exceptions.rst:874
954964
msgid ""

c-api/gen.po

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,26 +61,24 @@ msgstr ""
6161
"此函式總是會成功執行。"
6262

6363
#: ../../c-api/gen.rst:37
64-
#, fuzzy
6564
msgid ""
6665
"Create and return a new generator object based on the *frame* object. A "
6766
"reference to *frame* is \":term:`stolen <steal>`\" by this function (even on "
6867
"error). The argument must not be ``NULL``."
6968
msgstr ""
70-
"基於 *frame* 物件建立並回傳一個新的產生器物件。此函式會取走一個對 *frame* 的"
71-
"參照 (reference)。引數必須不為 ``NULL``。"
69+
"基於 *frame* 物件建立並回傳一個新的產生器物件。此函式會「竊取」對 *frame* 的"
70+
"一個參照(即使發生錯誤也一樣)。引數必須不為 ``NULL``。"
7271

7372
#: ../../c-api/gen.rst:43
74-
#, fuzzy
7573
msgid ""
7674
"Create and return a new generator object based on the *frame* object, with "
7775
"``__name__`` and ``__qualname__`` set to *name* and *qualname*. A reference "
7876
"to *frame* is \":term:`stolen <steal>`\" by this function (even on error). "
7977
"The *frame* argument must not be ``NULL``."
8078
msgstr ""
8179
"基於 *frame* 物件建立並回傳一個新的產生器物件,其中 ``__name__`` 和 "
82-
"``__qualname__`` 設為 *name* 和 *qualname*。此函式會取走一個對 *frame* 的參"
83-
"。*frame* 引數必須不為 ``NULL``。"
80+
"``__qualname__`` 設為 *name* 和 *qualname*。此函式會「竊取」對 *frame* 的一個"
81+
"參照(即使發生錯誤也一樣)。*frame* 引數必須不為 ``NULL``。"
8482

8583
#: ../../c-api/gen.rst:51
8684
msgid ""
@@ -107,14 +105,14 @@ msgstr ""
107105
"AsyncGeneratorType` 使用。"
108106

109107
#: ../../c-api/gen.rst:70
110-
#, fuzzy
111108
msgid ""
112109
"Create a new asynchronous generator wrapping *frame*, with ``__name__`` and "
113110
"``__qualname__`` set to *name* and *qualname*. *frame* is \":term:`stolen "
114111
"<steal>`\" by this function (even on error) and must not be ``NULL``."
115112
msgstr ""
116113
"建立一個包裝 *frame* 的非同步產生器,並將 ``__name__`` 和 ``__qualname__`` 設"
117-
"為 *name* 和 *qualname*。*frame* 會被此函式取走,且不得為 ``NULL``。"
114+
"為 *name* 和 *qualname*。*frame* 會被此函式「竊取」(即使發生錯誤也一樣),且"
115+
"不得為 ``NULL``。"
118116

119117
#: ../../c-api/gen.rst:75
120118
msgid ""

c-api/init_config.po

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,6 +1091,8 @@ msgid ""
10911091
"The function now replaces :data:`sys.flags` (create a new object), instead "
10921092
"of modifying :data:`sys.flags` in-place."
10931093
msgstr ""
1094+
"此函式現在會取代 :data:`sys.flags`\\(建立新物件),而非原地修改 :data:`sys."
1095+
"flags`。"
10941096

10951097
#: ../../c-api/init_config.rst:634
10961098
msgid "PyConfig C API"

c-api/intro.po

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -987,15 +987,13 @@ msgstr ""
987987
"照 <borrowed reference>`\\ 就不需要做任何事情。"
988988

989989
#: ../../c-api/intro.rst:642
990-
#, fuzzy
991990
msgid ""
992991
"Conversely, when a calling function passes in a reference to an object, "
993992
"there are two possibilities: the function *steals* a reference to the "
994993
"object, or it does not."
995994
msgstr ""
996-
"相反地,當呼叫的函式傳入物件的參照時,有兩種可能性:函式有\\ *竊取 (steal)* "
997-
"物件的參照,或者沒有。 *竊取參照*\\ 意味著當你將參照傳遞給函式時,該函式假定"
998-
"它現在擁有該參照,並且你不再對它負責。"
995+
"相反地,當呼叫的函式傳入物件的參照時,有兩種可能性:函式\\ *竊取 (steal)*\\ "
996+
"物件的參照,或者沒有。"
999997

1000998
#: ../../c-api/intro.rst:646
1001999
msgid ""
@@ -1004,6 +1002,9 @@ msgid ""
10041002
"can use :c:func:`!Py_DECREF` at its discretion, you (the caller) must not "
10051003
"use that reference after the call."
10061004
msgstr ""
1005+
"*竊取參照*\\ 意味著當你將參照傳遞給函式時,該函式假定它現在擁有該參照。由於新"
1006+
"的擁有者可以自行決定何時呼叫 :c:func:`!Py_DECREF`,你(呼叫者)在呼叫之後就不"
1007+
"可以再使用該參照。"
10071008

10081009
#: ../../c-api/intro.rst:655
10091010
msgid ""

c-api/list.po

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,13 @@ msgstr ""
123123
"出邊界範圍則回傳 ``-1`` 並設定一個 :exc:`IndexError` 例外。"
124124

125125
#: ../../c-api/list.rst:105
126-
#, fuzzy
127126
msgid ""
128127
"This function \":term:`steals <steal>`\" a reference to *item*, even on "
129128
"error. On success, it discards a reference to an item already in the list at "
130129
"the affected position (unless it was ``NULL``)."
131130
msgstr ""
132-
"此函式「竊取」對 *item* 的參照,並丟棄對串列中受影響位置上已存在項目的參照。"
131+
"此函式「竊取」對 *item* 的參照,即使發生錯誤也一樣。成功時,它會丟棄串列中受"
132+
"影響位置上已存在項目的參照(除非該項目為 ``NULL``)。"
133133

134134
#: ../../c-api/list.rst:113
135135
msgid ""
@@ -149,7 +149,6 @@ msgstr ""
149149
"查。"
150150

151151
#: ../../c-api/list.rst:122
152-
#, fuzzy
153152
msgid ""
154153
"This macro \":term:`steals <steal>`\" a reference to *item*, and, unlike :c:"
155154
"func:`PyList_SetItem`, does *not* discard a reference to any item that is "

c-api/memory.po

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,15 @@ msgid ""
108108
"in the previous example, the allocated memory for the I/O buffer completely "
109109
"escapes the Python memory manager."
110110
msgstr ""
111+
"然而,在大多數情況下,建議從 Python 堆積分配記憶體,這是因為 Python 堆積是由 "
112+
"Python 記憶體管理器所控制的。舉例來說,當直譯器被以 C 撰寫的新物件型別擴充"
113+
"時,就必須這樣做。使用 Python 堆積的另一個理由,是希望能\\ *告知*\\ Python 記"
114+
"憶體管理器該擴充模組的記憶體需求。即使所請求的記憶體僅用於內部、高度特定的用"
115+
"途,將所有記憶體請求都委託給 Python 記憶體管理器,也能讓直譯器對其整體的記憶"
116+
"體使用狀況有更準確的掌握。因此,在某些情況下,Python 記憶體管理器可能會(或可"
117+
"能不會)觸發適當的動作,例如垃圾回收、記憶體壓縮或其他預防性程序。請注意,如"
118+
"同前面範例所示,若使用 C 函式庫的分配器,配置給 I/O 緩衝區的記憶體會完全逃脫 "
119+
"Python 記憶體管理器的掌控。"
111120

112121
#: ../../c-api/memory.rst:88
113122
msgid ""
@@ -226,6 +235,9 @@ msgid ""
226235
"of type :c:expr:`void*` to the allocated memory, or ``NULL`` if the request "
227236
"fails. The memory is initialized to zeros."
228237
msgstr ""
238+
"分配 *nelem* 個元素,每個元素大小為 *elsize* 個位元組,並回傳一個型別為 :c:"
239+
"expr:`void*` 的指標指向所分配的記憶體;如果請求失敗則回傳 ``NULL``。這塊記憶"
240+
"體會被初始化為零。"
229241

230242
#: ../../c-api/memory.rst:168
231243
msgid ""

c-api/module.po

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,9 @@ msgid ""
651651
"function that returns a new reference without bothering to check its result "
652652
"or even saving it to a variable."
653653
msgstr ""
654+
"類似於 :c:func:`PyModule_AddObjectRef`,但會「竊取」對 *value* 的參照(即使發"
655+
"生錯誤也一樣)。它可以搭配某個回傳新參照之函式的結果來呼叫,而不需要費心檢查"
656+
"其結果,甚至不需要將其儲存到變數中。"
654657

655658
#: ../../c-api/module.rst:569
656659
msgid ""
@@ -663,13 +666,12 @@ msgstr ""
663666
"}"
664667

665668
#: ../../c-api/module.rst:578
666-
#, fuzzy
667669
msgid ""
668670
"Similar to :c:func:`PyModule_AddObjectRef`, but :term:`steals <steal>` a "
669671
"reference to *value* on success (if it returns ``0``)."
670672
msgstr ""
671-
"類似於 :c:func:`PyModule_AddObjectRef`,但在成功時(如果回傳 ``0``)會偷走對 "
672-
"*value* 的參照。"
673+
"類似於 :c:func:`PyModule_AddObjectRef`,但在成功時(如果回傳 ``0``)會「竊"
674+
"取」對 *value* 的參照。"
673675

674676
#: ../../c-api/module.rst:581
675677
msgid ""

c-api/sequence.po

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ msgid ""
8282
"of the Python statement ``o[i] = v``. This function *does not* \":term:"
8383
"`steal`\" a reference to *v*."
8484
msgstr ""
85+
"將物件 *v* 指定給 *o* 的第 *i* 個元素。失敗時引發例外並回傳 ``-1``;成功時回"
86+
"傳 ``0``。這相當於 Python 陳述式 ``o[i] = v``。此函式\\ *不會*\\ 「竊取」對 "
87+
"*v* 的參照。"
8588

8689
#: ../../c-api/sequence.rst:72
8790
msgid ""

0 commit comments

Comments
 (0)