8000 [po] auto sync · python/python-docs-zh-cn@9681696 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9681696

Browse files
[po] auto sync
1 parent 889c558 commit 9681696

File tree

2 files changed

+80
-42
lines changed

2 files changed

+80
-42
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "90.51%", "updated_at": "2024-02-11T13:08:57Z"}
1+
{"translation": "90.51%", "updated_at": "2024-02-11T15:09:04Z"}

library/shutil.po

Lines changed: 79 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
# SOME DESCRIPTIVE TITLE.
2-
# Copyright (C) 2001-2021, Python Software Foundation
2+
# Copyright (C) 2001-2024, Python Software Foundation
33
# This file is distributed under the same license as the Python package.
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
66
# Translators:
77
# Arisaka97 <solitaire2312@gmail.com>, 2020
88
# ppcfish <ppcfish@gmail.com>, 2020
9-
# Freesand Leo <yuqinju@163.com>, 2021
9+
# Freesand Leo <yuqinju@163.com>, 2024
1010
#
1111
#, fuzzy
1212
msgid ""
1313
msgstr ""
1414
"Project-Id-Version: Python 3.8\n"
1515
"Report-Msgid-Bugs-To: \n"
16-
"POT-Creation-Date: 2021-07-21 17:59+0000\n"
16+
"POT-Creation-Date: 2024-02-09 23:30+0000\n"
1717
"PO-Revision-Date: 2020-05-30 12:09+0000\n"
18-
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2021\n"
19-
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
18+
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2024\n"
19+
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2020
"MIME-Version: 1.0\n"
2121
"Content-Type: text/plain; charset=UTF-8\n"
2222
"Content-Transfer-Encoding: 8bit\n"
@@ -73,7 +73,7 @@ msgid ""
7373
"the *fsrc* object is not 0, only the contents from the current file position"
7474
" to the end of the file will be copied."
7575
msgstr ""
76-
"将文件类对象 *fsrc* 的内容拷贝到文件类对象 *fdst*。 整数值 *length* 如果给出则为缓冲区大小。 特别地, *length* "
76+
"将文件型对象 *fsrc* 的内容拷贝到文件型对象 *fdst*。 整数值 *length* 如果给出则为缓冲区大小。 特别地, *length* "
7777
"为负值表示拷贝数据时不对源数据进行分块循环处理;默认情况下会分块读取数据以避免不受控制的内存消耗。 请注意如果 *fsrc* 对象的当前文件位置不为 "
7878
"0,则只有从当前文件位置到文件末尾的内容会被拷贝。"
7979

@@ -842,7 +842,7 @@ msgid ""
842842
"returned sequence is a tuple ``(name, description)``."
843843
msgstr "返回支持的归档格式列表。 所返回序列中的每个元素为一个元组 ``(name, description)``。"
844844

845-
#: ../../library/shutil.rst:609 ../../library/shutil.rst:691
845+
#: ../../library/shutil.rst:609 ../../library/shutil.rst:712
846846
msgid "By default :mod:`shutil` provides these formats:"
847847
msgstr "默认情况下 :mod:`shutil` 提供以下格式:"
848848

@@ -855,15 +855,15 @@ msgid ""
855855
"*tar*: Uncompressed tar file. Uses POSIX.1-2001 pax format for new archives."
856856
msgstr "*tar*: 未压缩的 tar 文件。 对于新归档文件将使用 POSIX.1-2001 pax 格式。"
857857

858-
#: ../../library/shutil.rst:613 ../../library/shutil.rst:696
858+
#: ../../library/shutil.rst:613 ../../library/shutil.rst:717
859859
msgid "*gztar*: gzip'ed tar-file (if the :mod:`zlib` module is available)."
860860
msgstr "*gztar*: gzip 压缩的 tar 文件(如果 :mod:`zlib` 模块可用)。"
861861

862-
#: ../../library/shutil.rst:614 ../../library/shutil.rst:697
862+
#: ../../library/shutil.rst:614 ../../library/shutil.rst:718
863863
msgid "*bztar*: bzip2'ed tar-file (if the :mod:`bz2` module is available)."
864864
msgstr "*bztar*: bzip2 压缩的 tar 文件(如果 :mod:`bz2` 模块可用)。"
865865

