-
-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathcgitb.po
More file actions
127 lines (116 loc) · 6.96 KB
/
cgitb.po
File metadata and controls
127 lines (116 loc) · 6.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2025, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# python-doc bot, 2025
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.9\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-03 16:35+0000\n"
"PO-Revision-Date: 2025-09-22 17:54+0000\n"
"Last-Translator: python-doc bot, 2025\n"
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: ../../library/cgitb.rst:2
msgid ":mod:`cgitb` --- Traceback manager for CGI scripts"
msgstr ":mod:`cgitb` --- 用于 CGI 脚本的回溯管理器"
#: ../../library/cgitb.rst:11
msgid "**Source code:** :source:`Lib/cgitb.py`"
msgstr "**源代码:** :source:`Lib/cgitb.py`"
#: ../../library/cgitb.rst:19
msgid ""
"The :mod:`cgitb` module is deprecated (see :pep:`PEP 594 <594#cgitb>` for "
"details)."
msgstr ":mod:`cgitb` 模块已被弃用(请参阅 :pep:`PEP 594 <594#cgitb>` 了解详情)。"
#: ../../library/cgitb.rst:25
msgid ""
"The :mod:`cgitb` module provides a special exception handler for Python "
"scripts. (Its name is a bit misleading. It was originally designed to "
"display extensive traceback information in HTML for CGI scripts. It was "
"later generalized to also display this information in plain text.) After "
"this module is activated, if an uncaught exception occurs, a detailed, "
"formatted report will be displayed. The report includes a traceback showing"
" excerpts of the source code for each level, as well as the values of the "
"arguments and local variables to currently running functions, to help you "
"debug the problem. Optionally, you can save this information to a file "
"instead of sending it to the browser."
msgstr ""
":mod:`cgitb` 模块提供了用于 Python 脚本的特殊异常处理程序。 (这个名称有一点误导性。 它最初是设计用来显示 HTML 格式的 "
"CGI 脚本详细回溯信息。 但后来被一般化为也可显示纯文本格式的回溯信息。) 激活这个模块之后,如果发生了未被捕获的异常,将会显示详细的已格式化的报告。"
" 报告显示内容包括每个层级的源代码摘录,还有当前正在运行的函数的参数和局部变量值,以帮助你调试问题。 "
"你也可以选择将此信息保存至文件而不是将其发送至浏览器。"
#: ../../library/cgitb.rst:35
msgid ""
"To enable this feature, simply add this to the top of your CGI script::"
msgstr "要启用此特性,只需简单地将此代码添加到你的 CGI 脚本的最顶端::"
#: ../../library/cgitb.rst:40
msgid ""
"The options to the :func:`enable` function control whether the report is "
"displayed in the browser and whether the report is logged to a file for "
"later analysis."
msgstr ":func:`enable` 函数的选项可以控制是将报告显示在浏览器中,还是将报告记录到文件供以后进行分析。"
#: ../../library/cgitb.rst:49
msgid ""
"This function causes the :mod:`cgitb` module to take over the interpreter's "
"default handling for exceptions by setting the value of "
":attr:`sys.excepthook`."
msgstr "此函数可通过设置 :attr:`sys.excepthook` 的值以使 :mod:`cgitb` 模块接管解释器默认的异常处理机制。"
#: ../../library/cgitb.rst:52
msgid ""
"The optional argument *display* defaults to ``1`` and can be set to ``0`` to"
" suppress sending the traceback to the browser. If the argument *logdir* is "
"present, the traceback reports are written to files. The value of *logdir* "
"should be a directory where these files will be placed. The optional "
"argument *context* is the number of lines of context to display around the "
"current line of source code in the traceback; this defaults to ``5``. If the"
" optional argument *format* is ``\"html\"``, the output is formatted as "
"HTML. Any other value forces plain text output. The default value is "
"``\"html\"``."
msgstr ""
"可选参数 *display* 默认为 ``1`` 并可被设为 ``0`` 来停止将回溯发送至浏览器。 如果给出了参数 "
"*logdir*,则回溯会被写入文件。 *logdir* 的值应当是一个用于存放所写入文件的目录。 可选参数 *context* "
"是要在回溯中的当前源代码行前后显示的上下文行数;默认为 ``5``。 如果可选参数 *format* 为 ``\"html\"``,输出将为 HTML "
"格式。 任何其它值都会强制启用纯文本输出。 默认取值为 ``\"html\"``。"
#: ../../library/cgitb.rst:64
msgid ""
"This function handles the exception described by *info* (a 3-tuple "
"containing the result of :func:`sys.exc_info`), formatting its traceback as "
"text and returning the result as a string. The optional argument *context* "
"is the number of lines of context to display around the current line of "
"source code in the traceback; this defaults to ``5``."
msgstr ""
"此函数用于处理 *info* (一个包含 :func:`sys.exc_info` 返回结果的 3 元组) "
"所描述的异常,将其回溯格式化为文本并将结果作为字符串返回。 可选参数 *context* 是要在回溯中的当前源码行前后显示的上下文行数;默认为 "
"``5``。"
#: ../../library/cgitb.rst:73
msgid ""
"This function handles the exception described by *info* (a 3-tuple "
"containing the result of :func:`sys.exc_info`), formatting its traceback as "
"HTML and returning the result as a string. The optional argument *context* "
"is the number of lines of context to display around the current line of "
"source code in the traceback; this defaults to ``5``."
msgstr ""
"此函数用于处理 *info* (一个包含 :func:`sys.exc_info` 返回结果的 3 元组) 所描述的异常,将其回溯格式化为 HTML "
"并将结果作为字符串返回。 可选参数 *context* 是要在回溯中的当前源码行前后显示的上下文行数;默认为 ``5``。"
#: ../../library/cgitb.rst:82
msgid ""
"This function handles an exception using the default settings (that is, show"
" a report in the browser, but don't log to a file). This can be used when "
"you've caught an exception and want to report it using :mod:`cgitb`. The "
"optional *info* argument should be a 3-tuple containing an exception type, "
"exception value, and traceback object, exactly like the tuple returned by "
":func:`sys.exc_info`. If the *info* argument is not supplied, the current "
"exception is obtained from :func:`sys.exc_info`."
msgstr ""
"此函数使用默认设置处理异常(即在浏览器中显示报告,但不记录到文件)。 当你捕获了一个异常并希望使用 :mod:`cgitb` 来报告它时可以使用此函数。"
" 可选的 *info* 参数应为一个包含异常类型,异常值和回溯对象的 3 元组,与 :func:`sys.exc_info` 所返回的元组完全一致。 "
"如果未提供 *info* 参数,则会从 :func:`sys.exc_info` 获取当前异常。"