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

Skip to content

Commit ddcefb8

Browse files
[po] auto sync
1 parent 13093d3 commit ddcefb8

File tree

15 files changed

+132
-11
lines changed

15 files changed

+132
-11
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "93.25%", "updated_at": "2024-10-11T17:47:04Z"}
1+
{"translation": "93.28%", "updated_at": "2024-10-11T18:48:51Z"}

library/xml.dom.po

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.12\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2024-05-17 14:44+0000\n"
14+
"POT-Creation-Date: 2024-10-11 14:48+0000\n"
1515
"PO-Revision-Date: 2024-05-11 00:34+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"
@@ -1456,6 +1456,14 @@ msgstr ""
14561456
"从 OMG IDL 到 Python 的映射以类似于 Java 映射的方式定义了针对 IDL ``attribute`` 声明的访问器函数。 映射以下 "
14571457
"IDL 声明 ::"
14581458

1459+
#: ../../library/xml.dom.rst:1005
1460+
msgid ""
1461+
"readonly attribute string someValue;\n"
1462+
" attribute string anotherValue;"
1463+
msgstr ""
1464+
"readonly attribute string someValue;\n"
1465+
" attribute string anotherValue;"
1466+
14591467
#: ../../library/xml.dom.rst:1008
14601468
msgid ""
14611469
"yields three accessor functions: a \"get\" method for :attr:`someValue` "

library/xml.dom.pulldom.po

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.12\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2024-09-20 14:57+0000\n"
14+
"POT-Creation-Date: 2024-10-11 14:48+0000\n"
1515
"PO-Revision-Date: 2024-05-11 00:34+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"
@@ -241,3 +241,14 @@ msgid ""
241241
" # Following statement prints node with all its children '<p>Some text <div>and more</div></p>'\n"
242242
" print(node.toxml())"
243243
msgstr ""
244+
"from xml.dom import pulldom\n"
245+
"\n"
246+
"xml = '<html><title>Foo</title> <p>Some text <div>and more</div></p> </html>'\n"
247+
"doc = pulldom.parseString(xml)\n"
248+
"for event, node in doc:\n"
249+
" if event == pulldom.START_ELEMENT and node.tagName == 'p':\n"
250+
" # 以下语句只打印 '<p/>'\n"
251+
" print(node.toxml())\n"
252+
" doc.expandNode(node)\n"
253+
" # 以下语句将打印节点所有的子节点 '<p>Some text <div>and more</div></p>'\n"
254+
" print(node.toxml())"

library/xml.sax.utils.po

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.12\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2024-05-17 14:44+0000\n"
14+
"POT-Creation-Date: 2024-10-11 14:48+0000\n"
1515
"PO-Revision-Date: 2024-05-11 00:34+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"
@@ -89,6 +89,14 @@ msgstr ""
8989
"的内容选择一个引号字符,以尽量避免在字符串中编码任何引号字符。 如果单双引号字符在 *data* 中都存在,则双引号字符将被编码并且 *data* "
9090
"将使用双引号来标记。 结果字符串可被直接用作属性值::"
9191

92+
#: ../../library/xml.sax.utils.rst:55
93+
msgid ""
94+
">>> print(\"<element attr=%s>\" % quoteattr(\"ab ' cd \\\" ef\"))\n"
95+
"<element attr=\"ab ' cd &quot; ef\">"
96+
msgstr ""
97+
">>> print(\"<element attr=%s>\" % quoteattr(\"ab ' cd \\\" ef\"))\n"
98+
"<element attr=\"ab ' cd &quot; ef\">"
99+
92100
#: ../../library/xml.sax.utils.rst:58
93101
msgid ""
94102
"This function is useful when generating attribute values for HTML or any "

