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

Skip to content

Commit 23f5ad3

Browse files
[po] auto sync
1 parent d7821cb commit 23f5ad3

33 files changed

Lines changed: 4934 additions & 5067 deletions

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "90.37%", "updated_at": "2023-12-09T02:42:08Z"}
1+
{"translation": "89.87%", "updated_at": "2023-12-15T16:42:16Z"}

c-api/exceptions.po

Lines changed: 306 additions & 309 deletions
Large diffs are not rendered by default.

c-api/function.po

Lines changed: 28 additions & 26 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-12-08 16:33+0000\n"
14+
"POT-Creation-Date: 2023-12-15 16:34+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"
@@ -61,77 +61,79 @@ msgstr "返回与代码对象 *code* 关联的新函数对象。 *globals* 必
6161
#: ../../c-api/function.rst:37
6262
msgid ""
6363
"The function's docstring and name are retrieved from the code object. "
64-
"*__module__* is retrieved from *globals*. The argument defaults, annotations"
65-
" and closure are set to ``NULL``. *__qualname__* is set to the same value as"
66-
" the code object's :attr:`~codeobject.co_qualname` field."
64+
":attr:`~function.__module__` is retrieved from *globals*. The argument "
65+
"defaults, annotations and closure are set to ``NULL``. "
66+
":attr:`~function.__qualname__` is set to the same value as the code object's"
67+
" :attr:`~codeobject.co_qualname` field."
6768
msgstr ""
6869

69-
#: ../../c-api/function.rst:45
70+
#: ../../c-api/function.rst:46
7071
msgid ""
7172
"As :c:func:`PyFunction_New`, but also allows setting the function object's "
72-
"``__qualname__`` attribute. *qualname* should be a unicode object or "
73-
"``NULL``; if ``NULL``, the ``__qualname__`` attribute is set to the same "
74-
"value as the code object's :attr:`~codeobject.co_qualname` field."
73+
":attr:`~function.__qualname__` attribute. *qualname* should be a unicode "
74+
"object or ``NULL``; if ``NULL``, the :attr:`!__qualname__` attribute is set "
75+
"to the same value as the code object's :attr:`~codeobject.co_qualname` "
76+
"field."
7577
msgstr ""
7678

77-
#: ../../c-api/function.rst:55
79+
#: ../../c-api/function.rst:57
7880
msgid "Return the code object associated with the function object *op*."
7981
msgstr "返回与函数对象 *op* 关联的代码对象。"
8082

81-
#: ../../c-api/function.rst:60
83+
#: ../../c-api/function.rst:62
8284
msgid ""
8385
"Return the globals dictionary associated with the function object *op*."
8486
msgstr "返回与函数对象*op*相关联的全局字典。"
8587

86-
#: ../../c-api/function.rst:65
88+
#: ../../c-api/function.rst:67
8789
msgid ""
88-
"Return a :term:`borrowed reference` to the *__module__* attribute of the "
89-
"function object *op*. It can be *NULL*."
90+
"Return a :term:`borrowed reference` to the :attr:`~function.__module__` "
91+
"attribute of the :ref:`function object <user-defined-funcs>` *op*. It can be"
92+
" *NULL*."
9093
msgstr ""
91-
"向函数对象 *op* 的 *__module__* 属性返回一个 :term:`borrowed reference`。 该值可以为 *NULL*。"
9294

93-
#: ../../c-api/function.rst:68
95+
#: ../../c-api/function.rst:71
9496
msgid ""
95-
"This is normally a string containing the module name, but can be set to any "
96-
"other object by Python code."
97-
msgstr "这通常为一个包含模块名称的字符串,但可以通过 Python 代码设为任何其他对象。"
97+
"This is normally a :class:`string <str>` containing the module name, but can"
98+
" be set to any other object by Python code."
99+
msgstr ""
98100

99-
#: ../../c-api/function.rst:74
101+
#: ../../c-api/function.rst:77
100102
msgid ""
101103
"Return the argument default values of the function object *op*. This can be "
102104
"a tuple of arguments or ``NULL``."
103105
msgstr "返回函数对象 *op* 的参数默认值。 这可以是一个参数元组或 ``NULL``。"
104106

105-
#: ../../c-api/function.rst:80
107+
#: ../../c-api/function.rst:83
106108
msgid ""
107109
"Set the argument default values for the function object *op*. *defaults* "
108110
"must be ``Py_None`` or a tuple."
109111
msgstr "为函数对象 *op* 设置参数默认值。 *defaults* 必须为 ``Py_None`` 或一个元组。"
110112

