Skip to content

Commit 613e771

Browse files
[po] auto sync
1 parent ca69238 commit 613e771

File tree

4 files changed

+37
-15
lines changed

4 files changed

+37
-15
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "92.71%", "updated_at": "2024-06-28T20:09:24Z"}
1+
{"translation": "92.73%", "updated_at": "2024-07-06T06:09:49Z"}

whatsnew/2.1.po

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ msgid ""
1515
msgstr ""
1616
"Project-Id-Version: Python 3.8\n"
1717
"Report-Msgid-Bugs-To: \n"
18-
"POT-Creation-Date: 2024-06-28 17:09+0000\n"
18+
"POT-Creation-Date: 2024-07-05 17:08+0000\n"
1919
"PO-Revision-Date: 2020-05-30 12:17+0000\n"
2020
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2024\n"
2121
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -532,7 +532,7 @@ msgstr ""
532532
"不再需要编辑 :file:`Modules/Setup` 文件来启用模块,而是在 Python 源代码分发包的顶层目录运行一个 "
533533
":file:`setup.py` 脚本,该脚本在构建时尝试通过检查系统上的模块和头文件来发现可以启用那些模块。 如果某个模块已在 "
534534
":file:`Modules/Setup` 中配置,则 :file:`setup.py` 脚本不会尝试编译该模块,并会遵从 "
535-
":file:`Modules/Setup` 文件中的内容。 这提供了一种方式来指定特定平台所需的任何奇怪的命令行标志或库。"
535+
":file:`Modules/Setup` 文件中的内容。 这提供了一种方式来指定特定平台所需的任何奇怪的命令行旗标或库。"
536536

537537
#: ../../whatsnew/2.1.rst:325
538538
msgid ""
@@ -573,14 +573,15 @@ msgid ""
573573
"common one, and another being circular references in data structures such as"
574574
" trees."
575575
msgstr ""
576-
"存储对对象的引用(例如,在字典或列表中)会导致该对象永久存活。在某些特定情况下,这种行为是不希望的,最常见的是对象缓存,另一个是像树这样的数据结构中的循环引用。"
576+
"存储一个指向对象的引用(例如,在字典或列表中)会导致该对象永久存活。 "
577+
"在某些特定情况下,这种行为是不符合需要的,最常见的是对象缓存,另一个是像树这样的数据结构中的循环引用。"
577578

578579
#: ../../whatsnew/2.1.rst:352
579580
msgid ""
580581
"For example, consider a memoizing function that caches the results of "
581582
"another function ``f(x)`` by storing the function's argument and its result "
582583
"in a dictionary::"
583-
msgstr "例如,考虑一个记忆化函数,它通过将函数的参数及其结果存储在字典中来缓存另一个函数 ``f(x)`` 的结果"
584+
msgstr "例如,考虑一个记忆化函数,它通过将函数的参数及其结果存储在字典中来缓存另一个函数 ``f(x)`` 的结果::"
584585

585586
#: ../../whatsnew/2.1.rst:368
586587
msgid ""
@@ -654,7 +655,7 @@ msgstr ""
654655
msgid ""
655656
"Arbitrary attributes can now be set and retrieved on functions using the "
656657
"regular Python syntax::"
657-
msgstr "现在可以使用常规的 Python 语法在函数上设置和检索任意属性"
658+
msgstr "现在可以使用常规的 Python 语法在函数上设置和检索任意属性::"
658659

659660
#: ../../whatsnew/2.1.rst:444
660661
msgid ""
@@ -698,7 +699,7 @@ msgid ""
698699
":envvar:`PYTHONCASEOK` environment variable before starting the Python "
699700
"interpreter."
700701
msgstr ""
701-
"在 Python 2.1 中,:keyword:`import` 语句可以在不区分大小写的平台上模拟大小写敏感性。 现在,Python "
702+
"在 Python 2.1 中,:keyword:`import` 语句可以在不区分大小写的平台上模拟大小写敏感性。 现在,Python "
702703
"默认搜索第一个大小写敏感匹配的文件,如果找不到这样的文件,就会引发 :exc:`ImportError`,因此 ``import file`` "
703704
"不会导入名为 ``FILE.PY`` 的模块。 在启动 Python 解释器之前,可以通过设置 :envvar:`PYTHONCASEOK` "
704705
"环境变量来请求大小写不敏感匹配。"
@@ -715,9 +716,9 @@ msgid ""
715716
"be called instead of :func:`repr`. For example, you can set it to a special "
716717
"pretty-printing function::"
717718
msgstr ""
718-
"在交互模式下使用 Python 解释器时,命令的输出是通过内置的 :func:`repr` 函数显示的。在 Python 2.1 中,可以将变量 "
719-
":func:`sys.displayhook` 设置为一个可调用对象,该对象将在代替 :func:`repr` "
720-
"函数被调用。例如,你可以将其设置为一个特殊的美观打印函数:"
719+
"在交互模式下使用 Python 解释器时,命令的输出是通过内置的 :func:`repr` 函数显示的。 在 Python 2.1 中,可以将变量 "
720+
":func:`sys.displayhook` 设置为一个可调用对象,该对象将在代替 :func:`repr` 函数被调用。 "
721+
"例如,你可以将其设置为一个特殊的美化打印函数::"
721722

