@@ -14,7 +14,7 @@ msgid ""
1414msgstr ""
1515"Project-Id-Version : Python 3.9\n "
1616"Report-Msgid-Bugs-To : \n "
17- "POT-Creation-Date : 2021-03-02 05:36 +0000\n "
17+ "POT-Creation-Date : 2021-07-22 06:59 +0000\n "
1818"PO-Revision-Date : 2017-02-16 23:26+0000\n "
1919"
Last-Translator :
Freesand Leo <[email protected] >, 2021\n "
2020"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -830,55 +830,59 @@ msgstr ""
830830"引发一个 :ref:`审计事件 <auditing>` ``shutil.make_archive`` 并附带参数 ``base_name``, "
831831"``format``, ``root_dir``, ``base_dir``。"
832832
833- #: ../../library/shutil.rst:598
833+ #: ../../library/shutil.rst:600
834+ msgid "This function is not thread-safe."
835+ msgstr "这个函数不是线程安全的。"
836+
837+ #: ../../library/shutil.rst:602
834838msgid ""
835839"The modern pax (POSIX.1-2001) format is now used instead of the legacy GNU "
836840"format for archives created with ``format=\" tar\" ``."
837841msgstr ""
838842"现在对于通过 ``format=\" tar\" `` 创建的归档文件将使用新式的 pax (POSIX.1-2001) 格式而非旧式的 GNU 格式。"
839843
840- #: ../../library/shutil.rst:605
844+ #: ../../library/shutil.rst:609
841845msgid ""
842846"Return a list of supported formats for archiving. Each element of the "
843847"returned sequence is a tuple ``(name, description)``."
844848msgstr "返回支持的归档格式列表。 所返回序列中的每个元素为一个元组 ``(name, description)``。"
845849
846- #: ../../library/shutil.rst:608 ../../library/shutil.rst:690
850+ #: ../../library/shutil.rst:612 ../../library/shutil.rst:694
847851msgid "By default :mod:`shutil` provides these formats:"
848852msgstr "默认情况下 :mod:`shutil` 提供以下格式:"
849853
850- #: ../../library/shutil.rst:610
854+ #: ../../library/shutil.rst:614
851855msgid "*zip*: ZIP file (if the :mod:`zlib` module is available)."
852856msgstr "*zip*: ZIP 文件(如果 :mod:`zlib` 模块可用)。"
853857
854- #: ../../library/shutil.rst:611
858+ #: ../../library/shutil.rst:615
855859msgid ""
856860"*tar*: Uncompressed tar file. Uses POSIX.1-2001 pax format for new archives."
857861msgstr "*tar*: 未压缩的 tar 文件。 对于新归档文件将使用 POSIX.1-2001 pax 格式。"
858862
859- #: ../../library/shutil.rst:612 ../../library/shutil.rst:695
863+ #: ../../library/shutil.rst:616 ../../library/shutil.rst:699
860864msgid "*gztar*: gzip'ed tar-file (if the :mod:`zlib` module is available)."
861865msgstr "*gztar*: gzip 压缩的 tar 文件(如果 :mod:`zlib` 模块可用)。"
862866
863- #: ../../library/shutil.rst:613 ../../library/shutil.rst:696
867+ #: ../../library/shutil.rst:617 ../../library/shutil.rst:700
864868msgid "*bztar*: bzip2'ed tar-file (if the :mod:`bz2` module is available)."
865869msgstr "*bztar*: bzip2 压缩的 tar 文件(如果 :mod:`bz2` 模块可用)。"
866870
867- #: ../../library/shutil.rst:614 ../../library/shutil.rst:697
871+ #: ../../library/shutil.rst:618 ../../library/shutil.rst:701
868872msgid "*xztar*: xz'ed tar-file (if the :mod:`lzma` module is available)."
869873msgstr "*xztar*: xz 压缩的 tar 文件(如果 :mod:`lzma` 模块可用)。"
870874
871- #: ../../library/shutil.rst:616
875+ #: ../../library/shutil.rst:620
872876msgid ""
873877"You can register new formats or provide your own archiver for any existing "
874878"formats, by using :func:`register_archive_format`."
875879msgstr "你可以通过使用 :func:`register_archive_format` 注册新的格式或为任何现有格式提供你自己的归档器。"
876880
877- #: ../../library/shutil.rst:622
881+ #: ../../library/shutil.rst:626
878882msgid "Register an archiver for the format *name*."
879883msgstr "为 *name* 格式注册一个归档器。"
880884
881- #: ../../library/shutil.rst:624
885+ #: ../../library/shutil.rst:628
882886msgid ""
883887"*function* is the callable that will be used to unpack archives. The "
884888"callable will receive the *base_name* of the file to create, followed by the"
@@ -890,35 +894,35 @@ msgstr ""
890894"*base_dir* (其默认值为 :data:`os.curdir`)。 更多参数会被作为关键字参数传入: *owner*, *group*, "
891895"*dry_run* 和 *logger* (与向 :func:`make_archive` 传入的参数一致)。"
892896
893- #: ../../library/shutil.rst:630
897+ #: ../../library/shutil.rst:634
894898msgid ""
895899"If given, *extra_args* is a sequence of ``(name, value)`` pairs that will be"
896900" used as extra keywords arguments when the archiver callable is used."
897901msgstr ""
898902"如果给出了 *extra_args*,则其应为一个 ``(name, value)`` 对的序列,将在归档器可调用对象被使用时作为附加的关键字参数。"
899903
900- #: ../../library/shutil.rst:633
904+ #: ../../library/shutil.rst:637
901905msgid ""
902906"*description* is used by :func:`get_archive_formats` which returns the list "
903907"of archivers. Defaults to an empty string."
904908msgstr ""
905909"*description* 由 :func:`get_archive_formats` 使用,它将返回归档器的列表。 默认值为一个空字符串。"
906910
907- #: ../../library/shutil.rst:639
911+ #: ../../library/shutil.rst:643
908912msgid "Remove the archive format *name* from the list of supported formats."
909913msgstr "从支持的格式中移除归档格式 *name*。"
910914
911- #: ../../library/shutil.rst:644
915+ #: ../../library/shutil.rst:648
912916msgid "Unpack an archive. *filename* is the full path of the archive."
913917msgstr "解包一个归档文件。 *filename* 是归档文件的完整路径。"
914918
915- #: ../../library/shutil.rst:646
919+ #: ../../library/shutil.rst:650
916920msgid ""
917921"*extract_dir* is the name of the target directory where the archive is "
918922"unpacked. If not provided, the current working directory is used."
919923msgstr "*extract_dir* 是归档文件解包的目标目录名称。 如果未提供,则将使用当前工作目录。"
920924
921- #: ../../library/shutil.rst:649
925+ #: ../../library/shutil.rst:653
922926msgid ""
923927"*format* is the archive format: one of \" zip\" , \" tar\" , \" gztar\" , "
924928"\" bztar\" , or \" xztar\" . Or any other format registered with "
@@ -931,90 +935,90 @@ msgstr ""
931935"或者任何通过 :func:`register_unpack_format` 注册的其他格式。 如果未提供,:func:`unpack_archive` "
932936"将使用归档文件的扩展名来检查是否注册了对应于该扩展名的解包器。 在未找到任何解包器的情况下,将引发 :exc:`ValueError`。"
933937
934- #: ../../library/shutil.rst:656
938+ #: ../../library/shutil.rst:660
935939msgid ""
936940"Raises an :ref:`auditing event <auditing>` ``shutil.unpack_archive`` with "
937941"arguments ``filename``, ``extract_dir``, ``format``."
938942msgstr ""
939943"引发一个 :ref:`审计事件 <auditing>` ``shutil.unpack_archive`` 附带参数 ``filename``, "
940944"``extract_dir``, ``format``。"
941945
942- #: ../../library/shutil.rst:658
946+ #: ../../library/shutil.rst:662
943947msgid "Accepts a :term:`path-like object` for *filename* and *extract_dir*."
944948msgstr "接受一个 :term:`path-like object` 作为 *filename* 和 *extract_dir*。"
945949
946- #: ../../library/shutil.rst:664
950+ #: ../../library/shutil.rst:668
947951msgid ""
948952"Registers an unpack format. *name* is the name of the format and "
949953"*extensions* is a list of extensions corresponding to the format, like "
950954"``.zip`` for Zip files."
951955msgstr ""
952956"注册一个解包格式。 *name* 为格式名称而 *extensions* 为对应于该格式的扩展名列表,例如 Zip 文件的扩展名为 ``.zip``。"
953957
954- #: ../../library/shutil.rst:668
958+ #: ../../library/shutil.rst:672
955959msgid ""
956960"*function* is the callable that will be used to unpack archives. The "
957961"callable will receive the path of the archive, followed by the directory the"
958962" archive must be extracted to."
959963msgstr "*function* 是将被用来解包归档文件的可调用对象。 该可调用对象将接受归档文件的路径,加上该归档文件要被解包的目标目录。"
960964
961- #: ../../library/shutil.rst:672
965+ #: ../../library/shutil.rst:676
962966msgid ""
963967"When provided, *extra_args* is a sequence of ``(name, value)`` tuples that "
964968"will be passed as keywords arguments to the callable."
965969msgstr "如果提供了 *extra_args*,则其应为一个 ``(name, value)`` 元组的序列,将被作为关键字参数传递给该可调用对象。"
966970
967- #: ../../library/shutil.rst:675
971+ #: ../../library/shutil.rst:679
968972msgid ""
969973"*description* can be provided to describe the format, and will be returned "
970974"by the :func:`get_unpack_formats` function."
971975msgstr "可以提供 *description* 来描述该格式,它将被 :func:`get_unpack_formats` 返回。"
972976
973- #: ../../library/shutil.rst:681
977+ #: ../../library/shutil.rst:685
974978msgid "Unregister an unpack format. *name* is the name of the format."
975979msgstr "撤销注册一个解包格式。 *name* 为格式的名称。"
976980
977- #: ../../library/shutil.rst:686
981+ #: ../../library/shutil.rst:690
978982msgid ""
979983"Return a list of all registered formats for unpacking. Each element of the "
980984"returned sequence is a tuple ``(name, extensions, description)``."
981985msgstr "返回所有已注册的解包格式列表。 所返回序列中的每个元素为一个元组 ``(name, extensions, description)``。"
982986
983- #: ../../library/shutil.rst:692
987+ #: ../../library/shutil.rst:696
984988msgid ""
985989"*zip*: ZIP file (unpacking compressed files works only if the corresponding "
986990"module is available)."
987991msgstr "*zip*: ZIP 文件(只有在相应模块可用时才能解包压缩文件)。"
988992
989- #: ../../library/shutil.rst:694
993+ #: ../../library/shutil.rst:698
990994msgid "*tar*: uncompressed tar file."
991995msgstr "*tar*: 未压缩的 tar 文件。"
992996
993- #: ../../library/shutil.rst:699
997+ #: ../../library/shutil.rst:703
994998msgid ""
995999"You can register new formats or provide your own unpacker for any existing "
9961000"formats, by using :func:`register_unpack_format`."
9971001msgstr "你可以通过使用 :func:`register_unpack_format` 注册新的格式或为任何现有格式提供你自己的解包器。"
9981002
999- #: ../../library/shutil.rst:706
1003+ #: ../../library/shutil.rst:710
10001004msgid "Archiving example"
10011005msgstr "归档程序示例"
10021006
1003- #: ../../library/shutil.rst:708
1007+ #: ../../library/shutil.rst:712
10041008msgid ""
10051009"In this example, we create a gzip'ed tar-file archive containing all files "
10061010"found in the :file:`.ssh` directory of the user::"
10071011msgstr "在这个示例中,我们创建了一个 gzip 压缩的 tar 归档文件,其中包含用户的 :file:`.ssh` 目录下的所有文件::"
10081012
1009- #: ../../library/shutil.rst:718
1013+ #: ../../library/shutil.rst:722
10101014msgid "The resulting archive contains:"
10111015msgstr "结果归档文件中包含有:"
10121016
1013- #: ../../library/shutil.rst:736
1017+ #: ../../library/shutil.rst:740
10141018msgid "Archiving example with *base_dir*"
10151019msgstr "使用 *base_dir* 的归档程序示例"
10161020
1017- #: ../../library/shutil.rst:738
1021+ #: ../../library/shutil.rst:742
10181022msgid ""
10191023"In this example, similar to the `one above <shutil-archiving-example_>`_, we"
10201024" show how to use :func:`make_archive`, but this time with the usage of "
@@ -1023,35 +1027,35 @@ msgstr ""
10231027"在这个例子中,与 `上面的例子 <shutil-archiving-example_>`_ 类似,我们演示了如何使用 "
10241028":func:`make_archive`,但这次是使用 *base_dir*。 我们现在具有如下的目录结构:"
10251029
1026- #: ../../library/shutil.rst:752
1030+ #: ../../library/shutil.rst:756
10271031msgid ""
10281032"In the final archive, :file:`please_add.txt` should be included, but "
10291033":file:`do_not_add.txt` should not. Therefore we use the following::"
10301034msgstr ""
10311035"在最终的归档中,应当会包括 :file:`please_add.txt`,但不应当包括 :file:`do_not_add.txt`。 "
10321036"因此我们使用以下代码::"
10331037
1034- #: ../../library/shutil.rst:766
1038+ #: ../../library/shutil.rst:770
10351039msgid "Listing the files in the resulting archive gives us:"
10361040msgstr "列出结果归档中的文件我们将会得到:"
10371041
1038- #: ../../library/shutil.rst:776
1042+ #: ../../library/shutil.rst:780
10391043msgid "Querying the size of the output terminal"
10401044msgstr "查询输出终端的尺寸"
10411045
1042- #: ../../library/shutil.rst:780
1046+ #: ../../library/shutil.rst:784
10431047msgid "Get the size of the terminal window."
10441048msgstr "获取终端窗口的尺寸。"
10451049
1046- #: ../../library/shutil.rst:782
1050+ #: ../../library/shutil.rst:786
10471051msgid ""
10481052"For each of the two dimensions, the environment variable, ``COLUMNS`` and "
10491053"``LINES`` respectively, is checked. If the variable is defined and the value"
10501054" is a positive integer, it is used."
10511055msgstr ""
10521056"对于两个维度中的每一个,会分别检查环境变量 ``COLUMNS`` 和 ``LINES``。 如果定义了这些变量并且其值为正整数,则将使用这些值。"
10531057
1054- #: ../../library/shutil.rst:786
1058+ #: ../../library/shutil.rst:790
10551059msgid ""
10561060"When ``COLUMNS`` or ``LINES`` is not defined, which is the common case, the "
10571061"terminal connected to :data:`sys.__stdout__` is queried by invoking "
@@ -1060,7 +1064,7 @@ msgstr ""
10601064"如果未定义 ``COLUMNS`` 或 ``LINES``,这是通常的情况,则连接到 :data:`sys.__stdout__` 的终端将通过发起调用"
10611065" :func:`os.get_terminal_size` 被查询。"
10621066
1063- #: ../../library/shutil.rst:790
1067+ #: ../../library/shutil.rst:794
10641068msgid ""
10651069"If the terminal size cannot be successfully queried, either because the "
10661070"system doesn't support querying, or because we are not connected to a "
@@ -1071,11 +1075,11 @@ msgstr ""
10711075"如果由于系统不支持查询,或是由于我们未连接到某个终端而导致查询终端尺寸不成功,则会使用在 ``fallback`` 形参中给出的值。 "
10721076"``fallback`` 默认为 ``(80, 24)``,这是许多终端模拟器所使用的默认尺寸。"
10731077
1074- #: ../../library/shutil.rst:796
1078+ #: ../../library/shutil.rst:800
10751079msgid "The value returned is a named tuple of type :class:`os.terminal_size`."
10761080msgstr "返回的值是一个 :class:`os.terminal_size` 类型的具名元组。"
10771081
1078- #: ../../library/shutil.rst:798
1082+ #: ../../library/shutil.rst:802
10791083msgid ""
10801084"See also: The Single UNIX Specification, Version 2, `Other Environment "
10811085"Variables`_."
0 commit comments