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

Skip to content

Commit baeb601

Browse files
committed
[po] auto sync bot
1 parent dd1733e commit baeb601

2 files changed

Lines changed: 128 additions & 106 deletions

File tree

c-api/intro.po

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# Fei Yin <[email protected]>, 2018
88
# Tony Tong <[email protected]>, 2018
99
# ww song <[email protected]>, 2018
10+
# Freesand Leo <[email protected]>, 2018
1011
#
1112
#, fuzzy
1213
msgid ""
@@ -15,7 +16,7 @@ msgstr ""
1516
"Report-Msgid-Bugs-To: \n"
1617
"POT-Creation-Date: 2018-06-30 05:56+0900\n"
1718
"PO-Revision-Date: 2017-02-16 17:36+0000\n"
18-
"Last-Translator: ww song <sww4718168@gmail.com>, 2018\n"
19+
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2018\n"
1920
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2021
"MIME-Version: 1.0\n"
2122
"Content-Type: text/plain; charset=UTF-8\n"
@@ -38,7 +39,11 @@ msgid ""
3839
"probably the most common use. The second reason is to use Python as a "
3940
"component in a larger application; this technique is generally referred to "
4041
"as :dfn:`embedding` Python in an application."
41-
msgstr "Python的应用程序接口(API)使C和C ++程序员可以在各种不同的级别访问Python解释器。"
42+
msgstr ""
43+
"Python 的应用编程接口(API)使得 C 和 C++ 程序员可以在多个层级上访问 Python 解释器。该 API 在 C++ "
44+
"中同样可用,但为简化描述,通常将其称为 Python/C API。使用 Python/C API 有两个基本的理由。第一个理由是为了特定目的而编写 "
45+
"*扩展模块*;它们是扩展 Python 解释器功能的 C 模块。这可能是最常见的使用场景。第二个理由是将 Python "
46+
"用作更大规模应用的组件;这种技巧通常被称为在一个应用中 :dfn:`embedding` Python。"
4247

4348
#: ../../c-api/intro.rst:20
4449
msgid ""
@@ -48,6 +53,8 @@ msgid ""
4853
"applications since its early existence, the process of embedding Python is "
4954
"less straightforward than writing an extension."
5055
msgstr ""
56+
"编写扩展模块的过程相对来说更易于理解,可以以“菜谱”的形式分步骤介绍。使用某些工具可在一定程度上自动化这一过程。虽然人们在其他应用中嵌入 Python "
57+
"的做法早已有之,但嵌入 Python 的过程没有编写扩展模块那样方便直观。"
5158

5259
#: ../../c-api/intro.rst:26
5360
msgid ""
@@ -57,11 +64,12 @@ msgid ""
5764
"become familiar with writing an extension before attempting to embed Python"
5865
" in a real application."
5966
msgstr ""
60-
"无论您是嵌入还是扩展Python,许多API函数都是有用的;此外,嵌入Python的大多数应用程序也需要提供自定义扩展,因此在尝试将Python嵌入到实际应用程序之前熟悉编写扩展应该是个好主意。"
67+
"许多 API 函数在你嵌入或是扩展 Python 这两种场景下都能发挥作用;此外,大多数嵌入 Python "
68+
"的应用程序也需要提供自定义扩展,因此在尝试在实际应用中嵌入 Python 之前先熟悉编写扩展应该会是个好主意。"
6169

6270
#: ../../c-api/intro.rst:34
6371
msgid "Coding standards"
64-
msgstr ""
72+
msgstr "代码标准"
6573

6674
#: ../../c-api/intro.rst:36
6775
msgid ""
@@ -71,6 +79,9 @@ msgid ""
7179
"these conventions is not necessary for your own third party extension "
7280
"modules, unless you eventually expect to contribute them to Python."
7381
msgstr ""
82+
"如果你想要编写可包含于 CPython 的 C 代码,你 **必须** 遵循在 :PEP:`7` "
83+
"中定义的指导原则和标准。这些指导原则适用于任何你所要扩展的 Python 版本。在编写你自己的第三方扩展模块时可以不必遵循这些规范,除非你准备在日后向 "
84+
"Python 贡献这些模块。"
7485

7586
#: ../../c-api/intro.rst:46
7687
msgid "Include Files"
@@ -80,7 +91,7 @@ msgstr "包含文件"
8091
msgid ""
8192
"All function, type and macro definitions needed to use the Python/C API are "
8293
"included in your code by the following line::"
83-
msgstr "使用Python / C API所需的所有函数,类型和宏定义都包含在您的代码中,如下所示:"
94+
msgstr "使用 Python/C API 所需要的全部函数、类型和宏定义可通过下面这行语句包含到你的代码之中:"
8495

8596
#: ../../c-api/intro.rst:53
8697
msgid ""
@@ -97,8 +108,8 @@ msgid ""
97108
"standard headers on some systems, you *must* include :file:`Python.h` before"
98109
" any standard headers are included."
99110
msgstr ""
100-
"由于Python可能会定义一些影响某些系统上标准头文件的预处理器定义,因此在包含任何标准头文件之前,*必须* include "
101-
"这个文件:`Python.h`。"
111+
"由于 Python 可能会定义一些能在某些系统上影响标准头文件的预处理器定义,因此在包含任何标准头文件之前,*必须* 先包含 "
112+
":file:`Python.h`。"
102113

