Skip to content

Commit 8aa15ac

Browse files
committed
Update translation for library/enum.po
1 parent f9afb79 commit 8aa15ac

File tree

1 file changed

+56
-54
lines changed

1 file changed

+56
-54
lines changed

library/enum.po

Lines changed: 56 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgstr ""
88
"Project-Id-Version: Python 3.13\n"
99
"Report-Msgid-Bugs-To: \n"
1010
"POT-Creation-Date: 2024-11-02 00:13+0000\n"
11-
"PO-Revision-Date: 2023-09-11 14:08+0800\n"
11+
"PO-Revision-Date: 2024-12-21 13:50+0800\n"
1212
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1414
"tw)\n"
@@ -85,6 +85,16 @@ msgid ""
8585
">>> # functional syntax\n"
8686
">>> Color = Enum('Color', [('RED', 1), ('GREEN', 2), ('BLUE', 3)])"
8787
msgstr ""
88+
">>> from enum import Enum\n"
89+
"\n"
90+
">>> # class 語法\n"
91+
">>> class Color(Enum):\n"
92+
"... RED = 1\n"
93+
"... GREEN = 2\n"
94+
"... BLUE = 3\n"
95+
"\n"
96+
">>> # 函式語法\n"
97+
">>> Color = Enum('Color', [('RED', 1), ('GREEN', 2), ('BLUE', 3)])"
8898

8999
#: ../../library/enum.rst:49
90100
msgid ""
@@ -331,20 +341,19 @@ msgid ""
331341
"to subclass *EnumType* -- see :ref:`Subclassing EnumType <enumtype-"
332342
"examples>` for details."
333343
msgstr ""
334-
"*EnumType* 是\\ *列舉*\\ :term:`metaclass`。*EnumType* 可以有子類別 -- 細"
344+
"*EnumType* 是 *enum* 列舉的 :term:`metaclass`。*EnumType* 可以有子類別 -- 細"
335345
"節請參考 :ref:`建立 EnumType 的子類別 <enumtype-examples>`。"
336346

337347
#: ../../library/enum.rst:168
338-
#, fuzzy
339348
msgid ""
340349
"``EnumType`` is responsible for setting the correct :meth:`!__repr__`, :meth:"
341350
"`!__str__`, :meth:`!__format__`, and :meth:`!__reduce__` methods on the "
342351
"final *enum*, as well as creating the enum members, properly handling "
343352
"duplicates, providing iteration over the enum class, etc."
344353
msgstr ""
345-
"*EnumType* 負責在最後的\\ *列舉*\\ 上面設定正確的 :meth:`!__repr__`、:meth:`!"
346-
"__str__`、:meth:`!__format__` 及 :meth:`!__reduce__` 方法,以及建立列舉成員,"
347-
"並正確處理重複,提供列舉類別的疊代等等。"
354+
"``EnumType`` 負責在最後的\\ *列舉*\\ 上面設定正確的 :meth:`!__repr__`、:meth:"
355+
"`!__str__`、:meth:`!__format__` 及 :meth:`!__reduce__` 方法,以及建立列舉成"
356+
"員、正確處理重複、提供列舉類別的疊代等等。"
348357

349358
#: ../../library/enum.rst:175
350359
msgid "This method is called in two different ways:"
@@ -534,20 +543,22 @@ msgid ""
534543
"Adds a new name as an alias to an existing member. Raises a :exc:"
535544
"`NameError` if the name is already assigned to a different member."
536545
msgstr ""
546+
"新增一個名稱作為現有成員的別名。如果該名稱已被指派給不同的成員,則會引發 :"
547+
"exc:`NameError`。"
537548

538549
#: ../../library/enum.rst:256
539550
msgid ""
540551
"Adds a new value as an alias to an existing member. Raises a :exc:"
541552
"`ValueError` if the value is already linked with a different member."
542553
msgstr ""
554+
"新增一個值作為現有成員的別名。如果該值已與不同成員連結,則會引發 :exc:"
555+
"`ValueError`。"
543556

