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

Skip to content

Commit 6453b68

Browse files
[po] auto sync
1 parent 13dd5fb commit 6453b68

4 files changed

Lines changed: 69 additions & 29 deletions

File tree

c-api/tuple.po

Lines changed: 47 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
66
# Translators:
7-
# Freesand Leo <[email protected]>, 2020
87
# dykai <[email protected]>, 2020
98
# ppcfish <[email protected]>, 2020
9+
# 伟 裴 <[email protected]>, 2020
10+
# Freesand Leo <[email protected]>, 2020
1011
#
1112
#, fuzzy
1213
msgid ""
@@ -15,7 +16,7 @@ msgstr ""
1516
"Report-Msgid-Bugs-To: \n"
1617
"POT-Creation-Date: 2020-08-20 14:53+0000\n"
1718
"PO-Revision-Date: 2020-05-30 11:51+0000\n"
18-
"Last-Translator: ppcfish <ppcfish@gmail.com>, 2020\n"
19+
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2020\n"
1920
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2021
"MIME-Version: 1.0\n"
2122
"Content-Type: text/plain; charset=UTF-8\n"
@@ -53,7 +54,7 @@ msgstr "如果 *p* 是一个元组对象,而不是一个元组子类型的实
5354

5455
#: ../../c-api/tuple.rst:36
5556
msgid "Return a new tuple object of size *len*, or ``NULL`` on failure."
56-
msgstr ""
57+
msgstr "成功时返回一个新的元组对象,长度为 *len*,失败时返回“NULL”。"
5758

5859
#: ../../c-api/tuple.rst:41
5960
msgid ""
@@ -62,53 +63,61 @@ msgid ""
6263
"objects. ``PyTuple_Pack(2, a, b)`` is equivalent to "
6364
"``Py_BuildValue(\"(OO)\", a, b)``."
6465
msgstr ""
66+
"成功时返回一个新的元组对象,大小为 *n* ,失败时返回 ``NULL``。 元组值初始化为指向 Python 对象的后续 *n* C 参数。 "
67+
"``PyTuple_Pack(2, a, b)`` 和 ``Py_BuildValue(\"(OO)\", a, b)`` 相等。"
6568

6669
#: ../../c-api/tuple.rst:48
6770
msgid "Take a pointer to a tuple object, and return the size of that tuple."
68-
msgstr ""
71+
msgstr "获取指向元组对象的指针,并返回该元组的大小。"
6972

7073
#: ../../c-api/tuple.rst:53
7174
msgid ""
7275
"Return the size of the tuple *p*, which must be non-``NULL`` and point to a "
7376
"tuple; no error checking is performed."
74-
msgstr ""
77+
msgstr "返回元组*p*的大小,它必须是非``NULL``并且指向一个元组;不执行错误检查"
7578

7679
#: ../../c-api/tuple.rst:59
7780
msgid ""
7881
"Return the object at position *pos* in the tuple pointed to by *p*. If "
7982
"*pos* is out of bounds, return ``NULL`` and set an :exc:`IndexError` "
8083
"exception."
8184
msgstr ""
85+
"返回 *p* 所指向的元组中,位于 *pos* 处的对象。 如果 *pos* 超出界限,返回 ``NULL`` ,并抛出一个 "
86+
":exc:`IndexError` 异常。"
8287

8388
#: ../../c-api/tuple.rst:65
8489
msgid "Like :c:func:`PyTuple_GetItem`, but does no checking of its arguments."
85-
msgstr ""
90+
msgstr "类似于 :c:func:`PyTuple_GetItem`,但不检查其参数。"
8691

8792
#: ../../c-api/tuple.rst:70
8893
msgid ""
8994
"Return the slice of the tuple pointed to by *p* between *low* and *high*, or"
9095
" ``NULL`` on failure. This is the equivalent of the Python expression "
9196
"``p[low:high]``. Indexing from the end of the list is not supported."
9297
msgstr ""
98+
"返回*p*所指向的元组的切片,在*low*和*high*之间,或者在失败时返回``NULL``。这等同于Python表达式:``p[low:high]``"
99+
" 。不支持从列表末尾索引。"
93100

