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

Skip to content

Commit dbb6cfe

Browse files
[po] auto sync
1 parent 9719944 commit dbb6cfe

14 files changed

Lines changed: 3145 additions & 2851 deletions

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "89.32%", "updated_at": "2023-09-02T15:42:13Z"}
1+
{"translation": "89.23%", "updated_at": "2023-09-08T16:42:53Z"}

c-api/dict.po

Lines changed: 29 additions & 39 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-09-01 14:43+0000\n"
14+
"POT-Creation-Date: 2023-09-08 14:42+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"
@@ -88,18 +88,14 @@ msgstr ""
8888
"使用 *key* 作为键将 *val* 插入字典 *p*。 *key* 必须为 :term:`hashable`;如果不是,则将引发 "
8989
":exc:`TypeError`。 成功时返回 ``0``,失败时返回 ``-1``。 此函数 *不会* 附带对 *val* 的引用。"
9090

91-
#: ../../c-api/dict.rst:75
91+
#: ../../c-api/dict.rst:73
9292
msgid ""
93-
"Insert *val* into the dictionary *p* using *key* as a key. *key* should be a"
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*."
93+
"This is the same as :c:func:`PyDict_SetItem`, but *key* is specified as a "
94+
":c:expr:`const char*` UTF-8 encoded bytes string, rather than a "
95+
":c:expr:`PyObject*`."
9796
msgstr ""
98-
"使用 *key* 作为键将 *val* 插入到字典 *p* 中。 *key* 应为 :c:expr:`const char*` UTF-8 "
99-
"编码的字节串。 键对象是使用 ``PyUnicode_FromString(key)`` 创建的。 成功时返回 ``0``,失败时返回 ``-1``。 "
100-
"此函数 *不会* 偷取对 *val* 的引用。"
10197

102-
#: ../../c-api/dict.rst:83
98+
#: ../../c-api/dict.rst:80
10399
msgid ""
104100
"Remove the entry in dictionary *p* with key *key*. *key* must be "
105101
":term:`hashable`; if it isn't, :exc:`TypeError` is raised. If *key* is not "
@@ -110,23 +106,21 @@ msgstr ""
110106
":exc:`TypeError`。 如果字典中没有 *key*,则会引发 :exc:`KeyError`。 成功时返回 ``0`` 或者失败时返回 "
111107
"``-1``。"
112108

113-
#: ../../c-api/dict.rst:91
109+
#: ../../c-api/dict.rst:88
114110
msgid ""
115-
"Remove the entry in dictionary *p* which has a key specified by the UTF-8 "
116-
"encoded bytes string *key*. If *key* is not in the dictionary, "
117-
":exc:`KeyError` is raised. Return ``0`` on success or ``-1`` on failure."
111+
"This is the same as :c:func:`PyDict_DelItem`, but *key* is specified as a "
112+
":c:expr:`const char*` UTF-8 encoded bytes string, rather than a "
113+
":c:expr:`PyObject*`."
118114
msgstr ""
119-
"移除字典 *p* 中由 UTF-8 编码的字节串 *key* 指定的键的条目。 如果字典中不存在 *key*,则会引发 :exc:`KeyError`。"
120-
" 成功时返回 ``0``,失败时返回 ``-1``。"
121115

122-
#: ../../c-api/dict.rst:99
116+
#: ../../c-api/dict.rst:95
123117
msgid ""
124118
"Return the object from dictionary *p* which has a key *key*. Return "
125119
"``NULL`` if the key *key* is not present, but *without* setting an "
126120
"exception."
127121
msgstr "从字典 *p* 中返回以 *key* 为键的对象。 如果键名 *key* 不存在但 *没有* 设置一个异常则返回 ``NULL``。"
128122

129-
#: ../../c-api/dict.rst:104
123+
#: ../../c-api/dict.rst:100
130124
msgid ""
131125
"Exceptions that occur while this calls :meth:`~object.__hash__` and "
132126
":meth:`~object.__eq__` methods are silently ignored. Prefer the "
@@ -135,13 +129,13 @@ msgstr ""
135129
"在调用 :meth:`~object.__hash__` 和 :meth:`~object.__eq__` 方法时发生的异常将被静默地忽略。 建议改用 "
136130
":c:func:`PyDict_GetItemWithError` 函数。"
137131

