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

Skip to content

Commit 403fe78

Browse files
[po] auto sync
1 parent b3aa289 commit 403fe78

File tree

6 files changed

+246
-78
lines changed

6 files changed

+246
-78
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "92.59%", "updated_at": "2024-03-17T15:31:11Z"}
1+
{"translation": "92.80%", "updated_at": "2024-03-23T03:31:59Z"}

howto/annotations.po

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
# SOME DESCRIPTIVE TITLE.
2-
# Copyright (C) 2001-2023, Python Software Foundation
2+
# Copyright (C) 2001-2024, Python Software Foundation
33
# This file is distributed under the same license as the Python package.
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
66
# Translators:
7-
# Rafael Fontenelle <[email protected]>, 2023
8-
# Freesand Leo <[email protected]>, 2023
7+
# Rafael Fontenelle <[email protected]>, 2024
98
#
109
#, fuzzy
1110
msgid ""
1211
msgstr ""
1312
"Project-Id-Version: Python 3.10\n"
1413
"Report-Msgid-Bugs-To: \n"
15-
"POT-Creation-Date: 2023-11-24 18:59+0000\n"
14+
"POT-Creation-Date: 2024-03-22 19:02+0000\n"
1615
"PO-Revision-Date: 2022-11-05 17:21+0000\n"
17-
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2023\n"
16+
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2024\n"
1817
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1918
"MIME-Version: 1.0\n"
2019
"Content-Type: text/plain; charset=UTF-8\n"
@@ -24,7 +23,7 @@ msgstr ""
2423

2524
#: ../../howto/annotations.rst:5
2625
msgid "Annotations Best Practices"
27-
msgstr "对象注解属性的最佳实践"
26+
msgstr "注解最佳实践"
2827

2928
#: ../../howto/annotations.rst:0
3029
msgid "author"
@@ -44,9 +43,7 @@ msgid ""
4443
" annotations dicts. If you write Python code that examines "
4544
"``__annotations__`` on Python objects, we encourage you to follow the "
4645
"guidelines described below."
47-
msgstr ""
48-
"本文意在汇聚对象的注解字典用法的最佳实践。 如果 Python 代码会去查看 Python 对象的 ``__annotations__`` "
49-
"属性,建议遵循以下准则。"
46+
msgstr "本文档旨在概括与注解字典打交道的最佳实践。查看 Python 对象的 ``__annotations__`` 的代码应遵循下述准则。"
5047

5148
#: ../../howto/annotations.rst:16
5249
msgid ""
@@ -56,8 +53,9 @@ msgid ""
5653
"and older, other best practices for ``__annotations__`` that apply to any "
5754
"Python version, and quirks of ``__annotations__``."
5855
msgstr ""
59-
"本文分为四个部分:在 Python 3.10 以上版本中访问对象注解的最佳实践、在Python 3.9 以上版本中访问对象注解的最佳实践、适用于任何 "
60-
"Python 版本的其他 ``__annotations__`` 最佳实践、``__annotations__`` 的特别之处。"
56+
"本文档按四部分组织:在 3.10 及更高版本的 Python 中查看对象注解的最佳实践、在 3.9 及更低版本的 Python "
57+
"中查看对象注解的最佳实践、其它一些适于任何版本的 Python 的 ``__annotations__`` "
58+
"的最佳实践、``__annotations__`` 的一些“坑”。"
6159

6260
#: ../../howto/annotations.rst:26
6361
msgid ""
@@ -66,12 +64,12 @@ msgid ""
6664
"information on how to use \"type hints\" in your code, please see the "
6765
":mod:`typing` module."
6866
msgstr ""
69-
"请注意,本文是专门介绍 ``__annotations__`` 的,而不是介绍注解的用法。若要了解“类型提示”的使用信息,请参阅 "
67+
"本文是 ``__annotations__`` 的文档,不是介绍注解用法的文档。如果要查找关于如何使用“类型提示”的信息,请参阅 "
7068
":mod:`typing` 模块。"
7169

7270
#: ../../howto/annotations.rst:33
7371
msgid "Accessing The Annotations Dict Of An Object In Python 3.10 And Newer"
74-
msgstr "在 Python 3.10 以上版本中访问对象的注解字典"
72+
msgstr "在 3.10 及更高版本的 Python 中访问对象的注解字典"
7573