library/xmlrpc.client.po

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,19 @@ msgid ""
789789
" print(\"Error code: %d\" % err.errcode)\n"
790790
" print(\"Error message: %s\" % err.errmsg)"
791791
msgstr ""
792+
"import xmlrpc.client\n"
793+
"\n"
794+
"# 创建一个 ServerProxy,所用 URI 不与 XMLRPC 请求对应\n"
795+
"proxy = xmlrpc.client.ServerProxy(\"http://google.com/\")\n"
796+
"\n"
797+
"try:\n"
798+
" proxy.some_method()\n"
799+
"except xmlrpc.client.ProtocolError as err:\n"
800+
" print(\"A protocol error occurred\")\n"
801+
" print(\"URL: %s\" % err.url)\n"
802+
" print(\"HTTP/HTTPS headers: %s\" % err.headers)\n"
803+
" print(\"Error code: %d\" % err.errcode)\n"
804+
" print(\"Error message: %s\" % err.errmsg)"
792805

793806
#: ../../library/xmlrpc.client.rst:465
794807
msgid "MultiCall Objects"

library/xmlrpc.server.po

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,37 @@ msgid ""
259259
" # Run the server's main loop\n"
260260
" server.serve_forever()"
261261
msgstr ""
262+
"from xmlrpc.server import SimpleXMLRPCServer\n"
263+
"from xmlrpc.server import SimpleXMLRPCRequestHandler\n"
264+
"\n"
265+
"# 限制为特定的路径。\n"
266+
"class RequestHandler(SimpleXMLRPCRequestHandler):\n"
267+
" rpc_paths = ('/RPC2',)\n"
268+
"\n"
269+
"# 创建服务器\n"
270+
"with SimpleXMLRPCServer(('localhost', 8000),\n"
271+
" requestHandler=RequestHandler) as server:\n"
272+
" server.register_introspection_functions()\n"
273+
"\n"
274+
" # 注册 pow() 函数;这将使用 pow.__name__ 的值\n"
275+
" # 作为名称,即 'pow'。\n"
276+
" server.register_function(pow)\n"
277+
"\n"
278+
" # 以不同的名称注册一个函数\n"
279+
" def adder_function(x, y):\n"
280+
" return x + y\n"
281+
" server.register_function(adder_function, 'add')\n"
282+
"\n"
283+
" # 注册一个实例;该实例的所有方法将发布为\n"
284+
" # XML-RPC 方法 (在本例中,即为 'mul')。\n"
285+
" class MyFuncs:\n"
286+
" def mul(self, x, y):\n"
287+
" return x * y\n"
288+
"\n"
289+
" server.register_instance(MyFuncs())\n"
290+
"\n"
291+
" # 运行服务器的主循环\n"
292+
" server.serve_forever()"
262293

263294
#: ../../library/xmlrpc.server.rst:182
264295
msgid ""

library/zipapp.po

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.12\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2024-09-06 15:04+0000\n"
14+
"POT-Creation-Date: 2024-10-11 14:48+0000\n"
1515
"PO-Revision-Date: 2024-05-11 00:34+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"
@@ -570,6 +570,9 @@ msgid ""
570570
"encoded in UTF-8 on Windows, and in :func:`sys.getfilesystemencoding` on "
571571
"POSIX."
572572
msgstr ""
573+
"可选的 shebang 行,包含字符 ``b'#!'`` 后面跟一个解释器名,再带一个换行符 (``b'\\n'``)。 解释器名可以是 OS "
574+
"\"shebang\" 处理所能接受的任何名称,或为 Windows 上的 Python 启动器。 解释器名在 Windows 上应当使用 UTF-8 "
575+
"编码,而在 POSIX 上则使用 :func:`sys.getfilesystemencoding`。"
573576

574577
#: ../../library/zipapp.rst:336
575578
msgid ""

reference/datamodel.po

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,6 +1478,8 @@ msgid ""
14781478
"The class's :term:`qualified name`. See also: :attr:`__qualname__ attributes"
14791479
" <definition.__qualname__>`."
14801480
msgstr ""
1481+
"类的 :term:`qualified name`。 另请参阅: :attr:`__qualname__ 属性 "
1482+
"<definition.__qualname__>`。"
14811483

14821484
#: ../../reference/datamodel.rst:1168
14831485
msgid "The name of the module in which the class was defined."