138-
#: ../../c-api/dict.rst:108
132+
#: ../../c-api/dict.rst:104
139133
msgid ""
140134
"Calling this API without :term:`GIL` held had been allowed for historical "
141135
"reason. It is no longer allowed."
142136
msgstr "在不保持 :term:`GIL` 的情况下调用此 API 曾因历史原因而被允许。 现在已不再被允许。"
143137

144-
#: ../../c-api/dict.rst:115
138+
#: ../../c-api/dict.rst:111
145139
msgid ""
146140
"Variant of :c:func:`PyDict_GetItem` that does not suppress exceptions. "
147141
"Return ``NULL`` **with** an exception set if an exception occurred. Return "
@@ -150,7 +144,7 @@ msgstr ""
150144
":c:func:`PyDict_GetItem` 的变种,它不会屏蔽异常。 当异常发生时将返回 ``NULL`` **并且** 设置一个异常。 "
151145
"如果键不存在则返回 ``NULL`` **并且不会** 设置一个异常。"
152146

153-
#: ../../c-api/dict.rst:123
147+
#: ../../c-api/dict.rst:119
154148
msgid ""
155149
"This is the same as :c:func:`PyDict_GetItem`, but *key* is specified as a "
156150
":c:expr:`const char*` UTF-8 encoded bytes string, rather than a "
@@ -159,7 +153,7 @@ msgstr ""
159153
"这与 :c:func:`PyDict_GetItem` 一样,但 *key* 是由一个 :c:expr:`const char*` UTF-8 "
160154
"编码的字节串来指定的,而不是 :c:expr:`PyObject*`。"
161155

162-
#: ../../c-api/dict.rst:129
156+
#: ../../c-api/dict.rst:125
163157
msgid ""
164158
"Exceptions that occur while this calls :meth:`~object.__hash__` and "
165159
":meth:`~object.__eq__` methods or while creating the temporary :class:`str` "
@@ -171,7 +165,7 @@ msgstr ""
171165
":class:`str` 对象期间发生的异常将被静默地忽略。 建议改用 :c:func:`PyDict_GetItemWithError` "
172166
"函数并附带你自己的 :c:func:`PyUnicode_FromString` *key*。"
173167

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

187-
#: ../../c-api/dict.rst:148
181+
#: ../../c-api/dict.rst:144
188182
msgid ""
189183
"Return a :c:type:`PyListObject` containing all the items from the "
190184
"dictionary."
191185
msgstr "返回一个包含字典中所有键值项的 :c:type:`PyListObject`。"
192186

193-
#: ../../c-api/dict.rst:153
187+
#: ../../c-api/dict.rst:149
194188
msgid ""
195189
"Return a :c:type:`PyListObject` containing all the keys from the dictionary."
196190
msgstr "返回一个包含字典中所有键(keys)的 :c:type:`PyListObject`。"
197191

198-
#: ../../c-api/dict.rst:158
192+
#: ../../c-api/dict.rst:154
199193
msgid ""
200194
"Return a :c:type:`PyListObject` containing all the values from the "
201195
"dictionary *p*."
202196
msgstr "返回一个包含字典中所有值(values)的 :c:type:`PyListObject`。"
203197

204-
#: ../../c-api/dict.rst:166
198+
#: ../../c-api/dict.rst:162
205199
msgid ""
206200
"Return the number of items in the dictionary. This is equivalent to "
207201
"``len(p)`` on a dictionary."
208202
msgstr "返回字典中项目数,等价于对字典 *p* 使用 ``len(p)``。"
209203

210-
#: ../../c-api/dict.rst:172
204+
#: ../../c-api/dict.rst:168
211205
msgid ""
212206
"Iterate over all key-value pairs in the dictionary *p*. The "
213207
":c:type:`Py_ssize_t` referred to by *ppos* must be initialized to ``0`` "
@@ -225,18 +219,18 @@ msgstr ""
225219
":c:expr:`PyObject*` 变量,它们将分别使用每个键和值来填充,或者也可以为 ``NULL``。 通过它们返回的任何引用都是暂借的。 "
226220
"*ppos* 在迭代期间不应被更改。 它的值表示内部字典结构中的偏移量,并且由于结构是稀疏的,因此偏移量并不连续。"
227221

228-
#: ../../c-api/dict.rst:183
222+
#: ../../c-api/dict.rst:179
229223
msgid "For example::"
230224
msgstr "例如:"
231225

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

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

