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

Skip to content

Commit 5730b58

Browse files
[po] auto sync
1 parent 6caaa48 commit 5730b58

21 files changed

Lines changed: 604 additions & 265 deletions

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "92.60%", "updated_at": "2024-03-22T17:42:00Z"}
1+
{"translation": "92.94%", "updated_at": "2024-03-23T01:55:41Z"}

faq/design.po

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
66
# Translators:
7-
# Rafael Fontenelle <[email protected]>, 2023
7+
# Rafael Fontenelle <[email protected]>, 2024
88
#
99
#, fuzzy
1010
msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.11\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2024-03-15 16:48+0000\n"
14+
"POT-Creation-Date: 2024-03-22 16:49+0000\n"
1515
"PO-Revision-Date: 2023-05-24 02:10+0000\n"
16-
"Last-Translator: Rafael Fontenelle <[email protected]>, 2023\n"
16+
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1818
"MIME-Version: 1.0\n"
1919
"Content-Type: text/plain; charset=UTF-8\n"
@@ -400,6 +400,9 @@ msgid ""
400400
"``match ... case`` statement. An older alternative is a sequence of ``if... "
401401
"elif... elif... else``."
402402
msgstr ""
403+
"总的来说,结构化分支语句会在一个表达式具有特定值或值的集合时执行某个代码块。 从 Python 3.10 开始可以简单地通过 ``match ... "
404+
"case`` 语句来匹配字面值,或特定命名空间中的常量。 一种较旧的替代方案是通过一系列的 ``if... elif... elif... "
405+
"else``。"
403406

404407
#: ../../faq/design.rst:267
405408
msgid ""
@@ -426,7 +429,7 @@ msgstr "建议对方法名使用前缀,例如本例中的 ``visit_`` 。如果
426429
msgid ""
427430
"Imitating switch with fallthrough, as with C's switch-case-default, is "
428431
"possible, much harder, and less needed."
429-
msgstr ""
432+
msgstr "模仿带有穿透方式的分支,就像 C 的 switch-case-default 那样是有可能的,但更为困难,也无甚必要。"
430433

431434
#: ../../faq/design.rst:299
432435
msgid ""

faq/extending.po

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
66
# Translators:
7-
# Rafael Fontenelle <[email protected]>, 2023
7+
# Rafael Fontenelle <[email protected]>, 2024
88
#
99
#, fuzzy
1010
msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.11\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2024-03-15 16:48+0000\n"
14+
"POT-Creation-Date: 2024-03-22 16:49+0000\n"
1515
"PO-Revision-Date: 2023-05-24 02:10+0000\n"
16-
"Last-Translator: Rafael Fontenelle <[email protected]>, 2023\n"
16+
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1818
"MIME-Version: 1.0\n"
1919
"Content-Type: text/plain; charset=UTF-8\n"
@@ -91,6 +91,11 @@ msgid ""
9191
"<https://github.com/scipy/weave>`_ are also alternatives for wrapping C++ "
9292
"libraries."
9393
msgstr ""
94+
"如果你需要针对某些当前不存在 Python 扩展的 C 或 C++ 库的接口,你可以尝试使用 `SWIG "
95+
"<https://www.swig.org>`_ 等工具来包装这些库的数据类型和函数。 `SIP <https://github.com/Python-"
96+
"SIP/sip>`__, `CXX <https://cxx.sourceforge.net/>`_ `Boost "
97+
"<https://www.boost.org/libs/python/doc/index.html>`_ 或者 `Weave "
98+
"<https://github.com/scipy/weave>`_ 也是用于包装 C++ 库的替代方案。"
9499

95100
#: ../../faq/extending.rst:61
96101
msgid "How can I execute arbitrary Python statements from C?"

glossary.po

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1696,6 +1696,9 @@ msgid ""
16961696
":func:`collections.namedtuple`. The latter techniques also add some extra "
16971697
"methods that may not be found in hand-written or built-in named tuples."
16981698
msgstr ""
1699+
"有些具名元组是内置类型(比如上面的例子)。 此外,具名元组还可通过常规类定义从 :class:`tuple` 继承并定义指定名称的字段的方式来创建。 "
1700+
"这样的类可以手工编号,或者也可以通过继承 :class:`typing.NamedTuple`,或者使用工厂函数 "
1701+
":func:`collections.namedtuple` 来创建。 后一种方式还会添加一些手工编写或内置的具名元组所没有的额外方法。"
16991702