544557
#: ../../library/enum.rst:261
545-
#, fuzzy
546558
msgid ""
547559
"Before 3.11 ``EnumType`` was called ``EnumMeta``, which is still available "
548560
"as an alias."
549-
msgstr ""
550-
"在 3.11 之前,``enum`` 使用 ``EnumMeta`` 類型,目前保留此類型當作別名。"
561+
msgstr "在 3.11 之前,``EnumType`` 稱作 ``EnumMeta``,其目前仍可作為別名使用。"
551562

552563
#: ../../library/enum.rst:266
553564
msgid "*Enum* is the base class for all *enum* enumerations."
@@ -602,6 +613,9 @@ msgid ""
602613
"quadratic performance impact during creation relative to the total number of "
603614
"mutable/unhashable values in the enum."
604615
msgstr ""
616+
"雖然可以使用可變的 (mutable) / 不可雜湊的 (unhashable) 值,例如 :class:"
617+
"`dict`、:class:`list` 或可變的 :class:`~dataclasses.dataclass`,它們在建立期"
618+
"間會對效能產生相對於列舉中可變的 / 不可雜湊的值的總數量的二次方的影響。"
605619

606620
#: ../../library/enum.rst:298
607621
msgid "Name of the member."
@@ -806,7 +820,7 @@ msgstr ""
806820
#: ../../library/enum.rst:408
807821
msgid ""
808822
"results in the call ``int('1a', 16)`` and a value of ``26`` for the member."
809-
msgstr ""
823+
msgstr "會產生呼叫 ``int('1a', 16)`` 而該成員的值為 ``26``。"
810824

811825
#: ../../library/enum.rst:412
812826
msgid ""
@@ -925,15 +939,14 @@ msgid "Added :ref:`enum-dataclass-support`"
925939
msgstr "新增 :ref:`enum-dataclass-support`"
926940

927941
#: ../../library/enum.rst:471
928-
#, fuzzy
929942
msgid ""
930943
"*IntEnum* is the same as :class:`Enum`, but its members are also integers "
931944
"and can be used anywhere that an integer can be used. If any integer "
932945
"operation is performed with an *IntEnum* member, the resulting value loses "
933946
"its enumeration status."
934947
msgstr ""
935-
"*IntEnum* 和 *Enum* 一樣,但其成員同時也是整數而可以被用在任何使用整數的地"
936-
"。如果 *IntEnum* 成員經過任何整數運算,其結果會失去列舉狀態。"
948+
"*IntEnum* 和 :class:`Enum` 一樣,但其成員同時也是整數而可以被用在任何使用整數"
949+
"的地方。如果 *IntEnum* 成員經過任何整數運算,結果值會失去其列舉狀態。"
937950

938951
#: ../../library/enum.rst:492
939952
msgid ""
@@ -952,15 +965,14 @@ msgstr ""
952965
"meth:`~object.__format__` 已經是 :meth:`!int.__format__`。"
953966

954967
#: ../../library/enum.rst:502
955-
#, fuzzy
956968
msgid ""
957969
"``StrEnum`` is the same as :class:`Enum`, but its members are also strings "
958970
"and can be used in most of the same places that a string can be used. The "
959971
"result of any string operation performed on or with a *StrEnum* member is "
960972
"not part of the enumeration."
961973
msgstr ""
962-
"*StrEnum**Enum* 一樣,但其成員同時也是字串而可以被用在幾乎所有使用字串的"
963-
"地方。*StrEnum* 成員經過任何字串操作的結果會不再是列舉的一部份。"
974+
"``StrEnum``:class:`Enum` 一樣,但其成員同時也是字串而可以被用在幾乎所有使"
975+
"用字串的地方。*StrEnum* 成員經過任何字串操作的結果會不再是列舉的一部份。"
964976

965977
#: ../../library/enum.rst:508
966978
msgid ""
@@ -1138,9 +1150,8 @@ msgstr ""
11381150
"<Color.RED|GREEN|BLUE: 7>"
11391151

11401152
#: ../../library/enum.rst:614
1141-
#, fuzzy
11421153
msgid "Returns all the flags in *type(self)* that are not in *self*::"
1143-
msgstr "回傳所有在 *type(self)* 但不在 self 裡的旗標: ::"
1154+
msgstr "回傳所有在 *type(self)* 但不在 *self* 裡的旗標: ::"
11441155

