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

Skip to content

Commit c3ab32a

Browse files
[po] auto sync
1 parent fd44f53 commit c3ab32a

2 files changed

Lines changed: 24 additions & 7 deletions

File tree

library/asyncio-eventloop.po

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2143,6 +2143,9 @@ msgid ""
21432143
"written this way; consider using the high-level functions like "
21442144
":func:`asyncio.run`."
21452145
msgstr ""
2146+
"请注意本节中的所有示例都 **有意地** 演示了如何使用低层级的事件循环 API,例如 :meth:`loop.run_forever` 和 "
2147+
":meth:`loop.call_soon`。 现代的 asyncio 应用很少需要以这样的方式编写;请考虑使用高层级的函数例如 "
2148+
":func:`asyncio.run`。"
21462149

21472150
#: ../../library/asyncio-eventloop.rst:1545
21482151
msgid "Hello World with call_soon()"
@@ -2153,12 +2156,13 @@ msgid ""
21532156
"An example using the :meth:`loop.call_soon` method to schedule a callback. "
21542157
"The callback displays ``\"Hello World\"`` and then stops the event loop::"
21552158
msgstr ""
2159+
"一个使用 :meth:`loop.call_soon` 方法来安排回调的示例。 回调会显示 ``\"Hello World\"`` 然后停止事件循环::"
21562160

21572161
#: ../../library/asyncio-eventloop.rst:1571
21582162
msgid ""
21592163
"A similar :ref:`Hello World <coroutine>` example created with a coroutine "
21602164
"and the :func:`run` function."
2161-
msgstr ""
2165+
msgstr "一个类似的 :ref:`Hello World <coroutine>` 示例,使用协程和 :func:`run` 函数创建。"
21622166

21632167
#: ../../library/asyncio-eventloop.rst:1578
21642168
msgid "Display the current date with call_later()"
@@ -2170,12 +2174,14 @@ msgid ""
21702174
"callback uses the :meth:`loop.call_later` method to reschedule itself after "
21712175
"5 seconds, and then stops the event loop::"
21722176
msgstr ""
2177+
"一个每秒刷新显示当前日期的示例。 回调使用 :meth:`loop.call_later` 方法在 5 秒后将自身重新加入计划日程,然后停止事件循环::"
21732178

21742179
#: ../../library/asyncio-eventloop.rst:1608
21752180
msgid ""
21762181
"A similar :ref:`current date <asyncio_example_sleep>` example created with a"
21772182
" coroutine and the :func:`run` function."
21782183
msgstr ""
2184+
"一个类似的 :ref:`current date <asyncio_example_sleep>` 示例,使用协程和 :func:`run` 函数创建。"
21792185

21802186
#: ../../library/asyncio-eventloop.rst:1615
21812187
msgid "Watch a file descriptor for read events"
@@ -2192,23 +2198,29 @@ msgid ""
21922198
"A similar :ref:`example <asyncio_example_create_connection>` using "
21932199
"transports, protocols, and the :meth:`loop.create_connection` method."
21942200
msgstr ""
2201+
"一个类似的 :ref:`示例 <asyncio_example_create_connection>`,使用传输、协议和 "
2202+
":meth:`loop.create_connection` 方法创建。"
21952203

21962204
#: ../../library/asyncio-eventloop.rst:1659
21972205
msgid ""
21982206
"Another similar :ref:`example <asyncio_example_create_connection-streams>` "
21992207
"using the high-level :func:`asyncio.open_connection` function and streams."
22002208
msgstr ""
2209+
"另一个类似的 :ref:`示例 <asyncio_example_create_connection-streams>`,使用了高层级的 "
2210+
":func:`asyncio.open_connection` 函数和流。"
22012211

22022212
#: ../../library/asyncio-eventloop.rst:1667
22032213
msgid "Set signal handlers for SIGINT and SIGTERM"
22042214
msgstr "为SIGINT和SIGTERM设置信号处理器"
22052215

