88# ppcfish <[email protected] >, 2019991010# Freesand Leo <[email protected] >, 202111- # Jiuh-star <[email protected] >, 20211211# Dai Xu <[email protected] >, 202112+ # Jiuh-star <[email protected] >, 20211313#
1414#, fuzzy
1515msgid ""
@@ -18,7 +18,7 @@ msgstr ""
1818"Report-Msgid-Bugs-To : \n "
1919"POT-Creation-Date : 2021-03-02 05:36+0000\n "
2020"PO-Revision-Date : 2017-02-16 23:34+0000\n "
21- "Last-Translator : Dai Xu <daixu61@hotmail .com>, 2021\n "
21+ "Last-Translator : Jiuh-star <jiuh.star@gmail .com>, 2021\n "
2222"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
2323"MIME-Version : 1.0\n "
2424"Content-Type : text/plain; charset=UTF-8\n "
@@ -904,21 +904,21 @@ msgstr ""
904904msgid ""
905905":meth:`<protocol>_request` --- signal that the handler knows how to pre-"
906906"process *protocol* requests."
907- msgstr ":meth:`<protocol>_request` — 句柄知道如何预处理 *protocol* 请求的信号 。"
907+ msgstr ":meth:`<protocol>_request` — 表明该 handler 知道如何预处理协议为 *protocol* 的请求 。"
908908
909909#: ../../library/urllib.request.rst:632
910910msgid "See |protocol_request|_ for more information."
911- msgstr "查看 |protocol_request|_ 以获取更多信息 。"
911+ msgstr "更多信息请参阅 |protocol_request|_ 。"
912912
913913#: ../../library/urllib.request.rst:634
914914msgid ""
915915":meth:`<protocol>_response` --- signal that the handler knows how to post-"
916916"process *protocol* responses."
917- msgstr ":meth:`<protocol>_response` — 句柄知道如何后处理 *protocol* 响应的信号 。"
917+ msgstr ":meth:`<protocol>_response` — 表明该 handler 知道如何后处理协议为 *protocol* 的响应 。"
918918
919919#: ../../library/urllib.request.rst:637
920920msgid "See |protocol_response|_ for more information."
921- msgstr "查看 |protocol_response|_ 以获取更多信息 。"
921+ msgstr "更多信息请参阅 |protocol_response|_ 。"
922922
923923#: ../../library/urllib.request.rst:646
924924msgid ""
@@ -931,6 +931,10 @@ msgid ""
931931"not specified, the global default timeout setting will be used). The timeout"
932932" feature actually works only for HTTP, HTTPS and FTP connections)."
933933msgstr ""
934+ "打开给定的 *url*(可以是 request 对象或字符串),可以传入 *data* 。参数、返回值和引发的异常均与 :func:`urlopen` "
935+ "相同,其实只是去调用了当前安装的全局 :class:`OpenerDirector` 中的 :meth:`open` 方法。可选的 *timeout* "
936+ "参数指定了阻塞操作(如尝试连接)的超时值(以秒为单位)(若未指定则采用全局默认的超时设置)。实际上,超时特性仅适用于 HTTP、HTTPS 和 FTP "
937+ "连接。 "
934938
935939#: ../../library/urllib.request.rst:658
936940msgid ""
@@ -940,28 +944,30 @@ msgid ""
940944"response code to determine the specific error handler; refer to the "
941945":meth:`http_error_\\ <type\\ >` methods of the handler classes."
942946msgstr ""
947+ "处理给定协议的错误。将用给定的参数(协议相关)调用已注册的给定协议的错误处理程序。HTTP 协议是特殊情况,采用 HTTP "
948+ "响应码来确定具体的错误处理程序;请参考 handler 类的 :meth:`http_error_\\ <type\\ >` 方法。"
943949
944950#: ../../library/urllib.request.rst:664
945951msgid ""
946952"Return values and exceptions raised are the same as those of "
947953":func:`urlopen`."
948- msgstr ""
954+ msgstr "返回值和异常均与 :func:`urlopen` 相同。 "
949955
950956#: ../../library/urllib.request.rst:666
951957msgid "OpenerDirector objects open URLs in three stages:"
952- msgstr ""
958+ msgstr "OpenerDirector 对象分 3 个阶段打开 URL: "
953959
954960#: ../../library/urllib.request.rst:668
955961msgid ""
956962"The order in which these methods are called within each stage is determined "
957963"by sorting the handler instances."
958- msgstr ""
964+ msgstr "每个阶段中调用这些方法的次序取决于 handler 实例的顺序。 "
959965
960966#: ../../library/urllib.request.rst:671
961967msgid ""
962968"Every handler with a method named like :meth:`<protocol>_request` has that "
963969"method called to pre-process the request."
964- msgstr ""
970+ msgstr "每个具有 :meth:`_request` 这类方法的 handler 都会调用本方法对请求进行预处理。 "
965971
966972#: ../../library/urllib.request.rst:674
967973msgid ""
@@ -970,6 +976,8 @@ msgid ""
970976":const:`None` value (ie. a response), or raises an exception (usually "
971977":exc:`~urllib.error.URLError`). Exceptions are allowed to propagate."
972978msgstr ""
979+ "调用具有 :meth:`_open` 这类方法的 handler 来处理请求。当 handler 返回非\\ :const:`None` "
980+ "值(即响应)或引发异常(通常是 :exc:`~urllib.error.URLError`)时,本阶段结束。本阶段能够传播异常。"
973981
974982#: ../../library/urllib.request.rst:679
975983msgid ""
@@ -979,19 +987,24 @@ msgid ""
979987"all such methods return :const:`None`, the algorithm is repeated for methods"
980988" named :meth:`unknown_open`."
981989msgstr ""
990+ "事实上,以上算法首先会尝试名为 :meth:`default_open` 的。如果这些方法全都返回 :const:`None`,则会对名为 "
991+ ":meth:`_open` 的这类方法重复过程。如果又都返回 :const:`None`,则再对名为 :meth:`unknown_open` "
992+ "的方法重复过程。"
982993
983994#: ../../library/urllib.request.rst:685
984995msgid ""
985996"Note that the implementation of these methods may involve calls of the "
986997"parent :class:`OpenerDirector` instance's :meth:`~OpenerDirector.open` and "
987998":meth:`~OpenerDirector.error` methods."
988999msgstr ""
1000+ "请注意,这些方法的代码可能会调用 :class:`OpenerDirector` 父实例的 :meth:`~OpenerDirector.open` 和"
1001+ " :meth:`~OpenerDirector.error` 方法。"
9891002
9901003#: ../../library/urllib.request.rst:689
9911004msgid ""
9921005"Every handler with a method named like :meth:`<protocol>_response` has that "
9931006"method called to post-process the response."
994- msgstr ""
1007+ msgstr "每个具有 :meth:`_response` 这类方法的 handler 都会调用这些方法,以对响应进行后处理。 "
9951008
9961009#: ../../library/urllib.request.rst:696
9971010msgid "BaseHandler Objects"
@@ -1002,34 +1015,36 @@ msgid ""
10021015":class:`BaseHandler` objects provide a couple of methods that are directly "
10031016"useful, and others that are meant to be used by derived classes. These are "
10041017"intended for direct use:"
1005- msgstr ""
1018+ msgstr ":class:`BaseHandler` 对象提供了一些直接可用的方法,以及其他一些可供派生类使用的方法。以下是可供直接使用的方法: "
10061019
10071020#: ../../library/urllib.request.rst:705
10081021msgid "Add a director as parent."
1009- msgstr ""
1022+ msgstr "将 director 加为父 OpenerDirector。 "
10101023
10111024#: ../../library/urllib.request.rst:710
10121025msgid "Remove any parents."
1013- msgstr ""
1026+ msgstr "移除所有父 OpenerDirector。 "
10141027
10151028#: ../../library/urllib.request.rst:712
10161029msgid ""
10171030"The following attribute and methods should only be used by classes derived "
10181031"from :class:`BaseHandler`."
1019- msgstr ""
1032+ msgstr "以下属性和方法仅供 :class:`BaseHandler` 的子类使用: "
10201033
10211034#: ../../library/urllib.request.rst:717
10221035msgid ""
10231036"The convention has been adopted that subclasses defining "
10241037":meth:`<protocol>_request` or :meth:`<protocol>_response` methods are named "
10251038":class:`\\ *Processor`; all others are named :class:`\\ *Handler`."
10261039msgstr ""
1040+ "以下约定已被采纳:定义 :meth:`<protocol>_request` 或 :meth:`<protocol>_response` "
1041+ "方法的子类应命名为 :class:`\\ *Processor`;所有其他子类都应命名为 :class:`\\ *Handler` 。 "
10271042
10281043#: ../../library/urllib.request.rst:724
10291044msgid ""
10301045"A valid :class:`OpenerDirector`, which can be used to open using a different"
10311046" protocol, or handle errors."
1032- msgstr ""
1047+ msgstr "一个可用的 :class:`OpenerDirector`,可用于以其他协议打开 URI,或处理错误。 "
10331048
10341049#: ../../library/urllib.request.rst:730
10351050msgid ""
0 commit comments