8000 Merge branch '3.9' of https://github.com/python/python-docs-zh-tw int… · python/python-docs-zh-tw@db26e0c · GitHub
[go: up one dir, main page]

Skip to content

Commit db26e0c

Browse files
committed
Merge branch '3.9' of https://github.com/python/python-docs-zh-tw into index
2 parents e0ae8ac + 30342dd commit db26e0c

File tree

4 files changed

+118
-47
lines changed

4 files changed

+118
-47
lines changed

tutorial/appendix.po

Lines changed: 57 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
# SOME DESCRIPTIVE TITLE.
2-
# Copyright (C) 2001-2018, Python Software Foundation
2+
# Copyright (C) 2001-2021, Python Software Foundation
33
# This file is distributed under the same license as the Python package.
44
#
55
# Translators:
66
# Leon H., 2017
77
msgid ""
88
msgstr ""
9-
"Project-Id-Version: Python 3.7\n"
9+
"Project-Id-Version: Python 3.9\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"
13-
"Last-Translator: Leon H.\n"
12+
"PO-Revision-Date: 2021-07-05 14:35+0800\n"
13+
"Last-Translator: meowmeowcat <meowmeowcat1211@gmail.com>\n"
1414
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1515
"tw)\n"
1616
"Language: zh_TW\n"
1717
"MIME-Version: 1.0\n"
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+
"會引發 :exc:`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 的 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 安裝程式會自動將 ``."
110+
"py`` 檔案與 ``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 shell 的 :file:`.profile` 。"
103128

104129
#: ../../tutorial/appendix.rst:77
105130
msgid ""
@@ -111,6 +136,11 @@ 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+
"它在執行互動式指令的同一命名空間中執行,因此它所定義或 import 的物件可以在互"
142+
"動模式中不加限定地使用。你也可以在這個檔案中改變 ``sys.ps1`` 和 ``sys.ps2`` "
143+
"等提示字元。"
114144

115145
#: ../../tutorial/appendix.rst:85
116146
msgid ""
@@ -120,10 +150,16 @@ msgid ""
120150
"want to use the startup file in a script, you must do this explicitly in the "
121151
"script::"
122152
msgstr ""
153+
"如果你想從當前目錄中讀取一個額外的啟動檔案,你可以在全域啟動檔案中使用類似 "
154+
"``if os.path.isfile(‘.pythonrc.py’): exec(open(‘.pythonrc.py ‘).read()`` 的程"
155+
"式碼設定這個行為。如果你想在一個腳本中使用啟動檔案,你必須在腳本中明確地這樣"
156+
"做:\n"
157+
"\n"
158+
"::"
123159

124160
#: ../../tutorial/appendix.rst:102
125161
msgid "The Customization Modules"
126-
msgstr ""
162+
msgstr "客製化模組"
127163

128164
#: ../../tutorial/appendix.rst:104
129165
msgid ""
@@ -132,6 +168,11 @@ msgid ""
132168
"location of your user site-packages directory. Start Python and run this "
133169
"code::"
134170
msgstr ""
171+
"Python 提供了兩個鉤子(hook)讓你可以將它客製化: :mod:`sitecustomize` 和 :"
172+
"mod:`usercustomize` 。要看它是如何運作的,你首先需要找到你的 site-packages 的"
173+
"位置。啟動 Python 並運行這段程式碼:\n"
174+
"\n"
175+
"::"
135176

136177
#: ../../tutorial/appendix.rst:112
137178
msgid ""
@@ -140,6 +181,9 @@ msgid ""
140181
"unless it is started with the :option:`-s` option to disable the automatic "
141182
"import."
142183
msgstr ""
184+
"現在,您可以在該目錄中創建一個名為 :file:`usercustomize.py` 的檔案,並將您想"
185+
"要的任何內容放入其中。它會影響 Python 的每次呼叫,除非它以 :option:`-s` 選項"
186+
"啟動以禁用自動 import 。"
143187

144188
#: ../../tutorial/appendix.rst:116
145189
msgid ""
@@ -148,11 +192,14 @@ msgid ""
148192
"imported before :mod:`usercustomize`. See the documentation of the :mod:"
149193
"`site` module for more details."
150194
msgstr ""
195+
":mod:`sitecustomize` 的運作方式相同,但通常是由電腦的管理員在全域 site-"
196+
"packages 目錄下創建,並在 :mod:`usercustomize` 之前 import 。更多細節請參閱 :mod:"
197+
"`site` 模組的文件。"
151198

