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

Skip to content

Commit c56654b

Browse files
[po] auto sync
1 parent 96039a7 commit c56654b

3 files changed

Lines changed: 34 additions & 13 deletions

File tree

c-api/memory.po

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -817,57 +817,57 @@ msgstr ""
817817

818818
#: ../../c-api/memory.rst:496
819819
msgid "The arena allocator uses the following functions:"
820-
msgstr ""
820+
msgstr "arena 分配器使用以下函数:"
821821

822822
#: ../../c-api/memory.rst:498
823823
msgid ":c:func:`VirtualAlloc` and :c:func:`VirtualFree` on Windows,"
824-
msgstr ""
824+
msgstr "Windows 上的 :c:func:`VirtualAlloc` and :c:func:`VirtualFree` ,"
825825

826826
#: ../../c-api/memory.rst:499
827827
msgid ":c:func:`mmap` and :c:func:`munmap` if available,"
828-
msgstr ""
828+
msgstr ":c:func:`mmap` 和 :c:func:`munmap` ,如果可用,"
829829

830830
#: ../../c-api/memory.rst:500
831831
msgid ":c:func:`malloc` and :c:func:`free` otherwise."
832-
msgstr ""
832+
msgstr "否则, :c:func:`malloc` 和 :c:func:`free` 。"
833833

834834
#: ../../c-api/memory.rst:503
835835
msgid "Customize pymalloc Arena Allocator"
836-
msgstr ""
836+
msgstr "自定义 pymalloc Arena 分配器"
837837

838838
#: ../../c-api/memory.rst:509
839839
msgid ""
840840
"Structure used to describe an arena allocator. The structure has three "
841841
"fields:"
842-
msgstr ""
842+
msgstr "用来描述一个 arena 分配器的结构体。这个结构体有三个字段:"
843843

844844
#: ../../c-api/memory.rst:517
845845
msgid "``void* alloc(void *ctx, size_t size)``"
846846
msgstr "``void* alloc(void *ctx, size_t size)``"
847847

848848
#: ../../c-api/memory.rst:517
849849
msgid "allocate an arena of size bytes"
850-
msgstr ""
850+
msgstr "分配一块 size 字节的区域"
851851

852852
#: ../../c-api/memory.rst:519
853853
msgid "``void free(void *ctx, size_t size, void *ptr)``"
854854
msgstr "``void free(void *ctx, size_t size, void *ptr)``"
855855

856856
#: ../../c-api/memory.rst:519
857857
msgid "free an arena"
858-
msgstr ""
858+
msgstr "释放一块区域"
859859

860860
#: ../../c-api/memory.rst:524
861861
msgid "Get the arena allocator."
862-
msgstr ""
862+
msgstr "获取 arena 分配器"
863863

864864
#: ../../c-api/memory.rst:528
865865
msgid "Set the arena allocator."
866-
msgstr ""
866+
msgstr "设置 arena 分配器"
867867

868868
#: ../../c-api/memory.rst:532
869869
msgid "tracemalloc C API"
870-
msgstr ""
870+
msgstr "tracemalloc C API"
871871

872872
#: ../../c-api/memory.rst:538
873873
msgid "Track an allocated memory block in the :mod:`tracemalloc` module."

extending/extending.po

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
# Shengjing Zhu <[email protected]>, 2020
88
# ww song <[email protected]>, 2020
99
# eric R <[email protected]>, 2020
10-
# Freesand Leo <[email protected]>, 2020
1110
# taotieren <[email protected]>, 2020
1211
# Harry Liu. <[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-04-25 13:42+0000\n"
2020
"PO-Revision-Date: 2020-05-30 11:53+0000\n"
21-
"Last-Translator: Harry Liu. <harry.python@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"
@@ -212,6 +212,11 @@ msgid ""
212212
"Python Library Reference). It is important to know about them to understand"
213213
" how errors are passed around."
214214
msgstr ""
215+
"在 Python 解释器中有一个重要的惯例:当一个函数出错时,它应当设置异常条件并返回错误值(通常为 ``NULL`` 指针)。 "
216+
"异常存储于解释器内部的静态全局变量中;如此变量为 ``NULL`` 表示未发生异常。 还有第二个全局变量用于保存异常的“关联值”(即 "
217+
":keyword:`raise` 的第二个参数)。 第三个变量包含 Python 代码产生错误情况下的栈回溯信息。 这三个变量是 Python 中 "
218+
":meth:`sys.exc_info` 的结果在 C 中的对应物(请参阅 Python 库参考的 :mod:`sys` 模块部分)。 "
219+
"了解它们对于理解错误的传递方式是非常重要的。"
215220

