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

Skip to content

Commit 5c11cb7

Browse files
[po] auto sync
1 parent 3589f05 commit 5c11cb7

25 files changed

Lines changed: 2683 additions & 2243 deletions

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "88.79%", "updated_at": "2023-08-25T15:41:55Z"}
1+
{"translation": "88.92%", "updated_at": "2023-08-26T08:42:06Z"}

c-api/buffer.po

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.11\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2023-08-18 14:42+0000\n"
14+
"POT-Creation-Date: 2023-08-25 14:43+0000\n"
1515
"PO-Revision-Date: 2023-05-24 02:08+0000\n"
1616
"Last-Translator: Rafael Fontenelle <[email protected]>, 2023\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -280,6 +280,10 @@ msgid ""
280280
" ``NULL``. The maximum number of dimensions is given by "
281281
":c:macro:`PyBUF_MAX_NDIM`."
282282
msgstr ""
283+
"内存表示为 n 维数组形式对应的维度数。 如果为 ``0``,则 :c:member:`~Py_buffer.buf` 指向表示标量的单个条目。 "
284+
"在这种情况下,:c:member:`~Py_buffer.shape`, :c:member:`~Py_buffer.strides` 和 "
285+
":c:member:`~Py_buffer.suboffsets` 必须为 ``NULL``。 最大维度数由 "
286+
":c:macro:`PyBUF_MAX_NDIM` 给出。"
283287

284288
#: ../../c-api/buffer.rst:168
285289
msgid ""
@@ -369,14 +373,16 @@ msgstr ""
369373

370374
#: ../../c-api/buffer.rst:218
371375
msgid "Constants:"
372-
msgstr ""
376+
msgstr "常量:"
373377

374378
#: ../../c-api/buffer.rst:222
375379
msgid ""
376380
"The maximum number of dimensions the memory represents. Exporters MUST "
377381
"respect this limit, consumers of multi-dimensional buffers SHOULD be able to"
378382
" handle up to :c:macro:`!PyBUF_MAX_NDIM` dimensions. Currently set to 64."
379383
msgstr ""
384+
"内存表示的最大维度数。 导出程序必须遵守这个限制,多维缓冲区的使用者应该能够处理最多 :c:macro:`!PyBUF_MAX_NDIM` 个维度。 "
385+
"目前设置为 64。"
380386

381387
#: ../../c-api/buffer.rst:231
382388
msgid "Buffer request types"
@@ -687,6 +693,8 @@ msgid ""
687693
"the exporter cannot provide a buffer of the exact type, it MUST raise "
688694
":exc:`BufferError`, set ``view->obj`` to ``NULL`` and return ``-1``."
689695
msgstr ""
696+
"向 *exporter* 发送请求以按照 *flags* 指定的内容填充 *view*。 如果 exporter 无法提供要求类型的缓冲区,则它必须引发"
697+
" :exc:`BufferError`,将 ``view->obj`` 设为 ``NULL`` 并返回 ``-1``。"
690698

691699
#: ../../c-api/buffer.rst:454
692700
msgid ""
@@ -817,6 +825,8 @@ msgid ""
817825
" Otherwise, raise :exc:`BufferError`, set ``view->obj`` to ``NULL`` and "
818826
"return ``-1``;"
819827
msgstr ""
828+
"成功时,将 ``view->obj`` 设为对 *exporter* 的新引用并返回 0。 否则,引发 :exc:`BufferError`,将 "
829+
"``view->obj`` 设为 ``NULL`` 并返回 ``-1``;"
820830

821831
#: ../../c-api/buffer.rst:541
822832
msgid ""

c-api/dict.po

Lines changed: 76 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +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-
# ww song <[email protected]>, 2021
8-
# 叶浚安 <[email protected]>, 2021
9-
# Josh Ouyang <[email protected]>, 2021
10-
# jaystone776 <[email protected]>, 2021
11-
# Freesand Leo <[email protected]>, 2021
7+
# Rafael Fontenelle <[email protected]>, 2023
128
#
139
#, fuzzy
1410
msgid ""
1511
msgstr ""
16-
"Project-Id-Version: Python 3.10\n"
12+
"Project-Id-Version: Python 3.11\n"
1713
"Report-Msgid-Bugs-To: \n"
18-
"POT-Creation-Date: 2022-11-04 14:28+0000\n"
19-
"PO-Revision-Date: 2021-06-28 00:48+0000\n"
20-
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2021\n"
21-
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
14+
"POT-Creation-Date: 2023-08-25 20:36+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"
2218
"MIME-Version: 1.0\n"
2319
"Content-Type: text/plain; charset=UTF-8\n"
2420
"Content-Transfer-Encoding: 8bit\n"
@@ -95,52 +91,52 @@ msgstr ""
9591
#: ../../c-api/dict.rst:75
9692
msgid ""
9793
"Insert *val* into the dictionary *p* using *key* as a key. *key* should be a"
98-
" :c:expr:`const char*`. The key object is created using "
99-
"``PyUnicode_FromString(key)``. Return ``0`` on success or ``-1`` on "
100-
"failure. This function *does not* steal a reference to *val*."
94+
" :c:expr:`const char*` UTF-8 encoded bytes string. The key object is "
95+
"created using ``PyUnicode_FromString(key)``. Return ``0`` on success or "
96+
"``-1`` on failure. This function *does not* steal a reference to *val*."
10197
msgstr ""
10298

