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

Skip to content

Commit 422f207

Browse files
[po] auto sync
1 parent 426e19f commit 422f207

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

library/logging.po

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,12 +965,15 @@ msgid ""
965965
"setting, unless the filter has also been applied to those descendant "
966966
"loggers."
967967
msgstr ""
968+
"请注意关联到处理程序的过滤器会在事件由处理程序发出之前被查询,而关联到日志记录器的过滤器则会在有事件被记录的的任何时候(使用 "
969+
":meth:`debug`, :meth:`info` 等等)在将事件发送给处理程序之前被查询。 "
970+
"这意味着由后代日志记录器生成的事件将不会被日志记录器的过滤器设置所过滤,除非该过滤器也已被应用于后代日志记录器。"
968971

969972
#: ../../library/logging.rst:660
970973
msgid ""
971974
"You don't actually need to subclass ``Filter``: you can pass any instance "
972975
"which has a ``filter`` method with the same semantics."
973-
msgstr ""
976+
msgstr "你实际上不需要子类化 ``Filter``: 你可以将传入任何包含 ``filter`` 方法的具有相同语义的的实例。"
974977

975978
#: ../../library/logging.rst:663
976979
msgid ""
@@ -982,6 +985,10 @@ msgid ""
982985
"callable and called with the record as the single parameter. The returned "
983986
"value should conform to that returned by :meth:`~Filter.filter`."
984987
msgstr ""
988+
"你不需要创建专门的 ``Filter`` 类,或使用具有 ``filter`` 方法的其他类:你可以使用一个函数(或其他可调用对象)作为过滤器。 "
989+
"过滤逻辑将检查过滤器对象是否文化的 ``filter`` 属性:如果有,就会将它当作是 ``Filter`` 并调用它的 "
990+
":meth:`~Filter.filter` 方法。 在其他情况下,则会将它当作是可调用对象并附带记录作为单一形参进行调用。 返回值应当与 "
991+
":meth:`~Filter.filter` 的返回值相一致。"
985992

986993
#: ../../library/logging.rst:673
987994
msgid ""
@@ -994,6 +1001,10 @@ msgid ""
9941001
"needs to be done with some care, but it does allow the injection of "
9951002
"contextual information into logs (see :ref:`filters-contextual`)."
9961003
msgstr ""
1004+
"虽然过滤器主要被用来根据比层级更复杂的规则来过滤记录,但它们可以查看 "
1005+
"由它们关联的处理程序或日志记录器所处理的每条记录:当你想要执行统计特定日志记录器或处理程序处理了多少条记录,或是在所处理的 "
1006+
":class:`LogRecord` 中添加、修改或移除属性这样的任务时该特性将很有用处。 显然改变 LogRecord "
1007+
"时需要相当小心,但将上下文信息注入日志确实是被允许的 (参见 :ref:`filters-contextual`)。"
9971008

9981009
#: ../../library/logging.rst:685
9991010
msgid "LogRecord Objects"

library/sys.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ msgstr "如果 Python 被配置为 --with-pydebug,本方法还将执行一些
344344
msgid ""
345345
"This function is specific to CPython. The exact output format is not "
346346
"defined here, and may change."
347-
msgstr ""
347+
msgstr "本函数仅限 CPython。此处没有定义确切的输出格式,且可能会更改。"
348348

349349
#: ../../library/sys.rst:235
350350
msgid "Integer specifying the handle of the Python DLL."

0 commit comments

Comments
 (0)