Skip to content

Commit 42e8313

Browse files
committed
Translate tutorial/appendix.po
1 parent 8a817c1 commit 42e8313

File tree

1 file changed

+52
-7
lines changed

1 file changed

+52
-7
lines changed

tutorial/appendix.po

Lines changed: 52 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ msgstr ""
99
"Project-Id-Version: Python 3.7\n"
1010
"Report-Msgid-Bugs-To: \n"
1111
"POT-Creation-Date: 2018-06-26 18:54+0800\n"
12-
"PO-Revision-Date: 2017-09-22 18:27+0000\n"
12+
"PO-Revision-Date: 2021-06-24 17:59+0800\n"
1313
"Last-Translator: Leon H.\n"
1414
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1515
"tw)\n"
@@ -18,6 +18,7 @@ msgstr ""
1818
"Content-Type: text/plain; charset=UTF-8\n"
1919
"Content-Transfer-Encoding: 8bit\n"
2020
"Plural-Forms: nplurals=1; plural=0;\n"
21+
"X-Generator: Poedit 3.0\n"
2122

2223
#: ../../tutorial/appendix.rst:5
2324
msgid "Appendix"
@@ -29,7 +30,7 @@ msgstr "互動模式"
2930

3031
#: ../../tutorial/appendix.rst:16
3132
msgid "Error Handling"
32-
msgstr ""
33+
msgstr "錯誤處理"
3334

3435
#: ../../tutorial/appendix.rst:18
3536
msgid ""
@@ -43,6 +44,12 @@ msgid ""
4344
"messages are written to the standard error stream; normal output from "
4445
"executed commands is written to standard output."
4546
msgstr ""
47+
"當一個錯誤發生時,直譯器會打印一個錯誤信息和堆棧跟踪。在交互式模式下,它將返"
48+
"回主提示符;當輸入來自文件時,它在打印堆棧跟踪後以非零退出狀態退出。 (由\\ :"
49+
"keyword:`except`\\ 子句在 \\ :keyword:`try`\\ 語句中處理的異常在這種情況下不"
50+
"是錯誤。) 有些錯誤是無條件致命的,會導致非零退出;這適用於內部不一致和一些內"
51+
"存耗盡的情況。所有的錯誤信息都被寫入標準錯誤流;被執行命令的正常輸出被寫入標"
52+
"準輸出。"
4653

4754
#: ../../tutorial/appendix.rst:28
4855
msgid ""
@@ -52,16 +59,24 @@ msgid ""
5259
"the :exc:`KeyboardInterrupt` exception, which may be handled by a :keyword:"
5360
"`try` statement."
5461
msgstr ""
62+
"向主提示符或副提示符輸入中斷字符(通常是\\ :kbd:`Control-C`\\\\ :kbd:"
63+
"`Delete`\\ )會取消輸入並返回到主提示符。 [#]_ 在命令執行過程中輸入一個中斷,"
64+
"會引發\\ :ex:`KeyboardInterrupt`\\ 異常,但可以通過\\ :keyword:`try`\\ 語句來"
65+
"處理。"
5566

5667
#: ../../tutorial/appendix.rst:38
5768
msgid "Executable Python Scripts"
58-
msgstr ""
69+
msgstr "可執行的 Python 腳本"
5970

6071
#: ../../tutorial/appendix.rst:40
6172
msgid ""
6273
"On BSD'ish Unix systems, Python scripts can be made directly executable, "
6374
"like shell scripts, by putting the line ::"
6475
msgstr ""
76+
"在 BSD’ish Unix 系統上,Python 腳本可以直接執行,就像 shell 腳本一樣,通過放"
77+
"置以下行:\n"
78+
"\n"
79+
"::"
6580

6681
#: ../../tutorial/appendix.rst:45
6782
msgid ""
@@ -72,12 +87,16 @@ msgid ""
7287
"(``'\\r\\n'``) line ending. Note that the hash, or pound, character, "
7388
"``'#'``, is used to start a comment in Python."
7489
msgstr ""
90+
"(假設直譯器在用戶的 \\ :envvar:`PATH`\\ 上)在腳本的開頭並給文件一個可執行"
91+
"模式。 ``#!`` 必須是文件的前兩個字符。 在某些平台上,第一行必須以 Unix 樣式的"
92+
"行結尾 (``’\\n’``) 結尾,而不是 Windows (``’\\r\\n’``) 行結尾。 請注意,井"
93+
"號“‘#”用於在 Python 中開始註釋。"
7594

7695
#: ../../tutorial/appendix.rst:52
7796
msgid ""
7897
"The script can be given an executable mode, or permission, using the :"
7998
"program:`chmod` command."
80-
msgstr ""
99+
msgstr "可以使用\\ :program:`chmod`\\ 命令為腳本賦予可執行模式或權限。"
81100

