66# Translators:
7788# walkinrain <[email protected] >, 20199+ # Shengjing Zhu <[email protected] >, 2019910#
1011#, fuzzy
1112msgid ""
@@ -14,7 +15,7 @@ msgstr ""
1415"Report-Msgid-Bugs-To : \n "
1516"POT-Creation-Date : 2019-01-01 10:14+0900\n "
1617"PO-Revision-Date : 2017-02-16 23:13+0000\n "
17- "Last-Translator : walkinrain <walkinrain2008@163 .com>, 2019\n "
18+ "Last-Translator : Shengjing Zhu <zsj950618@gmail .com>, 2019\n "
1819"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
1920"MIME-Version : 1.0\n "
2021"Content-Type : text/plain; charset=UTF-8\n "
@@ -28,18 +29,18 @@ msgstr ":mod:`html.parser`---简单的HTML和XHTML解析器"
2829
2930#: ../../library/html.parser.rst:7
3031msgid "**Source code:** :source:`Lib/html/parser.py`"
31- msgstr ""
32+ msgstr "**源代码:**:source:`Lib/html/parser.py` "
3233
3334#: ../../library/html.parser.rst:15
3435msgid ""
3536"This module defines a class :class:`HTMLParser` which serves as the basis "
3637"for parsing text files formatted in HTML (HyperText Mark-up Language) and "
3738"XHTML."
38- msgstr ""
39+ msgstr "这个模块定义了一个 :class:`HTMLParser`类,为HTML(超文本标记语言) 和 XHTML 文本文件解析提供基础。 "
3940
4041#: ../../library/html.parser.rst:20
4142msgid "Create a parser instance able to parse invalid markup."
42- msgstr ""
43+ msgstr "创建一个能解析无效标记的解析器实例。 "
4344
4445#: ../../library/html.parser.rst:22
4546msgid ""
@@ -67,30 +68,31 @@ msgstr ""
6768
6869#: ../../library/html.parser.rst:34
6970msgid "*convert_charrefs* keyword argument added."
70- msgstr ""
71+ msgstr "*convert_charrefs* 关键字参数被添加。 "
7172
7273#: ../../library/html.parser.rst:37
7374msgid "The default value for argument *convert_charrefs* is now ``True``."
7475msgstr ""
7576
7677#: ../../library/html.parser.rst:42
7778msgid "Example HTML Parser Application"
78- msgstr ""
79+ msgstr "HTML解析器应用程序的示例 "
7980
8081#: ../../library/html.parser.rst:44
8182msgid ""
8283"As a basic example, below is a simple HTML parser that uses the "
8384":class:`HTMLParser` class to print out start tags, end tags, and data as "
8485"they are encountered::"
8586msgstr ""
87+ "下面是简单的HTML解析器的一个基本示例,使用:class:`HTMLParser` 类,当遇到开始标记,结束标记以及数据的时候将内容打印出来。"
8688
8789#: ../../library/html.parser.rst:64
8890msgid "The output will then be:"
8991msgstr "输出是:"
9092
9193#: ../../library/html.parser.rst:83
9294msgid ":class:`.HTMLParser` Methods"
93- msgstr ""
95+ msgstr ":class:`.HTMLParser` 方法 "
9496
9597#: ../../library/html.parser.rst:85
9698msgid ":class:`HTMLParser` instances have the following methods:"
@@ -110,16 +112,18 @@ msgid ""
110112"additional processing at the end of the input, but the redefined version "
111113"should always call the :class:`HTMLParser` base class method :meth:`close`."
112114msgstr ""
115+ "如同后面跟着一个文件结束标记一样,强制处理所有缓冲数据。这个方法能被派生类重新定义,用于在输入的末尾定义附加处理,但是重定义的版本将始终调用基类 "
116+ ":class:`HTMLParser` 的 :meth:`close`方法。"
113117
114118#: ../../library/html.parser.rst:105
115119msgid ""
116120"Reset the instance. Loses all unprocessed data. This is called implicitly "
117121"at instantiation time."
118- msgstr ""
122+ msgstr "重置实例。丢失所有未处理的数据。在实例化阶段被隐式调用。 "
119123
120124#: ../../library/html.parser.rst:111
121125msgid "Return current line number and offset."
122- msgstr ""
126+ msgstr "返回当前行号和列数。 "
123127
124128#: ../../library/html.parser.rst:116
125129msgid ""
@@ -152,13 +156,17 @@ msgid ""
152156"translated to lower case, and quotes in the *value* have been removed, and "
153157"character and entity references have been replaced."
154158msgstr ""
159+ "*tag*参数是小写的标记名。*attrs* 参数是一个 ``(name, value)`` 形式的列表,包含了所有在标记的 ``<>`` "
160+ "括号中找到的属性。*name*转换为小写,*value*的引号被去除,字符和实体转义都被替换。"
155161
156162#: ../../library/html.parser.rst:137
157163msgid ""
158164"For instance, for the tag ``<A HREF=\" https://www.cwi.nl/\" >``, this method "
159165"would be called as ``handle_starttag('a', [('href', "
160166"'https://www.cwi.nl/')])``."
161167msgstr ""
168+ "实例中,对于标签 ``<A HREF=\" https://www.cwi.nl/\" >``,这个方法将以下列形式被调用 "
169+ "``handle_starttag('a', [('href', 'https://www.cwi.nl/')])`` 。"
162170
163171#: ../../library/html.parser.rst:140
164172msgid ""
@@ -169,11 +177,11 @@ msgstr ""
169177#: ../../library/html.parser.rst:146
170178msgid ""
171179"This method is called to handle the end tag of an element (e.g. ``</div>``)."
172- msgstr ""
180+ msgstr "此方法被用来处理元素的结束标记(例如:``</div>``)。 "
173181
174182#: ../../library/html.parser.rst:148
175183msgid "The *tag* argument is the name of the tag converted to lower case."
176- msgstr ""
184+ msgstr "*tag*参数是小写的标签名。 "
177185
178186#: ../../library/html.parser.rst:153
179187msgid ""
@@ -216,7 +224,7 @@ msgstr "这个方法在遇到注释的时候被调用(例如:``<!--comment-->`
216224msgid ""
217225"For example, the comment ``<!-- comment -->`` will cause this method to be "
218226"called with the argument ``' comment '``."
219- msgstr "例如, 注释 ``<!-- comment -->``将会用 ``' comment '``为参数调用此方法 。"
227+ msgstr "例如, ``<!-- comment -->`` 这个注释会用 ``' comment '`` 作为参数调用此方法 。"
220228
221229#: ../../library/html.parser.rst:189
222230msgid ""
@@ -230,7 +238,7 @@ msgstr ""
230238msgid ""
231239"This method is called to handle an HTML doctype declaration (e.g. "
232240"``<!DOCTYPE html>``)."
233- msgstr ""
241+ msgstr "这个方法用来处理HTML doctype 申明(例如``<!DOCTYPE html>``)。 "
234242
235243#: ../../library/html.parser.rst:199
236244msgid ""
@@ -246,6 +254,9 @@ msgid ""
246254"called as ``handle_pi(\" proc color='red'\" )``. It is intended to be "
247255"overridden by a derived class; the base class implementation does nothing."
248256msgstr ""
257+ "当遇到一个处理指令的时候此方法被调用。*data*形参将包含整个处理指令。例如,对于处理指令``<?proc "
258+ "color='red'>``,这个方法将以``handle_pi(\" proc "
259+ "color='red'\" )``形式被调用。它旨在被派生类重写;基类实现无任何处理。"
249260
250261#: ../../library/html.parser.rst:213
251262msgid ""
@@ -258,7 +269,7 @@ msgstr ""
258269msgid ""
259270"This method is called when an unrecognized declaration is read by the "
260271"parser."
261- msgstr ""
272+ msgstr "当解析器堆到无法识别的声明时,此方法被调用。 "
262273
263274#: ../../library/html.parser.rst:222
264275msgid ""
@@ -283,7 +294,7 @@ msgstr ""
283294
284295#: ../../library/html.parser.rst:275
285296msgid "Parsing an element with a few attributes and a title::"
286- msgstr ""
297+ msgstr "解析一个具有一些属性和标题的元素:: "
287298
288299#: ../../library/html.parser.rst:287
289300msgid ""
@@ -293,13 +304,13 @@ msgstr ""
293304
294305#: ../../library/html.parser.rst:303
295306msgid "Parsing comments::"
296- msgstr ""
307+ msgstr "解析注释:: "
297308
298309#: ../../library/html.parser.rst:310
299310msgid ""
300311"Parsing named and numeric character references and converting them to the "
301312"correct char (note: these 3 references are all equivalent to ``'>'``)::"
302- msgstr "解析命名方式或数字方式的转义字符,并把他们转换到正确的字符( 注意:这3种转义都是 ``'>'``) ::"
313+ msgstr "解析命名方式或数字方式的转义字符,并把他们转换到正确的字符( 注意:这 3 种转义都是 ``'>'`` ) ::"
303314
304315#: ../../library/html.parser.rst:318
305316msgid ""
0 commit comments