722723
#: ../../whatsnew/2.1.rst:502
723724
msgid ":pep:`217` - Display Hook for Interactive Use"
@@ -760,7 +761,7 @@ msgstr ""
760761
"``Py_TPFLAGS_CHECKTYPES``,以表明它们支持新的强制模型。 "
761762
"在此类扩展类型中,数字槽函数不再假定它们将得到两个相同类型的参数;相反,它们可能会得到两个不同类型的参数,然后可以执行自己的内部强制。如果槽函数传递给它一个无法处理的类型,它可以通过返回一个指向"
762763
" ``Py_NotImplemented`` 单一值的引用来表示失败。 然后将尝试其他类型的数值函数,也许它们可以处理该操作;如果其他类型也返回 "
763-
"``Py_NotImplemented``,那么将引发 :exc:`TypeError`。 用 Python 写的数值方法也可以返回 "
764+
"``Py_NotImplemented``,那么将引发 :exc:`TypeError`。 用 Python 写的数值方法也可以返回 "
764765
"``Py_NotImplemented``,导致解释器当作该方法不存在(也许会引发 :exc:`TypeError`,也许会尝试另一个对象的数值方法)。"
765766

766767
#: ../../whatsnew/2.1.rst:534

whatsnew/2.2.po

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ msgid ""
1414
msgstr ""
1515
"Project-Id-Version: Python 3.8\n"
1616
"Report-Msgid-Bugs-To: \n"
17-
"POT-Creation-Date: 2024-06-28 17:09+0000\n"
17+
"POT-Creation-Date: 2024-07-05 17:08+0000\n"
1818
"PO-Revision-Date: 2020-05-30 12:17+0000\n"
1919
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2024\n"
2020
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -354,6 +354,7 @@ msgid ""
354354
"rules under which names are resolved. Consider this set of classes (diagram"
355355
" taken from :pep:`253` by Guido van Rossum)::"
356356
msgstr ""
357+
"通过改变名称解析规则,多重继承也变得更加有用。 请看下面这组类(图表摘自 :pep:`253` ,作者 Guido van Rossum):"
357358

358359
#: ../../whatsnew/2.2.rst:264
359360
msgid ""
@@ -648,7 +649,7 @@ msgstr ":pep:`234` - 迭代器"
648649
msgid ""
649650
"Written by Ka-Ping Yee and GvR; implemented by the Python Labs crew, mostly"
650651
" by GvR and Tim Peters."
651-
msgstr "由 Ka-Ping Yee 和 GvR 撰写;由 Python Labs 团队(主要由 GvR 和 Tim Peters)实现。"
652+
msgstr "由 Ka-Ping Yee 和 GvR 撰写;由 Python Labs 小组(主要由 GvR 和 Tim Peters)实现。"
652653

653654
#: ../../whatsnew/2.2.rst:542
654655
msgid "PEP 255: Simple Generators"

whatsnew/3.0.po

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ msgid ""
1515
msgstr ""
1616
"Project-Id-Version: Python 3.8\n"
1717
"Report-Msgid-Bugs-To: \n"
18-
"POT-Creation-Date: 2024-03-09 12:12+0000\n"
18+
"POT-Creation-Date: 2024-07-05 17:08+0000\n"
1919
"PO-Revision-Date: 2020-05-30 12:18+0000\n"
2020
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2024\n"
2121
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -58,6 +58,8 @@ msgid ""
5858
"have more details than the regular documentation; but note that PEPs usually"
5959
" are not kept up-to-date once a feature has been fully implemented."
6060
msgstr ""
61+
"本文并不试图提供所有新特性的完整规范,而是试图提供一个方便的概述。 要了解完整的细节,您应该参考 Python 3.0 的文档和/或文中引用的许多 "
62+
"PEP。 如果您想了解某个特性的完整实现和设计原理,PEP 通常比常规文档有更多的细节;但要注意的是,一旦某个特性被完全实现,PEP 通常不会保持更新。"
6163

6264
#: ../../whatsnew/3.0.rst:72
6365
msgid ""
@@ -66,6 +68,7 @@ msgid ""
6668
"distribution contains a wealth of detailed information about every small "
6769
"thing that was changed."
6870
msgstr ""
71+
"由于时间有限,本文档不够完整。 对于新发布的版本,源代码发行版中的 ``Misc/NEWS`` 文件总是包含大量关于每一个细小改动的详细信息。"
6972