reference/expressions.po

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ msgid ""
1212
msgstr ""
1313
"Project-Id-Version: Python 3.12\n"
1414
"Report-Msgid-Bugs-To: \n"
15-
"POT-Creation-Date: 2024-10-04 14:53+0000\n"
15+
"POT-Creation-Date: 2024-10-11 14:48+0000\n"
1616
"PO-Revision-Date: 2024-05-11 00:34+0000\n"
1717
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
1818
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -628,6 +628,14 @@ msgid ""
628628
":const:`None`. Otherwise, if :meth:`~generator.send` is used, then the "
629629
"result will be the value passed in to that method."
630630
msgstr ""
631+
"当一个生成器函数被调用时,它将返回一个名为生成器的迭代器。 然后这个生成器将控制生成器函数的执行。 执行过程会在这个生成器的某个方法被调用时开始。 "
632+
"这时,函数会执行到第一个 yield 表达式,在那里它将再次被挂起,向生成器的调用方返回 :token:`~python-"
633+
"grammar:yield_list` 的值,或者如果 :token:`~python-grammar:yield_list` 被省略则返回 "
634+
"``None``。 所谓的挂起,就是说所有局部状态都会被保留,包括局部变量的当前绑定、指令指针、内部求值栈及任何异常处理等等。 "
635+
"当通过调用生成器的某个方法恢复执行时,这个函数的运行就与 yield 表达式只是一个外部调用的情况完全一样。 在恢复执行后 yield "
636+
"表达式的值取决于恢复执行所调用的方法。 如果是用 :meth:`~generator.__next__` (一般是通过 :keyword:`for` "
637+
"或者 :func:`next` 内置函数) 则结果为 :const:`None`。 在其他情况下,如果是用 "
638+
":meth:`~generator.send`,则结果将为传给该方法的值。"
631639

632640
#: ../../reference/expressions.rst:504
633641
msgid ""
@@ -759,6 +767,10 @@ msgid ""
759767
"caller. If the generator exits without yielding another value, a "
760768
":exc:`StopIteration` exception is raised."
761769
msgstr ""
770+
"开始一个生成器函数的执行或是从上次执行 yield 表达式的位置恢复执行。 当一个生成器函数通过 :meth:`~generator.__next__`"
771+
" 方法恢复执行时,当前的 yield 表达式总是取值为 :const:`None`。 随后会继续执行到下一个 yield "
772+
"表达式,这时生成器将再次挂起,而 :token:`~python-grammar:yield_list` 的值会被返回给 "
773+
":meth:`__next__` 的调用方。 如果生成器没有产生下一个值就退出,则将引发 :exc:`StopIteration` 异常。"
762774

763775
#: ../../reference/expressions.rst:583
764776
msgid ""
@@ -941,6 +953,12 @@ msgid ""
941953
"Otherwise, if :meth:`~agen.asend` is used, then the result will be the value"
942954
" passed in to that method."
943955
msgstr ""
956+
"调用某个异步生成器的方法将返回一个 :term:`awaitable` 对象,执行会在此对象被等待时启动。 到那时,将执行至第一个 yield "
957+
"表达式,在那里它会再次挂起,将 :token:`~python-grammar:yield_list` 的值返回给等待中的协程。 "
958+
"与生成器一样,挂起意味着所有局部状态会被保留,包括局部变量的当前绑定、指令指针、内部求值栈以及任何异常处理的状态。 "
959+
"当执行在等待异步生成器的方法返回下一个对象后恢复时,该函数可以从原状态继续执行,就仿佛 yield 表达式只是另一个外部调用那样。 恢复执行后 "
960+
"yield 表达式的值取决于恢复执行所用的方法。 如果是使用 :meth:`~agen.__anext__` 则结果为 :const:`None`。 "
961+
"否则的话,如果是使用 :meth:`~agen.asend`,则结果将是传递给该方法的值。"
944962

