2
2
# This file is distributed under the same license as the Python package.
3
3
#
4
4
# Translators:
5
+ # Liang-Bo Wang <me@liang2.tw>, 2015
6
+ # Dr-XYZ <dr.xyz.tw@gmail.com>, 2025
5
7
msgid ""
6
8
msgstr ""
7
9
"Project-Id-Version : Python 3.13\n "
8
10
"Report-Msgid-Bugs-To : \n "
9
11
"POT-Creation-Date : 2024-10-30 00:13+0000\n "
10
- "PO-Revision-Date : 2015-12-09 17:51+0000 \n "
11
- "Last-Translator : Liang-Bo Wang <me@liang2.tw >\n "
12
+ "PO-Revision-Date : 2025-07-17 17:00+0800 \n "
13
+ "Last-Translator : Dr-XYZ <dr.xyz.tw@gmail.com >\n "
12
14
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
13
15
"tw)\n "
14
16
"Language : zh_TW\n "
@@ -31,6 +33,8 @@ msgid ""
31
33
"modules. The documentation can be presented as pages of text on the "
32
34
"console, served to a web browser, or saved to HTML files."
33
35
msgstr ""
36
+ ":mod:`!pydoc` 模組會自動從 Python 模組產生文件。文件可以以文字頁面的形式呈現"
37
+ "在主控台上、提供給網頁瀏覽器,或儲存為 HTML 檔案。"
34
38
35
39
#: ../../library/pydoc.rst:23
36
40
msgid ""
@@ -42,6 +46,11 @@ msgid ""
42
46
"the source file, or at the top of the module (see :func:`inspect."
43
47
"getcomments`)."
44
48
msgstr ""
49
+ "對於模組、類別、函式和方法,所顯示的文件是從物件的說明字串(也就是物件"
50
+ "的 :attr:`~definition.__doc__` 屬性)以及遞迴地從其可文件化成員的說明字串所"
51
+ "取得。如果沒有說明字串,:mod:`!pydoc` 會嘗試從原始碼檔案中,類別、函式或方法"
52
+ "定義正上方的註解區塊,或從模組的頂部取得描述(參見 :func:`inspect."
53
+ "getcomments`)。"
45
54
46
55
#: ../../library/pydoc.rst:30
47
56
msgid ""
@@ -51,6 +60,10 @@ msgid ""
51
60
"be viewed from outside the Python interpreter by running :program:`pydoc` as "
52
61
"a script at the operating system's command prompt. For example, running ::"
53
62
msgstr ""
63
+ "內建函式 :func:`help` 會在互動式直譯器中呼叫線上幫助系統,它會使用 :mod:`!"
64
+ "pydoc` 在主控台上以文字形式產生文件。同樣的文字文件也可以在 Python 直譯器外部"
65
+ "檢視,方法是在作業系統的命令提示字元中,將 :program:`pydoc` 當作腳本執行。例"
66
+ "如,執行: ::"
54
67
55
68
#: ../../library/pydoc.rst:36
56
69
msgid "python -m pydoc sys"
@@ -67,6 +80,12 @@ msgid ""
67
80
"system, such as a slash in Unix), and refers to an existing Python source "
68
81
"file, then documentation is produced for that file."
69
82
msgstr ""
83
+ "在 shell 提示字元下,將會顯示 :mod:`sys` 模組的文件,其風格類似於 Unix :"
84
+ "program:`man` 命令所顯示的手冊頁面。:program:`pydoc` 的引數可以是函式、模組或"
85
+ "套件的名稱,或是一個指向模組中或套件中模組內的類別、方法或函式的點號參照 (dotted reference)。如"
86
+ "果 :program:`pydoc` 的引數看起來像一個路徑(也就是說,它包含你作業系統的路徑"
87
+ "分隔符,例如 Unix 中的斜線),並且指向一個已存在的 Python 原始碼檔案,那麼就"
88
+ "會為該檔案產生文件。"
70
89
71
90
#: ../../library/pydoc.rst:49
72
91
msgid ""
@@ -75,6 +94,9 @@ msgid ""
75
94
"executed on that occasion. Use an ``if __name__ == '__main__':`` guard to "
76
95
"only execute code when a file is invoked as a script and not just imported."
77
96
msgstr ""
97
+ "為了找到物件及其文件,:mod:`!pydoc` 會引入要文件化的模組。因此,任何在模組層"
98
+ "級的程式碼都會在那個時候被執行。使用 ``if __name__ == '__main__':`` 的防護措"
99
+ "施,可以確保程式碼只在檔案作為腳本被呼叫時執行,而不會在被引入時就執行。"
78
100
79
101
#: ../../library/pydoc.rst:54
80
102
msgid ""
@@ -83,13 +105,18 @@ msgid ""
83
105
"envvar:`PAGER` environment variable is set, :program:`pydoc` will use its "
84
106
"value as a pagination program. When both are set, :envvar:`MANPAGER` is used."
85
107
msgstr ""
108
+ "當在主控台印出輸出內容時,:program:`pydoc` 會嘗試將輸出內容做分頁以便於閱讀。如果 :envvar:"
109
+ "`MANPAGER` 或 :envvar:`PAGER` 環境變數其中之一被設定,:program:`pydoc` 將會使"
110
+ "用其值作為分頁程式。當兩者都被設定時,會使用 :envvar:`MANPAGER`。"
86
111
87
112
#: ../../library/pydoc.rst:59
88
113
msgid ""
89
114
"Specifying a ``-w`` flag before the argument will cause HTML documentation "
90
115
"to be written out to a file in the current directory, instead of displaying "
91
116
"text on the console."
92
117
msgstr ""
118
+ "在引數前指定一個 ``-w`` 旗標,將會使 HTML 文件被寫入目前目錄的一個檔案中,而"
119
+ "不是在主控台上顯示文字。"
93
120
94
121
#: ../../library/pydoc.rst:63
95
122
msgid ""
@@ -98,6 +125,9 @@ msgid ""
98
125
"manner similar to the Unix :program:`man` command. The synopsis line of a "
99
126
"module is the first line of its documentation string."
100
127
msgstr ""
128
+ "在引數前指定一個 ``-k`` 旗標,將會搜尋所有可用模組的摘要行 (synopsis lines),尋找作為引數給出"
129
+ "的關鍵字,其方式同樣類似於 Unix 的 :program:`man` 命令。一個模組的摘要行是其"
130
+ "說明字串的第一行。"
101
131
102
132
#: ../../library/pydoc.rst:68
103
133
msgid ""
@@ -108,6 +138,10 @@ msgid ""
108
138
"preferred web browser. Specifying ``0`` as the port number will select an "
109
139
"arbitrary unused port."
110
140
msgstr ""
141
+ "你也可以使用 :program:`pydoc` 在本機上啟動一個 HTTP 伺服器,它會向來訪的網頁"
142
+ "瀏覽器提供文件。:program:`python -m pydoc -p 1234` 將會在 1234 埠啟動一個 "
143
+ "HTTP 伺服器,讓你可以用你偏好的網頁瀏覽器在 ``http://localhost:1234/`` 瀏覽文"
144
+ "件。指定 ``0`` 作為通訊埠編號將會選擇一個任意未使用的通訊埠。"
111
145
112
146
#: ../../library/pydoc.rst:74
113
147
msgid ""
@@ -117,6 +151,10 @@ msgid ""
117
151
"host name that the server responds to. During development this is "
118
152
"especially useful if you want to run pydoc from within a container."
119
153
msgstr ""
154
+ ":program:`python -m pydoc -n <hostname>` 將會啟動伺服器並在給定的主機名稱上監"
155
+ "聽。預設的主機名稱是 'localhost',但如果你希望伺服器能被其他機器連線,你可能"
156
+ "會想改變伺服器回應的主機名稱。在開發期間,如果你想在容器內執行 pydoc,這點特"
157
+ "別有用。"
120
158
121
159
#: ../../library/pydoc.rst:80
122
160
msgid ""
@@ -126,6 +164,11 @@ msgid ""
126
164
"modules with a keyword in their synopsis line, and go to the *Module index*, "
127
165
"*Topics* and *Keywords* pages."
128
166
msgstr ""
167
+ ":program:`python -m pydoc -b` 將會啟動伺服器,並額外開啟一個網頁瀏覽器到模組"
168
+ "索引頁面。每個提供的頁面頂部都有一個導覽列,你可以在那裡 *Get*\\ (取得)個別"
169
+ "項目的幫助、*Search*\\ (搜尋)所有在其摘要行中包含關鍵字的模組,以及前往 "
170
+ "*Module index*\\ (模組索引)、*Topics*\\ (主題)和 *Keywords*\\ (關鍵字)"
171
+ "頁面。"
129
172
130
173
#: ../../library/pydoc.rst:86
131
174
msgid ""
@@ -134,6 +177,9 @@ msgid ""
134
177
"spam` documents precisely the version of the module you would get if you "
135
178
"started the Python interpreter and typed ``import spam``."
136
179
msgstr ""
180
+ "當 :program:`pydoc` 產生文件時,它會使用目前的環境和路徑來定位模組。因此,呼"
181
+ "叫 :program:`pydoc spam` 所產生的文件,會完全對應到你啟動 Python 直譯器並輸"
182
+ "入 ``import spam`` 時所取得的模組版本。"
137
183
138
184
#: ../../library/pydoc.rst:91
139
185
msgid ""
@@ -143,6 +189,10 @@ msgid ""
143
189
"envvar:`!PYTHONDOCS` environment variable to a different URL or to a local "
144
190
"directory containing the Library Reference Manual pages."
145
191
msgstr ""
192
+ "核心模組的文件被假定存放在 ``https://docs.python.org/X.Y/library/``,其中 "
193
+ "``X`` 和 ``Y`` 是 Python 直譯器的主版本號和次版本號。這可以透過將 :envvar:`!"
194
+ "PYTHONDOCS` 環境變數設定為不同的 URL 或包含函式庫參考手冊頁面的本機目錄來覆"
195
+ "寫。"
146
196
147
197
#: ../../library/pydoc.rst:98
148
198
msgid "Added the ``-b`` option."
@@ -157,6 +207,8 @@ msgid ""
157
207
":mod:`!pydoc` now uses :func:`inspect.signature` rather than :func:`inspect."
158
208
"getfullargspec` to extract signature information from callables."
159
209
msgstr ""
210
+ ":mod:`!pydoc` 現在使用 :func:`inspect.signature` 而不是 :func:`inspect."
211
+ "getfullargspec` 來從可呼叫物件中提取簽章資訊。"
160
212
161
213
#: ../../library/pydoc.rst:109
162
214
msgid "Added the ``-n`` option."
0 commit comments