Skip to content

Commit 72f9ed7

Browse files
sync with cpython f3a6e8ed
1 parent 8f476fd commit 72f9ed7

File tree

5 files changed

+229
-386
lines changed

5 files changed

+229
-386
lines changed

library/base64.po

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.14\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2025-06-27 07:36+0000\n"
10+
"POT-Creation-Date: 2026-01-24 22:47+0000\n"
1111
"PO-Revision-Date: 2018-05-23 14:39+0000\n"
1212
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -34,8 +34,8 @@ msgid ""
3434
"Base32 and Base16) and the non-standard :ref:`Base85 encodings <base64-"
3535
"base-85>`."
3636
msgstr ""
37-
"這個模組提供將二進位資料編碼成可顯示 ASCII 字元以及解碼回原始資料的功能。這包括"
38-
" :rfc:`4648` 中\\ :ref:`指定的編碼 <base64-rfc-4648>`\\ (Base64、Base32 "
37+
"這個模組提供將二進位資料編碼成可顯示 ASCII 字元以及解碼回原始資料的功能。這包"
38+
"括了 :rfc:`4648` 中\\ :ref:`指定的編碼 <base64-rfc-4648>`\\ (Base64、Base32 "
3939
"和 Base16)和非標準的 :ref:`Base85 編碼 <base64-base-85>`。"
4040

4141
#: ../../library/base64.rst:22
@@ -61,10 +61,10 @@ msgid ""
6161
"`2045`. Note that if you are looking for :rfc:`2045` support you probably "
6262
"want to be looking at the :mod:`email` package instead."
6363
msgstr ""
64-
":ref:`舊版介面 <base64-legacy>`\\ 不支援從字串解碼,但它提供對\\ :term:`檔案物件 <file object>`\\ 進行"
65-
"編碼和解碼的函式。它僅支援 Base64 標準字母表,並且按照 :rfc:`2045` 每 76 個字"
66-
"元添加換行字元。請注意,如果你需要 :rfc:`2045` 的支援,你可能會需要 :mod:"
67-
"`email` 函式庫。"
64+
":ref:`舊版介面 <base64-legacy>`\\ 不支援從字串解碼,但它提供對\\ :term:`檔案"
65+
"物件 <file object>`\\ 進行編碼和解碼的函式。它僅支援 Base64 標準字母表,並且"
66+
"按照 :rfc:`2045` 每 76 個字元添加換行字元。請注意,如果你需要 :rfc:`2045` 的"
67+
"支援,你可能會需要 :mod:`email` 函式庫。"
6868

6969
#: ../../library/base64.rst:36
7070
msgid ""
@@ -407,33 +407,33 @@ msgstr ""
407407
"``~>``)。"
408408

409409
#: ../../library/base64.rst:242
410+
#, fuzzy
410411
msgid ""
411-
"*ignorechars* should be a :term:`bytes-like object` or ASCII string "
412-
"containing characters to ignore from the input. This should only contain "
413-
"whitespace characters, and by default contains all whitespace characters in "
414-
"ASCII."
412+
"*ignorechars* should be a byte string containing characters to ignore from "
413+
"the input. This should only contain whitespace characters, and by default "
414+
"contains all whitespace characters in ASCII."
415415
msgstr ""
416416
"*ignorechars* 是一個包含要從輸入中忽略的字元的\\ :term:`類位元組物件 <bytes-"
417417
"like object>`\\ 或 ASCII 字串。這只包含空格字元,預設情況下包含 ASCII 中的所"
418418
"有空格字元。"
419419

420-
#: ../../library/base64.rst:252
420+
#: ../../library/base64.rst:251
421421
msgid ""
422422
"Encode the :term:`bytes-like object` *b* using base85 (as used in e.g. git-"
423423
"style binary diffs) and return the encoded :class:`bytes`."
424424
msgstr ""
425425
"使用 Base85(例如,git 風格的二進位差異 (binary diff))對\\ :term:`類位元組物"
426426
"件 <bytes-like object>` *b* 進行編碼,並回傳編碼後的 :class:`bytes`。"
427427

428-
#: ../../library/base64.rst:255
428+
#: ../../library/base64.rst:254
429429
msgid ""
430430
"If *pad* is true, the input is padded with ``b'\\0'`` so its length is a "
431431
"multiple of 4 bytes before encoding."
432432
msgstr ""
433433
"如果 *pad* 為 true,則在編碼之前,輸入將使用 ``b'\\0'`` 進行填充,以使其長度"
434434
"為 4 的倍數。"
435435

436-
#: ../../library/base64.rst:263
436+
#: ../../library/base64.rst:262
437437
msgid ""
438438
"Decode the base85-encoded :term:`bytes-like object` or ASCII string *b* and "
439439
"return the decoded :class:`bytes`. Padding is implicitly removed, if "
@@ -442,29 +442,31 @@ msgstr ""
442442
"解碼經過 base85 編碼的\\ :term:`類位元組物件 <bytes-like object>`\\ 或 ASCII "
443443
"字串 *b*,並回傳解碼後的 :class:`bytes`。必要時會隱式移除填充。"
444444

445-
#: ../../library/base64.rst:272
445+
#: ../../library/base64.rst:271
446446
msgid ""
447447
"Encode the :term:`bytes-like object` *s* using Z85 (as used in ZeroMQ) and "
448448
"return the encoded :class:`bytes`. See `Z85 specification <https://rfc."
449449
"zeromq.org/spec/32/>`_ for more information."
450450
msgstr ""
451-
"使用 Z85(如用於 ZeroMQ)對\\ :term:`類位元組物件 <bytes-like object>` *s* 進行編碼,並回傳"
452-
"編碼後的 :class:`bytes`。有關更多資訊,請參閱 `Z85 規格 <https://rfc.zeromq.org/spec/32/>`_。"
451+
"使用 Z85(如用於 ZeroMQ)對\\ :term:`類位元組物件 <bytes-like object>` *s* 進"
452+
"行編碼,並回傳編碼後的 :class:`bytes`。有關更多資訊,請參閱 `Z85 規格 "
453+
"<https://rfc.zeromq.org/spec/32/>`_。"
453454

454-
#: ../../library/base64.rst:281
455+
#: ../../library/base64.rst:280
455456
msgid ""
456457
"Decode the Z85-encoded :term:`bytes-like object` or ASCII string *s* and "
457458
"return the decoded :class:`bytes`. See `Z85 specification <https://rfc."
458459
"zeromq.org/spec/32/>`_ for more information."
459460
msgstr ""
460-
"解碼經 Z85 編碼的\\ :term:`類位元組物件 <bytes-like object>`\\ 或 ASCII "
461-
"字串 *s*,並回傳解碼後的 :class:`bytes`。有關更多資訊,請參閱 `Z85 規格 <https://rfc.zeromq.org/spec/32/>`_。"
461+
"解碼經 Z85 編碼的\\ :term:`類位元組物件 <bytes-like object>`\\ 或 ASCII 字串 "
462+
"*s*,並回傳解碼後的 :class:`bytes`。有關更多資訊,請參閱 `Z85 規格 <https://"
463+
"rfc.zeromq.org/spec/32/>`_。"
462464

463-
#: ../../library/base64.rst:291
465+
#: ../../library/base64.rst:290
464466
msgid "Legacy Interface"
465467
msgstr "舊版介面"
466468

467-
#: ../../library/base64.rst:295
469+
#: ../../library/base64.rst:294
468470
msgid ""
469471
"Decode the contents of the binary *input* file and write the resulting "
470472
"binary data to the *output* file. *input* and *output* must be :term:`file "
@@ -475,15 +477,15 @@ msgstr ""
475477
"*input* 和 *output* 必須是\\ :term:`檔案物件 <file object>`。*input* 將被讀"
476478
"取,直到 ``input.readline()`` 回傳一個空的 bytes 物件為止。"
477479

478-
#: ../../library/base64.rst:303
480+
#: ../../library/base64.rst:302
479481
msgid ""
480482
"Decode the :term:`bytes-like object` *s*, which must contain one or more "
481483
"lines of base64 encoded data, and return the decoded :class:`bytes`."
482484
msgstr ""
483485
"解碼必須包含一行或多行的 base64 編碼資料\\ :term:`類位元組物件 <bytes-like "
484486
"object>` *s*,並回傳解碼後的 :class:`bytes`。"
485487

486-
#: ../../library/base64.rst:311
488+
#: ../../library/base64.rst:310
487489
msgid ""
488490
"Encode the contents of the binary *input* file and write the resulting "
489491
"base64 encoded data to the *output* file. *input* and *output* must be :term:"
@@ -498,7 +500,7 @@ msgstr ""
498500
"出的每 76 個位元組之後插入一個換行字元 (``b'\\n'``),並確保輸出始終以換行字元"
499501
"結尾,符合 :rfc:`2045` (MIME) 的規定。"
500502

501-
#: ../../library/base64.rst:321
503+
#: ../../library/base64.rst:320
502504
msgid ""
503505
"Encode the :term:`bytes-like object` *s*, which can contain arbitrary binary "
504506
"data, and return :class:`bytes` containing the base64-encoded data, with "
@@ -509,15 +511,15 @@ msgstr ""
509511
"碼,並回傳包含 base64 編碼資料 :class:`bytes`,在每 76 個輸出位元組後插入換行"
510512
"字元 (``b'\\n'``) ,並確保有尾隨換行字元,符合 :rfc:`2045` (MIME) 的規定。"
511513

512-
#: ../../library/base64.rst:329
514+
#: ../../library/base64.rst:328
513515
msgid "An example usage of the module:"
514516
msgstr "模組的一個範例用法:"
515517

516-
#: ../../library/base64.rst:342
518+
#: ../../library/base64.rst:341
517519
msgid "Security Considerations"
518520
msgstr "安全性注意事項"
519521

520-
#: ../../library/base64.rst:344
522+
#: ../../library/base64.rst:343
521523
msgid ""
522524
"A new security considerations section was added to :rfc:`4648` (section 12); "
523525
"it's recommended to review the security section for any code deployed to "
@@ -526,18 +528,18 @@ msgstr ""
526528
":rfc:`4648`\\ (第 12 節)中添加了一個新的安全性考量部分;建議對部署到正式環"
527529
"境的任何程式碼進行安全性部分的審查。"
528530

529-
#: ../../library/base64.rst:349
531+
#: ../../library/base64.rst:348
530532
msgid "Module :mod:`binascii`"
531533
msgstr ":mod:`binascii` 模組"
532534

533-
#: ../../library/base64.rst:350
535+
#: ../../library/base64.rst:349
534536
msgid ""
535537
"Support module containing ASCII-to-binary and binary-to-ASCII conversions."
536538
msgstr ""
537539
"支援模組中包含 ASCII 到二進位 (ASCII-to-binary) 和二進位到 ASCII (binary-to-"
538540
"ASCII) 的轉換功能。"
539541

540-
#: ../../library/base64.rst:352
542+
#: ../../library/base64.rst:351
541543
msgid ""
542544
":rfc:`1521` - MIME (Multipurpose Internet Mail Extensions) Part One: "
543545
"Mechanisms for Specifying and Describing the Format of Internet Message "
@@ -546,7 +548,7 @@ msgstr ""
546548
":rfc:`1521` - MIME(多用途網際網路郵件擴展)第一部分:指定和描述網際網路主體"
547549
"格式的機制。"
548550

