@@ -48,8 +48,8 @@ msgid ""
4848"(except the ones in ``script``/``style`` elements) are automatically "
4949"converted to the corresponding Unicode characters."
5050msgstr ""
51- "如果 *convert_charrefs* 为 ``True`` (缺省) ,则所有转义字符( ``script``/``style``元素中的除外) "
52- "都会自动转换为相应的Unicode字符 。 "
51+ "如果 *convert_charrefs* 为 ``True`` (默认值),则所有字符引用( ``script``/``style`` "
52+ "元素中的除外)都会自动转换为相应的 Unicode 字符 。 "
5353
5454#: ../../library/html.parser.rst:26
5555msgid ""
@@ -75,7 +75,7 @@ msgstr "*convert_charrefs* 关键字参数被添加。"
7575
7676#: ../../library/html.parser.rst:37
7777msgid "The default value for argument *convert_charrefs* is now ``True``."
78- msgstr " *convert_charrefs* 参数的缺省值现在为 ``True``。"
78+ msgstr " *convert_charrefs* 参数的默认值现在为 ``True``。"
7979
8080#: ../../library/html.parser.rst:42
8181msgid "Example HTML Parser Application"
@@ -95,7 +95,7 @@ msgstr "输出是:"
9595
9696#: ../../library/html.parser.rst:83
9797msgid ":class:`.HTMLParser` Methods"
98- msgstr ":class:`.HTMLParser` 方法"
98+ msgstr " :class:`.HTMLParser` 方法"
9999
100100#: ../../library/html.parser.rst:85
101101msgid ":class:`HTMLParser` instances have the following methods:"
@@ -163,7 +163,7 @@ msgid ""
163163"character and entity references have been replaced."
164164msgstr ""
165165"*tag* 参数是小写的标记名。*attrs* 参数是一个 ``(name, value)`` 形式的列表,包含了所有在标记的 ``<>`` "
166- "括号中找到的属性。*name* 转换为小写,*value* 的引号被去除,字符和实体转义都会被替换 。"
166+ "括号中找到的属性。*name* 转换为小写,*value* 的引号被去除,字符和实体引用都会被替换 。"
167167
168168#: ../../library/html.parser.rst:137
169169msgid ""
@@ -178,7 +178,7 @@ msgstr ""
178178msgid ""
179179"All entity references from :mod:`html.entities` are replaced in the "
180180"attribute values."
181- msgstr "属性值中的所有实体转义,使用 :mod:`html.entities`替换 。"
181+ msgstr ":mod:`html.entities` 中的所有实体引用,会被替换为属性值 。"
182182
183183#: ../../library/html.parser.rst:146
184184msgid ""
@@ -197,8 +197,8 @@ msgid ""
197197"implementation simply calls :meth:`handle_starttag` and "
198198":meth:`handle_endtag`."
199199msgstr ""
200- "类似于 :meth:`handle_starttag`, 只是在解析器遇到XHTML样式的空标记时被调用 ( ``<img ... />``). "
201- "这个方法能被需要这种特殊词法信息的子类重载;默认实现仅简单调用 :meth:`handle_starttag` 和 "
200+ "类似于 :meth:`handle_starttag`, 只是在解析器遇到 XHTML 样式的空标记时被调用( ``<img ... "
201+ "/>``)。 这个方法能被需要这种特殊词法信息的子类重载;默认实现仅简单调用 :meth:`handle_starttag` 和 "
202202":meth:`handle_endtag` 。"
203203
204204#: ../../library/html.parser.rst:161
@@ -215,8 +215,8 @@ msgid ""
215215"``&name;`` (e.g. ``>``), where *name* is a general entity reference (e.g."
216216" ``'gt'``). This method is never called if *convert_charrefs* is ``True``."
217217msgstr ""
218- "这个方法被用于处理 ``&name;`` 形式的命名字符转义( 例如 ``>``), 其中 *name* 是通用的实体转义 ( 例如: "
219- "``'gt'``) 。如果 *convert_charrefs* 为 ``True``,该方法永远不会被调用。"
218+ "这个方法被用于处理 ``&name;`` 形式的命名字符引用( 例如 ``>``), 其中 *name* 是通用的实体引用( 例如: "
219+ "``'gt'``) 。如果 *convert_charrefs* 为 ``True``,该方法永远不会被调用。"
220220
221221#: ../../library/html.parser.rst:175
222222msgid ""
@@ -226,9 +226,9 @@ msgid ""
226226"``>``; in this case the method will receive ``'62'`` or ``'x3E'``. "
227227"This method is never called if *convert_charrefs* is ``True``."
228228msgstr ""
229- "这个方法被用来处理 ``&#NNN;`` 和 ``&#xNNN;`` 形式的十进制和十六进制转义字符 。例如,``>`` "
230- "等效的十进制形式为 ``>`` ,而十六进制形式为 ``>`` ; 在这种情况下,方法将收到 ``'62'`` 或 ``'x3E'``"
231- " 。如果 *convert_charrefs* 为 ``True`` ,则该方法永远不会被调用。"
229+ "这个方法被用来处理 ``&#NNN;`` 和 ``&#xNNN;`` 形式的十进制和十六进制字符引用 。例如,``>`` 等效的十进制形式为 "
230+ "``>`` ,而十六进制形式为 ``>`` ;在这种情况下,方法将收到 ``'62'`` 或 ``'x3E'`` 。如果 "
231+ "*convert_charrefs* 为 ``True`` ,则该方法永远不会被调用。"
232232
233233#: ../../library/html.parser.rst:184
234234msgid ""
@@ -249,8 +249,8 @@ msgid ""
249249"content<![endif]-->``, this method will receive ``'[if IE 9]>IE9-specific "
250250"content<![endif]'``."
251251msgstr ""
252- "Internet Explorer 条件注释( condcoms) 的内容也被发送到这个方法,因此,对于 ``<!--[if IE "
253- "9]>IE9-specific content<![endif]-->`` , 这个方法将接受到 ``'[if IE 9]>IE9-specific "
252+ "Internet Explorer 条件注释( condcoms) 的内容也被发送到这个方法,因此,对于 ``<!--[if IE "
253+ "9]>IE9-specific content<![endif]-->`` ,这个方法将接收到 ``'[if IE 9]>IE9-specific "
254254"content<![endif]'`` 。"
255255
256256#: ../../library/html.parser.rst:196
@@ -282,8 +282,8 @@ msgid ""
282282"instructions. An XHTML processing instruction using the trailing ``'?'`` "
283283"will cause the ``'?'`` to be included in *data*."
284284msgstr ""
285- ":class:`HTMLParser`类使用SGML语法规则处理指令。XHTML处理指令使用 ``'?'`` 结尾将导致 ``'?'`` 包含在 "
286- "*data* 中。"
285+ ":class:`HTMLParser` 类使用 SGML 语法规则处理指令。使用 ``'?'`` 结尾的 XHTML 处理指令将导致 ``'?'`` "
286+ "包含在 *data* 中。"
287287
288288#: ../../library/html.parser.rst:220
289289msgid ""
@@ -296,7 +296,7 @@ msgid ""
296296"The *data* parameter will be the entire contents of the declaration inside "
297297"the ``<![...]>`` markup. It is sometimes useful to be overridden by a "
298298"derived class. The base class implementation does nothing."
299- msgstr "*data* 参数是 ``<![...]>`` 中的所有内容。有时候对派生类的重写有用。仅基类实现 。"
299+ msgstr " *data* 形参是 ``<![...]>`` 中的所有内容。在覆盖派生类时,这可能很有用。基类实现中无任何实际操作 。"
300300
301301#: ../../library/html.parser.rst:230
302302msgid "Examples"
@@ -330,7 +330,7 @@ msgstr "解析注释::"
330330msgid ""
331331"Parsing named and numeric character references and converting them to the "
332332"correct char (note: these 3 references are all equivalent to ``'>'``)::"
333- msgstr "解析命名方式或数字方式的转义字符 ,并把他们转换到正确的字符(注意:这 3 种转义都是 ``'>'`` )::"
333+ msgstr "解析命名或数字形式的字符引用 ,并把他们转换到正确的字符(注意:这 3 种转义都是 ``'>'`` )::"
334334
335335#: ../../library/html.parser.rst:318
336336msgid ""
@@ -339,8 +339,8 @@ msgid ""
339339"*convert_charrefs* is set to ``True``)::"
340340msgstr ""
341341"填充不完整的块给 :meth:`~HTMLParser.feed` 执行,:meth:`~HTMLParser.handle_data` "
342- "可能会多次调用( 除非 *convert_charrefs* 被设置为 ``True`` ) ::"
342+ "可能会多次调用( 除非 *convert_charrefs* 被设置为 ``True`` ) ::"
343343
344344#: ../../library/html.parser.rst:331
345345msgid "Parsing invalid HTML (e.g. unquoted attributes) also works::"
346- msgstr "解析无效的HTML (例如:未引用的属性) 也能正常运行::"
346+ msgstr "解析无效的 HTML (例如:未引用的属性) 也能正常运行::"
0 commit comments