Skip to content

Commit 353c4c6

Browse files
[po] auto sync
1 parent 50e3755 commit 353c4c6

File tree

8 files changed

+128
-432
lines changed

8 files changed

+128
-432
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "94.82%", "updated_at": "2024-12-05T06:57:01Z"}
1+
{"translation": "94.78%", "updated_at": "2024-12-06T14:56:09Z"}

c-api/stable.po

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ msgid ""
1212
msgstr ""
1313
"Project-Id-Version: Python 3.13\n"
1414
"Report-Msgid-Bugs-To: \n"
15-
"POT-Creation-Date: 2024-10-04 14:17+0000\n"
15+
"POT-Creation-Date: 2024-12-06 14:18+0000\n"
1616
"PO-Revision-Date: 2021-06-28 00:50+0000\n"
1717
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2024\n"
1818
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -130,12 +130,10 @@ msgstr "受限 C API"
130130
#: ../../c-api/stable.rst:67
131131
msgid ""
132132
"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>`."
133+
"Extensions that only use the Limited API can be compiled once and be loaded "
134+
"on multiple versions of Python. Contents of the Limited API are :ref:`listed"
135+
" below <limited-api-list>`."
136136
msgstr ""
137-
"Python 3.2 引入了 *受限 API*,它是 Python 的 C API 的一个子集。 只使用受限 API 扩展可以一次编译即适用于多个 "
138-
"Python 版本。 受限 API 的内容 :ref:`如下所示 <limited-api-list>`。"
139137

140138
#: ../../c-api/stable.rst:74
141139
msgid ""
@@ -147,12 +145,9 @@ msgstr "请在包括 ``Python.h`` 之前定义这个宏以选择只使用受限
147145
msgid ""
148146
"Define ``Py_LIMITED_API`` to the value of :c:macro:`PY_VERSION_HEX` "
149147
"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."
148+
"extension will be ABI-compatible with all Python 3 releases from the "
149+
"specified one onward, and can use Limited API introduced up to that version."
153150
msgstr ""
154-
"将 ``Py_LIMITED_API`` 定义为与你的扩展所支持的最低 Python 版本的 :c:macro:`PY_VERSION_HEX` 的值。"
155-
" 扩展将无需重编译即可适用于从该指定版本开始的所有 Python 3 发布版,并可使用到该版本为止所引入的受限 API。"
156151

157152
#: ../../c-api/stable.rst:83
158153
msgid ""
@@ -178,10 +173,19 @@ msgstr "稳定 ABI"
178173
#: ../../c-api/stable.rst:96
179174
msgid ""
180175
"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 版本保持兼容的一组符号。"
176+
"remain ABI-compatible across Python 3.x versions."
177+
msgstr ""
183178

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

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

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

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

221-
#: ../../c-api/stable.rst:120
225+
#: ../../c-api/stable.rst:128
222226
msgid "Limited API Scope and Performance"
223227
msgstr "受限 API 的作用域和性能"
224228

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

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

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

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

263-
#: ../../c-api/stable.rst:144
267+
#: ../../c-api/stable.rst:152
264268
msgid "Limited API Caveats"
265269
msgstr "受限 API 警示"
266270

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

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

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

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

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

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

326-
#: ../../c-api/stable.rst:179
330+
#: ../../c-api/stable.rst:187
327331
msgid "Platform Considerations"
328332
msgstr "平台的考虑"
329333

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

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

350-
#: ../../c-api/stable.rst:196
354+
#: ../../c-api/stable.rst:204
351355
msgid "Contents of Limited API"
352356
msgstr "受限 API 的内容"
353357

354-
#: ../../c-api/stable.rst:199
358+
#: ../../c-api/stable.rst:207
355359
msgid ""
356360
"Currently, the :ref:`Limited API <limited-c-api>` includes the following "
357361
"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.13\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2024-11-12 08:36+0000\n"
14+
"POT-Creation-Date: 2024-12-06 14:18+0000\n"
1515
"PO-Revision-Date: 2024-02-25 01:11+0000\n"
1616
"Last-Translator: Freesand Leo <yuqinju@163.com>, 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 ""

library/asyncio-sync.po

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ msgid ""
1313
msgstr ""
1414
"Project-Id-Version: Python 3.13\n"
1515
"Report-Msgid-Bugs-To: \n"
16-
"POT-Creation-Date: 2024-09-20 14:17+0000\n"
16+
"POT-Creation-Date: 2024-12-06 14:18+0000\n"
1717
"PO-Revision-Date: 2021-06-28 00:55+0000\n"
1818
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2024\n"
1919
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -424,11 +424,10 @@ msgstr ""
424424
#: ../../library/asyncio-sync.rst:260
425425
msgid ""
426426
"Note that a task *may* return from this call spuriously, which is why the "
427-
"caller should always re-check the state and be prepared to :meth:`wait` "
428-
"again. For this reason, you may prefer to use :meth:`wait_for` instead."
427+
"caller should always re-check the state and be prepared to "
428+
":meth:`~Condition.wait` again. For this reason, you may prefer to use "
429+
":meth:`~Condition.wait_for` instead."
429430
msgstr ""
430-
"请注意,*有可能* 虚假地从此调用返回一个任务,为此调用者应始终重新检查状态并准备好再次执行 :meth:`wait`。 出于此理由,你可能会更愿意改用"
431-
" :meth:`wait_for`。"
432431

433432
#: ../../library/asyncio-sync.rst:267
434433
msgid "Wait until a predicate becomes *true*."
@@ -437,11 +436,9 @@ msgstr "等待直到目标值变为 *true*。"
437436
#: ../../library/asyncio-sync.rst:269
438437
msgid ""
439438
"The predicate must be a callable which result will be interpreted as a "
440-
"boolean value. The method will repeatedly :meth:`wait` until the predicate "
441-
"evaluates to *true*. The final value is the return value."
439+
"boolean value. The method will repeatedly :meth:`~Condition.wait` until the"
440+
" predicate evaluates to *true*. The final value is the return value."
442441
msgstr ""
443-
"目标必须为一个可调用对象,其结果将被解读为一个布尔值。 此方法将重复地执行 :meth:`wait` 直到目标的结果值为 *true*。 "
444-
"最终的值将被作为返回值。"
445442

446443
#: ../../library/asyncio-sync.rst:276
447444
msgid "Semaphore"
@@ -705,11 +702,10 @@ msgstr "如果屏障已被破坏则最好的是让其保持原状并创建一个
705702
#: ../../library/asyncio-sync.rst:436
706703
msgid ""
707704
"Put the barrier into a broken state. This causes any active or future calls"
708-
" to :meth:`wait` to fail with the :class:`BrokenBarrierError`. Use this for "
709-
"example if one of the tasks needs to abort, to avoid infinite waiting tasks."
705+
" to :meth:`~Barrier.wait` to fail with the :class:`BrokenBarrierError`. Use "
706+
"this for example if one of the tasks needs to abort, to avoid infinite "
707+
"waiting tasks."
710708
msgstr ""
711-
"使屏障处于已破坏状态。 这会导致任何现有和未来对 :meth:`wait` 的调用失败并引发 :class:`BrokenBarrierError`。 "
712-
"例如可以在需要中止某个任务时使用此方法,以避免任务无限等待。"
713709

714710
#: ../../library/asyncio-sync.rst:443
715711
msgid "The number of tasks required to pass the barrier."

library/collections.po

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ msgid ""
1919
msgstr ""
2020
"Project-Id-Version: Python 3.13\n"
2121
"Report-Msgid-Bugs-To: \n"
22-
"POT-Creation-Date: 2024-11-29 14:18+0000\n"
22+
"POT-Creation-Date: 2024-12-06 14:18+0000\n"
2323
"PO-Revision-Date: 2021-06-28 00:56+0000\n"
2424
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2024\n"
2525
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -1317,16 +1317,12 @@ msgid ""
13171317
"When each key is encountered for the first time, it is not already in the "
13181318
"mapping; so an entry is automatically created using the "
13191319
":attr:`~defaultdict.default_factory` function which returns an empty "
1320-
":class:`list`. The :meth:`list.append` operation then attaches the value to"
1321-
" the new list. When keys are encountered again, the look-up proceeds "
1322-
"normally (returning the list for that key) and the :meth:`list.append` "
1320+
":class:`list`. The :meth:`!list.append` operation then attaches the value "
1321+
"to the new list. When keys are encountered again, the look-up proceeds "
1322+
"normally (returning the list for that key) and the :meth:`!list.append` "
13231323
"operation adds another value to the list. This technique is simpler and "
13241324
"faster than an equivalent technique using :meth:`dict.setdefault`:"
13251325
msgstr ""
1326-
"当每个键第一次遇见时,它还没有在字典里面,所以自动创建该条目,即调用 :attr:`~defaultdict.default_factory` "
1327-
"方法,返回一个空的 :class:`list`。 :meth:`list.append` "
1328-
"操作添加值到这个新的列表里。当再次存取该键时,就正常操作,:meth:`list.append` 添加另一个值到列表中。这个计数比它的等价方法 "
1329-
":meth:`dict.setdefault` 要快速和简单:"
13301326

13311327
#: ../../library/collections.rst:799
13321328
msgid ""

0 commit comments

Comments
 (0)