8899# Meng Du <[email protected] >, 20191010# MuSheng Chen <[email protected] >, 201911- 1211# Freesand Leo <[email protected] >, 201912+ 1313#
1414#, fuzzy
1515msgid ""
@@ -18,7 +18,7 @@ msgstr ""
1818"Report-Msgid-Bugs-To : \n "
1919"POT-Creation-Date : 2019-01-01 10:14+0900\n "
2020"PO-Revision-Date : 2017-02-16 17:45+0000\n "
21- "Last-Translator : Freesand Leo <yuqinju@163 .com>, 2019\n "
21+ "Last-Translator : 非法操作 <ultrahe@gmail .com>, 2019\n "
2222"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
2323"MIME-Version : 1.0\n "
2424"Content-Type : text/plain; charset=UTF-8\n "
@@ -589,6 +589,8 @@ msgid ""
589589":class:`string.Template` (added in Python 2.4) and :meth:`str.format` (added"
590590" in Python 2.6)."
591591msgstr ""
592+ "当日志模块被添加至Python标准库时,只有一种格式化消息内容的方法即%-formatting。从那时起,Python就已经有两种格式化方法,:class:`string.Template`"
593+ " (在Python2.4中添加)和:meth:`str.format`(在Python2.6中添加)。"
592594
593595#: ../../howto/logging-cookbook.rst:1021
594596msgid ""
@@ -602,13 +604,17 @@ msgid ""
602604":meth:`str.format` or :class:`string.Template`. Here's an example console "
603605"session to show the possibilities:"
604606msgstr ""
607+ "日志(截至3.2)为这两种格式化方式提供了更多支持。:class:`Formatter` "
608+ "类可以添加一个额外的可选关键字参数``style``。它的默认值是 ``'%'``,其他的值 "
609+ "``'{'``和``'$'``也支持,对应了其他两种格式化样式。其保持了向后兼容(如您所愿),但通过显示指定样式参数,你可以指定格式化字符串的方式是使用"
610+ " :meth:`str.format` 或 :class:`string.Template`。这里是一个控制台会话的示例,展示了这些方式:"
605611
606612#: ../../howto/logging-cookbook.rst:1055
607613msgid ""
608614"Note that the formatting of logging messages for final output to logs is "
609615"completely independent of how an individual logging message is constructed. "
610616"That can still use %-formatting, as shown here::"
611- msgstr ""
617+ msgstr "请注意,最终输出到日志的消息格式完全独立于单条日志消息的构造方式。它仍然可以使用%-formatting,如下所示: "
612618
613619#: ../../howto/logging-cookbook.rst:1063
614620msgid ""
0 commit comments