10399
#: ../../c-api/dict.rst:83
104100
msgid ""
105-
"Remove the entry in dictionary *p* with key *key*. *key* must be hashable; "
106-
"if it isn't, :exc:`TypeError` is raised. If *key* is not in the dictionary, "
107-
":exc:`KeyError` is raised. Return ``0`` on success or ``-1`` on failure."
101+
"Remove the entry in dictionary *p* with key *key*. *key* must be "
102+
":term:`hashable`; if it isn't, :exc:`TypeError` is raised. If *key* is not "
103+
"in the dictionary, :exc:`KeyError` is raised. Return ``0`` on success or "
104+
"``-1`` on failure."
108105
msgstr ""
109-
"移除字典 *p* 中键为 *key* 的条目。 *key* 必须是可哈希的;如果不是,则会引发 :exc:`TypeError`。 如果字典中没有 "
110-
"*key*,则会引发 :exc:`KeyError`。 成功时返回 ``0``,失败时返回 ``-1``。"
106+
"移除字典 *p* 中键为 *key* 的条目。 *key* 必须是 :term:`hashable`;如果不是,则会引发 "
107+
":exc:`TypeError`。 如果字典中没有 *key*,则会引发 :exc:`KeyError`。 成功时返回 ``0`` 或者失败时返回 "
108+
"``-1``。"
111109

112110
#: ../../c-api/dict.rst:91
113111
msgid ""
114-
"Remove the entry in dictionary *p* which has a key specified by the string "
115-
"*key*. If *key* is not in the dictionary, :exc:`KeyError` is raised. Return "
116-
"``0`` on success or ``-1`` on failure."
112+
"Remove the entry in dictionary *p* which has a key specified by the UTF-8 "
113+
"encoded bytes string *key*. If *key* is not in the dictionary, "
114+
":exc:`KeyError` is raised. Return ``0`` on success or ``-1`` on failure."
117115
msgstr ""
118-
"移除字典 *p* 中由字符串 *key* 指定的键的条目。 如果字典中没有 *key*,则会引发 :exc:`KeyError`。 成功时返回 "
119-
"``0``,失败时返回 ``-1``。"
120116

121-
#: ../../c-api/dict.rst:98
117+
#: ../../c-api/dict.rst:99
122118
msgid ""
123119
"Return the object from dictionary *p* which has a key *key*. Return "
124120
"``NULL`` if the key *key* is not present, but *without* setting an "
125121
"exception."
126122
msgstr "从字典 *p* 中返回以 *key* 为键的对象。 如果键名 *key* 不存在但 *没有* 设置一个异常则返回 ``NULL``。"
127123

128-
#: ../../c-api/dict.rst:101
124+
#: ../../c-api/dict.rst:104
129125
msgid ""
130-
"Note that exceptions which occur while calling :meth:`__hash__` and "
131-
":meth:`__eq__` methods will get suppressed. To get error reporting use "
132-
":c:func:`PyDict_GetItemWithError()` instead."
126+
"Exceptions that occur while this calls :meth:`~object.__hash__` and "
127+
":meth:`~object.__eq__` methods are silently ignored. Prefer the "
128+
":c:func:`PyDict_GetItemWithError` function instead."
133129
msgstr ""
134-
"需要注意的是,调用 :meth:`__hash__` 和 :meth:`__eq__` 方法产生的异常不会被抛出。改用 "
135-
":c:func:`PyDict_GetItemWithError()` 获得错误报告。"
130+
"在调用 :meth:`~object.__hash__` 和 :meth:`~object.__eq__` 方法时发生的异常将被静默地忽略。 建议改用 "
131+
":c:func:`PyDict_GetItemWithError` 函数。"
136132

