@@ -207,16 +207,19 @@ msgid ""
207207"other implementations are free to silently ignore the erroneous component or"
208208" raise an exception."
209209msgstr ""
210+ "这是一个以 :data:`os.pathsep` 分隔的字符串,其中包含要使用的时区搜索路径。 它必须仅由绝对路径而非相对路径组成。 在 "
211+ "``PYTHONTZPATH`` 中指定的相对路径部分将不会被使用,但在其他情况下当指定相对路径时的行为该实现是有定义的;CPython 将引发 "
212+ ":exc:`InvalidTZPathWarning`,而其他实现可自由地忽略错误部分或是引发异常。"
210213
211214#: ../../library/zoneinfo.rst:153
212215msgid ""
213216"To set the system to ignore the system data and use the tzdata package "
214217"instead, set ``PYTHONTZPATH=\"\" ``."
215- msgstr ""
218+ msgstr "要设置让系统忽略系统数据并改用 tzdata 包,请设置 ``PYTHONTZPATH= \"\" ``。 "
216219
217220#: ../../library/zoneinfo.rst:159
218221msgid "Runtime configuration"
219- msgstr ""
222+ msgstr "运行时配置 "
220223
221224#: ../../library/zoneinfo.rst:161
222225msgid ""
@@ -226,10 +229,12 @@ msgid ""
226229" a specific time zone path (or require disabling access to the system time "
227230"zones)."
228231msgstr ""
232+ "TZ 搜索路径也可在运行时使用 :func:`reset_tzpath` 函数来配置。 "
233+ "通常并不建议如此操作,不过在需要使用指定时区路径(或者需要禁止访问系统时区)的测试函数中使用它则是合理的。"
229234
230235#: ../../library/zoneinfo.rst:168
231236msgid "The ``ZoneInfo`` class"
232- msgstr ""
237+ msgstr "``ZoneInfo`` 类 "
233238
234239#: ../../library/zoneinfo.rst:172
235240msgid ""
@@ -239,41 +244,50 @@ msgid ""
239244"cache invalidation via :meth:`ZoneInfo.clear_cache`, for all values of "
240245"``key``, the following assertion will always be true:"
241246msgstr ""
247+ "一个具体的 :class:`datetime.tzinfo` 子类,它代表一个由字符串 ``key`` 所指定的 IANA 时区。 "
248+ "对主构造器的调用将总是返回可进行标识比较的对象;但是另一种方式,对所有的 ``key`` 值通过 "
249+ ":meth:`ZoneInfo.clear_cache` 禁止缓存失效,对以下断言将总是为真值:"
242250
243251#: ../../library/zoneinfo.rst:184
244252msgid ""
245253"``key`` must be in the form of a relative, normalized POSIX path, with no "
246254"up-level references. The constructor will raise :exc:`ValueError` if a non-"
247255"conforming key is passed."
248256msgstr ""
257+ "``key`` 必须采用相对的标准化 POSIX 路径的形式,其中没有对上一层级的引用。 如果传入了不合要求的键则构造器将引发 "
258+ ":exc:`ValueError`。"
249259
250260#: ../../library/zoneinfo.rst:188
251261msgid ""
252262"If no file matching ``key`` is found, the constructor will raise "
253263":exc:`ZoneInfoNotFoundError`."
254- msgstr ""
264+ msgstr "如果没有找到匹配 ``key`` 的文件,构造器将引发 :exc:`ZoneInfoNotFoundError`。 "
255265
256266#: ../../library/zoneinfo.rst:192
257267msgid "The ``ZoneInfo`` class has two alternate constructors:"
258- msgstr ""
268+ msgstr "``ZoneInfo`` 类具有两个替代构造器: "
259269
260270#: ../../library/zoneinfo.rst:196
261271msgid ""
262272"Constructs a ``ZoneInfo`` object from a file-like object returning bytes "
263273"(e.g. a file opened in binary mode or an :class:`io.BytesIO` object). Unlike"
264274" the primary constructor, this always constructs a new object."
265275msgstr ""
276+ "基于一个返回字节串的文件类对象(例如一个以二进制模式打开的文件或是一个 :class:`io.BytesIO` 对象)构造 ``ZoneInfo`` "
277+ "对象。 不同于主构造器,此构造器总是会构造一个新对象。"
266278
267279#: ../../library/zoneinfo.rst:200
268280msgid ""
269281"The ``key`` parameter sets the name of the zone for the purposes of "
270282":py:meth:`~object.__str__` and :py:meth:`~object.__repr__`."
271283msgstr ""
284+ "``key`` 形参设置时区名称以供 :py:meth:`~object.__str__` 和 :py:meth:`~object.__repr__` "
285+ "使用。"
272286
273287#: ../../library/zoneinfo.rst:203
274288msgid ""
275289"Objects created via this constructor cannot be pickled (see `pickling`_)."
276- msgstr ""
290+ msgstr "由此构造器创建的对象不可被封存 (参见 `pickling`_)。 "
277291
278292#: ../../library/zoneinfo.rst:207
279293msgid ""
@@ -283,22 +297,24 @@ msgid ""
283297" it can also be used to create a system with a different cache invalidation "
284298"strategy."
285299msgstr ""
300+ "一个绕过构造器缓存的替代构造器。 它与主构造器很相似,但每次调用都会返回一个新对象。 "
301+ "此构造器在进行测试或演示时最为适用,但它也可以被用来创建具有不同缓存失效策略的系统。"
286302
287303#: ../../library/zoneinfo.rst:213
288304msgid ""
289305"Objects created via this constructor will also bypass the cache of a "
290306"deserializing process when unpickled."
291- msgstr ""
307+ msgstr "由此构造器创建的对象在被解封时也会绕过反序列化进程的缓存。 "
292308
293309#: ../../library/zoneinfo.rst:220
294310msgid ""
295311"Using this constructor may change the semantics of your datetimes in "
296312"surprising ways, only use it if you know that you need to."
297- msgstr ""
313+ msgstr "使用此构造器可以会以令人惊讶的方式改变日期时间对象的语义,只有在你确定你的需求时才使用它。 "
298314
299315#: ../../library/zoneinfo.rst:223
300316msgid "The following class methods are also available:"
301- msgstr ""
317+ msgstr "也可以使用以下的类方法: "
302318
303319#: ../../library/zoneinfo.rst:227
304320msgid ""
0 commit comments