252-
#: ../../c-api/dict.rst:228
246+
#: ../../c-api/dict.rst:224
253247
msgid ""
254248
"This is the same as ``PyDict_Merge(a, b, 1)`` in C, and is similar to "
255249
"``a.update(b)`` in Python except that :c:func:`PyDict_Update` doesn't fall "
@@ -261,7 +255,7 @@ msgstr ""
261255
":c:func:`PyDict_Update` 在第二个参数没有 \"keys\" 属性时不会回退到迭代键值对的序列。 当成功时返回 ``0`` "
262256
"或者当引发异常时返回 ``-1``。"
263257

264-
#: ../../c-api/dict.rst:237
258+
#: ../../c-api/dict.rst:233
265259
msgid ""
266260
"Update or merge into dictionary *a*, from the key-value pairs in *seq2*. "
267261
"*seq2* must be an iterable object producing iterable objects of length 2, "
@@ -282,14 +276,10 @@ msgstr "object -- 对象"
282276
msgid "dictionary"
283277
msgstr "dictionary -- 字典"
284278

285-
#: ../../c-api/dict.rst:73
286-
msgid "PyUnicode_FromString()"
287-
msgstr "PyUnicode_FromString()"
288-
289-
#: ../../c-api/dict.rst:164
279+
#: ../../c-api/dict.rst:160
290280
msgid "built-in function"
291281
msgstr "内置函数"
292282

293-
#: ../../c-api/dict.rst:164
283+
#: ../../c-api/dict.rst:160
294284
msgid "len"
295285
msgstr "len"

c-api/mapping.po

Lines changed: 33 additions & 41 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-04 14:46+0000\n"
14+
"POT-Creation-Date: 2023-09-08 14:42+0000\n"
1515
"PO-Revision-Date: 2023-05-24 02:09+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"
@@ -52,40 +52,30 @@ msgstr "成功时返回对象 *o* 中键的数量,失败时返回 ``-1``。
5252

5353
#: ../../c-api/mapping.rst:31
5454
msgid ""
55-
"Return element of *o* corresponding to the string *key* or ``NULL`` on "
56-
"failure. This is the equivalent of the Python expression ``o[key]``. See "
57-
"also :c:func:`PyObject_GetItem`."
55+
"This is the same as :c:func:`PyObject_GetItem`, but *key* is specified as a "
56+
":c:expr:`const char*` UTF-8 encoded bytes string, rather than a "
57+
":c:expr:`PyObject*`."
5858
msgstr ""
59-
"返回 *o* 中对应于字符串 *key* 的元素,或者失败时返回 ``NULL``。 这相当于 Python 表达式 ``o[key]``。 另请参见 "
60-
"also :c:func:`PyObject_GetItem`。"
6159

6260
#: ../../c-api/mapping.rst:38
6361
msgid ""
64-
"Map the string *key* to the value *v* in object *o*. Returns ``-1`` on "
65-
"failure. This is the equivalent of the Python statement ``o[key] = v``. See"
66-
" also :c:func:`PyObject_SetItem`. This function *does not* steal a "
67-
"reference to *v*."
62+
"This is the same as :c:func:`PyObject_SetItem`, but *key* is specified as a "
63+
":c:expr:`const char*` UTF-8 encoded bytes string, rather than a "
64+
":c:expr:`PyObject*`."
6865
msgstr ""
69-
"在对象 *o* 中将字符串 *key* 映射到值 *v*。 失败时返回 ``-1``。 这相当于 Python 语句 ``o[key] = v``。 "
70-
"另请参见 :c:func:`PyObject_SetItem`。 此函数 *不会* 增加对 *v* 的引用。"
7166

72-
#: ../../c-api/mapping.rst:46
73-
msgid ""
74-
"Remove the mapping for the object *key* from the object *o*. Return ``-1`` "
75-
"on failure. This is equivalent to the Python statement ``del o[key]``. This"
76-
" is an alias of :c:func:`PyObject_DelItem`."
67+
#: ../../c-api/mapping.rst:45
68+
msgid "This is an alias of :c:func:`PyObject_DelItem`."
7769
msgstr ""
78-
"从对象 *o* 中移除对象 *key* 的映射。 失败时返回 ``-1``。 这相当于 Python 语句 ``del o[key]``。 这是 "
79-
":c:func:`PyObject_DelItem` 的一个别名。"
8070

