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

Skip to content

Commit 17306ae

Browse files
[po] auto sync
1 parent 01935d0 commit 17306ae

52 files changed

Lines changed: 10868 additions & 6592 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "88.57%", "updated_at": "2023-08-04T14:42:08Z"}
1+
{"translation": "88.43%", "updated_at": "2023-08-04T15:41:58Z"}

c-api/code.po

Lines changed: 108 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
# SOME DESCRIPTIVE TITLE.
2-
# Copyright (C) 2001-2022, Python Software Foundation
2+
# Copyright (C) 2001-2023, Python Software Foundation
33
# This file is distributed under the same license as the Python package.
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
66
# Translators:
7-
# CommonZ <[email protected]>, 2021
8-
# Alpha Du <[email protected]>, 2021
9-
# Freesand Leo <[email protected]>, 2021
7+
# Rafael Fontenelle <[email protected]>, 2023
108
#
119
#, fuzzy
1210
msgid ""
1311
msgstr ""
14-
"Project-Id-Version: Python 3.10\n"
12+
"Project-Id-Version: Python 3.11\n"
1513
"Report-Msgid-Bugs-To: \n"
16-
"POT-Creation-Date: 2022-11-04 14:28+0000\n"
17-
"PO-Revision-Date: 2021-06-28 00:48+0000\n"
18-
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2021\n"
19-
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
14+
"POT-Creation-Date: 2023-08-04 14:46+0000\n"
15+
"PO-Revision-Date: 2023-05-24 02:08+0000\n"
16+
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2023\n"
17+
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2018
"MIME-Version: 1.0\n"
2119
"Content-Type: text/plain; charset=UTF-8\n"
2220
"Content-Transfer-Encoding: 8bit\n"
@@ -60,27 +58,41 @@ msgstr "返回 *co* 中的自由变量数。"
6058
msgid ""
6159
"Return a new code object. If you need a dummy code object to create a "
6260
"frame, use :c:func:`PyCode_NewEmpty` instead. Calling :c:func:`PyCode_New` "
63-
"directly can bind you to a precise Python version since the definition of "
64-
"the bytecode changes often."
61+
"directly will bind you to a precise Python version since the definition of "
62+
"the bytecode changes often. The many arguments of this function are inter-"
63+
"dependent in complex ways, meaning that subtle changes to values are likely "
64+
"to result in incorrect execution or VM crashes. Use this function only with "
65+
"extreme care."
6566
msgstr ""
66-
"返回一个新的代码对象。 如果你需要一个虚拟代码对象来创建一个代码帧,请使用 :c:func:`PyCode_NewEmpty`。 调用 "
67-
":c:func:`PyCode_New` 直接可以绑定到准确的 Python 版本,因为字节码的定义经常变化。"
67+
"返回一个新的代码对象。 如果你需要用一个空白代码对象来创建帧,请改用 :c:func:`PyCode_NewEmpty`。 直接调用 "
68+
":c:func:`PyCode_New` 将会绑定一个具体 Python 版本,因为字节码经常会变动。 "
69+
"此函数的各种参数存在复杂的相互依赖,这意味着对值的细微改变可能会导致不正确的执行或 VM 的崩溃。 必须非常小心地使用这个函数。"
6870

6971
#: ../../c-api/code.rst:45
72+
msgid "Added ``qualname`` and ``exceptiontable`` parameters."
73+
msgstr ""
74+
75+
#: ../../c-api/code.rst:50
7076
msgid ""
7177
"Similar to :c:func:`PyCode_New`, but with an extra \"posonlyargcount\" for "
72-
"positional-only arguments."
73-
msgstr "类似于 :c:func:`PyCode_New`,但带有一个额外的 \"posonlyargcount\" 用于仅限位置参数。"
78+
"positional-only arguments. The same caveats that apply to ``PyCode_New`` "
79+
"also apply to this function."
80+
msgstr ""
81+
"与 :c:func:`PyCode_New` 类似,但还有一个针对仅限位置参数的额外的 \"posonlyargcount\"。 适用于 "
82+
"``PyCode_New`` 的注意事项同样适用于这个函数。"
83+
84+
#: ../../c-api/code.rst:55
85+
msgid "Added ``qualname`` and ``exceptiontable`` parameters."
86+
msgstr ""
7487