7073
#: ../../whatsnew/3.0.rst:89
7174
msgid "Common Stumbling Blocks"
@@ -87,6 +90,8 @@ msgid ""
8790
"with keyword arguments to replace most of the special syntax of the old "
8891
"``print`` statement (:pep:`3105`). Examples::"
8992
msgstr ""
93+
"``print`` 语句已被 :func:`print` 函数取代,其关键字参数取代了旧 ``print`` 语句 (:pep:`3105`) "
94+
"的大部分特殊语法。 示例::"
9095

9196
#: ../../whatsnew/3.0.rst:116
9297
msgid "You can also customize the separator between items, e.g.::"
@@ -107,20 +112,25 @@ msgid ""
107112
"\"B\"`` would write ``\"A\\nB\\n\"``; but in Python 3.0, ``print(\"A\\n\", "
108113
"\"B\")`` writes ``\"A\\n B\\n\"``."
109114
msgstr ""
115+
":func:`print` 函数不支持旧 ``print`` 语句的 \"softspace\" 功能。例如,在 Python 2.x "
116+
"中,``print \"A\\n\", \"B\"`` 会写入 ``\"A\\nB\\n\"``;但在 Python 3.0 "
117+
"中,``print(\"A\\n\", \"B\")`` 会写入 ``\"A\\n B\\n\"``。"
110118

111119
#: ../../whatsnew/3.0.rst:133
112120
msgid ""
113121
"Initially, you'll be finding yourself typing the old ``print x`` a lot in "
114122
"interactive mode. Time to retrain your fingers to type ``print(x)`` "
115123
"instead!"
116-
msgstr ""
124+
msgstr "最初,您会发现自己在交互模式下经常输入旧的 ``print x`` 。是时候重新训练你的手指以输入 ``print(x)`` 了!"
117125

118126
#: ../../whatsnew/3.0.rst:137
119127
msgid ""
120128
"When using the ``2to3`` source-to-source conversion tool, all ``print`` "
121129
"statements are automatically converted to :func:`print` function calls, so "
122130
"this is mostly a non-issue for larger projects."
123131
msgstr ""
132+
"使用 ``2to3`` 源代码到源代码转换工具时,所有 ``print`` 语句都会自动转换为 :func:`print` "
133+
"函数调用,因此对于大型项目来说,这基本上不是问题。"
124134

125135
#: ../../whatsnew/3.0.rst:143
126136
msgid "Views And Iterators Instead Of Lists"
@@ -137,12 +147,17 @@ msgid ""
137147
" longer works: ``k = d.keys(); k.sort()``. Use ``k = sorted(d)`` instead "
138148
"(this works in Python 2.5 too and is just as efficient)."
139149
msgstr ""
150+
":class:`dict` 方法 :meth:`dict.keys`、:meth:`dict.items` 和 :meth:`dict.values` "
151+
"返回 “视图” 而不是列表。 例如,这个写法不再有效: ``k = d.keys(); k.sort()``。 请使用 ``k = "
152+
"sorted(d)`` 代替(这在 Python 2.5 中也有效,而且同样高效)。"
140153

141154
#: ../../whatsnew/3.0.rst:153
142155
msgid ""
143156
"Also, the :meth:`dict.iterkeys`, :meth:`dict.iteritems` and "
144157
":meth:`dict.itervalues` methods are no longer supported."
145158
msgstr ""
159+
"此外,不再支持 :meth:`dict.iterkeys`、:meth:`dict.iteritems` 和 "
160+
":meth:`dict.itervalues` 方法。"
146161

147162
#: ../../whatsnew/3.0.rst:156
148163
msgid ""
@@ -155,6 +170,11 @@ msgid ""
155170
"function; the correct transformation is to use a regular :keyword:`for` loop"
156171
" (since creating a list would just be wasteful)."
157172
msgstr ""
173+
":func:`map` 和 :func:`filter` 均返回迭代器。 如果你确实需要一个列表并且所有输入序列的长度相等,简单的解决办法是将 "
174+
":func:`map` 包装在 :func:`list` 中,例如 "
175+
"``list(map(...))``,但更好的办法通常是使用列表推导式(特别是当原始代码使用了 :keyword:`lambda` "
176+
"的时候),或是重写代码使得它完全不需要列表。 还有一种特殊技巧是将 :func:`map` 作为函数的附带影响发起调用;正确的转换方式是使用一个常规的 "
177+
":keyword:`for` 循环(因为创建列表会浪费资源)。"
158178

159179
#: ../../whatsnew/3.0.rst:167
160180
msgid ""

0 commit comments

Comments
 (0)