Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 80351ac

Browse filesBrowse files
committed
feat: translate c-api/stable.po
1 parent c65ddfc commit 80351ac
Copy full SHA for 80351ac

File tree

Expand file treeCollapse file tree

1 file changed

+81
-11
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+81
-11
lines changed

‎c-api/stable.po

Copy file name to clipboardExpand all lines: c-api/stable.po
+81-11Lines changed: 81 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
1-
# SOME DESCRIPTIVE TITLE.
2-
# Copyright (C) 2001-2022, Python Software Foundation
1+
# Copyright (C) 2001-2023, Python Software Foundation
32
# This file is distributed under the same license as the Python package.
43
#
54
# Translators:
5+
# Matt Wang <mattwang44@gmail.com>, 2023
66
msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.11\n"
99
"Report-Msgid-Bugs-To: \n"
1010
"POT-Creation-Date: 2021-10-26 16:47+0000\n"
11-
"PO-Revision-Date: 2016-11-19 00:26+0000\n"
12-
"Last-Translator: Liang-Bo Wang <me@liang2.tw>\n"
11+
"PO-Revision-Date: 2023-01-24 21:07+0800\n"
12+
"Last-Translator: Matt Wang <mattwang44@gmail.com>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1414
"tw)\n"
1515
"Language: zh_TW\n"
1616
"MIME-Version: 1.0\n"
1717
"Content-Type: text/plain; charset=UTF-8\n"
1818
"Content-Transfer-Encoding: 8bit\n"
1919
"Plural-Forms: nplurals=1; plural=0;\n"
20+
"X-Generator: Poedit 3.2.2\n"
2021

2122
#: ../../c-api/stable.rst:7
2223
msgid "C API Stability"
23-
msgstr ""
24+
msgstr "C API 穩定性"
2425

2526
#: ../../c-api/stable.rst:9
2627
msgid ""
@@ -30,6 +31,9 @@ msgid ""
3031
"API. Changing existing API or removing API is only done after a deprecation "
3132
"period or to fix serious issues."
3233
msgstr ""
34+
"Python 的 C API 被包含在向後相容性策略 :pep:`387` 中。雖然 C API 會隨著每個次"
35+
"要版本(例如從 3.9 到 3.10)而變化,但大多數變化都是與原始碼相容的,通常只是"
36+
"加入新的 API。更改現有 API 或刪除 API 僅在棄用期後或修復嚴重問題時進行。"
3337

3438
#: ../../c-api/stable.rst:15
3539
msgid ""
@@ -39,16 +43,22 @@ msgid ""
3943
"work on 3.10.8 and vice versa, but will need to be compiled separately for "
4044
"3.9.x and 3.10.x."
4145
msgstr ""
46+
"CPython 的應用程式二進位介面 (Application Binary Interface, ABI) 在次要版本中"
47+
"是向前和向後相容的(如果它們以相同的方式編譯;請參閱下面的\\ :ref:`stable-"
48+
"abi-platform`\\)。因此,為 Python 3.10.0 編譯的程式碼將能夠在 3.10.8 上運"
49+
"行,反之亦然,但 3.9.x 和 3.10.x 就需要分別編譯。"
4250

4351
#: ../../c-api/stable.rst:21
4452
msgid ""
4553
"Names prefixed by an underscore, such as ``_Py_InternalState``, are private "
4654
"API that can change without notice even in patch releases."
4755
msgstr ""
56+
"帶有底線前綴的名稱是私有 API (private API),像是 ``_Py_InternalState``,即使"
57+
"在補丁版本 (patch release) 中也可能被更改,不會另行通知。"
4858

4959
#: ../../c-api/stable.rst:26
5060
msgid "Stable Application Binary Interface"
51-
msgstr ""
61+
msgstr "穩定的應用程式二進位介面"
5262

5363
#: ../../c-api/stable.rst:28
5464
msgid ""
@@ -57,6 +67,9 @@ msgid ""
5767
"multiple versions of Python. Contents of the Limited API are :ref:`listed "
5868
"below <stable-abi-list>`."
5969
msgstr ""
70+
"Python 3.2 引入了\\ *受限 API (Limited API)*,它是 Python C API 的一個子集。"
71+
"僅使用受限 API 的擴充可以只編譯一次就使用於多個版本的 Python。受限 API 的內容"
72+
"\\ :ref:`列在下方 <stable-abi-list>`。"
6073

