Skip to content

Commit eb6fe62

Browse files
committed
Translate new/fuzzy entries from upstream sync (cpython 6e6984a)
Rebased onto upstream/cron/sync/3.14 (5 new sync commits) and translated the resulting new-or-fuzzy backlog: 70 entries across 27 files (9 new, 61 fuzzy resolved). Nearly all fuzzy entries stem from upstream introducing a new :deco: reST role for decorator references, replacing prior :func:/:class:/:meth: roles -- updated the corresponding role in each existing Chinese translation to match, verifying prose accuracy rather than blind-replacing. Files touched: c-api/frame.po, deprecations/index.po, deprecations/pending-removal-in-3.15.po, faq/programming.po, glossary.po, howto/{annotations,descriptor,sorting}.po, library/{abc, asyncio-stream,bisect,collections,contextlib,csv,enum,functions, functools,platform,tarfile}.po, reference/simple_stmts.po, sphinx.po, whatsnew/{3.3,3.10,3.11,3.12,3.13,3.14}.po. Also fixed along the way: - whatsnew/3.11.po: wrong contributor name on the :deco:`typing.final` entry (was "Serhiy Storchaka", msgid credits "Jelle Zijlstra"). - whatsnew/3.3.po: typo "請改" -> "請改用" (missing 用) on the abc.abstractproperty deprecation entry. - Several instances of the known RST-escaping bug (role/literal closing backtick directly touching full-width punctuation with no \ separator) in entries touched by this sync, across abc.po, functools.po, descriptor.po, and whatsnew/3.12.po. Excludes the large pre-existing untranslated backlog unrelated to this sync (e.g. whatsnew/2.4-2.7.po, os.po, ctypes.po, typing.po, and other files where "new" msgids were just role-syntax churn on long-untranslated entries, not genuinely new content). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DSmHq7nqqTrRwTigk6kNeh
1 parent 895e922 commit eb6fe62

27 files changed

Lines changed: 106 additions & 152 deletions

c-api/frame.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ msgstr "此 frame 對應到一個類別實例上的方法。"
309309
msgid ""
310310
"Note that reading the executable kind from a frame is currently only "
311311
"possible with undocumented internal APIs."
312-
msgstr ""
312+
msgstr "請注意,目前只能透過未寫入文件的內部 API 從 frame 中讀取可執行種類。"
313313

314314
#: ../../c-api/frame.rst:280
315315
msgid "The number of entries in :c:data:`PyUnstable_ExecutableKinds`."

deprecations/index.po

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,13 +193,12 @@ msgstr ""
193193
"pass`` 或 ``TD = TypedDict(\"TD\", {})`` 來建立具有零個欄位的 TypedDict。"
194194

195195
#: ../../deprecations/pending-removal-in-3.15.rst:85
196-
#, fuzzy
197196
msgid ""
198197
"The :deco:`typing.no_type_check_decorator` decorator function has been "
199198
"deprecated since Python 3.13. After eight years in the :mod:`typing` module, "
200199
"it has yet to be supported by any major type checker."
201200
msgstr ""
202-
"自 Python 3.13 起,:func:`typing.no_type_check_decorator` 裝飾器函式已被棄"
201+
"自 Python 3.13 起,:deco:`typing.no_type_check_decorator` 裝飾器函式已被棄"
203202
"用。在 :mod:`typing` 模組中使用了八年之後,它尚未得到任何主要型別檢查器的支"
204203
"援。"
205204

deprecations/pending-removal-in-3.15.po

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,12 @@ msgstr ""
183183
"pass`` 或 ``TD = TypedDict(\"TD\", {})`` 來建立具有零個欄位的 TypedDict。"
184184

185185
#: ../../deprecations/pending-removal-in-3.15.rst:85
186-
#, fuzzy
187186
msgid ""
188187
"The :deco:`typing.no_type_check_decorator` decorator function has been "
189188
"deprecated since Python 3.13. After eight years in the :mod:`typing` module, "
190189
"it has yet to be supported by any major type checker."
191190
msgstr ""
192-
"自 Python 3.13 起,:func:`typing.no_type_check_decorator` 裝飾器函式已被棄"
191+
"自 Python 3.13 起,:deco:`typing.no_type_check_decorator` 裝飾器函式已被棄"
193192
"用。在 :mod:`typing` 模組中使用了八年之後,它尚未得到任何主要型別檢查器的支"
194193
"援。"
195194

faq/programming.po

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3866,14 +3866,13 @@ msgid "How do I cache method calls?"
38663866
msgstr "如何快取方法呼叫?"
38673867