17001703
#: ../../glossary.rst:848
17011704
msgid "namespace"

howto/annotations.po

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
# SOME DESCRIPTIVE TITLE.
2-
# Copyright (C) 2001-2023, Python Software Foundation
2+
# Copyright (C) 2001-2024, 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]>, 2023
8-
# Rafael Fontenelle <[email protected]>, 2023
7+
# Rafael Fontenelle <[email protected]>, 2024
98
#
109
#, fuzzy
1110
msgid ""
1211
msgstr ""
1312
"Project-Id-Version: Python 3.11\n"
1413
"Report-Msgid-Bugs-To: \n"
15-
"POT-Creation-Date: 2023-12-23 00:32+0000\n"
14+
"POT-Creation-Date: 2024-03-22 16:49+0000\n"
1615
"PO-Revision-Date: 2023-05-24 02:11+0000\n"
17-
"Last-Translator: Rafael Fontenelle <[email protected]>, 2023\n"
16+
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
1817
"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"
@@ -24,7 +23,7 @@ msgstr ""
2423

2524
#: ../../howto/annotations.rst:5
2625
msgid "Annotations Best Practices"
27-
msgstr "对象注解属性的最佳实践"
26+
msgstr "注解最佳实践"
2827

2928
#: ../../howto/annotations.rst:0
3029
msgid "author"
@@ -34,7 +33,7 @@ msgstr "作者"
3433
msgid "Larry Hastings"
3534
msgstr "Larry Hastings"
3635

37-
#: ../../howto/annotations.rstNone
36+
#: ../../howto/annotations.rst-1
3837
msgid "Abstract"
3938
msgstr "摘要"
4039

@@ -44,9 +43,7 @@ msgid ""
4443
" annotations dicts. If you write Python code that examines "
4544
"``__annotations__`` on Python objects, we encourage you to follow the "
4645
"guidelines described below."
47-
msgstr ""
48-
"本文意在汇聚对象的注解字典用法的最佳实践。 如果 Python 代码会去查看 Python 对象的 ``__annotations__`` "
49-
"属性,建议遵循以下准则。"
46+
msgstr "本文档旨在概括与注解字典打交道的最佳实践。查看 Python 对象的 ``__annotations__`` 的代码应遵循下述准则。"
5047

5148
#: ../../howto/annotations.rst:16
5249
msgid ""
@@ -56,8 +53,9 @@ msgid ""
5653
"and older, other best practices for ``__annotations__`` that apply to any "
5754
"Python version, and quirks of ``__annotations__``."
5855
msgstr ""
59-
"本文分为四个部分:在 Python 3.10 以上版本中访问对象注解的最佳实践、在Python 3.9 以上版本中访问对象注解的最佳实践、适用于任何 "
60-
"Python 版本的其他 ``__annotations__`` 最佳实践、``__annotations__`` 的特别之处。"
56+
"本文档按四部分组织:在 3.10 及更高版本的 Python 中查看对象注解的最佳实践、在 3.9 及更低版本的 Python "
57+
"中查看对象注解的最佳实践、其它一些适于任何版本的 Python 的 ``__annotations__`` "
58+
"的最佳实践、``__annotations__`` 的一些“坑”。"
6159

6260
#: ../../howto/annotations.rst:26
6361
msgid ""
@@ -66,12 +64,12 @@ msgid ""
6664
"information on how to use \"type hints\" in your code, please see the "
6765
":mod:`typing` module."
6866
msgstr ""
69-
"请注意,本文是专门介绍 ``__annotations__`` 的,而不是介绍注解的用法。若要了解“类型提示”的使用信息,请参阅 "
67+
"本文是 ``__annotations__`` 的文档,不是介绍注解用法的文档。如果要查找关于如何使用“类型提示”的信息,请参阅 "
7068
":mod:`typing` 模块。"
7169