6174
#: ../../c-api/stable.rst:33
6275
msgid ""
@@ -65,19 +78,26 @@ msgid ""
6578
"symbols exposed in the Limited API, but also other ones – for example, "
6679
"functions necessary to support older versions of the Limited API."
6780
msgstr ""
81+
"為了實現它,Python 提供了一個\\ *穩定 ABI (Stable ABI)*:一組將在各個 Python "
82+
"3.x 版本之間保持相容的符號。穩定 ABI 被包含在受限 API 中開放的符號,但也包含"
83+
"其他符號 - 例如,支援舊版受限 API 所必需的函式。"
6884

6985
#: ../../c-api/stable.rst:38
7086
msgid ""
7187
"(For simplicity, this document talks about *extensions*, but the Limited API "
7288
"and Stable ABI work the same way for all uses of the API – for example, "
7389
"embedding Python.)"
7490
msgstr ""
91+
"(為簡單起見,本文件討論\\ *擴充 (extension)*,但受限 API 和穩定 ABI 在所有 "
92+
"API 使用方式中都以相同的方式運作 -- 例如在嵌入式 Python (embedding Python) "
93+
"中。)"
7594

7695
#: ../../c-api/stable.rst:44
7796
msgid ""
7897
"Define this macro before including ``Python.h`` to opt in to only use the "
7998
"Limited API, and to select the Limited API version."
8099
msgstr ""
100+
"在包含 ``Python.h`` 之前定義此巨集以選擇只使用受限 API,並挑選受限 API 版本。"
81101

82102
#: ../../c-api/stable.rst:47
83103
msgid ""
@@ -87,26 +107,36 @@ msgid ""
87107
"the specified one onward, and can use Limited API introduced up to that "
88108
"version."
89109
msgstr ""
110+
"將 ``Py_LIMITED_API`` 定義為對應於你的擴充有支援的最低 Python 版本的 :c:data:"
111+
"`PY_VERSION_HEX` 值。該擴充無需重新編譯即可與從指定版本開始的所有 Python 3 版"
112+
"本一起使用,並且可以使用過去版本有引入的受限 API。"
90113

91114
#: ../../c-api/stable.rst:53
92115
msgid ""
93116
"Rather than using the ``PY_VERSION_HEX`` macro directly, hardcode a minimum "
94117
"minor version (e.g. ``0x030A0000`` for Python 3.10) for stability when "
95118
"compiling with future Python versions."
96119
msgstr ""
120+
"與其直接使用 ``PY_VERSION_HEX`` 巨集,不如寫死 (hardcode) 最小次要版本(例如"
121+
"代表 Python 3.10 的 ``0x030A0000``\\ ),以便在使用未來的 Python 版本進行編譯"
122+
"時仍保持穩定性。"
97123

98124
#: ../../c-api/stable.rst:57
99125
msgid ""
100126
"You can also define ``Py_LIMITED_API`` to ``3``. This works the same as "
101127
"``0x03020000`` (Python 3.2, the version that introduced Limited API)."
102128
msgstr ""
129+
"你還可以將 ``Py_LIMITED_API`` 定義為 ``3``,這與 ``0x03020000``\\ (Python "
130+
"3.2,引入了受限 API 的版本)相同。"
103131

104132
#: ../../c-api/stable.rst:60
105133
msgid ""
106134
"On Windows, extensions that use the Stable ABI should be linked against "
107135
"``python3.dll`` rather than a version-specific library such as ``python39."
108136
"dll``."
109137
msgstr ""
138+
"在 Windows 上,使用穩定 ABI 的擴充應該連接到 ``python3.dll`` 而不是特定版本的"
139+
"函式庫,例如 ``python39.dll``。"
110140

111141
#: ../../c-api/stable.rst:64
112142
msgid ""
@@ -116,30 +146,40 @@ msgid ""
116146
"to ensure that, for example, extensions built with the 3.10+ Limited API are "
117147
"not installed for lower versions of Python."
118148
msgstr ""
149+
"在某些平台上,Python 將查找並加載以 ``abi3`` 標籤命名的共享函式庫檔案(例如 "
150+
"``mymodule.abi3.so``\\ )。它不檢查此類擴充是否符合穩定的 ABI。確保的責任在使"
151+
"用者(或者打包工具)身上,例如使用 3.10+ 受限 API 建置的擴充不會為較低版本的 "
152+
"Python 所安裝。"
119153