22062216
#: ../../library/asyncio-eventloop.rst:1669
22072217
msgid "(This ``signals`` example only works on Unix.)"
2208-
msgstr ""
2218+
msgstr "(这个 ``signals`` 示例只适用于 Unix。)"
22092219

22102220
#: ../../library/asyncio-eventloop.rst:1671
22112221
msgid ""
22122222
"Register handlers for signals :py:data:`SIGINT` and :py:data:`SIGTERM` using"
22132223
" the :meth:`loop.add_signal_handler` method::"
22142224
msgstr ""
2225+
"使用 :meth:`loop.add_signal_handler` 方法为信号 :py:data:`SIGINT` 和 "
2226+
":py:data:`SIGTERM` 注册处理程序::"

library/asyncio-protocol.po

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -499,40 +499,45 @@ msgid ""
499499
"empty. Use of zero for either limit is generally sub-optimal as it reduces "
500500
"opportunities for doing I/O and computation concurrently."
501501
msgstr ""
502+
"默认值是实现专属的。 如果只给出了高水位值,则低水位值默认为一个小于或等于高水位值的实现传属值。 将 *high* 设为零会强制将 *low* "
503+
"也设为零,并使得 :meth:`~BaseProtocol.pause_writing` 在缓冲区变为非空的任何时刻被调用。 将 *low* "
504+
"设为零会使得 :meth:`~BaseProtocol.resume_writing` 在缓冲区为空时只被调用一次。 "
505+
"对于上下限都使用零值通常是不够优化的,因为它减少了并发执行 I/O 和计算的机会。"
502506

503507
#: ../../library/asyncio-protocol.rst:325
504508
msgid "Use :meth:`~WriteTransport.get_write_buffer_limits` to get the limits."
505-
msgstr ""
509+
msgstr "可使用 :meth:`~WriteTransport.get_write_buffer_limits` 来获取上下限值。"
506510

507511
#: ../../library/asyncio-protocol.rst:330
508512
msgid "Write some *data* bytes to the transport."
509-
msgstr ""
513+
msgstr "将一些 *data* 字节串写入传输。"
510514

511515
#: ../../library/asyncio-protocol.rst:332
512516
#: ../../library/asyncio-protocol.rst:361
513517
msgid ""
514518
"This method does not block; it buffers the data and arranges for it to be "
515519
"sent out asynchronously."
516-
msgstr ""
520+
msgstr "此方法不会阻塞;它会缓冲数据并安排其被异步地发出。"
517521

518522
#: ../../library/asyncio-protocol.rst:337
519523
msgid ""
520524
"Write a list (or any iterable) of data bytes to the transport. This is "
521525
"functionally equivalent to calling :meth:`write` on each element yielded by "
522526
"the iterable, but may be implemented more efficiently."
523527
msgstr ""
528+
"将数据字节串的列表(或任意可迭代对象)写入传输。 这在功能上等价于在可迭代对象产生的每个元素上调用 :meth:`write`,但其实现可能更为高效。"
524529

525530
#: ../../library/asyncio-protocol.rst:344
526531
msgid ""
527532
"Close the write end of the transport after flushing all buffered data. Data "
528533
"may still be received."
529-
msgstr ""
534+
msgstr "在刷新所有已缓冲数据之后关闭传输的写入端。 数据仍可以被接收。"
530535

531536
#: ../../library/asyncio-protocol.rst:347
532537
msgid ""
533538
"This method can raise :exc:`NotImplementedError` if the transport (e.g. SSL)"
534539
" doesn't support half-closed connections."
535-
msgstr ""
540+
msgstr "如果传输(例如 SSL)不支持半关闭的连接,此方法会引发 :exc:`NotImplementedError`。"
536541

537542
#: ../../library/asyncio-protocol.rst:352
538543
msgid "Datagram Transports"

0 commit comments

Comments
 (0)