Skip to content

Commit ea641c0

Browse files
[po] auto sync
1 parent 74d0513 commit ea641c0

File tree

4 files changed

+59
-7
lines changed

4 files changed

+59
-7
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "81.64%", "updated_at": "2025-07-12T04:08:24Z"}
1+
{"translation": "81.66%", "updated_at": "2025-07-12T07:00:00Z"}

howto/logging-cookbook.po

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7802,6 +7802,9 @@ msgid ""
78027802
"uniformly formatted as if it was logged separately, you can do this using a "
78037803
"handler mixin, as in the following snippet:"
78047804
msgstr ""
7805+
"通常,被记录的消息(输出到控制台或文件)是由单行文本组成的。 不过,在某些时候也会需要处理具有多行的消息 —— "
7806+
"不论是因为日志格式字符串包含换行符,还是因为被记录的数据包含换行符。 "
7807+
"如果你想以统一的方式处理此类消息,使得被记录的消息中的每一行格式看起来保持一致就像它是被单独记录的,你可以使用处理器混入类做到这一点,如下面的代码片段所示:"
78057808

78067809
#: ../../howto/logging-cookbook.rst:4079
78077810
msgid ""
@@ -7821,10 +7824,25 @@ msgid ""
78217824
" rec.msg = line\n"
78227825
" super().emit(rec)"
78237826
msgstr ""
7827+
"# 假定这是在一个模块的 mymixins.py 中\n"
7828+
"import copy\n"
7829+
"\n"
7830+
"class MultilineMixin:\n"
7831+
"def emit(self, record):\n"
7832+
"s = record.getMessage()\n"
7833+
"if '\\n' not in s:\n"
7834+
"super().emit(record)\n"
7835+
"else:\n"
7836+
"lines = s.splitlines()\n"
7837+
"rec = copy.copy(record)\n"
7838+
"rec.args = None\n"
7839+
"for line in lines:\n"
7840+
"rec.msg = line\n"
7841+
"super().emit(rec)"
78247842

78257843
#: ../../howto/logging-cookbook.rst:4097
78267844
msgid "You can use the mixin as in the following script:"
7827-
msgstr ""
7845+
msgstr "你可以像下面的脚本一样使用该混入类:"
78287846

78297847
#: ../../howto/logging-cookbook.rst:4099
78307848
msgid ""
@@ -7845,10 +7863,26 @@ msgid ""
78457863
" logger.debug('Another single line')\n"
78467864
" logger.debug('Multiple lines:\\n%s', 'fool me ...\\ncan\\'t get fooled again')"
78477865
msgstr ""
7866+
"import logging\n"
7867+
"\n"
7868+
"from mymixins import MultilineMixin\n"
7869+
"\n"
7870+
"logger = logging.getLogger(__name__)\n"
7871+
"\n"
7872+
"class StreamHandler(MultilineMixin, logging.StreamHandler):\n"
7873+
" pass\n"
7874+
"\n"
7875+
"if __name__ == '__main__':\n"
7876+
" logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)-9s %(message)s',\n"
7877+
" handlers = [StreamHandler()])\n"
7878+
" logger.debug('Single line')\n"
7879+
" logger.debug('Multiple lines:\\nfool me once ...')\n"
7880+
" logger.debug('Another single line')\n"
7881+
" logger.debug('Multiple lines:\\n%s', 'fool me ...\\ncan\\'t get fooled again')"
78487882

78497883
#: ../../howto/logging-cookbook.rst:4118
78507884
msgid "The script, when run, prints something like:"
7851-
msgstr ""
7885+
msgstr "在运行时,这个脚本将打印如下内容:"
78527886

78537887
#: ../../howto/logging-cookbook.rst:4120
78547888
msgid ""
@@ -7860,6 +7894,13 @@ msgid ""
78607894
"2025-07-02 13:54:47,234 DEBUG fool me ...\n"
78617895
"2025-07-02 13:54:47,234 DEBUG can't get fooled again"
78627896
msgstr ""
7897+
"2025-07-02 13:54:47,234 DEBUG Single line\n"
7898+
"2025-07-02 13:54:47,234 DEBUG Multiple lines:\n"
7899+
"2025-07-02 13:54:47,234 DEBUG fool me once ...\n"
7900+
"2025-07-02 13:54:47,234 DEBUG Another single line\n"
7901+
"2025-07-02 13:54:47,234 DEBUG Multiple lines:\n"
7902+
"2025-07-02 13:54:47,234 DEBUG fool me ...\n"
7903+
"2025-07-02 13:54:47,234 DEBUG can't get fooled again"
78637904

