Skip to content

Translate library/pydoc.po #1126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: 3.13
Choose a base branch
from
Open

Translate library/pydoc.po #1126

wants to merge 3 commits into from

Conversation

Dr-XYZ
Copy link
Collaborator

@Dr-XYZ Dr-XYZ commented Jul 17, 2025

Comment on lines +49 to +51
"對於模組、類別、函式和方法,所顯示的文件是衍生自物件的說明字串(也就是物件"
"的 :attr:`~definition.__doc__` 屬性),以及其可文件化成員的說明字串(遞迴"
"地)。如果沒有說明字串,:mod:`!pydoc` 會嘗試從原始碼檔案中,類別、函式或方法"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"對於模組、類別、函式和方法,所顯示的文件是衍生自物件的說明字串(也就是物件"
"的 :attr:`~definition.__doc__` 屬性),以及其可文件化成員的說明字串(遞迴"
"地)。如果沒有說明字串,:mod:`!pydoc` 會嘗試從原始碼檔案中,類別、函式或方法"
"對於模組、類別、函式和方法,所顯示的文件是從物件的說明字串(也就是物件"
"的 :attr:`~definition.__doc__` 屬性)以及遞迴地從其可文件化成員的說明字串所"
"取得。如果沒有說明字串,:mod:`!pydoc` 會嘗試從原始碼檔案中,類別、函式或方法"

@@ -67,6 +80,12 @@ msgid ""
"system, such as a slash in Unix), and refers to an existing Python source "
"file, then documentation is produced for that file."
msgstr ""
"在 shell 提示字元下,將會顯示 :mod:`sys` 模組的文件,其風格類似於 Unix :"
"program:`man` 命令所顯示的手冊頁面。:program:`pydoc` 的引數可以是函式、模組或"
"套件的名稱,或是一個指向模組中或套件中模組內的類別、方法或函式的點號參照。如"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"套件的名稱,或是一個指向模組中或套件中模組內的類別、方法或函式的點號參照。如"
"套件的名稱,或是一個指向模組中或套件中模組內的類別、方法或函式的點號參照 (dotted reference)。如"

@@ -75,6 +94,9 @@ msgid ""
"executed on that occasion. Use an ``if __name__ == '__main__':`` guard to "
"only execute code when a file is invoked as a script and not just imported."
msgstr ""
"為了找到物件及其文件,:mod:`!pydoc` 會引入要文件化的模組。因此,任何在模組層"
"級的程式碼都會在該場合被執行。使用 ``if __name__ == '__main__':`` 的防護措"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"級的程式碼都會在該場合被執行。使用 ``if __name__ == '__main__':`` 的防護措"
"級的程式碼都會在那個時候被執行。使用 ``if __name__ == '__main__':`` 的防護措"

@@ -75,6 +94,9 @@ msgid ""
"executed on that occasion. Use an ``if __name__ == '__main__':`` guard to "
"only execute code when a file is invoked as a script and not just imported."
msgstr ""
"為了找到物件及其文件,:mod:`!pydoc` 會引入要文件化的模組。因此,任何在模組層"
"級的程式碼都會在該場合被執行。使用 ``if __name__ == '__main__':`` 的防護措"
"施,可以確保程式碼只在檔案作為腳本被呼叫時執行,而不是僅被引入時執行。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

英文原文的 just 好像就怪怪的,不過我想他要表達的意思是寫在 if __name__ == '__main__': 底下那引入時就不會被(意外地)執行到

Suggested change
"施,可以確保程式碼只在檔案作為腳本被呼叫時執行,而不是僅被引入時執行"
"施,可以確保程式碼只在檔案作為腳本被呼叫時執行,而不會在被引入時就執行"

@@ -83,13 +105,18 @@ msgid ""
"envvar:`PAGER` environment variable is set, :program:`pydoc` will use its "
"value as a pagination program. When both are set, :envvar:`MANPAGER` is used."
msgstr ""
"當在主控台輸出時,:program:`pydoc` 會嘗試將輸出分頁以便於閱讀。如果 :envvar:"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

「輸出分頁」有點難分辨誰是動詞,多加一些詞避免讀者判斷錯誤

Suggested change
"當在主控台輸出時,:program:`pydoc` 會嘗試將輸出分頁以便於閱讀。如果 :envvar:"
"當在主控台印出輸出內容時,:program:`pydoc` 會嘗試將輸出內容做分頁以便於閱讀。如果 :envvar:"

@@ -98,6 +125,9 @@ msgid ""
"manner similar to the Unix :program:`man` command. The synopsis line of a "
"module is the first line of its documentation string."
msgstr ""
"在引數前指定一個 ``-k`` 旗標,將會搜尋所有可用模組的摘要行,尋找作為引數給出"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"在引數前指定一個 ``-k`` 旗標,將會搜尋所有可用模組的摘要行,尋找作為引數給出"
"在引數前指定一個 ``-k`` 旗標,將會搜尋所有可用模組的摘要行 (synopsis lines),尋找作為引數給出"

"你也可以使用 :program:`pydoc` 在本機上啟動一個 HTTP 伺服器,它會向來訪的網頁"
"瀏覽器提供文件。:program:`python -m pydoc -p 1234` 將會在 1234 埠啟動一個 "
"HTTP 伺服器,讓你可以用你偏好的網頁瀏覽器在 ``http://localhost:1234/`` 瀏覽文"
"件。指定 ``0`` 作為埠將會選擇一個任意未使用的埠。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"件。指定 ``0`` 作為埠將會選擇一個任意未使用的埠"
"件。指定 ``0`` 作為通訊埠編號將會選擇一個任意未使用的通訊埠"

@mattwang44
Copy link
Collaborator

sorry i'm testing new CI functions, will get it right later!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants