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

Skip to content

Commit a9cc648

Browse files
[po] auto sync
1 parent 72f87f2 commit a9cc648

File tree

8 files changed

+161
-202
lines changed

8 files changed

+161
-202
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "94.15%", "updated_at": "2024-12-06T14:47:48Z"}
1+
{"translation": "94.11%", "updated_at": "2024-12-06T15:47:29Z"}

c-api/stable.po

Lines changed: 41 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,16 @@
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
66
# Translators:
7-
# Dai Xu <[email protected]>, 2022
8-
# Freesand Leo <[email protected]>, 2024
7+
# Rafael Fontenelle <[email protected]>, 2024
98
#
109
#, fuzzy
1110
msgid ""
1211
msgstr ""
1312
"Project-Id-Version: Python 3.12\n"
1413
"Report-Msgid-Bugs-To: \n"
15-
"POT-Creation-Date: 2024-01-19 14:14+0000\n"
16-
"PO-Revision-Date: 2021-06-28 00:50+0000\n"
17-
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2024\n"
14+
"POT-Creation-Date: 2024-12-06 14:52+0000\n"
15+
"PO-Revision-Date: 2024-05-11 00:32+0000\n"
16+
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2024\n"
1817
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1918
"MIME-Version: 1.0\n"
2019
"Content-Type: text/plain; charset=UTF-8\n"
@@ -130,12 +129,10 @@ msgstr "受限 C API"
130129
#: ../../c-api/stable.rst:67
131130
msgid ""
132131
"Python 3.2 introduced the *Limited API*, a subset of Python's C API. "
133-
"Extensions that only use the Limited API can be compiled once and work with "
134-
"multiple versions of Python. Contents of the Limited API are :ref:`listed "
135-
"below <limited-api-list>`."
132+
"Extensions that only use the Limited API can be compiled once and be loaded "
133+
"on multiple versions of Python. Contents of the Limited API are :ref:`listed"
134+
" below <limited-api-list>`."
136135
msgstr ""
137-
"Python 3.2 引入了 *受限 API*,它是 Python 的 C API 的一个子集。 只使用受限 API 扩展可以一次编译即适用于多个 "
138-
"Python 版本。 受限 API 的内容 :ref:`如下所示 <limited-api-list>`。"
139136

140137
#: ../../c-api/stable.rst:74
141138
msgid ""
@@ -147,12 +144,9 @@ msgstr "请在包括 ``Python.h`` 之前定义这个宏以选择只使用受限
147144
msgid ""
148145
"Define ``Py_LIMITED_API`` to the value of :c:macro:`PY_VERSION_HEX` "
149146
"corresponding to the lowest Python version your extension supports. The "
150-
"extension will work without recompilation with all Python 3 releases from "
151-
"the specified one onward, and can use Limited API introduced up to that "
152-
"version."
147+
"extension will be ABI-compatible with all Python 3 releases from the "
148+
"specified one onward, and can use Limited API introduced up to that version."
153149
msgstr ""
154-
"将 ``Py_LIMITED_API`` 定义为与你的扩展所支持的最低 Python 版本的 :c:macro:`PY_VERSION_HEX` 的值。"
155-
" 扩展将无需重编译即可适用于从该指定版本开始的所有 Python 3 发布版,并可使用到该版本为止所引入的受限 API。"
156150

157151
#: ../../c-api/stable.rst:83
158152
msgid ""
@@ -178,10 +172,19 @@ msgstr "稳定 ABI"
178172
#: ../../c-api/stable.rst:96
179173
msgid ""
180174
"To enable this, Python provides a *Stable ABI*: a set of symbols that will "
181-
"remain compatible across Python 3.x versions."
182-
msgstr "为启用此特性,Python 提供了一个 *稳定 ABI*: 将能跨 Python 3.x 版本保持兼容的一组符号。"
175+
"remain ABI-compatible across Python 3.x versions."
176+
msgstr ""
183177