94101
#: ../../c-api/tuple.rst:77
95102
msgid ""
96103
"Insert a reference to object *o* at position *pos* of the tuple pointed to "
97104
"by *p*. Return ``0`` on success. If *pos* is out of bounds, return ``-1`` "
98105
"and set an :exc:`IndexError` exception."
99106
msgstr ""
107+
"在 *p* 指向的元组的 *pos* 位置插入对对象 *o* 的引用。 成功时返回 ``0``;如果 *pos* 越界,则返回 ``-1``,并抛出一个"
108+
" :exc:`IndexError` 异常。"
100109

101110
#: ../../c-api/tuple.rst:83
102111
msgid ""
103112
"This function \"steals\" a reference to *o* and discards a reference to an "
104113
"item already in the tuple at the affected position."
105-
msgstr ""
114+
msgstr "此函数会“窃取”对*o*的引用,并丢弃对元组中已在受影响位置的条目的引用。"
106115

107116
#: ../../c-api/tuple.rst:89
108117
msgid ""
109118
"Like :c:func:`PyTuple_SetItem`, but does no error checking, and should "
110119
"*only* be used to fill in brand new tuples."
111-
msgstr ""
120+
msgstr "类似于 :c:func:`PyTuple_SetItem`,但不进行错误检查,并且应该 *只是* 被用来填充全新的元组。"
112121

113122
#: ../../c-api/tuple.rst:94
114123
msgid ""
@@ -117,6 +126,8 @@ msgid ""
117126
"is being replaced; any reference in the tuple at position *pos* will be "
118127
"leaked."
119128
msgstr ""
129+
"这个宏会“偷走”一个对 *o* 的引用,但与 :c:func:`PyTuple_SetItem` 不同,它 *不会* "
130+
"丢弃对任何被替换项的引用;元组中位于 *pos* 位置的任何引用都将被泄漏。"
120131

121132
#: ../../c-api/tuple.rst:102
122133
msgid ""
@@ -132,14 +143,19 @@ msgid ""
132143
"and sets ``*p`` to ``NULL``, and raises :exc:`MemoryError` or "
133144
":exc:`SystemError`."
134145
msgstr ""
146+
"可以用于调整元组的大小。 *newsize* 将是元组的新长度。 因为元组 *被认为* 是不可变的,所以只有在对象仅有一个引用时,才应该使用它。 "
147+
"如果元组已经被代码的其他部分所引用,请不要使用此项。 元组在最后总是会增长或缩小。 把它看作是销毁旧元组并创建一个新元组,只会更有效。 成功时返回 "
148+
"``0`` 。 客户端代码不应假定 ``*p`` 的结果值将与调用此函数之前的值相同。 如果替换了 ``*p`` 引用的对象,则原始的 ``*p`` "
149+
"将被销毁。 失败时,返回``-1``,将 ``*p`` 设置为 ``NULL``,并引发 :exc:`MemoryError` 或者 "
150+
":exc:`SystemError`。"
135151

136152
#: ../../c-api/tuple.rst:116
137153
msgid "Clear the free list. Return the total number of freed items."
138154
msgstr "清空释放列表。 返回所释放的条目数。"
139155

140156
#: ../../c-api/tuple.rst:120
141157
msgid "Struct Sequence Objects"
142-
msgstr ""
158+
msgstr "结构序列对象"
143159

144160
#: ../../c-api/tuple.rst:122
145161
msgid ""
@@ -148,23 +164,27 @@ msgid ""
148164
"also be accessed through attributes. To create a struct sequence, you first "
149165
"have to create a specific struct sequence type."
150166
msgstr ""
167+
"结构序列对象是等价于 :func:`~collections.namedtuple` 的 C 对象,即一个序列,其中的条目也可以通过属性访问。 "
168+
"要创建结构序列,你首先必须创建特定的结构序列类型。"
151169

152170
#: ../../c-api/tuple.rst:129
153171
msgid ""
154172
"Create a new struct sequence type from the data in *desc*, described below. "
155173
"Instances of the resulting type can be created with "
156174
":c:func:`PyStructSequence_New`."
157175
msgstr ""
176+
"根据 *desc* 中的数据创建一个新的结构序列类型,如下所述。 可以使用 :c:func:`PyStructSequence_New` "
177+
"创建结果类型的实例。"
158178

