8000 <New>Translate the base64 doc for first commit · python/python-docs-zh-tw@81e6091 · GitHub
[go: up one dir, main page]

Skip to content

Commit 81e6091

Browse files
YangYang
Yang
authored and
Yang
committed
<New>Translate the base64 doc for first commit
1 parent e82ea00 commit 81e6091

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

library/base64.po

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ msgid ""
5757
"or strings containing ASCII to :class:`bytes`. Both base-64 alphabets "
5858
"defined in :rfc:`4648` (normal, and URL- and filesystem-safe) are supported."
5959
msgstr ""
60+
"該模組提供了兩個接口。較新的介面支援將 \\ :term:`bytes 物件 <bytes-like object>` \\ 編碼成ASCII \\ :"
61+
"class:`bytes`\\,並將包含 ASCII 的 \\ :term:`bytes 物件 <bytes-like object>`\\ 或字串解碼為 \\ :class:`bytes`\\。"
62+
"支援 \\ :rfc:`4648` \\ 中定義的兩種 base-64 字母表(常見和 URL 及檔案系統安全字母表)。"
6063

6164
#: ../../library/base64.rst:33
6265
msgid ""
@@ -67,29 +70,38 @@ msgid ""
6770
"looking for :rfc:`2045` support you probably want to be looking at the :mod:"
6871
"`email` package instead."
6972
msgstr ""
73+
"舊版介面不支援從字串解碼,但它提供對 \\ :term:`file objects <file object>` \\ 進行編碼和解碼的函示。"
74+
"它僅支持 Base64 標準字母表,並且按照 \\ :rfc:`2045` \\ 每 76 個字元添加換行符號。"
75+
"請注意,如果您正在查詢是否有支援 \\ :rfc:`2045` \\ ,您可能需要查看 \\ :mod:`email` \\ 函式庫。"
7076

7177
#: ../../library/base64.rst:41
7278
msgid ""
7379
"ASCII-only Unicode strings are now accepted by the decoding functions of the "
7480
"modern interface."
7581
msgstr ""
82+
"新版介面的解碼功能現在接受 ASCII 的 Unicode 字符串。"
7683

7784
#: ../../library/base64.rst:45
7885
msgid ""
7986
"Any :term:`bytes-like objects <bytes-like object>` are now accepted by all "
8087
"encoding and decoding functions in this module. Ascii85/Base85 support "
8188
"added."
8289
msgstr ""
90+
"任何 \\ :term:`bytes 物件 <bytes-like object>` \\ 現在被該模組中的所有編碼和解碼函式接受。"
91+
"並支援 Ascii85/Base85。"
8392

8493
#: ../../library/base64.rst:49
8594
msgid "The modern interface provides:"
8695
msgstr ""
96+
"新界面提供:"
8797

8898
#: ../../library/base64.rst:53
8999
msgid ""
90100
"Encode the :term:`bytes-like object` *s* using Base64 and return the "
91101
"encoded :class:`bytes`."
92102
msgstr ""
103+
"使用 Base64 對 \\ :term:`bytes 物件 <bytes-like object>` \\ 進行編碼並返回"
104+
"\\ :class:`bytes` \\ 的編碼。"
93105

94106
#: ../../library/base64.rst:56
95107
msgid ""
@@ -99,31 +111,41 @@ msgid ""
99111
"strings. The default is ``None``, for which the standard Base64 alphabet is "
100112
"used."
101113
msgstr ""
114+
"選擇性參數 *altchars* 必須是一個長度為 2 的 \\ :term:`bytes-like object`\\,"
115+
"用來指定替代的字母表,以替換 ``+`` 和 ``/`` 字元。"
116+
"這使得應用例如可以生成 URL 或檔案系統安全的 Base64 字串。"
117+
"預設值為 ``None``,即使用標準的 Base64 字母表。"
102118

103119
#: ../../library/base64.rst:61
104120
msgid ""
105121
"May assert or raise a :exc:`ValueError` if the length of *altchars* is not "
106122
"2. Raises a :exc:`TypeError` if *altchars* is not a :term:`bytes-like "
107123
"object`."
108124
msgstr ""
125+
"如果 *altchars* 的長度不是 2,可能會導致 \\ :exc:`ValueError`\\。"
126+
"如果 *altchars* 不是 \\ :term:`bytes 物件 <bytes-like object>`\\,則會導致 \\ :exc:`TypeError`\\。"
109127

110128
#: ../../library/base64.rst:67
111129
msgid ""
112130
"Decode the Base64 encoded :term:`bytes-like object` or ASCII string *s* and "
113131
"return the decoded :class:`bytes`."
114132
msgstr ""
133+
"將經過 Base64 編碼的 \\ :term:`bytes 物件 <bytes-like object>` \\ 或 ASCII 字串 *s* 解碼,並返回解碼後的 \\ :class:`bytes` \\。"
115134