152199
#: ../../tutorial/appendix.rst:123
153200
msgid "Footnotes"
154201
msgstr "註解"
155202

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

tutorial/interactive.po

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
11
# SOME DESCRIPTIVE TITLE.
2-
# Copyright (C) 2001-2018, Python Software Foundation
2+
# Copyright (C) 2001-2021, Python Software Foundation
33
# This file is distributed under the same license as the Python package.
44
#
55
# Translators:
6+
# Steven Hsu <hsuhaochun@gmail.com>, 2021
67
msgid ""
78
msgstr ""
8-
"Project-Id-Version: Python 3.7\n"
9+
"Project-Id-Version: Python 3.9\n"
910
"Report-Msgid-Bugs-To: \n"
1011
"POT-Creation-Date: 2018-06-26 18:54+0800\n"
11-
"PO-Revision-Date: 2015-12-09 17:51+0000\n"
12-
"Last-Translator: Liang-Bo Wang <me@liang2.tw>\n"
12+
"PO-Revision-Date: 2021-06-28 20:45+0800\n"
13+
"Last-Translator: Steven Hsu <hsuhaochun@gmail.com>\n"
1314
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1415
"tw)\n"
1516
"Language: zh_TW\n"
1617
"MIME-Version: 1.0\n"
1718
"Content-Type: text/plain; charset=UTF-8\n"
1819
"Content-Transfer-Encoding: 8bit\n"
1920
"Plural-Forms: nplurals=1; plural=0;\n"
21+
"X-Generator: Poedit 2.4.3\n"
2022

2123
#: ../../tutorial/interactive.rst:5
2224
msgid "Interactive Input Editing and History Substitution"
23-
msgstr ""
25+
msgstr "互動式輸入編輯和歷史記錄替換"
2426

2527
#: ../../tutorial/interactive.rst:7
2628
msgid ""
@@ -30,10 +32,14 @@ msgid ""
3032
"library, which supports various styles of editing. This library has its own "
3133
"documentation which we won't duplicate here."
3234
msgstr ""
35+
"有些版本的 Python 直譯器支援當前輸入內容的編輯和歷史記錄的替換 (history "
36+
"substitution),類似在 Korn shell 和 GNU Bash shell 中的功能。這個功能是用 "
37+
"`GNU Readline`_ 函式庫來實作,它支援多種編輯的風格。這個函式庫有它自己的說明"
38+
"文件,在這裡我們就不重複了。"
3339

3440
#: ../../tutorial/interactive.rst:17
3541
msgid "Tab Completion and History Editing"
36-
msgstr ""
42+
msgstr "Tab 鍵自動完成 (Tab Completion) 和歷史記錄編輯 (History Editing)"
3743

3844
#: ../../tutorial/interactive.rst:19
3945
msgid ""
@@ -49,10 +55,19 @@ msgid ""
4955
"python_history` in your user directory. The history will be available again "
5056
"during the next interactive interpreter session."
5157
msgstr ""
58+
"在直譯器啟動的時候,變數和模組名稱的自動完成功能會被\\ :ref:`自動啟用 "
59+
"<rlcompleter-config>`\\ ,所以可以用 :kbd:`Tab` 鍵來呼叫自動完成函式;它會查"
60+
"看 Python 的陳述式名稱、當前區域變數名稱和可用模組名稱。對於像是 ``string."
61+
"a`` 的點分隔運算式 (dotted expression),它會對最後一個 ``'.'`` 之前的運算式求"
62+
"值,然後根據求值結果物件的屬性,給予自動完成的建議。請注意,如果一個物件有 :"
63+
"meth:`__getattr__` method(方法),同時又是該運算式的一部份,這樣可能會執行應"
64+
"用程式自定義的程式碼。預設設定也會把你的指令歷史記錄儲存在你的使用者資料夾"
65+
"內,一個名為 :file:`.python_history` 的檔案中。在下一次啟動互動式直譯器時,這"
66+
"些歷史記錄依然可以被使用。"
5267

5368
#: ../../tutorial/interactive.rst:36
5469
msgid "Alternatives to the Interactive Interpreter"
55-
msgstr ""
70+
msgstr "互動式直譯器的替代方案"
5671