75-
#: ../../c-api/code.rst:51
88+
#: ../../c-api/code.rst:60
7689
msgid ""
7790
"Return a new empty code object with the specified filename, function name, "
78-
"and first line number. It is illegal to :func:`exec` or :func:`eval` the "
79-
"resulting code object."
80-
msgstr ""
81-
"返回具有指定文件名、函数名和第一行号的新空代码对象。 对于 :func:`exec` 或 :func:`eval` 生成的代码对象是非法的。"
91+
"and first line number. The resulting code object will raise an ``Exception``"
92+
" if executed."
93+
msgstr "返回一个具有指定用户名、函数名和首行行号的空代码对象。 结果代码对象如果被执行则将引发一个 ``Exception``。"
8294

83-
#: ../../c-api/code.rst:57
95+
#: ../../c-api/code.rst:66
8496
msgid ""
8597
"Return the line number of the instruction that occurs on or before "
8698
"``byte_offset`` and ends after it. If you just need the line number of a "
@@ -89,12 +101,82 @@ msgstr ""
89101
"返回在 ``byte_offset`` 位置或之前以及之后发生的指令的行号。 如果你只需要一个帧的行号,请改用 "
90102
":c:func:`PyFrame_GetLineNumber`。"
91103

92-
#: ../../c-api/code.rst:60
104+
#: ../../c-api/code.rst:69
93105
msgid ""
94106
"For efficiently iterating over the line numbers in a code object, use `the "
95-
"API described in PEP 626 <https://www.python.org/dev/peps/pep-0626/#out-of-"
96-
"process-debuggers-and-profilers>`_."
107+
"API described in PEP 626 <https://peps.python.org/pep-0626/#out-of-process-"
108+
"debuggers-and-profilers>`_."
97109
msgstr ""
98-
"要高效地迭代一个代码对象中的行号,请使用 `PEP 626 描述的 API "
99-
"<https://www.python.org/dev/peps/pep-0626/#out-of-process-debuggers-and-"
110+
"要高效地对代码对象中的行号进行迭代,请使用 `PEP 626 中描述的 API "
111+
"<https://peps.python.org/pep-0626/#out-of-process-debuggers-and-"
100112
"profilers>`_。"
113+
114+
#: ../../c-api/code.rst:74
115+
msgid ""
116+
"Sets the passed ``int`` pointers to the source code line and column numbers "
117+
"for the instruction at ``byte_offset``. Sets the value to ``0`` when "
118+
"information is not available for any particular element."
119+
msgstr ""
120+
"将传入的 ``int`` 指针设为 ``byte_offset`` 处的指令的源代码行编号和列编号。 当没有任何特定元素的信息时则将值设为 ``0``。"
121+
122+
#: ../../c-api/code.rst:78
123+
msgid "Returns ``1`` if the function succeeds and 0 otherwise."
124+
msgstr "如果函数执行成功则返回 ``1`` 否则返回 0。"
125+
126+
#: ../../c-api/code.rst:84
127+
msgid ""
128+
"Equivalent to the Python code ``getattr(co, 'co_code')``. Returns a strong "
129+
"reference to a :c:type:`PyBytesObject` representing the bytecode in a code "
130+
"object. On error, ``NULL`` is returned and an exception is raised."
131+
msgstr ""
132+
"等价于 Python 代码 ``getattr(co, 'co_code')``。 返回一个指向表示代码对象中的字节码的 "
133+
":c:type:`PyBytesObject` 的强引用。 当出错时,将返回 ``NULL`` 并引发一个异常。"
134+
135+
#: ../../c-api/code.rst:89
136+
msgid ""
137+
"This ``PyBytesObject`` may be created on-demand by the interpreter and does "
138+
"not necessarily represent the bytecode actually executed by CPython. The "
139+
"primary use case for this function is debuggers and profilers."
140+
msgstr ""
141+
"这个 ``PyBytesObject`` 可以由解释器按需创建并且不必代表 CPython 所实际执行的字节码。 "
142+
"此函数的主要用途是调试器和性能分析工具。"
143+
144+
#: ../../c-api/code.rst:97
145+
msgid ""
146+
"Equivalent to the Python code ``getattr(co, 'co_varnames')``. Returns a new "
147+
"reference to a :c:type:`PyTupleObject` containing the names of the local "
148+
"variables. On error, ``NULL`` is returned and an exception is raised."
149+
msgstr ""
150+
"等价于 Python 代码 ``getattr(co, 'co_varnames')``。 返回一个指向包含局部变量名称的 "
151+
":c:type:`PyTupleObject` 的新引用。 当出错时,将返回 ``NULL`` 并引发一个异常。"
152+
153+
#: ../../c-api/code.rst:106
154+
msgid ""
155+
"Equivalent to the Python code ``getattr(co, 'co_cellvars')``. Returns a new "
156+
"reference to a :c:type:`PyTupleObject` containing the names of the local "
157+
"variables that are referenced by nested functions. On error, ``NULL`` is "
158+
"returned and an exception is raised."
159+
msgstr ""
160+
"等价于 Python 代码 ``getattr(co, 'co_cellvars')``。 返回一个包含被嵌套的函数所引用的局部变量名称的 "
161+
":c:type:`PyTupleObject` 的新引用。 当出错时,将返回 ``NULL`` 并引发一个异常。"
162+
163+
#: ../../c-api/code.rst:115
164+
msgid ""
165+
"Equivalent to the Python code ``getattr(co, 'co_freevars')``. Returns a new "
166+
"reference to a :c:type:`PyTupleObject` containing the names of the free "
167+
"variables. On error, ``NULL`` is returned and an exception is raised."
168+
msgstr ""
169+
"等价于 Python 代码 ``getattr(co, 'co_freevars')``。 返回一个指向包含自由变量名称的 "
170+
":c:type:`PyTupleObject` 的新引用。 当出错时,将返回 ``NULL`` 并引发一个异常。"
171+
172+
#: ../../c-api/code.rst:3
173+
msgid "object"
174+
msgstr "object -- 对象"
175+
176+
#: ../../c-api/code.rst:3
177+
msgid "code"
178+
msgstr "code"
179+
180+
#: ../../c-api/code.rst:3
181+
msgid "code object"
182+
msgstr "代码对象"

faq/extending.po

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
# SOME DESCRIPTIVE TITLE.
2-
# Copyright (C) 2001-2022, Python Software Foundation
2+
# Copyright (C) 2001-2023, Python Software Foundation
33
# This file is distributed under the same license as the Python package.
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
66
# Translators:
7-
# Freesand Leo <[email protected]>, 2021
8-
# ppcfish <[email protected]>, 2021
7+
# Rafael Fontenelle <[email protected]>, 2023
98
#
109
#, fuzzy
1110
msgid ""
1211
msgstr ""
13-
"Project-Id-Version: Python 3.10\n"
12+
"Project-Id-Version: Python 3.11\n"
1413
"Report-Msgid-Bugs-To: \n"
15-
"POT-Creation-Date: 2022-11-04 14:28+0000\n"
16-
"PO-Revision-Date: 2021-06-28 00:52+0000\n"
17-
"Last-Translator: ppcfish <ppcfish@gmail.com>, 2021\n"
18-
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
14+
"POT-Creation-Date: 2023-08-04 14:46+0000\n"
15+
"PO-Revision-Date: 2023-05-24 02:10+0000\n"
16+
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2023\n"
17+
"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"
2120
"Content-Transfer-Encoding: 8bit\n"
@@ -56,8 +55,8 @@ msgid ""
5655
"each function that is going to be called by the Python interpreter. Global "
5756
"or static C++ objects with constructors are probably not a good idea."
5857
msgstr ""
59-
"是的,可以使用C ++中兼容C的功能。 在Python include文件周围放置` `extern“C”{...}`` "
60-
",并在Python解释器调用的每个函数之前放置 ``extern“C”`` 。 具有构造函数的全局或静态C ++对象可能不是一个好主意。"
58+
"是的,可以使用 C++ 中兼容 C 的功能。 在 Python include 文件周围放置 ``extern \"C\" { ... }`` "
59+
",并在Python解释器调用的每个函数之前放置 ``extern \"C\"`` 。 具有构造函数的全局或静态 C++ 对象可能不是一个好主意。"
6160

6261
#: ../../faq/extending.rst:37
6362
msgid "Writing C is hard; are there any alternatives?"
@@ -72,11 +71,14 @@ msgstr "编写自己的C扩展有很多选择,具体取决于您要做的事
7271
#: ../../faq/extending.rst:44
7372
msgid ""
7473
"`Cython <https://cython.org>`_ and its relative `Pyrex "
75-
"<https://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/>`_ are compilers"
74+
"<https://www.csse.canterbury.ac.nz/greg.ewing/python/Pyrex/>`_ are compilers"
7675
" that accept a slightly modified form of Python and generate the "
7776
"corresponding C code. Cython and Pyrex make it possible to write an "
7877
"extension without having to learn Python's C API."
7978
msgstr ""
79+
"`Cython <https://cython.org>`_ 及其相关的 `Pyrex "
80+
"<https://www.csse.canterbury.ac.nz/greg.ewing/python/Pyrex/>`_ 是接受略微修改过的 "
81+
"Python 形式并生成相应 C 代码的编译器。 Cython 和 Pyrex 使得人们无需学习 Python 的 C API 即可编写扩展。"
8082

8183
#: ../../faq/extending.rst:50
8284
msgid ""
@@ -89,6 +91,12 @@ msgid ""
8991
"<https://github.com/scipy/weave>`_ are also alternatives for wrapping C++ "
9092
"libraries."
9193
msgstr ""
94+
"如果你需要针对某些当前不存在 C or C++ library for which no Python 扩展的 C 或 C++ 库的接口,可以尝试使用 "
95+
"`SWIG <https://www.swig.org>`_ 等工具来包装这些库的数据类型和函数。 `SIP "
96+
"<https://riverbankcomputing.com/software/sip/intro>`__, `CXX "
97+
"<https://cxx.sourceforge.net/>`_ `Boost "
98+
"<https://www.boost.org/libs/python/doc/index.html>`_ 或者 `Weave "
99+
"<https://github.com/scipy/weave>`_ 也是用于包装 C++ 库的替代方案。"
92100

93101
#: ../../faq/extending.rst:61
94102
msgid "How can I execute arbitrary Python statements from C?"
@@ -129,21 +137,17 @@ msgstr "如何从Python对象中提取C的值?"
129137
msgid ""
130138
"That depends on the object's type. If it's a tuple, :c:func:`PyTuple_Size` "
131139
"returns its length and :c:func:`PyTuple_GetItem` returns the item at a "
132-
"specified index. Lists have similar functions, :c:func:`PyListSize` and "
140+
"specified index. Lists have similar functions, :c:func:`PyList_Size` and "
133141
":c:func:`PyList_GetItem`."
134142
msgstr ""
135-
"这取决于对象的类型。 如果是元组,:c:func:`PyTuple_Size` 可返回其长度而 :c:func:`PyTuple_GetItem` "
136-
"可返回指定序号上的项。 对于列表也有类似的函数 :c:func:`PyListSize` 和 :c:func:`PyList_GetItem`。"
137143

138144
#: ../../faq/extending.rst:87
139145
msgid ""
140146
"For bytes, :c:func:`PyBytes_Size` returns its length and "
141147
":c:func:`PyBytes_AsStringAndSize` provides a pointer to its value and its "
142148
"length. Note that Python bytes objects may contain null bytes so C's "
143-
":c:func:`strlen` should not be used."
149+
":c:func:`!strlen` should not be used."
144150
msgstr ""
145-
"对于字节串,:c:func:`PyBytes_Size` 可返回其长度而 :c:func:`PyBytes_AsStringAndSize` "
146-
"提供一个指向其值和长度的指针。 请注意 Python 字节串可能为空,因此 C 的 :c:func:`strlen` 不应被使用。"
147151

148152
#: ../../faq/extending.rst:92
149153
msgid ""
@@ -290,7 +294,7 @@ msgstr ""
290294

291295
#: ../../faq/extending.rst:212
292296
msgid "For C++ libraries, see :ref:`c-wrapper-software`."
293-
msgstr "有关C ++库,请参阅 :ref:`c-wrapper-software` "
297+
msgstr "有关C ++库,请参阅 :ref:`c-wrapper-software`"
294298

295299
#: ../../faq/extending.rst:216
296300
msgid "I added a module using the Setup file and the make fails; why?"
@@ -411,3 +415,5 @@ msgid ""
411415
"this from C++ (i.e. you can inherit from an extension class written in C++ "
412416
"using the BPL)."
413417
msgstr ""
418+
"Boost Python Library (BPL, https://www.boost.org/libs/python/doc/index.html)"
419+
" 提供了一种从 C++ 执行此操作的方式(即你可以使用 BPL 来继承用 C++ 编写的扩展类)。"

0 commit comments

Comments
 (0)