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

Skip to content

Commit 214e391

Browse files
[po] auto sync
1 parent d05e786 commit 214e391

3 files changed

Lines changed: 58 additions & 24 deletions

File tree

c-api/memory.po

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
#
66
# Translators:
77
# Shengjing Zhu <[email protected]>, 2020
8-
# Freesand Leo <[email protected]>, 2020
98
# Meng Du <[email protected]>, 2020
109
# nick <[email protected]>, 2020
1110
# ppcfish <[email protected]>, 2020
1211
# Chao Sean <[email protected]>, 2020
12+
# Freesand Leo <[email protected]>, 2020
1313
#
1414
#, fuzzy
1515
msgid ""
@@ -18,7 +18,7 @@ msgstr ""
1818
"Report-Msgid-Bugs-To: \n"
1919
"POT-Creation-Date: 2020-02-21 12:45+0000\n"
2020
"PO-Revision-Date: 2020-05-30 11:49+0000\n"
21-
"Last-Translator: Chao Sean <SeanChao0804@gmail.com>, 2020\n"
21+
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2020\n"
2222
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2323
"MIME-Version: 1.0\n"
2424
"Content-Type: text/plain; charset=UTF-8\n"
@@ -115,19 +115,27 @@ msgid ""
115115
"in the previous example, the allocated memory for the I/O buffer escapes "
116116
"completely the Python memory manager."
117117
msgstr ""
118+
"然而,在大多数情况下,建议专门从 Python 堆中分配内存,因为后者由 Python 内存管理器控制。例如,当解释器扩展了用 C "
119+
"写的新对象类型时,就必须这样做。使用 Python 堆的另一个原因是希望*通知* Python "
120+
"内存管理器关于扩展模块的内存需求。即使所请求的内存全部只用于内部的、高度特定的目的,将所有的内存请求交给 Python "
121+
"内存管理器能让解释器对其内存占用的整体情况有更准确的了解。因此,在某些情况下,Python "
122+
"内存管理器可能会触发或不触发适当的操作,如垃圾回收、内存压缩或其他预防性操作。请注意,通过使用前面例子中所示的 C 库分配器,为 I/O "
123+
"缓冲区分配的内存会完全不受 Python 内存管理器管理。"
118124

119125
#: ../../c-api/memory.rst:88
120126
msgid ""
121127
"The :envvar:`PYTHONMALLOC` environment variable can be used to configure the"
122128
" memory allocators used by Python."
123-
msgstr ""
129+
msgstr "环境变量 :envvar:`PYTHONMALLOC` 可被用来配置 Python 所使用的内存分配器。"
124130

125131
#: ../../c-api/memory.rst:91
126132
msgid ""
127133
"The :envvar:`PYTHONMALLOCSTATS` environment variable can be used to print "
128134
"statistics of the :ref:`pymalloc memory allocator <pymalloc>` every time a "
129135
"new pymalloc object arena is created, and on shutdown."
130136
msgstr ""
137+
"环境变量 :envvar:`PYTHONMALLOCSTATS` 可以用来在每次创建和关闭新的 pymalloc 对象区域时打印 "
138+
":ref:`pymalloc 内存分配器 <pymalloc>` 的统计数据。"
131139

132140
#: ../../c-api/memory.rst:97
133141
msgid "Raw Memory Interface"
@@ -156,14 +164,15 @@ msgstr ""
156164
msgid ""
157165
"Allocates *n* bytes and returns a pointer of type :c:type:`void\\*` to the "
158166
"allocated memory, or ``NULL`` if the request fails."
159-
msgstr ""
167+
msgstr "分配 *n* 个字节,并返回一个指向分配的内存的 :c:type:`void\\*` 类型指针,如果请求失败,则返回 ``NULL`` 。"
160168

161169
#: ../../c-api/memory.rst:115
162170
msgid ""
163171
"Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, "
164172
"as if ``PyMem_RawMalloc(1)`` had been called instead. The memory will not "
165173
"have been initialized in any way."
166174
msgstr ""
175+
"请求零字节可能返回一个独特的非 ``NULL`` 指针,就像调用了``PyMem_RawMalloc(1)`` 一样。但是内存不会以任何方式被初始化。"
167176

168177
#: ../../c-api/memory.rst:122 ../../c-api/memory.rst:193
169178
#: ../../c-api/memory.rst:295
@@ -172,40 +181,46 @@ msgid ""
172181
"a pointer of type :c:type:`void\\*` to the allocated memory, or ``NULL`` if "
173182
"the request fails. The memory is initialized to zeros."
174183
msgstr ""
184+
"分配 *nelem* 个元素,每个元素的大小为 *elsize* 字节,并返回指向分配的内存的 :c:type:`void*/` "
185+
"类型指针,如果请求失败,则返回``NULL``。内存被初始化为零。"
175186