159179
#: ../../c-api/tuple.rst:135
160180
msgid "Initializes a struct sequence type *type* from *desc* in place."
161-
msgstr ""
181+
msgstr "从*desc*就地初始化结构序列类型*type*。"
162182

163183
#: ../../c-api/tuple.rst:140
164184
msgid ""
165185
"The same as ``PyStructSequence_InitType``, but returns ``0`` on success and "
166186
"``-1`` on failure."
167-
msgstr ""
187+
msgstr "与 ``PyStructSequence_InitType`` 相同,但成功时返回 ``0`` ,失败时返回 ``-1`` 。"
168188

169189
#: ../../c-api/tuple.rst:148
170190
msgid "Contains the meta information of a struct sequence type to create."
@@ -201,7 +221,7 @@ msgstr "``doc``"
201221

202222
#: ../../c-api/tuple.rst:155
203223
msgid "pointer to docstring for the type or ``NULL`` to omit"
204-
msgstr ""
224+
msgstr "指向要忽略类型的文档字符串或 ``NULL`` 的指针"
205225

206226
#: ../../c-api/tuple.rst:158
207227
msgid "``fields``"
@@ -213,7 +233,7 @@ msgstr "``PyStructSequence_Field *``"
213233

214234
#: ../../c-api/tuple.rst:158
215235
msgid "pointer to ``NULL``-terminated array with field names of the new type"
216-
msgstr ""
236+
msgstr "指向以 ``NULL`` 结尾的数组的指针,其字段名称为新类型"
217237

218238
#: ../../c-api/tuple.rst:161
219239
msgid "``n_in_sequence``"
@@ -225,7 +245,7 @@ msgstr "``int``"
225245

226246
#: ../../c-api/tuple.rst:161
227247
msgid "number of fields visible to the Python side (if used as tuple)"
228-
msgstr ""
248+
msgstr "Python侧可见的字段数(如果用作元组)"
229249

230250
#: ../../c-api/tuple.rst:168
231251
msgid ""
@@ -234,48 +254,54 @@ msgid ""
234254
":attr:`fields` array of the :c:type:`PyStructSequence_Desc` determines which"
235255
" field of the struct sequence is described."
236256
msgstr ""
257+
"描述结构序列的一个字段。 当结构序列被建模为元组时,所有字段的类型都是 :c:type:`PyObject*`。 在 "
258+
":c:type:`PyStructSequence_Desc` 的 :attr:`fields` 数组中的索引确定了结构序列描述的是哪个字段。"
237259

238260
#: ../../c-api/tuple.rst:176
239261
msgid ""
240262
"name for the field or ``NULL`` to end the list of named fields, set to "
241263
":c:data:`PyStructSequence_UnnamedField` to leave unnamed"
242264
msgstr ""
265+
"字段的名称或``NULL`` ,若要结束命名字段的列表,请设置为::c:data:`PyStructSequence_UnnamedField` "
266+
"以保留未命名字段"
243267

244268
#: ../../c-api/tuple.rst:181
245269
msgid "field docstring or ``NULL`` to omit"
246-
msgstr ""
270+
msgstr "要忽略的字段docstring或``NULL``"
247271

248272
#: ../../c-api/tuple.rst:187
249273
msgid "Special value for a field name to leave it unnamed."
250-
msgstr ""
274+
msgstr "字段名的特殊值将保持未命名状态。"
251275

252276
#: ../../c-api/tuple.rst:192
253277
msgid ""
254278
"Creates an instance of *type*, which must have been created with "
255279
":c:func:`PyStructSequence_NewType`."
256-
msgstr ""
280+
msgstr "创建 *type* 的实例,该实例必须使用 :c:func:`PyStructSequence_NewType` 创建。"
257281

258282
#: ../../c-api/tuple.rst:198
259283
msgid ""
260284
"Return the object at position *pos* in the struct sequence pointed to by "
261285
"*p*. No bounds checking is performed."
262-
msgstr ""
286+
msgstr "返回*p*所指向的结构序列中,位于*pos*处的对象。不需要进行边界检查。"
263287

264288
#: ../../c-api/tuple.rst:204
265289
msgid "Macro equivalent of :c:func:`PyStructSequence_GetItem`."
266-
msgstr ""
290+
msgstr ":c:func:`PyStructSequence_GetItem` 的宏版本。"
267291