7674
#: ../../howto/annotations.rst:35
7775
msgid ""
@@ -81,8 +79,8 @@ msgid ""
8179
"any object that supports annotations. This function can also \"un-"
8280
"stringize\" stringized annotations for you."
8381
msgstr ""
84-
"Python 3.10 在标准库中加入了一个新函数::func:`inspect.get_annotations`。在 Python 3.10 "
85-
"以上的版本中,调用该函数就是访问对象注解字典的最佳做法。该函数还可以“解析”字符串形式的注解。"
82+
"Python 3.10 在标准库中加入了一个新函数::func:`inspect.get_annotations`。在 3.10 及更高版本的 "
83+
"Python 中,调用该函数就是访问任何支持注解的对象的注解字典的最佳实践。该函数还可以为你“解析”字符串化了的注解。"
8684

8785
#: ../../howto/annotations.rst:42
8886
msgid ""
@@ -94,10 +92,10 @@ msgid ""
9492
"of these three *specific* objects, you may simply use ``o.__annotations__`` "
9593
"to get at the object's annotations dict."
9694
msgstr ""
97-
"有时会因为某些原因看不到 :func:`inspect.get_annotations` ,也可以直接访问 ``__annotations__`` "
98-
"数据成员。这方面的最佳实践在 Python 3.10 中也发生了变化:从 Python 3.10 开始,Python 函数、类和模块的 "
99-
"``o.__annotations__`` *保证* 可用。如果确定是要查看这三种对象,只要利用 ``o.__annotations__`` "
100-
"读取对象的注释字典即可。"
95+
"不用 :func:`inspect.get_annotations` 也可以手动访问``__annotations__`` "
96+
"这一数据成员。该方法的最佳实践在 Python 3.10 中也发生了变化:从 Python 3.10 开始,对于 Python "
97+
"函数、类和模块,``o.__annotations__`` *保证* 会正常工作。只要你确信所检查的对象是这三种之一,你便可以用 "
98+
"``o.__annotations__`` 获取该对象的注解字典。"
10199

102100
#: ../../howto/annotations.rst:52
103101
msgid ""
@@ -108,9 +106,9 @@ msgid ""
108106
":func:`getattr` with three arguments, for example ``getattr(o, "
109107
"'__annotations__', None)``."
110108
msgstr ""
111-
"不过其他类型的可调用对象可能就没有定义 ``__annotations__`` 属性,比如由 :func:`functools.partial` "
112-
"创建的可调用对象。当访问某个未知对象的 ``__annotations__`` 时,Python 3.10 以上版本的最佳做法是带三个参数去调用 "
113-
":func:`getattr` ,比如 ``getattr(o, '__annotations__', None)``。"
109+
"不过,其它类型的可调用对象可不一定定义了 ``__annotations__`` 属性,就比如说,:func:`functools.partial` "
110+
"创建的可调用对象。当访问某个未知对象的 ``__annotations__`` 时,3.10 及更高版本的 Python 中的最佳实践是用三个参数去调用"
111+
" :func:`getattr`,类似 ``getattr(o, '__annotations__', None)`` 这样。"
114112

115113
#: ../../howto/annotations.rst:60
116114
msgid ""
@@ -119,20 +117,19 @@ msgid ""
119117
"parent's ``__annotations__``. In Python 3.10 and newer, the child class's "
120118
"annotations will be an empty dict instead."
121119
msgstr ""
122-
"Python 3.10 之前,在一个未定义标注但具有定义了标注的父类的类上访问 ``__annotations__`` 将返回父类的 "
123-
"``__annotations__``。 在 Python 3.10 和更新的版本中,子类的标注将改为一个空字典。"
120+
"Python 3.10 之前,在一个没定义注解而父类定义了注解的类上访问 ``__annotations__`` 将返回父类的 "
121+
"``__annotations__``。3.10 及更高版本的 Python 中,这样的子类的标注是一个空字典。"
124122

125123
#: ../../howto/annotations.rst:68
126124
msgid "Accessing The Annotations Dict Of An Object In Python 3.9 And Older"
127-
msgstr "在 Python 3.9 及更早的版本中访问对象的注解字典"
125+
msgstr "在 3.9 及更低版本的 Python 中访问对象的注解字典"
128126