78647905
#: ../../howto/logging-cookbook.rst:4130
78657906
msgid ""

library/codecs.po

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2850,22 +2850,24 @@ msgid ""
28502850
"underscore, leading and trailing underscores are removed. For example, ``' "
28512851
"-;#'`` becomes ``'_'``."
28522852
msgstr ""
2853+
"规范化的运作方式如下:用于 Python 包名称的点号除外的所有非字母数字类字符都会被缩减替换为一个下划线,开头和末尾的下划线将被移除。 例如,``'"
2854+
" -;#'`` 将变为 ``'_'``。"
28532855

28542856
#: ../../library/codecs.rst:1511
28552857
msgid "Note that *encoding* should be ASCII only."
2856-
msgstr ""
2858+
msgstr "请注意 *encoding* 应当仅用 ASCII 字符。"
28572859

28582860
#: ../../library/codecs.rst:1515
28592861
msgid ""
28602862
"The following function should not be used directly, except for testing "
28612863
"purposes; :func:`codecs.lookup` should be used instead."
2862-
msgstr ""
2864+
msgstr "以下函数不应被直接使用,除非出于测试目的;应当改用 :func:`codecs.lookup`。"
28632865

28642866
#: ../../library/codecs.rst:1521
28652867
msgid ""
28662868
"Search for the codec module corresponding to the given encoding name "
28672869
"*encoding*."
2868-
msgstr ""
2870+
msgstr "搜索与给定的编码格式名称 *encoding* 对应的编解码器模块。"
28692871

28702872
#: ../../library/codecs.rst:1524
28712873
msgid ""

library/email.compat32-message.po

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#
66
# Translators:
77
# Rafael Fontenelle <rffontenelle@gmail.com>, 2025
8+
# Freesand Leo <yuqinju@163.com>, 2025
89
#
910
#, fuzzy
1011
msgid ""
@@ -13,7 +14,7 @@ msgstr ""
1314
"Report-Msgid-Bugs-To: \n"
1415
"POT-Creation-Date: 2025-07-11 15:02+0000\n"
1516
"PO-Revision-Date: 2025-05-08 05:09+0000\n"
16-
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2025\n"
17+
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2025\n"
1718
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1819
"MIME-Version: 1.0\n"
1920
"Content-Type: text/plain; charset=UTF-8\n"
@@ -297,6 +298,9 @@ msgid ""
297298
":meth:`~email.message.EmailMessage.set_content` and the related ``make`` and"
298299
" ``add`` methods."
299300
msgstr ""
301+
"这是一个旧式方法。 在 :class:`~email.message.EmailMessage` 类上它的功能已被 "
302+
":meth:`~email.message.EmailMessage.set_content` 及相关的 ``make`` 和 ``add`` "
303+
"方法所替代。"
300304

301305
#: ../../library/email.compat32-message.rst:191
302306
msgid ""
@@ -369,6 +373,9 @@ msgid ""
369373
":meth:`~email.message.EmailMessage.get_content` and "
370374
":meth:`~email.message.EmailMessage.iter_parts`."
371375
msgstr ""
376+
"这是一个遗留方法。 在 :class:`~email.message.EmailMessage` 类上它的功能已被 "
377+
":meth:`~email.message.EmailMessage.get_content` 和 "
378+
":meth:`~email.message.EmailMessage.iter_parts` 所替代。"
372379

373380
#: ../../library/email.compat32-message.rst:234
374381
msgid ""
@@ -385,6 +392,8 @@ msgid ""
385392
"its functionality is replaced by "
386393
":meth:`~email.message.EmailMessage.set_content`."
387394
msgstr ""
395+
"这是一个遗留方法。 在 :class:`~email.message.EmailMessage` 类上它的功能已被 "
396+
":meth:`~email.message.EmailMessage.set_content` 所替代。"
388397

389398
#: ../../library/email.compat32-message.rst:245
390399
msgid ""

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy