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

Skip to content

Commit e0534c5

Browse files
[po] auto sync
1 parent da92cfc commit e0534c5

7 files changed

Lines changed: 93 additions & 22 deletions

File tree

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "80.89%", "updated_at": "2025-09-22T18:46:15Z"}
1+
{"translation": "80.96%", "updated_at": "2025-09-22T20:39:07Z"}

library/datetime.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3509,7 +3509,7 @@ msgstr ""
35093509
msgid ""
35103510
"For a naive object, the ``%z`` and ``%Z`` format codes are replaced by empty"
35113511
" strings."
3512-
msgstr ""
3512+
msgstr "对于简单型对象,``%z`` and ``%Z`` 格式代码会被替换为空字符串。"
35133513

35143514
#: ../../library/datetime.rst:2552
35153515
msgid "For an aware object:"

library/os.po

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3501,6 +3501,9 @@ msgid ""
35013501
" ``name`` attribute has the same meaning, as do the ``is_dir()``, "
35023502
"``is_file()``, ``is_symlink()`` and ``stat()`` methods."
35033503
msgstr ""
3504+
"注意,``os.DirEntry`` 和 :class:`pathlib.Path` 的几个属性和方法之间存在很好的对应关系。具体来说是 "
3505+
"``name`` 属性,以及 ``is_dir()``、``is_file()``、``is_symlink()`` 和 ``stat()`` "
3506+
"方法,在两个类中具有相同的含义。"
35043507

35053508
#: ../../library/os.rst:2729
35063509
msgid ""
@@ -3653,15 +3656,15 @@ msgstr "最近的修改时间,以秒为单位。"
36533656

36543657
#: ../../library/os.rst:2848 ../../library/os.rst:2868
36553658
msgid "Platform dependent:"
3656-
msgstr ""
3659+
msgstr "取决于平台:"
36573660

36583661
#: ../../library/os.rst:2850 ../../library/os.rst:2870
36593662
msgid "the time of most recent metadata change on Unix,"
3660-
msgstr ""
3663+
msgstr "在 Unix 上表示最近的元数据更改时间,"
36613664

36623665
#: ../../library/os.rst:2851
36633666
msgid "the time of creation on Windows, expressed in seconds."
3664-
msgstr ""
3667+
msgstr "在 Windows 上表示创建时间,以秒为单位。"
36653668

36663669
#: ../../library/os.rst:2855
36673670
msgid "Time of most recent access expressed in nanoseconds as an integer."
@@ -3676,7 +3679,7 @@ msgstr "最近的修改时间,以纳秒表示,为整数。"
36763679
#: ../../library/os.rst:2871
36773680
msgid ""
36783681
"the time of creation on Windows, expressed in nanoseconds as an integer."
3679-
msgstr ""
3682+
msgstr "在 Windows 上表示创建时间,以纳秒表示,为整数。"
36803683

36813684
#: ../../library/os.rst:2878
36823685
msgid ""
@@ -3686,6 +3689,9 @@ msgid ""
36863689
" :attr:`st_mtime` has 2-second resolution, and :attr:`st_atime` has only "
36873690
"1-day resolution. See your operating system documentation for details."
36883691
msgstr ""
3692+
":attr:`st_atime`、:attr:`st_mtime` 和 :attr:`st_ctime` "
3693+
"属性的确切含义和分辨率取决于操作系统和文件系统。例如,在使用 FAT 或 FAT32 文件系统的 Windows 上,:attr:`st_mtime` "
3694+
"有 2 秒的分辨率,而 :attr:`st_atime` 仅有 1 天的分辨率。详细信息请参阅操作系统文档。"
36893695

36903696
#: ../../library/os.rst:2885
36913697
msgid ""
@@ -3698,6 +3704,10 @@ msgid ""
36983704
"always use :attr:`st_atime_ns`, :attr:`st_mtime_ns`, and "
36993705
":attr:`st_ctime_ns`."
37003706
msgstr ""
3707+
"类似地,尽管 :attr:`st_atime_ns`、:attr:`st_mtime_ns` 和 :attr:`st_ctime_ns` "
3708+
"始终以纳秒表示,但许多系统并不提供纳秒精度。在确实提供纳秒精度的系统上,用于存储 :attr:`st_atime`、:attr:`st_mtime` 和"
3709+
" :attr:`st_ctime` 的浮点对象无法保留所有精度,因此不够精确。如果需要确切的时间戳,则应始终使用 "
3710+
":attr:`st_atime_ns`、:attr:`st_mtime_ns` 和 :attr:`st_ctime_ns`。"
37013711

