diff --git a/library/base64.po b/library/base64.po index 3f854957d5..49b2e7d40d 100644 --- a/library/base64.po +++ b/library/base64.po @@ -36,7 +36,7 @@ msgid "" "facto standard Ascii85 and Base85 encodings." msgstr "" "這個模組提供將二進位資料編碼成可顯示 ASCII 字元以及解碼回原始資料的功能,包括" -"了\\ :rfc:`4648`\\ 中的 Base16、Base32、Base64 等編碼方式,以及標準 Ascii85、" +"了 :rfc:`4648` 中的 Base16、Base32、Base64 等編碼方式,以及標準 Ascii85、" "Base85 編碼等。" #: ../../library/base64.rst:22 @@ -46,8 +46,8 @@ msgid "" "an HTTP POST request. The encoding algorithm is not the same as the :" "program:`uuencode` program." msgstr "" -":rfc:`4648`\\ 標準編碼可以使電子郵件、URL,或是 HTTP POST 內容等傳輸管道安全" -"地傳遞資料。這些編碼演算法與\\ :program:`uuencode` \\ 並不相同。" +":rfc:`4648` 標準編碼可以使電子郵件、URL,或是 HTTP POST 內容等傳輸管道安全" +"地傳遞資料。這些編碼演算法與 :program:`uuencode` 並不相同。" #: ../../library/base64.rst:27 msgid "" @@ -57,6 +57,9 @@ msgid "" "or strings containing ASCII to :class:`bytes`. Both base-64 alphabets " "defined in :rfc:`4648` (normal, and URL- and filesystem-safe) are supported." msgstr "" +"該模組提供了兩個介面。新介面支援將 \\ :term:`bytes-like 物件 ` \\ 編碼成 ASCII \\" +" \\ :class:`bytes` \\,並將包含 ASCII 的 \\ :term:`bytes-like 物件 ` \\ 或字串解碼為 \\ :class:`bytes`\\。" +"支援 :rfc:`4648` 中定義的兩種 base-64 字母表(常見和 URL 及檔案系統安全字母表)。" #: ../../library/base64.rst:33 msgid "" @@ -67,12 +70,16 @@ msgid "" "looking for :rfc:`2045` support you probably want to be looking at the :mod:" "`email` package instead." msgstr "" +"舊版介面不支援從字串解碼,但它提供對 :term:`file 物件 `\\ 進行編碼和解碼的函式。" +"它僅支援 Base64 標準字母表,並且按照 :rfc:`2045` 每 76 個字元添加換行符號。" +"請注意,如果您需要 :rfc:`2045` 的支援,您需要查看 \\ :mod:`email` \\ 函式庫。" #: ../../library/base64.rst:41 msgid "" "ASCII-only Unicode strings are now accepted by the decoding functions of the " "modern interface." msgstr "" +"新介面的解碼功能現在接受 ASCII-only 的 Unicode 字串。" #: ../../library/base64.rst:45 msgid "" @@ -80,16 +87,20 @@ msgid "" "encoding and decoding functions in this module. Ascii85/Base85 support " "added." msgstr "" +"任何 \\ :term:`bytes-like 物件 ` \\ 現在被該模組中的所有編碼和解碼函式接受。" +"並支援 Ascii85/Base85。" #: ../../library/base64.rst:49 msgid "The modern interface provides:" -msgstr "" +msgstr "新介面提供:" #: ../../library/base64.rst:53 msgid "" "Encode the :term:`bytes-like object` *s* using Base64 and return the " "encoded :class:`bytes`." msgstr "" +"使用 Base64 對 \\ :term:`bytes-like 物件 ` \\ 進行編碼並回傳" +" \\ :class:`bytes` \\ 的編碼。" #: ../../library/base64.rst:56 msgid "" @@ -99,6 +110,10 @@ msgid "" "strings. The default is ``None``, for which the standard Base64 alphabet is " "used." msgstr "" +"選擇 *altchars* 必須是一個長度為 2 的 \\ :term:`bytes-like 物件 ` \\," +"用來指定替代的字母表,以替換 ``+`` 和 ``/`` 字元。" +"這使得程式可以生成 URL 或安全的 Base64 字串。" +"預設值為 ``None``,即使用標準的 Base64 字母表。" #: ../../library/base64.rst:61 msgid "" @@ -106,12 +121,15 @@ msgid "" "2. Raises a :exc:`TypeError` if *altchars* is not a :term:`bytes-like " "object`." msgstr "" +"如果 *altchars* 的長度不是 2,可以斷言會引發 \\ :exc:`ValueError`\\。" +"如果 *altchars* 不是 \\ :term:`bytes-like 物件 ` \\,則會導致 \\ :exc:`TypeError`\\。" #: ../../library/base64.rst:67 msgid "" "Decode the Base64 encoded :term:`bytes-like object` or ASCII string *s* and " "return the decoded :class:`bytes`." msgstr "" +"將經過 Base64 編碼的 \\ :term:`bytes-like 物件 ` \\ 或 ASCII 字串 *s* 解碼,並回傳解碼後的 \\ :class:`bytes` \\。" #: ../../library/base64.rst:70 msgid "" @@ -119,11 +137,14 @@ msgid "" "length 2 which specifies the alternative alphabet used instead of the ``+`` " "and ``/`` characters." msgstr "" +"選擇性參數 *altchars* 必須是長度為 2 的 \\ :term:`bytes-like 物件 ` \\ " +"或 ASCII 字串,用於指定替代字母表,取代 ``+`` 和 ``/`` 字元。" #: ../../library/base64.rst:74 msgid "" "A :exc:`binascii.Error` exception is raised if *s* is incorrectly padded." msgstr "" +"如果 *s* 輸入不正確,將引發 \\ :exc:`binascii.Error` \\ 例外。" #: ../../library/base64.rst:77 msgid "" @@ -132,29 +153,37 @@ msgid "" "the padding check. If *validate* is ``True``, these non-alphabet characters " "in the input result in a :exc:`binascii.Error`." msgstr "" +"如果 *validate* 為 ``False`` (預設值),在輸入檢查之前,不屬於標準 base-64 字母表和替代字母表的字符將被丟棄。" +"如果 *validate* 為 ``True``,輸入中的這些非字母表字符將導致引發 \\ :exc:`binascii.Error`\\。" #: ../../library/base64.rst:83 msgid "" "For more information about the strict base64 check, see :func:`binascii." "a2b_base64`" msgstr "" +"有關嚴格的 base64 檢查的更多資訊,請參閱 \\ :func:`binascii.a2b_base64`\\。" #: ../../library/base64.rst:85 msgid "" "May assert or raise a :exc:`ValueError` if the length of *altchars* is not 2." msgstr "" +"如果 *altchars* 的長度不是 2,可能會引發 \\ :exc:`ValueError`\\。" #: ../../library/base64.rst:89 msgid "" "Encode :term:`bytes-like object` *s* using the standard Base64 alphabet and " "return the encoded :class:`bytes`." msgstr "" +"使用標準 Base64 字母表對 \\ :term:`bytes-like 物件 ` \\ " +" *s* 進行編碼,並回傳編碼後的 \\ :class:`bytes`\\。" #: ../../library/base64.rst:95 msgid "" "Decode :term:`bytes-like object` or ASCII string *s* using the standard " "Base64 alphabet and return the decoded :class:`bytes`." msgstr "" +"使用標準 Base64 字母表對 \\ :term:`bytes-like 物件 ` \\ 或 ASCII 字串 *s* 進行解碼" +",並回傳解碼後的 \\ :class:`bytes`\\。" #: ../../library/base64.rst:101 msgid "" @@ -163,6 +192,8 @@ msgid "" "`` in the standard Base64 alphabet, and return the encoded :class:`bytes`. " "The result can still contain ``=``." msgstr "" +"使用 URL 和檔案系統安全 (filesystem-safe) 字母表對 \\ :term:`bytes-like 物件 ` \\ *s* 進行編碼," +"該字母表將標準 Base64 字母表中的 ``+`` 替換為 ``-``,``/`` 替換為 ``_``,並回傳編碼後的 \\ :class:`bytes`\\。結果仍可能包含 ``=``。" #: ../../library/base64.rst:110 msgid "" @@ -171,24 +202,29 @@ msgid "" "instead of ``/`` in the standard Base64 alphabet, and return the decoded :" "class:`bytes`." msgstr "" +"使用 URL 和檔案系統安全 (filesystem-safe) 字母表對 \\ :term:`bytes-like 物件 ` \\ " +"或 ASCII 字串 *s* 進行解碼,該字母表將標準 Base64 字母表中的 ``+`` 替換為 ``-``,``/`` 替換為 ``_``,並回傳解碼後的 \\ :class:`bytes`\\。" #: ../../library/base64.rst:119 msgid "" "Encode the :term:`bytes-like object` *s* using Base32 and return the " "encoded :class:`bytes`." msgstr "" +"使用 Base32 對 \\ :term:`bytes-like 物件 ` \\ *s* 進行編碼,並回傳編碼後的 \\ :class:`bytes`。" #: ../../library/base64.rst:125 msgid "" "Decode the Base32 encoded :term:`bytes-like object` or ASCII string *s* and " "return the decoded :class:`bytes`." msgstr "" +"解碼經過 Base32 編碼的 \\ :term:`bytes-like 物件 ` \\ 或 ASCII 字串 *s*,並回傳解碼後的 \\ :class:`bytes`。" #: ../../library/base64.rst:128 ../../library/base64.rst:176 msgid "" "Optional *casefold* is a flag specifying whether a lowercase alphabet is " "acceptable as input. For security purposes, the default is ``False``." msgstr "" +"選擇性參數 *casefold* 是一個指示是否接受小寫字母表作為輸入的標誌。出於安全考慮,預設值為 ``False``。" #: ../../library/base64.rst:132 msgid "" @@ -200,24 +236,30 @@ msgid "" "purposes the default is ``None``, so that 0 and 1 are not allowed in the " "input." msgstr "" +":rfc:`4648` 允許將數字 0 選擇性地對應對映為字母 O,並且允許將數字 1 選擇性地對應對映為字母 I 或字母 L。" +"當可選參數 *map01* 不為 ``None`` 時,指定數字 1 應該對映為哪個字母(當 *map01* 不為 ``None`` 時,數字 0 總是對映為字母 O)。" +"出於安全考慮,預設值為 ``None``,因此不允許在輸入中使用數字 0 和 1。" #: ../../library/base64.rst:139 ../../library/base64.rst:180 msgid "" "A :exc:`binascii.Error` is raised if *s* is incorrectly padded or if there " "are non-alphabet characters present in the input." msgstr "" +"如果 *s* 的填充不正確或輸入中存在非字母表字符,將引發 \\ :exc:`binascii.Error`\\。" #: ../../library/base64.rst:146 msgid "" "Similar to :func:`b32encode` but uses the Extended Hex Alphabet, as defined " "in :rfc:`4648`." msgstr "" +"類似於 \\ :func:`b32encode`\\,但使用在 :rfc:`4648` 中定義的擴展十六進位字母表。" #: ../../library/base64.rst:154 msgid "" "Similar to :func:`b32decode` but uses the Extended Hex Alphabet, as defined " "in :rfc:`4648`." msgstr "" +"類似於 \\ :func:`b32encode`\\,但使用在 :rfc:`4648` 中定義的擴展十六進位字母表。" #: ../../library/base64.rst:157 msgid "" @@ -226,24 +268,30 @@ msgid "" "these characters are included in the Extended Hex Alphabet and are not " "interchangeable." msgstr "" +"這個版本不允許將數字 0 對映為字母 O ,以及將數字 1 對映為字母 I 或字母 L,所有這些字符都包含在擴展十六進位字母表中,並且不能互換使用。" #: ../../library/base64.rst:167 msgid "" "Encode the :term:`bytes-like object` *s* using Base16 and return the " "encoded :class:`bytes`." msgstr "" +"使用 Base16 對 \\ :term:`bytes-like 物件 ` \\ *s* 進行編碼," +"並回傳編碼後的 \\ :class:`bytes`。" #: ../../library/base64.rst:173 msgid "" "Decode the Base16 encoded :term:`bytes-like object` or ASCII string *s* and " "return the decoded :class:`bytes`." msgstr "" +"解碼經過 Base16 編碼的 \\ :term:`bytes-like 物件 ` \\ 或 ASCII 字串 *s*," +"並回傳解碼後的 \\ :class:`bytes`。" #: ../../library/base64.rst:187 msgid "" "Encode the :term:`bytes-like object` *b* using Ascii85 and return the " "encoded :class:`bytes`." msgstr "" +"使用 ASCII85 對 \\ :term:`bytes-like 物件 ` \\ *b* 進行編碼,並回傳編碼後的 \\ :class:`bytes`。" #: ../../library/base64.rst:190 msgid "" @@ -251,6 +299,8 @@ msgid "" "instead of 4 consecutive spaces (ASCII 0x20) as supported by 'btoa'. This " "feature is not supported by the \"standard\" Ascii85 encoding." msgstr "" +"*foldspaces* 是一個選擇性的旗標,它使用特殊的短序列 'y' 來替代連續的 4 個空格(ASCII 0x20)," +"這是由 'btoa' 支援的功能。這個特性不被 「標準」 的 ASCII85 編碼所支援。" #: ../../library/base64.rst:194 msgid "" @@ -258,24 +308,28 @@ msgid "" "characters added to it. If this is non-zero, each output line will be at " "most this many characters long." msgstr "" +"*wrapcol* 控制輸出是否應該包含換行符(``b'\\n'``)字符。如果這個值不為零,每行輸出的長度將不超過這個數字。" #: ../../library/base64.rst:198 msgid "" "*pad* controls whether the input is padded to a multiple of 4 before " "encoding. Note that the ``btoa`` implementation always pads." msgstr "" +"*pad* 控制是否在編碼之前將輸入填充為 4 的倍數。請注意,``btoa`` 會填充。" #: ../../library/base64.rst:201 msgid "" "*adobe* controls whether the encoded byte sequence is framed with ``<~`` and " "``~>``, which is used by the Adobe implementation." msgstr "" +"*adobe* 控制編碼的位元組序列前後是否加上 ``<~`` 和 ``~>``,這是 Adobe 中使用的。" #: ../../library/base64.rst:209 msgid "" "Decode the Ascii85 encoded :term:`bytes-like object` or ASCII string *b* and " "return the decoded :class:`bytes`." msgstr "" +"解碼經過 ASCII85 編碼的 \\ :term:`bytes-like 物件 ` \\ 或 ASCII 字串 *b*,並回傳解碼後的 \\ :class:`bytes`。" #: ../../library/base64.rst:212 msgid "" @@ -283,12 +337,14 @@ msgid "" "be accepted as shorthand for 4 consecutive spaces (ASCII 0x20). This feature " "is not supported by the \"standard\" Ascii85 encoding." msgstr "" +"*foldspaces* 是一個旗標,指定是否應該將 'y' 短序列視為代表 4 個連續的空格(ASCII 0x20)的縮寫。這個功能不受「標準」ASCII85 編碼的支援。" #: ../../library/base64.rst:216 msgid "" "*adobe* controls whether the input sequence is in Adobe Ascii85 format (i.e. " "is framed with <~ and ~>)." msgstr "" +"*adobe* 控制輸入序列是否符合 Adobe ASCII85 格式(即前後加上 ``<~`` 和 ``~>``)。" #: ../../library/base64.rst:219 msgid "" @@ -297,18 +353,22 @@ msgid "" "whitespace characters, and by default contains all whitespace characters in " "ASCII." msgstr "" +"*ignorechars* 是一個包含要從輸入中忽略的字符的 \\ :term:`bytes-like 物件 ` \\ 或 ASCII 字串。" +"這只包含空格字符,預設情況下包含 ASCII 中的所有空格字符。" #: ../../library/base64.rst:229 msgid "" "Encode the :term:`bytes-like object` *b* using base85 (as used in e.g. git-" "style binary diffs) and return the encoded :class:`bytes`." msgstr "" +"使用 Base85(例如,git 風格的二進位差異)對 \\ :term:`bytes-like 物件 ` \\ *b* 進行編碼,並回傳編碼後的 \\ :class:`bytes`。" #: ../../library/base64.rst:232 msgid "" "If *pad* is true, the input is padded with ``b'\\0'`` so its length is a " "multiple of 4 bytes before encoding." msgstr "" +"如果 *pad* 為 true,則在編碼之前,輸入將使用 ``b'\\0'`` 進行填充,以使其長度為 4 的倍數。" #: ../../library/base64.rst:240 msgid "" @@ -316,10 +376,12 @@ msgid "" "return the decoded :class:`bytes`. Padding is implicitly removed, if " "necessary." msgstr "" +"解碼經過 base85 編碼的 \\ :term:`bytes-like 物件 ` \\ 或 ASCII 字串 *b*," +"並回傳解碼後的 \\ :class:`bytes`。必要時會隱式移除填充。" #: ../../library/base64.rst:247 msgid "The legacy interface:" -msgstr "" +msgstr "舊版介面:" #: ../../library/base64.rst:251 msgid "" @@ -328,12 +390,16 @@ msgid "" "objects `. *input* will be read until ``input.readline()`` " "returns an empty bytes object." msgstr "" +"解碼二進位檔案 *input* 的內容,並將結果的二進位資料寫入 *output* 檔案。" +"*input* 和 *output* 必須是 \\ :term:`file 物件 ` \\。*input* 將被讀取," +"直到 ``input.readline()`` 回傳一個空的 bytes 物件為止。" #: ../../library/base64.rst:259 msgid "" "Decode the :term:`bytes-like object` *s*, which must contain one or more " "lines of base64 encoded data, and return the decoded :class:`bytes`." msgstr "" +"解碼包含一行或多行的 base64 編碼的 \\ :term:`bytes-like 物件 ` \\ *s*,並回傳解碼後的 \\ :class:`bytes`。" #: ../../library/base64.rst:267 msgid "" @@ -344,6 +410,9 @@ msgid "" "(``b'\\n'``) after every 76 bytes of the output, as well as ensuring that " "the output always ends with a newline, as per :rfc:`2045` (MIME)." msgstr "" +"編碼二進位檔案 *input* 的內容,並將結果的 base64 編碼資料寫入 *output* 檔案。" +"*input* 和 *output* 必須是 \\ :term:`file 物件 ` \\。*input* 將被讀取,直到 ``input.read()`` 回傳一個空的 bytes 物件為止。" +"\\ :func:`encode` \\ 會在輸出的每 76 個字節之後插入一個換行字符(``b'\\n'``),並確保輸出始終以換行符結尾,符合 :rfc:`2045` (MIME)的規定。" #: ../../library/base64.rst:277 msgid "" @@ -352,14 +421,16 @@ msgid "" "newlines (``b'\\n'``) inserted after every 76 bytes of output, and ensuring " "that there is a trailing newline, as per :rfc:`2045` (MIME)." msgstr "" +"對包含任意二進位資料的 \\ :term:`bytes-like 物件 ` \\ *s* 進行編碼,並回傳 \\ :class:`bytes` \\ 包含 base64 編碼資料," +"在每 76 個輸出字節後插入換行符(``b'\\n'``),並確保有尾隨換行符,符合 :rfc:`2045` (MIME)的規定。" #: ../../library/base64.rst:285 msgid "An example usage of the module:" -msgstr "" +msgstr "模組的一個範例用法:" #: ../../library/base64.rst:298 msgid "Security Considerations" -msgstr "" +msgstr "安全考量" #: ../../library/base64.rst:300 msgid "" @@ -367,6 +438,7 @@ msgid "" "it's recommended to review the security section for any code deployed to " "production." msgstr "" +":rfc:`4648` (第 12 節)中添加了一個新的安全考量部分;建議對部署到正式環境的任何程式碼進行安全性部分的審查。" #: ../../library/base64.rst:306 msgid "Module :mod:`binascii`" @@ -376,6 +448,7 @@ msgstr ":mod:`binascii` 模組" msgid "" "Support module containing ASCII-to-binary and binary-to-ASCII conversions." msgstr "" +"支援模組中包含 ASCII 到二進位和二進位到 ASCII 的轉換功能。" #: ../../library/base64.rst:309 msgid "" @@ -383,12 +456,14 @@ msgid "" "Mechanisms for Specifying and Describing the Format of Internet Message " "Bodies" msgstr "" +":rfc:`1521` - MIME(多用途網際網路郵件擴展)第一部分:指定和描述網際網路郵件主體格式的機制。" #: ../../library/base64.rst:309 msgid "" "Section 5.2, \"Base64 Content-Transfer-Encoding,\" provides the definition " "of the base64 encoding." msgstr "" +"第 5.2 節,\"Base64 Content-Transfer-Encoding\",提供了 base64 編碼的定義。" #: ../../library/base64.rst:10 msgid "base64"