137-
#: ../../c-api/dict.rst:105
133+
#: ../../c-api/dict.rst:108
138134
msgid ""
139135
"Calling this API without :term:`GIL` held had been allowed for historical "
140136
"reason. It is no longer allowed."
141137
msgstr "在不保持 :term:`GIL` 的情况下调用此 API 曾因历史原因而被允许。 现在已不再被允许。"
142138

143-
#: ../../c-api/dict.rst:112
139+
#: ../../c-api/dict.rst:115
144140
msgid ""
145141
"Variant of :c:func:`PyDict_GetItem` that does not suppress exceptions. "
146142
"Return ``NULL`` **with** an exception set if an exception occurred. Return "
@@ -149,23 +145,26 @@ msgstr ""
149145
":c:func:`PyDict_GetItem` 的变种,它不会屏蔽异常。 当异常发生时将返回 ``NULL`` **并且** 设置一个异常。 "
150146
"如果键不存在则返回 ``NULL`` **并且不会** 设置一个异常。"
151147

152-
#: ../../c-api/dict.rst:120
148+
#: ../../c-api/dict.rst:123
153149
msgid ""
154150
"This is the same as :c:func:`PyDict_GetItem`, but *key* is specified as a "
155-
":c:expr:`const char*`, rather than a :c:expr:`PyObject*`."
151+
":c:expr:`const char*` UTF-8 encoded bytes string, rather than a "
152+
":c:expr:`PyObject*`."
156153
msgstr ""
157154

158-
#: ../../c-api/dict.rst:123
155+
#: ../../c-api/dict.rst:129
159156
msgid ""
160-
"Note that exceptions which occur while calling :meth:`__hash__` and "
161-
":meth:`__eq__` methods and creating a temporary string object will get "
162-
"suppressed. To get error reporting use :c:func:`PyDict_GetItemWithError()` "
163-
"instead."
157+
"Exceptions that occur while this calls :meth:`~object.__hash__` and "
158+
":meth:`~object.__eq__` methods or while creating the temporary :class:`str` "
159+
"object are silently ignored. Prefer using the "
160+
":c:func:`PyDict_GetItemWithError` function with your own "
161+
":c:func:`PyUnicode_FromString` *key* instead."
164162
msgstr ""
165-
"需要注意的是,调用 :meth:`__hash__` 、 :meth:`__eq__` 方法和创建一个临时的字符串对象时产生的异常不会被抛出。改用 "
166-
":c:func:`PyDict_GetItemWithError()` 获得错误报告。"
163+
"在调用 :meth:`~object.__hash__` 和 :meth:`~object.__eq__` 方法时或者在创建临时 "
164+
":class:`str` 对象期间发生的异常将被静默地忽略。 建议改用 :c:func:`PyDict_GetItemWithError` "
165+
"函数并附带你自己的 :c:func:`PyUnicode_FromString` *key*。"
167166

168-
#: ../../c-api/dict.rst:131
167+
#: ../../c-api/dict.rst:138
169168
msgid ""
170169
"This is the same as the Python-level :meth:`dict.setdefault`. If present, "
171170
"it returns the value corresponding to *key* from the dictionary *p*. If the"
@@ -178,30 +177,30 @@ msgstr ""
178177
"里面对应的值。如果键不存在,它会和值 *defaultobj* 一起插入并返回 *defaultobj* 。这个函数只计算 *key* "
179178
"的哈希函数一次,而不是在查找和插入时分别计算它。"
180179

181-
#: ../../c-api/dict.rst:141
180+
#: ../../c-api/dict.rst:148
182181
msgid ""
183182
"Return a :c:type:`PyListObject` containing all the items from the "
184183
"dictionary."
185184
msgstr "返回一个包含字典中所有键值项的 :c:type:`PyListObject`。"
186185

187-
#: ../../c-api/dict.rst:146
186+
#: ../../c-api/dict.rst:153
188187
msgid ""
189188
"Return a :c:type:`PyListObject` containing all the keys from the dictionary."
190189
msgstr "返回一个包含字典中所有键(keys)的 :c:type:`PyListObject`。"
191190

192-
#: ../../c-api/dict.rst:151
191+
#: ../../c-api/dict.rst:158
193192
msgid ""
194193
"Return a :c:type:`PyListObject` containing all the values from the "
195194
"dictionary *p*."
196195
msgstr "返回一个包含字典中所有值(values)的 :c:type:`PyListObject`。"
197196

198-
#: ../../c-api/dict.rst:159
197+
#: ../../c-api/dict.rst:166
199198
msgid ""
200199
"Return the number of items in the dictionary. This is equivalent to "
201200
"``len(p)`` on a dictionary."
202201
msgstr "返回字典中项目数,等价于对字典 *p* 使用 ``len(p)``。"
203202