37023712
#: ../../library/os.rst:2894
37033713
msgid ""

reference/executionmodel.po

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ msgid ""
239239
":exc:`SyntaxError` is raised at compile time if the given name does not "
240240
"exist in any enclosing function scope."
241241
msgstr ""
242+
":keyword:`nonlocal` 语句会使得相应的名称指向之前在最近包含函数作用域中绑定的变量。 "
243+
"如果指定名称不存在于任何包含函数作用域中则将在编译时引发 :exc:`SyntaxError`。"
242244

243245
#: ../../reference/executionmodel.rst:156
244246
msgid ""
@@ -259,6 +261,10 @@ msgid ""
259261
"expressions since they are implemented using a function scope. This means "
260262
"that the following will fail::"
261263
msgstr ""
264+
"类定义代码块以及传给 :func:`exec` 和 :func:`eval` 的参数是名称解析上下文中的特殊情况。 "
265+
"类定义是可能使用并定义名称的可执行语句。 这些引用遵循正常的名称解析规则,例外之处在于未绑定的局部变量将会在全局命名空间中查找。 "
266+
"类定义的命名空间会成为该类的属性字典。 在类代码块中定义的名称的作用域会被限制在类代码块中;它不会扩展到方法的代码块中 -- "
267+
"这也包括推导式和生成器表达式,因为它们都是使用函数作用域实现的。 这意味着以下代码将会失败::"
262268

263269
#: ../../reference/executionmodel.rst:177
264270
msgid "Builtins and restricted execution"

reference/import.po

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,8 @@ msgid ""
530530
"Use of :meth:`~importlib.abc.MetaPathFinder.find_module` by the import "
531531
"system now raises :exc:`ImportWarning`."
532532
msgstr ""
533+
"导入系统使用 :meth:`~importlib.abc.MetaPathFinder.find_module` 现在将会引发 "
534+
":exc:`ImportWarning`。"
533535

534536
#: ../../reference/import.rst:338
535537
msgid "Loading"
@@ -853,13 +855,18 @@ msgid ""
853855
" string for top-level modules, or for submodules, to the parent package's "
854856
"name. See :pep:`366` for further details."
855857
msgstr ""
858+
"模块的 ``__package__`` 属性必须设定。 其取值必须为一个字符串,但可以与 ``__name__`` 取相同的值。 当模块是包时,其 "
859+
"``__package__`` 值应该设为其 ``__name__`` 值。 当模块不是包时,对于最高层级模块 ``__package__`` "
860+
"应该设为空字符串,对于子模块则应该设为其父包名。 更多详情可参阅 :pep:`366`。"
856861

857862
#: ../../reference/import.rst:565
858863
msgid ""
859864
"This attribute is used instead of ``__name__`` to calculate explicit "
860865
"relative imports for main modules, as defined in :pep:`366`. It is expected "
861866
"to have the same value as ``__spec__.parent``."
862867
msgstr ""
868+
"该属性取代 ``__name__`` 被用来为主模块计算显式相对导入,相关定义见 :pep:`366`。 预期它与 "
869+
"``__spec__.parent`` 具有相同的值。"
863870

864871
#: ../../reference/import.rst:569
865872
msgid ""
@@ -883,7 +890,7 @@ msgstr ""
883890
msgid ""
884891
"When ``__package__`` is not defined, ``__spec__.parent`` is used as a "
885892
"fallback."
886-
msgstr ""
893+
msgstr "当 ``__package__`` 未定义时, ``__spec__.parent`` 会被用作回退项。"
887894

888895
#: ../../reference/import.rst:586
889896
msgid ""
@@ -1049,6 +1056,8 @@ msgid ""
10491056
"been deprecated and the module spec is now used by the import machinery to "
10501057
"generate a module repr."
10511058
msgstr ""
1059+
":meth:`loader.module_repr() <importlib.abc.Loader.module_repr>` "
1060+
"已弃用,导入机制现在使用模块规格说明来生成模块 repr。"
10521061

10531062
#: ../../reference/import.rst:684
10541063
msgid ""
@@ -1057,6 +1066,8 @@ msgid ""
10571066
"method, if defined, before trying either approach described above. However,"
10581067
" the method is deprecated."
10591068
msgstr ""
1069+
"为了向后兼容 Python 3.3,如果加载器定义了 :meth:`~importlib.abc.Loader.module_repr` "
1070+
"方法,则会在尝试上述两种方式之前先调用该方法来生成模块 repr。 但请注意此方法已弃用。"
10601071

