11# SOME DESCRIPTIVE TITLE.
2- # Copyright (C) 2001-2021 , Python Software Foundation
2+ # Copyright (C) 2001-2024 , Python Software Foundation
33# This file is distributed under the same license as the Python package.
44# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55#
66# Translators:
77# eric R <[email protected] >, 20208899# Freesand Leo <[email protected] >, 202010+ # Rafael Fontenelle <[email protected] >, 20241011#
1112#, fuzzy
1213msgid ""
1314msgstr ""
1415"Project-Id-Version : Python 3.8\n "
1516"Report-Msgid-Bugs-To : \n "
16- "POT-Creation-Date : 2021-01-01 16:06 +0000\n "
17+ "POT-Creation-Date : 2024-02-23 23:39 +0000\n "
1718"PO-Revision-Date : 2020-05-30 12:16+0000\n "
18- "Last-Translator : Freesand Leo <yuqinju@163 .com>, 2020 \n "
19- "Language-Team : Chinese (China) (https://www .transifex.com/python-doc/teams/5390/zh_CN/)\n "
19+ "Last-Translator : Rafael Fontenelle <rffontenelle@gmail .com>, 2024 \n "
20+ "Language-Team : Chinese (China) (https://app .transifex.com/python-doc/teams/5390/zh_CN/)\n "
2021"MIME-Version : 1.0\n "
2122"Content-Type : text/plain; charset=UTF-8\n "
2223"Content-Transfer-Encoding : 8bit\n "
@@ -25,11 +26,11 @@ msgstr ""
2526
2627#: ../../tutorial/interpreter.rst:5
2728msgid "Using the Python Interpreter"
28- msgstr "使用 Python 解释器 "
29+ msgstr "使用 Python 的解释器 "
2930
3031#: ../../tutorial/interpreter.rst:11
3132msgid "Invoking the Interpreter"
32- msgstr "调用解释器 "
33+ msgstr "唤出解释器 "
3334
3435#: ../../tutorial/interpreter.rst:13
3536msgid ""
@@ -48,8 +49,8 @@ msgid ""
4849"local Python guru or system administrator. (E.g., :file:`/usr/local/python`"
4950" is a popular alternative location.)"
5051msgstr ""
51- "就能运行了 [#]_ 。安装时可以选择安装目录,所以解释器也可能在别的地方;可以问问你身边的 Python 大牛,或者你的系统管理员。(比如 "
52- ":file:`/usr/local/python` 也是比较常用的备选路径 )"
52+ "这样,就可以在 shell 中运行 Python 了 [#]_ 。因为可以选择安装目录,解释器也有可能安装在别的位置;如果还不明白,就去问问身边的 "
53+ "Python 大神或系统管理员。(例如,常见备选路径还有 :file:`/usr/local/python`。 )"
5354
5455#: ../../tutorial/interpreter.rst:26
5556msgid ""
@@ -70,8 +71,8 @@ msgid ""
7071" exit status. If that doesn't work, you can exit the interpreter by typing "
7172"the following command: ``quit()``."
7273msgstr ""
73- "在主提示符中输入文件结束字符(在 Unix 系统中是 :kbd:`Control-D`,Windows 系统中是 "
74- ":kbd:`Control-Z`)就退出解释器并返回退出状态为0。如果这样不管用,你还可以写这个命令退出 :``quit()``。"
74+ "在主提示符中,输入文件结束符( Unix 里是 :kbd:`Control-D`,Windows 里是 "
75+ ":kbd:`Control-Z`),就会退出解释器,退出状态码为 0。如果不能退出,还可以输入这个命令 :``quit()``。"
7576
7677#: ../../tutorial/interpreter.rst:36
7778msgid ""
@@ -85,11 +86,10 @@ msgid ""
8586"echoed, command line editing isn't available; you'll only be able to use "
8687"backspace to remove characters from the current line."
8788msgstr ""
88- "解释器的行编辑功能在支持 `GNU Readline "
89- "<https://tiswww.case.edu/php/chet/readline/rltop.html>`_ "
90- "库的系统中也包括交互式编辑,历史替换和代码补全等。 检测是否支持行编辑最快速的方式是在首次出现 Python 提示符时输入 "
91- ":kbd:`Control-P`。 如果听到“哔”提示音,就说明支持行编辑;请参阅附录 :ref:`tut-interacting` "
92- "了解有关功能键的介绍。 如果什么都没发生,或是回显了 ``^P``,说明不支持行编辑;你只能用退格键从当前行中删除字符。"
89+ "在支持 `GNU Readline <https://tiswww.case.edu/php/chet/readline/rltop.html>`_ "
90+ "库的系统中,解释器的行编辑功能包括交互式编辑、历史替换、代码补全等。检测是否支持命令行编辑最快速的方式是,在首次出现 Python 提示符时,输入 "
91+ ":kbd:`Control-P`。听到“哔”提示音,说明支持行编辑;请参阅附录 :ref:`tut-"
92+ "interacting`,了解功能键。如果没有反应,或回显了 ``^P``,则说明不支持行编辑;只能用退格键删除当前行的字符。"
9393
9494#: ../../tutorial/interpreter.rst:46
9595msgid ""
@@ -98,8 +98,8 @@ msgid ""
9898"interactively; when called with a file name argument or with a file as "
9999"standard input, it reads and executes a *script* from that file."
100100msgstr ""
101- "解释器运行的时候有点像 Unix 命令行:在一个标准输入 tty "
102- "设备上调用,它能交互式地读取和执行命令;调用时提供文件名参数,或者有个文件重定向到标准输入的话,它就会读取和执行文件中的 *脚本*。"
101+ "解释器的操作方式类似 Unix Shell:用与 tty "
102+ "设备关联的标准输入调用时,可以交互式地读取和执行命令;以文件名参数,或标准输入文件调用时,则读取并执行文件中的 *脚本*。"
103103
104104#: ../../tutorial/interpreter.rst:51
105105msgid ""
@@ -119,19 +119,19 @@ msgid ""
119119"``python -m module [arg] ...``, which executes the source file for *module* "
120120"as if you had spelled out its full name on the command line."
121121msgstr ""
122- "有些 Python 模块也可以作为脚本使用。可以这样输入 :``python -m module [arg] ...``,这会执行 *module* "
123- "的源文件,就跟你在命令行把路径写全了一样 。"
122+ "Python 模块也可以当作脚本使用。输入 :``python -m module [arg] ...``,会执行 *module* "
123+ "的源文件,这跟在命令行把路径写全了一样 。"
124124
125125#: ../../tutorial/interpreter.rst:61
126126msgid ""
127127"When a script file is used, it is sometimes useful to be able to run the "
128128"script and enter interactive mode afterwards. This can be done by passing "
129129":option:`-i` before the script."
130- msgstr "在运行脚本的时候,有时可能也会需要在运行后进入交互模式。这种时候在文件参数前 ,加上选项 :option:`-i` 就可以了。"
130+ msgstr "在交互模式下运行脚本文件,只要在脚本名称参数前 ,加上选项 :option:`-i` 就可以了。"
131131
132132#: ../../tutorial/interpreter.rst:65
133133msgid "All command line options are described in :ref:`using-on-general`."
134- msgstr "关于所有的命令行选项,请参考 :ref:`using-on-general`。"
134+ msgstr "命令行的所有选项详见 :ref:`using-on-general`。"
135135
136136#: ../../tutorial/interpreter.rst:71
137137msgid "Argument Passing"
@@ -152,12 +152,12 @@ msgid ""
152152"interpreter's option processing but left in ``sys.argv`` for the command or"
153153" module to handle."
154154msgstr ""
155- "如果可能的话,解释器会读取命令行参数,转化为字符串列表存入 ``sys`` 模块中的 ``argv`` 变量中。执行命令 ``import sys`` "
156- "你可以导入这个模块并访问这个列表。这个列表最少也会有一个元素;如果没有给定输入参数 ,``sys.argv[0]`` 就是个空字符串。如果给定的脚本名是 "
157- "``'-'`` (表示标准输入) ,``sys.argv[0]`` 就是 ``'-'``。使用 :option:`-c` *command* "
158- "时,``sys.argv[0]`` 就会是 ``'-c'``。如果使用选项 :option:`-m` *module*,``sys.argv[0]`` "
159- "就是包含目录的模块全名。在 :option:`-c` *command* 或 :option:`-m` *module* "
160- "之后的选项不会被解释器处理,而会直接留在 ``sys.argv`` 中给命令或模块来处理 。"
155+ "解释器读取命令行参数,把脚本名与其他参数转化为字符串列表存到 ``sys`` 模块的 ``argv`` 变量里。执行 ``import "
156+ "sys``,可以导入这个模块,并访问该列表。该列表最少有一个元素;未给定输入参数时 ,``sys.argv[0]`` 是空字符串。给定脚本名是 "
157+ "``'-'`` (标准输入)时 ,``sys.argv[0]`` 是 ``'-'``。使用 :option:`-c` *command* "
158+ "时,``sys.argv[0]`` 是 ``'-c'``。如果使用选项 :option:`-m` *module*,``sys.argv[0]`` "
159+ "就是包含目录的模块全名。解释器不处理 :option:`-c` *command* 或 :option:`-m` *module* "
160+ "之后的选项,而是直接留在 ``sys.argv`` 中由命令或模块来处理 。"
161161
162162#: ../../tutorial/interpreter.rst:89
163163msgid "Interactive Mode"
@@ -172,19 +172,19 @@ msgid ""
172172"dots (``...``). The interpreter prints a welcome message stating its version"
173173" number and a copyright notice before printing the first prompt:"
174174msgstr ""
175- "在终端(tty)输入并执行指令时,我们说解释器是运行在 *交互模式(interactive mode)*。在这种模式中,它会显示 "
176- "*主提示符(primary prompt) *,提示输入下一条指令,通常用三个大于号 (``>>>``)表示;连续输入行的时候,它会显示 "
177- "*次要提示符*,默认是三个点(``...``)。进入解释器时,它会先显示欢迎信息 、版本信息、版权声明,然后就会出现提示符 :"
175+ "在终端(tty)输入并执行指令时,解释器在 *交互模式(interactive mode)* 中运行 。在这种模式中,会显示 "
176+ "*主提示符*,提示输入下一条指令,主提示符通常用三个大于号 (``>>>``)表示;输入连续行时,显示 "
177+ "*次要提示符*,默认是三个点(``...``)。进入解释器时,首先显示欢迎信息 、版本信息、版权声明,然后才是提示符 :"
178178
179179#: ../../tutorial/interpreter.rst:108
180180msgid ""
181181"Continuation lines are needed when entering a multi-line construct. As an "
182182"example, take a look at this :keyword:`if` statement::"
183- msgstr "多行指令需要在连续的多行中输入。比如, 以 :keyword:`if` 为例:"
183+ msgstr "输入多行架构的语句时,要用连续行。 以 :keyword:`if` 为例:"
184184
185185#: ../../tutorial/interpreter.rst:118
186186msgid "For more on interactive mode, see :ref:`tut-interac`."
187- msgstr "有关交互模式的更多内容,请见 :ref:`tut-interac`。"
187+ msgstr "交互模式的内容详见 :ref:`tut-interac`。"
188188
189189#: ../../tutorial/interpreter.rst:124
190190msgid "The Interpreter and Its Environment"
@@ -204,36 +204,35 @@ msgid ""
204204"properly, your editor must recognize that the file is UTF-8, and it must use"
205205" a font that supports all the characters in the file."
206206msgstr ""
207- "默认情况下,Python 源码文件以 UTF-8 "
208- "编码方式处理。在这种编码方式中,世界上大多数语言的字符都可以同时用于字符串字面值、变量或函数名称以及注释中——尽管标准库中只用常规的 ASCII "
209- "字符作为变量或函数名,而且任何可移植的代码都应该遵守此约定。要正确显示这些字符,你的编辑器必须能识别 UTF-8 "
210- "编码,而且必须使用能支持打开的文件中所有字符的字体。"
207+ "默认情况下,Python 源码文件的编码是 UTF-8。这种编码支持世界上大多数语言的字符,可以用于字符串字面值、变量、函数名及注释 —— "
208+ "尽管标准库只用常规的 ASCII 字符作为变量名或函数名,可移植代码都应遵守此约定。要正确显示这些字符,编辑器必须能识别 UTF-8 "
209+ "编码,而且必须使用支持文件中所有字符的字体。"
211210
212211#: ../../tutorial/interpreter.rst:140
213212msgid ""
214213"To declare an encoding other than the default one, a special comment line "
215214"should be added as the *first* line of the file. The syntax is as follows::"
216- msgstr "如果不使用默认编码,要声明文件所使用的编码 ,文件的 *第一* 行要写成特殊的注释。语法如下所示 :"
215+ msgstr "如果不使用默认编码,则要声明文件的编码 ,文件的 *第一* 行要写成特殊注释。句法如下 :"
217216
218217#: ../../tutorial/interpreter.rst:145
219218msgid ""
220219"where *encoding* is one of the valid :mod:`codecs` supported by Python."
221- msgstr "其中 *encoding* 可以是 Python 支持的任意一种 :mod:`codecs`。"
220+ msgstr "其中, *encoding* 可以是 Python 支持的任意一种 :mod:`codecs`。"
222221
223222#: ../../tutorial/interpreter.rst:147
224223msgid ""
225224"For example, to declare that Windows-1252 encoding is to be used, the first "
226225"line of your source code file should be::"
227- msgstr "比如,要声明使用 Windows-1252 编码,你的源码文件要写成 :"
226+ msgstr "比如,声明使用 Windows-1252 编码,源码文件要写成 :"
228227
229228#: ../../tutorial/interpreter.rst:152
230229msgid ""
231230"One exception to the *first line* rule is when the source code starts with a"
232231" :ref:`UNIX \" shebang\" line <tut-scripts>`. In this case, the encoding "
233232"declaration should be added as the second line of the file. For example::"
234233msgstr ""
235- "关于 *第一行* 规则的一种例外情况是 ,源码以 :ref:`UNIX \" shebang\" 行 <tut-scripts>` "
236- "开头。这种情况下,编码声明就要写在文件的第二行 。例如:"
234+ "*第一行* 的规则也有一种例外情况 ,源码以 :ref:`UNIX \" shebang\" 行 <tut-scripts>` "
235+ "开头。此时,编码声明要写在文件的第二行 。例如:"
237236
238237#: ../../tutorial/interpreter.rst:160
239238msgid "Footnotes"
@@ -245,4 +244,4 @@ msgid ""
245244"executable named ``python``, so that it does not conflict with a "
246245"simultaneously installed Python 2.x executable."
247246msgstr ""
248- "在Unix系统中, Python 3.x解释器默认安装后的执行文件并不叫作 ``python``,这样才不会与同时安装的Python 2.x冲突 。"
247+ "Unix 系统中,为了不与同时安装的 Python 2.x 冲突,Python 3.x 解释器默认安装的执行文件名不是 ``python``。"
0 commit comments