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

Skip to content

Commit 13dd5fb

Browse files
[po] auto sync
1 parent c3ab32a commit 13dd5fb

1 file changed

Lines changed: 42 additions & 21 deletions

File tree

library/asyncio-protocol.po

Lines changed: 42 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,8 @@ msgid ""
549549
"dependent target address). If *addr* is :const:`None`, the data is sent to "
550550
"the target address given on transport creation."
551551
msgstr ""
552+
"将 *data* 字节串发送到 *addr* (基于传输的目标地址) 所给定的远端对等方。 如果 *addr* 为 "
553+
":const:`None`,则将数据发送到传输创建时给定的目标地址。"
552554

553555
#: ../../library/asyncio-protocol.rst:366
554556
msgid ""
@@ -557,49 +559,58 @@ msgid ""
557559
"protocol's :meth:`protocol.connection_lost() <BaseProtocol.connection_lost>`"
558560
" method will eventually be called with :const:`None` as its argument."
559561
msgstr ""
562+
"立即关闭传输,不会等待已提交的操作执行完毕。 已缓存的数据将会丢失。 不会接收更多的数据。 协议的 "
563+
":meth:`protocol.connection_lost() <BaseProtocol.connection_lost>` 方法最终将附带 "
564+
":const:`None` 作为参数被调用。"
560565

561566
#: ../../library/asyncio-protocol.rst:376
562567
msgid "Subprocess Transports"
563568
msgstr "子进程传输"
564569

565570
#: ../../library/asyncio-protocol.rst:380
566571
msgid "Return the subprocess process id as an integer."
567-
msgstr ""
572+
msgstr "将子进程的进程 ID 以整数形式返回。"
568573

569574
#: ../../library/asyncio-protocol.rst:384
570575
msgid ""
571576
"Return the transport for the communication pipe corresponding to the integer"
572577
" file descriptor *fd*:"
573-
msgstr ""
578+
msgstr "返回对应于整数文件描述符 *fd* 的通信管道的传输:"
574579

575580
#: ../../library/asyncio-protocol.rst:387
576581
msgid ""
577582
"``0``: readable streaming transport of the standard input (*stdin*), or "
578583
":const:`None` if the subprocess was not created with ``stdin=PIPE``"
579584
msgstr ""
585+
"``0``: 标准输入 (*stdin*) 的可读流式传输,如果子进程创建时未设置 ``stdin=PIPE`` 则为 :const:`None`。"
580586

581587
#: ../../library/asyncio-protocol.rst:389
582588
msgid ""
583589
"``1``: writable streaming transport of the standard output (*stdout*), or "
584590
":const:`None` if the subprocess was not created with ``stdout=PIPE``"
585591
msgstr ""
592+
"``1``: 标准输出writable streaming transport of the standard output (*stdout*) "
593+
"的可写流式传输,如果子进程创建时未设置 ``stdout=PIPE`` 则为 :const:`None`。"
586594

587595
#: ../../library/asyncio-protocol.rst:391
588596
msgid ""
589597
"``2``: writable streaming transport of the standard error (*stderr*), or "
590598
":const:`None` if the subprocess was not created with ``stderr=PIPE``"
591599
msgstr ""
600+
"``2``: 标准错误 (*stderr*) 的可写流式传输,如果子进程创建时未设置 ``stderr=PIPE`` 则为 :const:`None`"
592601

593602
#: ../../library/asyncio-protocol.rst:393
594603
msgid "other *fd*: :const:`None`"
595-
msgstr ""
604+
msgstr "其他 *fd*: :const:`None`"
596605

597606
#: ../../library/asyncio-protocol.rst:397
598607
msgid ""
599608
"Return the subprocess return code as an integer or :const:`None` if it "
600609
"hasn't returned, which is similar to the :attr:`subprocess.Popen.returncode`"
601610
" attribute."
602611
msgstr ""
612+
"返回整数形式的进程返回码,或者如果还未返回则为 :const:`None`,这类似于 "
613+
":attr:`subprocess.Popen.returncode` 属性。"
603614

604615
#: ../../library/asyncio-protocol.rst:403
605616
msgid "Kill the subprocess."
@@ -610,16 +621,17 @@ msgid ""
610621
"On POSIX systems, the function sends SIGKILL to the subprocess. On Windows, "
611622
"this method is an alias for :meth:`terminate`."
612623
msgstr ""
624+
"在 POSIX 系统中,函数会发送 SIGKILL 到子进程。 在 Windows 中,此方法是 :meth:`terminate` 的别名。"
613625