866-
#: ../../library/shutil.rst:615 ../../library/shutil.rst:698
866+
#: ../../library/shutil.rst:615 ../../library/shutil.rst:719
867867
msgid "*xztar*: xz'ed tar-file (if the :mod:`lzma` module is available)."
868868
msgstr "*xztar*: xz 压缩的 tar 文件(如果 :mod:`lzma` 模块可用)。"
869869

@@ -930,90 +930,128 @@ msgstr ""
930930
"或者任何通过 :func:`register_unpack_format` 注册的其他格式。 如果未提供,:func:`unpack_archive` "
931931
"将使用归档文件的扩展名来检查是否注册了对应于该扩展名的解包器。 在未找到任何解包器的情况下,将引发 :exc:`ValueError`。"
932932

933-
#: ../../library/shutil.rst:658
933+
#: ../../library/shutil.rst:657
934+
msgid ""
935+
"The keyword-only *filter* argument, which was added in Python 3.8.17, is "
936+
"passed to the underlying unpacking function. For zip files, *filter* is not "
937+
"accepted. For tar files, it is recommended to set it to ``'data'``, unless "
938+
"using features specific to tar and UNIX-like filesystems. (See "
939+
":ref:`tarfile-extraction-filter` for details.) The ``'data'`` filter will "
940+
"become the default for tar files in Python 3.14."
941+
msgstr ""
942+
943+
#: ../../library/shutil.rst:667
934944
msgid ""
935945
"Raises an :ref:`auditing event <auditing>` ``shutil.unpack_archive`` with "
936946
"arguments ``filename``, ``extract_dir``, ``format``."
937947
msgstr ""
938948
"引发一个 :ref:`审计事件 <auditing>` ``shutil.unpack_archive`` 附带参数 ``filename``, "
939949
"``extract_dir``, ``format``。"
940950

941-
#: ../../library/shutil.rst:659
951+
#: ../../library/shutil.rst:670
952+
msgid ""
953+
"Never extract archives from untrusted sources without prior inspection. It "
954+
"is possible that files are created outside of the path specified in the "
955+
"*extract_dir* argument, e.g. members that have absolute filenames starting "
956+
"with \"/\" or filenames with two dots \"..\"."
957+
msgstr ""
958+
"绝不要未经预先检验就从不可靠的源中提取归档文件。 这样有可能会在 *extract_dir* 参数所指定的路径之外创建文件,例如某些成员具有以 "
959+
"\"/\" 打头的绝对路径文件名或是以两个点号 \"..\" 打头的文件名。"
960+
961+
#: ../../library/shutil.rst:675
942962
msgid "Accepts a :term:`path-like object` for *filename* and *extract_dir*."
943963
msgstr "接受一个 :term:`path-like object` 作为 *filename* 和 *extract_dir*。"
944964

945-
#: ../../library/shutil.rst:665
965+
#: ../../library/shutil.rst:678
966+
msgid "Added the *filter* argument."
967+
msgstr "增加了 *filter* 参数。"
968+
969+
#: ../../library/shutil.rst:683
946970
msgid ""
947971
"Registers an unpack format. *name* is the name of the format and "
948972
"*extensions* is a list of extensions corresponding to the format, like "
949973
"``.zip`` for Zip files."
950974
msgstr ""
951975
"注册一个解包格式。 *name* 为格式名称而 *extensions* 为对应于该格式的扩展名列表,例如 Zip 文件的扩展名为 ``.zip``。"
952976

953-
#: ../../library/shutil.rst:669
977+
#: ../../library/shutil.rst:687
954978
msgid ""
955979
"*function* is the callable that will be used to unpack archives. The "
956-
"callable will receive the path of the archive, followed by the directory the"
957-
" archive must be extracted to."
958-
msgstr "*function* 是将被用来解包归档文件的可调用对象。 该可调用对象将接受归档文件的路径,加上该归档文件要被解包的目标目录。"
980+
"callable will receive:"
981+
msgstr "*function* 是将被用于解包归档的可调用对象。 该可调用对象将接受:"
982+
983+
#: ../../library/shutil.rst:690
984+
msgid "the path of the archive, as a positional argument;"
985+
msgstr "归档的路径,为位置参数;"
986+
987+
#: ../../library/shutil.rst:691
988+
msgid ""
989+
"the directory the archive must be extracted to, as a positional argument;"
990+
msgstr "归档要提取到的目录,为位置参数;"
959991

