Skip to content

Commit 6c367bc

Browse files
Dr-XYZmattwang44
andauthored
Translate library/pydoc.po (#1126)
Co-authored-by: W. H. Wang <mattwang44@gmail.com>
1 parent 7ecda97 commit 6c367bc

File tree

1 file changed

+54
-2
lines changed

1 file changed

+54
-2
lines changed

library/pydoc.po

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
# This file is distributed under the same license as the Python package.
33
#
44
# Translators:
5+
# Liang-Bo Wang <me@liang2.tw>, 2015
6+
# Dr-XYZ <dr.xyz.tw@gmail.com>, 2025
57
msgid ""
68
msgstr ""
79
"Project-Id-Version: Python 3.13\n"
810
"Report-Msgid-Bugs-To: \n"
911
"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"
1214
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1315
"tw)\n"
1416
"Language: zh_TW\n"
@@ -31,6 +33,8 @@ msgid ""
3133
"modules. The documentation can be presented as pages of text on the "
3234
"console, served to a web browser, or saved to HTML files."
3335
msgstr ""
36+
":mod:`!pydoc` 模組會自動從 Python 模組產生文件。文件可以以文字頁面的形式呈現"
37+
"在主控台上、提供給網頁瀏覽器,或儲存為 HTML 檔案。"
3438

3539
#: ../../library/pydoc.rst:23
3640
msgid ""
@@ -42,6 +46,11 @@ msgid ""
4246
"the source file, or at the top of the module (see :func:`inspect."
4347
"getcomments`)."
4448
msgstr ""
49+
"對於模組、類別、函式和方法,所顯示的文件是從物件的說明字串(也就是物件"
50+
"的 :attr:`~definition.__doc__` 屬性)以及遞迴地從其可文件化成員的說明字串所"
51+
"取得。如果沒有說明字串,:mod:`!pydoc` 會嘗試從原始碼檔案中,類別、函式或方法"
52+
"定義正上方的註解區塊,或從模組的頂部取得描述(參見 :func:`inspect."
53+
"getcomments`)。"
4554

4655
#: ../../library/pydoc.rst:30
4756
msgid ""
@@ -51,6 +60,10 @@ msgid ""
5160
"be viewed from outside the Python interpreter by running :program:`pydoc` as "
5261
"a script at the operating system's command prompt. For example, running ::"
5362
msgstr ""
63+
"內建函式 :func:`help` 會在互動式直譯器中呼叫線上幫助系統,它會使用 :mod:`!"
64+
"pydoc` 在主控台上以文字形式產生文件。同樣的文字文件也可以在 Python 直譯器外部"
65+
"檢視,方法是在作業系統的命令提示字元中,將 :program:`pydoc` 當作腳本執行。例"
66+
"如,執行: ::"
5467

5568
#: ../../library/pydoc.rst:36
5669
msgid "python -m pydoc sys"
@@ -67,6 +80,12 @@ msgid ""
6780
"system, such as a slash in Unix), and refers to an existing Python source "
6881
"file, then documentation is produced for that file."
6982
msgstr ""
83+
"在 shell 提示字元下,將會顯示 :mod:`sys` 模組的文件,其風格類似於 Unix :"
84+
"program:`man` 命令所顯示的手冊頁面。:program:`pydoc` 的引數可以是函式、模組或"
85+
"套件的名稱,或是一個指向模組中或套件中模組內的類別、方法或函式的點號參照 (dotted reference)。如"
86+
"果 :program:`pydoc` 的引數看起來像一個路徑(也就是說,它包含你作業系統的路徑"
87+
"分隔符,例如 Unix 中的斜線),並且指向一個已存在的 Python 原始碼檔案,那麼就"
88+
"會為該檔案產生文件。"
7089

7190
#: ../../library/pydoc.rst:49
7291
msgid ""
@@ -75,6 +94,9 @@ msgid ""
7594
"executed on that occasion. Use an ``if __name__ == '__main__':`` guard to "
7695
"only execute code when a file is invoked as a script and not just imported."
7796
msgstr ""
97+
"為了找到物件及其文件,:mod:`!pydoc` 會引入要文件化的模組。因此,任何在模組層"
98+
"級的程式碼都會在那個時候被執行。使用 ``if __name__ == '__main__':`` 的防護措"
99+
"施,可以確保程式碼只在檔案作為腳本被呼叫時執行,而不會在被引入時就執行。"
78100

79101
#: ../../library/pydoc.rst:54
80102
msgid ""
@@ -83,13 +105,18 @@ msgid ""
83105
"envvar:`PAGER` environment variable is set, :program:`pydoc` will use its "
84106
"value as a pagination program. When both are set, :envvar:`MANPAGER` is used."
85107
msgstr ""
108+
"當在主控台印出輸出內容時,:program:`pydoc` 會嘗試將輸出內容做分頁以便於閱讀。如果 :envvar:"
109+
"`MANPAGER` 或 :envvar:`PAGER` 環境變數其中之一被設定,:program:`pydoc` 將會使"
110+
"用其值作為分頁程式。當兩者都被設定時,會使用 :envvar:`MANPAGER`。"
86111

87112
#: ../../library/pydoc.rst:59
88113
msgid ""
89114
"Specifying a ``-w`` flag before the argument will cause HTML documentation "
90115
"to be written out to a file in the current directory, instead of displaying "
91116
"text on the console."
92117
msgstr ""
118+
"在引數前指定一個 ``-w`` 旗標,將會使 HTML 文件被寫入目前目錄的一個檔案中,而"
119+
"不是在主控台上顯示文字。"
93120

94121
#: ../../library/pydoc.rst:63
95122
msgid ""
@@ -98,6 +125,9 @@ msgid ""
98125
"manner similar to the Unix :program:`man` command. The synopsis line of a "
99126
"module is the first line of its documentation string."
100127
msgstr ""
128+
"在引數前指定一個 ``-k`` 旗標,將會搜尋所有可用模組的摘要行 (synopsis lines),尋找作為引數給出"
129+
"的關鍵字,其方式同樣類似於 Unix 的 :program:`man` 命令。一個模組的摘要行是其"
130+
"說明字串的第一行。"
101131

102132
#: ../../library/pydoc.rst:68
103133
msgid ""
@@ -108,6 +138,10 @@ msgid ""
108138
"preferred web browser. Specifying ``0`` as the port number will select an "
109139
"arbitrary unused port."
110140
msgstr ""
141+
"你也可以使用 :program:`pydoc` 在本機上啟動一個 HTTP 伺服器,它會向來訪的網頁"
142+
"瀏覽器提供文件。:program:`python -m pydoc -p 1234` 將會在 1234 埠啟動一個 "
143+
"HTTP 伺服器,讓你可以用你偏好的網頁瀏覽器在 ``http://localhost:1234/`` 瀏覽文"
144+
"件。指定 ``0`` 作為通訊埠編號將會選擇一個任意未使用的通訊埠。"
111145

112146
#: ../../library/pydoc.rst:74
113147
msgid ""
@@ -117,6 +151,10 @@ msgid ""
117151
"host name that the server responds to. During development this is "
118152
"especially useful if you want to run pydoc from within a container."
119153
msgstr ""
154+
":program:`python -m pydoc -n <hostname>` 將會啟動伺服器並在給定的主機名稱上監"
155+
"聽。預設的主機名稱是 'localhost',但如果你希望伺服器能被其他機器連線,你可能"
156+
"會想改變伺服器回應的主機名稱。在開發期間,如果你想在容器內執行 pydoc,這點特"
157+
"別有用。"
120158

121159
#: ../../library/pydoc.rst:80
122160
msgid ""
@@ -126,6 +164,11 @@ msgid ""
126164
"modules with a keyword in their synopsis line, and go to the *Module index*, "
127165
"*Topics* and *Keywords* pages."
128166
msgstr ""
167+
":program:`python -m pydoc -b` 將會啟動伺服器,並額外開啟一個網頁瀏覽器到模組"
168+
"索引頁面。每個提供的頁面頂部都有一個導覽列,你可以在那裡 *Get*\\ (取得)個別"
169+
"項目的幫助、*Search*\\ (搜尋)所有在其摘要行中包含關鍵字的模組,以及前往 "
170+
"*Module index*\\ (模組索引)、*Topics*\\ (主題)和 *Keywords*\\ (關鍵字)"
171+
"頁面。"
129172

130173
#: ../../library/pydoc.rst:86
131174
msgid ""
@@ -134,6 +177,9 @@ msgid ""
134177
"spam` documents precisely the version of the module you would get if you "
135178
"started the Python interpreter and typed ``import spam``."
136179
msgstr ""
180+
"當 :program:`pydoc` 產生文件時,它會使用目前的環境和路徑來定位模組。因此,呼"
181+
"叫 :program:`pydoc spam` 所產生的文件,會完全對應到你啟動 Python 直譯器並輸"
182+
"入 ``import spam`` 時所取得的模組版本。"
137183

138184
#: ../../library/pydoc.rst:91
139185
msgid ""
@@ -143,6 +189,10 @@ msgid ""
143189
"envvar:`!PYTHONDOCS` environment variable to a different URL or to a local "
144190
"directory containing the Library Reference Manual pages."
145191
msgstr ""
192+
"核心模組的文件被假定存放在 ``https://docs.python.org/X.Y/library/``,其中 "
193+
"``X`` 和 ``Y`` 是 Python 直譯器的主版本號和次版本號。這可以透過將 :envvar:`!"
194+
"PYTHONDOCS` 環境變數設定為不同的 URL 或包含函式庫參考手冊頁面的本機目錄來覆"
195+
"寫。"
146196

147197
#: ../../library/pydoc.rst:98
148198
msgid "Added the ``-b`` option."
@@ -157,6 +207,8 @@ msgid ""
157207
":mod:`!pydoc` now uses :func:`inspect.signature` rather than :func:`inspect."
158208
"getfullargspec` to extract signature information from callables."
159209
msgstr ""
210+
":mod:`!pydoc` 現在使用 :func:`inspect.signature` 而不是 :func:`inspect."
211+
"getfullargspec` 來從可呼叫物件中提取簽章資訊。"
160212

161213
#: ../../library/pydoc.rst:109
162214
msgid "Added the ``-n`` option."

0 commit comments

Comments
 (0)