7270
#: ../../howto/annotations.rst:33
7371
msgid "Accessing The Annotations Dict Of An Object In Python 3.10 And Newer"
74-
msgstr "在 Python 3.10 以上版本中访问对象的注解字典"
72+
msgstr "在 3.10 及更高版本的 Python 中访问对象的注解字典"
7573

7674
#: ../../howto/annotations.rst:35
7775
msgid ""
@@ -81,8 +79,8 @@ msgid ""
8179
"any object that supports annotations. This function can also \"un-"
8280
"stringize\" stringized annotations for you."
8381
msgstr ""
84-
"Python 3.10 在标准库中加入了一个新函数::func:`inspect.get_annotations`。在 Python 3.10 "
85-
"以上的版本中,调用该函数就是访问对象注解字典的最佳做法。该函数还可以“解析”字符串形式的注解。"
82+
"Python 3.10 在标准库中加入了一个新函数::func:`inspect.get_annotations`。在 3.10 及更高版本的 "
83+
"Python 中,调用该函数就是访问任何支持注解的对象的注解字典的最佳实践。该函数还可以为你“解析”字符串化了的注解。"
8684

8785
#: ../../howto/annotations.rst:42
8886
msgid ""
@@ -94,10 +92,10 @@ msgid ""
9492
"of these three *specific* objects, you may simply use ``o.__annotations__`` "
9593
"to get at the object's annotations dict."
9694
msgstr ""
97-
"有时会因为某些原因看不到 :func:`inspect.get_annotations` ,也可以直接访问 ``__annotations__`` "
98-
"数据成员。这方面的最佳实践在 Python 3.10 中也发生了变化:从 Python 3.10 开始,Python 函数、类和模块的 "
99-
"``o.__annotations__`` *保证* 可用。如果确定是要查看这三种对象,只要利用 ``o.__annotations__`` "
100-
"读取对象的注释字典即可。"
95+
"不用 :func:`inspect.get_annotations` 也可以手动访问``__annotations__`` "
96+
"这一数据成员。该方法的最佳实践在 Python 3.10 中也发生了变化:从 Python 3.10 开始,对于 Python "
97+
"函数、类和模块,``o.__annotations__`` *保证* 会正常工作。只要你确信所检查的对象是这三种之一,你便可以用 "
98+
"``o.__annotations__`` 获取该对象的注解字典。"
10199

102100
#: ../../howto/annotations.rst:52
103101
msgid ""
@@ -108,9 +106,9 @@ msgid ""
108106
":func:`getattr` with three arguments, for example ``getattr(o, "
109107
"'__annotations__', None)``."
110108
msgstr ""
111-
"不过其他类型的可调用对象可能就没有定义 ``__annotations__`` 属性,比如由 :func:`functools.partial` "
112-
"创建的可调用对象。当访问某个未知对象的 ``__annotations__`` 时,Python 3.10 以上版本的最佳做法是带三个参数去调用 "
113-
":func:`getattr` ,比如 ``getattr(o, '__annotations__', None)``。"
109+
"不过,其它类型的可调用对象可不一定定义了 ``__annotations__`` 属性,就比如说,:func:`functools.partial` "
110+
"创建的可调用对象。当访问某个未知对象的 ``__annotations__`` 时,3.10 及更高版本的 Python 中的最佳实践是用三个参数去调用"
111+
" :func:`getattr`,类似 ``getattr(o, '__annotations__', None)`` 这样。"
114112

115113
#: ../../howto/annotations.rst:60
116114
msgid ""
@@ -119,20 +117,19 @@ msgid ""
119117
"parent's ``__annotations__``. In Python 3.10 and newer, the child class's "
120118
"annotations will be an empty dict instead."
121119
msgstr ""
122-
"Python 3.10 之前,在一个未定义标注但具有定义了标注的父类的类上访问 ``__annotations__`` 将返回父类的 "
123-
"``__annotations__``。 在 Python 3.10 和更新的版本中,子类的标注将改为一个空字典。"
120+
"Python 3.10 之前,在一个没定义注解而父类定义了注解的类上访问 ``__annotations__`` 将返回父类的 "
121+
"``__annotations__``。3.10 及更高版本的 Python 中,这样的子类的标注是一个空字典。"
124122