960-
#: ../../library/shutil.rst:673
992+
#: ../../library/shutil.rst:692
961993
msgid ""
962-
"When provided, *extra_args* is a sequence of ``(name, value)`` tuples that "
963-
"will be passed as keywords arguments to the callable."
964-
msgstr "如果提供了 *extra_args*,则其应为一个 ``(name, value)`` 元组的序列,将被作为关键字参数传递给该可调用对象。"
994+
"possibly a *filter* keyword argument, if it was given to "
995+
":func:`unpack_archive`;"
996+
msgstr "可选的 *filter* 关键字参数,如果有提供给 :func:`unpack_archive` 的话;"
965997

966-
#: ../../library/shutil.rst:676
998+
#: ../../library/shutil.rst:694
999+
msgid ""
1000+
"additional keyword arguments, specified by *extra_args* as a sequence of "
1001+
"``(name, value)`` tuples."
1002+
msgstr "额外的关键字参数,由 ``(name, value)`` 元组组成的序列 *extra_args* 指明。"
1003+
1004+
#: ../../library/shutil.rst:697
9671005
msgid ""
9681006
"*description* can be provided to describe the format, and will be returned "
9691007
"by the :func:`get_unpack_formats` function."
9701008
msgstr "可以提供 *description* 来描述该格式,它将被 :func:`get_unpack_formats` 返回。"
9711009

972-
#: ../../library/shutil.rst:682
1010+
#: ../../library/shutil.rst:703
9731011
msgid "Unregister an unpack format. *name* is the name of the format."
9741012
msgstr "撤销注册一个解包格式。 *name* 为格式的名称。"
9751013

976-
#: ../../library/shutil.rst:687
1014+
#: ../../library/shutil.rst:708
9771015
msgid ""
9781016
"Return a list of all registered formats for unpacking. Each element of the "
9791017
"returned sequence is a tuple ``(name, extensions, description)``."
9801018
msgstr "返回所有已注册的解包格式列表。 所返回序列中的每个元素为一个元组 ``(name, extensions, description)``。"
9811019

982-
#: ../../library/shutil.rst:693
1020+
#: ../../library/shutil.rst:714
9831021
msgid ""
9841022
"*zip*: ZIP file (unpacking compressed files works only if the corresponding "
9851023
"module is available)."
9861024
msgstr "*zip*: ZIP 文件(只有在相应模块可用时才能解包压缩文件)。"
9871025

988-
#: ../../library/shutil.rst:695
1026+
#: ../../library/shutil.rst:716
9891027
msgid "*tar*: uncompressed tar file."
9901028
msgstr "*tar*: 未压缩的 tar 文件。"
9911029

992-
#: ../../library/shutil.rst:700
1030+
#: ../../library/shutil.rst:721
9931031
msgid ""
9941032
"You can register new formats or provide your own unpacker for any existing "
9951033
"formats, by using :func:`register_unpack_format`."
9961034
msgstr "你可以通过使用 :func:`register_unpack_format` 注册新的格式或为任何现有格式提供你自己的解包器。"
9971035

998-
#: ../../library/shutil.rst:707
1036+
#: ../../library/shutil.rst:728
9991037
msgid "Archiving example"
10001038
msgstr "归档程序示例"
10011039

1002-
#: ../../library/shutil.rst:709
1040+
#: ../../library/shutil.rst:730
10031041
msgid ""
10041042
"In this example, we create a gzip'ed tar-file archive containing all files "
10051043
"found in the :file:`.ssh` directory of the user::"
10061044
msgstr "在这个示例中,我们创建了一个 gzip 压缩的 tar 归档文件,其中包含用户的 :file:`.ssh` 目录下的所有文件::"
10071045

1008-
#: ../../library/shutil.rst:719
1046+
#: ../../library/shutil.rst:740
10091047
msgid "The resulting archive contains:"
10101048
msgstr "结果归档文件中包含有:"
10111049

1012-
#: ../../library/shutil.rst:737
1050+
#: ../../library/shutil.rst:758
10131051
msgid "Archiving example with *base_dir*"
10141052
msgstr "使用 *base_dir* 的归档程序示例"
10151053

1016-
#: ../../library/shutil.rst:739
1054+
#: ../../library/shutil.rst:760
10171055
msgid ""
10181056
"In this example, similar to the `one above <shutil-archiving-example_>`_, we"
10191057
" show how to use :func:`make_archive`, but this time with the usage of "
@@ -1022,35 +1060,35 @@ msgstr ""
10221060
"在这个例子中,与 `上面的例子 <shutil-archiving-example_>`_ 类似,我们演示了如何使用 "
10231061
":func:`make_archive`,但这次是使用 *base_dir*。 我们现在具有如下的目录结构:"
10241062

1025-
#: ../../library/shutil.rst:753
1063+
#: ../../library/shutil.rst:774
10261064
msgid ""
10271065
"In the final archive, :file:`please_add.txt` should be included, but "
10281066
":file:`do_not_add.txt` should not. Therefore we use the following::"
10291067
msgstr ""
10301068
"在最终的归档中,应当会包括 :file:`please_add.txt`,但不应当包括 :file:`do_not_add.txt`。 "
10311069
"因此我们使用以下代码::"
10321070

1033-
#: ../../library/shutil.rst:767
1071+
#: ../../library/shutil.rst:788
10341072
msgid "Listing the files in the resulting archive gives us:"
10351073
msgstr "列出结果归档中的文件我们将会得到:"
10361074

1037-
#: ../../library/shutil.rst:777
1075+
#: ../../library/shutil.rst:798
10381076
msgid "Querying the size of the output terminal"
10391077
msgstr "查询输出终端的尺寸"
10401078

1041-
#: ../../library/shutil.rst:781
1079+
#: ../../library/shutil.rst:802
10421080
msgid "Get the size of the terminal window."
10431081
msgstr "获取终端窗口的尺寸。"
10441082

1045-
#: ../../library/shutil.rst:783
1083+
#: ../../library/shutil.rst:804
10461084
msgid ""
10471085
"For each of the two dimensions, the environment variable, ``COLUMNS`` and "
10481086
"``LINES`` respectively, is checked. If the variable is defined and the value"
10491087
" is a positive integer, it is used."
10501088
msgstr ""
10511089
"对于两个维度中的每一个,会分别检查环境变量 ``COLUMNS`` 和 ``LINES``。 如果定义了这些变量并且其值为正整数,则将使用这些值。"
10521090

1053-
#: ../../library/shutil.rst:787
1091+
#: ../../library/shutil.rst:808
10541092
msgid ""
10551093
"When ``COLUMNS`` or ``LINES`` is not defined, which is the common case, the "
10561094
"terminal connected to :data:`sys.__stdout__` is queried by invoking "
@@ -1059,7 +1097,7 @@ msgstr ""
10591097
"如果未定义 ``COLUMNS`` 或 ``LINES``,这是通常的情况,则连接到 :data:`sys.__stdout__` 的终端将通过发起调用"
10601098
" :func:`os.get_terminal_size` 被查询。"
10611099

1062-
#: ../../library/shutil.rst:791
1100+
#: ../../library/shutil.rst:812
10631101
msgid ""
10641102
"If the terminal size cannot be successfully queried, either because the "
10651103
"system doesn't support querying, or because we are not connected to a "
@@ -1070,11 +1108,11 @@ msgstr ""
10701108
"如果由于系统不支持查询,或是由于我们未连接到某个终端而导致查询终端尺寸不成功,则会使用在 ``fallback`` 形参中给出的值。 "
10711109
"``fallback`` 默认为 ``(80, 24)``,这是许多终端模拟器所使用的默认尺寸。"
10721110

1073-
#: ../../library/shutil.rst:797
1111+
#: ../../library/shutil.rst:818
10741112
msgid "The value returned is a named tuple of type :class:`os.terminal_size`."
10751113
msgstr "返回的值是一个 :class:`os.terminal_size` 类型的具名元组。"
10761114

1077-
#: ../../library/shutil.rst:799
1115+
#: ../../library/shutil.rst:820
10781116
msgid ""
10791117
"See also: The Single UNIX Specification, Version 2, `Other Environment "
10801118
"Variables`_."

0 commit comments

Comments
 (0)
0