268292
#: ../../c-api/tuple.rst:209
269293
msgid ""
270294
"Sets the field at index *pos* of the struct sequence *p* to value *o*. Like"
271295
" :c:func:`PyTuple_SET_ITEM`, this should only be used to fill in brand new "
272296
"instances."
273297
msgstr ""
298+
"将结构序列 *p* 的索引 *pos* 处的字段设置为值 *o*。 与 :c:func:`PyTuple_SET_ITEM` "
299+
"一样,它应该只用于填充全新的实例。"
274300

275301
#: ../../c-api/tuple.rst:215 ../../c-api/tuple.rst:224
276302
msgid "This function \"steals\" a reference to *o*."
277-
msgstr ""
303+
msgstr "这个函数“窃取”了指向*o*的一个引用。"
278304

279305
#: ../../c-api/tuple.rst:220
280306
msgid "Macro equivalent of :c:func:`PyStructSequence_SetItem`."
281-
msgstr ""
307+
msgstr ":c:func:`PyStructSequence_SetItem` 的宏版本。"

c-api/unicode.po

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
# 1lin24 <[email protected]>, 2020
99
# Freesand Leo <[email protected]>, 2020
1010
# ppcfish <[email protected]>, 2020
11+
# 伟 裴 <[email protected]>, 2020
1112
#
1213
#, fuzzy
1314
msgid ""
@@ -16,7 +17,7 @@ msgstr ""
1617
"Report-Msgid-Bugs-To: \n"
1718
"POT-Creation-Date: 2020-08-20 14:53+0000\n"
1819
"PO-Revision-Date: 2020-05-30 11:51+0000\n"
19-
"Last-Translator: ppcfish <ppcfish@gmail.com>, 2020\n"
20+
"Last-Translator: 伟 裴 <sky_wander@outlook.com>, 2020\n"
2021
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2122
"MIME-Version: 1.0\n"
2223
"Content-Type: text/plain; charset=UTF-8\n"
@@ -26,7 +27,7 @@ msgstr ""
2627

2728
#: ../../c-api/unicode.rst:6
2829
msgid "Unicode Objects and Codecs"
29-
msgstr ""
30+
msgstr "Unicode对象和编码解码器"
3031

3132
#: ../../c-api/unicode.rst:12
3233
msgid "Unicode Objects"
@@ -41,6 +42,8 @@ msgid ""
4142
"65536; otherwise, code points must be below 1114112 (which is the full "
4243
"Unicode range)."
4344
msgstr ""
45+
"自从python3.3中实现了:pep:`393` "
46+
"以来,Unicode对象在内部使用各种表示形式,以便在保持内存效率的同时处理完整范围的Unicode字符。对于所有代码点都低于128、256或65536的字符串,有一些特殊情况;否则,代码点必须低于1114112(这是完整的Unicode范围)。"
4447

4548
#: ../../c-api/unicode.rst:20
4649
msgid ""

library/asyncio-protocol.po

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -810,12 +810,16 @@ msgid ""
810810
":meth:`loop.connect_read_pipe`, and :meth:`loop.connect_write_pipe` accept "
811811
"factories that return streaming protocols."
812812
msgstr ""
813+
"事件方法,例如 :meth:`loop.create_server`, :meth:`loop.create_unix_server`, "
814+
":meth:`loop.create_connection`, :meth:`loop.create_unix_connection`, "
815+
":meth:`loop.connect_accepted_socket`, :meth:`loop.connect_read_pipe` 和 "
816+
":meth:`loop.connect_write_pipe` 都接受返回流式协议的工厂。"
813817

814818
#: ../../library/asyncio-protocol.rst:544
815819
msgid ""
816820
"Called when some data is received. *data* is a non-empty bytes object "
817821
"containing the incoming data."
818-
msgstr ""
822+
msgstr "当收到数据时被调用。 *data* 为包含入站数据的非空字节串对象。"
819823

820824
#: ../../library/asyncio-protocol.rst:547
821825
msgid ""
@@ -824,26 +828,31 @@ msgid ""
824828
" make your parsing generic and flexible. However, data is always received in"
825829
" the correct order."
826830
msgstr ""
831+
"数据是否会被缓冲、分块或重组取决于具体传输。 通常,你不应依赖于特定的语义而应使你的解析具有通用性和灵活性。 但是,数据总是要以正确的顺序被接收。"
827832

