Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3f23433

Browse files
[po] auto sync
1 parent 3f46dba commit 3f23433

3 files changed

Lines changed: 56 additions & 17 deletions

File tree

c-api/memory.po

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
# Fred <[email protected]>, 2018
88
# Meng Du <[email protected]>, 2019
99
# ppcfish <[email protected]>, 2019
10-
# Freesand Leo <[email protected]>, 2020
1110
# Sean Chao <[email protected]>, 2020
11+
# Freesand Leo <[email protected]>, 2020
1212
#
1313
#, fuzzy
1414
msgid ""
@@ -17,7 +17,7 @@ msgstr ""
1717
"Report-Msgid-Bugs-To: \n"
1818
"POT-Creation-Date: 2020-05-31 09:25+0000\n"
1919
"PO-Revision-Date: 2017-02-16 17:37+0000\n"
20-
"Last-Translator: Sean Chao <seanchao0804@gmail.com>, 2020\n"
20+
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2020\n"
2121
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2222
"MIME-Version: 1.0\n"
2323
"Content-Type: text/plain; charset=UTF-8\n"
@@ -404,14 +404,14 @@ msgid ""
404404
"as if ``PyObject_Malloc(1)`` had been called instead. The memory will not "
405405
"have been initialized in any way."
406406
msgstr ""
407-
"请求零字节可能返回一个独特的非 ``NULL`` 指针,就像调用了``PyObject_Malloc(1)`` 一样。但是内存不会以任何方式被初始化。"
407+
"请求零字节可能返回一个独特的非 ``NULL`` 指针,就像调用了 ``PyObject_Malloc(1)`` 一样。但是内存不会以任何方式被初始化。"
408408

409409
#: ../../c-api/memory.rst:299
410410
msgid ""
411411
"Requesting zero elements or elements of size zero bytes returns a distinct "
412412
"non-``NULL`` pointer if possible, as if ``PyObject_Calloc(1, 1)`` had been "
413413
"called instead."
414-
msgstr "请求零字节可能返回一个独特的非 ``NULL`` 指针,就像调用了``PyObject_Calloc(1, 1)`` 一样。"
414+
msgstr "请求零字节可能返回一个独特的非 ``NULL`` 指针,就像调用了 ``PyObject_Calloc(1, 1)`` 一样。"
415415

416416
#: ../../c-api/memory.rst:311
417417
msgid ""
@@ -727,21 +727,25 @@ msgid ""
727727
"Detect API violations, ex: :c:func:`PyObject_Free` called on a buffer "
728728
"allocated by :c:func:`PyMem_Malloc`"
729729
msgstr ""
730+
"检测对 API 的违反,例如:对用 :c:func:`PyMem_Malloc` 分配的缓冲区调用 :c:func:`PyObject_Free` 。"
730731

731732
#: ../../c-api/memory.rst:451
732733
msgid "Detect write before the start of the buffer (buffer underflow)"
733-
msgstr ""
734+
msgstr "检测缓冲区起始位置前的写入(缓冲区下溢)。"
734735

735736
#: ../../c-api/memory.rst:452
736737
msgid "Detect write after the end of the buffer (buffer overflow)"
737-
msgstr ""
738+
msgstr "检测缓冲区终止位置后的写入(缓冲区溢出)。"
738739

739740
#: ../../c-api/memory.rst:453
740741
msgid ""
741742
"Check that the :term:`GIL <global interpreter lock>` is held when allocator "
742743
"functions of :c:data:`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) and "
743744
":c:data:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) domains are called"
744745
msgstr ""
746+
"检测当调用 :c:data:`PYMEM_DOMAIN_OBJ` (如: :c:func:`PyObject_Malloc`) 和 "
747+
":c:data:`PYMEM_DOMAIN_MEM` (如: :c:func:`PyMem_Malloc`) 域的分配器函数时 :term:`GIL "
748+
"<global interpreter lock>` 已被保持。"
745749

746750
#: ../../c-api/memory.rst:458
747751
msgid ""
@@ -750,6 +754,8 @@ msgid ""
750754
"displayed if :mod:`tracemalloc` is tracing Python memory allocations and the"
751755
" memory block was traced."
752756
msgstr ""
757+
"在出错时,调试钩子使用 :mod:`tracemalloc` 模块来回溯内存块被分配的位置。只有当 :mod:`tracemalloc` 正在追踪 "
758+
"Python 内存分配,并且内存块被追踪时,才会显示回溯。"
753759

754760
#: ../../c-api/memory.rst:463
755761
msgid ""
@@ -758,6 +764,8 @@ msgid ""
758764
"variable can be used to install debug hooks on a Python compiled in release "
759765
"mode."
760766
msgstr ""
767+
"如果 Python 是在调试模式下编译的,这些钩子是 :ref:`installed by default <default-memory-"
768+
"allocators>` 。环境变量 :envvar:`PYTHONMALLOC` 可以用来在发布模式编译的 Python 上安装调试钩子。"
761769

762770
#: ../../c-api/memory.rst:468
763771
msgid ""
@@ -767,17 +775,23 @@ msgid ""
767775
"held when functions of :c:data:`PYMEM_DOMAIN_OBJ` and "
768776
":c:data:`PYMEM_DOMAIN_MEM` domains are called."
769777
msgstr ""
778+
"这个函数现在也适用于以 发布模式编译的 Python。在出错时,调试钩子现在使用 :mod:`tracemalloc` "
779+
"来回溯内存块被分配的位置。调试钩子现在也检查当 :c:data:`PYMEM_DOMAIN_OBJ` 和 "
780+
":c:data:`PYMEM_DOMAIN_MEM` 域的函数被调用时,全局解释器锁是否被持有。"
770781

771782
#: ../../c-api/memory.rst:475
772783
msgid ""
773784
"Byte patterns ``0xCB`` (``CLEANBYTE``), ``0xDB`` (``DEADBYTE``) and ``0xFB``"
774785
" (``FORBIDDENBYTE``) have been replaced with ``0xCD``, ``0xDD`` and ``0xFD``"
775786
" to use the same values than Windows CRT debug ``malloc()`` and ``free()``."
776787
msgstr ""
788+
"字节模式 ``0xCB`` (``CLEANBYTE``)、 ``0xDB`` (``DEADBYTE``) 和 ``0xFB`` "
789+
"(``FORBIDDENBYTE``) 已被 ``0xCD`` 、 ``0xDD`` 和 ``0xFD`` 替代以使用与 Windows CRT 调试 "
790+
"``malloc()`` 和 ``free()`` 相同的值。"
777791

778792
#: ../../c-api/memory.rst:485
779793
msgid "The pymalloc allocator"
780-
msgstr ""
794+
msgstr "pymalloc 分配器"
781795

782796
#: ../../c-api/memory.rst:487
783797
msgid ""

distutils/configfile.po

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ msgid ""
4949
"option, which the installer can then override either on the command-line or "
5050
"by editing the config file."
5151
msgstr ""
52+
"通常,在 *事前* 就写出构建发布包所需的一切是不可能的:你可能需要从用户或者用户的系统获取一些信息,才能继续下去。 只要这些信息相当简单 —— "
53+
"例如一个用于搜索 C 头文件或库的目录列表 —— 那么提供配置文件 :file:`setup.cfg` 供用户配置就是一个低成本且方便的解决方式。 "
54+
"配置文件还允许你为任何命令选项提供默认值,而安装器可以通过命令行或编辑配置文件来覆盖这些默认值。"
5255

5356
#: ../../distutils/configfile.rst:18
5457
msgid ""
@@ -60,28 +63,31 @@ msgid ""
6063
"after the contents of the setup script, but before the command-line. This "
6164
"has several useful consequences:"
6265
msgstr ""
66+
"安装配置文件是在安装脚本和安装脚本命令行之间一个适当的折衷方式 --- 安装脚本在理想情况下应当不受安装者的控制 [#]_ --- "
67+
"而安装脚本命令行则在你的控制范围之外且完全取决于安装者的选择。 实际上,:file:`setup.cfg` (以及目标系统上的其他任何 "
68+
"Distutils 配置文件) 是在配置脚本之后、命令行之前被处理。 这导致了几个有用的后果:"
6369

6470
#: ../../distutils/configfile.rst:32
6571
msgid ""
6672
"installers can override some of what you put in :file:`setup.py` by editing "
6773
":file:`setup.cfg`"
68-
msgstr ""
74+
msgstr "安装者可以通过编辑 :file:`setup.cfg` 来覆盖你放在 :file:`setup.py` 中的配置"
6975

7076
#: ../../distutils/configfile.rst:35
7177
msgid ""
7278
"you can provide non-standard defaults for options that are not easily set in"
7379
" :file:`setup.py`"
74-
msgstr ""
80+
msgstr "你可以为无法在 :file:`setup.py` 中方便设置的选项提供非标准的默认值"
7581

7682
#: ../../distutils/configfile.rst:38
7783
msgid ""
7884
"installers can override anything in :file:`setup.cfg` using the command-line"
7985
" options to :file:`setup.py`"
80-
msgstr ""
86+
msgstr "安装者可以使用 :file:`setup.py` 的命令行选项来覆盖 :file:`setup.cfg` 中的一切"
8187

8288
#: ../../distutils/configfile.rst:41
8389
msgid "The basic syntax of the configuration file is simple:"
84-
msgstr ""
90+
msgstr "配置文件的基本语法很简单:"
8591

8692
#: ../../distutils/configfile.rst:49
8793
msgid ""
@@ -93,18 +99,21 @@ msgid ""
9399
"of the line. Long option values can be split across multiple lines simply "
94100
"by indenting the continuation lines."
95101
msgstr ""
102+
"其中 *command* 是一个 Distutils 命令 (例如 :command:`build_py`, :command:`install`),而"
103+
" *option* 是该命令所支持的某个选项。 可以为每个命令提供任意数量的选项,并且可以在文件中包括任意数量的命令组。 空白行会被忽略,以一个 "
104+
"``'#'`` 开始的注释行也是如此。 长选项值可以简单地通过缩进后续行的方式被拆分为多行。"
96105

97106
#: ../../distutils/configfile.rst:57
98107
msgid ""
99108
"You can find out the list of options supported by a particular command with "
100109
"the universal :option:`!--help` option, e.g."
101-
msgstr ""
110+
msgstr "你可以用通用的 :option:`!--help` 选项找出特定命令所支持的选项列表,例如"
102111

103112
#: ../../distutils/configfile.rst:75
104113
msgid ""
105114
"Note that an option spelled :option:`!--foo-bar` on the command-line is "
106115
"spelled ``foo_bar`` in configuration files."
107-
msgstr ""
116+
msgstr "请注意在命令行中拼写为 :option:`!--foo-bar` 的选项在配置文件中会拼写为 ``foo_bar``。"
108117

109118
#: ../../distutils/configfile.rst:80
110119
msgid ""
@@ -115,6 +124,9 @@ msgid ""
115124
"You can always use the :option:`!--inplace` option on the command-line to "
116125
"ensure this:"
117126
msgstr ""
127+
"例如,假设你希望你的扩展在“原地”构建 --- 就是说你有一个扩展 :mod:`pkg.ext`,你希望编译出的扩展文件 (例如在 Unix 上为 "
128+
":file:`ext.so`) 放在与你的纯 Python 模块 :mod:`pkg.mod1` 和 :mod:`pkg.mod2` 相同的源目录中。 "
129+
"你总是可以在命令行中使用 :option:`!--inplace` 选项来确保这一点:"
118130

119131
#: ../../distutils/configfile.rst:90
120132
msgid ""
@@ -123,6 +135,8 @@ msgid ""
123135
"to \"set and forget\" this option, by encoding it in :file:`setup.cfg`, the "
124136
"configuration file for this distribution:"
125137
msgstr ""
138+
"但是这要求你总是显式地指定 :command:`build_ext` 命令,并且记得提供 :option:`!--inplace`。 "
139+
"一个更容易的方式是通过将其编码在此发布包的配置文件 :file:`setup.cfg` 中,“设置并忘记”该选项。"
126140

