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

Skip to content

Commit 4f3db11

Browse files
[po] auto sync
1 parent d076208 commit 4f3db11

5 files changed

Lines changed: 79 additions & 22 deletions

File tree

c-api/buffer.po

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
# Jianchao Su, 2020
1818
# jsgang <[email protected]>, 2020
1919
# Freesand Leo <[email protected]>, 2020
20+
# Jiuh-star <[email protected]>, 2021
2021
#
2122
#, fuzzy
2223
msgid ""
@@ -25,7 +26,7 @@ msgstr ""
2526
"Report-Msgid-Bugs-To: \n"
2627
"POT-Creation-Date: 2021-01-01 16:02+0000\n"
2728
"PO-Revision-Date: 2019-09-01 03:39+0000\n"
28-
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2020\n"
29+
"Last-Translator: Jiuh-star <jiuh.star@gmail.com>, 2021\n"
2930
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
3031
"MIME-Version: 1.0\n"
3132
"Content-Type: text/plain; charset=UTF-8\n"
@@ -402,6 +403,8 @@ msgid ""
402403
":c:member:`~Py_buffer.buf`, :c:member:`~Py_buffer.len`, "
403404
":c:member:`~Py_buffer.itemsize`, :c:member:`~Py_buffer.ndim`."
404405
msgstr ""
406+
"以下字段不会被 *flags* 影响,并且必须总是用正确的值填充::c:member:`~Py_buffer.obj`, "
407+
":c:member:`~Py_buffer.buf`,:c:member:`~Py_buffer.len`,:c:member:`~Py_buffer.itemsize`,:c:member:`~Py_buffer.ndim`。"
405408

406409
#: ../../c-api/buffer.rst:239
407410
msgid "readonly, format"
@@ -515,6 +518,7 @@ msgid ""
515518
"with and without stride information. Without stride information, the buffer "
516519
"must be C-contiguous."
517520
msgstr ""
521+
"可以显式地请求C 或 Fortran :term:`连续 <contiguous>` ,不管有没有步幅信息。若没有步幅信息,则缓冲区必须是 C-连续的。"
518522

519523
#: ../../c-api/buffer.rst:296 ../../c-api/buffer.rst:321
520524
msgid "contig"
@@ -626,6 +630,10 @@ msgid ""
626630
"embedded at the start of :c:member:`~Py_buffer.buf`, pointing to two ``char "
627631
"x[2][3]`` arrays that can be located anywhere in memory."
628632
msgstr ""
633+
"除了常规项之外, PIL 风格的数组还可以包含指针,必须跟随这些指针才能到达维度的下一个元素。例如,常规的三维 C 语言数组 ``char "
634+
"v[2][2][3]`` 可以看作是一个指向 2 个二维数组的 2 个指针:``char "
635+
"(*v[2])[2][3]``。在子偏移表示中,这两个指针可以嵌入在 :c:member:`~Py_buffer.buf` "
636+
"的开头,指向两个可以位于内存任何位置的 ``char x[2][3]`` 数组。"
629637

630638
#: ../../c-api/buffer.rst:409
631639
msgid ""
@@ -734,6 +742,8 @@ msgid ""
734742
"*len* with writability set according to *readonly*. *buf* is interpreted as "
735743
"a sequence of unsigned bytes."
736744
msgstr ""
745+
"处理导出程序的缓冲区请求,该导出程序要暴露大小为 *len* 的 *buf* ,并根据 *readonly* 设置可写性。*bug* "
746+
"被解释为一个无符号字节序列。"
737747

738748
#: ../../c-api/buffer.rst:513
739749
msgid ""

c-api/exceptions.po

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# Yi Cao <[email protected]>, 2020
1414
# jsgang <[email protected]>, 2020
1515
# Freesand Leo <[email protected]>, 2021
16+
# Jiuh-star <[email protected]>, 2021
17+
# Dacuse Dankinder <[email protected]>, 2021
1618
#
1719
#, fuzzy
1820
msgid ""
@@ -21,7 +23,7 @@ msgstr ""
2123
"Report-Msgid-Bugs-To: \n"
2224
"POT-Creation-Date: 2021-01-01 16:02+0000\n"
2325
"PO-Revision-Date: 2019-09-01 03:39+0000\n"
24-
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2021\n"
26+
"Last-Translator: Dacuse Dankinder <2535262279@qq.com>, 2021\n"
2527
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2628
"MIME-Version: 1.0\n"
2729
"Content-Type: text/plain; charset=UTF-8\n"
@@ -46,6 +48,11 @@ msgid ""
4648
":c:func:`PyArg_\\*` functions return ``1`` for success and ``0`` for "
4749
"failure)."
4850
msgstr ""
51+
"本章描述的函数将让你处理和触发 Python 异常。了解一些 Python 异常处理的基本知识是很重要的。 它的工作原理有点像 POSIX 的 "
52+
":c:data:`errno` 变量:(每个线程)有一个全局指示器显示最近发生的错误。 大多数 C API "
53+
"函数不会在成功时理会它,但会在失败时设置它来指示错误的原因。 多数 C API 函数也返回一个错误指示器,如果它们应该返回一个指针,通常返回 "
54+
"``NULL``,如果返回一个整数,则返回 ``-1`` (例外: :c:func:`PyArg_\\*` 函数成功时返回 ``1`` 而失败时返回 "
55+
"``0``)。"
4956

