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

Skip to content

Commit 5f16237

Browse files
committed
[po] auto sync bot
1 parent 693ed44 commit 5f16237

3 files changed

Lines changed: 33 additions & 10 deletions

File tree

extending/building.po

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ msgid ""
6464
"``PyInitU_<modulename>``, with ``<modulename>`` encoded using Python's "
6565
"*punycode* encoding with hyphens replaced by underscores. In Python::"
6666
msgstr ""
67+
"对于仅有ASCII编码的模块名,函数必须是 ``PyInit_<modulename>`` ,将 ``<modulename>`` "
68+
"替换为模块的名字。当使用 :ref:`multi-phase-initialization` "
69+
"时,允许使用非ASCII编码的模块名。此时初始化函数的名字是 ``PyInitU_<modulename>`` ,而 ``<modulename>`` "
70+
"需要用Python的 *punycode* 编码,连字号需替换为下划线。在Python里::"
6771

6872
#: ../../extending/building.rst:39
6973
msgid ""
@@ -73,27 +77,30 @@ msgid ""
7377
"function corresponding to the filename is found. See the *\"Multiple modules"
7478
" in one library\"* section in :pep:`489` for details."
7579
msgstr ""
80+
"可以在一个动态库里导出多个模块,通过定义多个初始化函数。而导入他们需要符号链接或自定义导入器,因为缺省时只有对应了文件名的函数才会被发现。查看 "
81+
"*\"一个库里的多模块\"* 章节,在 :pep:`489` 了解更多细节。"
7682

7783
#: ../../extending/building.rst:49
7884
msgid "Building C and C++ Extensions with distutils"
79-
msgstr ""
85+
msgstr "使用distutils构建C和C++扩展"
8086

8187
#: ../../extending/building.rst:53
8288
msgid ""
8389
"Extension modules can be built using distutils, which is included in "
8490
"Python. Since distutils also supports creation of binary packages, users "
8591
"don't necessarily need a compiler and distutils to install the extension."
8692
msgstr ""
93+
"扩展模块可以用distutils来构建,这是Python自带的。distutils也支持创建二进制包,用户无需编译器而distutils就能安装扩展。"
8794

8895
#: ../../extending/building.rst:57
8996
msgid ""
9097
"A distutils package contains a driver script, :file:`setup.py`. This is a "
9198
"plain Python file, which, in the most simple case, could look like this:"
92-
msgstr ""
99+
msgstr "一个distutils包包含了一个驱动脚本 :file:`setup.py` 。这是个纯Python文件,大多数时候也很简单,看起来如下:"
93100

94101
#: ../../extending/building.rst:73
95102
msgid "With this :file:`setup.py`, and a file :file:`demo.c`, running ::"
96-
msgstr ""
103+
msgstr "通过文件 :file:`setup.py` ,和文件 :file:`demo.c` ,运行如下 ::"
97104

98105
#: ../../extending/building.rst:77
99106
msgid ""
@@ -102,6 +109,9 @@ msgid ""
102109
"will end up in a subdirectory :file:`build/lib.system`, and may have a name "
103110
"like :file:`demo.so` or :file:`demo.pyd`."
104111
msgstr ""
112+
"这会编译 :file:`demo.c` ,然后产生一个扩展模块叫做 ``demo`` 在目录 :file:`build` "
113+
"里。依赖于系统,模块文件会放在某个子目录形如 :file:`build/lib.system` ,名字可能是 :file:`demo.so` 或 "
114+
":file:`demo.pyd` 。"
105115

106116
#: ../../extending/building.rst:82
107117
msgid ""
@@ -114,6 +124,9 @@ msgid ""
114124
"documentation in :ref:`distutils-index` to learn more about the features of "
115125
"distutils; this section explains building extension modules only."
116126
msgstr ""
127+
"在文件 :file:`setup.py` 里,所有动作的入口通过 ``setup`` "
128+
"函数。该函数可以接受可变数量个关键字参数,上面的例子只使用了一个子集。特别需要注意的例子指定了构建包的元信息,以及指定了包内容。通常一个包会包括多个模块,就像Python的源码模块、文档、子包等。请参数distutils的文档,在"
129+
" :ref:`distutils-index` 来了解更多distutils的特性;本章节只解释构建扩展模块的部分。"
117130