125123
#: ../../howto/annotations.rst:68
126124
msgid "Accessing The Annotations Dict Of An Object In Python 3.9 And Older"
127-
msgstr "在 Python 3.9 及更早的版本中访问对象的注解字典"
125+
msgstr "在 3.9 及更低版本的 Python 中访问对象的注解字典"
128126

129127
#: ../../howto/annotations.rst:70
130128
msgid ""
131129
"In Python 3.9 and older, accessing the annotations dict of an object is much"
132130
" more complicated than in newer versions. The problem is a design flaw in "
133131
"these older versions of Python, specifically to do with class annotations."
134-
msgstr ""
135-
"在 Python 3.9 及之前的版本中,访问对象的注解字典要比新版本中复杂得多。这个是 Python 低版本的一个设计缺陷,特别是访问类的注解时。"
132+
msgstr "在 3.9 及更低版本的 Python 中访问对象的注解字典要比新版复杂。这是低版本 Python 的设计缺陷,特别是类的注解。"
136133

137134
#: ../../howto/annotations.rst:75
138135
msgid ""
@@ -142,8 +139,8 @@ msgid ""
142139
"should use three-argument :func:`getattr` to access the object's "
143140
"``__annotations__`` attribute."
144141
msgstr ""
145-
"要访问其他对象——函数、可调用对象和模块——的注释字典,最佳做法与 3.10 版本相同,假定不想调用 "
146-
":func:`inspect.get_annotations`:你应该用三个参数调用 :func:`getattr` 以访问对象的 "
142+
"访问其它对象——函数、其它可调用对象和模块——的注解字典的最佳实践与 3.10 版本相同,如果不用 "
143+
":func:`inspect.get_annotations`,就用三个参数去调用 :func:`getattr` 以访问对象的 "
147144
"``__annotations__`` 属性。"
148145

149146
#: ../../howto/annotations.rst:82

howto/logging-cookbook.po

Lines changed: 3 additions & 1 deletion
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: 2024-03-15 16:48+0000\n"
14+
"POT-Creation-Date: 2024-03-22 16:49+0000\n"
1515
"PO-Revision-Date: 2023-05-24 02:11+0000\n"
1616
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -2177,6 +2177,8 @@ msgid ""
21772177
"earlier versions of Qt. Please refer to the comments in the code snippet for"
21782178
" more detailed information."
21792179
msgstr ""
2180+
"以下代码应当适用于最新版的 ``PySide6``, ``PyQt6``, ``PySide2`` 或 ``PyQt5``。 "
2181+
"你也可以将此方式适配到更早的 Qt 版本。 请参阅代码片段中的注释来获取更详细的信息。"
21802182

21812183
#: ../../howto/logging-cookbook.rst:3658
21822184
msgid "Logging to syslog with RFC5424 support"

howto/logging.po

Lines changed: 19 additions & 3 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: 2024-03-15 16:48+0000\n"
14+
"POT-Creation-Date: 2024-03-22 16:49+0000\n"
1515
"PO-Revision-Date: 2023-05-24 02:11+0000\n"
1616
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -63,6 +63,10 @@ msgid ""
6363
"see which logger methods to use when, see the table below. It states, for "
6464
"each of a set of common tasks, the best tool to use for that task."
6565
msgstr ""
66+
"你可以通过执行 ``logger = getLogger(__name__)`` 创建一个日志记录器然后调用日志记录器的 "
67+
":meth:`~Logger.debug`, :meth:`~Logger.info`, :meth:`~Logger.warning`, "
68+
":meth:`~Logger.error` 和 :meth:`~Logger.critical` 方法来使用日志记录功能。 "
69+
"要确定何时使用日志记录,以及确定要使用哪个日志记录器方法,请参阅下表。 它针对一组常见任务中的每一个都列出了最适合该任务的工具。"
6670

