@@ -37,20 +37,24 @@ msgid ""
3737"filename to MIME type and from MIME type to filename extension; encodings "
3838"are not supported for the latter conversion."
3939msgstr ""
40+ ":mod:`mimetypes` 模块可以在文件名或 URL 和关联到文件扩展名的 MIME 类型之间执行转换。 所提供的转换包括从文件名到 MIME "
41+ "类型和从 MIME 类型到文件扩展名;后一种转换不支持编码格式。"
4042
4143#: ../../library/mimetypes.rst:20
4244msgid ""
4345"The module provides one class and a number of convenience functions. The "
4446"functions are the normal interface to this module, but some applications may"
4547" be interested in the class as well."
46- msgstr ""
48+ msgstr "该模块提供了一个类和一些便捷函数。 这些函数是该模块通常的接口,但某些应用程序可能也会希望使用类。 "
4749
4850#: ../../library/mimetypes.rst:24
4951msgid ""
5052"The functions described below provide the primary interface for this module."
5153" If the module has not been initialized, they will call :func:`init` if "
5254"they rely on the information :func:`init` sets up."
5355msgstr ""
56+ "下列函数提供了此模块的主要接口。 如果此模块尚未被初始化,它们将会调用 :func:`init`,如果它们依赖于 :func:`init` "
57+ "所设置的信息的话。"
5458
5559#: ../../library/mimetypes.rst:33
5660msgid ""
@@ -69,6 +73,10 @@ msgid ""
6973"driven. Encoding suffixes are case sensitive; type suffixes are first tried "
7074"case sensitively, then case insensitively."
7175msgstr ""
76+ "*encoding* 在无编码格式时为 ``None``,或者为程序所用的编码格式 (例如 :program:`compress` 或 "
77+ ":program:`gzip`)。 它可以作为 :mailheader:`Content-Encoding` 标头,但 **不可** 作为 "
78+ ":mailheader:`Content-Transfer-Encoding` 标头。 映射是表格驱动的。 "
79+ "编码格式前缀对大小写敏感;类型前缀会先以大小写敏感方式检测再以大小写不敏感方式检测。"
7280
7381#: ../../library/mimetypes.rst:45
7482msgid ""
@@ -79,6 +87,10 @@ msgid ""
7987"*strict* is ``False``, some additional non-standard but commonly used MIME "
8088"types are also recognized."
8189msgstr ""
90+ "可选的 *strict* 参数是一个旗标,指明要将已知 MIME 类型限制在 `IANA 已注册 "
91+ "<https://www.iana.org/assignments/media-types/media-types.xhtml>`_ 的官方类型之内。 "
92+ "当 *strict* 为 ``True`` 时(默认值),则仅支持 IANA 类型;当 *strict* 为 ``False`` "
93+ "时,则还支持某些附加的非标准但常用的 MIME 类型。"
8294
8395#: ../../library/mimetypes.rst:55
8496msgid ""
0 commit comments