5057
#: ../../c-api/exceptions.rst:20
5158
msgid ""
@@ -55,6 +62,8 @@ msgid ""
5562
"forbidden, for example you can't have a non-``NULL`` traceback if the "
5663
"exception type is ``NULL``)."
5764
msgstr ""
65+
"具体地说,错误指示器由三个对象指针组成:异常的类型,异常的值,和回溯对象。如果没有错误被设置,这些指针都可以是 "
66+
"``NULL``(尽管一些组合使禁止的,例如,如果异常类型是 ``NULL``,你不能有一个非 ``NULL`` 的回溯)。"
5867

5968
#: ../../c-api/exceptions.rst:26
6069
msgid ""
@@ -68,6 +77,8 @@ msgid ""
6877
"error is not handled or carefully propagated, additional calls into the "
6978
"Python/C API may not behave as intended and may fail in mysterious ways."
7079
msgstr ""
80+
"当一个函数由于它调用的某个函数失败而必须失败时,通常不会设置错误指示器;它调用的那个函数已经设置了它。而它负责处理错误和清理异常,或在清除其拥有的所有资源后返回(如对象应用或内存分配)。如果不准备处理异常,则*不*应该正常地继续。如果是由于一个错误返回,那么一定要向调用者表明已经设置了错误。如果错误没有得到处理或小心传播,对"
81+
" Python/C API的其它调用可能不会有预期的行为,并且可能会以某种神秘的方式失败。"
7182

7283
#: ../../c-api/exceptions.rst:37
7384
msgid ""
@@ -76,16 +87,18 @@ msgid ""
7687
"still propagating), while the latter returns an exception after it is caught"
7788
" (and has therefore stopped propagating)."
7889
msgstr ""
90+
"错误指示器 **不是** :func:`sys.exc_info()` "
91+
"的执行结果。前者对应尚未捕获的异常(异常还在传播),而后者在捕获异常后返回这个异常(异常已经停止传播)。"
7992

8093
#: ../../c-api/exceptions.rst:44
8194
msgid "Printing and clearing"
82-
msgstr ""
95+
msgstr "打印和清理"
8396

8497
#: ../../c-api/exceptions.rst:49
8598
msgid ""
8699
"Clear the error indicator. If the error indicator is not set, there is no "
87100
"effect."
88-
msgstr ""
101+
msgstr "清楚错误指示器。如果没有设置错误指示器,则不会有作用。"
89102

90103
#: ../../c-api/exceptions.rst:55
91104
msgid ""
@@ -94,6 +107,8 @@ msgid ""
94107
"printed and Python process will exit with the error code specified by the "
95108
"``SystemExit`` instance."
96109
msgstr ""
110+
"将标准回溯打印到 ``sys.stderr`` 并清除错误指示器。 **除非** 错误是 "
111+
"``SystemExit``,这种情况下不会打印回溯进程,且会退出 Python 进程,并显示 ``SystemExit`` 实例指定的错误代码。"
97112

98113
#: ../../c-api/exceptions.rst:60
99114
msgid ""
@@ -107,6 +122,8 @@ msgid ""
107122
":data:`sys.last_value` and :data:`sys.last_traceback` will be set to the "
108123
"type, value and traceback of the printed exception, respectively."
109124
msgstr ""
125+
"如果 *set_sys_last_vars* 非零,则变量 :data:`sys.last_type`,:data:`sys.last_value` 和"
126+
" :data:`sys.last_traceback` 将分别设置为打印异常的类型,值和回溯。"
110127

111128
#: ../../c-api/exceptions.rst:70
112129
msgid "Alias for ``PyErr_PrintEx(1)``."
@@ -119,17 +136,19 @@ msgid ""
119136
"raise the exception. It is used, for example, when an exception occurs in "
120137
"an :meth:`__del__` method."
121138
msgstr ""
139+
"当设置了异常,但解释器不可能实际地触发异常时,这个实用函数向 ``sys.stderr`` 打印一个警告信息。例如,当 :meth:`__del__` "
140+
"方法中发生异常时使用这个函数。"
122141

123142
#: ../../c-api/exceptions.rst:80
124143
msgid ""
125144
"The function is called with a single argument *obj* that identifies the "
126145
"context in which the unraisable exception occurred. If possible, the repr of"
127146
" *obj* will be printed in the warning message."
128-
msgstr ""
147+
msgstr "该函数使用单个参数 *obj* 进行调用,该参数标识发生不可触发异常的上下文。如果可能,*obj* 的报告将打印在警告消息中。"
129148

130149
#: ../../c-api/exceptions.rst:84
131150
msgid "An exception must be set when calling this function."
132-
msgstr ""
151+
msgstr "调用此函数时必须设置一个异常。"
133152

134153
#: ../../c-api/exceptions.rst:88
135154
msgid "Raising exceptions"
@@ -140,7 +159,7 @@ msgid ""
140159
"These functions help you set the current thread's error indicator. For "
141160
"convenience, some of these functions will always return a ``NULL`` pointer "
142161
"for use in a ``return`` statement."
143-
msgstr ""
162+
msgstr "这些函数可帮助你设置当前线程的错误指示器。为了方便起见,一些函数将始终返回 ``NULL`` 指针,以便用于 ``return`` 语句。"
144163

145164
#: ../../c-api/exceptions.rst:97
146165
msgid ""
@@ -150,12 +169,14 @@ msgid ""
150169
"count. The second argument is an error message; it is decoded from "
151170
"``'utf-8``'."
152171
msgstr ""
172+
"这是设置错误指示器最常用的方法。第一个参数指定异常类型;它通常是标准异常之一,e.g. "
173+
":c:data:`PyExc_RuntimeError`。你不务要增加它的引用计数。第二个参数是错误信息,它解码自 ``'utf-8'``。"
153174

154175
#: ../../c-api/exceptions.rst:105
155176
msgid ""
156177
"This function is similar to :c:func:`PyErr_SetString` but lets you specify "
157178
"an arbitrary Python object for the \"value\" of the exception."
158-
msgstr ""
179+
msgstr "此函数类似于 :c:func:`PyErr_SetString`,但是允许你为异常的“值”指定任意一个 Python 对象。"
159180

160181
#: ../../c-api/exceptions.rst:111
161182
msgid ""
@@ -164,6 +185,9 @@ msgid ""
164185
"help format the error message; they have the same meaning and values as in "
165186
":c:func:`PyUnicode_FromFormat`. *format* is an ASCII-encoded string."
166187
msgstr ""
188+
"这个函数设置了一个错误的指针并且返回了\"NULL\".“exception”应当是一个python中的异常类。The \"format\" "
189+
"和随后的参数帮助格式化这个错误的信息;他们与 :c:func:`PyUnicode_FromFormat` "
190+
"有着相同的含义和值。\"format\"是一个ASCII编码的字符串"
167191

168192
#: ../../c-api/exceptions.rst:120
169193
msgid ""
@@ -173,7 +197,7 @@ msgstr ""
173197

174198
#: ../../c-api/exceptions.rst:128
175199
msgid "This is a shorthand for ``PyErr_SetObject(type, Py_None)``."
176-
msgstr ""
200+
msgstr "这是 ``PyErr_SetObject(type, Py_None)`` 的简写。"
177201

178202
#: ../../c-api/exceptions.rst:133
179203
msgid ""
@@ -395,7 +419,7 @@ msgstr ""
395419

396420
#: ../../c-api/exceptions.rst:364
397421
msgid "Querying the error indicator"
398-
msgstr ""
422+
msgstr "查询错误指示器"
399423

400424
#: ../../c-api/exceptions.rst:368
401425
msgid ""
@@ -648,7 +672,7 @@ msgstr ""
648672

649673
#: ../../c-api/exceptions.rst:619
650674
msgid "Unicode Exception Objects"
651-
msgstr ""
675+
msgstr "Unicode 异常对象"
652676

653677
#: ../../c-api/exceptions.rst:621
654678
msgid ""
@@ -712,7 +736,7 @@ msgstr ""
712736

