Skip to content

Commit 0b28314

Browse files
committed
Translate new/fuzzy entries from upstream sync (cpython 27349e70)
Rebased onto 7 new upstream sync commits and translated all newly introduced/fuzzy entries relative to origin/3.14: 389 entries across 50 files (whatsnew/2.4-2.6 dominate at 261 entries due to an upstream reST role-syntax modernization pass on those older release notes). Includes a cross-batch terminology consistency pass and a native-speaker fluency editorial pass on all newly translated text.
1 parent 59b2b54 commit 0b28314

50 files changed

Lines changed: 1310 additions & 113 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/arg.po

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,10 @@ msgid ""
742742
"corresponding C variable(s). For example, the format string ``\"OO|OO\"`` "
743743
"corresponds to the Python signature ``f(a, b, c=None, d=None)``."
744744
msgstr ""
745+
"表示 Python 引數列表中剩餘的引數為可選的。與可選引數相對應的 C 變數應初始化為"
746+
"其預設值 --- 當可選引數未被指定時,:c:func:`PyArg_ParseTuple` 不會更動相應 C "
747+
"變數的內容。例如,格式字串 ``\"OO|OO\"`` 對應於 Python 簽名 ``f(a, b, "
748+
"c=None, d=None)``。"
745749

746750
#: ../../c-api/arg.rst:398
747751
msgid "``$``"

c-api/exceptions.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ msgstr ""
157157

158158
#: ../../c-api/exceptions.rst:124
159159
msgid "Legacy variant of :c:func:`PyErr_DisplayException`."
160-
msgstr ":c:func:`PyErr_DisplayException` 的舊版形式。"
160+
msgstr ":c:func:`PyErr_DisplayException` 的舊版本。"
161161

162162
#: ../../c-api/exceptions.rst:126
163163
msgid ""
@@ -1161,6 +1161,10 @@ msgid ""
11611161
"cycles. The following two functions facilitate this functionality. "
11621162
"Effectively, these are the C equivalent to :deco:`reprlib.recursive_repr`."
11631163
msgstr ""
1164+
"要為容器型別正確實作 :c:member:`~PyTypeObject.tp_repr`,需要特殊的遞迴處理。"
1165+
"除了保護堆疊之外,:c:member:`~PyTypeObject.tp_repr` 還需要追蹤物件以防止循"
1166+
"環。以下兩個函式有助於實現此功能。實際上,它們相當於 C 語言版本的 :deco:"
1167+
"`reprlib.recursive_repr`。"
11641168

11651169
#: ../../c-api/exceptions.rst:1045
11661170
msgid ""

c-api/init_config.po

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2601,6 +2601,8 @@ msgid ""
26012601
"If the ``WITH_NEXT_FRAMEWORK`` macro is defined, use ``__PYVENV_LAUNCHER__`` "
26022602
"environment variable if set."
26032603
msgstr ""
2604+
"如果定義了 ``WITH_NEXT_FRAMEWORK`` 巨集,且已設定 ``__PYVENV_LAUNCHER__`` 環"
2605+
"境變數,則使用該環境變數。"
26042606

26052607
#: ../../c-api/init_config.rst:1749
26062608
msgid ""
@@ -2908,6 +2910,9 @@ msgid ""
29082910
"order: the last :c:member:`PyConfig.warnoptions` item becomes the first item "
29092911
"of ``warnings.filters`` which is checked first (highest priority)."
29102912
msgstr ""
2913+
":mod:`warnings` 模組會以相反順序新增 :data:`sys.warnoptions`:最後一個 :c:"
2914+
"member:`PyConfig.warnoptions` 項目會成為 ``warnings.filters`` 中第一個被檢查"
2915+
"(優先度最高)的項目。"
29112916

29122917
#: ../../c-api/init_config.rst:1986
29132918
msgid ""

c-api/structures.po

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,13 +530,17 @@ msgid ""
530530
"an instance of the type. This is used to create *class methods*, similar to "
531531
"what is created when using the :deco:`classmethod` built-in decorator."
532532
msgstr ""
533+
"此方法將會以型別物件作為第一個參數傳入,而非該型別的實例。這用於建立類別方"
534+
"法,類似於使用內建裝飾器 :deco:`classmethod` 時所建立的效果。"
533535