216221
#: ../../extending/extending.rst:139
217222
msgid ""
@@ -252,6 +257,8 @@ msgid ""
252257
":c:func:`PyErr_Occurred` to see whether an error occurred in a function "
253258
"call, since you should be able to tell from the return value."
254259
msgstr ""
260+
"你可以通过 :c:func:`PyErr_Occurred` 在不造成破坏的情况下检测是否设置了异常。 这将返回当前异常对象,或者如果未发生异常则返回 "
261+
"``NULL``。 你通常不需要调用 :c:func:`PyErr_Occurred` 来查看函数调用中是否发生了错误,因为你应该能从返回值中看出来。"
255262

256263
#: ../../extending/extending.rst:160
257264
msgid ""
@@ -266,6 +273,11 @@ msgid ""
266273
"executing Python code and tries to find an exception handler specified by "
267274
"the Python programmer."
268275
msgstr ""
276+
"当一个函数 *f* 调用另一个函数 *g* 时检测到后者出错了,*f* 应当自己返回一个错误值 (通常为 ``NULL`` 或 ``-1``)。 它 "
277+
"*不应该* 调用某个 :c:func:`PyErr_\\*` 函数 --- 这类函数已经被 *g* 调用过了。 *f* "
278+
"的调用者随后也应当返回一个错误来提示 *它的* 调用者,同样 *不应该* 调用 :c:func:`PyErr_\\*`,依此类推 --- "
279+
"错误的最详细原因已经由首先检测到它的函数报告了。 一旦这个错误到达 Python 解释器的主循环,它会中止当前执行的 Python 代码并尝试找出由 "
280+
"Python 程序员所指定的异常处理程序。"
269281

270282
#: ../../extending/extending.rst:170
271283
msgid ""
@@ -410,6 +422,10 @@ msgid ""
410422
"which it points (so in Standard C, the variable :c:data:`command` should "
411423
"properly be declared as ``const char *command``)."
412424
msgstr ""
425+
"如果在参数列表中检测到错误,它将返回 ``NULL`` (该值是返回对象指针的函数所使用的错误提示),这取决于 "
426+
":c:func:`PyArg_ParseTuple` 设置的异常。 在其他情况下参数的字符串值会被拷贝到局部变量 :c:data:`command`。 "
427+
"这是一个指针赋值并且你不应该修改它所指向的字符串 (因此在标准 C 中,变量 :c:data:`command` 应当被正确地声明为 ``const "
428+
"char *command``)。"
413429

414430
#: ../../extending/extending.rst:289
415431
msgid ""
@@ -450,6 +466,8 @@ msgid ""
450466
"is a genuine Python object rather than a ``NULL`` pointer, which means "
451467
"\"error\" in most contexts, as we have seen."
452468
msgstr ""
469+
":c:data:`Py_None` 是特殊 Python 对象 ``None`` 所对应的 C 名称。 它是一个真正的 Python 对象而不是 "
470+
"``NULL`` 指针,如我们所见,后者在大多数上下文中都意味着“错误”。"
453471

454472
#: ../../extending/extending.rst:318
455473
msgid "The Module's Method Table and Initialization Function"

library/logging.config.po

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ msgid ""
159159
"the developer provides a mechanism to present the choices and load the "
160160
"chosen configuration)."
161161
msgstr ""
162+
"从一个 :mod:`configparser` 格式文件中读取日志记录配置。 文件格式应当与 :ref:`logging-config-"
163+
"fileformat` 中的描述一致。 "
164+
"此函数可在应用程序中被多次调用,以允许最终用户在多个预设配置中进行选择(如果开发者提供了展示选项并加载选定配置的机制)。"
162165

163166
#: ../../library/logging.config.rst:0
164167
msgid "Parameters"

0 commit comments

Comments
 (0)