713737
#: ../../c-api/exceptions.rst:685
714738
msgid "Return the *reason* attribute of the given exception object."
715-
msgstr ""
739+
msgstr "返回给定异常对象的 *reason* 属性"
716740

717741
#: ../../c-api/exceptions.rst:691
718742
msgid ""

c-api/intro.po

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
# Tony Tong <[email protected]>, 2019
99
# ppcfish <[email protected]>, 2019
1010
# Freesand Leo <[email protected]>, 2020
11+
# Jiuh-star <[email protected]>, 2021
1112
#
1213
#, fuzzy
1314
msgid ""
@@ -16,7 +17,7 @@ msgstr ""
1617
"Report-Msgid-Bugs-To: \n"
1718
"POT-Creation-Date: 2021-01-01 16:02+0000\n"
1819
"PO-Revision-Date: 2019-09-01 03:40+0000\n"
19-
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2020\n"
20+
"Last-Translator: Jiuh-star <jiuh.star@gmail.com>, 2021\n"
2021
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2122
"MIME-Version: 1.0\n"
2223
"Content-Type: text/plain; charset=UTF-8\n"
@@ -116,6 +117,8 @@ msgid ""
116117
"It is recommended to always define ``PY_SSIZE_T_CLEAN`` before including "
117118
"``Python.h``. See :ref:`arg-parsing` for a description of this macro."
118119
msgstr ""
120+
"推荐总是在 ``Python.h`` 前定义 ``PY_SSIZE_T_CLEAN`` 。查看 :ref:`arg-parsing` "
121+
"来了解这个宏的更多内容。"
119122

120123
#: ../../c-api/intro.rst:67
121124
msgid ""
@@ -135,6 +138,8 @@ msgid ""
135138
"future Python versions, which may define additional names beginning with one"
136139
" of these prefixes."
137140
msgstr ""
141+
"用户代码永远不应该定义以 ``Py`` 或 ``_Py`` "
142+
"开头的名称。这会使读者感到困惑,并危及用户代码对未来Python版本的可移植性,这些版本可能会定义以这些前缀之一开头的其他名称。"
138143

139144
#: ../../c-api/intro.rst:79
140145
msgid ""
@@ -173,6 +178,8 @@ msgid ""
173178
" header files properly declare the entry points to be ``extern \"C\"``. As a"
174179
" result, there is no need to do anything special to use the API from C++."
175180
msgstr ""
181+
"C++ 用户应该注意,尽管 API 是完全使用 C 来定义的,但头文件正确地将入口点声明为 ``extern \"C\"``,因此 API 在 C++ "
182+
"中使用此 API 不必再做任何特殊处理。"
176183

177184
#: ../../c-api/intro.rst:101
178185
msgid "Useful macros"

library/telnetlib.po

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#
66
# Translators:
77
# Liying Yang <[email protected]>, 2019
8+
# Freesand Leo <[email protected]>, 2021
89
# Jiuh-star <[email protected]>, 2021
910
#
1011
#, fuzzy
@@ -83,8 +84,8 @@ msgid ""
8384
"return an empty string for other reasons. See the individual descriptions "
8485
"below."
8586
msgstr ""
86-
"这个类有很多 :meth:`read_\\*` 方法。请注意,其中一些方法在读取结束时会引发 :exc:`EOFError` "
87-
"异常,这是由于连接对象可能出于其它原因返回一个空字符串。请参阅下面的个别描述。"
87+
"这个类有很多 :meth:`read_\\*` 方法。 请注意,其中一些方法在读取结束时会触发 :exc:`EOFError` "
88+
"异常,这是由于连接对象可能出于其它原因返回一个空字符串。 请参阅下面的个别描述。"
8889

8990
#: ../../library/telnetlib.rst:46
9091
msgid ""
@@ -185,6 +186,8 @@ msgid ""
185186
"callback should access these data when it was invoked with a ``SE`` command."
186187
" This method never blocks."
187188
msgstr ""
189+
"返回在 SB/SE 对之间收集的数据(子选项 begin/end)。当使用 ``SE`` "
190+
"命令调用回调函数时,该回调函数应该访问这些数据。该方法永远不会阻塞。"
188191

189192
#: ../../library/telnetlib.rst:137
190193
msgid ""
@@ -193,6 +196,8 @@ msgid ""
193196
"specifies a timeout in seconds for blocking operations like the connection "
194197
"attempt (if not specified, the global default timeout setting will be used)."
195198
msgstr ""
199+
"连接主机。第二个可选参数是端口号,默认为标准 Telnet 端口(23)。可选参数 *timeout* "
200+
"指定一个以秒为单位的超时时间用于像连接尝试这样的阻塞操作(如果没有指定,将使用全局默认超时设置)。"
196201