828833
#: ../../library/asyncio-protocol.rst:552
829834
msgid ""
830835
"The method can be called an arbitrary number of times while a connection is "
831836
"open."
832-
msgstr ""
837+
msgstr "此方法在连接打开期间可以被调用任意次数。"
833838

834839
#: ../../library/asyncio-protocol.rst:555
835840
msgid ""
836841
"However, :meth:`protocol.eof_received() <Protocol.eof_received>` is called "
837842
"at most once. Once `eof_received()` is called, ``data_received()`` is not "
838843
"called anymore."
839844
msgstr ""
845+
"但是,:meth:`protocol.eof_received() <Protocol.eof_received>` 最多只会被调用一次。 一旦 "
846+
"`eof_received()` 被调用,``data_received()`` 就不会再被调用。"
840847

841848
#: ../../library/asyncio-protocol.rst:561
842849
msgid ""
843850
"Called when the other end signals it won't send any more data (for example "
844851
"by calling :meth:`transport.write_eof() <WriteTransport.write_eof>`, if the "
845852
"other end also uses asyncio)."
846853
msgstr ""
854+
"当发出信号的另一端不再继续发送数据时(例如通过调用 :meth:`transport.write_eof() "
855+
"<WriteTransport.write_eof>`,如果另一端也使用 asyncio 的话)被调用。"
847856

848857
#: ../../library/asyncio-protocol.rst:566
849858
msgid ""
@@ -853,13 +862,15 @@ msgid ""
853862
"the default implementation returns ``None``, it implicitly closes the "
854863
"connection."
855864
msgstr ""
865+
"此方法可能返回假值 (包括 ``None``),在此情况下传输将会自行关闭。 相反地,如果此方法返回真值,将以所用的协议来确定是否要关闭传输。 "
866+
"由于默认实现是返回 ``None``,因此它会隐式地关闭连接。"
856867

857868
#: ../../library/asyncio-protocol.rst:572
858869
msgid ""
859870
"Some transports, including SSL, don't support half-closed connections, in "
860871
"which case returning true from this method will result in the connection "
861872
"being closed."
862-
msgstr ""
873+
msgstr "某些传输,包括 SSL 在内,并不支持半关闭的连接,在此情况下从该方法返回真值将导致连接被关闭。"
863874

864875
#: ../../library/asyncio-protocol.rst:577
865876
#: ../../library/asyncio-protocol.rst:638
@@ -881,7 +892,7 @@ msgstr ""
881892
msgid ""
882893
"Buffered Protocols can be used with any event loop method that supports "
883894
"`Streaming Protocols`_."
884-
msgstr ""
895+
msgstr "带缓冲的协议可与任何支持 `流式协议`_ 的事件循环方法配合使用。"
885896

886897
#: ../../library/asyncio-protocol.rst:598
887898
msgid ""

reference/datamodel.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ msgstr ""
267267
msgid ""
268268
"The string representations of the Numeric classes, computed by "
269269
":meth:`__repr__` and :meth:`__str__`, have the following properties:"
270-
msgstr ""
270+
msgstr "数字类的字符串表示形式,由 :meth:`__repr__` 和 :meth:`__str__` 算出,具有以下属性:"
271271

272272
#: ../../reference/datamodel.rst:189
273273
msgid ""
@@ -1728,7 +1728,7 @@ msgid ""
17281728
"must explicitly call it to ensure proper deletion of the base class part of "
17291729
"the instance."
17301730
msgstr ""
1731-
"在实例将被销毁时调用。这还会调用终结器或析构器 (不适当)。如果一个基类具有 :meth:`__del__` 方法,则其所派生的类如果也有 "
1731+
"在实例将被销毁时调用。 这还被称为终结器或析构器(不适当)。 如果一个基类具有 :meth:`__del__` 方法,则其所派生的类如果也有 "
17321732
":meth:`__del__` 方法,就必须显式地调用它以确保实例基类部分的正确清除。"
17331733

17341734
#: ../../reference/datamodel.rst:1240

0 commit comments

Comments
 (0)