@@ -373,6 +373,10 @@ msgid ""
373373":`Content-Type` header (the message will not be otherwise modified). "
374374"Anything else will generate a :exc:`TypeError`."
375375msgstr ""
376+ "将载荷的字符集设为 *charset*,它可以是 :class:`~email.charset.Charset` 实例 (参见 "
377+ ":mod:`email.charset`)、字符集名称字符串或 ``None``。 如果是字符串,它将被转换为一个 "
378+ ":class:`~email.charset.Charset` 实例。 如果 *charset* 是 ``None``,``charset`` 形参将从"
379+ " :mailheader:`Content-Type` 标头中被删除(消息将不会进行其他修改)。 任何其他值都将导致 :exc:`TypeError`。"
376380
377381#: ../../library/email.compat32-message.rst:252
378382msgid ""
@@ -390,25 +394,36 @@ msgid ""
390394"correctly encoded using that :mailheader:`Content-Transfer-Encoding` and is "
391395"not modified."
392396msgstr ""
397+ "如果 :mailheader:`MIME-Version` 标头不存在则将被添加。 如果 :mailheader:`Content-Type` "
398+ "标头不存在,则将添加一个值为 :mimetype:`text/plain` 的该标头。 无论 :mailheader:`Content-Type` "
399+ "标头是否已存在,其 ``charset`` 形参都将被设为 *charset.output_charset*。 如果 "
400+ "*charset.input_charset* 和 *charset.output_charset* 不同,则载荷将被重编码为 "
401+ "*output_charset*。 如果 :mailheader:`Content-Transfer-Encoding` "
402+ "标头不存在,则载荷将在必要时使用指定的 :class:`~email.charset.Charset` 来转换编码,并将添加一个具有相应值的标头。 如果"
403+ " :mailheader:`Content-Transfer-Encoding` 标头已存在,则会假定载荷已使用该 :mailheader"
404+ ":`Content-Transfer-Encoding` 进行正确编码并不会再被修改。"
393405
394406#: ../../library/email.compat32-message.rst:266
395407msgid ""
396408"This is a legacy method. On the :class:`~email.emailmessage.EmailMessage` "
397409"class its functionality is replaced by the *charset* parameter of the "
398410":meth:`email.emailmessage.EmailMessage.set_content` method."
399411msgstr ""
412+ "这是一个过时的方法。 在 :class:`~email.emailmessage.EmailMessage` 类上它的功能已被 "
413+ ":meth:`email.emailmessage.EmailMessage.set_content` 方法的 *charset* 形参所替代。"
400414
401415#: ../../library/email.compat32-message.rst:274
402416msgid ""
403417"Return the :class:`~email.charset.Charset` instance associated with the "
404418"message's payload."
405- msgstr ""
419+ msgstr "返回与消息的载荷相关联的 :class:`~email.charset.Charset` 实例。 "
406420
407421#: ../../library/email.compat32-message.rst:277
408422msgid ""
409423"This is a legacy method. On the :class:`~email.emailmessage.EmailMessage` "
410424"class it always returns ``None``."
411425msgstr ""
426+ "这是一个过时的方法。 在 :class:`~email.emailmessage.EmailMessage` 类上它将总是返回 ``None``。"
412427
413428#: ../../library/email.compat32-message.rst:282
414429msgid ""
@@ -423,12 +438,15 @@ msgid ""
423438"header deleted and then re-added are always appended to the end of the "
424439"header list."
425440msgstr ""
441+ "以下方法实现了用于访问消息的 :rfc:`2822` 标头的类映射接口。 请注意这些方法和普通映射(例如字典)接口之间存在一些语义上的不同。 "
442+ "举例来说,在一个字典中不能有重复的键,但消息标头则可能有重复。 并且,在字典中由 :meth:`keys` 返回的键的顺序是没有保证的,但在 "
443+ ":class:`Message` 对象中,标头总是会按它们在原始消息中的出现或后继加入顺序返回。 任何已删除再重新加入的标头总是会添加到标头列表的末尾。"
426444
427445#: ../../library/email.compat32-message.rst:292
428446msgid ""
429447"These semantic differences are intentional and are biased toward maximal "
430448"convenience."
431- msgstr ""
449+ msgstr "这些语义上的差异是有意为之且其目的是为了提供最大的便利性。 "
432450
433451#: ../../library/email.compat32-message.rst:295
434452msgid ""
0 commit comments