38683868
#: ../../faq/programming.rst:2005
3869-
#, fuzzy
38703869
msgid ""
38713870
"The two principal tools for caching methods are :deco:`functools."
38723871
"cached_property` and :deco:`functools.lru_cache`. The former stores results "
38733872
"at the instance level and the latter at the class level."
38743873
msgstr ""
3875-
"快取方法的兩個主要工具是 :func:`functools.cached_property` 和 :func:"
3876-
"`functools.lru_cache`。前者在實例層級儲存結果,後者在類別層級儲存結果。"
3874+
"快取方法的兩個主要工具是 :deco:`functools.cached_property` 和 :deco:"
3875+
"`functools.lru_cache`\\ 。前者在實例層級儲存結果,後者在類別層級儲存結果。"
38773876

38783877
#: ../../faq/programming.rst:2010
38793878
msgid ""

glossary.po

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -903,15 +903,14 @@ msgid "decorator"
903903
msgstr "decorator(裝飾器)"
904904

905905
#: ../../glossary.rst:417
906-
#, fuzzy
907906
msgid ""
908907
"A function returning another function, usually applied as a function "
909908
"transformation using the ``@wrapper`` syntax. Common examples for "
910909
"decorators are :deco:`classmethod` and :deco:`staticmethod`."
911910
msgstr ""
912911
"一個函式,它會回傳另一個函式,通常它會使用 ``@wrapper`` 語法,被應用為一種函"
913-
"式的變換 (function transformation)。裝飾器的常見範例是 :func:`classmethod` "
914-
"和 :func:`staticmethod`。"
912+
"式的變換 (function transformation)。裝飾器的常見範例是 :deco:`classmethod` "
913+
"和 :deco:`staticmethod`\\ 。"
915914

916915
#: ../../glossary.rst:421
917916
msgid ""
@@ -1534,13 +1533,12 @@ msgstr ""
15341533
"用哪種實作,是由調度演算法 (dispatch algorithm) 來決定。"
15351534

15361535
#: ../../glossary.rst:691
1537-
#, fuzzy
15381536
msgid ""
15391537
"See also the :term:`single dispatch` glossary entry, the :deco:`functools."
15401538
"singledispatch` decorator, and :pep:`443`."
15411539
msgstr ""
1542-
"另請參閱 :term:`single dispatch`\\ (單一調度)術語表條目、:func:`functools."
1543-
"singledispatch` 裝飾器和 :pep:`443`。"
1540+
"另請參閱 :term:`single dispatch`\\ (單一調度)術語表條目、:deco:`functools."
1541+
"singledispatch` 裝飾器和 :pep:`443`\\ 。"
15441542

15451543
#: ../../glossary.rst:693
15461544
msgid "generic type"

howto/annotations.po

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,16 +299,15 @@ msgstr ""
299299
"區域變數``。"
300300

301301
#: ../../howto/annotations.rst:156
302-
#, fuzzy
303302
msgid ""
304303
"If ``o`` is a wrapped callable using :func:`functools.update_wrapper`, :deco:"
305304
"`functools.wraps`, or :func:`functools.partial`, iteratively unwrap it by "
306305
"accessing either ``o.__wrapped__`` or ``o.func`` as appropriate, until you "
307306
"have found the root unwrapped function."
308307
msgstr ""
309-
"如果 ``o`` 是使用 :func:`functools.update_wrapper`、:func:`functools.wraps` "
310-
"或 :func:`functools.partial` 包裝的 callable ,請依據需求,透過存取 ``o."
311-
"__wrapped__`` 或 ``o.func`` 來疊代解開它,直到找到根解包函式。"
308+
"如果 ``o`` 是使用 :func:`functools.update_wrapper`\\ 、:deco:`functools."
309+
"wraps` 或 :func:`functools.partial` 包裝的 callable ,請依據需求,透過存取 "
310+
"``o.__wrapped__`` 或 ``o.func`` 來疊代解開它,直到找到根解包函式。"
312311

313312
#: ../../howto/annotations.rst:160
314313
msgid ""

howto/descriptor.po

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,16 @@ msgstr ""
7878
"這種程度的細節。"
7979

8080
#: ../../howto/descriptor.rst:28
81-
#, fuzzy
8281
msgid ""
8382
"The last section has pure Python equivalents for built-in descriptors that "
8483
"are written in C. Read this if you're curious about how functions turn into "
8584
"bound methods or about the implementation of common tools like :deco:"
8685
"`classmethod`, :deco:`staticmethod`, :deco:`property`, and :term:`__slots__`."
8786
msgstr ""
8887
"最後一個章節提供以 C 語言撰寫的內建描述器的純 Python 等價實作。如果你好奇函式"
89-
"如何轉變為綁定方法,或者想了解常見工具如 :func:`classmethod`、:func:"
90-
"`staticmethod`、:func:`property` 和 :term:`__slots__` 的實作方式,請閱讀此章"
91-
"。"
88+
"如何轉變為綁定方法,或者想了解常見工具如 :deco:`classmethod`\\ 、:deco:"
89+
"`staticmethod`\\ 、:deco:`property` 和 :term:`__slots__` 的實作方式,請閱讀此"
90+
"章節。"
9291

9392
#: ../../howto/descriptor.rst:36
9493
msgid "Primer"
@@ -623,16 +622,15 @@ msgstr ""
623622
"料在這件事上有發言權。"
624623

625624
#: ../../howto/descriptor.rst:319
626-
#, fuzzy
627625
msgid ""
628626
"Descriptors are used throughout the language. It is how functions turn into "
629627
"bound methods. Common tools like :deco:`classmethod`, :deco:"
630628
"`staticmethod`, :deco:`property`, and :deco:`functools.cached_property` are "
631629
"all implemented as descriptors."
632630
msgstr ""
633631
"描述器在整個語言中被廣泛使用。函式就是透過這種方式轉變為綁定方法。常見工具"
634-
"如 :func:`classmethod`、:func:`staticmethod`、:func:`property` 和 :func:"
635-
"`functools.cached_property` 都是以描述器實作的。"
632+
"如 :deco:`classmethod`\\ 、:deco:`staticmethod`\\ 、:deco:`property` 和 :"
633+
"deco:`functools.cached_property` 都是以描述器實作的。"
636634

637635
#: ../../howto/descriptor.rst:326
638636
msgid "Complete Practical Example"

howto/sorting.po

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,6 @@ msgstr ""
748748
"[('dave', 'B', 10), ('jane', 'B', 12), ('john', 'A', 15)]"
749749

750750
#: ../../howto/sorting.rst:374
751-
#, fuzzy
752751
msgid ""
753752
"However, note that ``<`` can fall back to using :meth:`~object.__gt__` if :"
754753
"meth:`~object.__lt__` is not implemented (see :func:`object.__lt__` for "
@@ -759,7 +758,7 @@ msgstr ""
759758
"然而,請注意,當 :meth:`~object.__lt__` 沒有被實作時,``<`` 可以回退 (fall "
760759
"back) 使用 :meth:`~object.__gt__`\\ (有關技術上的細節資訊請看 :func:`object."
761760
"__lt__` )。為了避免意外發生,:pep:`8` 建議所有六種的比較函式都需要被實作。裝"
762-
"飾器 :func:`~functools.total_ordering` 被提供用來讓任務更為簡單。"
761+
"飾器 :deco:`~functools.total_ordering` 被提供用來讓任務更為簡單。"
763762

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

library/abc.po

Lines changed: 17 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ msgid "A decorator indicating abstract methods."
314314
msgstr "用於表示抽象方法的裝飾器。"
315315

316316
#: ../../library/abc.rst:169
317-
#, fuzzy
318317
msgid ""
319318
"Using this decorator requires that the class's metaclass is :class:`ABCMeta` "
320319
"or is derived from it. A class that has a metaclass derived from :class:`!"
@@ -325,11 +324,10 @@ msgid ""
325324
msgstr ""
326325
"類別的元類別是 :class:`ABCMeta` 或是從該類別衍生才能使用此裝飾器。一個具有衍"
327326
"生自 :class:`!ABCMeta` 之元類別的類別不可以被實例化,除非它全部的抽象方法和特"
328-
"性均已被覆寫。抽象方法可透過任何一般的 'super' 呼叫機制來呼叫。:func:`!"
327+
"性均已被覆寫。抽象方法可透過任何一般的 'super' 呼叫機制來呼叫。:deco:`!"
329328
"abstractmethod` 可被用於為特性和描述器宣告的抽象方法。"
330329

