From e6a23493d2c1beed1ab883fb64f277068108ebbb Mon Sep 17 00:00:00 2001 From: Matt Wang Date: Fri, 7 Feb 2025 17:18:09 +0800 Subject: [PATCH] translate `extending/building.po` --- extending/building.po | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/extending/building.po b/extending/building.po index 1e0c34fe84..46539b1e5e 100644 --- a/extending/building.po +++ b/extending/building.po @@ -1,15 +1,16 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation +# Copyright (C) 2001-2025, Python Software Foundation # This file is distributed under the same license as the Python package. # # Translators: +# Adrian Liaw , 2018 +# Matt Wang , 2025 msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-09-01 22:24+0800\n" -"PO-Revision-Date: 2018-05-23 14:09+0000\n" -"Last-Translator: Adrian Liaw \n" +"PO-Revision-Date: 2025-02-07 14:09+0000\n" +"Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" "Language: zh_TW\n" @@ -32,21 +33,25 @@ msgstr "" #: ../../extending/building.rst:12 msgid "" -"To be importable, the shared library must be available on :envvar:" -"`PYTHONPATH`, and must be named after the module name, with an appropriate " -"extension. When using setuptools, the correct filename is generated " -"automatically." +"To be importable, the shared library must be available " +"on :envvar:`PYTHONPATH`, and must be named after the module name, with an " +"appropriate extension. When using setuptools, the correct filename is " +"generated automatically." msgstr "" +"要能夠被引入,共用函式庫必須在 :envvar:`PYTHONPATH` 上可用,並且必須以模組名" +"稱命名,並且必須有適當的副檔名。使用 setuptools 時,正確的檔名會自動產生。" #: ../../extending/building.rst:16 msgid "The initialization function has the signature:" -msgstr "" +msgstr "初始化函式具有簽名:" #: ../../extending/building.rst:20 msgid "" "It returns either a fully initialized module, or a :c:type:`PyModuleDef` " "instance. See :ref:`initializing-modules` for details." msgstr "" +"它回傳一個完全初始化的模組,或一個 :c:type:`PyModuleDef` 實例。詳細資訊請參" +"見 :ref:`initializing-modules`。" #: ../../extending/building.rst:25 msgid "" @@ -57,6 +62,11 @@ msgid "" "``PyInitU_``, with ```` encoded using Python's " "*punycode* encoding with hyphens replaced by underscores. In Python::" msgstr "" +"對於僅包含 ASCII 名稱的模組,函式必須以 ``PyInit_`` 命名,其中 " +"```` 要替換為模組的名稱。當使用 :ref:`multi-phase-" +"initialization` 時,允許非 ASCII 模組名稱。在這種情況下,初始化函式名稱是 " +"``PyInitU_``,其中 ```` 使用 Python 的 *punycode* 編" +"碼,並將連字符號替換為底線。在 Python 中: ::" #: ../../extending/building.rst:32 msgid "" @@ -82,10 +92,13 @@ msgid "" "function corresponding to the filename is found. See the *\"Multiple modules " "in one library\"* section in :pep:`489` for details." msgstr "" +"可以透過定義多個初始化函式,來從單一共用函式庫中匯出多個模組。然而要引入它們" +"需要使用符號連結或自訂引入器,因為預設只會找到對應於檔名的函式。詳細資訊請參" +"見 :pep:`489` 中的 *\"Multiple modules in one library\"* 部分。" #: ../../extending/building.rst:52 msgid "Building C and C++ Extensions with setuptools" -msgstr "" +msgstr "用 setuptools 建置 C 與 C++ 擴充套件" #: ../../extending/building.rst:54 msgid "" @@ -94,3 +107,6 @@ msgid "" "setuptools.html to learn more about how build and distribute C/C++ " "extensions with setuptools." msgstr "" +"Python 3.12 與之後的版本不再帶有 distutils。請在 https://" +"setuptools.readthedocs.io/en/latest/setuptools.html 上參閱 ``setuptools`` 文" +"件,以了解如何使用 setuptools 建置和發佈 C/C++ 擴充套件。"