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

Skip to content

Commit 9e93886

Browse files
[po] auto sync
1 parent ca0f42e commit 9e93886

5 files changed

Lines changed: 114 additions & 106 deletions

File tree

howto/instrumentation.po

Lines changed: 46 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
# Fred <[email protected]>, 2018
88
# telnetning <[email protected]>, 2018
99
# 非法操作 <[email protected]>, 2019
10-
# Meng Du <[email protected]>, 2019
1110
# dogn he <[email protected]>, 2019
11+
# Meng Du <[email protected]>, 2020
1212
#
1313
#, fuzzy
1414
msgid ""
@@ -17,7 +17,7 @@ msgstr ""
1717
"Report-Msgid-Bugs-To: \n"
1818
"POT-Creation-Date: 2020-02-09 12:40+0000\n"
1919
"PO-Revision-Date: 2017-02-16 17:45+0000\n"
20-
"Last-Translator: dogn he <hedogn@163.com>, 2019\n"
20+
"Last-Translator: Meng Du <alphanow@gmail.com>, 2020\n"
2121
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2222
"MIME-Version: 1.0\n"
2323
"Content-Type: text/plain; charset=UTF-8\n"
@@ -47,8 +47,7 @@ msgid ""
4747
"what the processes on a computer system are doing. They both use domain-"
4848
"specific languages allowing a user to write scripts which:"
4949
msgstr ""
50-
"DTrace和SystemTap是监视工具,每个工具都提供了一种检查计算机系统上的进程正在执行的操作的方法。 "
51-
"它们都使用特定于域的语言,允许用户编写以下脚本:"
50+
"DTrace和SystemTap是监控工具,它们都提供了一种检查计算机系统上的进程的方法。 它们都使用特定领域的语言,允许用户编写脚本,其中:"
5251

5352
#: ../../howto/instrumentation.rst:16
5453
msgid "filter which processes are to be observed"
@@ -146,182 +145,194 @@ msgid ""
146145
"function called \"start\". In other words, import-time function invocations "
147146
"are not going to be listed:"
148147
msgstr ""
148+
"下面的 DTrace 脚本示例可以用来显示一个 Python 脚本的调用/返回层次结构,只在调用名为 \"start\" "
149+
"的函数内进行跟踪。换句话说,导入时的函数调用不会被列出。"
149150

150151
#: ../../howto/instrumentation.rst:170 ../../howto/instrumentation.rst:228
151152
msgid "It can be invoked like this::"
152-
msgstr ""
153+
msgstr "它可以这样调用::"
153154

154155
#: ../../howto/instrumentation.rst:174 ../../howto/instrumentation.rst:234
155156
msgid "The output looks like this:"
156157
msgstr "输出结果会像这样:"
157158

158159
#: ../../howto/instrumentation.rst:199
159160
msgid "Static SystemTap markers"
160-
msgstr ""
161+
msgstr "静态SystemTap标记"
161162

162163
#: ../../howto/instrumentation.rst:201
163164
msgid ""
164165
"The low-level way to use the SystemTap integration is to use the static "
165166
"markers directly. This requires you to explicitly state the binary file "
166167
"containing them."
167-
msgstr ""
168+
msgstr "使用 SystemTap 集成的底层方法是直接使用静态标记。 这需要你显式地说明包含它们的二进制文件。"
168169

169170
#: ../../howto/instrumentation.rst:205
170171
msgid ""
171172
"For example, this SystemTap script can be used to show the call/return "
172173
"hierarchy of a Python script:"
173-
msgstr ""
174+
msgstr "例如,这个SystemTap脚本可以用来显示Python脚本的调用/返回层次结构:"
174175

175176
#: ../../howto/instrumentation.rst:245
176177
msgid "where the columns are:"
177-
msgstr ""
178+
msgstr "其中的列是:"
178179

179180
#: ../../howto/instrumentation.rst:247
180181
msgid "time in microseconds since start of script"
181-
msgstr ""
182+
msgstr "脚本开始后经过的微秒数"
182183

183184
#: ../../howto/instrumentation.rst:249
184185
msgid "name of executable"
185-
msgstr ""
186+
msgstr "可执行文件的名字"
186187

187188
#: ../../howto/instrumentation.rst:251
188189
msgid "PID of process"
189-
msgstr ""
190+
msgstr "进程的PID"
190191