331330
#: ../../library/abc.rst:176
332-
#, fuzzy
333331
msgid ""
334332
"Dynamically adding abstract methods to a class, or attempting to modify the "
335333
"abstraction status of a method or class once it is created, are only "
@@ -339,18 +337,17 @@ msgid ""
339337
"method are not affected."
340338
msgstr ""
341339
"僅在使用 :func:`update_abstractmethods` 函式時,才能夠動態地為一個類別新增抽"
342-
"象方法,或者嘗試在方法或類別被建立後修改其抽象狀態。:func:`!abstractmethod` "
340+
"象方法,或者嘗試在方法或類別被建立後修改其抽象狀態。:deco:`!abstractmethod` "
343341
"只會影響使用常規繼承所衍生出的子類別;透過 ABC 的 :meth:`~ABCMeta.register` "
344342
"方法註冊的「虛擬子類別」不會受到影響。"
345343

346344
#: ../../library/abc.rst:183
347-
#, fuzzy
348345
msgid ""
349346
"When :deco:`!abstractmethod` is applied in combination with other method "
350347
"descriptors, it should be applied as the innermost decorator, as shown in "
351348
"the following usage examples::"
352349
msgstr ""
353-
"當 :func:`!abstractmethod` 與其他方法描述器 (method descriptor) 配合應用時,"
350+
"當 :deco:`!abstractmethod` 與其他方法描述器 (method descriptor) 配合應用時,"
354351
"它應被當最內層的裝飾器,如以下用法範例所示: ::"
355352

356353
#: ../../library/abc.rst:187
@@ -416,7 +413,6 @@ msgstr ""
416413
" x = property(_get_x, _set_x)"
417414

418415
#: ../../library/abc.rst:217
419-
#, fuzzy
420416
msgid ""
421417
"In order to correctly interoperate with the abstract base class machinery, "
422418
"the descriptor must identify itself as abstract using :attr:`!"
@@ -426,7 +422,7 @@ msgid ""
426422
msgstr ""
427423
"為了能正確地與 ABC 機制實作相互操作,描述器必須使用 :attr:`!"
428424
"__isabstractmethod__` 將自身標識為抽象的。一般來說,如果被用於組成描述器的任"
429-
"一方法是抽象的,則此屬性應當為 ``True``。 例如,Python 的內建 :class:"
425+
"一方法是抽象的,則此屬性應當為 ``True``\\ 。 例如,Python 的內建 :deco:"
430426
"`property` 所做的就等價於: ::"
431427

432428
#: ../../library/abc.rst:223
@@ -462,30 +458,27 @@ msgid "The :mod:`!abc` module also supports the following legacy decorators:"
462458
msgstr ":mod:`!abc` 模組還支援下列舊式裝飾器:"
463459

464460
#: ../../library/abc.rst:244
465-
#, fuzzy
466461
msgid ""
467462
"It is now possible to use :deco:`classmethod` with :deco:`abstractmethod`, "
468463
"making this decorator redundant."
469464
msgstr ""
470-
"現在可以讓 :class:`classmethod` 配合 :func:`abstractmethod` 使用,使得此裝飾"
471-
"器變得冗餘。"
465+
"現在可以讓 :deco:`classmethod` 配合 :deco:`abstractmethod` 使用,使得此裝飾器"
466+
"變得冗餘。"
472467

473468
#: ../../library/abc.rst:248
474-
#, fuzzy
475469
msgid ""
476470
"A subclass of the built-in :class:`classmethod`, indicating an abstract "
477471
"classmethod. Otherwise it is similar to :deco:`abstractmethod`."
478472
msgstr ""
479-
"內建 :func:`classmethod` 的子類別,表示為一個抽象類別方法。在其他方面它都類似"
480-
"於 :func:`abstractmethod`。"
473+
"內建 :class:`classmethod` 的子類別,表示為一個抽象類別方法。在其他方面它都類"
474+
"似於 :deco:`abstractmethod`\\ 。"
481475

482476
#: ../../library/abc.rst:251
483-
#, fuzzy
484477
msgid ""
485478
"This special case is deprecated, as the :deco:`classmethod` decorator is now "
486479
"correctly identified as abstract when applied to an abstract method::"
487480
msgstr ""
488-
"這個特例已被棄用,因為現在當 :func:`classmethod` 裝飾器應用於抽象方法時已會被"
481+
"這個特例已被棄用,因為現在當 :deco:`classmethod` 裝飾器應用於抽象方法時已會被"
489482
"正確地標識為是抽象的: ::"
490483

491484
#: ../../library/abc.rst:255
@@ -503,30 +496,27 @@ msgstr ""
503496
" ..."
504497