176187
#: ../../c-api/memory.rst:126
177188
msgid ""
178189
"Requesting zero elements or elements of size zero bytes returns a distinct "
179190
"non-``NULL`` pointer if possible, as if ``PyMem_RawCalloc(1, 1)`` had been "
180191
"called instead."
181-
msgstr ""
192+
msgstr "请求零字节可能返回一个独特的非 ``NULL`` 指针,就像调用了``PyMem_RawCalloc(1, 1)`` 一样。"
182193

183194
#: ../../c-api/memory.rst:135 ../../c-api/memory.rst:206
184195
#: ../../c-api/memory.rst:308
185196
msgid ""
186197
"Resizes the memory block pointed to by *p* to *n* bytes. The contents will "
187198
"be unchanged to the minimum of the old and the new sizes."
188-
msgstr ""
199+
msgstr "将 *p* 指向的内存块大小调整为 *n* 字节。以新旧内存块大小中的最小值为准,其中内容保持不变,"
189200

190201
#: ../../c-api/memory.rst:138
191202
msgid ""
192203
"If *p* is ``NULL``, the call is equivalent to ``PyMem_RawMalloc(n)``; else "
193204
"if *n* is equal to zero, the memory block is resized but is not freed, and "
194205
"the returned pointer is non-``NULL``."
195206
msgstr ""
207+
"如果*p*是``NULL``,则相当于调用 ``PyMem_RawMalloc(n)`` ;如果 *n* 等于 "
208+
"0,则内存块大小会被调整,但不会被释放,返回非 ``NULL`` 指针。"
196209

197210
#: ../../c-api/memory.rst:142
198211
msgid ""
199212
"Unless *p* is ``NULL``, it must have been returned by a previous call to "
200213
":c:func:`PyMem_RawMalloc`, :c:func:`PyMem_RawRealloc` or "
201214
":c:func:`PyMem_RawCalloc`."
202215
msgstr ""
216+
"除非 *p* 是 ``NULL`` ,否则它必须是之前调用 :c:func:`PyMem_RawMalloc` 、 "
217+
":c:func:`PyMem_RawRealloc` 或 :c:func:`PyMem_RawCalloc` 所返回的。"
203218

204219
#: ../../c-api/memory.rst:146
205220
msgid ""
206221
"If the request fails, :c:func:`PyMem_RawRealloc` returns ``NULL`` and *p* "
207222
"remains a valid pointer to the previous memory area."
208-
msgstr ""
223+
msgstr "如果请求失败,:c:func:`PyMem_RawRealloc` 返回 ``NULL`` , *p* 仍然是指向先前内存区域的有效指针。"
209224

210225
#: ../../c-api/memory.rst:152
211226
msgid ""
@@ -214,11 +229,14 @@ msgid ""
214229
":c:func:`PyMem_RawCalloc`. Otherwise, or if ``PyMem_RawFree(p)`` has been "
215230
"called before, undefined behavior occurs."
216231
msgstr ""
232+
"释放 *p* 指向的内存块。除非 *p* 是 ``NULL`` ,否则它必须是之前调用 :c:func:`PyMem_RawMalloc` 、 "
233+
":c:func:`PyMem_RawRealloc` 或 :c:func:`PyMem_RawCalloc` 所返回的指针。否则,或在 "
234+
"``PyMem_RawFree(p)`` 之前已经调用过的情况下,未定义的行为会发生。"
217235

218236
#: ../../c-api/memory.rst:157 ../../c-api/memory.rst:227
219237
#: ../../c-api/memory.rst:329
220238
msgid "If *p* is ``NULL``, no operation is performed."
221-
msgstr ""
239+
msgstr "如果 *p* 是 ``NULL``, 那么什么操作也不会进行。"
222240

223241
#: ../../c-api/memory.rst:163
224242
msgid "Memory Interface"
@@ -229,57 +247,64 @@ msgid ""
229247
"The following function sets, modeled after the ANSI C standard, but "
230248
"specifying behavior when requesting zero bytes, are available for allocating"
231249
" and releasing memory from the Python heap."
232-
msgstr ""
250+
msgstr "以下函数集,仿照 ANSI C 标准,并指定了请求零字节时的行为,可用于从Python堆分配和释放内存。"
233251

234252
#: ../../c-api/memory.rst:169
235253
msgid ""
236254
"The :ref:`default memory allocator <default-memory-allocators>` uses the "
237255
":ref:`pymalloc memory allocator <pymalloc>`."
238256
msgstr ""
257+
":ref:`默认内存分配器 <default-memory-allocators>` 使用了 :ref:`pymalloc 内存分配器 "
258+
"<pymalloc>`."
239259