11451156
#: ../../library/enum.rst:616
11461157
msgid ""
@@ -1177,13 +1188,12 @@ msgid "The *repr()* of zero-valued flags has changed. It is now::"
11771188
msgstr "值為 0 的旗標的 *repr()* 已改變。現在是: ::"
11781189

11791190
#: ../../library/enum.rst:641
1180-
#, fuzzy
11811191
msgid ""
11821192
"``IntFlag`` is the same as :class:`Flag`, but its members are also integers "
11831193
"and can be used anywhere that an integer can be used."
11841194
msgstr ""
1185-
"*IntFlag**Flag* 一樣,但其成員同時也是整數而可以被用在任何使用整數的地"
1186-
"。"
1195+
"``IntFlag``:class:`Flag` 一樣,但其成員同時也是整數而可以被用在任何使用整"
1196+
"數的地方。"
11871197

11881198
#: ../../library/enum.rst:655
11891199
msgid ""
@@ -1200,25 +1210,22 @@ msgstr ""
12001210
"3"
12011211

12021212
#: ../../library/enum.rst:661
1203-
#, fuzzy
12041213
msgid "If a :class:`Flag` operation is performed with an *IntFlag* member and:"
1205-
msgstr "如果 *IntFlag* 成員經過 *Flag* 操作且:"
1214+
msgstr "如果 *IntFlag* 成員經過 :class:`Flag` 操作且:"
12061215

12071216
#: ../../library/enum.rst:663
12081217
msgid "the result is a valid *IntFlag*: an *IntFlag* is returned"
12091218
msgstr "結果是合法的 *IntFlag*:回傳 *IntFlag*"
12101219

12111220
#: ../../library/enum.rst:664
1212-
#, fuzzy
12131221
msgid ""
12141222
"the result is not a valid *IntFlag*: the result depends on the :class:"
12151223
"`FlagBoundary` setting"
1216-
msgstr "結果不是合法的 *IntFlag*:結果會根據 *FlagBoundary* 的設定"
1224+
msgstr "結果不是合法的 *IntFlag*:結果會根據 :class:`FlagBoundary` 的設定"
12171225

12181226
#: ../../library/enum.rst:666
1219-
#, fuzzy
12201227
msgid "The :func:`repr` of unnamed zero-valued flags has changed. It is now:"
1221-
msgstr "未命名且值為 0 的旗標的 *repr()* 已改變。現在是: ::"
1228+
msgstr "未命名且值為 0 的旗標的 :func:`repr` 已改變。現在是:"
12221229

12231230
#: ../../library/enum.rst:673
12241231
msgid ""
@@ -1377,11 +1384,10 @@ msgid ""
13771384
msgstr "CONTINUOUS 和 NAMED_FLAGS 是設計用來運作在整數值的成員上。"
13781385

13791386
#: ../../library/enum.rst:762
1380-
#, fuzzy
13811387
msgid ""
13821388
"``FlagBoundary`` controls how out-of-range values are handled in :class:"
13831389
"`Flag` and its subclasses."
1384-
msgstr "*FlagBoundary* 控制在 *Flag* 及其子類別中如何處理範圍外的值。"
1390+
msgstr "``FlagBoundary`` 控制在 :class:`Flag` 及其子類別中如何處理範圍外的值。"
13851391

13861392
#: ../../library/enum.rst:767
13871393
msgid ""
@@ -1418,11 +1424,10 @@ msgstr ""
14181424
" allowed 0b0 00111"
14191425

14201426
#: ../../library/enum.rst:785
1421-
#, fuzzy
14221427
msgid ""
14231428
"Out-of-range values have invalid values removed, leaving a valid :class:"
14241429
"`Flag` value::"
1425-
msgstr "範圍外的值會移除非法值,留下合法的 *Flag* 值: ::"
1430+
msgstr "會移除範圍外的值中的非法值,留下合法的 :class:`Flag` 值: ::"
14261431

