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

Skip to content

Commit 668285b

Browse files
[po] auto sync
1 parent f760e30 commit 668285b

31 files changed

Lines changed: 3528 additions & 3653 deletions

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "91.70%", "updated_at": "2023-10-18T15:57:42Z"}
1+
{"translation": "91.49%", "updated_at": "2023-10-20T14:57:11Z"}

c-api/memory.po

Lines changed: 34 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ msgid ""
1616
msgstr ""
1717
"Project-Id-Version: Python 3.12\n"
1818
"Report-Msgid-Bugs-To: \n"
19-
"POT-Creation-Date: 2023-08-04 14:13+0000\n"
19+
"POT-Creation-Date: 2023-10-20 14:13+0000\n"
2020
"PO-Revision-Date: 2021-06-28 00:49+0000\n"
2121
"Last-Translator: Freesand Leo <[email protected]>, 2023\n"
2222
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -639,19 +639,19 @@ msgid ""
639639
"following fields:"
640640
msgstr "用于描述内存块分配器的结构体。 该结构体下列字段:"
641641

642-
#: ../../c-api/memory.rst:411 ../../c-api/memory.rst:657
642+
#: ../../c-api/memory.rst:411 ../../c-api/memory.rst:658
643643
msgid "Field"
644644
msgstr "域"
645645

646-
#: ../../c-api/memory.rst:411 ../../c-api/memory.rst:657
646+
#: ../../c-api/memory.rst:411 ../../c-api/memory.rst:658
647647
msgid "Meaning"
648648
msgstr "含意"
649649

650-
#: ../../c-api/memory.rst:413 ../../c-api/memory.rst:659
650+
#: ../../c-api/memory.rst:413 ../../c-api/memory.rst:660
651651
msgid "``void *ctx``"
652652
msgstr "``void *ctx``"
653653

654-
#: ../../c-api/memory.rst:413 ../../c-api/memory.rst:659
654+
#: ../../c-api/memory.rst:413 ../../c-api/memory.rst:660
655655
msgid "user context passed as first argument"
656656
msgstr "作为第一个参数传入的用户上下文"
657657

@@ -1070,15 +1070,12 @@ msgstr "pymalloc 分配器"
10701070
msgid ""
10711071
"Python has a *pymalloc* allocator optimized for small objects (smaller or "
10721072
"equal to 512 bytes) with a short lifetime. It uses memory mappings called "
1073-
"\"arenas\" with a fixed size of 256 KiB. It falls back to "
1074-
":c:func:`PyMem_RawMalloc` and :c:func:`PyMem_RawRealloc` for allocations "
1075-
"larger than 512 bytes."
1073+
"\"arenas\" with a fixed size of either 256 KiB on 32-bit platforms or 1 MiB "
1074+
"on 64-bit platforms. It falls back to :c:func:`PyMem_RawMalloc` and "
1075+
":c:func:`PyMem_RawRealloc` for allocations larger than 512 bytes."
10761076
msgstr ""
1077-
"Python 有为具有短生命周期的小对象(小于或等于 512 字节)优化的 *pymalloc* 分配器。它使用固定大小为 256 KiB 的称为 "
1078-
"\"arenas\" 的内存映射。对于大于512字节的分配,它回到使用 :c:func:`PyMem_RawMalloc` 和 "
1079-
":c:func:`PyMem_RawRealloc` 。"
10801077

1081-
#: ../../c-api/memory.rst:632
1078+
#: ../../c-api/memory.rst:633
10821079
msgid ""
10831080
"*pymalloc* is the :ref:`default allocator <default-memory-allocators>` of "
10841081
"the :c:macro:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) and "
@@ -1088,23 +1085,23 @@ msgstr ""
10881085
":c:macro:`PYMEM_DOMAIN_OBJ` (例如: :c:func:`PyObject_Malloc`) 域的 :ref:`默认分配器 "
10891086
"<default-memory-allocators>`。"
10901087

1091-
#: ../../c-api/memory.rst:636
1088+
#: ../../c-api/memory.rst:637
10921089
msgid "The arena allocator uses the following functions:"
10931090
msgstr "arena 分配器使用以下函数:"
10941091

