@@ -89,31 +89,36 @@ msgid ""
8989"making other changes to *msg* as well, such as adding various MIME headers "
9090"to encode information needed to interpret the stored data."
9191msgstr ""
92+ "如果 ``maintype`` 为 ``multipart``,则引发 :exc:`TypeError`;否则基于 *obj* "
93+ "的类型(参见下一段)查找处理函数,在 *msg* 上调用 "
94+ ":meth:`~email.message.EmailMessage.clear_content`,并调用处理函数,传递所有参数。 "
95+ "预期的效果是处理程序将转换 *obj* 并存入 *msg*,并可能对 *msg* 进行其他更改,例如添加各种 MIME "
96+ "标头来编码需要用来解释所存储数据的信息。"
9297
9398#: ../../library/email.contentmanager.rst:54
9499msgid ""
95100"To find the handler, obtain the type of *obj* (``typ = type(obj)``), and "
96101"look for the following keys in the registry, stopping with the first one "
97102"found:"
98- msgstr ""
103+ msgstr "要找到处理程序,将获取 *obj* 的类型 (``typ = type(obj)``),并在注册表中查找以下键,找到第一个键即停止: "
99104
100105#: ../../library/email.contentmanager.rst:58
101106msgid "the type itself (``typ``)"
102- msgstr ""
107+ msgstr "类型本身 (``typ``) "
103108
104109#: ../../library/email.contentmanager.rst:59
105110msgid ""
106111"the type's fully qualified name (``typ.__module__ + '.' + "
107112"typ.__qualname__``)."
108- msgstr ""
113+ msgstr "类型的完整限定名称 (``typ.__module__ + '.' + typ.__qualname__``)。 "
109114
110115#: ../../library/email.contentmanager.rst:61
111116msgid "the type's qualname (``typ.__qualname__``)"
112- msgstr ""
117+ msgstr "类型的 qualname (``typ.__qualname__``) "
113118
114119#: ../../library/email.contentmanager.rst:62
115120msgid "the type's name (``typ.__name__``)."
116- msgstr ""
121+ msgstr "类型的 name (``typ.__name__``)。 "
117122
118123#: ../../library/email.contentmanager.rst:64
119124msgid ""
@@ -123,29 +128,35 @@ msgid ""
123128"handler for ``None``, raise a :exc:`KeyError` for the fully qualified name "
124129"of the type."
125130msgstr ""
131+ "如果未匹配到上述的任何一项,则在 :term:`MRO` (``typ.__mro__``) 中为每个类型重复上述的所有检测。 "
132+ "最后,如果没有其他键产生处理程序,则为 ``None`` 键检测处理程序。 如果也没有 ``None`` 的处理程序,则为该类型的完整限定名称引发 "
133+ ":exc:`KeyError`。"
126134
127135#: ../../library/email.contentmanager.rst:70
128136msgid ""
129137"Also add a :mailheader:`MIME-Version` header if one is not present (see also"
130138" :class:`.MIMEPart`)."
131139msgstr ""
140+ "并会添加一个 :mailheader:`MIME-Version` 标头,如果没有的话 (另请参见 :class:`.MIMEPart`)。"
132141
133142#: ../../library/email.contentmanager.rst:76
134143msgid ""
135144"Record the function *handler* as the handler for *key*. For the possible "
136145"values of *key*, see :meth:`get_content`."
137- msgstr ""
146+ msgstr "将 *handler* 函数记录为 *key* 的处理程序。 对于可能的 *key* 键,请参阅 :meth:`get_content`。 "
138147
139148#: ../../library/email.contentmanager.rst:82
140149msgid ""
141150"Record *handler* as the function to call when an object of a type matching "
142151"*typekey* is passed to :meth:`set_content`. For the possible values of "
143152"*typekey*, see :meth:`set_content`."
144153msgstr ""
154+ "将 *handler* 记录为当一个匹配 *typekey* 的类型对象被传递给 :meth:`set_content` 时所要调用的函数。 对于可能的"
155+ " *typekey* 值,请参阅 :meth:`set_content`。"
145156
146157#: ../../library/email.contentmanager.rst:88
147158msgid "Content Manager Instances"
148- msgstr ""
159+ msgstr "内容管理器实例 "
149160
150161#: ../../library/email.contentmanager.rst:90
151162msgid ""
0 commit comments