120154
#: ../../c-api/stable.rst:71
121155
msgid ""
122156
"All functions in the Stable ABI are present as functions in Python's shared "
123157
"library, not solely as macros. This makes them usable from languages that "
124158
"don't use the C preprocessor."
125159
msgstr ""
160+
"穩定 ABI 中的所有函式都作為函式存在於 Python 的共享函式庫中,而不僅是作為巨"
161+
"集。這使得它們可被用於不使用 C 預處理器 (preprocessor) 的語言。"
126162

127163
#: ../../c-api/stable.rst:77
128164
msgid "Limited API Scope and Performance"
129-
msgstr ""
165+
msgstr "受限 API 範圍和性能"
130166

131167
#: ../../c-api/stable.rst:79
132168
msgid ""
133169
"The goal for the Limited API is to allow everything that is possible with "
134170
"the full C API, but possibly with a performance penalty."
135171
msgstr ""
172+
"受限 API 的目標是允許使用完整的 C API 進行所有可能的操作,但可能會降低性能。"
136173

137174
#: ../../c-api/stable.rst:82
138175
msgid ""
139176
"For example, while :c:func:`PyList_GetItem` is available, its “unsafe” macro "
140177
"variant :c:func:`PyList_GET_ITEM` is not. The macro can be faster because it "
141178
"can rely on version-specific implementation details of the list object."
142179
msgstr ""
180+
"例如,雖然 :c:func:`PyList_GetItem` 可用,但它的「不安全」巨集變體 :c:func:"
181+
"`PyList_GET_ITEM` 為不可用。巨集運行可以更快,因為它可以依賴 list 物件的特定"
182+
"版本實作細節。"
143183

144184
#: ../../c-api/stable.rst:87
145185
msgid ""
@@ -148,6 +188,9 @@ msgid ""
148188
"allowing stability as Python's data structures are improved, but possibly "
149189
"reducing performance."
150190
msgstr ""
191+
"如果沒有定義 ``Py_LIMITED_API``,一些 C API 函式將被嵌入或被替換為巨集。定義 "
192+
"``Py_LIMITED_API`` 會禁用嵌入,從而隨著 Python 資料結構的改進而提高穩定性,但"
193+
"可能會降低性能。"
151194

152195
#: ../../c-api/stable.rst:92
153196
msgid ""
@@ -158,10 +201,14 @@ msgid ""
158201
"where a version-specific one is not available – for example, for prereleases "
159202
"of an upcoming Python version."
160203
msgstr ""
204+
"通過省略 ``Py_LIMITED_API`` 定義,可以使用特定版本的 ABI 編譯受限 API 擴充。"
205+
"這可以提高該 Python 版本的性能,但會限制相容性。使用 ``Py_LIMITED_API`` 編譯"
206+
"將產生一個擴充,可以在特定版本的擴充不可用的地方發布 — 例如,用於即將發布的 "
207+
"Python 版本的預發布版本 (prerelease)。"
161208

162209
#: ../../c-api/stable.rst:101
163210
msgid "Limited API Caveats"
164-
msgstr ""
211+
msgstr "受限 API 注意事項"
165212

166213
#: ../../c-api/stable.rst:103
167214
msgid ""
@@ -170,6 +217,9 @@ msgid ""
170217
"only covers definitions, but an API also includes other issues, such as "
171218
"expected semantics."
172219
msgstr ""
220+
"請注意,使用 ``Py_LIMITED_API`` 進行編譯\\ *不*\\ 完全保證程式碼符合受限 API "
221+
"或穩定 ABI。``Py_LIMITED_API`` 僅涵蓋定義,但 API 還包括其他問題,例如預期的"
222+
"語義 (semantic)。"
173223