1095-
#: ../../c-api/memory.rst:638
1092+
#: ../../c-api/memory.rst:639
10961093
msgid ":c:func:`!VirtualAlloc` and :c:func:`!VirtualFree` on Windows,"
10971094
msgstr "Windows 上的 :c:func:`!VirtualAlloc` 和 :c:func:`!VirtualFree`,"
10981095

1099-
#: ../../c-api/memory.rst:639
1096+
#: ../../c-api/memory.rst:640
11001097
msgid ":c:func:`!mmap` and :c:func:`!munmap` if available,"
11011098
msgstr ":c:func:`!mmap` 和 :c:func:`!munmap`,如果可用的话,"
11021099

1103-
#: ../../c-api/memory.rst:640
1100+
#: ../../c-api/memory.rst:641
11041101
msgid ":c:func:`malloc` and :c:func:`free` otherwise."
11051102
msgstr "否则, :c:func:`malloc` 和 :c:func:`free` 。"
11061103

1107-
#: ../../c-api/memory.rst:642
1104+
#: ../../c-api/memory.rst:643
11081105
msgid ""
11091106
"This allocator is disabled if Python is configured with the "
11101107
":option:`--without-pymalloc` option. It can also be disabled at runtime "
@@ -1114,86 +1111,86 @@ msgstr ""
11141111
"如果 Python 配置了 :option:`--without-pymalloc` 选项,那么此分配器将被禁用。也可以在运行时使用 "
11151112
":envvar:`PYTHONMALLOC`(例如:``PYTHONMALLOC=malloc``)环境变量来禁用它。"
11161113

1117-
#: ../../c-api/memory.rst:647
1114+
#: ../../c-api/memory.rst:648
11181115
msgid "Customize pymalloc Arena Allocator"
11191116
msgstr "自定义 pymalloc Arena 分配器"
11201117

1121-
#: ../../c-api/memory.rst:653
1118+
#: ../../c-api/memory.rst:654
11221119
msgid ""
11231120
"Structure used to describe an arena allocator. The structure has three "
11241121
"fields:"
11251122
msgstr "用来描述一个 arena 分配器的结构体。这个结构体有三个字段:"
11261123

1127-
#: ../../c-api/memory.rst:661
1124+
#: ../../c-api/memory.rst:662
11281125
msgid "``void* alloc(void *ctx, size_t size)``"
11291126
msgstr "``void* alloc(void *ctx, size_t size)``"
11301127

1131-
#: ../../c-api/memory.rst:661
1128+
#: ../../c-api/memory.rst:662
11321129
msgid "allocate an arena of size bytes"
11331130
msgstr "分配一块 size 字节的区域"
11341131

1135-
#: ../../c-api/memory.rst:663
1132+
#: ../../c-api/memory.rst:664
11361133
msgid "``void free(void *ctx, void *ptr, size_t size)``"
11371134
msgstr "``void free(void *ctx, void *ptr, size_t size)``"
11381135

1139-
#: ../../c-api/memory.rst:663
1136+
#: ../../c-api/memory.rst:664
11401137
msgid "free an arena"
11411138
msgstr "释放一块区域"
11421139

1143-
#: ../../c-api/memory.rst:668
1140+
#: ../../c-api/memory.rst:669
11441141
msgid "Get the arena allocator."
11451142
msgstr "获取 arena 分配器"
11461143

1147-
#: ../../c-api/memory.rst:672
1144+
#: ../../c-api/memory.rst:673
11481145
msgid "Set the arena allocator."
11491146
msgstr "设置 arena 分配器"
11501147

1151-
#: ../../c-api/memory.rst:676
1148+
#: ../../c-api/memory.rst:677
11521149
msgid "tracemalloc C API"
11531150
msgstr "tracemalloc C API"
11541151

1155-
#: ../../c-api/memory.rst:682
1152+
#: ../../c-api/memory.rst:683
11561153
msgid "Track an allocated memory block in the :mod:`tracemalloc` module."
11571154
msgstr "在 :mod:`tracemalloc` 模块中跟踪一个已分配的内存块。"
11581155

