Skip to content

Commit 9569c56

Browse files
sync with cpython 3bd28186
1 parent e86424d commit 9569c56

File tree

2 files changed

+718
-692
lines changed

2 files changed

+718
-692
lines changed

library/email.header.po

Lines changed: 52 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: Python 3.13\n"
88
"Report-Msgid-Bugs-To: \n"
9-
"POT-Creation-Date: 2024-09-03 11:11+0800\n"
9+
"POT-Creation-Date: 2025-06-16 00:17+0000\n"
1010
"PO-Revision-Date: 2018-05-23 14:44+0000\n"
1111
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1212
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -273,43 +273,78 @@ msgid ""
273273
msgstr ""
274274

275275
#: ../../library/email.header.rst:181
276+
msgid "For historical reasons, this function may return either:"
277+
msgstr ""
278+
279+
#: ../../library/email.header.rst:183
280+
msgid ""
281+
"A list of pairs containing each of the decoded parts of the header, "
282+
"``(decoded_bytes, charset)``, where *decoded_bytes* is always an instance "
283+
"of :class:`bytes`, and *charset* is either:"
284+
msgstr ""
285+
286+
#: ../../library/email.header.rst:187
287+
msgid "A lower case string containing the name of the character set specified."
288+
msgstr ""
289+
290+
#: ../../library/email.header.rst:189
291+
msgid "``None`` for non-encoded parts of the header."
292+
msgstr ""
293+
294+
#: ../../library/email.header.rst:191
295+
msgid ""
296+
"A list of length 1 containing a pair ``(string, None)``, where *string* is "
297+
"always an instance of :class:`str`."
298+
msgstr ""
299+
300+
#: ../../library/email.header.rst:194
276301
msgid ""
277-
"This function returns a list of ``(decoded_string, charset)`` pairs "
278-
"containing each of the decoded parts of the header. *charset* is ``None`` "
279-
"for non-encoded parts of the header, otherwise a lower case string "
280-
"containing the name of the character set specified in the encoded string."
302+
"An :exc:`email.errors.HeaderParseError` may be raised when certain decoding "
303+
"errors occur (e.g. a base64 decoding exception)."
281304
msgstr ""
282305

283-
#: ../../library/email.header.rst:186
284-
msgid "Here's an example::"
306+
#: ../../library/email.header.rst:197
307+
#, fuzzy
308+
msgid "Here are examples:"
285309
msgstr "以下是個範例: ::"
286310

287-
#: ../../library/email.header.rst:188
311+
#: ../../library/email.header.rst:209
288312
msgid ""
289-
">>> from email.header import decode_header\n"
290-
">>> decode_header('=?iso-8859-1?q?p=F6stal?=')\n"
291-
"[(b'p\\xf6stal', 'iso-8859-1')]"
313+
"This function exists for for backwards compatibility only. For new code, we "
314+
"recommend using :class:`email.headerregistry.HeaderRegistry`."
292315
msgstr ""
293-
">>> from email.header import decode_header\n"
294-
">>> decode_header('=?iso-8859-1?q?p=F6stal?=')\n"
295-
"[(b'p\\xf6stal', 'iso-8859-1')]"
296316

297-
#: ../../library/email.header.rst:195
317+
#: ../../library/email.header.rst:215
298318
msgid ""
299319
"Create a :class:`Header` instance from a sequence of pairs as returned by :"
300320
"func:`decode_header`."
301321
msgstr ""
302322

303-
#: ../../library/email.header.rst:198
323+
#: ../../library/email.header.rst:218
304324
msgid ""
305325
":func:`decode_header` takes a header value string and returns a sequence of "
306326
"pairs of the format ``(decoded_string, charset)`` where *charset* is the "
307327
"name of the character set."
308328
msgstr ""
309329

310-
#: ../../library/email.header.rst:202
330+
#: ../../library/email.header.rst:222
311331
msgid ""
312332
"This function takes one of those sequence of pairs and returns a :class:"
313333
"`Header` instance. Optional *maxlinelen*, *header_name*, and "
314334
"*continuation_ws* are as in the :class:`Header` constructor."
315335
msgstr ""
336+
337+
#: ../../library/email.header.rst:228
338+
msgid ""
339+
"This function exists for for backwards compatibility only, and is not "
340+
"recommended for use in new code."
341+
msgstr ""
342+
343+
#~ msgid ""
344+
#~ ">>> from email.header import decode_header\n"
345+
#~ ">>> decode_header('=?iso-8859-1?q?p=F6stal?=')\n"
346+
#~ "[(b'p\\xf6stal', 'iso-8859-1')]"
347+
#~ msgstr ""
348+
#~ ">>> from email.header import decode_header\n"
349+
#~ ">>> decode_header('=?iso-8859-1?q?p=F6stal?=')\n"
350+
#~ "[(b'p\\xf6stal', 'iso-8859-1')]"

0 commit comments

Comments
 (0)