240260
#: ../../c-api/memory.rst:174 ../../c-api/memory.rst:280
241261
msgid ""
242262
"The :term:`GIL <global interpreter lock>` must be held when using these "
243263
"functions."
244-
msgstr ""
264+
msgstr "在使用这些函数时,必须持有 :term:`全局解释器锁(GIL) <global interpreter lock>` 。"
245265

246266
#: ../../c-api/memory.rst:179
247267
msgid ""
248268
"The default allocator is now pymalloc instead of system :c:func:`malloc`."
249-
msgstr ""
269+
msgstr "现在默认的分配器是 pymalloc 而非系统的 :c:func:`malloc` 。"
250270

251271
#: ../../c-api/memory.rst:186
252272
msgid ""
253273
"Requesting zero bytes returns a distinct non-``NULL`` pointer if possible, "
254274
"as if ``PyMem_Malloc(1)`` had been called instead. The memory will not have "
255275
"been initialized in any way."
256276
msgstr ""
277+
"请求零字节可能返回一个独特的非 ``NULL`` 指针,就像调用了``PyMem_Malloc(1)`` 一样。但是内存不会以任何方式被初始化。"
257278

258279
#: ../../c-api/memory.rst:197
259280
msgid ""
260281
"Requesting zero elements or elements of size zero bytes returns a distinct "
261282
"non-``NULL`` pointer if possible, as if ``PyMem_Calloc(1, 1)`` had been "
262283
"called instead."
263-
msgstr ""
284+
msgstr "请求零字节可能返回一个独特的非 ``NULL`` 指针,就像调用了``PyMem_Calloc(1, 1)`` 一样。"
264285

265286
#: ../../c-api/memory.rst:209
266287
msgid ""
267288
"If *p* is ``NULL``, the call is equivalent to ``PyMem_Malloc(n)``; else if "
268289
"*n* is equal to zero, the memory block is resized but is not freed, and the "
269290
"returned pointer is non-``NULL``."
270291
msgstr ""
292+
"如果*p*是``NULL``,则相当于调用 ``PyMem_Malloc(n)`` ;如果 *n* 等于 0,则内存块大小会被调整,但不会被释放,返回非"
293+
" ``NULL`` 指针。"
271294

272295
#: ../../c-api/memory.rst:213
273296
msgid ""
274297
"Unless *p* is ``NULL``, it must have been returned by a previous call to "
275298
":c:func:`PyMem_Malloc`, :c:func:`PyMem_Realloc` or :c:func:`PyMem_Calloc`."
276299
msgstr ""
300+
"除非 *p* 是 ``NULL`` ,否则它必须是之前调用 :c:func:`PyMem_Malloc` 、 "
301+
":c:func:`PyMem_Realloc` 或 :c:func:`PyMem_Calloc` 所返回的。"
277302

278303
#: ../../c-api/memory.rst:216
279304
msgid ""
280305
"If the request fails, :c:func:`PyMem_Realloc` returns ``NULL`` and *p* "
281306
"remains a valid pointer to the previous memory area."
282-
msgstr ""
307+
msgstr "如果请求失败,:c:func:`PyMem_Realloc` 返回 ``NULL`` , *p* 仍然是指向先前内存区域的有效指针。"
283308

284309
#: ../../c-api/memory.rst:222
285310
msgid ""
@@ -288,12 +313,15 @@ msgid ""
288313
":c:func:`PyMem_Calloc`. Otherwise, or if ``PyMem_Free(p)`` has been called "
289314
"before, undefined behavior occurs."
290315
msgstr ""
316+
"释放 *p* 指向的内存块。除非 *p* 是 ``NULL`` ,否则它必须是之前调用 :c:func:`PyMem_Malloc` 、 "
317+
":c:func:`PyMem_Realloc` 或 :c:func:`PyMem_Calloc` 所返回的指针。否则,或在 "
318+
"``PyMem_Free(p)`` 之前已经调用过的情况下,未定义的行为会发生。"
291319

292320
#: ../../c-api/memory.rst:229
293321
msgid ""
294322
"The following type-oriented macros are provided for convenience. Note that"
295323
" *TYPE* refers to any C type."
296-
msgstr ""
324+
msgstr "以下面向类型的宏为方便而提供。 注意 *TYPE* 可以指任何 C 类型。"
297325

298326
#: ../../c-api/memory.rst:235
299327
msgid ""

library/asyncio-stream.po

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
# walkinrain <[email protected]>, 2020
88
# nick <[email protected]>, 2020
99
# kevin wong <[email protected]>, 2020
10-
# li beite <[email protected]>, 2020
1110
# Freesand Leo <[email protected]>, 2020
11+
# li beite <[email protected]>, 2020
1212
#
1313
#, fuzzy
1414
msgid ""
@@ -17,7 +17,7 @@ msgstr ""
1717
"Report-Msgid-Bugs-To: \n"
1818
"POT-Creation-Date: 2020-02-09 12:40+0000\n"
1919
"PO-Revision-Date: 2020-05-30 11:56+0000\n"
20-
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2020\n"
20+
"Last-Translator: li beite <lbt012345@gmail.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"
@@ -225,31 +225,33 @@ msgstr "如果读到EOF,且内部缓冲区为空,则返回一个空的 ``byt
225225