534536
#: ../../c-api/structures.rst:430
535537
msgid ""
536538
"The method will be passed ``NULL`` as the first parameter rather than an "
537539
"instance of the type. This is used to create *static methods*, similar to "
538540
"what is created when using the :deco:`staticmethod` built-in decorator."
539541
msgstr ""
542+
"此方法將會以 ``NULL`` 作為第一個參數傳入,而非該型別的實例。這用於建立靜態方"
543+
"法,類似於使用內建裝飾器 :deco:`staticmethod` 時所建立的效果。"
540544

541545
#: ../../c-api/structures.rst:434
542546
msgid ""

extending/extending.po

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1906,10 +1906,10 @@ msgid ""
19061906
"with reference counts."
19071907
msgstr ""
19081908
"另一種替代策略稱為\\ :dfn:`自動垃圾回收 (automatic garbage collection)`。(有"
1909-
"時,參照計數也被稱為一種垃圾回收策略,因此我使用「自動」來區分兩者。)自動垃"
1910-
"圾回收的最大優點是使用者不需要明確地呼叫 :c:func:`free`。(另一個聲稱的優點是"
1911-
"速度或記憶體使用量的改善 --- 但這並非確定的事實。)缺點是對於 C 語言而言,"
1912-
"沒有真正可移植的自動垃圾回收器,而參照計數可以被可移植地實作(只要 :c:func:"
1909+
"時,參照計數也被稱為一種垃圾回收策略,因此才用「自動」來區分兩者。)自動垃圾"
1910+
"回收的最大優點是使用者不需要明確地呼叫 :c:func:`free`。(另一個聲稱的優點是速"
1911+
"度或記憶體使用量的改善 --- 但這並非確定的事實。)缺點是對於 C 語言而言,並沒"
1912+
"有真正可移植的自動垃圾回收器,而參照計數可以被可移植地實作(只要 :c:func:"
19131913
"`malloc` 和 :c:func:`free` 函式可用 --- 這是 C 標準所保證的)。也許有一天會有"
19141914
"足夠可移植的 C 自動垃圾回收器可用。在那之前,我們只能與參照計數共存。"
19151915

@@ -2812,7 +2812,6 @@ msgstr ""
28122812
"式的基本結構都是相同的,所以只需要學習一次。"
28132813

28142814
#: ../../extending/extending.rst:1404
2815-
#, fuzzy
28162815
msgid ""
28172816
"Finally it should be mentioned that Capsules offer additional functionality, "
28182817
"which is especially useful for memory allocation and deallocation of the "
@@ -2821,10 +2820,10 @@ msgid ""
28212820
"Capsules (files :file:`Include/pycapsule.h` and :file:`Objects/capsule.c` in "
28222821
"the Python source code distribution)."
28232822
msgstr ""
2824-
"最後應該提到的是,Capsule 提供了額外的功能,這對於 Capsule 中儲存的指標的記憶"
2825-
"體配置和釋放特別有用。詳細資訊在 Python/C API 參考手冊的 :ref:`capsules` 章節"
2826-
"以及 Capsule 的實作中有描述(Python 原始碼發行版中的 :file:`Include/"
2827-
"pycapsule.h` 和 :file:`Objects/pycapsule.c` 檔案)。"
2823+
"最後應該提到的是,Capsule 提供了額外的功能,這對於 Capsule 中儲存之指標的記憶"
2824+
"體配置和釋放特別有用。詳細資訊在 Python/C API 參考手冊的 :ref:`capsules` "
2825+
"節,以及 Capsule 的實作中有描述(Python 原始碼發行版中的 :file:`Include/"
2826+
"pycapsule.h` 和 :file:`Objects/capsule.c` 檔案)。"
28282827

28292828
#: ../../extending/extending.rst:1412
28302829
msgid "Footnotes"