14271432
#: ../../library/enum.rst:788
14281433
msgid ""
@@ -1445,20 +1450,18 @@ msgstr ""
14451450
"<ConformFlag.BLUE: 4>"
14461451

14471452
#: ../../library/enum.rst:799
1448-
#, fuzzy
14491453
msgid ""
14501454
"Out-of-range values lose their :class:`Flag` membership and revert to :class:"
14511455
"`int`."
1452-
msgstr "範圍外的值會失去它們的 *Flag* 成員資格且恢復成 :class:`int`。"
1456+
msgstr "範圍外的值會失去它們的 :class:`Flag` 成員資格且恢復成 :class:`int`。"
14531457

14541458
#: ../../library/enum.rst:812
1455-
#, fuzzy
14561459
msgid ""
14571460
"Out-of-range values are kept, and the :class:`Flag` membership is kept. This "
14581461
"is the default for :class:`IntFlag`::"
14591462
msgstr ""
1460-
"範圍外的值會被保留,*Flag* 成員資格也會被保留。這是 :class:`IntFlag` 的預設行"
1461-
": ::"
1463+
"範圍外的值會被保留,:class:`Flag` 成員資格也會被保留。這是 :class:`IntFlag` "
1464+
"的預設行為: ::"
14621465

14631466
#: ../../library/enum.rst:815
14641467
msgid ""
@@ -1482,7 +1485,7 @@ msgstr ""
14821485

14831486
#: ../../library/enum.rst:829
14841487
msgid "Supported ``__dunder__`` names"
1485-
msgstr "支援 ``__dunder__`` 名稱"
1488+
msgstr "支援的 ``__dunder__`` 名稱"
14861489

14871490
#: ../../library/enum.rst:831
14881491
msgid ""
@@ -1493,31 +1496,30 @@ msgstr ""
14931496
"目的對映。只有在類別上可用。"
14941497

14951498
#: ../../library/enum.rst:834
1496-
#, fuzzy
14971499
msgid ""
14981500
":meth:`~Enum.__new__`, if specified, must create and return the enum "
14991501
"members; it is also a very good idea to set the member's :attr:`!_value_` "
15001502
"appropriately. Once all the members are created it is no longer used."
15011503
msgstr ""
1502-
"如果指定了 :meth:`~Enum.__new__`,它必須建立並回傳列舉成員;適當地設定成員"
1504+
":meth:`~Enum.__new__`,如果有指定,它必須建立並回傳列舉成員;適當地設定成員"
15031505
"的 :attr:`!_value_` 也是一個很好的主意。一旦所有成員都建立之後就不會再被用"
15041506
"到。"
15051507

15061508
#: ../../library/enum.rst:840
15071509
msgid "Supported ``_sunder_`` names"
1508-
msgstr "支援 ``_sunder_`` 名稱"
1510+
msgstr "支援的 ``_sunder_`` 名稱"
15091511

15101512
#: ../../library/enum.rst:842
15111513
msgid ""
15121514
":meth:`~EnumType._add_alias_` -- adds a new name as an alias to an existing "
15131515
"member."
1514-
msgstr ""
1516+
msgstr ":meth:`~EnumType._add_alias_` -- 新增一個名稱作為現有成員的別名。"
15151517

15161518
#: ../../library/enum.rst:844
15171519
msgid ""
15181520
":meth:`~EnumType._add_value_alias_` -- adds a new value as an alias to an "
15191521
"existing member."
1520-
msgstr ""
1522+
msgstr ":meth:`~EnumType._add_value_alias_` -- 新增一個值作為現有成員的別名。"
15211523

15221524
#: ../../library/enum.rst:846
15231525
msgid ":attr:`~Enum._name_` -- name of the member"
@@ -1559,32 +1561,33 @@ msgstr ""
15591561
":meth:`~Enum._generate_next_value_` -- 用來為列舉成員取得合適的值;可以被覆寫"
15601562

15611563
#: ../../library/enum.rst:860
1562-
#, fuzzy
15631564
msgid ""
15641565
"For standard :class:`Enum` classes the next value chosen is the highest "
15651566
"value seen incremented by one."
15661567
msgstr ""
1567-
"對標準的 :class:`Enum` 類別來說,下一個被選擇的值是最後一個看見的值加一。"
1568+
"對標準的 :class:`Enum` 類別來說,下一個被選擇的值是所看過的最大值加一。"
15681569

