Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fb2f81e

Browse files
committed
[po] auto sync bot
1 parent 28bc593 commit fb2f81e

1 file changed

Lines changed: 20 additions & 4 deletions

File tree

library/datetime.po

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2213,21 +2213,26 @@ msgid ""
22132213
"implementation of :meth:`tzinfo.fromutc` to work correctly with "
22142214
":meth:`astimezone` regardless."
22152215
msgstr ""
2216+
"必须为具有同样的 :class:`tzinfo` 子类实例 ``dt.tzinfo == tz`` 的每个 :class:`.datetime` 对象 "
2217+
"*dt* 返回同样的结果,此表达式会产生时区的“标准时差”,它不应取决于具体日期或时间,只取决于地理位置。 "
2218+
":meth:`datetime.astimezone` 的实现依赖此方法,但无法检测违反规则的情况;确保符合规则是程序员的责任。 如果一个 "
2219+
":class:`tzinfo` 子类不能保证这一点,也许应该重载 :meth:`tzinfo.fromutc` 的默认实现以便在任何情况下与 "
2220+
":meth:`astimezone` 配合正常。"
22162221

22172222
#: ../../library/datetime.rst:1760
22182223
msgid ""
22192224
"Most implementations of :meth:`dst` will probably look like one of these "
22202225
"two::"
2221-
msgstr ""
2226+
msgstr "大多数 :meth:`dst` 的实现可能会如以下两者之一::"
22222227

22232228
#: ../../library/datetime.rst:1766
22242229
msgid "or ::"
2225-
msgstr ""
2230+
msgstr "或者 ::"
22262231

22272232
#: ../../library/datetime.rst:1778
22282233
msgid ""
22292234
"The default implementation of :meth:`dst` raises :exc:`NotImplementedError`."
2230-
msgstr ""
2235+
msgstr "默认的 :meth:`dst` 实现会引发 :exc:`NotImplementedError`。"
22312236

22322237
#: ../../library/datetime.rst:1786
22332238
msgid ""
@@ -2241,12 +2246,17 @@ msgid ""
22412246
"return different names depending on the specific value of *dt* passed, "
22422247
"especially if the :class:`tzinfo` class is accounting for daylight time."
22432248
msgstr ""
2249+
"将对应于 :class:`.datetime` 对象 *dt* 的时区名称作为字符串返回。 :mod:`datetime` "
2250+
"模块没有定义任何字符串名称相关内容,也不要求名称有任何特定含义。 例如,\"GMT\", \"UTC\", \"-500\", \"-5:00\", "
2251+
"\"EDT\", \"US/Eastern\", \"America/New York\" 都是有效的返回值。 如果字符串名称未知则返回 "
2252+
"``None``。 请注意这是一个方法而不是一个固定的字符串,这主要是因为某些 :class:`tzinfo` 子类可能需要根据所传入的特 *dt* "
2253+
"值返回不同的名称,特别是当 :class:`tzinfo` 类要负责处理夏令时的时候。"
22442254

22452255
#: ../../library/datetime.rst:1796
22462256
msgid ""
22472257
"The default implementation of :meth:`tzname` raises "
22482258
":exc:`NotImplementedError`."
2249-
msgstr ""
2259+
msgstr "默认的 :meth:`tzname` 实现会引发 :exc:`NotImplementedError`。"
22502260

22512261
#: ../../library/datetime.rst:1799
22522262
msgid ""
@@ -2257,6 +2267,9 @@ msgid ""
22572267
"prepared to accept a *dt* argument of ``None``, or of class "
22582268
":class:`.datetime`."
22592269
msgstr ""
2270+
"这些方法会被 :class:`.datetime` 或 :class:`.time` 对象调用,用来对应它们的同名方法。 "
2271+
":class:`.datetime` 对象会将自身作为传入参数,而 :class:`.time` 对象会将 ``None`` 作为传入参数。 这样 "
2272+
":class:`tzinfo` 子类的方法应当准备好接受 *dt* 参数值为 ``None`` 或是 :class:`.datetime` 类的实例。"
22602273

22612274
#: ../../library/datetime.rst:1805
22622275
msgid ""
@@ -2267,6 +2280,9 @@ msgid ""
22672280
"standard UTC offset, as there is no other convention for discovering the "
22682281
"standard offset."
22692282
msgstr ""
2283+
"当传入 ``None`` 时,应当由类的设计者来决定最佳回应方式。 例如,返回 ``None`` 适用于希望该类提示时间对象不参与 "
2284+
":class:`tzinfo` 协议处理。 让 ``utcoffset(None)`` 返回标准 UTC "
2285+
"时差也许会更有用处,如果没有其他用于发现标准时差的约定。"
22702286

22712287
#: ../../library/datetime.rst:1811
22722288
msgid ""

0 commit comments

Comments
 (0)