184-
#: ../../c-api/stable.rst:99
178+
#: ../../c-api/stable.rst:101
179+
msgid ""
180+
"The Stable ABI prevents ABI issues, like linker errors due to missing "
181+
"symbols or data corruption due to changes in structure layouts or function "
182+
"signatures. However, other changes in Python can change the *behavior* of "
183+
"extensions. See Python's Backwards Compatibility Policy (:pep:`387`) for "
184+
"details."
185+
msgstr ""
186+
187+
#: ../../c-api/stable.rst:107
185188
msgid ""
186189
"The Stable ABI contains symbols exposed in the :ref:`Limited API <limited-c-"
187190
"api>`, but also other ones – for example, functions necessary to support "
@@ -190,15 +193,15 @@ msgstr ""
190193
"稳定 ABI 包含在 :ref:`受限 API <limited-c-api>` 中对外公开的符号,但还包含其他符号 – 例如,为支持旧版本受限 API"
191194
" 所需的函数。"
192195

193-
#: ../../c-api/stable.rst:103
196+
#: ../../c-api/stable.rst:111
194197
msgid ""
195198
"On Windows, extensions that use the Stable ABI should be linked against "
196199
"``python3.dll`` rather than a version-specific library such as "
197200
"``python39.dll``."
198201
msgstr ""
199202
"在 Windows 上,使用稳定 ABI 的扩展应当被链接到 ``python3.dll`` 而不是版本专属的库如 ``python39.dll``。"
200203

201-
#: ../../c-api/stable.rst:107
204+
#: ../../c-api/stable.rst:115
202205
msgid ""
203206
"On some platforms, Python will look for and load shared library files named "
204207
"with the ``abi3`` tag (e.g. ``mymodule.abi3.so``). It does not check if such"
@@ -210,25 +213,25 @@ msgstr ""
210213
"它不会检查这样的扩展是否兼容稳定 ABI。 使用方 (或其打包工具) 需要确保这一些,例如,基于 3.10+ 受限 API "
211214
"编译的扩展不可被安装于更低版本的 Python 中。"
212215

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

221-
#: ../../c-api/stable.rst:120
224+
#: ../../c-api/stable.rst:128
222225
msgid "Limited API Scope and Performance"
223226
msgstr "受限 API 的作用域和性能"
224227

225-
#: ../../c-api/stable.rst:122
228+
#: ../../c-api/stable.rst:130
226229
msgid ""
227230
"The goal for the Limited API is to allow everything that is possible with "
228231
"the full C API, but possibly with a performance penalty."
229232
msgstr "受限 API 的目标是允许使用在完整 C API 中可用的任何东西,但可能会有性能上的损失。"
230233

231-
#: ../../c-api/stable.rst:125
234+
#: ../../c-api/stable.rst:133
232235
msgid ""
233236
"For example, while :c:func:`PyList_GetItem` is available, its “unsafe” macro"
234237
" variant :c:func:`PyList_GET_ITEM` is not. The macro can be faster because "
@@ -237,7 +240,7 @@ msgstr ""
237240
"例如,虽然 :c:func:`PyList_GetItem` 是可用的,但其 “不安全的” 宏版本 :c:func:`PyList_GET_ITEM` "
238241
"则是不可用的。 这个宏的运行速度更快因为它可以利用版本专属的列表对象实现细节。"
239242

240-
#: ../../c-api/stable.rst:130
243+
#: ../../c-api/stable.rst:138
241244
msgid ""
242245
"Without ``Py_LIMITED_API`` defined, some C API functions are inlined or "
243246
"replaced by macros. Defining ``Py_LIMITED_API`` disables this inlining, "
@@ -247,7 +250,7 @@ msgstr ""
247250
"在未定义 ``Py_LIMITED_API`` 的情况下,某些 C API 函数将由宏来执行内联或替换。 定义 ``Py_LIMITED_API`` "
248251
"会禁用这样的内联,允许提升 Python 的数据结构稳定性,但有可能降低性能。"
249252