1159-
#: ../../c-api/memory.rst:684
1156+
#: ../../c-api/memory.rst:685
11601157
msgid ""
11611158
"Return ``0`` on success, return ``-1`` on error (failed to allocate memory "
11621159
"to store the trace). Return ``-2`` if tracemalloc is disabled."
11631160
msgstr ""
11641161
"成功时返回 ``0``,出错时返回 ``-1`` (无法分配内存来保存跟踪信息)。 如果禁用了 tracemalloc 则返回 ``-2``。"
11651162

1166-
#: ../../c-api/memory.rst:687
1163+
#: ../../c-api/memory.rst:688
11671164
msgid "If memory block is already tracked, update the existing trace."
11681165
msgstr "如果内存块已被跟踪,则更新现有跟踪信息。"
11691166

1170-
#: ../../c-api/memory.rst:691
1167+
#: ../../c-api/memory.rst:692
11711168
msgid ""
11721169
"Untrack an allocated memory block in the :mod:`tracemalloc` module. Do "
11731170
"nothing if the block was not tracked."
11741171
msgstr "在 :mod:`tracemalloc` 模块中取消跟踪一个已分配的内存块。 如果内存块未被跟踪则不执行任何操作。"
11751172

1176-
#: ../../c-api/memory.rst:694
1173+
#: ../../c-api/memory.rst:695
11771174
msgid "Return ``-2`` if tracemalloc is disabled, otherwise return ``0``."
11781175
msgstr "如果 tracemalloc 被禁用则返回 ``-2``,否则返回 ``0``。"
11791176

1180-
#: ../../c-api/memory.rst:700
1177+
#: ../../c-api/memory.rst:701
11811178
msgid "Examples"
11821179
msgstr "例子"
11831180

1184-
#: ../../c-api/memory.rst:702
1181+
#: ../../c-api/memory.rst:703
11851182
msgid ""
11861183
"Here is the example from section :ref:`memoryoverview`, rewritten so that "
11871184
"the I/O buffer is allocated from the Python heap by using the first function"
11881185
" set::"
11891186
msgstr ""
11901187
"以下是来自 :ref:`memoryoverview` 小节的示例,经过重写以使 I/O 缓冲区是通过使用第一个函数集从 Python 堆中分配的::"
11911188

1192-
#: ../../c-api/memory.rst:715
1189+
#: ../../c-api/memory.rst:716
11931190
msgid "The same code using the type-oriented function set::"
11941191
msgstr "使用面向类型函数集的相同代码::"
11951192

1196-
#: ../../c-api/memory.rst:727
1193+
#: ../../c-api/memory.rst:728
11971194
msgid ""
11981195
"Note that in the two examples above, the buffer is always manipulated via "
11991196
"functions belonging to the same set. Indeed, it is required to use the same "
@@ -1206,7 +1203,7 @@ msgstr ""
12061203
"族,以便使得混合不同分配器的风险减至最低。 以下代码序列包含两处错误,其中一个被标记为 *fatal* 因为它混合了两种在不同堆上操作的不同分配器。 "
12071204
"::"
12081205

1209-
#: ../../c-api/memory.rst:742
1206+
#: ../../c-api/memory.rst:743
12101207
msgid ""
12111208
"In addition to the functions aimed at handling raw memory blocks from the "
12121209
"Python heap, objects in Python are allocated and released with "
@@ -1217,7 +1214,7 @@ msgstr ""
12171214
":c:macro:`PyObject_New`、:c:macro:`PyObject_NewVar` 和 :c:func:`PyObject_Del` "
12181215
"进行分配和释放。"
12191216

1220-
#: ../../c-api/memory.rst:746
1217+
#: ../../c-api/memory.rst:747
12211218
msgid ""
12221219
"These will be explained in the next chapter on defining and implementing new"
12231220
" object types in C."