howto/descriptor.po

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ msgid ""
8686
msgstr ""
8787
"最後一個章節提供以 C 語言撰寫的內建描述器的純 Python 等價實作。如果你好奇函式"
8888
"如何轉變為綁定方法,或者想了解常見工具如 :deco:`classmethod`、:deco:"
89-
"`staticmethod`、:deco:`property` 和 :term:`__slots__` 的實作方式,請閱讀此"
90-
"章節。"
89+
"`staticmethod`、:deco:`property` 和 :term:`__slots__` 的實作方式,請閱讀此章"
90+
"。"
9191

9292
#: ../../howto/descriptor.rst:36
9393
msgid "Primer"
@@ -629,8 +629,8 @@ msgid ""
629629
"all implemented as descriptors."
630630
msgstr ""
631631
"描述器在整個語言中被廣泛使用。函式就是透過這種方式轉變為綁定方法。常見工具"
632-
"如 :deco:`classmethod`、:deco:`staticmethod`、:deco:`property` 和 :"
633-
"deco:`functools.cached_property` 都是以描述器實作的。"
632+
"如 :deco:`classmethod`、:deco:`staticmethod`、:deco:`property` 和 :deco:"
633+
"`functools.cached_property` 都是以描述器實作的。"
634634

635635
#: ../../howto/descriptor.rst:326
636636
msgid "Complete Practical Example"
@@ -1817,7 +1817,7 @@ msgstr ""
18171817
msgid ""
18181818
"Using the non-data descriptor protocol, a pure Python version of :deco:"
18191819
"`staticmethod` would look like this:"
1820-
msgstr ""
1820+
msgstr "使用非資料描述器協定,:deco:`staticmethod` 的純 Python 版本大致如下:"
18211821

18221822
#: ../../howto/descriptor.rst:1331
18231823
msgid ""
@@ -1928,7 +1928,7 @@ msgstr ""
19281928
msgid ""
19291929
"Using the non-data descriptor protocol, a pure Python version of :deco:"
19301930
"`classmethod` would look like this:"
1931-
msgstr ""
1931+
msgstr "使用非資料描述器協定,:deco:`classmethod` 的純 Python 版本大致如下:"
19321932

19331933
#: ../../howto/descriptor.rst:1471
19341934
msgid ""
@@ -2067,6 +2067,8 @@ msgid ""
20672067
"5. Blocks tools like :deco:`functools.cached_property` which require an "
20682068
"instance dictionary to function correctly:"
20692069
msgstr ""
2070+
"5. 阻擋像 :deco:`functools.cached_property` 這類需要實例字典才能正常運作的工"
2071+
"具:"
20702072

20712073
#: ../../howto/descriptor.rst:1610
20722074
msgid ""

howto/enum.po

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,8 @@ msgid ""
531531
"By default, enumerations allow multiple names as aliases for the same value. "
532532
"When this behavior isn't desired, you can use the :deco:`unique` decorator::"
533533
msgstr ""
534+
"預設情況下,列舉允許多個名稱作為同一個值的別名。當不需要此行為時,你可以使"
535+
"用 :deco:`unique` 裝飾器: ::"
534536

535537
#: ../../howto/enum.rst:261
536538
msgid ""
@@ -1005,6 +1007,8 @@ msgid ""
10051007
"produce very strange results at runtime, such as members being equal to each "
10061008
"other::"
10071009
msgstr ""
1010+
"不支援將 :deco:`~dataclasses.dataclass` 裝飾器新增至 :class:`Enum` 及其子類"
1011+
"別。這不會引發任何錯誤,但會在執行時產生非常奇怪的結果,例如成員彼此相等: ::"
10081012

10091013
#: ../../howto/enum.rst:517
10101014
msgid ""

library/annotationlib.po

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,8 @@ msgid ""
344344
"For example, this is used to implement the :attr:`~Format.STRING` format "
345345
"for :class:`typing.TypedDict` classes created through the functional syntax:"
346346
msgstr ""
347+
"舉例來說,這用於為透過函式語法建立的 :class:`typing.TypedDict` 類別實作 :"
348+
"attr:`~Format.STRING` 格式:"
347349

348350
#: ../../library/annotationlib.rst:241
349351
msgid ""

