Skip to content

Commit 9dbdf3d

Browse files
pydoc-zh-tw[bot]github-actions[bot]mattwang44
authored
Sync with CPython 3.11 (#377)
* sync with cpython 55a26de6 * sync with cpython d06315a6 * sync with cpython c7aa3928 * sync with cpython 31b82abb * sync with cpython 3ef9f6b5 * sync with cpython db65a326 * fix(using/windows): resolve fuzzy entry * sync with cpython db0eeb38 * fix(library/pathlib): resolve fuzzy entries * sync with cpython 69d12d86 * fix(library/random): resolve fuzzy entries Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Wei-Hsiang (Matt) Wang <mattwang44@gmail.com>
1 parent 2c0785d commit 9dbdf3d

13 files changed

+590
-560
lines changed

howto/logging-cookbook.po

+149-151
Large diffs are not rendered by default.

library/asyncio-policy.po

+5-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: Python 3.11\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2023-01-11 00:15+0000\n"
11+
"POT-Creation-Date: 2023-01-14 00:15+0000\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -147,9 +147,10 @@ msgstr ""
147147

148148
#: ../../library/asyncio-policy.rst:116
149149
msgid ""
150-
"In Python versions 3.10.9, 3.11.1 and 3.12 this function emits a :exc:"
151-
"`DeprecationWarning` if there is no running event loop and no current loop "
152-
"is set. In some future Python release this will become an error."
150+
"In Python versions 3.10.9, 3.11.1 and 3.12 the :meth:`get_event_loop` method "
151+
"of the default asyncio policy emits a :exc:`DeprecationWarning` if there is "
152+
"no running event loop and no current loop is set. In some future Python "
153+
"release this will become an error."
153154
msgstr ""
154155

155156
#: ../../library/asyncio-policy.rst:124

library/datetime.po

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.11\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2022-12-11 00:18+0000\n"
10+
"POT-Creation-Date: 2023-01-21 00:16+0000\n"
1111
"PO-Revision-Date: 2018-05-23 14:42+0000\n"
1212
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -1636,8 +1636,8 @@ msgstr ""
16361636
msgid ""
16371637
"Because naive ``datetime`` objects are treated by many ``datetime`` methods "
16381638
"as local times, it is preferred to use aware datetimes to represent times in "
1639-
"UTC; as a result, using ``utcfromtimetuple`` may give misleading results. If "
1640-
"you have a naive ``datetime`` representing UTC, use ``datetime."
1639+
"UTC; as a result, using :meth:`datetime.utctimetuple` may give misleading "
1640+
"results. If you have a naive ``datetime`` representing UTC, use ``datetime."
16411641
"replace(tzinfo=timezone.utc)`` to make it aware, at which point you can use :"
16421642
"meth:`.datetime.timetuple`."
16431643
msgstr ""

library/email.mime.po

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.11\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2022-10-15 20:43+0000\n"
10+
"POT-Creation-Date: 2023-01-15 00:18+0000\n"
1111
"PO-Revision-Date: 2018-05-23 16:00+0000\n"
1212
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -165,9 +165,9 @@ msgstr "模組:\\ :mod:`email.mime.application`"
165165
msgid ""
166166
"A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:"
167167
"`MIMEApplication` class is used to represent MIME message objects of major "
168-
"type :mimetype:`application`. *_data* is a string containing the raw byte "
169-
"data. Optional *_subtype* specifies the MIME subtype and defaults to :"
170-
"mimetype:`octet-stream`."
168+
"type :mimetype:`application`. *_data* contains the bytes for the raw "
169+
"application data. Optional *_subtype* specifies the MIME subtype and "
170+
"defaults to :mimetype:`octet-stream`."
171171
msgstr ""
172172

173173
#: ../../library/email.mime.rst:121
@@ -194,7 +194,7 @@ msgstr "模組:\\ :mod:`email.mime.audio`"
194194
msgid ""
195195
"A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:"
196196
"`MIMEAudio` class is used to create MIME message objects of major type :"
197-
"mimetype:`audio`. *_audiodata* is a string containing the raw audio data. "
197+
"mimetype:`audio`. *_audiodata* contains the bytes for the raw audio data. "
198198
"If this data can be decoded as au, wav, aiff, or aifc, then the subtype will "
199199
"be automatically included in the :mailheader:`Content-Type` header. "
200200
"Otherwise you can explicitly specify the audio subtype via the *_subtype* "
@@ -222,7 +222,7 @@ msgstr "模組:\\ :mod:`email.mime.image`"
222222
msgid ""
223223
"A subclass of :class:`~email.mime.nonmultipart.MIMENonMultipart`, the :class:"
224224
"`MIMEImage` class is used to create MIME message objects of major type :"
225-
"mimetype:`image`. *_imagedata* is a string containing the raw image data. "
225+
"mimetype:`image`. *_imagedata* contains the bytes for the raw image data. "
226226
"If this data type can be detected (jpeg, png, gif, tiff, rgb, pbm, pgm, ppm, "
227227
"rast, xbm, bmp, webp, and exr attempted), then the subtype will be "
228228
"automatically included in the :mailheader:`Content-Type` header. Otherwise "

library/enum.po

+26-26
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.11\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2023-01-04 00:15+0000\n"
10+
"POT-Creation-Date: 2023-01-21 00:16+0000\n"
1111
"PO-Revision-Date: 2018-05-23 16:01+0000\n"
1212
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -84,19 +84,19 @@ msgid "Nomenclature"
8484
msgstr ""
8585

8686
#: ../../library/enum.rst:55
87-
msgid "The class :class:`Color` is an *enumeration* (or *enum*)"
87+
msgid "The class :class:`!Color` is an *enumeration* (or *enum*)"
8888
msgstr ""
8989

9090
#: ../../library/enum.rst:56
9191
msgid ""
92-
"The attributes :attr:`Color.RED`, :attr:`Color.GREEN`, etc., are "
92+
"The attributes :attr:`!Color.RED`, :attr:`!Color.GREEN`, etc., are "
9393
"*enumeration members* (or *members*) and are functionally constants."
9494
msgstr ""
9595

9696
#: ../../library/enum.rst:58
9797
msgid ""
98-
"The enum members have *names* and *values* (the name of :attr:`Color.RED` is "
99-
"``RED``, the value of :attr:`Color.BLUE` is ``3``, etc.)"
98+
"The enum members have *names* and *values* (the name of :attr:`!Color.RED` "
99+
"is ``RED``, the value of :attr:`!Color.BLUE` is ``3``, etc.)"
100100
msgstr ""
101101

102102
#: ../../library/enum.rst:65
@@ -292,8 +292,8 @@ msgstr ""
292292

293293
#: ../../library/enum.rst:168
294294
msgid ""
295-
"*EnumType* is responsible for setting the correct :meth:`__repr__`, :meth:"
296-
"`__str__`, :meth:`__format__`, and :meth:`__reduce__` methods on the final "
295+
"*EnumType* is responsible for setting the correct :meth:`!__repr__`, :meth:`!"
296+
"__str__`, :meth:`!__format__`, and :meth:`!__reduce__` methods on the final "
297297
"*enum*, as well as creating the enum members, properly handling duplicates, "
298298
"providing iteration over the enum class, etc."
299299
msgstr ""
@@ -548,9 +548,9 @@ msgstr ""
548548

549549
#: ../../library/enum.rst:425
550550
msgid ""
551-
":meth:`__str__` is now :func:`int.__str__` to better support the "
552-
"*replacement of existing constants* use-case. :meth:`__format__` was "
553-
"already :func:`int.__format__` for that same reason."
551+
":meth:`~object.__str__` is now :meth:`!int.__str__` to better support the "
552+
"*replacement of existing constants* use-case. :meth:`~object.__format__` was "
553+
"already :meth:`!int.__format__` for that same reason."
554554
msgstr ""
555555

556556
#: ../../library/enum.rst:432
@@ -693,7 +693,7 @@ msgstr ""
693693

694694
#: ../../library/enum.rst:616
695695
msgid ""
696-
":class:`!ReprEum` uses the :meth:`repr() <Enum.__repr__>` of :class:`Enum`, "
696+
":class:`!ReprEnum` uses the :meth:`repr() <Enum.__repr__>` of :class:`Enum`, "
697697
"but the :class:`str() <str>` of the mixed-in data type:"
698698
msgstr ""
699699

@@ -775,15 +775,15 @@ msgstr ""
775775

776776
#: ../../library/enum.rst:756
777777
msgid ""
778-
":attr:`__members__` is a read-only ordered mapping of ``member_name``:"
779-
"``member`` items. It is only available on the class."
778+
":attr:`~EnumType.__members__` is a read-only ordered mapping of "
779+
"``member_name``:``member`` items. It is only available on the class."
780780
msgstr ""
781781

782782
#: ../../library/enum.rst:759
783783
msgid ""
784-
":meth:`__new__`, if specified, must create and return the enum members; it "
785-
"is also a very good idea to set the member's :attr:`_value_` appropriately. "
786-
"Once all the members are created it is no longer used."
784+
":meth:`~object.__new__`, if specified, must create and return the enum "
785+
"members; it is also a very good idea to set the member's :attr:`!_value_` "
786+
"appropriately. Once all the members are created it is no longer used."
787787
msgstr ""
788788

789789
#: ../../library/enum.rst:765
@@ -851,12 +851,12 @@ msgstr ""
851851
#: ../../library/enum.rst:798
852852
msgid ""
853853
"*auto* can be used in place of a value. If used, the *Enum* machinery will "
854-
"call an *Enum*'s :meth:`_generate_next_value_` to get an appropriate value. "
855-
"For *Enum* and *IntEnum* that appropriate value will be the last value plus "
856-
"one; for *Flag* and *IntFlag* it will be the first power-of-two greater than "
857-
"the highest value; for *StrEnum* it will be the lower-cased version of the "
858-
"member's name. Care must be taken if mixing *auto()* with manually "
859-
"specified values."
854+
"call an *Enum*'s :meth:`~Enum._generate_next_value_` to get an appropriate "
855+
"value. For *Enum* and *IntEnum* that appropriate value will be the last "
856+
"value plus one; for *Flag* and *IntFlag* it will be the first power-of-two "
857+
"greater than the highest value; for *StrEnum* it will be the lower-cased "
858+
"version of the member's name. Care must be taken if mixing *auto()* with "
859+
"manually specified values."
860860
msgstr ""
861861

862862
#: ../../library/enum.rst:806
@@ -898,8 +898,8 @@ msgstr ""
898898

899899
#: ../../library/enum.rst:822
900900
msgid ""
901-
"in 3.13 the default ``\"generate_next_value_`` will always return the "
902-
"highest member value incremented by 1, and will fail if any member is an "
901+
"in 3.13 the default ``_generate_next_value_`` will always return the highest "
902+
"member value incremented by 1, and will fail if any member is an "
903903
"incompatible type."
904904
msgstr ""
905905

@@ -921,8 +921,8 @@ msgstr ""
921921
#: ../../library/enum.rst:841
922922
msgid ""
923923
"A :keyword:`class` decorator specifically for enumerations. It searches an "
924-
"enumeration's :attr:`__members__`, gathering any aliases it finds; if any "
925-
"are found :exc:`ValueError` is raised with the details::"
924+
"enumeration's :attr:`~EnumType.__members__`, gathering any aliases it finds; "
925+
"if any are found :exc:`ValueError` is raised with the details::"
926926
msgstr ""
927927

928928
#: ../../library/enum.rst:859

library/optparse.po

+35-35
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.11\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2022-07-06 00:17+0000\n"
10+
"POT-Creation-Date: 2023-01-21 00:16+0000\n"
1111
"PO-Revision-Date: 2018-05-23 16:07+0000\n"
1212
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -152,8 +152,8 @@ msgstr ""
152152

153153
#: ../../library/optparse.rst:125
154154
msgid ""
155-
"a plus sign followed by a single letter, or a few letters, or a word, e.g. ``"
156-
"+f``, ``+rgb``"
155+
"a plus sign followed by a single letter, or a few letters, or a word, e.g. "
156+
"``+f``, ``+rgb``"
157157
msgstr ""
158158

159159
#: ../../library/optparse.rst:128
@@ -527,7 +527,7 @@ msgid "``\"store_const\"``"
527527
msgstr "``\"store_const\"``"
528528

529529
#: ../../library/optparse.rst:407 ../../library/optparse.rst:928
530-
msgid "store a constant value"
530+
msgid "store a constant value, pre-set via :attr:`Option.const`"
531531
msgstr ""
532532

533533
#: ../../library/optparse.rst:410 ../../library/optparse.rst:937
@@ -566,10 +566,10 @@ msgstr ""
566566

567567
#: ../../library/optparse.rst:427
568568
msgid ""
569-
"All of the above examples involve setting some variable (the \"destination"
570-
"\") when certain command-line options are seen. What happens if those "
571-
"options are never seen? Since we didn't supply any defaults, they are all "
572-
"set to ``None``. This is usually fine, but sometimes you want more "
569+
"All of the above examples involve setting some variable (the "
570+
"\"destination\") when certain command-line options are seen. What happens "
571+
"if those options are never seen? Since we didn't supply any defaults, they "
572+
"are all set to ``None``. This is usually fine, but sometimes you want more "
573573
"control. :mod:`optparse` lets you supply a default value for each "
574574
"destination, which is assigned before the command line is parsed."
575575
msgstr ""
@@ -813,8 +813,8 @@ msgstr ""
813813
#: ../../library/optparse.rst:692
814814
msgid ""
815815
"Print the version message for the current program (``self.version``) to "
816-
"*file* (default stdout). As with :meth:`print_usage`, any occurrence of ``"
817-
"%prog`` in ``self.version`` is replaced with the name of the current "
816+
"*file* (default stdout). As with :meth:`print_usage`, any occurrence of "
817+
"``%prog`` in ``self.version`` is replaced with the name of the current "
818818
"program. Does nothing if ``self.version`` is empty or undefined."
819819
msgstr ""
820820

@@ -916,8 +916,8 @@ msgstr ""
916916
#: ../../library/optparse.rst:810
917917
msgid ""
918918
"The usage summary to print when your program is run incorrectly or with a "
919-
"help option. When :mod:`optparse` prints the usage string, it expands ``"
920-
"%prog`` to ``os.path.basename(sys.argv[0])`` (or to ``prog`` if you passed "
919+
"help option. When :mod:`optparse` prints the usage string, it expands "
920+
"``%prog`` to ``os.path.basename(sys.argv[0])`` (or to ``prog`` if you passed "
921921
"that keyword argument). To suppress a usage message, pass the special "
922922
"value :data:`optparse.SUPPRESS_USAGE`."
923923
msgstr ""
@@ -951,8 +951,8 @@ msgstr ""
951951
msgid ""
952952
"A version string to print when the user supplies a version option. If you "
953953
"supply a true value for ``version``, :mod:`optparse` automatically adds a "
954-
"version option with the single option string ``--version``. The substring ``"
955-
"%prog`` is expanded the same as for ``usage``."
954+
"version option with the single option string ``--version``. The substring "
955+
"``%prog`` is expanded the same as for ``usage``."
956956
msgstr ""
957957

958958
#: ../../library/optparse.rst:835
@@ -1123,7 +1123,7 @@ msgid "``\"append_const\"``"
11231123
msgstr "``\"append_const\"``"
11241124

11251125
#: ../../library/optparse.rst:940
1126-
msgid "append a constant value to a list"
1126+
msgid "append a constant value to a list, pre-set via :attr:`Option.const`"
11271127
msgstr ""
11281128

11291129
#: ../../library/optparse.rst:949 ../../library/optparse.rst:1226
@@ -1214,8 +1214,8 @@ msgstr ""
12141214

12151215
#: ../../library/optparse.rst:1011
12161216
msgid ""
1217-
"The argument type expected by this option (e.g., ``\"string\"`` or ``\"int"
1218-
"\"``); the available option types are documented :ref:`here <optparse-"
1217+
"The argument type expected by this option (e.g., ``\"string\"`` or "
1218+
"``\"int\"``); the available option types are documented :ref:`here <optparse-"
12191219
"standard-option-types>`."
12201220
msgstr ""
12211221

@@ -1770,11 +1770,11 @@ msgstr ""
17701770
#: ../../library/optparse.rst:1452
17711771
msgid ""
17721772
"At this point, :mod:`optparse` detects that a previously added option is "
1773-
"already using the ``-n`` option string. Since ``conflict_handler`` is ``"
1774-
"\"resolve\"``, it resolves the situation by removing ``-n`` from the earlier "
1775-
"option's list of option strings. Now ``--dry-run`` is the only way for the "
1776-
"user to activate that option. If the user asks for help, the help message "
1777-
"will reflect that::"
1773+
"already using the ``-n`` option string. Since ``conflict_handler`` is "
1774+
"``\"resolve\"``, it resolves the situation by removing ``-n`` from the "
1775+
"earlier option's list of option strings. Now ``--dry-run`` is the only way "
1776+
"for the user to activate that option. If the user asks for help, the help "
1777+
"message will reflect that::"
17781778
msgstr ""
17791779

17801780
#: ../../library/optparse.rst:1463
@@ -1982,8 +1982,8 @@ msgid ""
19821982
"is the option string seen on the command-line that's triggering the "
19831983
"callback. (If an abbreviated long option was used, ``opt_str`` will be the "
19841984
"full, canonical option string---e.g. if the user puts ``--foo`` on the "
1985-
"command-line as an abbreviation for ``--foobar``, then ``opt_str`` will be ``"
1986-
"\"--foobar\"``.)"
1985+
"command-line as an abbreviation for ``--foobar``, then ``opt_str`` will be "
1986+
"``\"--foobar\"``.)"
19871987
msgstr ""
19881988

19891989
#: ../../library/optparse.rst:1637
@@ -2333,10 +2333,10 @@ msgstr ""
23332333

23342334
#: ../../library/optparse.rst:1950
23352335
msgid ""
2336-
"These are overlapping sets: some default \"store\" actions are ``\"store"
2337-
"\"``, ``\"store_const\"``, ``\"append\"``, and ``\"count\"``, while the "
2338-
"default \"typed\" actions are ``\"store\"``, ``\"append\"``, and ``\"callback"
2339-
"\"``."
2336+
"These are overlapping sets: some default \"store\" actions are "
2337+
"``\"store\"``, ``\"store_const\"``, ``\"append\"``, and ``\"count\"``, while "
2338+
"the default \"typed\" actions are ``\"store\"``, ``\"append\"``, and "
2339+
"``\"callback\"``."
23402340
msgstr ""
23412341

23422342
#: ../../library/optparse.rst:1954
@@ -2425,11 +2425,11 @@ msgstr ""
24252425
msgid ""
24262426
"If the ``attr`` attribute of ``values`` doesn't exist or is ``None``, then "
24272427
"ensure_value() first sets it to ``value``, and then returns 'value. This is "
2428-
"very handy for actions like ``\"extend\"``, ``\"append\"``, and ``\"count"
2429-
"\"``, all of which accumulate data in a variable and expect that variable to "
2430-
"be of a certain type (a list for the first two, an integer for the latter). "
2431-
"Using :meth:`ensure_value` means that scripts using your action don't have "
2432-
"to worry about setting a default value for the option destinations in "
2433-
"question; they can just leave the default as ``None`` and :meth:"
2434-
"`ensure_value` will take care of getting it right when it's needed."
2428+
"very handy for actions like ``\"extend\"``, ``\"append\"``, and "
2429+
"``\"count\"``, all of which accumulate data in a variable and expect that "
2430+
"variable to be of a certain type (a list for the first two, an integer for "
2431+
"the latter). Using :meth:`ensure_value` means that scripts using your "
2432+
"action don't have to worry about setting a default value for the option "
2433+
"destinations in question; they can just leave the default as ``None`` and :"
2434+
"meth:`ensure_value` will take care of getting it right when it's needed."
24352435
msgstr ""

0 commit comments

Comments
 (0)