103114
#: ../../c-api/intro.rst:63
104115
msgid ""
@@ -108,7 +119,8 @@ msgid ""
108119
"implementation and should not be used by extension writers. Structure member"
109120
" names do not have a reserved prefix."
110121
msgstr ""
111-
"Python.h定义的所有成员可见名称(除了由包含的标准头定义的那些)都有一个前缀“Py``或``_Py``。以``_Py``开头的名称供Python实现内部使用,不应由编写扩展者使用。结构成员名称没有保留前缀。"
122+
"Python.h 所定义的全部用户可见名称(由包含的标准头文件所定义的除外)都带有前缀 ``Py`` 或者 ``_Py``。以 ``_Py`` "
123+
"打头的名称是供 Python 实现内部使用的,不应被扩展编写者使用。结构成员名称没有保留前缀。"
112124

113125
#: ../../c-api/intro.rst:68
114126
msgid ""
@@ -117,8 +129,8 @@ msgid ""
117129
"user code to future Python versions, which may define additional names "
118130
"beginning with one of these prefixes."
119131
msgstr ""
120-
"**重要:** "
121-
"用户代码永远不应该定义以``Py``或``_Py``开头的名称。这会使读者感到困惑,并危及用户代码对未来Python版本的可移植性,这些版本可能会定义以这些前缀之一开头的其他名称。"
132+
"**重要:** 用户代码永远不应该定义以 ``Py` `或 ``_Py`` 开头的名称。这会使读者感到困惑,并危及用户代码对未来 Python "
133+
"版本的可移植性,因为未来版本可能会额外定义以这些前缀之一开头的名称。"
122134

123135
#: ../../c-api/intro.rst:73
124136
msgid ""
@@ -131,9 +143,12 @@ msgid ""
131143
":file:`{prefix}/include`, where :envvar:`prefix` is the installation "
132144
"directory specified to the installer."
133145
msgstr ""
134-
"头文件通常与Python一起安装。在Unix上,它们位于以下目录:file:`{prefix}/include/pythonversion/`和:file:`{exec_prefix}/include/pythonversion/`,其中:环境变量`prefix`和环境变量`exec_prefix"
135-
" "
136-
"`由Python程序的相应参数定义:配置文件脚本和版本号是由系统决定。在Windows上,头文件安装在:`{prefix}/include`中,其中:环境变量`prefix`是为安装程序指定的安装目录。"
146+
"头文件通常会与 Python 一起安装。在 Unix "
147+
"上,它们位于以下目录::file:`{prefix}/include/pythonversion/` 和 "
148+
":file:`{exec_prefix}/include/pythonversion/`,其中 :envvar:`prefix` 和 "
149+
":envvar:`exec_prefix` 是由向 Python 的 :program:`configure` 脚本传入的对应形参所定义,而 "
150+
"*version* 则为 ``'%d.%d' % sys.version_info[:2]``。在 Windows 上,头文件安装于 "
151+
":file:`{prefix}/include`,其中 :envvar:`prefix` 是向安装程序指定的安装目录。"
137152

138153
#: ../../c-api/intro.rst:82
139154
msgid ""
@@ -144,17 +159,18 @@ msgid ""
144159
" :envvar:`prefix` include the platform specific headers from "
145160
":envvar:`exec_prefix`."
146161
msgstr ""
147-
"要包含头文件,请将两个目录(如果不同)全都放在编译器的包含搜索路径上。*不要*将父目录放在搜索路径上,然后使用``#include "
148-
"<pythonX.Y/Python.h>``;这将在跨平台环境中不可用,因为基于平台独立的头文件需要明确指定环境变量:`prefix`,和平台执行环境变量:`exec_prefix`。"
162+
"要包含头文件,请将两个目录(如果不同)都放到你所用编译器的包含搜索路径中。请 *不要* 将父目录放入搜索路径然后使用 ``#include "
163+
"<pythonX.Y/Python.h>``;这将使得多平台编译不可用,因为 :envvar:`prefix` 下平台无关的头文件需要包含来自 "
164+
":envvar:`exec_prefix` 下特定平台的头文件。"
149165

150166
#: ../../c-api/intro.rst:89
151167
msgid ""
152168
"C++ users should note that though the API is defined entirely using C, the "
153169
"header files do properly declare the entry points to be ``extern \"C\"``, so"
154170
" there is no need to do anything special to use the API from C++."
155171
msgstr ""
156-
"C ++用户应该注意,尽管API完全使用C定义,但是头文件正确地将入口点声明为``extern”C“``,因此不需要做任何特殊的事情来使用C "
157-
"++中的API。"
172+
"C++ 用户应该注意,尽管 API 是完全使用 C 来定义的,但头文件正确地将入口点声明为 ``extern \"C\"``,因此 API 在 C++ "
173+
"中使用此 API 不必再做任何特殊处理。"
158174

159175
#: ../../c-api/intro.rst:95
160176
msgid "Useful macros"

0 commit comments

Comments
 (0)