library/asyncio-task.po

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -452,10 +452,10 @@ msgid ""
452452
"class:`asyncio.TaskGroup` which keeps a strong reference to each task, "
453453
"awaits them and propagates their exceptions::"
454454
msgstr ""
455-
"請注意,這種做法從不對 task 執行 await,因此如果某個 task 失敗,其例外永遠不"
456-
"會被取得,當該 task 被垃圾回收時,asyncio 會記錄一則「Task exception was "
455+
"請注意,這種做法不會對這些任務執行 await,因此如果某個任務失敗,其例外將永遠"
456+
"不會被取得;當該任務被垃圾回收時,asyncio 會記錄一則「Task exception was "
457457
"never retrieved」訊息。為了避免這種情況,請使用 :class:`asyncio.TaskGroup`,"
458-
"它會對每個 task 保留強參照、對它們執行 await 並傳播它們的例外: ::"
458+
"它會對每個任務保留強參照、對它們執行 await並傳播它們的例外: ::"
459459

460460
#: ../../library/asyncio-task.rst:298
461461
msgid ""
@@ -1201,11 +1201,11 @@ msgstr ""
12011201

12021202
#: ../../library/asyncio-task.rst:860
12031203
msgid "If a timeout occurs, it cancels *aw* and raises :exc:`TimeoutError`."
1204-
msgstr ""
1204+
msgstr "如果發生逾時,它會取消 *aw* 並引發 :exc:`TimeoutError`。"
12051205

12061206
#: ../../library/asyncio-task.rst:862
12071207
msgid "To prevent *aw* from being cancelled, wrap it in :func:`shield`."
1208-
msgstr ""
1208+
msgstr "為了防止 *aw* 被取消,請將它包裝在 :func:`shield` 中。"
12091209

12101210
#: ../../library/asyncio-task.rst:864
12111211
msgid ""
@@ -1254,6 +1254,8 @@ msgid ""
12541254
"Implemented using :func:`asyncio.timeout`, a coroutine passed as *aw* is no "
12551255
"longer wrapped in a :class:`Task` when *timeout* is positive."
12561256
msgstr ""
1257+
"使用 :func:`asyncio.timeout` 實作後,當 *timeout* 為正值時,以 *aw* 傳入的協"
1258+
"程將不再被包裝成 :class:`Task`。"
12571259

12581260
#: ../../library/asyncio-task.rst:909
12591261
msgid "Waiting primitives"

library/compression.zstd.po

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,8 @@ msgid ""
448448
"`EOFError`. Any data found after the end of the frame is ignored and saved "
449449
"in the :attr:`~.unused_data` attribute."
450450
msgstr ""
451+
"在一個 frame 結束後嘗試解壓縮資料將會引發 :exc:`EOFError`。任何在該 frame 結"
452+
"束後找到的資料都會被忽略,並儲存在 :attr:`~.unused_data` 屬性中。"
451453

452454
#: ../../library/compression.zstd.rst:350
453455
msgid "``True`` if the end-of-stream marker has been reached."
@@ -678,7 +680,7 @@ msgstr ""
678680
msgid ""
679681
"Parameters are optional; any omitted parameter will have its value selected "
680682
"automatically."
681-
msgstr "參數是可選的;任何省略的參數都會自動選擇其數值。"
683+
msgstr "參數是可選的;任何省略的參數,其數值都會自動決定。"
682684

683685
#: ../../library/compression.zstd.rst:505
684686
msgid ""
@@ -986,7 +988,7 @@ msgid ""
986988
"omitted parameter will have its value selected automatically."
987989
msgstr ""
988990
"一個 :class:`~enum.IntEnum`,包含解壓縮資料時可以使用的進階解壓縮參數鍵。參數"
989-
"是可選的;任何省略的參數都會自動選擇其數值。"
991+
"是可選的;任何省略的參數,其數值都會自動決定。"
990992

991993
#: ../../library/compression.zstd.rst:736
992994
msgid "Example setting the :attr:`~.window_log_max` to the maximum size::"

0 commit comments

Comments
 (0)