111-
#: ../../c-api/function.rst:83 ../../c-api/function.rst:97
112-
#: ../../c-api/function.rst:111
113+
#: ../../c-api/function.rst:86 ../../c-api/function.rst:100
114+
#: ../../c-api/function.rst:114
113115
msgid "Raises :exc:`SystemError` and returns ``-1`` on failure."
114116
msgstr "失败时引发 :exc:`SystemError` 异常并返回 ``-1`` 。"
115117

116-
#: ../../c-api/function.rst:88
118+
#: ../../c-api/function.rst:91
117119
msgid ""
118120
"Return the closure associated with the function object *op*. This can be "
119121
"``NULL`` or a tuple of cell objects."
120122
msgstr "返回关联到函数对象 *op* 的闭包。 这可以是 ``NULL`` 或 cell 对象的元组。"
121123

122-
#: ../../c-api/function.rst:94
124+
#: ../../c-api/function.rst:97
123125
msgid ""
124126
"Set the closure associated with the function object *op*. *closure* must be "
125127
"``Py_None`` or a tuple of cell objects."
126128
msgstr "设置关联到函数对象 *op* 的闭包。 *closure* 必须为 ``Py_None`` 或 cell 对象的元组。"
127129

128-
#: ../../c-api/function.rst:102
130+
#: ../../c-api/function.rst:105
129131
msgid ""
130132
"Return the annotations of the function object *op*. This can be a mutable "
131133
"dictionary or ``NULL``."
132134
msgstr "返回函数对象 *op* 的标注。 这可以是一个可变字典或 ``NULL``。"
133135

134-
#: ../../c-api/function.rst:108
136+
#: ../../c-api/function.rst:111
135137
msgid ""
136138
"Set the annotations for the function object *op*. *annotations* must be a "
137139
"dictionary or ``Py_None``."

howto/annotations.po

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ msgid ""
1212
msgstr ""
1313
"Project-Id-Version: Python 3.11\n"
1414
"Report-Msgid-Bugs-To: \n"
15-
"POT-Creation-Date: 2023-11-24 16:45+0000\n"
15+
"POT-Creation-Date: 2023-12-15 16:34+0000\n"
1616
"PO-Revision-Date: 2023-05-24 02:11+0000\n"
1717
"Last-Translator: Freesand Leo <[email protected]>, 2023\n"
1818
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -259,13 +259,11 @@ msgstr ""
259259

260260
#: ../../howto/annotations.rst:155
261261
msgid ""
262-
"If ``o`` is a callable (but not a class), use ``o.__globals__`` as the "
263-
"globals when calling :func:`eval`."
262+
"If ``o`` is a callable (but not a class), use :attr:`o.__globals__ "
263+
"<function.__globals__>` as the globals when calling :func:`eval`."
264264
msgstr ""
265-
"如果 ``o`` 是个可调用对象(但不是一个类),在调用 :func:`eval` 时,``o.__dict__`` 可视为 ``globals`` "
266-
"。"
267265

268-
#: ../../howto/annotations.rst:158
266+
#: ../../howto/annotations.rst:159
269267
msgid ""
270268
"However, not all string values used as annotations can be successfully "
271269
"turned into Python values by :func:`eval`. String values could theoretically"
@@ -276,19 +274,19 @@ msgstr ""
276274
"但并不是所有注解字符串都可以通过 :func:`eval` 成功地转化为 Python "
277275
"值。理论上,注解字符串中可以包含任何合法字符串,确实有一些类型提示的场合,需要用到特殊的 *无法* 被解析的字符串来作注解。比如:"
278276

279-
#: ../../howto/annotations.rst:165
277+
#: ../../howto/annotations.rst:166
280278
msgid ""
281279
":pep:`604` union types using ``|``, before support for this was added to "
282280
"Python 3.10."
283281
msgstr "在 Python 支持 :pep:`604` 的联合类型 ``|`` (Python 3.10) 之前使用它。"
284282

285-
#: ../../howto/annotations.rst:167
283+
#: ../../howto/annotations.rst:168
286284
msgid ""
287285
"Definitions that aren't needed at runtime, only imported when "
288286
":const:`typing.TYPE_CHECKING` is true."
289287
msgstr "运行时用不到的定义,只在 :const:`typing.TYPE_CHECKING` 为 True 时才会导入。"
290288

291-
#: ../../howto/annotations.rst:170
289+
#: ../../howto/annotations.rst:171
292290
msgid ""
293291
"If :func:`eval` attempts to evaluate such values, it will fail and raise an "
294292
"exception. So, when designing a library API that works with annotations, "
@@ -297,43 +295,43 @@ msgid ""
297295
msgstr ""
298296
"如果 :func:`eval` 试图求值,将会失败并触发异常。因此,当要设计一个可采用注解的库 API ,建议只在调用方显式请求的时才对字符串求值。"
299297