5772
#: ../../tutorial/interactive.rst:38
5873
msgid ""
@@ -63,6 +78,11 @@ msgid ""
6378
"interpreter's symbol table. A command to check (or even suggest) matching "
6479
"parentheses, quotes, etc., would also be useful."
6580
msgstr ""
81+
"與早期版本的直譯器相比,上述功能的出現的確是一個巨大的進步;但還是有一些願望"
82+
"沒有被實現:如果能在每次換行時給予適當的縮排建議(剖析器 (parser) 知道下一行"
83+
"是否需要縮排標記 (indent token)),那就更棒了。自動完成機制可能會使用直譯器的"
84+
"符號表。若有一個命令能夠檢查(或甚至建議)括號、引號和其他符號的匹配,那也會"
85+
"很有用。"
6686

6787
#: ../../tutorial/interactive.rst:45
6888
msgid ""
@@ -72,3 +92,6 @@ msgid ""
7292
"customized and embedded into other applications. Another similar enhanced "
7393
"interactive environment is bpython_."
7494
msgstr ""
95+
"有一個功能增強的互動式直譯器替代方案,已經存在一段時間,稱為 IPython_\\ ,它"
96+
"具有 Tab 鍵自動完成、物件探索和進階歷史記錄管理等特色。它也可以完全客製化並被"
97+
"嵌入到其他應用程式中。另一個類似的增強型互動式環境,稱為 bpython_\\ 。"

tutorial/stdlib.po

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ msgstr ""
1414
"Project-Id-Version: Python 3.9\n"
1515
"Report-Msgid-Bugs-To: \n"
1616
"POT-Creation-Date: 2020-06-20 18:08+0800\n"
17-
"PO-Revision-Date: 2021-06-29 23:01+0800\n"
17+
"PO-Revision-Date: 2021-07-06 12:17+0800\n"
1818
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1919
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
2020
"tw)\n"
@@ -348,9 +348,8 @@ msgid ""
348348
"remote procedure calls into an almost trivial task. Despite the modules "
349349
"names, no direct knowledge or handling of XML is needed."
350350
msgstr ""
351-
"使用 :mod:`xmlrpc.client` 和 :mod:`xmlrpc.server` 模組使實作遠端控制變得更為"
352-
"容易。使用前也不需要先了解相關知識或是掌握 XML 的技能,就能直接透過名稱使用模"
353-
"組。"
351+
"使用 :mod:`xmlrpc.client` 和 :mod:`xmlrpc.server` 模組使實作遠端程序呼叫變得"
352+
"更為容易。即使模組名稱裡有 XML,使用者並不需要直接操作 XML 檔案或事先具備相關知識。"
354353

355354
#: ../../tutorial/stdlib.rst:332
356355
msgid ""
@@ -363,8 +362,8 @@ msgid ""
363362
msgstr ""
364363
"函式庫 :mod:`email` 套件用來管理 MIME 和其他 :rfc:`2822` 相關電子郵件訊息的文"
365364
"件。相異於 :mod:`smtplib` 和 :mod:`poplib` 這些實際用來發送與接收訊息的模組,"
366-
"email 套件擁有更完整的工具設置提供建置與解析複雜訊息的結構(包含附件檔案)"
367-
"實作網路傳送之間的解碼與標頭協定。"
365+
"email 套件擁有更完整的工具集,可用於建立與解析複雜訊息結構(包含附件檔案)"
366+
"以及實作編碼與標頭協定。"
368367

369368
#: ../../tutorial/stdlib.rst:339
370369
msgid ""
@@ -377,10 +376,10 @@ msgid ""
377376
"applications and other tools."
378377
msgstr ""
379378
":mod:`json` 套件對 JSON 資料交換格式的解析,提供強大的支援。\\ :mod:`csv` 模"
380-
"組則提供直接讀寫以逗號分隔值的檔案格式,支援一般資料庫與電子表格\\ :mod:"
381-
"`xml.etree.ElementTree`\\\\ :mod:`xml.dom` 與 :mod:`xml.sax` 套件則支援 "
382-
"XML 的處理。綜觀所有,這些模組和套件都簡化了 Python 應用程式與其他工具之間的"
383-
"資料交換。"
379+
"組則提供直接讀寫 CSV(以逗號分隔值的檔案格式,通常資料庫和電子表格都有支援)\\ :"
380+
"mod:`xml.etree.ElementTree`\\\\ :mod:`xml.dom` 與 :mod:`xml.sax` 套件則支"
381+
"XML 的處理。綜觀所有,這些模組和套件都簡化了 Python 應用程式與其他工具之間"
382+
"的資料交換。"
384383

385384
#: ../../tutorial/stdlib.rst:348
386385
msgid ""

0 commit comments

Comments
 (0)
0