129127
#: ../../howto/annotations.rst:70
130128
msgid ""
131129
"In Python 3.9 and older, accessing the annotations dict of an object is much"
132130
" more complicated than in newer versions. The problem is a design flaw in "
133131
"these older versions of Python, specifically to do with class annotations."
134-
msgstr ""
135-
"在 Python 3.9 及之前的版本中,访问对象的注解字典要比新版本中复杂得多。这个是 Python 低版本的一个设计缺陷,特别是访问类的注解时。"
132+
msgstr "在 3.9 及更低版本的 Python 中访问对象的注解字典要比新版复杂。这是低版本 Python 的设计缺陷,特别是类的注解。"
136133

137134
#: ../../howto/annotations.rst:75
138135
msgid ""
@@ -142,8 +139,8 @@ msgid ""
142139
"should use three-argument :func:`getattr` to access the object's "
143140
"``__annotations__`` attribute."
144141
msgstr ""
145-
"要访问其他对象——函数、可调用对象和模块——的注释字典,最佳做法与 3.10 版本相同,假定不想调用 "
146-
":func:`inspect.get_annotations`:你应该用三个参数调用 :func:`getattr` 以访问对象的 "
142+
"访问其它对象——函数、其它可调用对象和模块——的注解字典的最佳实践与 3.10 版本相同,如果不用 "
143+
":func:`inspect.get_annotations`,就用三个参数去调用 :func:`getattr` 以访问对象的 "
147144
"``__annotations__`` 属性。"
148145

149146
#: ../../howto/annotations.rst:82

whatsnew/2.5.po

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.10\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2024-01-12 19:15+0000\n"
14+
"POT-Creation-Date: 2024-03-22 19:02+0000\n"
1515
"PO-Revision-Date: 2022-11-05 17:23+0000\n"
1616
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -313,6 +313,8 @@ msgid ""
313313
"``from ... import ...`` statement, making it easier to import many different"
314314
" names."
315315
msgstr ""
316+
":pep:`328` 的较简单部分已在 Python 2.4 中实现:现在可以用圆括号将使用 ``from ... import ...`` "
317+
"语句导入的名称括起来,以便能够更容易地导入大量不同的名称。"
316318

317319
#: ../../whatsnew/2.5.rst:263
318320
msgid ""
@@ -321,16 +323,18 @@ msgid ""
321323
"plan is to move toward making absolute imports the default in future "
322324
"versions of Python."
323325
msgstr ""
326+
"更复杂的部分已在 Python 2.5 中实现:可以指定使用绝对的或相对于包的导入方式来导入模块。 计划在未来的 Python "
327+
"版本中将绝对导入方式设为默认。"
324328

325329
#: ../../whatsnew/2.5.rst:267
326330
msgid "Let's say you have a package directory like this::"
327-
msgstr ""
331+
msgstr "比如说你有这样一个包目录::"
328332

329333
#: ../../whatsnew/2.5.rst:274
330334
msgid ""
331335
"This defines a package named :mod:`pkg` containing the :mod:`pkg.main` and "
332336
":mod:`pkg.string` submodules."
333-
msgstr ""
337+
msgstr "这定义了一个名为 :mod:`pkg` 的包,其中包含 :mod:`pkg.main` 和 :mod:`pkg.string` 子模块。"
334338

335339
#: ../../whatsnew/2.5.rst:277
336340
msgid ""
@@ -394,6 +398,7 @@ msgid ""
394398
"Leading periods cannot be used with the ``import modname`` form of the "
395399
"import statement, only the ``from ... import`` form."
396400
msgstr ""
401+
"开头的句点不可用于 import 语句的 ``import modname`` 形式,只能用于 ``from ... import`` 形式。"
397402

398403
#: ../../whatsnew/2.5.rst:331
399404
msgid ":pep:`328` - Imports: Multi-Line and Absolute/Relative"

whatsnew/2.7.po

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.10\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2024-03-15 19:11+0000\n"
14+
"POT-Creation-Date: 2024-03-22 19:02+0000\n"
1515
"PO-Revision-Date: 2022-11-05 17:23+0000\n"
1616
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -519,6 +519,8 @@ msgid ""
519519
"compatibility with earlier versions of Python, use :mod:`argparse` instead "
520520
"of :mod:`optparse`."
521521
msgstr ""
522+
"简而言之,如果你是在编写新脚本并且不需要担心与 Python 较早版本的兼容性,请使用 :mod:`argparse` 而不是 "
523+
":mod:`optparse`。"
522524