10611072
#: ../../reference/import.rst:691
10621073
msgid ""
@@ -1065,6 +1076,9 @@ msgid ""
10651076
"``__file__``. Use of :meth:`~importlib.abc.Loader.module_repr` is slated to "
10661077
"stop in Python 3.12."
10671078
msgstr ""
1079+
"对 :meth:`~importlib.abc.Loader.module_repr` 的调用现在会在尝试使用模块的 ``__spec__`` "
1080+
"属性之后但在回退至 ``__file__`` 之前发生。 :meth:`~importlib.abc.Loader.module_repr` "
1081+
"的使用预定会在 Python 3.12 中停止。"
10681082

10691083
#: ../../reference/import.rst:699
10701084
msgid "Cached bytecode invalidation"
@@ -1277,6 +1291,13 @@ msgid ""
12771291
"forcing the path based finder to perform the path entry search again "
12781292
"[#fnpic]_."
12791293
msgstr ""
1294+
"基于路径的查找器会迭代搜索路径中的每个条目,并且每次都查找与路径条目对应的 :term:`path entry finder` "
1295+
"(:class:`~importlib.abc.PathEntryFinder`)。 因为这种操作可能很耗费资源 (例如搜索会有 ``stat()`` "
1296+
"调用的开销),基于路径的查找器会维持一个缓存来将路径条目映射到路径条目查找器。 这个缓存存放在 "
1297+
":data:`sys.path_importer_cache` (尽管如此命名,但这个缓存实际存放的是查找器对象而非仅限于 "
1298+
":term:`importer` 对象)。 通过这种方式,对特定 :term:`path entry` 位置的 :term:`path entry "
1299+
"finder` 的高耗费搜索中需要进行一次。 用户代码可以自由地从 :data:`sys.path_importer_cache` "
1300+
"移除缓存条目,以强制基于路径的查找器再次执行路径条目搜索 [#fnpic]_。"
12801301

12811302
#: ../../reference/import.rst:828
12821303
msgid ""
@@ -1371,6 +1392,8 @@ msgid ""
13711392
":term:`portion`, the path entry finder sets \"submodule_search_locations\" "
13721393
"to a list containing the portion."
13731394
msgstr ""
1395+
"为了向导入机制提示该规格说明代表一个命名空间 :term:`portion`,路径条目查找器会将 "
1396+
"\"submodule_search_locations\" 设为一个包含该部分的列表。"
13741397

13751398
#: ../../reference/import.rst:879
13761399
msgid ""
@@ -1379,6 +1402,10 @@ msgid ""
13791402
":meth:`~importlib.abc.PathEntryFinder.find_module`, both of which are now "
13801403
"deprecated, but will be used if ``find_spec()`` is not defined."
13811404
msgstr ""
1405+
":meth:`~importlib.abc.PathEntryFinder.find_spec` 替代了 "
1406+
":meth:`~importlib.abc.PathEntryFinder.find_loader` 和 "
1407+
":meth:`~importlib.abc.PathEntryFinder.find_module`,后两者现在都已弃用,但会在 "
1408+
"``find_spec()`` 未定义时被使用。"
13821409

13831410
#: ../../reference/import.rst:885
13841411
msgid ""
@@ -1397,6 +1424,8 @@ msgid ""
13971424
"returns a 2-tuple where the first item is the loader and the second item is "
13981425
"a namespace :term:`portion`."
13991426
msgstr ""
1427+
":meth:`~importlib.abc.PathEntryFinder.find_loader` 接受一个参数,即要导入模块的完整限定名称。 "
1428+
"``find_loader()`` 返回一个 2 元组,其中第一项是加载器而第二项是命名空间 :term:`portion`。"
14001429

14011430
#: ../../reference/import.rst:895
14021431
msgid ""
@@ -1428,6 +1457,8 @@ msgid ""
14281457
":meth:`~importlib.abc.PathEntryFinder.find_loader` by the import system will"
14291458
" raise :exc:`ImportWarning`."
14301459
msgstr ""
1460+
"导入系统调用 :meth:`~importlib.abc.PathEntryFinder.find_module` 和 "
1461+
":meth:`~importlib.abc.PathEntryFinder.find_loader` 将引发 :exc:`ImportWarning`。"
14311462

14321463
#: ../../reference/import.rst:915
14331464
msgid "Replacing the standard import system"
@@ -1612,6 +1643,8 @@ msgid ""
16121643
"Python 3.3. :pep:`420` also introduced the :meth:`find_loader` protocol as "
16131644
"an alternative to :meth:`find_module`."
16141645
msgstr ""
1646+
":pep:`420` 为 Python 3.3 引入了 :term:`命名空间包 <namespace package>`。 :pep:`420` "
1647+
"还引入了 :meth:`find_loader` 协议作为 :meth:`find_module` 的替代。"
16151648