191192
#: ../../howto/instrumentation.rst:253
192193
msgid ""
193194
"and the remainder indicates the call/return hierarchy as the script "
194195
"executes."
195-
msgstr ""
196+
msgstr "其余部分则表示脚本执行时的调用/返回层次结构。"
196197

197198
#: ../../howto/instrumentation.rst:255
198199
msgid ""
199200
"For a `--enable-shared` build of CPython, the markers are contained within "
200201
"the libpython shared library, and the probe's dotted path needs to reflect "
201202
"this. For example, this line from the above example:"
202203
msgstr ""
204+
"对于 `--enable-shared` "
205+
"构建的CPython来说,这些标记是包含在libpython共享库中的,探针的点状路径需要反映这一点。比如上面例子中的这一行:"
203206

204207
#: ../../howto/instrumentation.rst:263
205208
msgid "should instead read:"
206-
msgstr ""
209+
msgstr "应改为:"
207210

208211
#: ../../howto/instrumentation.rst:269
209212
msgid "(assuming a debug build of CPython 3.6)"
210-
msgstr ""
213+
msgstr "(假设是 CPython 3.6 的调试构建)"
211214

212215
#: ../../howto/instrumentation.rst:273
213216
msgid "Available static markers"
214-
msgstr ""
217+
msgstr "可用的静态标记"
215218

216219
#: ../../howto/instrumentation.rst:279
217220
msgid ""
218221
"This marker indicates that execution of a Python function has begun. It is "
219222
"only triggered for pure-Python (bytecode) functions."
220-
msgstr ""
223+
msgstr "这个标记表示一个Python函数的执行已经开始。它只对纯 Python (字节码)函数触发。"
221224

222225
#: ../../howto/instrumentation.rst:282
223226
msgid ""
224227
"The filename, function name, and line number are provided back to the "
225228
"tracing script as positional arguments, which must be accessed using "
226229
"``$arg1``, ``$arg2``, ``$arg3``:"
227-
msgstr ""
230+
msgstr "文件名、函数名和行号作为位置参数提供给跟踪脚本,必须使用 ``$arg1``, ``$arg2``, ``$arg3`` 访问:"
228231

229232
#: ../../howto/instrumentation.rst:286
230233
msgid ""
231234
"``$arg1`` : ``(const char *)`` filename, accessible using "
232235
"``user_string($arg1)``"
233-
msgstr ""
236+
msgstr "``$arg1`` : ``(const char *)`` 文件名,使用 ``user_string($arg1)`` 访问"
234237

235238
#: ../../howto/instrumentation.rst:288
236239
msgid ""
237240
"``$arg2`` : ``(const char *)`` function name, accessible using "
238241
"``user_string($arg2)``"
239-
msgstr ""
242+
msgstr "``$arg2`` : ``(const char *)`` 函数名,使用 ``user_string($arg2)`` 访问"
240243

241244
#: ../../howto/instrumentation.rst:291
242245
msgid "``$arg3`` : ``int`` line number"
243-
msgstr ""
246+
msgstr "``$arg3`` : ``int`` 行号"
244247

245248
#: ../../howto/instrumentation.rst:295
246249
msgid ""
247250
"This marker is the converse of :c:func:`function__entry`, and indicates that"
248251
" execution of a Python function has ended (either via ``return``, or via an "
249252
"exception). It is only triggered for pure-Python (bytecode) functions."
250253
msgstr ""
254+
"这个标记与 :c:func:`function__entry` 相反,表示Python函数的执行已经结束 (通过 ``return`` 或者异常)。 "
255+
"它只对纯Python (字节码) 函数触发。"
251256

252257
#: ../../howto/instrumentation.rst:299
253258
msgid "The arguments are the same as for :c:func:`function__entry`"
254-
msgstr ""
259+
msgstr "参数和 :c:func:`function__entry` 相同"
255260

256261
#: ../../howto/instrumentation.rst:303
257262
msgid ""
258263
"This marker indicates a Python line is about to be executed. It is the "
259264
"equivalent of line-by-line tracing with a Python profiler. It is not "
260265
"triggered within C functions."
261-
msgstr ""
266+
msgstr "这个标记表示一个 Python 行即将被执行。它相当于用 Python 分析器逐行追踪。它不会在C函数中触发。"
262267

263268
#: ../../howto/instrumentation.rst:307
264269
msgid "The arguments are the same as for :c:func:`function__entry`."
265-
msgstr ""
270+
msgstr "参数和 :c:func:`function__entry` 相同"
266271

