Skip to content

Commit

Permalink
替換:調用/訪問/當前/類別名/搜索/模塊/内/组/獲取/數/示例/文檔/操作系統
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterDaveHello committed Feb 14, 2025
1 parent 0ee2e18 commit 4333f23
Show file tree
Hide file tree
Showing 96 changed files with 421 additions and 421 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ the PSF for inclusion in the documentation.
其中最簡單的貢獻方式就是更新 *fuzzy entries*,讓曾經翻譯的內容保持與最新版本的文件
同步。請參考\ `尋找有翻譯過但需校閱的 fuzzy entries`_ 段落。

此外,當前的目標為完成 **Tutorial** 的翻譯,因此在 ``tutorial/`` 底下的所有
此外,目前的目標為完成 **Tutorial** 的翻譯,因此在 ``tutorial/`` 底下的所有
po 檔皆為首要的翻譯對象。你也可以幫忙校對已經翻譯過的內容。


Expand Down
2 changes: 1 addition & 1 deletion c-api/cell.po
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ msgid ""
"reference to any current content of the cell. *value* may be ``NULL``. "
"*cell* must be non-``NULL``."
msgstr ""
"將 cell 物件 *cell* 的內容設為 *value*。這將釋放任何對 cell 物件當前內容的參"
"將 cell 物件 *cell* 的內容設為 *value*。這將釋放任何對 cell 物件目前內容的參"
"照。*value* 可以為 ``NULL``。*cell* 必須不為 ``NULL``。"

#: ../../c-api/cell.rst:58
Expand Down
6 changes: 3 additions & 3 deletions c-api/codec.po
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,23 @@ msgstr "編解碼器註冊表和支援函式"

#: ../../c-api/codec.rst:8
msgid "Register a new codec search function."
msgstr "註冊一個新的編解碼器搜索函式。"
msgstr "註冊一個新的編解碼器搜尋函式。"

#: ../../c-api/codec.rst:10
msgid ""
"As side effect, this tries to load the :mod:`!encodings` package, if not yet "
"done, to make sure that it is always first in the list of search functions."
msgstr ""
"作為副作用 (side effect),這會嘗試載入 :mod:`!encodings`\\ (如果尚未完成),"
"以確保它始終位於搜索函式列表中的第一個。"
"以確保它始終位於搜尋函式列表中的第一個。"

#: ../../c-api/codec.rst:15
msgid ""
"Unregister a codec search function and clear the registry's cache. If the "
"search function is not registered, do nothing. Return 0 on success. Raise an "
"exception and return -1 on error."
msgstr ""
"取消註冊編解碼器搜索函式並清除註冊表 (registry) 的快取。如果搜索函式並未被註"
"取消註冊編解碼器搜尋函式並清除註冊表 (registry) 的快取。如果搜尋函式並未被註"
"冊,則不執行任何操作。成功回傳 0,發生錯誤時會引發例外並回傳 -1。"

#: ../../c-api/codec.rst:23
Expand Down
2 changes: 1 addition & 1 deletion c-api/datetime.po
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ msgid ""
msgstr ""
":mod:`datetime` 模組提供各種日期和時間物件。在使用任何這些函式之前,必須將標"
"頭檔 :file:`datetime.h` 引入於原始碼中(請注意,:file:`Python.h` 並無引入該標"
"頭檔),且巨集 :c:macro:`!PyDateTime_IMPORT` 必須被調用,而這通常作為模組初始"
"頭檔),且巨集 :c:macro:`!PyDateTime_IMPORT` 必須被呼叫,而這通常作為模組初始"
"化函式的一部分。該巨集將指向 C 結構的指標放入靜態變數 :c:data:`!"
"PyDateTimeAPI` 中,該變數會被以下巨集使用。"

Expand Down
6 changes: 3 additions & 3 deletions c-api/file.po
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ msgid ""
msgstr ""
"這些 API 是用於內建檔案物件的 Python 2 C API 的最小模擬 (minimal emulation),"
"它過去依賴於 C 標準函式庫對於緩衝 I/O (:c:expr:`FILE*`) 的支援。在 Python 3 "
"中,檔案和串流使用新的 :mod:`io` 模組,它在操作系統的低階無緩衝 I/O 上定義了"
"中,檔案和串流使用新的 :mod:`io` 模組,它在作業系統的低階無緩衝 I/O 上定義了"
"多個層級。下面描述的函式是這些新 API 的便捷 C 包裝器,主要用於直譯器中的內部"
"錯誤報告;建議第三方程式碼改為存取 :mod:`io` API。"