505498
#: ../../library/abc.rst:265
506-
#, fuzzy
507499
msgid ""
508500
"It is now possible to use :deco:`staticmethod` with :deco:`abstractmethod`, "
509501
"making this decorator redundant."
510502
msgstr ""
511-
"現在可以讓 :class:`staticmethod` 配合 :func:`abstractmethod` 使用,使得此裝飾"
503+
"現在可以讓 :deco:`staticmethod` 配合 :deco:`abstractmethod` 使用,使得此裝飾"
512504
"器變得冗餘。"
513505

514506
#: ../../library/abc.rst:269
515-
#, fuzzy
516507
msgid ""
517508
"A subclass of the built-in :class:`staticmethod`, indicating an abstract "
518509
"staticmethod. Otherwise it is similar to :deco:`abstractmethod`."
519510
msgstr ""
520-
"內建 :func:`staticmethod` 的子類別,表示為一個抽象靜態方法。在其他方面它都類"
521-
"似於 :func:`abstractmethod`。"
511+
"內建 :class:`staticmethod` 的子類別,表示為一個抽象靜態方法。在其他方面它都類"
512+
"似於 :deco:`abstractmethod`\\ 。"
522513

523514
#: ../../library/abc.rst:272
524-
#, fuzzy
525515
msgid ""
526516
"This special case is deprecated, as the :deco:`staticmethod` decorator is "
527517
"now correctly identified as abstract when applied to an abstract method::"
528518
msgstr ""
529-
"這個特例已被棄用,因為現在當 :func:`staticmethod` 裝飾器應用於抽象方法時已會"
519+
"這個特例已被棄用,因為現在當 :deco:`staticmethod` 裝飾器應用於抽象方法時已會"
530520
"被正確地標識為是抽象的: ::"
531521

532522
#: ../../library/abc.rst:276
@@ -544,30 +534,27 @@ msgstr ""
544534
" ..."
545535

546536
#: ../../library/abc.rst:285
547-
#, fuzzy
548537
msgid ""
549538
"It is now possible to use :deco:`property`, :deco:`property.getter`, :deco:"
550539
"`property.setter` and :deco:`property.deleter` with :deco:`abstractmethod`, "
551540
"making this decorator redundant."
552541
msgstr ""
553-
"現在可以讓 :class:`property`、:meth:`property.getter`、:meth:`property."
554-
"setter` 和 :meth:`property.deleter` 配合 :func:`abstractmethod` 使用,使得此"
542+
"現在可以讓 :deco:`property`\\ 、:deco:`property.getter`\\ 、:deco:`property."
543+
"setter` 和 :deco:`property.deleter` 配合 :deco:`abstractmethod` 使用,使得此"
555544
"裝飾器變得冗餘。"
556545

557546
#: ../../library/abc.rst:290
558-
#, fuzzy
559547
msgid ""
560548
"A subclass of the built-in :class:`property`, indicating an abstract "
561549
"property."
562-
msgstr "內建 :func:`property` 的子類別,表示為一個抽象特性。"
550+
msgstr "內建 :class:`property` 的子類別,表示為一個抽象特性。"
563551

564552
#: ../../library/abc.rst:293
565-
#, fuzzy
566553
msgid ""
567554
"This special case is deprecated, as the :deco:`property` decorator is now "
568555
"correctly identified as abstract when applied to an abstract method::"
569556
msgstr ""
570-
"這個特例已被棄用,因為現在當 :func:`property` 裝飾器應用於抽象方法時已會被正"
557+
"這個特例已被棄用,因為現在當 :deco:`property` 裝飾器應用於抽象方法時已會被正"
571558
"確地標識為是抽象的: ::"
572559

573560
#: ../../library/abc.rst:297

library/asyncio-stream.po

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,11 @@ msgid ""
517517
"tasks from running. To prevent blocking behavior, yield to the event loop "
518518
"explicitly with ``await asyncio.sleep(0)`` (see :func:`asyncio.sleep`)."
519519
msgstr ""
520+
"當寫入緩衝區低於最高標記位 (high watermark) 時,:meth:`drain` 會立即回傳,而"
521+
"不會讓出控制權給事件迴圈。因此,重複呼叫 ``write()`` 後接著呼叫 ``await "
522+
"drain()`` 的程式碼可能會阻止其他 Task 執行。為了避免阻塞行為,請明確使用 "
523+
"``await asyncio.sleep(0)``\\ (請見 :func:`asyncio.sleep`\\ )讓出控制權給事"
524+
"件迴圈。"
520525

521526
#: ../../library/asyncio-stream.rst:399
522527
msgid "Upgrade an existing stream-based connection to TLS."

0 commit comments

Comments
 (0)