549-
#: ../../library/base64.rst:353
551+
#: ../../library/base64.rst:352
550552
msgid ""
551553
"Section 5.2, \"Base64 Content-Transfer-Encoding,\" provides the definition "
552554
"of the base64 encoding."

library/http.cookies.po

Lines changed: 36 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: Python 3.14\n"
88
"Report-Msgid-Bugs-To: \n"
9-
"POT-Creation-Date: 2025-09-08 15:25+0800\n"
9+
"POT-Creation-Date: 2026-01-24 22:47+0000\n"
1010
"PO-Revision-Date: 2024-12-24 18:49+0800\n"
1111
"Last-Translator: Liang-Bo Wang <me@liang2.tw>\n"
1212
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -38,12 +38,12 @@ msgstr ""
3838

3939
#: ../../library/http.cookies.rst:19
4040
msgid ""
41-
"The module formerly strictly applied the parsing rules described in "
42-
"the :rfc:`2109` and :rfc:`2068` specifications. It has since been "
43-
"discovered that MSIE 3.0x didn't follow the character rules outlined in "
44-
"those specs; many current-day browsers and servers have also relaxed parsing "
45-
"rules when it comes to cookie handling. As a result, this module now uses "
46-
"parsing rules that are a bit less strict than they once were."
41+
"The module formerly strictly applied the parsing rules described in the :rfc:"
42+
"`2109` and :rfc:`2068` specifications. It has since been discovered that "
43+
"MSIE 3.0x didn't follow the character rules outlined in those specs; many "
44+
"current-day browsers and servers have also relaxed parsing rules when it "
45+
"comes to cookie handling. As a result, this module now uses parsing rules "
46+
"that are a bit less strict than they once were."
4747
msgstr ""
4848
"此模組原先嚴格遵循了 :rfc:`2109` 和 :rfc:`2068` 規範所描述的剖析規則。自從發"
4949
"現 MSIE 3.0x 並不遵循這些規範所描述的字元規則,許多目前的瀏覽器和伺服器也在處"
@@ -55,9 +55,8 @@ msgid ""
5555
"``!#$%&'*+-.^_`|~:`` denote the set of valid characters allowed by this "
5656
"module in a cookie name (as :attr:`~Morsel.key`)."
5757
msgstr ""
58-
"字元集 :data:`string.ascii_letters`、:data:`string.digits` 和 ``!#$"
59-
"%&'*+-.^_`|~`` 表示此模組在 cookie 名稱 (:attr:`~Morsel.key`) 中允許的合法字"
60-
"元集合。"
58+
"字元集 :data:`string.ascii_letters`、:data:`string.digits` 和 ``!#$%&'*+-."
59+
"^_`|~`` 表示此模組在 cookie 名稱 (:attr:`~Morsel.key`) 中允許的合法字元集合。"
6160

6261
#: ../../library/http.cookies.rst:30
6362
msgid "Allowed ':' as a valid cookie name character."
@@ -96,12 +95,11 @@ msgstr "如果有給定 *input*,它會被傳遞給 :meth:`load` 方法。"
9695

9796
#: ../../library/http.cookies.rst:58
9897
msgid ""
99-
"This class derives from :class:`BaseCookie` and "
100-
"overrides :meth:`~BaseCookie.value_decode` "
101-
"and :meth:`~BaseCookie.value_encode`. :class:`!SimpleCookie` supports "
102-
"strings as cookie values. When setting the value, :class:`!SimpleCookie` "
103-
"calls the builtin :func:`str` to convert the value to a string. Values "
104-
"received from HTTP are kept as strings."
98+
"This class derives from :class:`BaseCookie` and overrides :meth:`~BaseCookie."
99+
"value_decode` and :meth:`~BaseCookie.value_encode`. :class:`!SimpleCookie` "
100+
"supports strings as cookie values. When setting the value, :class:`!"
101+
"SimpleCookie` calls the builtin :func:`str` to convert the value to a "
102+
"string. Values received from HTTP are kept as strings."
105103
msgstr ""
106104
"這個類別繼承自 :class:`BaseCookie` 並覆寫了 :meth:`~BaseCookie.value_decode` "
107105
"和 :meth:`~BaseCookie.value_encode`。:class:`!SimpleCookie` 支援字串作為 "
@@ -114,11 +112,11 @@ msgstr ":mod:`http.cookiejar` 模組"
114112