174224
#: ../../c-api/stable.rst:108
175225
msgid ""
@@ -180,18 +230,26 @@ msgid ""
180230
"the argument will be used directly, causing a ``NULL`` dereference and "
181231
"crash. A similar argument works for fields of structs."
182232
msgstr ""
233+
"``Py_LIMITED_API`` 無法防範的一個問題是使用在較低 Python 版本中無效的引數來呼"
234+
"叫函式。例如一個開始接受 ``NULL`` 作為引數的函式。在 Python 3.9 中,``NULL`` "
235+
"現在代表選擇預設行為,但在 Python 3.8 中,引數將被直接使用,導致 ``NULL`` 取"
236+
"消參照 (dereference) 且崩潰 (crash)。類似的引數適用於結構 (struct) 的欄位。"
183237

184238
#: ../../c-api/stable.rst:115
185239
msgid ""
186240
"Another issue is that some struct fields are currently not hidden when "
187241
"``Py_LIMITED_API`` is defined, even though they're part of the Limited API."
188242
msgstr ""
243+
"另一個問題是,當有定義 ``Py_LIMITED_API`` 時,一些結構欄位目前不會被隱藏,即"
244+
"使它們是受限 API 的一部分。"
189245

190246
#: ../../c-api/stable.rst:118
191247
msgid ""
192248
"For these reasons, we recommend testing an extension with *all* minor Python "
193249
"versions it supports, and preferably to build with the *lowest* such version."
194250
msgstr ""
251+
"出於這些原因,我們建議要以它支援的\\ *所有*\\ 次要 Python 版本來測試擴充,並"
252+
"且最好使用\\ *最低*\\ 版本進行建置。"
195253

196254
#: ../../c-api/stable.rst:121
197255
msgid ""
@@ -200,6 +258,9 @@ msgid ""
200258
"few private declarations are exposed for technical reasons (or even "
201259
"unintentionally, as bugs)."
202260
msgstr ""
261+
"我們也建議要查看所有使用過的 API 的文件,檢查它是否明確屬於受限 API。即使有定"
262+
"義 ``Py_LIMITED_API``,一些私有聲明也會因為技術原因(或者甚至是無意地,例如臭"
263+
"蟲)而被公開出來。"
203264

204265
#: ../../c-api/stable.rst:126
205266
msgid ""
@@ -209,10 +270,13 @@ msgid ""
209270
"particular, parts of the Limited API may be deprecated and removed, provided "
210271
"that the Stable ABI stays stable."
211272
msgstr ""
273+
"另請注意,受限 API 不一定是穩定的:在 Python 3.8 中使用 ``Py_LIMITED_API`` 進"
274+
"行編譯意味著擴充將能以 Python 3.12 運行,但不一定能以 Python 3.12 *編譯*。特"
275+
"別是如果穩定 ABI 保持穩定,部分受限 API 可能會被棄用和刪除。"
212276

213277
#: ../../c-api/stable.rst:136
214278
msgid "Platform Considerations"
215-
msgstr ""
279+
msgstr "平台注意事項"
216280

217281
#: ../../c-api/stable.rst:138
218282
msgid ""
@@ -221,6 +285,9 @@ msgid ""
221285
"ABI, these details define a “platform”. They usually depend on the OS type "
222286
"and processor architecture"
223287
msgstr ""
288+
"ABI 穩定性不僅取決於 Python,還取決於使用的編譯器、低階函式庫和編譯器選項。出"
289+
"於穩定 ABI 的目的,這些細節定義了一個「平台」。它們通常取決於作業系統種類和處"
290+
"理器架構"
224291

225292
#: ../../c-api/stable.rst:143
226293
msgid ""
@@ -229,11 +296,14 @@ msgid ""
229296
"does not break the Stable ABI. This is the case with Windows and macOS "
230297
"releases from ``python.org`` and many third-party distributors."
231298
msgstr ""
299+
"每個特定的 Python 發布者都有責任確保特定平台上的所有 Python 版本都以不破壞穩"
300+
"定 ABI 的方式建置。``python.org`` 和許多第三方發布者發布的 Windows 和 macOS "
301+
"版本就是這種情況。"
232302

233303
#: ../../c-api/stable.rst:153
234304
msgid "Contents of Limited API"
235-
msgstr ""
305+
msgstr "受限 API 的內容"
236306

237307
#: ../../c-api/stable.rst:156
238308
msgid "Currently, the Limited API includes the following items:"
239-
msgstr ""
309+
msgstr "目前,受限 API 包括以下項目:"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.