Expand All @@ -55,15 +55,15 @@ msgstr ""
"從已打開檔案 *fd* 的檔案描述器建立一個 Python 檔案物件。引數 *name*、"
"*encoding*、*errors* 和 *newline* 可以為 ``NULL`` 以使用預設值; *buffering* "
"可以是 *-1* 以使用預設值。 *name* 被忽略並保留以實作向後相容性。失敗時回傳 "
"``NULL``。有關引數的更全面描述,請參閱 :func:`io.open` 函式文檔。"
"``NULL``。有關引數的更全面描述,請參閱 :func:`io.open` 函式文件。"

#: ../../c-api/file.rst:31
msgid ""
"Since Python streams have their own buffering layer, mixing them with OS-"
"level file descriptors can produce various issues (such as unexpected "
"ordering of data)."
msgstr ""
"由於 Python 串流有自己的緩衝層,將它們與操作系統層級檔案描述器混合使用會產生"
"由於 Python 串流有自己的緩衝層,將它們與作業系統層級檔案描述器混合使用會產生"
"各種問題(例如資料的排序不符合預期)。"

#: ../../c-api/file.rst:35
Expand Down
18 changes: 9 additions & 9 deletions c-api/intro.po
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ msgid ""
"option:`prefix <--prefix>` include the platform specific headers from :"
"option:`exec_prefix <--exec-prefix>`."
msgstr ""
"要引入標頭,請將兩個(如果不同)目錄放在編譯器的引入搜索路徑 (search path) "
"中。*不要*\\ 將父目錄放在搜索路徑上,然後使用 ``#include <pythonX.Y/Python."
"要引入標頭,請將兩個(如果不同)目錄放在編譯器的引入搜尋路徑 (search path) "
"中。*不要*\\ 將父目錄放在搜尋路徑上,然後使用 ``#include <pythonX.Y/Python."
"h>``;這會在多平台建置上壞掉,因為 :option:`prefix <--prefix>` 下獨立於平台的"
"標頭包括來自 :option:`exec_prefix <--exec-prefix>` 的平台特定標頭。"

Expand Down Expand Up @@ -702,7 +702,7 @@ msgid ""
msgstr ""
"這裡 :c:func:`PyLong_FromLong` 會回傳一個新的參照,它立即被 :c:func:"
"`PyTuple_SetItem` 竊取。如果你想繼續使用一個物件,儘管對它的參照將被竊取,請"
"在呼叫參照竊取函式之前使用 :c:func:`Py_INCREF` 來獲取另一個參照。"
"在呼叫參照竊取函式之前使用 :c:func:`Py_INCREF` 來取得另一個參照。"

#: ../../c-api/intro.rst:427
msgid ""
Expand Down Expand Up @@ -839,7 +839,7 @@ msgstr ""
"重要的是要意識到你是否擁有一個函式回傳的參照只取決於你呼叫哪個函式 --- *羽毛 "
"(plumage)*(作為引數傳遞給函式的物件之型別)\\ *不會進入它!*\\ 因此,如果你"
"使用 :c:func:`PyList_GetItem` 從 list 中提取一個項目,你不會擁有其參照 --- 但"
"如果你使用 :c:func:`PySequence_GetItem` 從同一 list 中獲取相同的項目(且恰好"
"如果你使用 :c:func:`PySequence_GetItem` 從同一 list 中取得相同的項目(且恰好"
"使用完全相同的引數),你確實會擁有對回傳物件的參照。"

#: ../../c-api/intro.rst:497
Expand Down Expand Up @@ -1189,8 +1189,8 @@ msgid ""
msgstr ""
"在大多數系統上(特別是在 Unix 和 Windows 上,儘管細節略有不同),:c:func:"
"`Py_Initialize` 會假設Python 函式庫相對於 Python 直譯器可執行檔案的位置固定,"
"並根據其對標準 Python 直譯器可執行檔案位置的最佳猜測來計算模組搜索路徑。或者"
"更詳細地說,它會在 shell 命令搜索路徑(環境變數 :envvar:`PATH`)中找到名為 :"
"並根據其對標準 Python 直譯器可執行檔案位置的最佳猜測來計算模組搜尋路徑。或者"
"更詳細地說,它會在 shell 命令搜尋路徑(環境變數 :envvar:`PATH`)中找到名為 :"
"file:`python` 的可執行檔案,並在其父目錄中查找一個名為 :file:`lib/python{X.Y}"
"` 的目錄的相對位置。"

Expand Down Expand Up @@ -1223,7 +1223,7 @@ msgid ""
"func:`Py_GetProgramFullPath` (all defined in :file:`Modules/getpath.c`)."
msgstr ""
"嵌入的應用程式可以透過在呼叫 :c:func:`Py_Initialize` *之前*\\ 呼叫 "
"``Py_SetProgramName(file)`` 來引導搜索。請注意 :envvar:`PYTHONHOME` 仍然覆蓋"
"``Py_SetProgramName(file)`` 來引導搜尋。請注意 :envvar:`PYTHONHOME` 仍然覆蓋"
"它並且 :envvar:`PYTHONPATH` 仍然插入在標準路徑的前面。需要完全控制權的應用程"
"式必須實作自己的 :c:func:`Py_GetPath`、:c:func:`Py_GetPrefix`、:c:func:"
"`Py_GetExecPrefix` 和 :c:func:`Py_GetProgramFullPath`\\(全部定義在 :file:"
Expand All @@ -1245,7 +1245,7 @@ msgstr ""
"有時會希望能夠「取消初始化 (uninitialize)」Python。例如,應用程式可能想要重新"
"開始(再次呼叫 :c:func:`Py_Initialize`)或者應用程式簡單地完成了對 Python 的"
"使用並想要釋放 Python 分配的記憶體。這可以透過呼叫 :c:func:`Py_FinalizeEx` 來"
"完成。如果 Python 當前處於初始化狀態,函式 :c:func:`Py_IsInitialized` 會回傳 "
"完成。如果 Python 目前處於初始化狀態,函式 :c:func:`Py_IsInitialized` 會回傳 "
"true。有關這些功能的更多資訊將在後面的章節中給出。請注意 :c:func:"
"`Py_FinalizeEx` *不會*\\ 釋放由 Python 直譯器分配的所有記憶體,例如目前無法釋"
"放被擴充模組所分配的記憶體。"
Expand Down Expand Up @@ -1309,7 +1309,7 @@ msgid ""
"well. Upon exit, all existing references are printed. (In interactive mode "
"this happens after every statement run by the interpreter.)"
msgstr ""
"定義 :c:macro:`Py_TRACE_REFS` 來啟用參照追蹤(參見\\ :option:`調用 --with-"
"定義 :c:macro:`Py_TRACE_REFS` 來啟用參照追蹤(參見\\ :option:`呼叫 --with-"
"trace-refs 選項 <--with-trace-refs>`)。當有定義時,透過向每個 :c:type:"
"`PyObject` 新增兩個額外欄位來維護有效物件的循環雙向鍊表 (circular doubly "
"linked list)。全體分配也有被追蹤。退出時將印出所有現行參照。(在交互模式下,"
Expand Down
6 changes: 3 additions & 3 deletions c-api/long.po
Original file line number Diff line number Diff line change
Expand Up @@ -640,11 +640,11 @@ msgstr "object(物件)"

#: ../../c-api/long.rst:8
msgid "long integer"
msgstr "long integer(長整数)"
msgstr "long integer(長整數)"

#: ../../c-api/long.rst:8
msgid "integer"
msgstr "integer(整数)"
msgstr "integer(整數)"

#: ../../c-api/long.rst:144
msgid "LONG_MAX (C macro)"
Expand All @@ -653,7 +653,7 @@ msgstr "LONG_MAX(C 巨集)"
#: ../../c-api/long.rst:144 ../../c-api/long.rst:204 ../../c-api/long.rst:247
#: ../../c-api/long.rst:262 ../../c-api/long.rst:278 ../../c-api/long.rst:294
msgid "OverflowError (built-in exception)"
msgstr "OverflowError(内建例外)"
msgstr "OverflowError(內建例外)"

