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

Skip to content

Commit 6f48fe8

Browse files
[po] auto sync
1 parent 0ec156a commit 6f48fe8

2 files changed

Lines changed: 36 additions & 3 deletions

File tree

howto/urllib2.po

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ msgstr ""
561561
msgid ""
562562
"The top-level URL is the first URL that requires authentication. URLs "
563563
"\"deeper\" than the URL you pass to .add_password() will also match. ::"
564-
msgstr ""
564+
msgstr "首先需要身份认证的是顶级 URL。比传给 .add_password() 的 URL 级别“更深”的 URL 也会得以匹配:"
565565

566566
#: ../../howto/urllib2.rst:515
567567
msgid ""
@@ -610,6 +610,8 @@ msgid ""
610610
"``HTTP_PROXY`` will be ignored if a variable ``REQUEST_METHOD`` is set; see "
611611
"the documentation on :func:`~urllib.request.getproxies`."
612612
msgstr ""
613+
"如果设置了 ``REQUEST_METHOD`` 变量,则会忽略 ``HTTP_PROXY`` ;参阅 "
614+
":func:`~urllib.request.getproxies` 文档。"
613615

614616
#: ../../howto/urllib2.rst:558
615617
msgid "Sockets and Layers"

library/urllib.request.po

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,10 +496,13 @@ msgid ""
496496
"and in a Mac OS X environment proxy information is retrieved from the OS X "
497497
"System Configuration Framework."
498498
msgstr ""
499+
"让请求转去代理服务。若给出了 *proxies*,则其必须是一个将协议名称映射为代理 URL 的字典对象。默认是从环境变量 "
500+
"``<protocol>_proxy`` 中读取代理服务的列表。如果没有设置代理环境变量,则 Windows 会从注册表的 Internet "
501+
"设置部分获取代理设置,而 Mac OS X 则会从 OS X 系统配置框架中读取代理信息。"
499502

500503
#: ../../library/urllib.request.rst:305
501504
msgid "To disable autodetected proxy pass an empty dictionary."
502-
msgstr ""
505+
msgstr "若要禁用自动检测出来的代理,请传入空的字典对象。"
503506

504507
#: ../../library/urllib.request.rst:307
505508
msgid ""
@@ -508,23 +511,29 @@ msgid ""
508511
" list of hostname suffixes, optionally with ``:port`` appended, for example "
509512
"``cern.ch,ncsa.uiuc.edu,some.host:8080``."
510513
msgstr ""
514+
"环境变量 :envvar:`no_proxy` 可用于指定不必通过代理访问的主机;应为逗号分隔的主机名后缀列表,可加上 ``:port`` ,例如 "
515+
"``cern.ch,ncsa.uiuc.edu,some.host:8080`` 。 "
511516

512517
#: ../../library/urllib.request.rst:314
513518
msgid ""
514519
"``HTTP_PROXY`` will be ignored if a variable ``REQUEST_METHOD`` is set; see "
515520
"the documentation on :func:`~urllib.request.getproxies`."
516521
msgstr ""
522+
"如果设置了 ``REQUEST_METHOD`` 变量,则会忽略 ``HTTP_PROXY`` ;参阅 "
523+
":func:`~urllib.request.getproxies` 文档。"
517524

518525
#: ../../library/urllib.request.rst:320
519526
msgid "Keep a database of ``(realm, uri) -> (user, password)`` mappings."
520-
msgstr ""
527+
msgstr "维护 ``(realm, uri) -> (user, password)`` 映射数据库。"
521528

522529
#: ../../library/urllib.request.rst:325
523530
msgid ""
524531
"Keep a database of ``(realm, uri) -> (user, password)`` mappings. A realm "
525532
"of ``None`` is considered a catch-all realm, which is searched if no other "
526533
"realm fits."
527534
msgstr ""
535+
"维护 ``(realm, uri) -> (user, password)`` 映射数据库。realm 为 ``None`` "
536+
"视作全匹配,若没有其他合适的安全区域就会检索它。"
528537

529538
#: ../../library/urllib.request.rst:332
530539
msgid ""
@@ -533,6 +542,9 @@ msgid ""
533542
"BasicAuth handler to determine when to send authentication credentials "
534543
"immediately instead of waiting for a ``401`` response first."
535544
msgstr ""
545+
":class:`HTTPPasswordMgrWithDefaultRealm` 的一个变体,也带有 ``uri -> "
546+
"is_authenticated`` 映射数据库。可被 BasicAuth 处理函数用于确定立即发送身份认证凭据的时机,而不是先等待 ``401`` "
547+
"响应。"
536548