115113
#: ../../library/http.cookies.rst:67
116114
msgid ""
117-
"HTTP cookie handling for web *clients*. The :mod:`http.cookiejar` "
118-
"and :mod:`http.cookies` modules do not depend on each other."
115+
"HTTP cookie handling for web *clients*. The :mod:`http.cookiejar` and :mod:"
116+
"`http.cookies` modules do not depend on each other."
119117
msgstr ""
120-
"用於網路\\ *用戶端*\\ 的 HTTP cookie 處理。:mod:`http.cookiejar` "
121-
"和 :mod:`http.cookies` 模組互不相依。"
118+
"用於網路\\ *用戶端*\\ 的 HTTP cookie 處理。:mod:`http.cookiejar` 和 :mod:"
119+
"`http.cookies` 模組互不相依。"
122120

123121
#: ../../library/http.cookies.rst:70
124122
msgid ":rfc:`2109` - HTTP State Management Mechanism"
@@ -135,8 +133,8 @@ msgstr "Cookie 物件"
135133
#: ../../library/http.cookies.rst:82
136134
msgid ""
137135
"Return a tuple ``(real_value, coded_value)`` from a string representation. "
138-
"``real_value`` can be any type. This method does no decoding "
139-
"in :class:`BaseCookie` --- it exists so it can be overridden."
136+
"``real_value`` can be any type. This method does no decoding in :class:"
137+
"`BaseCookie` --- it exists so it can be overridden."
140138
msgstr ""
141139
"從字串表示回傳 ``(real_value, coded_value)`` 的元組。``real_value`` 可以是任"
142140
"何型別。此方法在 :class:`BaseCookie` 中不做解碼 --- 它存在以便可以被覆寫。"
@@ -153,8 +151,8 @@ msgstr ""
153151

154152
#: ../../library/http.cookies.rst:94
155153
msgid ""
156-
"In general, it should be the case that :meth:`value_encode` "
157-
"and :meth:`value_decode` are inverses on the range of *value_decode*."
154+
"In general, it should be the case that :meth:`value_encode` and :meth:"
155+
"`value_decode` are inverses on the range of *value_decode*."
158156
msgstr ""
159157
"一般來說,:meth:`value_encode` 和 :meth:`value_decode` 應該在 *value_decode* "
160158
"的範圍內是互逆的 (inverse)。"
@@ -246,9 +244,9 @@ msgid ""
246244
"the cookie was first set in. For this to be accepted by the user agent, you "
247245
"**must** also set ``Secure``."
248246
msgstr ""
249-
"屬性 :attr:`partitioned` 向 user agent(使用者代理)表明這些跨網站 cookie "
250-
"*應該*\\ 只能在與首次設定 cookie 時相同的頂層情境中使用。要讓 user agent 接受"
251-
"此設定,你\\ **必須**\\ 同時設定 ``Secure``。"
247+
"屬性 :attr:`partitioned` 向 user agent(使用者代理)表明這些跨網站 cookie *應"
248+
"該*\\ 只能在與首次設定 cookie 時相同的頂層情境中使用。要讓 user agent 接受此"
249+
"設定,你\\ **必須**\\ 同時設定 ``Secure``。"
252250