945963
#: ../../reference/expressions.rst:703
946964
msgid ""
@@ -1025,6 +1043,11 @@ msgid ""
10251043
":exc:`StopAsyncIteration` exception, signalling that the asynchronous "
10261044
"iteration has completed."
10271045
msgstr ""
1046+
"返回一个可等待对象,它在运行时会开始执行该异步生成器或是从上次执行的 yield 表达式位置恢复执行。 当一个异步生成器通过 "
1047+
":meth:`~agen.__anext__` 方法恢复执行时,当前的 yield 表达或所返回的可等待对象总是取值为 "
1048+
":const:`None`,它在运行时将继续执行到下一个 yield 表达式。 该 yield 表达式的 :token:`~python-"
1049+
"grammar:yield_list` 的值会是完成的协程所引发的 :exc:`StopIteration` 异步的值。 "
1050+
"如果异步生成器没有产生下一个值就退出,则该可等待对象将引发 :exc:`StopAsyncIteration` 异常,提示该异步迭代操作已完成。"
10281051

10291052
#: ../../reference/expressions.rst:762
10301053
msgid ""
@@ -1045,6 +1068,11 @@ msgid ""
10451068
"called with :const:`None` as the argument, because there is no yield "
10461069
"expression that could receive the value."
10471070
msgstr ""
1071+
"返回一个可等待对象,它在运行时会恢复该异步生成器的执行。 与生成器的 :meth:`~generator.send` "
1072+
"方法一样,此方法会“发送”一个值给异步生成器函数,其 *value* 参数会成为当前 yield 表达式的结果值。 :meth:`asend` "
1073+
"方法所返回的可等待对象会将所引发的 :exc:`StopIteration` "
1074+
"作为生成器产生的下一个值返回,或者如果异步生成器没有产生下一个值就退出则引发 :exc:`StopAsyncIteration`。 当调用 "
1075+
":meth:`asend` 来启动异步生成器时,它必须以 :const:`None` 作为参数被调用,因为这时没有可以接收值的 yield 表达式。"
10481076

10491077
#: ../../reference/expressions.rst:783
10501078
msgid ""

tutorial/controlflow.po

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ msgid ""
1212
msgstr ""
1313
"Project-Id-Version: Python 3.12\n"
1414
"Report-Msgid-Bugs-To: \n"
15-
"POT-Creation-Date: 2024-10-04 14:53+0000\n"
15+
"POT-Creation-Date: 2024-10-11 14:48+0000\n"
1616
"PO-Revision-Date: 2024-05-11 00:34+0000\n"
1717
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
1818
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -418,6 +418,8 @@ msgid ""
418418
"ending the loop early, such as a :keyword:`return` or a raised exception, "
419419
"will also skip execution of the :keyword:`else` clause."
420420
msgstr ""
421+
"在这两类循环中,当在循环被 :keyword:`break` 终结时 :keyword:`!else` 子句 **不会** 被执行。 "
422+
"当然,其他提前结束循环的方式,如 :keyword:`return` 或是引发异常,也会跳过 :keyword:`else` 子句的执行。"
421423

422424
#: ../../tutorial/controlflow.rst:217
423425
msgid ""

whatsnew/2.1.po

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ msgid ""
1313
msgstr ""
1414
"Project-Id-Version: Python 3.12\n"
1515
"Report-Msgid-Bugs-To: \n"
16-
"POT-Creation-Date: 2024-09-27 14:50+0000\n"
16+
"POT-Creation-Date: 2024-10-11 14:48+0000\n"
1717
"PO-Revision-Date: 2024-05-11 00:34+0000\n"
1818
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
1919
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -853,6 +853,9 @@ msgid ""
853853
"Python dictionary; you *can't* be tricky and set it to a :class:`!UserDict` "
854854
"instance, or any other random object that behaves like a mapping."
855855
msgstr ""
856+
"包含属性的字典可以作为函数的 :attr:`~function.__dict__` 来访问。 与类实例的 :attr:`~type.__dict__` "
857+
"属性不同,在函数中你实际上可以为 :attr:`~function.__dict__` 分配一个新的字典,尽管新值仅限于常规的 Python 字典;你 "
858+
"*不能* 狡猾地将其设为 :class:`!UserDict` 实例,或任何其他行为类似映射的随机对象。"
856859

857860
#: ../../whatsnew/2.1.rst:455
858861
msgid ":pep:`232` - Function Attributes"

