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

Skip to content

Commit 502390f

Browse files
[po] auto sync
1 parent 913aa85 commit 502390f

2 files changed

Lines changed: 28 additions & 7 deletions

File tree

library/socketserver.po

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,16 @@ msgid ""
5454
"This uses datagrams, which are discrete packets of information that may "
5555
"arrive out of order or be lost while in transit. The parameters are the "
5656
"same as for :class:`TCPServer`."
57-
msgstr ""
57+
msgstr "该类使用数据包,即一系列离散的信息分包,它们可能会无序地到达或在传输中丢失。 该类的形参与 :class:`TCPServer` 的相同。"
5858

5959
#: ../../library/socketserver.rst:36
6060
msgid ""
6161
"These more infrequently used classes are similar to the TCP and UDP classes,"
6262
" but use Unix domain sockets; they're not available on non-Unix platforms. "
6363
"The parameters are the same as for :class:`TCPServer`."
6464
msgstr ""
65+
"这两个更常用的类与 TCP 和 UDP 类相似,但使用 Unix 域套接字;它们在非 Unix 系统平台上不可用。 它们的形参与 "
66+
":class:`TCPServer` 的相同。"
6567

6668
#: ../../library/socketserver.rst:42
6769
msgid ""
@@ -73,6 +75,10 @@ msgid ""
7375
"each request; the :class:`ForkingMixIn` and :class:`ThreadingMixIn` mix-in "
7476
"classes can be used to support asynchronous behaviour."
7577
msgstr ""
78+
"这四个类会 :dfn:`同步地` 处理请求;每个请求必须完成才能开始下一个请求。 "
79+
"这就不适用于每个请求要耗费很长时间来完成的情况,或者因为它需要大量的计算,又或者它返回了大量的数据而客户端处理起来很缓慢。 "
80+
"解决方案是创建单独的进程或线程来处理每个请求;:class:`ForkingMixIn` 和 :class:`ThreadingMixIn` "
81+
"混合类可以被用于支持异步行为。"
7682

7783
#: ../../library/socketserver.rst:50
7884
msgid ""
@@ -87,6 +93,12 @@ msgid ""
8793
":meth:`~BaseServer.server_close` to close the socket (unless you used a "
8894
":keyword:`!with` statement)."
8995
msgstr ""
96+
"创建一个服务器需要分几个步骤进行。 首先,你必须通过子类化 :class:`BaseRequestHandler` 类并重载其 "
97+
":meth:`~BaseRequestHandler.handle` 方法来创建一个请求处理句柄类;这个方法将处理传入的请求。 "
98+
"其次,你必须实例化某个服务器类,将服务器地址和请求处理句柄类传给它。 建议在 :keyword:`with` 语句中使用该服务器。 "
99+
"然后再调用服务器对象的 :meth:`~BaseServer.handle_request` 或 "
100+
":meth:`~BaseServer.serve_forever` 方法来处理一个或多个请求。 最后,调用 "
101+
":meth:`~BaseServer.server_close` 来关闭套接字(除非你使用了 :keyword:`!with` 语句)。"
90102

91103
#: ../../library/socketserver.rst:62
92104
msgid ""

library/zipapp.po

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -383,30 +383,32 @@ msgid ""
383383
"this is to bundle all of the application's dependencies into the archive, "
384384
"along with the application code."
385385
msgstr ""
386+
"利用 :mod:`zipapp` 模块可以创建独立运行的 Python 程序,以便向最终用户发布,仅需在系统中装有合适版本的 Python "
387+
"即可运行。操作的关键就是把应用程序代码和所有依赖项一起放入打包文件中。"
386388

387389
#: ../../library/zipapp.rst:267
388390
msgid "The steps to create a standalone archive are as follows:"
389-
msgstr ""
391+
msgstr "创建独立运行打包文件的步骤如下:"
390392

391393
#: ../../library/zipapp.rst:269
392394
msgid ""
393395
"Create your application in a directory as normal, so you have a ``myapp`` "
394396
"directory containing a ``__main__.py`` file, and any supporting application "
395397
"code."
396-
msgstr ""
398+
msgstr "照常在某个目录中创建应用程序,于是会有一个 ``myapp`` 目录,里面有个``__main__.py`` 文件,以及所有支持性代码。"
397399

398400
#: ../../library/zipapp.rst:273
399401
msgid ""
400402
"Install all of your application's dependencies into the ``myapp`` directory,"
401403
" using pip:"
402-
msgstr ""
404+
msgstr "用 pip 将应用程序的所有依赖项装入 ``myapp`` 目录。"
403405

404406
#: ../../library/zipapp.rst:280
405407
msgid ""
406408
"(this assumes you have your project requirements in a ``requirements.txt`` "
407409
"file - if not, you can just list the dependencies manually on the pip "
408410
"command line)."
409-
msgstr ""
411+
msgstr "(这里假定在 ``requirements.txt`` 文件中列出了项目所需的依赖项,也可以在 pip 命令行中列出依赖项)。"
410412

411413
#: ../../library/zipapp.rst:284
412414
msgid ""
@@ -415,17 +417,21 @@ msgid ""
415417
" as you won't be making any further use of pip they aren't required - "
416418
"although it won't do any harm if you leave them."
417419
msgstr ""
420+
"pip 在 ``myapp`` 中创建的 ``.dist-info`` 目录,是可以删除的。这些目录保存了 pip "
421+
"用于管理包的元数据,由于接下来不会再用到 pip,所以不是必须存在,当然留下来也不会有什么坏处。"
418422

419423
#: ../../library/zipapp.rst:289
420424
msgid "Package the application using:"
421-
msgstr ""
425+
msgstr "用以下命令打包:"
422426

423427
#: ../../library/zipapp.rst:295
424428
msgid ""
425429
"This will produce a standalone executable, which can be run on any machine "
426430
"with the appropriate interpreter available. See :ref:`zipapp-specifying-the-"
427431
"interpreter` for details. It can be shipped to users as a single file."
428432
msgstr ""
433+
"这会生成一个独立的可执行文件,可在任何装有合适解释器的机器上运行。详情参见 :ref:`zipapp-specifying-the-"
434+
"interpreter`。可以单个文件的形式分发给用户。"
429435

430436
#: ../../library/zipapp.rst:299
431437
msgid ""
@@ -435,10 +441,13 @@ msgid ""
435441
"fact that the Python interpreter registers the ``.pyz`` and ``.pyzw`` file "
436442
"extensions when installed."
437443
msgstr ""
444+
"在 Unix 系统中,``myapp.pyz`` 文件将以原有文件名执行。如果喜欢 “普通”的命令名,可以重命名该文件,去掉扩展名 ``.pyz`` "
445+
"。在 Windows 系统中,``myapp.pyz[w]`` 是可执行文件,因为 Python 解释器在安装时注册了扩展名``.pyz`` 和 "
446+
"``.pyzw`` 。"
438447

439448
#: ../../library/zipapp.rst:307
440449
msgid "Making a Windows executable"
441-
msgstr ""
450+
msgstr "制作 Windows 可执行文件"
442451

443452
#: ../../library/zipapp.rst:309
444453
msgid ""

0 commit comments

Comments
 (0)