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

Skip to content

Commit 2d41c12

Browse files
[po] auto sync
1 parent fac82bf commit 2d41c12

3 files changed

Lines changed: 112 additions & 18 deletions

File tree

c-api/import.po

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
# Translators:
77
# 汪心禾 <[email protected]>, 2021
88
# Lordran <[email protected]>, 2021
9-
# Freesand Leo <[email protected]>, 2021
109
# Alpha Du <[email protected]>, 2021
1110
# zeroswan <[email protected]>, 2021
11+
# Freesand Leo <[email protected]>, 2022
1212
#
1313
#, fuzzy
1414
msgid ""
@@ -17,7 +17,7 @@ msgstr ""
1717
"Report-Msgid-Bugs-To: \n"
1818
"POT-Creation-Date: 2022-06-16 06:28+0000\n"
1919
"PO-Revision-Date: 2021-06-28 00:48+0000\n"
20-
"Last-Translator: zeroswan <zeroswan@outlook.com>, 2021\n"
20+
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2022\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"
@@ -43,6 +43,12 @@ msgid ""
4343
"module, or ``NULL`` with an exception set on failure. A failing import of a"
4444
" module doesn't leave the module in :data:`sys.modules`."
4545
msgstr ""
46+
"这是下面 :c:func:`PyImport_ImportModuleEx` 的简化版接口,将 *globals* 和 *locals* 参数设为 "
47+
"``NULL`` 并将 *level* 设为 0。 当 *name* 参数包含一个点号(即指定了一个包的子模块)时,*fromlist* "
48+
"参数会被设为列表 ``['*']`` 这样返回值将为所指定的模块而不像在其他情况下那样为包含模块的最高层级包。 (不幸的是,这在 *name* "
49+
"实际上是指定一个子包而非子模块时将有一个额外的副作用:在包的 ``__all__`` 变量中指定的子模块会被加载。) "
50+
"返回一个对所导入模块的新引用,或是在导入失败时返回 ``NULL`` 并设置一个异常。 模块导入失败同模块不会留 在 "
51+
":data:`sys.modules` 中。"
4652

4753
#: ../../c-api/import.rst:28 ../../c-api/import.rst:89
4854
msgid "This function always uses absolute imports."
@@ -333,3 +339,5 @@ msgid ""
333339
" :c:func:`PyImport_ExtendInittab` must be called before each Python "
334340
"initialization."
335341
msgstr ""
342+
"如果 Python 要被多次初始化,则 :c:func:`PyImport_AppendInittab` 或 "
343+
":c:func:`PyImport_ExtendInittab` 必须在每次 Python 初始化之前调用。"

c-api/stable.po

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ msgid ""
126126
"``python3.dll`` rather than a version-specific library such as "
127127
"``python39.dll``."
128128
msgstr ""
129+
"在 Windows 上,使用稳定 ABI 的扩展应当被链接到 ``python3.dll`` 而不是版本专属的库如 ``python39.dll``。"
129130

130131
#: ../../c-api/stable.rst:64
131132
msgid ""
@@ -135,30 +136,36 @@ msgid ""
135136
"need to ensure that, for example, extensions built with the 3.10+ Limited "
136137
"API are not installed for lower versions of Python."
137138
msgstr ""
139+
"在某些平台上,Python 将查找并载入名称中带有 ``abi3`` 标签的共享库文件 (例如 ``mymodule.abi3.so``)。 "
140+
"它不会检查这样的扩展是否兼容稳定 ABI。 使用方 (或其打包工具) 需要确保这一些,例如,基于 3.10+ 受限 API "
141+
"编译的扩展不可被安装于更低版本的 Python 中。"
138142

139143
#: ../../c-api/stable.rst:71
140144
msgid ""
141145
"All functions in the Stable ABI are present as functions in Python's shared "
142146
"library, not solely as macros. This makes them usable from languages that "
143147
"don't use the C preprocessor."
144148
msgstr ""
149+
"稳定 ABI 中的所有函数都会作为 Python 的共享库中的函数存在,而不仅是作为宏。 这使得它们可以在不使用 C 预处理器的语言中使用。"
145150

146151
#: ../../c-api/stable.rst:77
147152
msgid "Limited API Scope and Performance"
148-
msgstr ""
153+
msgstr "受限 API 的作用域和性能"
149154

150155
#: ../../c-api/stable.rst:79
151156
msgid ""
152157
"The goal for the Limited API is to allow everything that is possible with "
153158
"the full C API, but possibly with a performance penalty."
154-
msgstr ""
159+
msgstr "受限 API 的目标是允许使用在完整 C API 中可用的任何东西,但可能会有性能上的损失。"
155160

156161
#: ../../c-api/stable.rst:82
157162
msgid ""
158163
"For example, while :c:func:`PyList_GetItem` is available, its “unsafe” macro"
159164
" variant :c:func:`PyList_GET_ITEM` is not. The macro can be faster because "
160165
"it can rely on version-specific implementation details of the list object."
161166
msgstr ""
167+
"例如,虽然 :c:func:`PyList_GetItem` 是可用的,但其 “不安全的” 宏版本 :c:func:`PyList_GET_ITEM` "
168+
"则是不可用的。 这个宏的运行速度更快因为它可以利用版本专属的列表对象实现细节。"
162169

163170
#: ../../c-api/stable.rst:87
164171
msgid ""
@@ -167,6 +174,8 @@ msgid ""
167174
"allowing stability as Python's data structures are improved, but possibly "
168175
"reducing performance."
169176
msgstr ""
177+
"在未定义 ``Py_LIMITED_API`` 的情况下,某些 C API 函数将由宏来执行内联或替换。 定义 ``Py_LIMITED_API`` "
178+
"会禁用这样的内联,允许提升 Python 的数据结构稳定性,但有可能降低性能。"
170179

171180
#: ../../c-api/stable.rst:92
172181
msgid ""
@@ -177,10 +186,13 @@ msgid ""
177186
"distributed where a version-specific one is not available – for example, for"
178187
" prereleases of an upcoming Python version."
179188
msgstr ""
189+
"通过省略 ``Py_LIMITED_API`` 定义,可以使基于版本专属的 ABI 来编译受限 API 扩展成为可能。 这能提升其在相应 Python "
190+
"版本上的性能,但也将限制其兼容性。 基于 ``Py_LIMITED_API`` 进行编译将产生一个可在版本专属扩展不可用的场合分发的扩展 – "
191+
"例如,针对即将发布的 Python 版本的预发布包。"
180192

181193
#: ../../c-api/stable.rst:101
182194
msgid "Limited API Caveats"
183-
msgstr ""
195+
msgstr "受限 API 警示"
184196

185197
#: ../../c-api/stable.rst:103
186198
msgid ""
@@ -189,6 +201,8 @@ msgid ""
189201
"only covers definitions, but an API also includes other issues, such as "
190202
"expected semantics."
191203
msgstr ""
204+
"请注意基于 ``Py_LIMITED_API`` 进行编译 *不能* 完全保证代码兼容受限 API 或稳定 ABI。 "
205+
"``Py_LIMITED_API`` 仅涵盖了定义,但是一个 API 还包括其他因素,例如预期的语义等。"
192206

193207
#: ../../c-api/stable.rst:108
194208
msgid ""

0 commit comments

Comments
 (0)