-
-
Notifications
You must be signed in to change notification settings - Fork 76
/
plistlib.po
329 lines (274 loc) · 13.2 KB
/
plistlib.po
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
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2021, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Freesand Leo <[email protected]>, 2020
# 叶浚安 <[email protected]>, 2020
# nick <[email protected]>, 2020
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.8\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-01 16:06+0000\n"
"PO-Revision-Date: 2020-05-30 12:07+0000\n"
"Last-Translator: nick <[email protected]>, 2020\n"
"Language-Team: Chinese (China) (https://www.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/plistlib.rst:2
msgid ":mod:`plistlib` --- Generate and parse Mac OS X ``.plist`` files"
msgstr ":mod:`plistlib` --- 生成与解析 Mac OS X ``.plist`` 文件"
#: ../../library/plistlib.rst:11
msgid "**Source code:** :source:`Lib/plistlib.py`"
msgstr "**源代码:** :source:`Lib/plistlib.py`"
#: ../../library/plistlib.rst:19
msgid ""
"This module provides an interface for reading and writing the \"property "
"list\" files used mainly by Mac OS X and supports both binary and XML plist "
"files."
msgstr "此模块提供了读写主要用于 Mac OS X 的 \"property list\" 文件的接口,并同时支持二进制和 XML plist 文件。"
#: ../../library/plistlib.rst:22
msgid ""
"The property list (``.plist``) file format is a simple serialization "
"supporting basic object types, like dictionaries, lists, numbers and "
"strings. Usually the top level object is a dictionary."
msgstr ""
"property list (``.plist``) 文件格式是一种简单的序列化格式,它支持一些基本对象类型,例如字典、列表、数字和字符串等。 "
"通常使用一个字典作为最高层级对象。"
#: ../../library/plistlib.rst:26
msgid ""
"To write out and to parse a plist file, use the :func:`dump` and "
":func:`load` functions."
msgstr "要写入和解析 plist 文件,请使用 :func:`dump` 和 :func:`load` 函数。"
#: ../../library/plistlib.rst:29
msgid ""
"To work with plist data in bytes objects, use :func:`dumps` and "
":func:`loads`."
msgstr "要以字节串对象形式操作 plist 数据,请使用 :func:`dumps` 和 :func:`loads`。"
#: ../../library/plistlib.rst:32
msgid ""
"Values can be strings, integers, floats, booleans, tuples, lists, "
"dictionaries (but only with string keys), :class:`Data`, :class:`bytes`, "
":class:`bytesarray` or :class:`datetime.datetime` objects."
msgstr ""
"值可以为字符串、整数、浮点数、布尔值、元组、列表、字典(但只允许用字符串作为键)、:class:`Data`、:class:`bytes`、:class:`bytesarray`"
" 或 :class:`datetime.datetime` 对象。"
#: ../../library/plistlib.rst:36
msgid "New API, old API deprecated. Support for binary format plists added."
msgstr "新版 API,旧版 API 已被弃用。 添加了对二进制 plist 格式的支持。"
#: ../../library/plistlib.rst:39
msgid ""
"Support added for reading and writing :class:`UID` tokens in binary plists "
"as used by NSKeyedArchiver and NSKeyedUnarchiver."
msgstr ""
"添加了在二进制 plist 中读写 :class:`UID` 令牌的支持,例如用于 NSKeyedArchiver 和 "
"NSKeyedUnarchiver。"
#: ../../library/plistlib.rst:45
msgid ""
"`PList manual page "
"<https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/PropertyLists/>`_"
msgstr ""
"`PList 指南页面 "
"<https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/PropertyLists/>`_"
#: ../../library/plistlib.rst:46
msgid "Apple's documentation of the file format."
msgstr "针对该文件格式的 Apple 文档。"
#: ../../library/plistlib.rst:49
msgid "This module defines the following functions:"
msgstr "这个模块定义了以下函数:"
#: ../../library/plistlib.rst:53
msgid ""
"Read a plist file. *fp* should be a readable and binary file object. Return "
"the unpacked root object (which usually is a dictionary)."
msgstr "读取 plist 文件。 *fp* 应当可读并且为二进制文件对象。 返回已解包的根对象(通常是一个字典)。"
#: ../../library/plistlib.rst:57
msgid ""
"The *fmt* is the format of the file and the following values are valid:"
msgstr "*fmt* 为文件的格式,有效的值如下:"
#: ../../library/plistlib.rst:59
msgid ":data:`None`: Autodetect the file format"
msgstr ":data:`None`: 自动检测文件格式"
#: ../../library/plistlib.rst:61
msgid ":data:`FMT_XML`: XML file format"
msgstr ":data:`FMT_XML`: XML 文件格式"
#: ../../library/plistlib.rst:63
msgid ":data:`FMT_BINARY`: Binary plist format"
msgstr ":data:`FMT_BINARY`: 二进制 plist 格式"
#: ../../library/plistlib.rst:65
msgid ""
"If *use_builtin_types* is true (the default) binary data will be returned as"
" instances of :class:`bytes`, otherwise it is returned as instances of "
":class:`Data`."
msgstr ""
"如果 *use_builtin_types* 为真值(默认)则将以 :class:`bytes` 实例的形式返回二进制数据,否则将以 "
":class:`Data` 实例的形式返回。"
#: ../../library/plistlib.rst:69
msgid ""
"The *dict_type* is the type used for dictionaries that are read from the "
"plist file."
msgstr "*dict_type* 为字典用来从 plist 文件读取的类型。"
#: ../../library/plistlib.rst:72
msgid ""
"XML data for the :data:`FMT_XML` format is parsed using the Expat parser "
"from :mod:`xml.parsers.expat` -- see its documentation for possible "
"exceptions on ill-formed XML. Unknown elements will simply be ignored by "
"the plist parser."
msgstr ""
":data:`FMT_XML` 格式的 XML 数据 会使用来自 :mod:`xml.parsers.expat` 的 Expat 解析器 -- "
"请参阅其文档了解错误格式 XML 可能引发的异常。 未知元素将被 plist 解析器直接略过。"
#: ../../library/plistlib.rst:77
msgid ""
"The parser for the binary format raises :exc:`InvalidFileException` when the"
" file cannot be parsed."
msgstr "当文件无法被解析时二进制格式的解析器将引发 :exc:`InvalidFileException`。"
#: ../../library/plistlib.rst:85
msgid ""
"Load a plist from a bytes object. See :func:`load` for an explanation of the"
" keyword arguments."
msgstr "从一个 bytes 对象加载 plist。 参阅 :func:`load` 获取相应关键字参数的说明。"
#: ../../library/plistlib.rst:93
msgid ""
"Write *value* to a plist file. *Fp* should be a writable, binary file "
"object."
msgstr "将 *value* 写入 plist 文件。 *Fp* 应当可写并且为二进制文件对象。"
#: ../../library/plistlib.rst:96
msgid ""
"The *fmt* argument specifies the format of the plist file and can be one of "
"the following values:"
msgstr "*fmt* 参数指定 plist 文件的格式,可以是以下值之一:"
#: ../../library/plistlib.rst:99
msgid ":data:`FMT_XML`: XML formatted plist file"
msgstr ":data:`FMT_XML`: XML 格式的 plist 文件"
#: ../../library/plistlib.rst:101
msgid ":data:`FMT_BINARY`: Binary formatted plist file"
msgstr ":data:`FMT_BINARY`: 二进制格式的 plist 文件"
#: ../../library/plistlib.rst:103
msgid ""
"When *sort_keys* is true (the default) the keys for dictionaries will be "
"written to the plist in sorted order, otherwise they will be written in the "
"iteration order of the dictionary."
msgstr "当 *sort_keys* 为真值(默认)时字典的键将经过排序再写入 plist,否则将按字典的迭代顺序写入。"
#: ../../library/plistlib.rst:107
msgid ""
"When *skipkeys* is false (the default) the function raises :exc:`TypeError` "
"when a key of a dictionary is not a string, otherwise such keys are skipped."
msgstr "当 *skipkeys* 为假值(默认)时该函数将在字典的键不为字符串时引发 :exc:`TypeError`,否则将跳过这样的键。"
#: ../../library/plistlib.rst:110
msgid ""
"A :exc:`TypeError` will be raised if the object is of an unsupported type or"
" a container that contains objects of unsupported types."
msgstr "如果对象是不受支持的类型或者是包含不受支持类型的对象的容器则将引发 :exc:`TypeError`。"
#: ../../library/plistlib.rst:113
msgid ""
"An :exc:`OverflowError` will be raised for integer values that cannot be "
"represented in (binary) plist files."
msgstr "对于无法在(二进制)plist 文件中表示的整数值,将会引发 :exc:`OverflowError`。"
#: ../../library/plistlib.rst:121
msgid ""
"Return *value* as a plist-formatted bytes object. See the documentation for "
":func:`dump` for an explanation of the keyword arguments of this function."
msgstr "将 *value* 以 plist 格式字节串对象的形式返回。 参阅 :func:`dump` 的文档获取此函数的关键字参数的说明。"
#: ../../library/plistlib.rst:127
msgid "The following functions are deprecated:"
msgstr "以下函数已被弃用:"
#: ../../library/plistlib.rst:131
msgid ""
"Read a plist file. *pathOrFile* may be either a file name or a (readable and"
" binary) file object. Returns the unpacked root object (which usually is a "
"dictionary)."
msgstr "读取 plist 文件。 *pathOrFile* 可以是文件名或(可读并且为二进制的)文件对象。 返回已解包的根对象(通常是一个字典)。"
#: ../../library/plistlib.rst:135
msgid ""
"This function calls :func:`load` to do the actual work, see the "
"documentation of :func:`that function <load>` for an explanation of the "
"keyword arguments."
msgstr "此函数会调用 :func:`load` 来完成实际操作,请参阅 :func:`该函数 <load>` 的文档获取相应关键字参数的说明。"
#: ../../library/plistlib.rst:138
msgid "Use :func:`load` instead."
msgstr "使用 :func:`load` 来代替。"
#: ../../library/plistlib.rst:140 ../../library/plistlib.rst:161
msgid ""
"Dict values in the result are now normal dicts. You no longer can use "
"attribute access to access items of these dictionaries."
msgstr "结果中的字典值现在是普通字典。 你不能再使用属性引用形式来访问这些字典中的项。"
#: ../../library/plistlib.rst:147
msgid ""
"Write *rootObject* to an XML plist file. *pathOrFile* may be either a file "
"name or a (writable and binary) file object"
msgstr "将 *rootObject* 写入 XML plist 文件。 *pathOrFile* 可以是文件名或(可写并且为二进制的)文件对象。"
#: ../../library/plistlib.rst:150
msgid "Use :func:`dump` instead."
msgstr "使用 :func:`dump` 来代替。"
#: ../../library/plistlib.rst:155
msgid "Read a plist data from a bytes object. Return the root object."
msgstr "从字节串对象读取 plist 数据。 返回根对象。"
#: ../../library/plistlib.rst:157
msgid "See :func:`load` for a description of the keyword arguments."
msgstr "参阅 :func:`load` 获取相应关键字参数的说明。"
#: ../../library/plistlib.rst:159
msgid "Use :func:`loads` instead."
msgstr "使用 :func:`loads` 来代替。"
#: ../../library/plistlib.rst:168
msgid "Return *rootObject* as an XML plist-formatted bytes object."
msgstr "将 *rootObject* 作为 XML plist 格式的字节串对象返回。"
#: ../../library/plistlib.rst:170
msgid "Use :func:`dumps` instead."
msgstr "使用 :func:`dumps` 来代替。"
#: ../../library/plistlib.rst:173
msgid "The following classes are available:"
msgstr "可以使用以下的类:"
#: ../../library/plistlib.rst:177
msgid ""
"Return a \"data\" wrapper object around the bytes object *data*. This is "
"used in functions converting from/to plists to represent the ``<data>`` type"
" available in plists."
msgstr ""
"返回一个包含字节串对象 *data* 的 \"data\" 包装器对象。 该类将在对 plist 进行双向转换的函数中被用来代表 plist 中可用的 "
"``<data>`` 类型。"
#: ../../library/plistlib.rst:181
msgid ""
"It has one attribute, :attr:`data`, that can be used to retrieve the Python "
"bytes object stored in it."
msgstr "它具有一个属性 :attr:`data`,可被用来提取其中所保存的 Python 字节串对象。"
#: ../../library/plistlib.rst:184
msgid "Use a :class:`bytes` object instead."
msgstr "使用 :class:`bytes` 对象来代替。"
#: ../../library/plistlib.rst:188
msgid ""
"Wraps an :class:`int`. This is used when reading or writing NSKeyedArchiver"
" encoded data, which contains UID (see PList manual)."
msgstr ""
"包装一个 :class:`int`。 该类将在读取或写入 NSKeyedArchiver 编码的数据时被使用,其中包含 UID(参见 PList "
"指南)。"
#: ../../library/plistlib.rst:191
msgid ""
"It has one attribute, :attr:`data`, which can be used to retrieve the int "
"value of the UID. :attr:`data` must be in the range `0 <= data < 2**64`."
msgstr ""
"它具有一个属性 :attr:`data`,可被用来提取 UID 的 int 值。 :attr:`data` 的取值范围必须为 `0 <= data < "
"2**64`。"
#: ../../library/plistlib.rst:197
msgid "The following constants are available:"
msgstr "可以使用以下的常量:"
#: ../../library/plistlib.rst:201
msgid "The XML format for plist files."
msgstr "用于 plist 文件的 XML 格式。"
#: ../../library/plistlib.rst:208
msgid "The binary format for plist files"
msgstr "用于 plist 文件的二进制格式。"
#: ../../library/plistlib.rst:214
msgid "Examples"
msgstr "例子"
#: ../../library/plistlib.rst:216
msgid "Generating a plist::"
msgstr "生成一个 plist::"
#: ../../library/plistlib.rst:236
msgid "Parsing a plist::"
msgstr "解析一个 plist::"