226226
#: ../../library/asyncio-stream.rst:189
227227
msgid "Read exactly *n* bytes."
228-
msgstr ""
228+
msgstr "精准读取 *n* 个 bytes,不能超过也不能少于。"
229229

230230
#: ../../library/asyncio-stream.rst:191
231231
msgid ""
232232
"Raise an :exc:`IncompleteReadError` if EOF is reached before *n* can be "
233233
"read. Use the :attr:`IncompleteReadError.partial` attribute to get the "
234234
"partially read data."
235235
msgstr ""
236+
"如果在读取完 *n* 个byte之前读取到EOF,则会抛出 :exc:`IncompleteReadError` 异常。使用 "
237+
":attr:`IncompleteReadError.partial` 属性来获取到达流结束之前读取的 bytes 字符串。"
236238

237239
#: ../../library/asyncio-stream.rst:197
238240
msgid "Read data from the stream until *separator* is found."
239-
msgstr ""
241+
msgstr "从流中读取数据直至遇到 *分隔符* "
240242

241243
#: ../../library/asyncio-stream.rst:199
242244
msgid ""
243245
"On success, the data and separator will be removed from the internal buffer "
244246
"(consumed). Returned data will include the separator at the end."
245-
msgstr ""
247+
msgstr "成功后,数据和指定的separator将从内部缓冲区中删除(或者说被消费掉)。返回的数据将包括在末尾的指定separator。"
246248

247249
#: ../../library/asyncio-stream.rst:203
248250
msgid ""
249251
"If the amount of data read exceeds the configured stream limit, a "
250252
":exc:`LimitOverrunError` exception is raised, and the data is left in the "
251253
"internal buffer and can be read again."
252-
msgstr ""
254+
msgstr "如果读取的数据量超过了配置的流限制,将引发 :exc:`LimitOverrunError` 异常,数据将留在内部缓冲区中并可以再次读取。"
253255

254256
#: ../../library/asyncio-stream.rst:207
255257
msgid ""
@@ -258,21 +260,23 @@ msgid ""
258260
"reset. The :attr:`IncompleteReadError.partial` attribute may contain a "
259261
"portion of the separator."
260262
msgstr ""
263+
"如果在找到完整的separator之前到达EOF,则会引发 :exc:`IncompleteReadError` 异常,并重置内部缓冲区。 "
264+
":attr:`IncompleteReadError.partial` 属性可能包含指定separator的一部分。"
261265

262266
#: ../../library/asyncio-stream.rst:216
263267
msgid ""
264268
"Return ``True`` if the buffer is empty and :meth:`feed_eof` was called."
265-
msgstr ""
269+
msgstr "如果缓冲区为空并且 :meth:`feed_eof` 被调用,则返回 ``True`` 。 "
266270

267271
#: ../../library/asyncio-stream.rst:221
268272
msgid "StreamWriter"
269-
msgstr ""
273+
msgstr "StreamWriter"
270274

271275
#: ../../library/asyncio-stream.rst:225
272276
msgid ""
273277
"Represents a writer object that provides APIs to write data to the IO "
274278
"stream."
275-
msgstr ""
279+
msgstr "这个类表示一个写入器对象,该对象提供api以便于写数据至IO流中。"
276280

277281
#: ../../library/asyncio-stream.rst:228
278282
msgid ""

library/logging.po

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1102,12 +1102,14 @@ msgid ""
11021102
"set using :func:`getLogRecordFactory` and :func:`setLogRecordFactory` (see "
11031103
"this for the factory's signature)."
11041104
msgstr ""
1105+
"通过提供用于创建记录的工厂方法已使得 :class:`LogRecord` 的创建更易于配置。 该工厂方法可使用 "
1106+
":func:`getLogRecordFactory` 和 :func:`setLogRecordFactory` 来设置(在此可查看工厂方法的签名)。"
11051107

11061108
#: ../../library/logging.rst:733
11071109
msgid ""
11081110
"This functionality can be used to inject your own values into a "
11091111
":class:`LogRecord` at creation time. You can use the following pattern::"
1110-
msgstr ""
1112+
msgstr "在创建时可使用此功能将你自己的值注入 :class:`LogRecord`。 你可以使用以下模式::"
11111113

11121114
#: ../../library/logging.rst:745
11131115
msgid ""

0 commit comments

Comments
 (0)