267272
#: ../../howto/instrumentation.rst:311
268273
msgid ""
269274
"Fires when the Python interpreter starts a garbage collection cycle. "
270275
"``arg0`` is the generation to scan, like :func:`gc.collect()`."
271-
msgstr ""
276+
msgstr "当Python解释器启动一个垃圾回收循环时被触发。 ``arg0`` 是要扫描的生成器,如 :func:`gc.collect()`。"
272277

273278
#: ../../howto/instrumentation.rst:316
274279
msgid ""
275280
"Fires when the Python interpreter finishes a garbage collection cycle. "
276281
"``arg0`` is the number of collected objects."
277-
msgstr ""
282+
msgstr "当Python解释器完成一个垃圾回收循环时被触发。``arg0`` 是收集到的对象的数量。"
278283

279284
#: ../../howto/instrumentation.rst:321
280285
msgid ""
281286
"Fires before :mod:`importlib` attempts to find and load the module. ``arg0``"
282287
" is the module name."
283-
msgstr ""
288+
msgstr "在 :mod:`importlib` 试图查找并加载模块之前被触发。``arg0`` 是模块名称。"
284289

285290
#: ../../howto/instrumentation.rst:328
286291
msgid ""
287292
"Fires after :mod:`importlib`'s find_and_load function is called. ``arg0`` is"
288293
" the module name, ``arg1`` indicates if module was successfully loaded."
289294
msgstr ""
295+
"在 :mod:`importlib` 的 find_and_load 函数被调用后被触发。 ``arg0`` 是模块名称, ``arg1`` "
296+
"表示模块是否成功加载。"
290297

291298
#: ../../howto/instrumentation.rst:337
292299
msgid ""
293300
"Fires when :func:`sys.audit` or :c:func:`PySys_Audit` is called. ``arg0`` is"
294301
" the event name as C string, ``arg1`` is a :c:type:`PyObject` pointer to a "
295302
"tuple object."
296303
msgstr ""
304+
"当 :func:`sys.audit` 或 :c:func:`PySys_Audit` 被调用时启动。 ``arg0`` 是事件名称的 C "
305+
"字符串,``arg1`` 是一个指向元组对象的 :c:type:`PyObject` 指针。"
297306

298307
#: ../../howto/instrumentation.rst:345
299308
msgid "SystemTap Tapsets"
300-
msgstr ""
309+
msgstr "SystemTap Tapsets"
301310

302311
#: ../../howto/instrumentation.rst:347
303312
msgid ""
304313
"The higher-level way to use the SystemTap integration is to use a "
305314
"\"tapset\": SystemTap's equivalent of a library, which hides some of the "
306315
"lower-level details of the static markers."
307-
msgstr ""
316+
msgstr "使用SystemTap集成的更高层次的方法是使用 \"tapset\" 。SystemTap 的等效库,它隐藏了静态标记的一些底层细节。"
308317

309318
#: ../../howto/instrumentation.rst:351
310319
msgid "Here is a tapset file, based on a non-shared build of CPython:"
311-
msgstr ""
320+
msgstr "这里是一个基于 CPython 的非共享构建的 tapset 文件。"
312321

313322
#: ../../howto/instrumentation.rst:374
314323
msgid ""
315324
"If this file is installed in SystemTap's tapset directory (e.g. "
316325
"``/usr/share/systemtap/tapset``), then these additional probepoints become "
317326
"available:"
318327
msgstr ""
328+
"如果这个文件安装在 SystemTap 的 tapset 目录下(例如``/usr/share/systemtap/tapset`` "
329+
"),那么这些额外的探测点就会变得可用。"
319330

320331
#: ../../howto/instrumentation.rst:380
321332
msgid ""
322333
"This probe point indicates that execution of a Python function has begun. It"
323334
" is only triggered for pure-Python (bytecode) functions."
324-
msgstr ""
335+
msgstr "这个探针点表示一个Python函数的执行已经开始。它只对纯Python (字节码)函数触发。"
325336

326337
#: ../../howto/instrumentation.rst:385
327338
msgid ""
@@ -330,6 +341,8 @@ msgid ""
330341
"``return``, or via an exception). It is only triggered for pure-Python "
331342
"(bytecode) functions."
332343
msgstr ""
344+
"这个探针点是 :c:func:`python.function.return` 的反义操作,表示一个Python函数的执行已经结束(通过 "
345+
"``return`` 或者异常)。 它只对纯Python (字节码)函数触发。"
333346

334347
#: ../../howto/instrumentation.rst:392
335348
msgid "Examples"
@@ -340,11 +353,11 @@ msgid ""
340353
"This SystemTap script uses the tapset above to more cleanly implement the "
341354
"example given above of tracing the Python function-call hierarchy, without "
342355
"needing to directly name the static markers:"
343-
msgstr ""
356+
msgstr "这个SystemTap脚本使用上面的tapset来更清晰地实现上面给出的跟踪Python函数调用层次结构的例子,而不需要直接命名静态标记。"
344357

345358
#: ../../howto/instrumentation.rst:412
346359
msgid ""
347360
"The following script uses the tapset above to provide a top-like view of all"
348361
" running CPython code, showing the top 20 most frequently-entered bytecode "
349362
"frames, each second, across the whole system:"
350-
msgstr ""
363+
msgstr "下面的脚本使用上面的tapset提供了所有运行中的CPython代码的顶部视图,显示了整个系统中每一秒钟最频繁输入的前20个字节码帧。"

howto/logging-cookbook.po

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
# Translators:
77
# Fei Yin <[email protected]>, 2018
88
# 欢 王 <[email protected]>, 2018
9-
# Meng Du <[email protected]>, 2019
109
# MuSheng Chen <[email protected]>, 2019
1110
# 非法操作 <[email protected]>, 2019
1211
# Freesand Leo <[email protected]>, 2019
1312
# 浩听 王 <[email protected]>, 2019
1413
# Shengjing Zhu <[email protected]>, 2019
14+
# Meng Du <[email protected]>, 2020
1515
#
1616
#, fuzzy
1717
msgid ""
@@ -20,7 +20,7 @@ msgstr ""
2020
"Report-Msgid-Bugs-To: \n"
2121
"POT-Creation-Date: 2020-02-09 12:40+0000\n"
2222
"PO-Revision-Date: 2017-02-16 17:45+0000\n"
23-
"Last-Translator: Shengjing Zhu <zsj950618@gmail.com>, 2019\n"
23+
"Last-Translator: Meng Du <alphanow@gmail.com>, 2020\n"
2424
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2525
"MIME-Version: 1.0\n"
2626
"Content-Type: text/plain; charset=UTF-8\n"
@@ -1393,6 +1393,9 @@ msgid ""
13931393
"pass a parameter to ``foo`` which, if true, will log at ERROR and CRITICAL "
13941394
"levels - otherwise, it only logs at DEBUG, INFO and WARNING levels."
13951395
msgstr ""
1396+
"这个示例脚本有一个简单的函数 ``foo`` ,它只是在所有的日志级别中循环运行,写到 ``sys.stderr`` "
1397+
",说明它要记录在哪个级别上,然后在这个级别上实际记录一个消息。你可以给 ``foo`` 传递一个参数,如果为 true "
1398+
",它将在ERROR和CRITICAL级别记录,否则,它只在DEBUG、INFO和WARNING级别记录。"
13961399

13971400
#: ../../howto/logging-cookbook.rst:2300
13981401
msgid ""
@@ -1405,10 +1408,13 @@ msgid ""
14051408
":class:`~logging.StreamHandler` which writes to ``sys.stderr``, "
14061409
"``logging.ERROR`` and ``100`` respectively."
14071410
msgstr ""
1411+
"脚本只是使用了一个装饰器来装饰 "
1412+
"``foo``,这个装饰器将记录执行所需的条件。装饰器使用一个记录器作为参数,并在调用被装饰的函数期间附加一个内存处理程序。装饰器可以使用目标处理程序、记录级别和缓冲区的容量(缓冲记录的数量)来附加参数。这些参数分别默认为写入``sys.stderr``"
1413+
" 的 :class:`~logging.StreamHandler` , ``logging.ERROR`` 和 ``100``。"
14081414

14091415
#: ../../howto/logging-cookbook.rst:2308
14101416
msgid "Here's the script::"
1411-
msgstr ""
1417+
msgstr "以下是脚本:"
14121418

14131419
#: ../../howto/logging-cookbook.rst:2371
14141420
msgid "When this script is run, the following output should be observed:"

0 commit comments

Comments
 (0)