16161649
#: ../../reference/import.rst:1037
16171650
msgid ""
@@ -1670,6 +1703,8 @@ msgid ""
16701703
"recommended that code be changed to use ``None`` instead. See "
16711704
":ref:`portingpythoncode` for more details."
16721705
msgstr ""
1706+
"在遗留代码中,有可能在 :data:`sys.path_importer_cache` 中找到 :class:`imp.NullImporter` "
1707+
"的实例。 建议将这些代码修改为使用 ``None`` 代替。 详情参见 :ref:`portingpythoncode`。"
16731708

16741709
#: ../../reference/import.rst:8
16751710
msgid "import machinery"

whatsnew/3.0.po

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,6 +1274,8 @@ msgid ""
12741274
"automatically be chosen. With arguments, the behavior of :func:`super` is "
12751275
"unchanged."
12761276
msgstr ""
1277+
":pep:`3135`: 新的 :func:`super`。 现在你可以不带参数地唤起 :func:`super` 这样(假定这发生在定义于 "
1278+
":keyword:`class` 语句内部的常规实例方法中)将会自动选择正确的类和实例。 附带参数时,:func:`super` 的行为保持不变。"
12771279

12781280
#: ../../whatsnew/3.0.rst:805
12791281
msgid ""
@@ -1288,7 +1290,7 @@ msgstr ""
12881290
msgid ""
12891291
"A new built-in function :func:`next` was added to call the "
12901292
":meth:`~iterator.__next__` method on an object."
1291-
msgstr ""
1293+
msgstr "新增内置函数 :func:`next` 用于在对象上调用 :meth:`~iterator.__next__` 方法。"
12921294

12931295
#: ../../whatsnew/3.0.rst:814
12941296
msgid ""
@@ -1300,6 +1302,10 @@ msgid ""
13001302
"a single argument and a value of the same type as ``x`` when called with two"
13011303
" arguments."
13021304
msgstr ""
1305+
":func:`round` 函数的舍入策略和返回类型已有改变。 对于两边差值相同的情况现在将会舍入到最接近的偶数结果而不是远离零值的结果。 "
1306+
"(例如,``round(2.5)`` 现在将返回 ``2`` 而不是 ``3``。) 现在 ``round(x[, n])`` 将委托给 "
1307+
"``x.__round__([n])`` 而不是始终返回一个浮点数。 它通常会在附带一个参数调用时返回整数而在附带两个参数调用时返回与 ``x`` "
1308+
"相同类型的值。"
13031309

13041310
#: ../../whatsnew/3.0.rst:823
13051311
msgid "Moved :func:`intern` to :func:`sys.intern`."
@@ -1359,29 +1365,29 @@ msgstr "构建和 C API 的改变"
13591365
msgid ""
13601366
"Due to time constraints, here is a *very* incomplete list of changes to the "
13611367
"C API."
1362-
msgstr ""
1368+
msgstr "由于时间约束,下面 C API 的变化列表 *非常* 不完整。"
13631369

13641370
#: ../../whatsnew/3.0.rst:859
13651371
msgid ""
13661372
"Support for several platforms was dropped, including but not limited to Mac "
13671373
"OS 9, BeOS, RISCOS, Irix, and Tru64."
1368-
msgstr ""
1374+
msgstr "已放弃对某些平台的支持,包括但不限于 Mac OS 9, BeOS, RISCOS, Irix 和 Tru64。"
13691375

13701376
#: ../../whatsnew/3.0.rst:862
13711377
msgid ":pep:`3118`: New Buffer API."
13721378
msgstr ":pep:`3118`: 新的缓冲区 API。"
13731379

13741380
#: ../../whatsnew/3.0.rst:864
13751381
msgid ":pep:`3121`: Extension Module Initialization & Finalization."
1376-
msgstr ""
1382+
msgstr ":pep:`3121`: 扩展模块初始化与最终化。"
13771383

13781384
#: ../../whatsnew/3.0.rst:866
13791385
msgid ":pep:`3123`: Making :c:macro:`PyObject_HEAD` conform to standard C."
1380-
msgstr ""
1386+
msgstr ":pep:`3123`: 使 :c:macro:`PyObject_HEAD` 与标准 C 一致。"
13811387