#: ../../c-api/long.rst:247
msgid "PY_SSIZE_T_MAX (C macro)"
Expand Down
2 changes: 1 addition & 1 deletion c-api/perfmaps.po
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ msgid ""
"information about the cause of a failure."
msgstr ""
"建立/打開 perf map 檔案成功時回傳 ``0``,失敗時回傳 ``-1``,建立鎖時失敗則回"
"傳 ``-2``。檢查 ``errno`` 以獲取更多造成失敗的資訊。"
"傳 ``-2``。檢查 ``errno`` 以取得更多造成失敗的資訊。"

#: ../../c-api/perfmaps.rst:35
msgid ""
Expand Down
4 changes: 2 additions & 2 deletions c-api/refcounting.po
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@ msgid ""
"object in a temporary variable, update the list data structure, and then "
"call :c:func:`Py_DECREF` for the temporary variable."
msgstr ""
"釋放函式可以導致任意 Python 程式碼被調用(例如,當釋放具有 :meth:`~object."
"釋放函式可以導致任意 Python 程式碼被呼叫(例如,當釋放具有 :meth:`~object."
"__del__` 方法的類別實例時)。雖然此類程式碼中的例外不會被傳遞出來,但​​執行的程"
"式碼可以自由存取所有 Python 全域變數。這意味著在調用 :c:func:`Py_DECREF` 之"
"式碼可以自由存取所有 Python 全域變數。這意味著在呼叫 :c:func:`Py_DECREF` 之"
"前,可從全域變數存取的任何物件都應處於一致狀態。例如,從 list 中刪除物件的程"
"式碼應將已刪除物件的參照複製到臨時變數中,更新 list 資料結構,然後為臨時變數"
"呼叫 :c:func:`Py_DECREF`。"
Expand Down
4 changes: 2 additions & 2 deletions c-api/sequence.po
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,12 @@ msgstr ""

#: ../../c-api/sequence.rst:21 ../../c-api/sequence.rst:123
msgid "built-in function"
msgstr "built-in function(内建函式)"
msgstr "built-in function(內建函式)"

#: ../../c-api/sequence.rst:21
msgid "len"
msgstr "len"

#: ../../c-api/sequence.rst:123
msgid "tuple"
msgstr "tuple(元组)"
msgstr "tuple(元組)"
2 changes: 1 addition & 1 deletion faq/extending.po
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ msgid ""
"<https://github.com/scipy/weave>`_ are also alternatives for wrapping C++ "
"libraries."
msgstr ""
"如果你需要連接到當前不存在 Python 擴充的某些 C 或 C++ 函式庫,你可以嘗試使用 "
"如果你需要連接到目前不存在 Python 擴充的某些 C 或 C++ 函式庫,你可以嘗試使用 "
"`SWIG <https://www.swig.org>`_ 等工具包裝函式庫的資料型別和函式。`SIP "
"<https://github.com/Python-SIP/sip>`__、`CXX <https://cxx.sourceforge.net/"
">`_ `Boost <https://www.boost.org/libs /python/doc/index.html>`_ 或 `Weave "
Expand Down
26 changes: 13 additions & 13 deletions faq/library.po
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ msgid ""
"engine. Searching for \"Python\" plus a keyword or two for your topic of "
"interest will usually find something helpful."
msgstr ""
"對於第三方包,搜索`Python 包索引<https://pypi.org>`_ 或嘗試`Google <https://"
"www.google.com>`_ 或其他網路搜索引擎。搜索 \"Python\" 加上你感興趣的主題的一"
"對於第三方包,搜尋`Python 包索引<https://pypi.org>`_ 或嘗試`Google <https://"
"www.google.com>`_ 或其他網路搜尋引擎。搜尋 \"Python\" 加上你感興趣的主題的一"
"兩個關鍵字通常會找到有用的東西。"

#: ../../faq/library.rst:28
Expand Down Expand Up @@ -230,7 +230,7 @@ msgid ""
msgstr ""
":mod:`curses` 模組支援基本的 curses 功能以及 ncurses 和 SYSV curses 的許多附"
"加功能,例如顏色、替代字元集支援、鍵盤和鼠標支援。這意味著該模組與僅具有 BSD "
"curses 的作業系統不相容,但似乎沒有任何當前維護的作業系統屬於此類型。"
"curses 的作業系統不相容,但似乎沒有任何目前維護的作業系統屬於此類型。"