whatsnew/2.2.po

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ msgid ""
1313
msgstr ""
1414
"Project-Id-Version: Python 3.12\n"
1515
"Report-Msgid-Bugs-To: \n"
16-
"POT-Creation-Date: 2024-10-04 14:53+0000\n"
16+
"POT-Creation-Date: 2024-10-11 14:48+0000\n"
1717
"PO-Revision-Date: 2024-05-11 00:34+0000\n"
1818
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
1919
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -373,6 +373,9 @@ msgid ""
373373
"functions. Class methods are passed the class of the object, but not the "
374374
"object itself. Static and class methods are defined like this::"
375375
msgstr ""
376+
"对于方法,:meth:`descriptor.__get__ <object.__get__>` "
377+
"返回一个可调用的临时对象,它将实例和要调用的方法包装在一起。 这也是为什么现在可以实现静态方法和类方法的原因;它们有只包装方法或者类的描述器。 "
378+
"作为对这些新方法类别的简要说明,静态方法不传递实例,因此类似于常规函数。 类方法将传递对象的类,但不是对象本身。 静态方法和类方法是这样定义的::"
376379

377380
#: ../../whatsnew/2.2.rst:199
378381
msgid ""

whatsnew/3.12.po

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2369,6 +2369,11 @@ msgid ""
23692369
"fork-with-alive-threads/33555>`_ for *why* we're now surfacing this "
23702370
"longstanding platform compatibility problem to developers."
23712371
msgstr ""
2372+
"在 POSIX 平台上,当 :func:`os.fork` 能检测到被多线程的进程调用时现在会引发 :exc:`DeprecationWarning`。"
2373+
" 当在 POSIX 平台上这样做时总是会存在基础性的不兼容。 即使这样的代码 *appeared* 看起来有效。 "
2374+
"我们添加该警告是为了引起注意,因为这种做法遇到的问题越来越频繁。 请参阅 :func:`os.fork` 文档了解详情并查看 `这个关于 fork "
2375+
"与线程不兼容问题的讨论 <https://discuss.python.org/t/concerns-regarding-deprecation-of-"
2376+
"fork-with-alive-threads/33555>`_ 以了解 *为什么* 现在我们要向开发者揭示这一长期存在的平台兼容性问题。"
23722377

23732378
#: ../../whatsnew/3.12.rst:1271
23742379
msgid ""

whatsnew/3.7.po

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.12\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2024-09-27 14:50+0000\n"
14+
"POT-Creation-Date: 2024-10-11 14:48+0000\n"
1515
"PO-Revision-Date: 2024-05-11 00:34+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"
@@ -599,6 +599,8 @@ msgid ""
599599
"Linux and Windows the resolution of :func:`time.time_ns` is approximately 3 "
600600
"times better than that of :func:`time.time`."
601601
msgstr ""
602+
":pep:`测量结果 <0564#annex-clocks-resolution-in-python>` 显示在 Linux 和 Windows 上 "
603+
":func:`time.time_ns` 的精度相比 :func:`time.time` 大约高出 3 倍。"
602604

603605
#: ../../whatsnew/3.7.rst:362
604606
msgid ":pep:`564` -- Add new time functions with nanosecond resolution"

whatsnew/3.9.po

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.12\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2024-09-27 14:50+0000\n"
14+
"POT-Creation-Date: 2024-10-11 14:48+0000\n"
1515
"PO-Revision-Date: 2024-05-11 00:34+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"
@@ -1225,6 +1225,8 @@ msgid ""
12251225
"etc, but for any object that has its own :attr:`~definition.__doc__` "
12261226
"attribute. (Contributed by Serhiy Storchaka in :issue:`40257`.)"
12271227
msgstr ""
1228+
"文档字符串的显示现在不仅针对类、函数、方法等,也针对任何具有自己的 :attr:`~definition.__doc__` 属性的对象。 (由 "
1229+
"Serhiy Storchaka 在 :issue:`40257` 中贡献。)"
12281230

12291231
#: ../../whatsnew/3.9.rst:645
12301232
msgid "random"

0 commit comments

Comments
 (0)