c-api/set.po

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ msgid ""
1212
msgstr ""
1313
"Project-Id-Version: Python 3.12\n"
1414
"Report-Msgid-Bugs-To: \n"
15-
"POT-Creation-Date: 2023-07-29 02:08+0000\n"
15+
"POT-Creation-Date: 2023-10-20 14:13+0000\n"
1616
"PO-Revision-Date: 2021-06-28 00:50+0000\n"
1717
"Last-Translator: Freesand Leo <[email protected]>, 2023\n"
1818
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -223,8 +223,11 @@ msgstr ""
223223
":exc:`KeyError`。 如果 *set* 不是 :class:`set` 或其子类型的实例则会引发 :exc:`SystemError`。"
224224

225225
#: ../../c-api/set.rst:166
226-
msgid "Empty an existing set of all elements."
227-
msgstr "清空现有字典的所有键值对。"
226+
msgid ""
227+
"Empty an existing set of all elements. Return ``0`` on success. Return "
228+
"``-1`` and raise :exc:`SystemError` if *set* is not an instance of "
229+
":class:`set` or its subtype."
230+
msgstr ""
228231

229232
#: ../../c-api/set.rst:11 ../../c-api/set.rst:11
230233
msgid "object"

glossary.po

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ msgid ""
2020
msgstr ""
2121
"Project-Id-Version: Python 3.12\n"
2222
"Report-Msgid-Bugs-To: \n"
23-
"POT-Creation-Date: 2023-08-11 14:13+0000\n"
23+
"POT-Creation-Date: 2023-10-20 14:13+0000\n"
2424
"PO-Revision-Date: 2021-06-28 00:47+0000\n"
2525
"Last-Translator: Freesand Leo <[email protected]>, 2023\n"
2626
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -521,10 +521,9 @@ msgstr "context manager -- 上下文管理器"
521521
#: ../../glossary.rst:250
522522
msgid ""
523523
"An object which controls the environment seen in a :keyword:`with` statement"
524-
" by defining :meth:`__enter__` and :meth:`__exit__` methods. See :pep:`343`."
524+
" by defining :meth:`~object.__enter__` and :meth:`~object.__exit__` methods."
525+
" See :pep:`343`."
525526
msgstr ""
526-
"在 :keyword:`with` 语句中使用,通过定义 :meth:`__enter__` 和 :meth:`__exit__` "
527-
"方法来控制环境状态的对象。参见 :pep:`343`。"
528527

529528
#: ../../glossary.rst:253
530529
msgid "context variable"
@@ -1301,13 +1300,9 @@ msgid ""
13011300
"iterables include all sequence types (such as :class:`list`, :class:`str`, "
13021301
"and :class:`tuple`) and some non-sequence types like :class:`dict`, "
13031302
":term:`file objects <file object>`, and objects of any classes you define "
1304-
"with an :meth:`__iter__` method or with a :meth:`__getitem__` method that "
1305-
"implements :term:`sequence` semantics."
1303+
"with an :meth:`__iter__` method or with a :meth:`~object.__getitem__` method"
1304+
" that implements :term:`sequence` semantics."
13061305
msgstr ""
1307-
"能够逐一返回其成员项的对象。 可迭代对象的例子包括所有序列类型 (如 :class:`list`, :class:`str` 和 "
1308-
":class:`tuple`) 以及某些非序列类型如 :class:`dict`, :term:`文件对象 <file object>` 以及任何定义了"
1309-
" :meth:`__iter__` 方法或实现了 :term:`sequence` 语义的 :meth:`__getitem__` "
1310-
"方法的自定义类的对象。"
13111306

13121307
#: ../../glossary.rst:651
13131308
msgid ""
@@ -2152,31 +2147,23 @@ msgstr "sequence -- 序列"
21522147
#: ../../glossary.rst:1089
21532148
msgid ""
21542149
"An :term:`iterable` which supports efficient element access using integer "
2155-
"indices via the :meth:`__getitem__` special method and defines a "
2150+
"indices via the :meth:`~object.__getitem__` special method and defines a "
21562151
":meth:`__len__` method that returns the length of the sequence. Some built-"
21572152
"in sequence types are :class:`list`, :class:`str`, :class:`tuple`, and "
2158-
":class:`bytes`. Note that :class:`dict` also supports :meth:`__getitem__` "
2159-
"and :meth:`__len__`, but is considered a mapping rather than a sequence "
2160-
"because the lookups use arbitrary :term:`immutable` keys rather than "
2161-
"integers."
2153+
":class:`bytes`. Note that :class:`dict` also supports "
2154+
":meth:`~object.__getitem__` and :meth:`__len__`, but is considered a mapping"
2155+
" rather than a sequence because the lookups use arbitrary :term:`immutable` "
2156+
"keys rather than integers."
21622157
msgstr ""
2163-
"一种 :term:`iterable`,它支持通过 :meth:`__getitem__` "
2164-
"特殊方法来使用整数索引进行高效的元素访问,并定义了一个返回序列长度的 :meth:`__len__` 方法。内置的序列类型有 "
2165-
":class:`list`、:class:`str`、:class:`tuple` 和 :class:`bytes`。注意虽然 "
2166-
":class:`dict` 也支持 :meth:`__getitem__` 和 "
2167-
":meth:`__len__`,但它被认为属于映射而非序列,因为它查找时使用任意的 :term:`immutable` 键而非整数。"
21682158

21692159
#: ../../glossary.rst:1098
21702160
msgid ""
21712161
"The :class:`collections.abc.Sequence` abstract base class defines a much "
2172-
"richer interface that goes beyond just :meth:`__getitem__` and "
2162+
"richer interface that goes beyond just :meth:`~object.__getitem__` and "
21732163
":meth:`__len__`, adding :meth:`count`, :meth:`index`, :meth:`__contains__`, "
21742164
"and :meth:`__reversed__`. Types that implement this expanded interface can "
21752165
"be registered explicitly using :func:`~abc.ABCMeta.register`."
21762166
msgstr ""
2177-
":class:`collections.abc.Sequence` 抽象基类定义了一个更丰富的接口,它在 :meth:`__getitem__` 和 "
2178-
":meth:`__len__` 之外又添加了 :meth:`count`, :meth:`index`, :meth:`__contains__` 和 "
2179-
":meth:`__reversed__`。 实现此扩展接口的类型可以使用 :func:`~abc.ABCMeta.register` 来显式地注册。"
21802167

21812168
#: ../../glossary.rst:1105
21822169
msgid "set comprehension"

library/abc.po

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ msgid ""
1717
msgstr ""
1818
"Project-Id-Version: Python 3.12\n"
1919
"Report-Msgid-Bugs-To: \n"
20-
"POT-Creation-Date: 2023-08-04 14:13+0000\n"
20+
"POT-Creation-Date: 2023-10-20 14:13+0000\n"
2121
"PO-Revision-Date: 2021-06-28 00:54+0000\n"
2222
"Last-Translator: 乐成 王, 2023\n"
2323
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -192,12 +192,9 @@ msgid ""
192192
"Finally, the last line makes ``Foo`` a virtual subclass of ``MyIterable``, "
193193
"even though it does not define an :meth:`~iterator.__iter__` method (it uses"
194194
" the old-style iterable protocol, defined in terms of :meth:`__len__` and "
195-
":meth:`__getitem__`). Note that this will not make ``get_iterator`` "
196-
"available as a method of ``Foo``, so it is provided separately."
195+
":meth:`~object.__getitem__`). Note that this will not make ``get_iterator``"
196+
" available as a method of ``Foo``, so it is provided separately."
197197
msgstr ""
198-
"最后,末尾行使得 ``Foo`` 成为 ``MyIterable`` 的一个虚子类,即便它并没有定义 "
199-
":meth:`~iterator.__iter__` 方法(它使用了以 :meth:`__len__` 和 :meth:`__getitem__` "
200-
"术语定义的旧式可迭代对象协议)。注意这将不会使 ``get_iterator`` 成为对 ``Foo`` 来说可用的方法,所以也另外提供了一个它。"
201198

202199
#: ../../library/abc.rst:163
203200
msgid "The :mod:`abc` module also provides the following decorator:"

0 commit comments

Comments
 (0)