@@ -36,7 +36,7 @@ msgid ""
36
36
"facto standard Ascii85 and Base85 encodings."
37
37
msgstr ""
38
38
"這個模組提供將二進位資料編碼成可顯示 ASCII 字元以及解碼回原始資料的功能,包括"
39
- "了\\ :rfc:`4648`\\ 中的 Base16、Base32、Base64 等編碼方式,以及標準 Ascii85 、"
39
+ "了 \\ :rfc:`4648`\\ 中的 Base16、Base32、Base64 等編碼方式,以及標準 ASCII85 、"
40
40
"Base85 編碼等。"
41
41
42
42
#: ../../library/base64.rst:22
@@ -47,7 +47,7 @@ msgid ""
47
47
"program:`uuencode` program."
48
48
msgstr ""
49
49
":rfc:`4648`\\ 標準編碼可以使電子郵件、URL,或是 HTTP POST 內容等傳輸管道安全"
50
- "地傳遞資料。這些編碼演算法與\\ :program:`uuencode` \\ 並不相同。"
50
+ "地傳遞資料。這些編碼演算法與 \\ :program:`uuencode` \\ 並不相同。"
51
51
52
52
#: ../../library/base64.rst:27
53
53
msgid ""
@@ -57,8 +57,8 @@ msgid ""
57
57
"or strings containing ASCII to :class:`bytes`. Both base-64 alphabets "
58
58
"defined in :rfc:`4648` (normal, and URL- and filesystem-safe) are supported."
59
59
msgstr ""
60
- "該模組提供了兩個接口。較新的介面支援將 \\ :term:`bytes 物件 <bytes-like object>` \\ 編碼成ASCII \\ : "
61
- "class:`bytes`\\ ,並將包含 ASCII 的 \\ :term:`bytes 物件 <bytes-like object>`\\ 或字串解碼為 \\ :class:`bytes`\\ 。"
60
+ "該模組提供了兩個接口。較新的介面支援將 \\ :term:`bytes 物件 <bytes-like object>` \\ 編碼成 ASCII \\ "
61
+ " \\ : class:`bytes` \\ ,並將包含 ASCII 的 \\ :term:`bytes 物件 <bytes-like object>` \\ 或字串解碼為 \\ :class:`bytes`\\ 。"
62
62
"支援 \\ :rfc:`4648` \\ 中定義的兩種 base-64 字母表(常見和 URL 及檔案系統安全字母表)。"
63
63
64
64
#: ../../library/base64.rst:33
@@ -70,7 +70,7 @@ msgid ""
70
70
"looking for :rfc:`2045` support you probably want to be looking at the :mod:"
71
71
"`email` package instead."
72
72
msgstr ""
73
- "舊版介面不支援從字串解碼,但它提供對 \\ :term:`file objects <file object>` \\ 進行編碼和解碼的函示。"
73
+ "舊版介面不支援從字串解碼,但它提供對 \\ :term:`file 物件 <file object>` \\ 進行編碼和解碼的函示。"
74
74
"它僅支持 Base64 標準字母表,並且按照 \\ :rfc:`2045` \\ 每 76 個字元添加換行符號。"
75
75
"請注意,如果您正在查詢是否有支援 \\ :rfc:`2045` \\ ,您可能需要查看 \\ :mod:`email` \\ 函式庫。"
76
76
@@ -88,20 +88,19 @@ msgid ""
88
88
"added."
89
89
msgstr ""
90
90
"任何 \\ :term:`bytes 物件 <bytes-like object>` \\ 現在被該模組中的所有編碼和解碼函式接受。"
91
- "並支援 Ascii85 /Base85。"
91
+ "並支援 ASCII85 /Base85。"
92
92
93
93
#: ../../library/base64.rst:49
94
94
msgid "The modern interface provides:"
95
- msgstr ""
96
- "新界面提供:"
95
+ msgstr "新界面提供:"
97
96
98
97
#: ../../library/base64.rst:53
99
98
msgid ""
100
99
"Encode the :term:`bytes-like object` *s* using Base64 and return the "
101
100
"encoded :class:`bytes`."
102
101
msgstr ""
103
102
"使用 Base64 對 \\ :term:`bytes 物件 <bytes-like object>` \\ 進行編碼並返回"
104
- "\\ :class:`bytes` \\ 的編碼。"
103
+ " \\ :class:`bytes` \\ 的編碼。"
105
104
106
105
#: ../../library/base64.rst:56
107
106
msgid ""
@@ -111,7 +110,7 @@ msgid ""
111
110
"strings. The default is ``None``, for which the standard Base64 alphabet is "
112
111
"used."
113
112
msgstr ""
114
- "選擇性參數 *altchars* 必須是一個長度為 2 的 \\ :term:`bytes-like object` \\ ,"
113
+ "選擇性參數 *altchars* 必須是一個長度為 2 的 \\ :term:`bytes 物件 <bytes -like object>` \\ ,"
115
114
"用來指定替代的字母表,以替換 ``+`` 和 ``/`` 字元。"
116
115
"這使得應用例如可以生成 URL 或檔案系統安全的 Base64 字串。"
117
116
"預設值為 ``None``,即使用標準的 Base64 字母表。"
@@ -123,7 +122,7 @@ msgid ""
123
122
"object`."
124
123
msgstr ""
125
124
"如果 *altchars* 的長度不是 2,可能會導致 \\ :exc:`ValueError`\\ 。"
126
- "如果 *altchars* 不是 \\ :term:`bytes 物件 <bytes-like object>`\\ ,則會導致 \\ :exc:`TypeError`\\ 。"
125
+ "如果 *altchars* 不是 \\ :term:`bytes 物件 <bytes-like object>` \\ ,則會導致 \\ :exc:`TypeError`\\ 。"
127
126
128
127
#: ../../library/base64.rst:67
129
128
msgid ""
@@ -211,18 +210,21 @@ msgid ""
211
210
"Encode the :term:`bytes-like object` *s* using Base32 and return the "
212
211
"encoded :class:`bytes`."
213
212
msgstr ""
213
+ "使用 Base32 對 \\ :term:`bytes 物件 <bytes-like object>` \\ *s* 進行編碼,並返回編碼後的 \\ :class:`bytes`。"
214
214
215
215
#: ../../library/base64.rst:125
216
216
msgid ""
217
217
"Decode the Base32 encoded :term:`bytes-like object` or ASCII string *s* and "
218
218
"return the decoded :class:`bytes`."
219
219
msgstr ""
220
+ "解碼經過 Base32 編碼的 \\ :term:`bytes 物件 <bytes-like object>` \\ 或 ASCII 字串 *s*,並返回解碼後的 \\ :class:`bytes`。"
220
221
221
222
#: ../../library/base64.rst:128 ../../library/base64.rst:176
222
223
msgid ""
223
224
"Optional *casefold* is a flag specifying whether a lowercase alphabet is "
224
225
"acceptable as input. For security purposes, the default is ``False``."
225
226
msgstr ""
227
+ "選擇性參數 *casefold* 是一個指示是否接受小寫字母表作為輸入的標誌。出於安全考慮,預設值為 ``False``。"
226
228
227
229
#: ../../library/base64.rst:132
228
230
msgid ""
@@ -234,24 +236,30 @@ msgid ""
234
236
"purposes the default is ``None``, so that 0 and 1 are not allowed in the "
235
237
"input."
236
238
msgstr ""
239
+ "\\ :rfc:`4648` \\ 允許將數字 0 選擇性地映射為字母 O,並且允許將數字 1 選擇性地映射為字母 I 或字母 L。"
240
+ "當可選參數 *map01* 不為 ``None`` 時,指定數字 1 應該映射為哪個字母(當 *map01* 不為 ``None`` 時,數字 0 總是映射為字母 O)。"
241
+ "出於安全考慮,預設值為 ``None``,因此不允許在輸入中使用數字 0 和 1。"
237
242
238
243
#: ../../library/base64.rst:139 ../../library/base64.rst:180
239
244
msgid ""
240
245
"A :exc:`binascii.Error` is raised if *s* is incorrectly padded or if there "
241
246
"are non-alphabet characters present in the input."
242
247
msgstr ""
248
+ "如果 *s* 的填充不正確或輸入中存在非字母表字符,將導致 \\ :exc:`binascii.Error`\\ 。"
243
249
244
250
#: ../../library/base64.rst:146
245
251
msgid ""
246
252
"Similar to :func:`b32encode` but uses the Extended Hex Alphabet, as defined "
247
253
"in :rfc:`4648`."
248
254
msgstr ""
255
+ "類似於 \\ :func:`b32encode`\\ ,但使用在 \\ :rfc:`4648` \\ 中定義的擴展十六進制字母表。"
249
256
250
257
#: ../../library/base64.rst:154
251
258
msgid ""
252
259
"Similar to :func:`b32decode` but uses the Extended Hex Alphabet, as defined "
253
260
"in :rfc:`4648`."
254
261
msgstr ""
262
+ "類似於 \\ :func:`b32encode`\\ ,但使用在 \\ :rfc:`4648` \\ 中定義的擴展十六進制字母表。"
255
263
256
264
#: ../../library/base64.rst:157
257
265
msgid ""
@@ -260,69 +268,83 @@ msgid ""
260
268
"these characters are included in the Extended Hex Alphabet and are not "
261
269
"interchangeable."
262
270
msgstr ""
271
+ "這個版本不允許將數字 0 映射為字母 O ,以及將數字 1 映射為字母 I 或字母 L,所有這些字符都包含在擴展十六進制字母表中,並且不能互換使用。"
263
272
264
273
#: ../../library/base64.rst:167
265
274
msgid ""
266
275
"Encode the :term:`bytes-like object` *s* using Base16 and return the "
267
276
"encoded :class:`bytes`."
268
277
msgstr ""
278
+ "使用 Base16 對 \\ :term:`bytes 物件 <bytes-like object>` \\ *s* 進行編碼,"
279
+ "並返回編碼後的 \\ :class:`bytes`。"
269
280
270
281
#: ../../library/base64.rst:173
271
282
msgid ""
272
283
"Decode the Base16 encoded :term:`bytes-like object` or ASCII string *s* and "
273
284
"return the decoded :class:`bytes`."
274
285
msgstr ""
286
+ "解碼經過 Base16 編碼的 \\ :term:`bytes 物件 <bytes-like object>` \\ 或 ASCII 字串 *s*,"
287
+ "並返回解碼後的 \\ :class:`bytes`。"
275
288
276
289
#: ../../library/base64.rst:187
277
290
msgid ""
278
291
"Encode the :term:`bytes-like object` *b* using Ascii85 and return the "
279
292
"encoded :class:`bytes`."
280
293
msgstr ""
294
+ "使用 ASCII85 對 \\ :term:`bytes 物件 <bytes-like object>` \\ *b* 進行編碼,並返回編碼後的 \\ :class:`bytes`。"
281
295
282
296
#: ../../library/base64.rst:190
283
297
msgid ""
284
298
"*foldspaces* is an optional flag that uses the special short sequence 'y' "
285
299
"instead of 4 consecutive spaces (ASCII 0x20) as supported by 'btoa'. This "
286
300
"feature is not supported by the \" standard\" Ascii85 encoding."
287
301
msgstr ""
302
+ "*foldspaces* 是一個選擇性的標誌,它使用特殊的短序列 'y' 來替代連續的 4 個空格(ASCII 0x20),"
303
+ "這是由 'btoa' 支援的功能。這個特性不被 「標準」 的 ASCII85 編碼所支持。"
288
304
289
305
#: ../../library/base64.rst:194
290
306
msgid ""
291
307
"*wrapcol* controls whether the output should have newline (``b'\\ n'``) "
292
308
"characters added to it. If this is non-zero, each output line will be at "
293
309
"most this many characters long."
294
310
msgstr ""
311
+ "*wrapcol* 控制輸出是否應該包含換行符(``b'\\ n'``)字符。如果這個值不為零,每行輸出的長度將不超過這個數字。"
295
312
296
313
#: ../../library/base64.rst:198
297
314
msgid ""
298
315
"*pad* controls whether the input is padded to a multiple of 4 before "
299
316
"encoding. Note that the ``btoa`` implementation always pads."
300
317
msgstr ""
318
+ "*pad* 控制是否在編碼之前將輸入填充為4的倍數。請注意,``btoa`` 總是會填充。"
301
319
302
320
#: ../../library/base64.rst:201
303
321
msgid ""
304
322
"*adobe* controls whether the encoded byte sequence is framed with ``<~`` and "
305
323
"``~>``, which is used by the Adobe implementation."
306
324
msgstr ""
325
+ "*adobe* 控制編碼的位元組序列前後是否加上 ``<~`` 和 ``~>``,這是Adobe中使用的。"
307
326
308
327
#: ../../library/base64.rst:209
309
328
msgid ""
310
329
"Decode the Ascii85 encoded :term:`bytes-like object` or ASCII string *b* and "
311
330
"return the decoded :class:`bytes`."
312
331
msgstr ""
332
+ "解碼經過 ASCII85 編碼的 \\ :term:`bytes 物件 <bytes-like object>` \\ 或 ASCII 字串 *b*,並返回解碼後的 \\ :class:`bytes`。"
313
333
314
334
#: ../../library/base64.rst:212
315
335
msgid ""
316
336
"*foldspaces* is a flag that specifies whether the 'y' short sequence should "
317
337
"be accepted as shorthand for 4 consecutive spaces (ASCII 0x20). This feature "
318
338
"is not supported by the \" standard\" Ascii85 encoding."
319
339
msgstr ""
340
+ "*foldspaces* 是一個旗標,指定是否應該將 'y' 短序列視為代表 4 個連續的空格(ASCII 0x20)的縮寫。這個功能不受「標準」ASCII85 編碼的支持。"
320
341
321
342
#: ../../library/base64.rst:216
322
343
msgid ""
323
344
"*adobe* controls whether the input sequence is in Adobe Ascii85 format (i.e. "
324
345
"is framed with <~ and ~>)."
325
346
msgstr ""
347
+ "*adobe* 控制輸入序列是否符合 Adobe ASCII85 格式(即前後加上 ``<~`` 和 ``~>``)。"
326
348
327
349
#: ../../library/base64.rst:219
328
350
msgid ""
@@ -331,29 +353,35 @@ msgid ""
331
353
"whitespace characters, and by default contains all whitespace characters in "
332
354
"ASCII."
333
355
msgstr ""
356
+ "*ignorechars* 是一個包含要從輸入中忽略的字符的 \\ :term:`bytes 物件 <bytes-like object>` \\ 或 ASCII 字串。"
357
+ "這只包含空格字符,默認情況下包含 ASCII 中的所有空格字符。"
334
358
335
359
#: ../../library/base64.rst:229
336
360
msgid ""
337
361
"Encode the :term:`bytes-like object` *b* using base85 (as used in e.g. git-"
338
362
"style binary diffs) and return the encoded :class:`bytes`."
339
363
msgstr ""
364
+ "使用 Base85(例如,git 風格的二進制差異)對 \\ :term:`bytes 物件 <bytes-like object>` \\ *b* 進行編碼,並返回編碼後的 \\ :class:`bytes`。"
340
365
341
366
#: ../../library/base64.rst:232
342
367
msgid ""
343
368
"If *pad* is true, the input is padded with ``b'\\ 0'`` so its length is a "
344
369
"multiple of 4 bytes before encoding."
345
370
msgstr ""
371
+ "如果 *pad* 為 true,則在編碼之前,輸入將使用 ``b'\\ 0'`` 進行填充,以使其長度為 4 的倍數。"
346
372
347
373
#: ../../library/base64.rst:240
348
374
msgid ""
349
375
"Decode the base85-encoded :term:`bytes-like object` or ASCII string *b* and "
350
376
"return the decoded :class:`bytes`. Padding is implicitly removed, if "
351
377
"necessary."
352
378
msgstr ""
379
+ "解碼經過 base85 編碼的 \\ :term:`bytes 物件 <bytes-like object>` \\ 或 ASCII 字串 *b*,"
380
+ "並返回解碼後的 \\ :class:`bytes`。必要時會隱式移除填充。"
353
381
354
382
#: ../../library/base64.rst:247
355
383
msgid "The legacy interface:"
356
- msgstr ""
384
+ msgstr "舊版介面: "
357
385
358
386
#: ../../library/base64.rst:251
359
387
msgid ""
@@ -362,12 +390,16 @@ msgid ""
362
390
"objects <file object>`. *input* will be read until ``input.readline()`` "
363
391
"returns an empty bytes object."
364
392
msgstr ""
393
+ "解碼二進制文件 *input* 的內容,並將結果的二進制資料寫入 *output* 文件。"
394
+ "*input* 和 *output* 必須是 \\ :term:`file 物件 <file object>` \\ 。*input* 將被讀取,"
395
+ "直到 ``input.readline()`` 返回一個空的 bytes 對象為止。"
365
396
366
397
#: ../../library/base64.rst:259
367
398
msgid ""
368
399
"Decode the :term:`bytes-like object` *s*, which must contain one or more "
369
400
"lines of base64 encoded data, and return the decoded :class:`bytes`."
370
401
msgstr ""
402
+ "解碼包含一行或多行的 base64 編碼 \\ :term:`bytes 物件 <bytes-like object>` \\ *s*,並返回解碼後的 \\ :class:`bytes`。"
371
403
372
404
#: ../../library/base64.rst:267
373
405
msgid ""
@@ -378,6 +410,9 @@ msgid ""
378
410
"(``b'\\ n'``) after every 76 bytes of the output, as well as ensuring that "
379
411
"the output always ends with a newline, as per :rfc:`2045` (MIME)."
380
412
msgstr ""
413
+ "編碼二進制文件 *input* 的內容,並將結果的 base64 編碼資料寫入 *output* 文件。"
414
+ "*input* 和 *output* 必須是 \\ :term:`file 物件 <file object>` \\ 。*input* 將被讀取,直到 ``input.read()`` 返回一個空的 bytes 對象為止。"
415
+ "\\ :func:`encode` \\ 會在輸出的每 76 個字節之後插入一個換行字符(``b'\\ n'``),並確保輸出始終以換行符結尾,符合 \\ :rfc:`2045` \\ (MIME)的規定。"
381
416
382
417
#: ../../library/base64.rst:277
383
418
msgid ""
@@ -386,21 +421,24 @@ msgid ""
386
421
"newlines (``b'\\ n'``) inserted after every 76 bytes of output, and ensuring "
387
422
"that there is a trailing newline, as per :rfc:`2045` (MIME)."
388
423
msgstr ""
424
+ "對包含任意二進制資料的 \\ :term:`bytes 物件 <bytes-like object>` \\ *s* 進行編碼,並返回 \\ :class:`bytes` \\ 包含 base64 編碼資料,"
425
+ "在每 76 個輸出字節後插入換行符(``b'\\ n'``),並確保有尾隨換行符,符合 \\ :rfc:`2045` \\ (MIME)的規定。"
389
426
390
427
#: ../../library/base64.rst:285
391
428
msgid "An example usage of the module:"
392
- msgstr ""
429
+ msgstr "模組的一個示例用法: "
393
430
394
431
#: ../../library/base64.rst:298
395
432
msgid "Security Considerations"
396
- msgstr ""
433
+ msgstr "安全考量 "
397
434
398
435
#: ../../library/base64.rst:300
399
436
msgid ""
400
437
"A new security considerations section was added to :rfc:`4648` (section 12); "
401
438
"it's recommended to review the security section for any code deployed to "
402
439
"production."
403
440
msgstr ""
441
+ "\\ :rfc:`4648` \\ (第 12 節)中添加了一個新的安全考量部分;建議對部署到生產環境的任何代碼進行安全性部分的審查。"
404
442
405
443
#: ../../library/base64.rst:305
406
444
msgid "Module :mod:`binascii`"
@@ -410,19 +448,22 @@ msgstr ":mod:`binascii` 模組"
410
448
msgid ""
411
449
"Support module containing ASCII-to-binary and binary-to-ASCII conversions."
412
450
msgstr ""
451
+ "支持模組中包含 ASCII 到二進制和二進制到 ASCII 的轉換功能。"
413
452
414
453
#: ../../library/base64.rst:308
415
454
msgid ""
416
455
":rfc:`1521` - MIME (Multipurpose Internet Mail Extensions) Part One: "
417
456
"Mechanisms for Specifying and Describing the Format of Internet Message "
418
457
"Bodies"
419
458
msgstr ""
459
+ "\\ :rfc:`1521` \\ - MIME(多用途互聯網郵件擴展)第一部分:指定和描述互聯網郵件主體格式的機制。"
420
460
421
461
#: ../../library/base64.rst:309
422
462
msgid ""
423
463
"Section 5.2, \" Base64 Content-Transfer-Encoding,\" provides the definition "
424
464
"of the base64 encoding."
425
465
msgstr ""
466
+ "第 5.2 節,\" Base64 Content-Transfer-Encoding\" ,提供了 base64 編碼的定義。"
426
467
427
468
#: ../../library/base64.rst:10
428
469
msgid "base64"
0 commit comments