116135
#: ../../library/base64.rst:70
117136
msgid ""
118137
"Optional *altchars* must be a :term:`bytes-like object` or ASCII string of "
119138
"length 2 which specifies the alternative alphabet used instead of the ``+`` "
120139
"and ``/`` characters."
121140
msgstr ""
141+
"選擇性參數 *altchars* 必須是長度為 2 的 \\ :term:`bytes 物件 <bytes-like object>` \\ "
142+
"或 ASCII 字串,用於指定替代字母表,取代 ``+`` 和 ``/`` 字元。"
122143

123144
#: ../../library/base64.rst:74
124145
msgid ""
125146
"A :exc:`binascii.Error` exception is raised if *s* is incorrectly padded."
126147
msgstr ""
148+
"如果 *s* 輸入不正確,將引發 \\ :exc:`binascii.Error` \\ 例外。"
127149

128150
#: ../../library/base64.rst:77
129151
msgid ""
@@ -132,29 +154,37 @@ msgid ""
132154
"the padding check. If *validate* is ``True``, these non-alphabet characters "
133155
"in the input result in a :exc:`binascii.Error`."
134156
msgstr ""
157+
"如果 *validate* 為「False」(預設值),在輸入檢查之前,不屬於標準 base-64 字母表和替代字母表的字符將被丟棄。"
158+
"如果 *validate* 為「True」,輸入中的這些非字母表字符將導致引發 \\ :exc:`binascii.Error`\\。"
135159

136160
#: ../../library/base64.rst:83
137161
msgid ""
138162
"For more information about the strict base64 check, see :func:`binascii."
139163
"a2b_base64`"
140164
msgstr ""
165+
"有關嚴格的 base64 檢查的更多資訊,請參閱 \\ :func:`binascii.a2b_base64`\\。"
141166

142167
#: ../../library/base64.rst:85
143168
msgid ""
144169
"May assert or raise a :exc:`ValueError` if the length of *altchars* is not 2."
145170
msgstr ""
171+
"如果 *altchars* 的長度不是 2,可能會導致 \\ :exc:`ValueError`\\。"
146172

147173
#: ../../library/base64.rst:89
148174
msgid ""
149175
"Encode :term:`bytes-like object` *s* using the standard Base64 alphabet and "
150176
"return the encoded :class:`bytes`."
151177
msgstr ""
178+
"使用標準 Base64 字母表對 \\ :term:`bytes 物件 <bytes-like object>` \\ "
179+
" *s* 進行編碼,並返回編碼後的 \\ :class:`bytes`\\。"
152180

153181
#: ../../library/base64.rst:95
154182
msgid ""
155183
"Decode :term:`bytes-like object` or ASCII string *s* using the standard "
156184
"Base64 alphabet and return the decoded :class:`bytes`."
157185
msgstr ""
186+
"使用標準 Base64 字母表對 \\ :term:`bytes 物件 <bytes-like object>` \\ 或 ASCII 字串 *s* 進行解碼"
187+
",並返回解碼後的 \\ :class:`bytes`\\。"
158188

159189
#: ../../library/base64.rst:101
160190
msgid ""
@@ -163,6 +193,8 @@ msgid ""
163193
"`` in the standard Base64 alphabet, and return the encoded :class:`bytes`. "
164194
"The result can still contain ``=``."
165195
msgstr ""
196+
"使用 URL 和檔案系統安全 (filesystem-safe) 字母表對 \\ :term:`bytes 物件 <bytes-like object>` \\ *s* 進行編碼,"
197+
"該字母表將標準 Base64 字母表中的 ``+`` 替換為 ``-``,``/`` 替換為 ``_``,並返回編碼後的 \\ :class:`bytes`\\。結果仍可能包含 ``=``。"
166198

167199
#: ../../library/base64.rst:110
168200
msgid ""
@@ -171,6 +203,8 @@ msgid ""
171203
"instead of ``/`` in the standard Base64 alphabet, and return the decoded :"
172204
"class:`bytes`."
173205
msgstr ""
206+
"使用 URL 和檔案系統安全 (filesystem-safe) 字母表對 \\ :term:`bytes 物件 <bytes-like object>` \\ "
207+
"或 ASCII 字串 *s* 進行解碼,該字母表將標準 Base64 字母表中的 ``+`` 替換為 ``-``,``/`` 替換為 ``_``,並返回解碼後的 \\ :class:`bytes`\\。"
174208

175209
#: ../../library/base64.rst:119
176210
msgid ""

0 commit comments

Comments
 (0)
0