523525
#: ../../whatsnew/2.7.rst:370
524526
msgid "Here's an example::"
@@ -528,13 +530,13 @@ msgstr "以下是为示例代码::"
528530
msgid ""
529531
"Unless you override it, :option:`!-h` and :option:`!--help` switches are "
530532
"automatically added, and produce neatly formatted output::"
531-
msgstr ""
533+
msgstr "除非你覆盖它,否则会自动添加 :option:`!-h` 和 :option:`!--help` 开关,并产生格式化良好的输出::"
532534

533535
#: ../../whatsnew/2.7.rst:410
534536
msgid ""
535537
"As with :mod:`optparse`, the command-line switches and arguments are "
536538
"returned as an object with attributes named by the *dest* parameters::"
537-
msgstr ""
539+
msgstr "与 :mod:`optparse` 一样,命令行开关和参数将返回为一个具有通过 *dest* 形参所指定的属性的对象::"
538540

539541
#: ../../whatsnew/2.7.rst:425
540542
msgid ""
@@ -663,6 +665,8 @@ msgid ""
663665
":meth:`~dict.items` are different in Python 3.x. They return an object "
664666
"called a :dfn:`view` instead of a fully materialized list."
665667
msgstr ""
668+
"字典方法 :meth:`~dict.keys`, :meth:`~dict.values`, and :meth:`~dict.items` 在 "
669+
"Python 3.x 有所不同。 它们将返回名为 :dfn:`view` 的对象而不是完整的列表。"
666670

667671
#: ../../whatsnew/2.7.rst:554
668672
msgid ""
@@ -678,19 +682,19 @@ msgid ""
678682
"Views can be iterated over, but the key and item views also behave like "
679683
"sets. The ``&`` operator performs intersection, and ``|`` performs a "
680684
"union::"
681-
msgstr ""
685+
msgstr "视图可以被迭代,但键和条目视图的行为也很像是集合。 ``&`` 运算符执行交集运算,``|`` 执行并集运算::"
682686

683687
#: ../../whatsnew/2.7.rst:579
684688
msgid ""
685689
"The view keeps track of the dictionary and its contents change as the "
686690
"dictionary is modified::"
687-
msgstr ""
691+
msgstr "视图会追踪字典及字典被修改时的内容变化::"
688692

689693
#: ../../whatsnew/2.7.rst:589
690694
msgid ""
691695
"However, note that you can't add or remove keys while you're iterating over "
692696
"the view::"
693-
msgstr ""
697+
msgstr "但是,请注意在对视图进行迭代时你是不能添加或移除键的::"
694698

695699
#: ../../whatsnew/2.7.rst:599
696700
msgid ""
@@ -3222,7 +3226,7 @@ msgstr ""
32223226

32233227
#: ../../whatsnew/2.7.rst:2654
32243228
msgid "Bootstrapping pip By Default"
3225-
msgstr "默认对 pip 进行初始配置"
3229+
msgstr "默认对 pip 进行初始设置"
32263230

32273231
#: ../../whatsnew/2.7.rst:2656
32283232
msgid ""
@@ -3258,6 +3262,9 @@ msgid ""
32583262
"line by default, otherwise it can still be accessed through the Python "
32593263
"launcher for Windows as ``py -m pip``."
32603264
msgstr ""
3265+
"在 Windows 和 Mac OS X 上,现在 CPython 安装程序默认会将 ``pip`` 与 CPython "
3266+
"本身一同安装(用户可以在安装过程中选择不安装它)。 Window 用户需要选择执行 ``PATH`` 修改以使 ``pip`` "
3267+
"在命令行中默认可用,在其他情况下它仍然可以通过 Windows 版 Python 启动器以 ``py -m pip`` 的方式使用。"
32613268

32623269
#: ../../whatsnew/2.7.rst:2679
32633270
msgid ""
@@ -3266,6 +3273,8 @@ msgid ""
32663273
"simple directions on how to install them on that platform (usually using the"
32673274
" system package manager)."
32683275
msgstr ""
3276+
"正如 `在 PEP "
3277+
"中已讨论的`__,平台打包者可以选择默认不安装这些命令,只需要在它们被发起调用时,能够提供有关如何在该平台上安装它们的简单清晰的指引(通常是使用系统包管理器)。"
32693278

32703279
#: ../../whatsnew/2.7.rst:2688
32713280
msgid "Documentation Changes"
@@ -3280,6 +3289,10 @@ msgid ""
32803289
"Packaging User Guide <https://packaging.python.org>`__ and the documentation"
32813290
" of the individual projects."
32823291
msgstr ""
3292+
"作为此项更改的一部分,文档的 :ref:`installing-index` 和 :ref:`distributing-index` "
3293+
"章节已经完全重新设计,快速入门和 FAQ 文档也是如此。 大部分打包指南文档现在都已被移至由 Python Packaging Authority "
3294+
"维护的 `Python Packaging User Guide <https://packaging.python.org>`__ "
3295+
"以及相应的独立项目文档。"
32833296

