55#
66# Translators:
77# python-doc bot, 2025
8+ # Rafael Fontenelle <rffontenelle@gmail.com>, 2025
89#
910#, fuzzy
1011msgid ""
1112msgstr ""
1213"Project-Id-Version :Python 3.10\n "
1314"Report-Msgid-Bugs-To :\n "
14- "POT-Creation-Date :2025-10-31 17:16 +0000\n "
15+ "POT-Creation-Date :2025-11-03 17:29 +0000\n "
1516"PO-Revision-Date :2025-09-22 15:58+0000\n "
16- "Last-Translator :python-doc bot , 2025\n "
17+ "Last-Translator :Rafael Fontenelle <rffontenelle@gmail.com> , 2025\n "
1718"Language-Team :Portuguese (Brazil) (https://app.transifex.com/python-doc/ "
1819"teams/5390/pt_BR/)\n "
1920"Language :pt_BR\n "
@@ -37,24 +38,35 @@ msgid ""
3738"for parsing text files formatted in HTML (HyperText Mark-up Language) and "
3839"XHTML."
3940msgstr ""
41+ "Este módulo define uma classe :class:`HTMLParser` que serve como base para "
42+ "analisar arquivos de texto formatados em HTML (HyperText Markup Language) e "
43+ "XHTML."
4044
4145#: ../../library/html.parser.rst:20
4246msgid "Create a parser instance able to parse invalid markup."
4347msgstr ""
48+ "Cria uma instância de analisador sintático capaz de analisar marcação "
49+ "inválida."
4450
4551#: ../../library/html.parser.rst:22
4652msgid ""
4753"If *convert_charrefs* is true (the default), all character references "
4854"(except the ones in elements like ``script`` and ``style``) are "
4955"automatically converted to the corresponding Unicode characters."
5056msgstr ""
57+ "Se *convert_charrefs* for verdadeiro (o padrão), todas as referências de "
58+ "caracteres (exceto as de elementos como ``script`` e ``style``) serão "
59+ "convertidas automaticamente para os caracteres Unicode correspondentes."
5160
5261#: ../../library/html.parser.rst:26
5362msgid ""
5463"If *scripting* is false (the default), the content of the ``noscript`` "
5564"element is parsed normally; if it's true, it's returned as is without being "
5665"parsed."
5766msgstr ""
67+ "Se *scripting* for falso (o padrão), o conteúdo do elemento ``noscript`` "
68+ "será analisado normalmente; se for verdadeiro, será retornado como está, sem "
69+ "ser analisado."
5870
5971#: ../../library/html.parser.rst:30
6072msgid ""
@@ -63,29 +75,38 @@ msgid ""
6375"encountered. The user should subclass :class:`.HTMLParser` and override its "
6476"methods to implement the desired behavior."
6577msgstr ""
78+ "Uma instância de `:class:`.HTMLParser` recebe dados HTML e chama métodos de "
79+ "tratamento quando encontra tags de abertura, tags de fechamento, texto, "
80+ "comentários e outros elementos de marcação. O usuário deve criar uma "
81+ "subclasse de `:class:`.HTMLParser` e sobrescrever seus métodos para "
82+ "implementar o comportamento desejado."
6683
6784#: ../../library/html.parser.rst:35
6885msgid ""
6986"This parser does not check that end tags match start tags or call the end-"
7087"tag handler for elements which are closed implicitly by closing an outer "
7188"element."
7289msgstr ""
90+ "Este analisador sintático não verifica se as tags de fechamento correspondem "
91+ "às tags de abertura nem chama o manipulador de tags de fechamento para "
92+ "elementos que são fechados implicitamente pelo fechamento de um elemento "
93+ "externo."
7394
7495#: ../../library/html.parser.rst:38
7596msgid "*convert_charrefs* keyword argument added."
76- msgstr ""
97+ msgstr "Adicionado o argumento nomeado *convert_charrefs*. "
7798
7899#: ../../library/html.parser.rst:41
79100msgid "The default value for argument *convert_charrefs* is now ``True``."
80- msgstr ""
101+ msgstr "O valor padrão para o argumento *convert_charrefs* agora é ``True``. "
81102
82103#: ../../library/html.parser.rst:44
83104msgid "Added the *scripting* parameter."
84- msgstr ""
105+ msgstr "Adicionado o parâmetro *scripting*. "
85106
86107#: ../../library/html.parser.rst:49
87108msgid "Example HTML Parser Application"
88- msgstr ""
109+ msgstr "Exemplo de aplicação para análise de HTML "
89110
90111#: ../../library/html.parser.rst:51
91112msgid ""
@@ -96,22 +117,26 @@ msgstr ""
96117
97118#: ../../library/html.parser.rst:71
98119msgid "The output will then be:"
99- msgstr ""
120+ msgstr "A saída então será: "
100121
101122#: ../../library/html.parser.rst:90
102123msgid ":class:`.HTMLParser` Methods"
103- msgstr ""
124+ msgstr "Métodos :class:`.HTMLParser` "
104125
105126#: ../../library/html.parser.rst:92
106127msgid ":class:`HTMLParser` instances have the following methods:"
107- msgstr ""
128+ msgstr "Instâncias de :class:`HTMLParser` têm os seguintes métodos: "
108129
109130#: ../../library/html.parser.rst:97
110131msgid ""
111132"Feed some text to the parser. It is processed insofar as it consists of "
112133"complete elements; incomplete data is buffered until more data is fed or :"
113134"meth:`close` is called. *data* must be :class:`str`."
114135msgstr ""
136+ "Fornece algum texto ao analisador. Ele será processado na medida em que "
137+ "consistir em elementos completos; dados incompletos serão armazenados em "
138+ "buffer até que mais dados sejam fornecidos ou que o método :meth:`close` "
139+ "seja chamado. Os dados devem ser do tipo :class:`str`."
115140
116141#: ../../library/html.parser.rst:104
117142msgid ""
@@ -120,16 +145,23 @@ msgid ""
120145"additional processing at the end of the input, but the redefined version "
121146"should always call the :class:`HTMLParser` base class method :meth:`close`."
122147msgstr ""
148+ "Força o processamento de todos os dados em buffer como se fossem seguidos "
149+ "por uma marca de fim de arquivo. Este método pode ser redefinido por uma "
150+ "classe derivada para definir processamento adicional no final da entrada, "
151+ "mas a versão redefinida deve sempre chamar o método :meth:`close` da classe "
152+ "base :class:`HTMLParser`."
123153
124154#: ../../library/html.parser.rst:112
125155msgid ""
126156"Reset the instance. Loses all unprocessed data. This is called implicitly "
127157"at instantiation time."
128158msgstr ""
159+ "Reinicializa a instância. Perde todos os dados não processados. Este método "
160+ "é chamado implicitamente no momento da instanciação."
129161
130162#: ../../library/html.parser.rst:118
131163msgid "Return current line number and offset."
132- msgstr ""
164+ msgstr "Retorna o número da linha atual e o deslocamento. "
133165
134166#: ../../library/html.parser.rst:123
135167msgid ""
@@ -138,6 +170,11 @@ msgid ""
138170"with HTML\" as deployed\" or for re-generating input with minimal changes "
139171"(whitespace between attributes can be preserved, etc.)."
140172msgstr ""
173+ "Retorna o texto da tag de abertura aberta mais recentemente. Normalmente, "
174+ "isso não é necessário para processamento estruturado, mas pode ser útil ao "
175+ "lidar com HTML\" como implantado\" ou para regenerar a entrada com "
176+ "alterações mínimas (o espaço em branco entre os atributos pode ser "
177+ "preservado, etc.)."
141178
142179#: ../../library/html.parser.rst:129
143180msgid ""
@@ -146,12 +183,18 @@ msgid ""
146183"class implementations do nothing (except for :meth:`~HTMLParser."
147184"handle_startendtag`):"
148185msgstr ""
186+ "Os seguintes métodos são chamados quando elementos de dados ou de marcação "
187+ "são encontrados e devem ser sobrescritos em uma subclasse. As implementações "
188+ "da classe base não fazem nada (exceto por :meth:`~HTMLParser."
189+ "handle_startendtag`):"
149190
150191#: ../../library/html.parser.rst:136
151192msgid ""
152193"This method is called to handle the start tag of an element (e.g. ``<div "
153194"id=\" main\" >``)."
154195msgstr ""
196+ "Este método é chamado para manipular a tag de abertura de um elemento (por "
197+ "exemplo, ``<div id=\" main\" >``)."
155198
156199#: ../../library/html.parser.rst:138
157200msgid ""
@@ -161,28 +204,41 @@ msgid ""
161204"translated to lower case, and quotes in the *value* have been removed, and "
162205"character and entity references have been replaced."
163206msgstr ""
207+ "O argumento *tag* é o nome da tag convertido para minúsculas. O argumento "
208+ "*attrs* é uma lista de pares ``(nome, valor)`` contendo os atributos "
209+ "encontrados dentro dos colchetes ``<>`` da tag. O *nome* será traduzido para "
210+ "minúsculas, as aspas no *valor* foram removidas e as referências a "
211+ "caracteres e entidades foram substituídas."
164212
165213#: ../../library/html.parser.rst:144
166214msgid ""
167215"For instance, for the tag ``<A HREF=\" https://www.cwi.nl/\" >``, this method "
168216"would be called as ``handle_starttag('a', [('href', 'https://www.cwi."
169217"nl/')])``."
170218msgstr ""
219+ "Por exemplo, para a tag ``<A HREF=\" https://www.cwi.nl/\" >``, este método "
220+ "seria chamado como ``handle_starttag('a', [('href', 'https://www.cwi."
221+ "nl/')])``."
171222
172223#: ../../library/html.parser.rst:147
173224msgid ""
174225"All entity references from :mod:`html.entities` are replaced in the "
175226"attribute values."
176227msgstr ""
228+ "Todas as referências de entidade de :mod:`html.entities` são substituídas "
229+ "nos valores dos atributos."
177230
178231#: ../../library/html.parser.rst:153
179232msgid ""
180233"This method is called to handle the end tag of an element (e.g. ``</div>``)."
181234msgstr ""
235+ "Este método é chamado para manipular a tag de fechamento de um elemento (por "
236+ "exemplo, ``</div>``)."
182237
183238#: ../../library/html.parser.rst:155
184239msgid "The *tag* argument is the name of the tag converted to lower case."
185240msgstr ""
241+ "O argumento *tag* é o nome da etiqueta convertido para letras minúsculas."
186242
187243#: ../../library/html.parser.rst:160
188244msgid ""
@@ -192,19 +248,30 @@ msgid ""
192248"implementation simply calls :meth:`handle_starttag` and :meth:"
193249"`handle_endtag`."
194250msgstr ""
251+ "Similar a :meth:`handle_starttag`, mas chamado quando o analisador sintático "
252+ "encontra uma tag vazia no estilo XHTML (``<img ... />``). Este método pode "
253+ "ser substituído por subclasses que requerem essa informação lexical "
254+ "específica; a implementação padrão simplesmente chama :meth:"
255+ "`handle_starttag` e :meth:`handle_endtag`."
195256
196257#: ../../library/html.parser.rst:168
197258msgid ""
198259"This method is called to process arbitrary data (e.g. text nodes and the "
199260"content of elements like ``script`` and ``style``)."
200261msgstr ""
262+ "Este método é chamado para processar dados arbitrários (por exemplo, nós de "
263+ "texto e o conteúdo de elementos como ``script`` e ``style``)."
201264
202265#: ../../library/html.parser.rst:174
203266msgid ""
204267"This method is called to process a named character reference of the form "
205268"``&name;`` (e.g. ``>``), where *name* is a general entity reference (e.g. "
206269"``'gt'``). This method is only called if *convert_charrefs* is false."
207270msgstr ""
271+ "Este método é chamado para processar uma referência de caractere nomeada no "
272+ "formato ``&name;`` (por exemplo, ``>``), onde *name* é uma referência de "
273+ "entidade genérica (por exemplo, ``'gt'``). Este método só é chamado se "
274+ "*convert_charrefs* for falso."
208275
209276#: ../../library/html.parser.rst:182
210277msgid ""
@@ -220,12 +287,16 @@ msgid ""
220287"This method is called when a comment is encountered (e.g. ``<!--comment--"
221288">``)."
222289msgstr ""
290+ "Este método é chamado quando um comentário é encontrado (por exemplo, ``<!--"
291+ "comentário-->``)."
223292
224293#: ../../library/html.parser.rst:193
225294msgid ""
226295"For example, the comment ``<!-- comment -->`` will cause this method to be "
227296"called with the argument ``' comment '``."
228297msgstr ""
298+ "Por exemplo, o comentário ``<!-- comentário -->`` fará com que este método "
299+ "seja chamado com o argumento ``' comentário '``."
229300
230301#: ../../library/html.parser.rst:196
231302msgid ""
@@ -234,18 +305,26 @@ msgid ""
234305"[endif]-->``, this method will receive ``'[if IE 9]>IE9-specific content<!"
235306"[endif]'``."
236307msgstr ""
308+ "O conteúdo dos comentários condicionais do Internet Explorer (condcoms) "
309+ "também será enviado para este método, portanto, para ``<!--[if IE "
310+ "9]>conteúdo específico do IE9<![endif]-->``, este método receberá ``'[if IE "
311+ "9]>conteúdo específico do IE9<![endif]'``."
237312
238313#: ../../library/html.parser.rst:203
239314msgid ""
240315"This method is called to handle an HTML doctype declaration (e.g. ``<!"
241316"DOCTYPE html>``)."
242317msgstr ""
318+ "Este método é chamado para lidar com uma declaração de doctype HTML (por "
319+ "exemplo, ``<!DOCTYPE html>``)."
243320
244321#: ../../library/html.parser.rst:206
245322msgid ""
246323"The *decl* parameter will be the entire contents of the declaration inside "
247324"the ``<!...>`` markup (e.g. ``'DOCTYPE html'``)."
248325msgstr ""
326+ "O parâmetro *decl* será todo o conteúdo da declaração dentro da marcação "
327+ "``<!...>`` (por exemplo, ``'DOCTYPE html'``)."
249328
250329#: ../../library/html.parser.rst:212
251330msgid ""
@@ -255,25 +334,39 @@ msgid ""
255334"called as ``handle_pi(\" proc color='red'\" )``. It is intended to be "
256335"overridden by a derived class; the base class implementation does nothing."
257336msgstr ""
337+ "Método chamado quando uma instrução de processamento é encontrada. O "
338+ "parâmetro *data* conterá a instrução de processamento completa. Por exemplo, "
339+ "para a instrução de processamento ``<?proc color='red'>``, este método seria "
340+ "chamado como ``handle_pi(\" proc color='red'\" )``. Ele foi projetado para ser "
341+ "substituído por uma classe derivada; a implementação da classe base não faz "
342+ "nada."
258343
259344#: ../../library/html.parser.rst:220
260345msgid ""
261346"The :class:`HTMLParser` class uses the SGML syntactic rules for processing "
262347"instructions. An XHTML processing instruction using the trailing ``'?'`` "
263348"will cause the ``'?'`` to be included in *data*."
264349msgstr ""
350+ "A classe :class:`HTMLParser` usa as regras sintáticas SGML para processar "
351+ "instruções. Uma instrução de processamento XHTML que usa o caractere ``'?'`` "
352+ "no final fará com que o ``'?'`` seja incluído em *data*."
265353
266354#: ../../library/html.parser.rst:227
267355msgid ""
268356"This method is called when an unrecognized declaration is read by the parser."
269357msgstr ""
358+ "Este método é chamado quando uma declaração não reconhecida é lida pelo "
359+ "analisador sintático."
270360
271361#: ../../library/html.parser.rst:229
272362msgid ""
273363"The *data* parameter will be the entire contents of the declaration inside "
274364"the ``<![...]>`` markup. It is sometimes useful to be overridden by a "
275365"derived class. The base class implementation does nothing."
276366msgstr ""
367+ "O parâmetro *data* será todo o conteúdo da declaração dentro da marcação ``<!"
368+ "[...]>``. Às vezes, é útil que ele seja sobrescrito por uma classe derivada. "
369+ "A implementação da classe base não faz nada."
277370
278371#: ../../library/html.parser.rst:237
279372msgid "Examples"