204-
#: ../../c-api/dict.rst:165
203+
#: ../../c-api/dict.rst:172
205204
msgid ""
206205
"Iterate over all key-value pairs in the dictionary *p*. The "
207206
":c:type:`Py_ssize_t` referred to by *ppos* must be initialized to ``0`` "
@@ -214,19 +213,23 @@ msgid ""
214213
"Its value represents offsets within the internal dictionary structure, and "
215214
"since the structure is sparse, the offsets are not consecutive."
216215
msgstr ""
216+
"迭代字典 *p* 中的所有键值对。 在第一次调用此函数开始迭代之前,由 *ppos* 所引用的 :c:type:`Py_ssize_t` 必须被初始化为"
217+
" ``0``;该函数将为字典中的每个键值对返回真值,一旦所有键值对都报告完毕则返回假值。 形参 *pkey* 和 *pvalue* 应当指向 "
218+
":c:expr:`PyObject*` 变量,它们将分别使用每个键和值来填充,或者也可以为 ``NULL``。 通过它们返回的任何引用都是暂借的。 "
219+
"*ppos* 在迭代期间不应被更改。 它的值表示内部字典结构中的偏移量,并且由于结构是稀疏的,因此偏移量并不连续。"
217220

218-
#: ../../c-api/dict.rst:176
221+
#: ../../c-api/dict.rst:183
219222
msgid "For example::"
220223
msgstr "例如:"
221224

222-
#: ../../c-api/dict.rst:186
225+
#: ../../c-api/dict.rst:193
223226
msgid ""
224227
"The dictionary *p* should not be mutated during iteration. It is safe to "
225228
"modify the values of the keys as you iterate over the dictionary, but only "
226229
"so long as the set of keys does not change. For example::"
227230
msgstr "字典 *p* 不应该在遍历期间发生改变。在遍历字典时,改变键中的值是安全的,但仅限于键的集合不发生改变。例如::"
228231

229-
#: ../../c-api/dict.rst:211
232+
#: ../../c-api/dict.rst:218
230233
msgid ""
231234
"Iterate over mapping object *b* adding key-value pairs to dictionary *a*. "
232235
"*b* may be a dictionary, or any object supporting :c:func:`PyMapping_Keys` "
@@ -239,7 +242,7 @@ msgstr ""
239242
":c:func:`PyObject_GetItem` 的对象。 如果 *override* 为真值,则如果在 *b* 中找到相同的键则 *a* "
240243
"中已存在的相应键值对将被替换,否则如果在 *a* 中没有相同的键则只是添加键值对。 当成功时返回 ``0`` 或者当引发异常时返回 ``-1``。"
241244

242-
#: ../../c-api/dict.rst:221
245+
#: ../../c-api/dict.rst:228
243246
msgid ""
244247
"This is the same as ``PyDict_Merge(a, b, 1)`` in C, and is similar to "
245248
"``a.update(b)`` in Python except that :c:func:`PyDict_Update` doesn't fall "
@@ -251,7 +254,7 @@ msgstr ""
251254
":c:func:`PyDict_Update` 在第二个参数没有 \"keys\" 属性时不会回退到迭代键值对的序列。 当成功时返回 ``0`` "
252255
"或者当引发异常时返回 ``-1``。"
253256

254-
#: ../../c-api/dict.rst:230
257+
#: ../../c-api/dict.rst:237
255258
msgid ""
256259
"Update or merge into dictionary *a*, from the key-value pairs in *seq2*. "
257260
"*seq2* must be an iterable object producing iterable objects of length 2, "
@@ -263,3 +266,23 @@ msgstr ""
263266
"将 *seq2* 中的键值对更新或合并到字典 *a*。 *seq2* 必须为产生长度为 2 的用作键值对的元素的可迭代对象。 当存在重复的键时,如果 "
264267
"*override* 真值则最后出现的键胜出。 当成功时返回 ``0`` 或者当引发异常时返回 ``-1``。 等价的 Python "
265268
"代码(返回值除外)::"
269+
270+
#: ../../c-api/dict.rst:8
271+
msgid "object"
272+
msgstr "object -- 对象"
273+
274+
#: ../../c-api/dict.rst:8
275+
msgid "dictionary"
276+
msgstr "dictionary -- 字典"
277+
278+
#: ../../c-api/dict.rst:73
279+
msgid "PyUnicode_FromString()"
280+
msgstr "PyUnicode_FromString()"
281+
282+
#: ../../c-api/dict.rst:164
283+
msgid "built-in function"
284+
msgstr "内置函数"
285+
286+
#: ../../c-api/dict.rst:164
287+
msgid "len"
288+
msgstr "len"

0 commit comments

Comments
 (0)