300-
#: ../../howto/annotations.rst:178
298+
#: ../../howto/annotations.rst:179
301299
msgid "Best Practices For ``__annotations__`` In Any Python Version"
302300
msgstr "任何版本 Python 中使用 ``__annotations__`` 的最佳实践"
303301

304-
#: ../../howto/annotations.rst:180
302+
#: ../../howto/annotations.rst:181
305303
msgid ""
306304
"You should avoid assigning to the ``__annotations__`` member of objects "
307305
"directly. Let Python manage setting ``__annotations__``."
308306
msgstr "应避免直接给对象的 ``__annotations__`` 成员赋值。请让 Python 来管理 ``__annotations__``。"
309307

310-
#: ../../howto/annotations.rst:183
308+
#: ../../howto/annotations.rst:184
311309
msgid ""
312310
"If you do assign directly to the ``__annotations__`` member of an object, "
313311
"you should always set it to a ``dict`` object."
314312
msgstr "如果直接给某对象的 ``__annotations__`` 成员赋值,应该确保设成一个 ``dict`` 对象。"
315313

316-
#: ../../howto/annotations.rst:186
314+
#: ../../howto/annotations.rst:187
317315
msgid ""
318316
"If you directly access the ``__annotations__`` member of an object, you "
319317
"should ensure that it's a dictionary before attempting to examine its "
320318
"contents."
321319
msgstr "如果直接访问某个对象的 ``__annotations__`` 成员,在解析其值之前,应先确认其为字典类型。"
322320

323-
#: ../../howto/annotations.rst:190
321+
#: ../../howto/annotations.rst:191
324322
msgid "You should avoid modifying ``__annotations__`` dicts."
325323
msgstr "应避免修改 ``__annotations__`` 字典。"
326324

327-
#: ../../howto/annotations.rst:192
325+
#: ../../howto/annotations.rst:193
328326
msgid ""
329327
"You should avoid deleting the ``__annotations__`` attribute of an object."
330328
msgstr "应避免删除对象的 ``__annotations__`` 属性。"
331329

332-
#: ../../howto/annotations.rst:197
330+
#: ../../howto/annotations.rst:198
333331
msgid "``__annotations__`` Quirks"
334332
msgstr "``__annotations__`` 的坑"
335333

336-
#: ../../howto/annotations.rst:199
334+
#: ../../howto/annotations.rst:200
337335
msgid ""
338336
"In all versions of Python 3, function objects lazy-create an annotations "
339337
"dict if no annotations are defined on that object. You can delete the "
@@ -350,13 +348,13 @@ msgstr ""
350348
"``AttributeError`` 异常;连续两次调用 ``del fn.__annotations__`` 一定会抛出一次 "
351349
"``AttributeError`` 异常。"
352350

353-
#: ../../howto/annotations.rst:209
351+
#: ../../howto/annotations.rst:210
354352
msgid ""
355353
"Everything in the above paragraph also applies to class and module objects "
356354
"in Python 3.10 and newer."
357355
msgstr "以上同样适用于 Python 3.10 以上版本中的类和模块对象。"
358356

359-
#: ../../howto/annotations.rst:212
357+
#: ../../howto/annotations.rst:213
360358
msgid ""
361359
"In all versions of Python 3, you can set ``__annotations__`` on a function "
362360
"object to ``None``. However, subsequently accessing the annotations on that"
@@ -370,7 +368,7 @@ msgstr ""
370368
"``fn.__annotations__`` 访问该对象的注解时,会像本节第一段所述那样,直接创建一个空字典。但在任何 Python "
371369
"版本中,模块和类均非如此,他们允许将 ``__annotations__`` 设为任意 Python 值,并且会留存所设值。"
372370

373-
#: ../../howto/annotations.rst:220
371+
#: ../../howto/annotations.rst:221
374372
msgid ""
375373
"If Python stringizes your annotations for you (using ``from __future__ "
376374
"import annotations``), and you specify a string as an annotation, the string"
@@ -380,7 +378,7 @@ msgstr ""
380378
"如果 Python 会对注解作字符串化处理(用 ``from __future__ import annotations`` "
381379
"),并且注解本身就是一个字符串,那么将会为其加上引号。实际效果就是,注解加了 *两次* 引号。例如:"
382380

383-
#: ../../howto/annotations.rst:231
381+
#: ../../howto/annotations.rst:232
384382
msgid ""
385383
"This prints ``{'a': \"'str'\"}``. This shouldn't really be considered a "
386384
"\"quirk\"; it's mentioned here simply because it might be surprising."

0 commit comments

Comments
 (0)