253251
#: ../../library/http.cookies.rst:163
254252
msgid ""
@@ -258,8 +256,8 @@ msgid ""
258256
"State)`_ for full details and examples."
259257
msgstr ""
260258
"此外,建議在設定 partitioned(分區)cookie 時使用 ``__Host`` 前綴,使其綁定到"
261-
"主機名稱而非可註冊網域。請閱讀 `CHIPS (Cookies Having Independent Partitioned "
262-
"State)`_ 以取得完整細節和範例。"
259+
"主機名稱而非可註冊網域。請閱讀 `CHIPS (Cookies Having Independent "
260+
"Partitioned State)`_ 以取得完整細節和範例。"
263261

264262
#: ../../library/http.cookies.rst:171
265263
msgid "The keys are case-insensitive and their default value is ``''``."
@@ -274,13 +272,11 @@ msgstr ""
274272

275273
#: ../../library/http.cookies.rst:177
276274
msgid ""
277-
"Attributes :attr:`~Morsel.key`, :attr:`~Morsel.value` "
278-
"and :attr:`~Morsel.coded_value` are read-only. Use :meth:`~Morsel.set` for "
279-
"setting them."
275+
"Attributes :attr:`~Morsel.key`, :attr:`~Morsel.value` and :attr:`~Morsel."
276+
"coded_value` are read-only. Use :meth:`~Morsel.set` for setting them."
280277
msgstr ""
281-
"屬性 :attr:`~Morsel.key`、:attr:`~Morsel.value` "
282-
"和 :attr:`~Morsel.coded_value` 是唯讀的。請使用 :meth:`~Morsel.set` 來設定它"
283-
"們。"
278+
"屬性 :attr:`~Morsel.key`、:attr:`~Morsel.value` 和 :attr:`~Morsel."
279+
"coded_value` 是唯讀的。請使用 :meth:`~Morsel.set` 來設定它們。"
284280

285281
#: ../../library/http.cookies.rst:182
286282
msgid "Added support for the :attr:`samesite` attribute."
@@ -361,8 +357,8 @@ msgid ""
361357
"Raise an error if key is not a valid :rfc:`2109` attribute, otherwise behave "
362358
"the same as :meth:`dict.setdefault`."
363359
msgstr ""
364-
"如果鍵不是一個有效的 :rfc:`2109` 屬性會引發錯誤,否則行為"
365-
"與 :meth:`dict.setdefault` 相同。"
360+
"如果鍵不是一個有效的 :rfc:`2109` 屬性會引發錯誤,否則行為與 :meth:`dict."
361+
"setdefault` 相同。"
366362

367363
#: ../../library/http.cookies.rst:265
368364
msgid "Example"
@@ -374,6 +370,7 @@ msgid ""
374370
msgstr "以下範例示範如何使用 :mod:`http.cookies` 模組。"
375371

376372
#: ../../library/http.cookies.rst:269
373+
#, fuzzy
377374
msgid ""
378375
">>> from http import cookies\n"
379376
">>> C = cookies.SimpleCookie()\n"
@@ -399,9 +396,9 @@ msgid ""
399396
"Set-Cookie: chips=ahoy\n"
400397
"Set-Cookie: vienna=finger\n"
401398
">>> C = cookies.SimpleCookie()\n"
402-
">>> C.load('keebler=\"E=everybody; L=\\\\\"Loves\\\\\"; fudge=\\\\012;\";')\n"
399+
">>> C.load('keebler=\"E=everybody; L=\\\\\"Loves\\\\\"; fudge=;\";')\n"
403400
">>> print(C)\n"
404-
"Set-Cookie: keebler=\"E=everybody; L=\\\"Loves\\\"; fudge=\\012;\"\n"
401+
"Set-Cookie: keebler=\"E=everybody; L=\\\"Loves\\\"; fudge=;\"\n"
405402
">>> C = cookies.SimpleCookie()\n"
406403
">>> C[\"oreo\"] = \"doublestuff\"\n"
407404
">>> C[\"oreo\"][\"path\"] = \"/\"\n"

0 commit comments

Comments
 (0)