82101
#: ../../tutorial/appendix.rst:59
83102
msgid ""
@@ -87,10 +106,13 @@ msgid ""
87106
"extension can also be ``.pyw``, in that case, the console window that "
88107
"normally appears is suppressed."
89108
msgstr ""
109+
"在Windows系統上,沒有「可執行模式」的概念。 Python安裝程序會自動將``.py``文件"
110+
"與``python.exe``聯繫起來,這樣雙擊Python文件就會作為腳本運行。擴展名也可以是"
111+
"`.pyw``,在這種情況下,通常出現的控制台窗口會被抑制了。"
90112

91113
#: ../../tutorial/appendix.rst:69
92114
msgid "The Interactive Startup File"
93-
msgstr ""
115+
msgstr "交互式啟動文件"
94116

95117
#: ../../tutorial/appendix.rst:71
96118
msgid ""
@@ -100,6 +122,9 @@ msgid ""
100122
"the name of a file containing your start-up commands. This is similar to "
101123
"the :file:`.profile` feature of the Unix shells."
102124
msgstr ""
125+
"當你交互式地使用 Python 時,每次啟動解釋器時執行一些標準命令是非常方便的。你"
126+
"可以通過設置一個名為\\ :envvar:`PYTHONSTARTUP`\\ 的環境變量來實現,該變量是"
127+
"一個包含啟動命令的文件名。這類似於Unix shells的\\ :file:`.profile`\\ 功能。"
103128

104129
#: ../../tutorial/appendix.rst:77
105130
msgid ""
@@ -111,6 +136,10 @@ msgid ""
111136
"qualification in the interactive session. You can also change the prompts "
112137
"``sys.ps1`` and ``sys.ps2`` in this file."
113138
msgstr ""
139+
"這個文件只在交互式會話中被讀取,而不是當Python 從腳本中讀取命令時,也不是當"
140+
"\\ :file:`/dev/tty`\\ 被作為命令的明確來源時(否則表現得像一個交互式會話)。它"
141+
"在執行交互式命令的同一命名空間中執行,因此它所定義或導入的對象可以在交互式會"
142+
"話中不加限定地使用。你也可以在這個文件中改變``sys.ps1``和``sys.ps2``的提示。"
114143

115144
#: ../../tutorial/appendix.rst:85
116145
msgid ""
@@ -120,10 +149,15 @@ msgid ""
120149
"want to use the startup file in a script, you must do this explicitly in the "
121150
"script::"
122151
msgstr ""
152+
"如果你想從當前目錄中讀取一個額外的啟動文件,你可以在全局啟動文件中使用類似"
153+
"``if os.path.isfile(‘.pythonrc.py’): exec(open(‘.pythonrc.py ‘).read()``的代"
154+
"碼進行編程。如果你想在一個腳本中使用啟動文件,你必須在腳本中明確地這樣做:\n"
155+
"\n"
156+
"::"
123157

124158
#: ../../tutorial/appendix.rst:102
125159
msgid "The Customization Modules"
126-
msgstr ""
160+
msgstr "自定義模組"
127161

128162
#: ../../tutorial/appendix.rst:104
129163
msgid ""
@@ -132,6 +166,11 @@ msgid ""
132166
"location of your user site-packages directory. Start Python and run this "
133167
"code::"
134168
msgstr ""
169+
"Python提供了兩個鉤子(Hooks)讓你自定義: \\ :mod:`sitecustomize`\\\\ :"
170+
"mod:`usercustomize`\\ 。要看它是如何工作的,你首先需要找到你的 site-packages "
171+
"的位置。啟動Python並運行這段代碼:\n"
172+
"\n"
173+
"::"
135174

136175
#: ../../tutorial/appendix.rst:112
137176
msgid ""
@@ -140,6 +179,9 @@ msgid ""
140179
"unless it is started with the :option:`-s` option to disable the automatic "
141180
"import."
142181
msgstr ""
182+
"現在,您可以在該目錄中創建一個名為 \\ :file:`usercustomize.py`\\ 的文件,並"
183+
"將您想要的任何內容放入其中。 它會影響 Python 的每次調用,除非它以 \\ :option:"
184+
"`-s`\\ 選項啟動以禁用自動導入。"
143185

144186
#: ../../tutorial/appendix.rst:116
145187
msgid ""
@@ -148,11 +190,14 @@ msgid ""
148190
"imported before :mod:`usercustomize`. See the documentation of the :mod:"
149191
"`site` module for more details."
150192
msgstr ""
193+
"\\ :mod:`sitecustomize`\\ 的工作方式相同,但通常是由計算機的管理員在全局 "
194+
"site-packages目錄下創建,並在\\ :mod:`usercustomize`\\ 之前導入。更多細節請參"
195+
"閱\\ :mod:`site`\\ 模塊的文檔。"
151196

152197
#: ../../tutorial/appendix.rst:123
153198
msgid "Footnotes"
154199
msgstr "註解"
155200

156201
#: ../../tutorial/appendix.rst:124
157202
msgid "A problem with the GNU Readline package may prevent this."
158-
msgstr ""
203+
msgstr "GNU Readline軟件包的一個問題可能會阻止這一點。"

0 commit comments

Comments
 (0)