13821388
#: ../../whatsnew/3.0.rst:868
13831389
msgid "No more C API support for restricted execution."
1384-
msgstr ""
1390+
msgstr "已去除对受限执行的 C API 支持。"
13851391

13861392
#: ../../whatsnew/3.0.rst:870
13871393
msgid ""
@@ -1395,12 +1401,14 @@ msgid ""
13951401
":c:func:`PyImport_ImportModule` but won't block on the import lock "
13961402
"(returning an error instead)."
13971403
msgstr ""
1404+
"新的 C API :c:func:`PyImport_ImportModuleNoBlock`,类似于 "
1405+
":c:func:`PyImport_ImportModule` 但不会因导入锁而阻塞(改为返回错误)。"
13981406

13991407
#: ../../whatsnew/3.0.rst:877
14001408
msgid ""
14011409
"Renamed the boolean conversion C-level slot and method: ``nb_nonzero`` is "
14021410
"now ``nb_bool``."
1403-
msgstr ""
1411+
msgstr "重命名布尔转换的 C 层级槽位和方法: ``nb_nonzero`` 现在改为 ``nb_bool``。"
14041412

14051413
#: ../../whatsnew/3.0.rst:880
14061414
msgid ""
@@ -1419,6 +1427,8 @@ msgid ""
14191427
"biggest cause is the removal of special-casing for small integers. There's "
14201428
"room for improvement, but it will happen after 3.0 is released!"
14211429
msgstr ""
1430+
"综合而言 3.0 的改变使得 Python 3.0 运行 pystone 基准测试的速度比 Python 2.5 慢了约 10%。 "
1431+
"其中最大的原因可能是移除了针对小整数的特别场景的处理。 虽然存在改进空间,但这将在 3.0 发布之后再进行!"
14221432

14231433
#: ../../whatsnew/3.0.rst:898
14241434
msgid "Porting To Python 3.0"
@@ -1428,17 +1438,18 @@ msgstr "移植到 Python 3.0"
14281438
msgid ""
14291439
"For porting existing Python 2.5 or 2.6 source code to Python 3.0, the best "
14301440
"strategy is the following:"
1431-
msgstr ""
1441+
msgstr "对于将现有 Python 2.5 或 2.6 源代码移植到 Python 3.0,最佳的策略如下:"
14321442

14331443
#: ../../whatsnew/3.0.rst:903
14341444
msgid "(Prerequisite:) Start with excellent test coverage."
1435-
msgstr ""
1445+
msgstr "(必要前提:)启动良好的测试覆盖。"
14361446

14371447
#: ../../whatsnew/3.0.rst:905
14381448
msgid ""
14391449
"Port to Python 2.6. This should be no more work than the average port from "
14401450
"Python 2.x to Python 2.(x+1). Make sure all your tests pass."
14411451
msgstr ""
1452+
"移植到 Python 2.6。 这应该不会比从 Python 2.x 到 Python 2.(x+1) 的正常移植更麻烦。 请确保所有的测试均能通过。"
14421453

14431454
#: ../../whatsnew/3.0.rst:909
14441455
msgid ""
@@ -1447,6 +1458,8 @@ msgid ""
14471458
"Run your test suite again, and fix code that you get warnings about until "
14481459
"there are no warnings left, and all your tests still pass."
14491460
msgstr ""
1461+
"(仍然使用 2.6:) 打开 :option:`!-3` 命令行开关。 这将启用针对将在 3.0 中被移除(或修改)的特性的警告。 "
1462+
"再次运行你的测试套件,并修复你收到相关警告的代码直至不再有任何警告,并且所有的测试仍然能通过。"
14501463

14511464
#: ../../whatsnew/3.0.rst:915
14521465
msgid ""
@@ -1466,6 +1479,9 @@ msgid ""
14661479
"the source code and running the ``2to3`` translator again, rather than "
14671480
"editing the 3.0 version of the source code."
14681481
msgstr ""
1482+
"不建议尝试编写可不加修改地同时运行于 Python 2.6 和 3.0 的源代码;你将不得不使用一种非常扭曲的代码风格,例如避免 ``print`` "
1483+
"语句、元类和许多其他特性。 如果你正在维护需要同时支持 Python 2.6 和 Python 3.0 的库,最佳做法是将上述的步骤 3 "
1484+
"修改为编辑源代码的 2.6 版本并再次运行 ``2to3`` 翻译器,而不是修改源代码的 3.0 版本。"
14691485

14701486
#: ../../whatsnew/3.0.rst:929
14711487
msgid ""

0 commit comments

Comments
 (0)