6771
#: ../../howto/logging.rst:33
6872
msgid "Task you want to perform"
@@ -93,6 +97,7 @@ msgid ""
9397
"A logger's :meth:`~Logger.info` (or :meth:`~Logger.debug` method for very "
9498
"detailed output for diagnostic purposes)"
9599
msgstr ""
100+
"日志记录器的 :meth:`~Logger.info` (或者对于诊断目的需要非常详细的输出时则使用 :meth:`~Logger.debug` 方法)"
96101

97102
#: ../../howto/logging.rst:44
98103
msgid "Issue a warning regarding a particular runtime event"
@@ -108,7 +113,7 @@ msgstr ":func:`warnings.warn` 位于代码库中,该事件是可以避免的
108113
msgid ""
109114
"A logger's :meth:`~Logger.warning` method if there is nothing the client "
110115
"application can do about the situation, but the event should still be noted"
111-
msgstr ""
116+
msgstr "对于客户端应用无法干预,但事件仍然需要被关注的场合则使用日志记录器的 :meth:`~Logger.warning` 方法"
112117

113118
#: ../../howto/logging.rst:55
114119
msgid "Report an error regarding a particular runtime event"
@@ -130,13 +135,15 @@ msgid ""
130135
":meth:`~Logger.critical` method as appropriate for the specific error and "
131136
"application domain"
132137
msgstr ""
138+
"日志记录器的 :meth:`~Logger.error`, :meth:`~Logger.exception` 或 "
139+
":meth:`~Logger.critical` 方法分别适用于特定的错误及应用领域"
133140

134141
#: ../../howto/logging.rst:65
135142
msgid ""
136143
"The logger methods are named after the level or severity of the events they "
137144
"are used to track. The standard levels and their applicability are described"
138145
" below (in increasing order of severity):"
139-
msgstr ""
146+
msgstr "日志记录器方法以它们所追踪的事件级别或严重程度来命名。 标准的级别及其适用性如下所述(严重程序从低至高):"
140147

141148
#: ../../howto/logging.rst:72 ../../howto/logging.rst:827
142149
msgid "Level"
@@ -228,6 +235,9 @@ msgid ""
228235
"i.e. 'Watch out!'. The actual output can be formatted quite flexibly if you "
229236
"need that; formatting options will also be explained later."
230237
msgstr ""
238+
"在控制台上打印出来。 ``INFO`` 消息没有出现是因为默认级别为 ``WARNING``。 "
239+
"打印的消息包括在日志记录调用中提供的事件级别和描述信息,例如 'Watch out!'。 "
240+
"实际输出可以按你的需要相当灵活地格式化;格式化选项也将在后文中进行说明。"
231241

232242
#: ../../howto/logging.rst:124
233243
msgid ""
@@ -240,6 +250,10 @@ msgid ""
240250
"reason as well as others, it's better to create loggers and call their "
241251
"methods."
242252
msgstr ""
253+
"请注意在这个例子中,我们是直接使用 ``logging`` 模块的函数,比如 ``logging.debug``,而不是创建一个日志记录器并调用其方法。"
254+
" 这些函数是在根日志记录器上操作的,但它们在未被调用时将会调用 :func:`~logging.basicConfig` "
255+
"来发挥作用,就像在这个例子中那样。 然而在更大的程序中你通常会需要显式地控制日志记录的配置 —— "
256+
"所以出于这样那样的理由,最好还是创建日志记录器并调用其方法。"
243257

244258
#: ../../howto/logging.rst:133
245259
msgid "Logging to a file"
@@ -304,6 +318,8 @@ msgid ""
304318
" methods such as :meth:`~Logger.debug`, :meth:`~Logger.info`, etc. "
305319
"Otherwise, that logging event may not be handled in the desired manner."
306320
msgstr ""
321+
"对 :func:`basicConfig` 的调用应当在任何对日志记录器方法的调用如 :meth:`~Logger.debug`, "
322+
":meth:`~Logger.info` 等 *之前* 执行。 否则,日志记录事件可能无法以预期的方式来处理。"
307323

308324
#: ../../howto/logging.rst:195
309325
msgid ""

0 commit comments

Comments
 (0)