118131
#: ../../extending/building.rst:91
119132
msgid ""
@@ -124,13 +137,16 @@ msgid ""
124137
"example, the instance defines an extension named ``demo`` which is build by "
125138
"compiling a single source file, :file:`demo.c`."
126139
msgstr ""
140+
"通常预计算参数给 :func:`setup` ,想要更好的结构化驱动脚本。有如如上例子函数 :func:`~distutils.core.setup` "
141+
"的 ``ext_modules`` 参数是一列扩展模块,每个是一个 :class:`~distutils.extension.Extension` "
142+
"类的实例。例子中的实例定义了扩展命名为 ``demo`` ,从单一源码文件构建 :file:`demo.c` 。"
127143

128144
#: ../../extending/building.rst:99
129145
msgid ""
130146
"In many cases, building an extension is more complex, since additional "
131147
"preprocessor defines and libraries may be needed. This is demonstrated in "
132148
"the example below."
133-
msgstr ""
149+
msgstr "更多时候,构建一个扩展会复杂的多,需要额外的预处理器定义和库。如下例子展示了这些。"
134150

135151
#: ../../extending/building.rst:127
136152
msgid ""
@@ -141,6 +157,9 @@ msgid ""
141157
" distutils passes this information in different ways to the compiler. For "
142158
"example, on Unix, this may result in the compilation commands ::"
143159
msgstr ""
160+
"例子中函数 :func:`~distutils.core.setup` "
161+
"在调用时额外传递了元信息,是推荐发布包构建时的内容。对于这个扩展,其指定了预处理器定义,include目录,库目录,库。依赖于编译器,distutils还会用其他方式传递信息给编译器。例如在Unix上,结果是如下编译命令"
162+
" ::"
144163

145164
#: ../../extending/building.rst:139
146165
msgid ""

library/asyncio-llapi-index.po

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -947,34 +947,38 @@ msgstr ""
947947
#: ../../library/asyncio-llapi-index.rst:465
948948
msgid ""
949949
"Called when a previous send or receive operation raises an :class:`OSError`."
950-
msgstr ""
950+
msgstr "前一个发送或接收操作引发 :class:`OSError` 时被调用。"
951951

952952
#: ../../library/asyncio-llapi-index.rst:469
953953
msgid "Subprocess Protocols"
954-
msgstr ""
954+
msgstr "子进程协议"
955955

956956
#: ../../library/asyncio-llapi-index.rst:474
957957
msgid ""
958958
"``callback`` :meth:`pipe_data_received() "
959959
"<SubprocessProtocol.pipe_data_received>`"
960960
msgstr ""
961+
"``callback`` :meth:`pipe_data_received() "
962+
"<SubprocessProtocol.pipe_data_received>`"
961963

962964
#: ../../library/asyncio-llapi-index.rst:476
963965
msgid ""
964966
"Called when the child process writes data into its *stdout* or *stderr* "
965967
"pipe."
966-
msgstr ""
968+
msgstr "子进程向 *stdout* 或 *stderr* 管道写入数据时被调用。"
967969

968970
#: ../../library/asyncio-llapi-index.rst:479
969971
msgid ""
970972
"``callback`` :meth:`pipe_connection_lost() "
971973
"<SubprocessProtocol.pipe_connection_lost>`"
972974
msgstr ""
975+
"``callback`` :meth:`pipe_connection_lost() "
976+
"<SubprocessProtocol.pipe_connection_lost>`"
973977

974978
#: ../../library/asyncio-llapi-index.rst:481
975979
msgid ""
976980
"Called when one of the pipes communicating with the child process is closed."
977-
msgstr ""
981+
msgstr "与子进程通信的其中一个管道关闭时被调用。"
978982

979983
#: ../../library/asyncio-llapi-index.rst:484
980984
msgid ""

library/asyncio-protocol.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ msgstr ""
908908

909909
#: ../../library/asyncio-protocol.rst:679
910910
msgid "Subprocess Protocols"
911-
msgstr ""
911+
msgstr "子进程协议"
912912

913913
#: ../../library/asyncio-protocol.rst:681
914914
msgid ""
@@ -933,7 +933,7 @@ msgstr ""
933933
#: ../../library/asyncio-protocol.rst:696
934934
msgid ""
935935
"Called when one of the pipes communicating with the child process is closed."
936-
msgstr ""
936+
msgstr "与子进程通信的其中一个管道关闭时被调用。"
937937

938938
#: ../../library/asyncio-protocol.rst:699
939939
msgid "*fd* is the integer file descriptor that was closed."

0 commit comments

Comments
 (0)