81-
#: ../../c-api/mapping.rst:53
71+
#: ../../c-api/mapping.rst:50
8272
msgid ""
83-
"Remove the mapping for the string *key* from the object *o*. Return ``-1`` "
84-
"on failure. This is equivalent to the Python statement ``del o[key]``."
73+
"This is the same as :c:func:`PyObject_DelItem`, but *key* is specified as a "
74+
":c:expr:`const char*` UTF-8 encoded bytes string, rather than a "
75+
":c:expr:`PyObject*`."
8576
msgstr ""
86-
"从对象 *o* 中移除字符串 *key* 的映射。 失败时返回 ``-1``。 这相当于 Python 语句 ``del o[key]``。"
8777

88-
#: ../../c-api/mapping.rst:59 ../../c-api/mapping.rst:70
78+
#: ../../c-api/mapping.rst:57
8979
msgid ""
9080
"Return ``1`` if the mapping object has the key *key* and ``0`` otherwise. "
9181
"This is equivalent to the Python expression ``key in o``. This function "
@@ -96,41 +86,43 @@ msgstr ""
9686

9787
#: ../../c-api/mapping.rst:63
9888
msgid ""
99-
"Note that exceptions which occur while calling the "
100-
":meth:`~object.__getitem__` method will get suppressed. To get error "
101-
"reporting use :c:func:`PyObject_GetItem()` instead."
89+
"Exceptions which occur when this calls :meth:`~object.__getitem__` method "
90+
"are silently ignored. For proper error handling, use "
91+
":c:func:`PyObject_GetItem()` instead."
92+
msgstr ""
93+
94+
#: ../../c-api/mapping.rst:70
95+
msgid ""
96+
"This is the same as :c:func:`PyMapping_HasKey`, but *key* is specified as a "
97+
":c:expr:`const char*` UTF-8 encoded bytes string, rather than a "
98+
":c:expr:`PyObject*`."
10299
msgstr ""
103-
"请注意在调用 :meth:`~object.__getitem__` 方法期间出现的异常将被抑制。 要获取错误报告请改用 "
104-
":c:func:`PyObject_GetItem()`。"
105100

106-
#: ../../c-api/mapping.rst:74
101+
#: ../../c-api/mapping.rst:76
107102
msgid ""
108-
"Note that exceptions which occur while calling the "
109-
":meth:`~object.__getitem__` method and creating a temporary string object "
110-
"will get suppressed. To get error reporting use "
111-
":c:func:`PyMapping_GetItemString()` instead."
103+
"Exceptions that occur when this calls :meth:`~object.__getitem__` method or "
104+
"while creating the temporary :class:`str` object are silently ignored. For "
105+
"proper error handling, use :c:func:`PyMapping_GetItemString` instead."
112106
msgstr ""
113-
"请注意在调用 :meth:`~object.__getitem__` 方法和创建临时字符串对象期间发生的异常将会被抑制。 要获取错误报告请改用 "
114-
":c:func:`PyMapping_GetItemString()`。"
115107

116-
#: ../../c-api/mapping.rst:81
108+
#: ../../c-api/mapping.rst:84
117109
msgid ""
118110
"On success, return a list of the keys in object *o*. On failure, return "
119111
"``NULL``."
120112
msgstr "成功时,返回对象 *o* 中的键的列表。 失败时,返回 ``NULL``。"
121113

122-
#: ../../c-api/mapping.rst:84 ../../c-api/mapping.rst:93
123-
#: ../../c-api/mapping.rst:102
114+
#: ../../c-api/mapping.rst:87 ../../c-api/mapping.rst:96
115+
#: ../../c-api/mapping.rst:105
124116
msgid "Previously, the function returned a list or a tuple."
125117
msgstr "在之前版本中,此函数返回一个列表或元组。"
126118

127-
#: ../../c-api/mapping.rst:90
119+
#: ../../c-api/mapping.rst:93
128120
msgid ""
129121
"On success, return a list of the values in object *o*. On failure, return "
130122
"``NULL``."
131123
msgstr "成功时,返回对象 *o* 中的值的列表。 失败时,返回 ``NULL``。"
132124

133-
#: ../../c-api/mapping.rst:99
125+
#: ../../c-api/mapping.rst:102
134126
msgid ""
135127
"On success, return a list of the items in object *o*, where each item is a "
136128
"tuple containing a key-value pair. On failure, return ``NULL``."

0 commit comments

Comments
 (0)