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

Skip to content

Commit 6ee2a85

Browse files
[po] auto sync
1 parent 9f1a5e5 commit 6ee2a85

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

howto/logging-cookbook.po

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,11 +1436,11 @@ msgid ""
14361436
"While the above treatment is simplistic, it points the way to how exception "
14371437
"information can be formatted to your liking. The :mod:`traceback` module may"
14381438
" be helpful for more specialized needs."
1439-
msgstr ""
1439+
msgstr "虽然上述处理方式很简单,但也给出了根据喜好对异常信息进行格式化输出的方案。或许 :mod:`traceback` 模块能满足更专门的需求。"
14401440

14411441
#: ../../howto/logging-cookbook.rst:2221
14421442
msgid "Speaking logging messages"
1443-
msgstr ""
1443+
msgstr "语音播报日志信息"
14441444

14451445
#: ../../howto/logging-cookbook.rst:2223
14461446
msgid ""
@@ -1458,23 +1458,27 @@ msgid ""
14581458
"other handlers to be kept waiting. Here is a short example showing the "
14591459
"approach, which assumes that the ``espeak`` TTS package is available::"
14601460
msgstr ""
1461+
"有时可能需要以声音的形式呈现日志消息。如果系统自带了文本转语音 (TTS)功能,即便没与 Python 关联也很容易做到。大多数 TTS "
1462+
"系统都有一个可运行的命令行程序,在 handler 中可以用 :mod:`subprocess` 进行调用。这里假定 TTS "
1463+
"命令行程序不会与用户交互,或需要很长时间才会执行完毕,写入日志的信息也不会多到影响用户查看,并且可以接受每次播报一条信息,以下示例实现了等一条信息播完再处理下一条,可能会导致其他"
1464+
" handler 的等待。这个简短示例仅供演示,假定 ``espeak`` TTS 包已就绪:"
14611465

14621466
#: ../../howto/logging-cookbook.rst:2265
14631467
msgid ""
14641468
"When run, this script should say \"Hello\" and then \"Goodbye\" in a female "
14651469
"voice."
1466-
msgstr ""
1470+
msgstr "运行后将会以女声播报“Hello”和“Goodbye”。"
14671471

14681472
#: ../../howto/logging-cookbook.rst:2267
14691473
msgid ""
14701474
"The above approach can, of course, be adapted to other TTS systems and even "
14711475
"other systems altogether which can process messages via external programs "
14721476
"run from a command line."
1473-
msgstr ""
1477+
msgstr "当然,上述方案也适用于其他 TTS 系统,甚至可以利用命令行运行的外部程序来处理日志信息。"
14741478

14751479
#: ../../howto/logging-cookbook.rst:2275
14761480
msgid "Buffering logging messages and outputting them conditionally"
1477-
msgstr "缓冲日志消息并有条件地输出它们"
1481+
msgstr "缓冲日志信息并按条件输出"
14781482

14791483
#: ../../howto/logging-cookbook.rst:2277
14801484
msgid ""
@@ -1485,9 +1489,7 @@ msgid ""
14851489
"collected debug information, but if there is an error, you want all the "
14861490
"debug information to be output as well as the error."
14871491
msgstr ""
1488-
"在某些情况下,你可能希望在临时区域中记录日志消息,并且只在发生某种特定的情况下才输出它们。 "
1489-
"例如,你可能希望起始在函数中记录调试事件,如果函数执行完成且没有错误,你不希望输出收集的调试信息以避免造成日志混乱,但如果出现错误,那么你希望所有调试以及错误消息被输出。"
1490-
" "
1492+
"有时可能需要将日志信息写入临时位置,仅在特定情况下才进行输出。比如在函数中记录调试事件,若函数执行完成且没有错误,收集到的调试信息就无需输出,以免造成日志混乱,但在出现错误时则需要输出全部的调试和错误信息。"
14911493

14921494
#: ../../howto/logging-cookbook.rst:2284
14931495
msgid ""

0 commit comments

Comments
 (0)