127141
#: ../../distutils/configfile.rst:100
128142
msgid ""
@@ -136,6 +150,9 @@ msgid ""
136150
"extensions that expect to be built in their installation directory is almost"
137151
" always a bad idea, though.)"
138152
msgstr ""
153+
"这将影响此模块发布包的所有构建,不论你是否显式指定 :command:`build_ext`。 如果你在你的源发布包中包括了 "
154+
":file:`setup.cfg`,它还将影响最终用户的构建 --- 对此选项来说这可能不是个好主意,因为总是原地构建扩展会破坏模块发布包的安装。 "
155+
"不过在某些特殊情况下,模块是在其安装目录中被构建的,因此这可能会是个有用的功能。 (但是,发布预期在其安装目录中被构建的扩展几乎总是一个坏主意。)"
139156

140157
#: ../../distutils/configfile.rst:109
141158
msgid ""
@@ -148,22 +165,26 @@ msgid ""
148165
"very tedious to do on the command-line for every run. Hence, here is a "
149166
"snippet from the Distutils' own :file:`setup.cfg`:"
150167
msgstr ""
168+
"另一个例子:特定的命令会接受许多在多次运行中都不发生变化的选项;例如,:command:`bdist_rpm` 需要知道为创建 RPM 发布包生成 "
169+
"\"spec\" 文件所要求的所有信息。 这些信息有的来自安装脚本,有的由 Distutils 自动生成(例如已安装文件列表)。 但有的则必须作为 "
170+
":command:`bdist_rpm` 的选项提供,每次运行时都在命令行中完成将会非常繁琐。 因此,这里提供 Distutils 本身的 "
171+
":file:`setup.cfg` 中的一段代码:"
151172

152173
#: ../../distutils/configfile.rst:129
153174
msgid ""
154175
"Note that the ``doc_files`` option is simply a whitespace-separated string "
155176
"split across multiple lines for readability."
156-
msgstr ""
177+
msgstr "请注意 ``doc_files`` 选项只是一个空格分隔以提高可读性的多行字符串。"
157178

158179
#: ../../distutils/configfile.rst:136
159180
msgid ":ref:`inst-config-syntax` in \"Installing Python Modules\""
160-
msgstr ""
181+
msgstr "\"安装 Python 模块\" 中的 :ref:`inst-config-syntax`"
161182

162183
#: ../../distutils/configfile.rst:136
163184
msgid ""
164185
"More information on the configuration files is available in the manual for "
165186
"system administrators."
166-
msgstr ""
187+
msgstr "有关配置文件的更多信息可在系统管理员手册中查看。"
167188

168189
#: ../../distutils/configfile.rst:141
169190
msgid "Footnotes"
@@ -173,4 +194,4 @@ msgstr "脚注"
173194
msgid ""
174195
"This ideal probably won't be achieved until auto-configuration is fully "
175196
"supported by the Distutils."
176-
msgstr ""
197+
msgstr "在 Distutils 完全支持自动配置之前,这一理想可能是无法实现的。"

whatsnew/3.9.po

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,6 +1153,10 @@ msgid ""
11531153
":pep:`590` vectorcall protocol. (Contributed by Dong-hee Na, Mark Shannon, "
11541154
"Jeroen Demeyer and Petr Viktorin in :issue:`37207`.)"
11551155
msgstr ""
1156+
"多个 Python 内置类型 (:class:`range`, :class:`tuple`, :class:`set`, "
1157+
":class:`frozenset`, :class:`list`, :class:`dict`) 现在通过使用 :pep:`590` "
1158+
"向量调用协议得到加速。 (由 Dong-hee Na, Mark Shannon, Jeroen Demeyer 和 Petr Viktorin 在 "
1159+
":issue:`37207` 中贡献。)"
11561160

11571161
#: ../../whatsnew/3.9.rst:694
11581162
msgid "Deprecated"

0 commit comments

Comments
 (0)