250-
#: ../../c-api/stable.rst:135
253+
#: ../../c-api/stable.rst:143
251254
msgid ""
252255
"By leaving out the ``Py_LIMITED_API`` definition, it is possible to compile "
253256
"a Limited API extension with a version-specific ABI. This can improve "
@@ -260,11 +263,11 @@ msgstr ""
260263
"版本上的性能,但也将限制其兼容性。 基于 ``Py_LIMITED_API`` 进行编译将产生一个可在版本专属扩展不可用的场合分发的扩展 – "
261264
"例如,针对即将发布的 Python 版本的预发布包。"
262265

263-
#: ../../c-api/stable.rst:144
266+
#: ../../c-api/stable.rst:152
264267
msgid "Limited API Caveats"
265268
msgstr "受限 API 警示"
266269

267-
#: ../../c-api/stable.rst:146
270+
#: ../../c-api/stable.rst:154
268271
msgid ""
269272
"Note that compiling with ``Py_LIMITED_API`` is *not* a complete guarantee "
270273
"that code conforms to the :ref:`Limited API <limited-c-api>` or the "
@@ -275,7 +278,7 @@ msgstr ""
275278
"或 :ref:`稳定 ABI <stable-abi>`。 ``Py_LIMITED_API`` 仅仅涵盖定义部分,但一个 API "
276279
"还包括其他因素,如预期的语义等。"
277280

278-
#: ../../c-api/stable.rst:151
281+
#: ../../c-api/stable.rst:159
279282
msgid ""
280283
"One issue that ``Py_LIMITED_API`` does not guard against is calling a "
281284
"function with arguments that are invalid in a lower Python version. For "
@@ -288,20 +291,20 @@ msgstr ""
288291
" 作为参数的函数。 在 Python 3.9 中,``NULL`` 现在会选择一个默认行为,但在 Python 3.8 中,该参数将被直接使用,导致一个"
289292
" ``NULL`` 引用被崩溃。 类似的参数也适用于结构体的字段。"
290293

291-
#: ../../c-api/stable.rst:158
294+
#: ../../c-api/stable.rst:166
292295
msgid ""
293296
"Another issue is that some struct fields are currently not hidden when "
294297
"``Py_LIMITED_API`` is defined, even though they're part of the Limited API."
295298
msgstr "另一个问题是当定义了 ``Py_LIMITED_API`` 时某些结构体字段目前不会被隐藏,即使它们是受限 API 的一部分。"
296299

297-
#: ../../c-api/stable.rst:161
300+
#: ../../c-api/stable.rst:169
298301
msgid ""
299302
"For these reasons, we recommend testing an extension with *all* minor Python"
300303
" versions it supports, and preferably to build with the *lowest* such "
301304
"version."
302305
msgstr "出于这些原因,我们建议用要支持的 *所有* Python 小版本号来测试一个扩展,并最好是用其中 *最低* 的版本来编译它。"
303306

304-
#: ../../c-api/stable.rst:164
307+
#: ../../c-api/stable.rst:172
305308
msgid ""
306309
"We also recommend reviewing documentation of all used API to check if it is "
307310
"explicitly part of the Limited API. Even with ``Py_LIMITED_API`` defined, a "
@@ -311,7 +314,7 @@ msgstr ""
311314
"我们还建议查看所使用 API 的全部文档以检查其是否显式指明为受限 API 的一部分。 即使定义了 "
312315
"``Py_LIMITED_API``,少数私有声明还是会出于技术原因(或者甚至是作为程序缺陷在无意中)被暴露出来。"
313316

314-
#: ../../c-api/stable.rst:169
317+
#: ../../c-api/stable.rst:177
315318
msgid ""
316319
"Also note that the Limited API is not necessarily stable: compiling with "
317320
"``Py_LIMITED_API`` with Python 3.8 means that the extension will run with "
@@ -323,11 +326,11 @@ msgstr ""
323326
"3.12 上运行,但它将不一定能用 Python 3.12 *编译*。 特别地,在稳定 ABI 保持稳定的情况下,部分受限 API "
324327
"可能会被弃用并被移除。"
325328

326-
#: ../../c-api/stable.rst:179
329+
#: ../../c-api/stable.rst:187
327330
msgid "Platform Considerations"
328331
msgstr "平台的考虑"
329332

330-
#: ../../c-api/stable.rst:181
333+
#: ../../c-api/stable.rst:189
331334
msgid ""
332335
"ABI stability depends not only on Python, but also on the compiler used, "
333336
"lower-level libraries and compiler options. For the purposes of the "
@@ -337,7 +340,7 @@ msgstr ""
337340
"ABI 的稳定性不仅取决于 Python,取决于所使用的编译器、低层级库和编译器选项等。 对于 :ref:`稳定 ABI <stable-abi>` "
338341
"的目标来说,这些细节定义了一个 “平台”。 它们通常会依赖于 OS 类型和处理器架构等。"
339342

340-
#: ../../c-api/stable.rst:186
343+
#: ../../c-api/stable.rst:194
341344
msgid ""
342345
"It is the responsibility of each particular distributor of Python to ensure "
343346
"that all Python versions on a particular platform are built in a way that "
@@ -347,11 +350,11 @@ msgstr ""
347350
"确保在特定平台上的所有 Python 版本都以不破坏稳定 ABI 的方式构建是每个特定 Python 分发方的责任。 来自 ``python.org``"
348351
" 以及许多第三方分发商的 Windows 和 macOS 发布版都必于这种情况。"
349352

350-
#: ../../c-api/stable.rst:196
353+
#: ../../c-api/stable.rst:204
351354
msgid "Contents of Limited API"
352355
msgstr "受限 API 的内容"
353356

354-
#: ../../c-api/stable.rst:199
357+
#: ../../c-api/stable.rst:207
355358
msgid ""
356359
"Currently, the :ref:`Limited API <limited-c-api>` includes the following "
357360
"items:"

howto/gdb_helpers.po

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.12\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2024-11-15 14:53+0000\n"
14+
"POT-Creation-Date: 2024-12-06 14:52+0000\n"
1515
"PO-Revision-Date: 2024-05-11 00:32+0000\n"
1616
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -362,16 +362,15 @@ msgstr ""
362362
#: ../../howto/gdb_helpers.rst:183
363363
msgid ""
364364
"The internal structure can be revealed with a cast to :c:expr:`PyLongObject "
365-
"*`:"
366-
msgstr "内部结构可通过投射为 :c:expr:`PyLongObject *` 来显示:"
365+
"*`::"
366+
msgstr ""
367367

368368
#: ../../howto/gdb_helpers.rst:185
369369
msgid ""
370-
"(gdb) p *(PyLongObject*)some_python_integer $5 = {ob_base = {ob_base = "
371-
"{ob_refcnt = 8, ob_type = 0x3dad39f5e0}, ob_size = 1}, ob_digit = {42}}"
370+
"(gdb) p *(PyLongObject*)some_python_integer\n"
371+
"$5 = {ob_base = {ob_base = {ob_refcnt = 8, ob_type = 0x3dad39f5e0}, ob_size = 1},\n"
372+
"ob_digit = {42}}"
372373
msgstr ""
373-
"(gdb) p *(PyLongObject*)some_python_integer $5 = {ob_base = {ob_base = "
374-
"{ob_refcnt = 8, ob_type = 0x3dad39f5e0}, ob_size = 1}, ob_digit = {42}}"
375374

376375
#: ../../howto/gdb_helpers.rst:189
377376
msgid ""

0 commit comments

Comments
 (0)