537549
#: ../../library/urllib.request.rst:342
538550
msgid ""
@@ -552,6 +564,14 @@ msgid ""
552564
"the URI, so that subsequent requests to the URI or any of its super-URIs "
553565
"will automatically include the authentication credentials."
554566
msgstr ""
567+
"这是一个帮助完成 HTTP 身份认证的混合类,对远程主机和代理都适用。参数 *password_mgr* 应与 "
568+
":class:`HTTPPasswordMgr` 兼容;关于必须支持哪些接口,请参阅 :ref:`http-password-mgr` 对象的章节。如果"
569+
" *password_mgr* 还提供 ``is_authenticated`` 和 ``update_authenticated`` 方法(请参阅 "
570+
":ref:`http-password-mgr-with-prior-auth` 对象),则 handler 将对给定 URI 用到 "
571+
"``is_authenticated`` 的结果,来确定是否随请求发送身份认证凭据。如果该 URI 的 ``is_authenticated`` 返回"
572+
" ``True``,则发送凭据。如果 ``is_authenticated`` 为 ``False`` ,则不发送凭据,然后若收到 ``401`` "
573+
"响应,则使用身份认证凭据重新发送请求。如果身份认证成功,则调用 ``update_authenticated`` 设置该 URI 的 "
574+
"``is_authenticated`` 为 ``True``,这样后续对该 URI 或其所有父 URI 的请求将自动包含该身份认证凭据。"
555575

556576
#: ../../library/urllib.request.rst:359
557577
msgid "Added ``is_authenticated`` support."
@@ -565,6 +585,9 @@ msgid ""
565585
"be supported. HTTPBasicAuthHandler will raise a :exc:`ValueError` when "
566586
"presented with a wrong Authentication scheme."
567587
msgstr ""
588+
"处理与远程主机的身份验证。 *password_mgr* 应与 :class:`HTTPPasswordMgr` 兼容;有关哪些接口是必须支持的,请参阅"
589+
" :ref:`http-password-mgr` 章节。如果给出错误的身份认证方式, HTTPBasicAuthHandler 将会触发 "
590+
":exc:`ValueError` 。"
568591

569592
#: ../../library/urllib.request.rst:374 ../../library/urllib.request.rst:408
570593
msgid ""
@@ -573,6 +596,8 @@ msgid ""
573596
" :ref:`http-password-mgr` for information on the interface that must be "
574597
"supported."
575598
msgstr ""
599+
"处理有代理服务时的身份验证。 *password_mgr* 应与 :class:`HTTPPasswordMgr` "
600+
"兼容;有关哪些接口是必须支持的,请参阅 :ref:`http-password-mgr` 章节。"
576601

577602
#: ../../library/urllib.request.rst:382
578603
msgid ""
@@ -582,6 +607,8 @@ msgid ""
582607
":`http-password-mgr` for information on the interface that must be "
583608
"supported."
584609
msgstr ""
610+
"这是一个帮助完成 HTTP 身份认证的混合类,对远程主机和代理都适用。参数 *password_mgr* 应与 "
611+
":class:`HTTPPasswordMgr` 兼容;关于必须支持哪些接口,请参阅 :ref:`http-password-mgr` 的章节。"
585612

586613
#: ../../library/urllib.request.rst:391
587614
msgid ""
@@ -595,6 +622,10 @@ msgid ""
595622
"raise a :exc:`ValueError` when presented with an authentication scheme other"
596623
" than Digest or Basic."
597624
msgstr ""
625+
"处理远程主机的身份验证。 *password_mgr* 应与 :class:`HTTPPasswordMgr` 兼容;有关哪些接口是必须支持的,请参阅 "
626+
":ref:`http-password-mgr` 章节。如果同时添加了 digest 身份认证 handler 和basic 身份认证 "
627+
"handler,则会首先尝试 digest 身份认证。如果 digest 身份认证再返回 40x 响应,会再发送到 basic 身份验证 handler"
628+
" 进行处理。如果给出 Digest 和 Basic 之外的身份认证方式, 本 handler 方法将会触发 :exc:`ValueError` 。"
598629

599630
#: ../../library/urllib.request.rst:401
600631
msgid "Raise :exc:`ValueError` on unsupported Authentication Scheme."

0 commit comments

Comments
 (0)