15691570
#: ../../library/enum.rst:863
1570-
#, fuzzy
15711571
msgid ""
15721572
"For :class:`Flag` classes the next value chosen will be the next highest "
15731573
"power-of-two."
15741574
msgstr ""
1575-
"對 :class:`Flag` 類別來說,下一個被選擇的值是下一個最大的 2 的次方,不管最後"
1576-
"一個看見的值是什麼。"
1575+
"對 :class:`Flag` 類別來說,下一個被選擇的值是下一個最大的 2 的次方的數字。"
15771576

15781577
#: ../../library/enum.rst:866
15791578
msgid ""
15801579
"While ``_sunder_`` names are generally reserved for the further development "
15811580
"of the :class:`Enum` class and can not be used, some are explicitly allowed:"
15821581
msgstr ""
1582+
"雖然 ``_sunder_`` 名稱通常保留用於 :class:`Enum` 類別的進一步開發而不能被使"
1583+
"用,但有些是明確允許的:"
15831584

15841585
#: ../../library/enum.rst:869
15851586
msgid ""
15861587
"``_repr_*`` (e.g. ``_repr_html_``), as used in `IPython's rich display`_"
15871588
msgstr ""
1589+
"``_repr_*``(例如 ``_repr_html_``),例如用於 `IPython 的豐富顯示 <IPython’s "
1590+
"rich display_>`_"
15881591

15891592
#: ../../library/enum.rst:871
15901593
msgid "``_missing_``, ``_order_``, ``_generate_next_value_``"
@@ -1596,14 +1599,13 @@ msgstr "``_ignore_``"
15961599

15971600
#: ../../library/enum.rst:873
15981601
msgid "``_add_alias_``, ``_add_value_alias_``, ``_repr_*``"
1599-
msgstr ""
1602+
msgstr "``_add_alias_``、``_add_value_alias_``、``_repr_*``"
16001603

16011604
#: ../../library/enum.rst:879
16021605
msgid "Utilities and Decorators"
16031606
msgstr "通用項目與裝飾器"
16041607

16051608
#: ../../library/enum.rst:883
1606-
#, fuzzy
16071609
msgid ""
16081610
"*auto* can be used in place of a value. If used, the *Enum* machinery will "
16091611
"call an :class:`Enum`'s :meth:`~Enum._generate_next_value_` to get an "
@@ -1613,11 +1615,11 @@ msgid ""
16131615
"for :class:`StrEnum` it will be the lower-cased version of the member's "
16141616
"name. Care must be taken if mixing *auto()* with manually specified values."
16151617
msgstr ""
1616-
"*auto* 可以用來取代給值。如果使用的話,*Enum* 系統會呼叫 *Enum*:meth:"
1617-
"`~Enum._generate_next_value_` 來取得合適的值。對 *Enum**IntEnum* 來說,合"
1618-
"適的值是最後一個值加一;對 *Flag**IntFlag* 來說,是第一個比最大值還大的 "
1619-
"2 的次方的數字;對 *StrEnum* 來說,是成員名稱的小寫版本。如果混用 *auto()* 和"
1620-
"手動指定值的話要特別注意。"
1618+
"*auto* 可以用來取代給值。如果使用的話,*Enum* 系統會呼叫 :class:`Enum` 的 :"
1619+
"meth:`~Enum._generate_next_value_` 來取得合適的值。對 :class:`Enum`:"
1620+
"class:`IntEnum` 來說,合適的值是最後一個值加一;對 :class:`Flag`:class:"
1621+
"`IntFlag` 來說,是第一個比最大值還大的 2 的次方的數字;對 :class:`StrEnum` 來"
1622+
"說,是成員名稱的小寫版本。如果混用 *auto()* 和手動指定值的話要特別注意。"
16211623

16221624
#: ../../library/enum.rst:891
16231625
msgid ""

0 commit comments

Comments
 (0)