32843297
#: ../../whatsnew/2.7.rst:2698
32853298
msgid ""
@@ -3290,7 +3303,7 @@ msgstr ""
32903303

32913304
#: ../../whatsnew/2.7.rst:2705
32923305
msgid ":pep:`453` -- Explicit bootstrapping of pip in Python installations"
3293-
msgstr ":pep:`453` -- Python安装中pip的显式引导"
3306+
msgstr ":pep:`453` -- Python 安装版中对 pip 的显式初始设置"
32943307

32953308
#: ../../whatsnew/2.7.rst:2705
32963309
msgid ""
@@ -3304,7 +3317,7 @@ msgstr ""
33043317
msgid ""
33053318
"PEP 476: Enabling certificate verification by default for stdlib http "
33063319
"clients"
3307-
msgstr ""
3320+
msgstr "PEP 476: 默认为 stdlib http 客户端启用证书验证"
33083321

33093322
#: ../../whatsnew/2.7.rst:2711
33103323
msgid ""
@@ -3320,7 +3333,7 @@ msgstr ""
33203333
msgid ""
33213334
"For applications which require the old previous behavior, they can pass an "
33223335
"alternate context::"
3323-
msgstr ""
3336+
msgstr "对于需要之前版本的旧有行为的应用程序,可以传入一个替代的上下文::"
33243337

33253338
#: ../../whatsnew/2.7.rst:2735
33263339
msgid "PEP 493: HTTPS verification migration tools for Python 2.7"

whatsnew/3.2.po

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.10\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2024-02-16 18:51+0000\n"
14+
"POT-Creation-Date: 2024-03-22 19:02+0000\n"
1515
"PO-Revision-Date: 2022-11-05 17:23+0000\n"
1616
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -911,26 +911,32 @@ msgid ""
911911
"(By Nick Coghlan and Terrence Cole; :issue:`9567`, :issue:`3445`, and "
912912
":issue:`8814`.)"
913913
msgstr ""
914+
"(由 Nick Coghlan 和 Terrence Cole 在 :issue:`9567`, :issue:`3445` 和 "
915+
":issue:`8814` 中贡献。)"
914916

915917
#: ../../whatsnew/3.2.rst:803
916918
msgid ""
917919
"To help write classes with rich comparison methods, a new decorator "
918920
":func:`functools.total_ordering` will use existing equality and inequality "
919921
"methods to fill in the remaining methods."
920922
msgstr ""
923+
"为帮助编写具有丰富比较方法的类,新增的装饰器 :func:`functools.total_ordering` "
924+
"将使用现有的相等和不相等方法来填充其余的方法。"
921925

922926
#: ../../whatsnew/3.2.rst:807
923927
msgid ""
924928
"For example, supplying *__eq__* and *__lt__* will enable "
925929
":func:`~functools.total_ordering` to fill-in *__le__*, *__gt__* and "
926930
"*__ge__*::"
927931
msgstr ""
932+
"例如,提供 *__eq__* and *__lt__* 将启用 :func:`~functools.total_ordering` 来填充 "
933+
"*__le__*, *__gt__* 和 *__ge__*::"
928934

929935
#: ../../whatsnew/3.2.rst:820
930936
msgid ""
931937
"With the *total_ordering* decorator, the remaining comparison methods are "
932938
"filled in automatically."
933-
msgstr ""
939+
msgstr "使用 *total_ordering* 装饰器时,将会自动填充其余的比较方法。"
934940

935941
#: ../../whatsnew/3.2.rst:823 ../../whatsnew/3.2.rst:835
936942
#: ../../whatsnew/3.2.rst:879 ../../whatsnew/3.2.rst:900
@@ -945,6 +951,8 @@ msgid ""
945951
"function converts an old-style comparison function to modern :term:`key "
946952
"function`:"
947953
msgstr ""
954+
"为帮助移植 Python 2 程序,:func:`functools.cmp_to_key` 函数可将旧式的比较函数转换为新式的 :term:`key "
955+
"function`:"
948956

949957
#: ../../whatsnew/3.2.rst:832
950958
msgid ""

0 commit comments

Comments
 (0)