197202
#: ../../library/telnetlib.rst:142
198203
msgid "Do not try to reopen an already connected instance."
@@ -204,12 +209,13 @@ msgid ""
204209
"are present, they are substituted in the message using the standard string "
205210
"formatting operator."
206211
msgstr ""
212+
"当 debug level ``>`` 0 时打印一条 debug 信息。如果存在额外参数,则它们会被替换在使用标准字符串格式化操作符的信息中。"
207213

208214
#: ../../library/telnetlib.rst:154
209215
msgid ""
210216
"Set the debug level. The higher the value of *debuglevel*, the more debug "
211217
"output you get (on ``sys.stdout``)."
212-
msgstr ""
218+
msgstr "设置调试级别"
213219

214220
#: ../../library/telnetlib.rst:160
215221
msgid "Close the connection."
@@ -228,7 +234,7 @@ msgid ""
228234
"Write a byte string to the socket, doubling any IAC characters. This can "
229235
"block if the connection is blocked. May raise :exc:`OSError` if the "
230236
"connection is closed."
231-
msgstr ""
237+
msgstr "向套接字写入一个字节字符串,将所有 IAC 字符加倍。如果连接被阻塞,这可能也会阻塞。如果连接关闭可能触发 :exc:`OSError`。"
232238

233239
#: ../../library/telnetlib.rst:179
234240
msgid ""
@@ -246,7 +252,7 @@ msgstr "多线程版的 :meth:`interact`."
246252

247253
#: ../../library/telnetlib.rst:196
248254
msgid "Read until one from a list of a regular expressions matches."
249-
msgstr ""
255+
msgstr "一直读取,直到匹配列表中的某个正则表达式。"
250256

251257
#: ../../library/telnetlib.rst:198
252258
msgid ""
@@ -255,27 +261,31 @@ msgid ""
255261
"optional second argument is a timeout, in seconds; the default is to block "
256262
"indefinitely."
257263
msgstr ""
264+
"第一个参数是一个正则表达式列表,可以是已编译的 (:ref:`正则表达式对象 <re-objects>`),也可以是未编译的 (字节串)。 "
265+
"第二个可选参数是超时,单位是秒;默认一直阻塞。"
258266

259267
#: ../../library/telnetlib.rst:203
260268
msgid ""
261269
"Return a tuple of three items: the index in the list of the first regular "
262270
"expression that matches; the match object returned; and the bytes read up "
263271
"till and including the match."
264-
msgstr ""
272+
msgstr "返回一个包含三个元素的元组:列表中的第一个匹配的正则表达式的索引;返回的匹配对象;包括匹配在内的读取过的字节。"
265273

266274
#: ../../library/telnetlib.rst:207
267275
msgid ""
268276
"If end of file is found and no bytes were read, raise :exc:`EOFError`. "
269277
"Otherwise, when nothing matches, return ``(-1, None, data)`` where *data* is"
270278
" the bytes received so far (may be empty bytes if a timeout happened)."
271279
msgstr ""
280+
"如果找到了文件的结尾且没有字节被读取,触发 :exc:`EOFError`。否则,当没有匹配时,返回 ``(-1, None, data)``,其中 "
281+
"*data* 是到目前为止接受到的字节(如果发生超时,则可能是空字节)。"
272282

273283
#: ../../library/telnetlib.rst:211
274284
msgid ""
275285
"If a regular expression ends with a greedy match (such as ``.*``) or if more"
276286
" than one expression can match the same input, the results are non-"
277287
"deterministic, and may depend on the I/O timing."
278-
msgstr ""
288+
msgstr "如果一个正则表达式以贪婪匹配结束(例如 ``.*``),或者多个表达式可以匹配同一个输出,则结果是不确定的,可能取决于 I/O 计时。"
279289

280290
#: ../../library/telnetlib.rst:218
281291
msgid ""
@@ -284,6 +294,8 @@ msgid ""
284294
"command (DO/DONT/WILL/WONT), option). No other action is done afterwards by"
285295
" telnetlib."
286296
msgstr ""
297+
"每次在输入流上读取 telnet 选项时,这个带有如下参数的 *callback* (如果设置了)会被调用: callback(telnet "
298+
"socket, command (DO/DONT/WILL/WONT), option)。telnetlib 之后不会再执行其它操作。"
287299

288300
#: ../../library/telnetlib.rst:226
289301
msgid "Telnet Example"

0 commit comments

Comments
 (0)