#: ../../faq/library.rst:111
msgid "Is there an equivalent to C's onexit() in Python?"
Expand Down Expand Up @@ -286,8 +286,8 @@ msgid ""
"examples in the docstrings for a module and runs them, comparing the output "
"with the expected output given in the docstring."
msgstr ""
"Python 帶有兩個測試框架。 :mod:`doctest` 模組在模組的文檔字串中查詢示例並運行"
"它們,將輸出與文檔字串中給出的預期輸出進行比較。"
"Python 帶有兩個測試框架。 :mod:`doctest` 模組在模組的文件字串中查詢示例並運行"
"它們,將輸出與文件字串中給出的預期輸出進行比較。"

#: ../../faq/library.rst:141
#, fuzzy
Expand Down Expand Up @@ -374,7 +374,7 @@ msgstr ""
#: ../../faq/library.rst:179
#, fuzzy
msgid "How do I create documentation from doc strings?"
msgstr "如何從文檔字串建立文檔?"
msgstr "如何從文件字串建立文件?"

#: ../../faq/library.rst:181
#, fuzzy
Expand All @@ -384,9 +384,9 @@ msgid ""
"docstrings is `epydoc <https://epydoc.sourceforge.net/>`_. `Sphinx <https://"
"www.sphinx-doc.org>`_ can also include docstring content."
msgstr ""
":mod:`pydoc` 模組可以從 Python 源程式碼中的文檔字串建立 HTML。純粹從文檔字串"
"建立 API 文檔的另一種方法是 `epydoc <https://epydoc.sourceforge.net/>`_。 "
"`Sphinx <https://www.sphinx-doc.org>`_ 也可以包含文檔字串內容。"
":mod:`pydoc` 模組可以從 Python 源程式碼中的文件字串建立 HTML。純粹從文件字串"
"建立 API 文件的另一種方法是 `epydoc <https://epydoc.sourceforge.net/>`_。 "
"`Sphinx <https://www.sphinx-doc.org>`_ 也可以包含文件字串內容。"

#: ../../faq/library.rst:188
#, fuzzy
Expand Down Expand Up @@ -613,7 +613,7 @@ msgid ""
"Consult the module's documentation for more details; the :class:`~queue."
"Queue` class provides a featureful interface."
msgstr ""
"有關更多詳細資訊,請參閱模組的文檔; :class:`~queue.Queue` 類別提供了一個功能"
"有關更多詳細資訊,請參閱模組的文件; :class:`~queue.Queue` 類別提供了一個功能"
"強大的介面。"

#: ../../faq/library.rst:363
Expand Down Expand Up @@ -817,7 +817,7 @@ msgid ""
"see the :mod:`os` module. The two functions are identical; :func:`~os."
"unlink` is simply the name of the Unix system call for this function."
msgstr ""
"使用 ``os.remove(filename)`` 或 ``os.unlink(filename)``;有關文檔,請參閱 :"
"使用 ``os.remove(filename)`` 或 ``os.unlink(filename)``;有關文件,請參閱 :"
"mod:`os` 模組。這兩個功能是相同的; :func:`~os.unlink` 只是這個函式的 Unix 系"
"統呼叫的名稱。"

Expand Down Expand Up @@ -848,7 +848,7 @@ msgid ""
"open`, where *fd* is the file descriptor (a small integer)."
msgstr ""
"要截斷一個檔案,使用``f = open(filename, \"rb+\")``打開它,然後使用``f."
"truncate(offset)``;偏移量預設為當前搜索位置。對於使用 :func:`os.open` 打開的"
"truncate(offset)``;偏移量預設為目前搜尋位置。對於使用 :func:`os.open` 打開的"
"檔案,還有 ``os.ftruncate(fd, offset)``,其中 *fd* 是檔案描述器(一個小整"
"數)。"

Expand Down Expand Up @@ -895,7 +895,7 @@ msgid ""
"`struct` module. It allows you to take a string containing binary data "
"(usually numbers) and convert it to Python objects; and vice versa."
msgstr ""
"要讀取或寫入複雜的二進制資料格式,最好使用 :mod:`struct` 模組。它允許你獲取包"
"要讀取或寫入複雜的二進制資料格式,最好使用 :mod:`struct` 模組。它允許你取得包"
"含二進制資料(通常是數字)的字串並將其轉換為 Python 物件;反之亦然。"

#: ../../faq/library.rst:509
Expand Down
Loading

0 comments on commit 4333f23

Please sign in to comment.