614626
#: ../../library/asyncio-protocol.rst:408
615627
msgid "See also :meth:`subprocess.Popen.kill`."
616-
msgstr ""
628+
msgstr "另请参见 :meth:`subprocess.Popen.kill`。"
617629

618630
#: ../../library/asyncio-protocol.rst:412
619631
msgid ""
620632
"Send the *signal* number to the subprocess, as in "
621633
":meth:`subprocess.Popen.send_signal`."
622-
msgstr ""
634+
msgstr "发送 *signal* 编号到子进程,与 :meth:`subprocess.Popen.send_signal` 一样。"
623635

624636
#: ../../library/asyncio-protocol.rst:417
625637
msgid "Stop the subprocess."
@@ -631,20 +643,22 @@ msgid ""
631643
"the Windows API function TerminateProcess() is called to stop the "
632644
"subprocess."
633645
msgstr ""
646+
"在 POSIX 系统中,此方法会发送 SIGTERM 到子进程。 在 Windows 中,则会调用 Windows API 函数 "
647+
"TerminateProcess() 来停止子进程。"
634648

635649
#: ../../library/asyncio-protocol.rst:423
636650
msgid "See also :meth:`subprocess.Popen.terminate`."
637-
msgstr ""
651+
msgstr "另请参见 :meth:`subprocess.Popen.terminate`。"
638652

639653
#: ../../library/asyncio-protocol.rst:427
640654
msgid "Kill the subprocess by calling the :meth:`kill` method."
641-
msgstr ""
655+
msgstr "通过调用 :meth:`kill` 方法来杀死子进程。"
642656

643657
#: ../../library/asyncio-protocol.rst:429
644658
msgid ""
645659
"If the subprocess hasn't returned yet, and close transports of *stdin*, "
646660
"*stdout*, and *stderr* pipes."
647-
msgstr ""
661+
msgstr "如果子进程尚未返回,并关闭 *stdin*, *stdout* 和 *stderr* 管道的传输。"
648662

649663
#: ../../library/asyncio-protocol.rst:436
650664
msgid "Protocols"
@@ -660,6 +674,8 @@ msgid ""
660674
"implement network protocols. Those classes are meant to be used together "
661675
"with :ref:`transports <asyncio-transport>`."
662676
msgstr ""
677+
"asyncio 提供了一组抽象基类,它们应当被用于实现网络协议。 这些类被设计为与 :ref:`传输 <asyncio-transport>` "
678+
"配合使用。"
663679

664680
#: ../../library/asyncio-protocol.rst:446
665681
msgid ""
@@ -668,44 +684,46 @@ msgid ""
668684
"certain events, for example when some data is received. A base protocol "
669685
"method should be called by the corresponding transport."
670686
msgstr ""
687+
"抽象基础协议类的子类可以实现其中的部分或全部方法。 所有这些方法都是回调:它们由传输或特定事件调用,例如当数据被接收的时候。 "
688+
"基础协议方法应当由相应的传输来调用。"
671689

672690
#: ../../library/asyncio-protocol.rst:453
673691
msgid "Base Protocols"
674692
msgstr "基础协议"
675693

676694
#: ../../library/asyncio-protocol.rst:457
677695
msgid "Base protocol with methods that all protocols share."
678-
msgstr ""
696+
msgstr "带有所有协议的共享方法的基础协议。"
679697

680698
#: ../../library/asyncio-protocol.rst:461
681699
msgid ""
682700
"The base class for implementing streaming protocols (TCP, Unix sockets, "
683701
"etc)."
684-
msgstr ""
702+
msgstr "用于实现流式协议(TCP, Unix 套接字等等)的基类。"
685703

686704
#: ../../library/asyncio-protocol.rst:466
687705
msgid ""
688706
"A base class for implementing streaming protocols with manual control of the"
689707
" receive buffer."
690-
msgstr ""
708+
msgstr "用于实现可对接收缓冲区进行手动控制的流式协议的基类。"
691709

692710
#: ../../library/asyncio-protocol.rst:471
693711
msgid "The base class for implementing datagram (UDP) protocols."
694-
msgstr ""
712+
msgstr "用于实现数据报(UDP)协议的基类。"
695713

696714
#: ../../library/asyncio-protocol.rst:475
697715
msgid ""
698716
"The base class for implementing protocols communicating with child processes"
699717
" (unidirectional pipes)."
700-
msgstr ""
718+
msgstr "用于实现与子进程通信(单向管道)的协议的基类。"
701719

702720
#: ../../library/asyncio-protocol.rst:480
703721
msgid "Base Protocol"
704722
msgstr "基础协议"
705723

706724
#: ../../library/asyncio-protocol.rst:482
707725
msgid "All asyncio protocols can implement Base Protocol callbacks."
708-
msgstr ""
726+
msgstr "所有 asyncio 协议均可实现基础协议回调。"
709727

710728
#: ../../library/asyncio-protocol.rst:485
711729
msgid "Connection Callbacks"
@@ -716,7 +734,7 @@ msgid ""
716734
"Connection callbacks are called on all protocols, exactly once per a "
717735
"successful connection. All other protocol callbacks can only be called "
718736
"between those two methods."
719-
msgstr ""
737+
msgstr "连接回调会在所有协议上被调用,每个成功的连接将恰好调用一次。 所有其他协议回调只能在以下两个方法之间被调用。"
720738

721739
#: ../../library/asyncio-protocol.rst:492
722740
msgid "Called when a connection is made."
@@ -726,7 +744,7 @@ msgstr "链接建立时被调用。"
726744
msgid ""
727745
"The *transport* argument is the transport representing the connection. The "
728746
"protocol is responsible for storing the reference to its transport."
729-
msgstr ""
747+
msgstr "*transport* 参数是代表连接的传输。 此协议负责将引用保存至对应的传输。"
730748

731749
#: ../../library/asyncio-protocol.rst:500
732750
msgid "Called when the connection is lost or closed."
@@ -737,7 +755,7 @@ msgid ""
737755
"The argument is either an exception object or :const:`None`. The latter "
738756
"means a regular EOF is received, or the connection was aborted or closed by "
739757
"this side of the connection."
740-
msgstr ""
758+
msgstr "方法的参数是一个异常对象或为 :const:`None`。 后者意味着收到了常规的 EOF,或者连接被连接的一端取消或关闭。"
741759

742760
#: ../../library/asyncio-protocol.rst:508
743761
msgid "Flow Control Callbacks"
@@ -747,35 +765,38 @@ msgstr "流控制回调函数"
747765
msgid ""
748766
"Flow control callbacks can be called by transports to pause or resume "
749767
"writing performed by the protocol."
750-
msgstr ""
768+
msgstr "流程控制回调可由传输来调用以暂停或恢复协议所执行的写入操作。"
751769

752770
#: ../../library/asyncio-protocol.rst:512
753771
msgid ""
754772
"See the documentation of the :meth:`~WriteTransport.set_write_buffer_limits`"
755773
" method for more details."
756-
msgstr ""
774+
msgstr "请查看 :meth:`~WriteTransport.set_write_buffer_limits` 方法的文档了解详情。"
757775

758776
#: ../../library/asyncio-protocol.rst:517
759777
msgid "Called when the transport's buffer goes over the high watermark."
760-
msgstr ""
778+
msgstr "当传输的缓冲区超出高水位时将被调用。"
761779

762780
#: ../../library/asyncio-protocol.rst:521
763781
msgid "Called when the transport's buffer drains below the low watermark."
764-
msgstr ""
782+
msgstr "当传输的缓冲区降到低水位以下时将被调用。"
765783

766784
#: ../../library/asyncio-protocol.rst:523
767785
msgid ""
768786
"If the buffer size equals the high watermark, "
769787
":meth:`~BaseProtocol.pause_writing` is not called: the buffer size must go "
770788
"strictly over."
771789
msgstr ""
790+
"如果缓冲区大小等于高水位值,则 :meth:`~BaseProtocol.pause_writing` 不会被调用:缓冲区大小必须要高于该值。"
772791

773792
#: ../../library/asyncio-protocol.rst:527
774793
msgid ""
775794
"Conversely, :meth:`~BaseProtocol.resume_writing` is called when the buffer "
776795
"size is equal or lower than the low watermark. These end conditions are "
777796
"important to ensure that things go as expected when either mark is zero."
778797
msgstr ""
798+
"相反地,:meth:`~BaseProtocol.resume_writing` 会在缓冲区大小等于或小于低水位值时被调用。 "
799+
"这些结束条件对于当两个水位取零值时也能确保符合预期的行为是很重要的。"
779800

780801
#: ../../library/asyncio-protocol.rst:534
781802
msgid "Streaming Protocols"

0 commit comments

Comments
 (0)