-
-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathbase64.po
More file actions
401 lines (353 loc) · 18.6 KB
/
base64.po
File metadata and controls
401 lines (353 loc) · 18.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2025, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# python-doc bot, 2025
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.9\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-03 16:35+0000\n"
"PO-Revision-Date: 2025-09-22 17:54+0000\n"
"Last-Translator: python-doc bot, 2025\n"
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: ../../library/base64.rst:2
msgid ":mod:`base64` --- Base16, Base32, Base64, Base85 Data Encodings"
msgstr ":mod:`base64` --- Base16, Base32, Base64, Base85 数据编码"
#: ../../library/base64.rst:8
msgid "**Source code:** :source:`Lib/base64.py`"
msgstr "**源代码:** :source:`Lib/base64.py`"
#: ../../library/base64.rst:16
msgid ""
"This module provides functions for encoding binary data to printable ASCII "
"characters and decoding such encodings back to binary data. It provides "
"encoding and decoding functions for the encodings specified in :rfc:`3548`, "
"which defines the Base16, Base32, and Base64 algorithms, and for the de-"
"facto standard Ascii85 and Base85 encodings."
msgstr ""
"此模块提供了将二进制数据编码为可打印的 ASCII 字符以及将这些编码解码回二进制数据的函数。它为 :rfc:`3548` 指定的 Base16, "
"Base32 和 Base64 编码以及已被广泛接受的 Ascii85 和 Base85 编码提供了编码和解码函数。"
#: ../../library/base64.rst:22
msgid ""
"The :rfc:`3548` encodings are suitable for encoding binary data so that it "
"can safely sent by email, used as parts of URLs, or included as part of an "
"HTTP POST request. The encoding algorithm is not the same as the "
":program:`uuencode` program."
msgstr ""
":rfc:`3548` 编码的目的是使得二进制数据可以作为电子邮件的内容正确地发送,用作 URL 的一部分,或者作为 HTTP POST "
"请求的一部分。其中的编码算法和 :program:`uuencode` 程序是不同的。"
#: ../../library/base64.rst:27
msgid ""
"There are two interfaces provided by this module. The modern interface "
"supports encoding :term:`bytes-like objects <bytes-like object>` to ASCII "
":class:`bytes`, and decoding :term:`bytes-like objects <bytes-like object>` "
"or strings containing ASCII to :class:`bytes`. Both base-64 alphabets "
"defined in :rfc:`3548` (normal, and URL- and filesystem-safe) are supported."
msgstr ""
"此模块提供了两个接口。新的接口提供了从 :term:`类字节对象 <bytes-like object>` 到 ASCII 字节 "
":class:`bytes` 的编码,以及将 ASCII 的 :term:`类字节对象 <bytes-like object>` 或字符串解码到 "
":class:`bytes` 的操作。此模块支持定义在 :rfc:`3548` 中的所有 base-64 字母表 (普通的、URL "
"安全的和文件系统安全的)。"
#: ../../library/base64.rst:33
msgid ""
"The legacy interface does not support decoding from strings, but it does "
"provide functions for encoding and decoding to and from :term:`file objects "
"<file object>`. It only supports the Base64 standard alphabet, and it adds "
"newlines every 76 characters as per :rfc:`2045`. Note that if you are "
"looking for :rfc:`2045` support you probably want to be looking at the "
":mod:`email` package instead."
msgstr ""
"旧的接口不提供从字符串的解码操作,但提供了操作 :term:`文件对象 <file object>` 的编码和解码函数。旧接口只支持标准的 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 的 Unicode 字符串。"
#: ../../library/base64.rst:45
msgid ""
"Any :term:`bytes-like objects <bytes-like object>` are now accepted by all "
"encoding and decoding functions in this module. Ascii85/Base85 support "
"added."
msgstr ""
"所有 :term:`类字节对象 <bytes-like object>` 现在已经被所有编码和解码函数接受。添加了对 Ascii85/Base85 "
"的支持。"
#: ../../library/base64.rst:49
msgid "The modern interface provides:"
msgstr "新的接口提供:"
#: ../../library/base64.rst:53
msgid ""
"Encode the :term:`bytes-like object` *s* using Base64 and return the encoded"
" :class:`bytes`."
msgstr "对 :term:`bytes-like object` *s* 进行 Base64 编码,并返回编码后的 :class:`bytes`。"
#: ../../library/base64.rst:56
msgid ""
"Optional *altchars* must be a :term:`bytes-like object` of at least length 2"
" (additional characters are ignored) which specifies an alternative alphabet"
" for the ``+`` and ``/`` characters. This allows an application to e.g. "
"generate URL or filesystem safe Base64 strings. The default is ``None``, "
"for which the standard Base64 alphabet is used."
msgstr ""
"可选项 *altchars* 必须是一个长 2 字节的 :term:`bytes-like object`,它指定了用于替换 ``+`` 和 ``/``"
" 的字符。这允许应用程序生成 URL 或文件系统安全的 Base64 字符串。默认值是 ``None``,使用标准 Base64 字母表。"
#: ../../library/base64.rst:65
msgid ""
"Decode the Base64 encoded :term:`bytes-like object` or ASCII string *s* and "
"return the decoded :class:`bytes`."
msgstr ""
"解码 Base64 编码过的 :term:`bytes-like object` 或 ASCII 字符串 *s* 并返回解码过的 "
":class:`bytes`。"
#: ../../library/base64.rst:68
msgid ""
"Optional *altchars* must be a :term:`bytes-like object` or ASCII string of "
"at least length 2 (additional characters are ignored) which specifies the "
"alternative alphabet used instead of the ``+`` and ``/`` characters."
msgstr ""
"可选项 *altchars* 必须是一个长 2 字节的 :term:`bytes-like object`,它指定了用于替换 ``+`` 和 ``/``"
" 的字符。"
#: ../../library/base64.rst:72
msgid ""
"A :exc:`binascii.Error` exception is raised if *s* is incorrectly padded."
msgstr "如果 *s* 被不正确地填写,一个 :exc:`binascii.Error` 错误将被抛出。"
#: ../../library/base64.rst:75
msgid ""
"If *validate* is ``False`` (the default), characters that are neither in the"
" normal base-64 alphabet nor the alternative alphabet are discarded prior to"
" 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``,这些非 base64 字符将导致 "
":exc:`binascii.Error`。"
#: ../../library/base64.rst:84
msgid ""
"Encode :term:`bytes-like object` *s* using the standard Base64 alphabet and "
"return the encoded :class:`bytes`."
msgstr ""
"编码 :term:`bytes-like object` *s*,使用标准 Base64 字母表并返回编码过的 :class:`bytes`。"
#: ../../library/base64.rst:90
msgid ""
"Decode :term:`bytes-like object` or ASCII string *s* using the standard "
"Base64 alphabet and return the decoded :class:`bytes`."
msgstr ""
"解码 :term:`bytes-like object` 或 ASCII 字符串 *s*,使用标准 Base64 字母表并返回编码过的 "
":class:`bytes`。"
#: ../../library/base64.rst:96
msgid ""
"Encode :term:`bytes-like object` *s* using the URL- and filesystem-safe "
"alphabet, which substitutes ``-`` instead of ``+`` and ``_`` instead of "
"``/`` in the standard Base64 alphabet, and return the encoded "
":class:`bytes`. The result can still contain ``=``."
msgstr ""
"编码 :term:`bytes-like object` *s*,使用 URL 与文件系统安全的字母表,使用 ``-`` 以及 ``_`` 代替标准 "
"Base64 字母表中的 ``+`` 和 ``/``。返回编码过的 :class:`bytes`。结果中可能包含 ``=``。"
#: ../../library/base64.rst:105
msgid ""
"Decode :term:`bytes-like object` or ASCII string *s* using the URL- and "
"filesystem-safe alphabet, which substitutes ``-`` instead of ``+`` and ``_``"
" instead of ``/`` in the standard Base64 alphabet, and return the decoded "
":class:`bytes`."
msgstr ""
"解码 :term:`bytes-like object` 或 ASCII 字符串 *s*,使用 URL 与文件系统安全的字母表,使用 ``-`` 以及 "
"``_`` 代替标准 Base64 字母表中的 ``+`` 和 ``/``。返回解码过的 :class:`bytes`"
#: ../../library/base64.rst:114
msgid ""
"Encode the :term:`bytes-like object` *s* using Base32 and return the encoded"
" :class:`bytes`."
msgstr "用 Base32 编码 :term:`bytes-like object` *s* 并返回编码过的 :class:`bytes`"
#: ../../library/base64.rst:120
msgid ""
"Decode the Base32 encoded :term:`bytes-like object` or ASCII string *s* and "
"return the decoded :class:`bytes`."
msgstr ""
"解码 Base32 编码过的 :term:`bytes-like object` 或 ASCII 字符串 *s* 并返回解码过的 "
":class:`bytes`。"
#: ../../library/base64.rst:123 ../../library/base64.rst:150
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:127
msgid ""
":rfc:`3548` allows for optional mapping of the digit 0 (zero) to the letter "
"O (oh), and for optional mapping of the digit 1 (one) to either the letter I"
" (eye) or letter L (el). The optional argument *map01* when not ``None``, "
"specifies which letter the digit 1 should be mapped to (when *map01* is not "
"``None``, the digit 0 is always mapped to the letter O). For security "
"purposes the default is ``None``, so that 0 and 1 are not allowed in the "
"input."
msgstr ""
":rfc:`3548` 允许将字母 0(zero) 映射为字母 O(oh),并可以选择是否将字母 1(one) 映射为 I(eye) 或 "
"L(el)。可选参数 *map01* 不是 ``None`` 时,它的值指定 1 的映射目标 (I 或 l),当 *map01* 非 ``None`` "
"时, 0 总是被映射为 O。为了安全考虑,默认值被设为 ``None``,如果是这样, 0 和 1 不允许被作为输入。"
#: ../../library/base64.rst:134 ../../library/base64.rst:154
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:141
msgid ""
"Encode the :term:`bytes-like object` *s* using Base16 and return the encoded"
" :class:`bytes`."
msgstr "用 Base16 编码 :term:`bytes-like object` *s* 并返回编码过的 :class:`bytes`"
#: ../../library/base64.rst:147
msgid ""
"Decode the Base16 encoded :term:`bytes-like object` or ASCII string *s* and "
"return the decoded :class:`bytes`."
msgstr ""
"解码 Base16 编码过的 :term:`bytes-like object` 或 ASCII 字符串 *s* 并返回解码过的 "
":class:`bytes`。"
#: ../../library/base64.rst:161
msgid ""
"Encode the :term:`bytes-like object` *b* using Ascii85 and return the "
"encoded :class:`bytes`."
msgstr "用 Ascii85 编码 :term:`bytes-like object` *s* 并返回编码过的 :class:`bytes`"
#: ../../library/base64.rst:164
msgid ""
"*foldspaces* is an optional flag that uses the special short sequence 'y' "
"instead of 4 consecutive spaces (ASCII 0x20) as supported by 'btoa'. This "
"feature is not supported by the \"standard\" Ascii85 encoding."
msgstr ""
"*foldspaces* 是一个可选的标志,使用特殊的短序列 'y' 代替 'btoa' 提供的 4 个连续空格 (ASCII 0x20)。这个特性不被"
" \"标准\" Ascii85 编码支持。"
#: ../../library/base64.rst:168
msgid ""
"*wrapcol* controls whether the output should have newline (``b'\\n'``) "
"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:172
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:175
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:183
msgid ""
"Decode the Ascii85 encoded :term:`bytes-like object` or ASCII string *b* and"
" return the decoded :class:`bytes`."
msgstr ""
"解码 Ascii85 编码过的 :term:`bytes-like object` 或 ASCII 字符串 *s* 并返回解码过的 "
":class:`bytes`。"
#: ../../library/base64.rst:186
msgid ""
"*foldspaces* is a flag that specifies whether the 'y' short sequence should "
"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:190
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:193
msgid ""
"*ignorechars* should be a :term:`bytes-like object` or ASCII string "
"containing characters to ignore from the input. This should only contain "
"whitespace characters, and by default contains all whitespace characters in "
"ASCII."
msgstr ""
"*ignorechars* 应当是一个 :term:`bytes-like object` 或 ASCII 字符串,其中包含要从输入中忽略的字符。 "
"这应当只包含空白字符,并且默认包含 ASCII 中所有的空白字符。"
#: ../../library/base64.rst:203
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 风格的二进制 diff 数据所用格式)编码 :term:`bytes-like object` *b* 并返回编码后的 "
":class:`bytes`。"
#: ../../library/base64.rst:206
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* 为真值,输入将以 ``b'\\0'`` 填充以使其编码前长度为 4 字节的倍数。"
#: ../../library/base64.rst:214
msgid ""
"Decode the base85-encoded :term:`bytes-like object` or ASCII string *b* and "
"return the decoded :class:`bytes`. Padding is implicitly removed, if "
"necessary."
msgstr ""
"解码 base85 编码过的 :term:`bytes-like object` 或 ASCII 字符串 *b* 并返回解码过的 "
":class:`bytes`。 如有必要,填充会被隐式地移除。"
#: ../../library/base64.rst:221
msgid "The legacy interface:"
msgstr "旧式接口:"
#: ../../library/base64.rst:225
msgid ""
"Decode the contents of the binary *input* file and write the resulting "
"binary data to the *output* file. *input* and *output* must be :term:`file "
"objects <file object>`. *input* will be read until ``input.readline()`` "
"returns an empty bytes object."
msgstr ""
"解码二进制 *input* 文件的内容并将结果二进制数据写入 *output* 文件。 *input* 和 *output* 必须为 "
":term:`文件对象 <file object>`. *input* 将被读取直至 ``input.readline()`` 返回空字节串对象。"
#: ../../library/base64.rst:233
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 ""
"解码 :term:`bytes-like object` *s*,该对象必须包含一行或多行 base64 编码的数据,并返回已解码的 "
":class:`bytes`。"
#: ../../library/base64.rst:241
msgid ""
"Encode the contents of the binary *input* file and write the resulting "
"base64 encoded data to the *output* file. *input* and *output* must be "
":term:`file objects <file object>`. *input* will be read until "
"``input.read()`` returns an empty bytes object. :func:`encode` inserts a "
"newline character (``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 object>`。 *input* 将被读取直到 ``input.read()`` 返回空字节串对象。 "
":func:`encode` 会在每输出 76 个字节之后插入一个换行符 (``b'\\n'``),并会确保输出总是以换行符来结束,如 "
":rfc:`2045` (MIME) 所规定的那样。"
#: ../../library/base64.rst:251
msgid ""
"Encode the :term:`bytes-like object` *s*, which can contain arbitrary binary"
" data, and return :class:`bytes` containing the base64-encoded data, with "
"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 object` *s*,其中可以包含任意二进制数据,并返回包含经 base64 编码数据的 "
":class:`bytes`,每输出 76 个字节之后将带一个换行符 (``b'\\n'``),并会确保在末尾也有一个换行符,如 :rfc:`2045`"
" (MIME) 所规定的那样。"
#: ../../library/base64.rst:259
msgid "An example usage of the module:"
msgstr "此模块的一个使用示例:"
#: ../../library/base64.rst:273
msgid "Module :mod:`binascii`"
msgstr "模块 :mod:`binascii`"
#: ../../library/base64.rst:273
msgid ""
"Support module containing ASCII-to-binary and binary-to-ASCII conversions."
msgstr "支持模块,包含ASCII到二进制和二进制到ASCII转换。"
#: ../../library/base64.rst:276
msgid ""
":rfc:`1521` - MIME (Multipurpose Internet Mail Extensions) Part One: "
"Mechanisms for Specifying and Describing the Format of Internet Message "
"Bodies"
msgstr ""
":rfc:`1521` - MIME (Multipurpose Internet Mail Extensions) "
"第一部分:规定并描述因特网消息体的格式的机制。"
#: ../../library/base64.rst:276
msgid ""
"Section 5.2, \"Base64 Content-Transfer-Encoding,\" provides the definition "
"of the base64 encoding."
msgstr "第 5.2 节,“Base64 内容转换编码格式” 提供了 base64 编码格式的定义。"