Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit0267528

Browse files
committed
add some simple translation
1 parent7b7d201 commit0267528

File tree

18 files changed

+211
-40
lines changed

18 files changed

+211
-40
lines changed

‎c-api/allocation.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2001-2024, Python Software Foundation
1+
# Copyright (C) 2001-2025, Python Software Foundation
22
# This file is distributed under the same license as the Python package.
33
#
44
# Translators:
@@ -62,6 +62,8 @@ msgid ""
6262
"`Py_TPFLAGS_HAVE_GC` set. For such objects, use :c:func:`PyObject_GC_New` "
6363
"instead."
6464
msgstr""
65+
"注意,如果 *typeobj* 有 :c:macro:`Py_TPFLAGS_HAVE_GC` 設定,則此函式不適用。"
66+
"對於這種物件,請改用 :c:func:`PyObject_GC_New`。"
6567

6668
#:../../c-api/allocation.rst:45
6769
msgid""
@@ -88,6 +90,8 @@ msgid ""
8890
"`Py_TPFLAGS_HAVE_GC` set. For such objects, use :c:func:`PyObject_GC_NewVar` "
8991
"instead."
9092
msgstr""
93+
"注意,如果 *typeobj* 有 :c:macro:`Py_TPFLAGS_HAVE_GC` 設定,則此函式不適用。"
94+
"對於這種物件,請改用 :c:func:`PyObject_GC_NewVar`。"
9195

9296
#:../../c-api/allocation.rst:63
9397
msgid""

‎c-api/bool.po

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# SOME DESCRIPTIVE TITLE.
2-
# Copyright (C) 2001-2022, Python Software Foundation
1+
# Copyright (C) 2001-2025, Python Software Foundation
32
# This file is distributed under the same license as the Python package.
43
#
54
# Translators:
@@ -42,6 +41,8 @@ msgid ""
4241
"This instance of :c:type:`PyTypeObject` represents the Python boolean type; "
4342
"it is the same object as :class:`bool` in the Python layer."
4443
msgstr""
44+
"此 :c:type:`PyTypeObject` 實例代表 Python 的布林型別;它與 Python 層級中的 "
45+
":class:`bool` 是同一個物件。"
4546

4647
#:../../c-api/bool.rst:22
4748
msgid""

‎c-api/call.po

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2001-2023, Python Software Foundation
1+
# Copyright (C) 2001-2025, Python Software Foundation
22
# This file is distributed under the same license as the Python package.
33
#
44
# Translators:
@@ -122,6 +122,11 @@ msgid ""
122122
"versions, vectorcall should only be used with :c:macro:`immutable "
123123
"<Py_TPFLAGS_IMMUTABLETYPE>` or static types."
124124
msgstr""
125+
"當一個類別的 :py:meth:`~object.__call__` 方法被重新賦值時,:c:macro:"
126+
"`Py_TPFLAGS_HAVE_VECTORCALL` 旗標現在會被移除。(這會在內部設定 :c:member:"
127+
"`~PyTypeObject.tp_call`,因此可能會使它與 vectorcall 函式有不同的行為。)"
128+
"在較早的 Python 版本中,vectorcall 應該只與 :c:macro:"
129+
"`immutable <Py_TPFLAGS_IMMUTABLETYPE>` 或靜態型別一起使用。"
125130

126131
#:../../c-api/call.rst:69
127132
msgid""

‎c-api/iter.po

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2001-2023, Python Software Foundation
1+
# Copyright (C) 2001-2025, Python Software Foundation
22
# This file is distributed under the same license as the Python package.
33
#
44
# Translators:
@@ -87,6 +87,28 @@ msgid ""
8787
" /* continue doing useful work */\n"
8888
"}"
8989
msgstr""
90+
"PyObject *iterator = PyObject_GetIter(obj);\n"
91+
"PyObject *item;\n"
92+
"\n"
93+
"if (iterator == NULL) {\n"
94+
" /* 傳播錯誤 */\n"
95+
"}\n"
96+
"\n"
97+
"while ((item = PyIter_Next(iterator))) {\n"
98+
" /* 對 item 做些事情 */\n"
99+
" ...\n"
100+
" /* 完成後釋放參照 */\n"
101+
" Py_DECREF(item);\n"
102+
"}\n"
103+
"\n"
104+
"Py_DECREF(iterator);\n"
105+
"\n"
106+
"if (PyErr_Occurred()) {\n"
107+
" /* 傳播錯誤 */\n"
108+
"}\n"
109+
"else {\n"
110+
" /* 繼續做一些有用的任務 */\n"
111+
"}"
90112

91113
#:../../c-api/iter.rst:59
92114
msgid""

‎c-api/module.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ msgstr ""
526526

527527
#:../../c-api/module.rst:467
528528
msgid"See :PEP:`489` for more details on multi-phase initialization."
529-
msgstr""
529+
msgstr"更多關於多階段初始化的詳細資訊,請參閱 :pep:`489`。"
530530

531531
#:../../c-api/module.rst:470
532532
msgid"Low-level module creation functions"

‎c-api/perfmaps.po

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2001-2024, Python Software Foundation
1+
# Copyright (C) 2001-2025, Python Software Foundation
22
# This file is distributed under the same license as the Python package.
33
#
44
# Translators:
@@ -90,6 +90,8 @@ msgid ""
9090
"# address size name\n"
9191
"7f3529fcf759 b py::bar:/run/t.py"
9292
msgstr""
93+
"# 位址 大小 名稱\n"
94+
"7f3529fcf759 b py::bar:/run/t.py"
9395

9496
#:../../c-api/perfmaps.rst:41
9597
msgid""

‎c-api/refcounting.po

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2001-2023, Python Software Foundation
1+
# Copyright (C) 2001-2025, Python Software Foundation
22
# This file is distributed under the same license as the Python package.
33
#
44
# Translators:
@@ -43,7 +43,7 @@ msgid ""
4343
"accurate, other than a value of 0 or 1."
4444
msgstr""
4545
"請注意,回傳的值可能實際上並不反映實際保存了多少對該物件的參照。例如,某些物"
46-
"件是「\\:term:`不滅的 (immortal) <immortal>`\\」,並且具有非常高的參照計"
46+
"件是「:term:`不滅的 (immortal) <immortal>`」,並且具有非常高的參照計"
4747
"數,不能反映實際的參照數量。因此,除了 0 或 1 以外,不要依賴回傳值的準確性。"
4848

4949
#:../../c-api/refcounting.rst:24
@@ -68,6 +68,8 @@ msgid ""
6868
"On :ref:`Python build with Free Threading <free-threading-build>`, if "
6969
"*refcnt* is larger than ``UINT32_MAX``, the object is made :term:`immortal`."
7070
msgstr""
71+
"在\\ :ref:`啟用自由執行緒的 Python 建置 <free-threading-build>`\\ 中,如果 "
72+
"*refcnt* 大於 ``UINT32_MAX``,則該物件會被設為\\ :term:`不滅的 (immortal) <immortal>`。"
7173

7274
#:../../c-api/refcounting.rst:40../../c-api/refcounting.rst:53
7375
#:../../c-api/refcounting.rst:119

‎c-api/stable.po

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2001-2024, Python Software Foundation
1+
# Copyright (C) 2001-2025, Python Software Foundation
22
# This file is distributed under the same license as the Python package.
33
#
44
# Translators:
@@ -198,6 +198,8 @@ msgid ""
198198
"extensions. See Python's Backwards Compatibility Policy (:pep:`387`) for "
199199
"details."
200200
msgstr""
201+
"穩定 ABI 可以防止 ABI 問題,例如由於結構布局或函式簽名變化導致缺少符號或數據損壞的鏈接器 (linker) 錯誤。"
202+
"然而,Python 的其他變化可能會改變 *行為* 的擴充。有關詳細信息,請參閱 Python 的向後相容性政策 (:pep:`387`)。"
201203

202204
#:../../c-api/stable.rst:107
203205
msgid""

‎c-api/typehints.po

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2001-2022, Python Software Foundation
1+
# Copyright (C) 2001-2025, Python Software Foundation
22
# This file is distributed under the same license as the Python package.
33
#
44
# Translators:
@@ -72,6 +72,14 @@ msgid ""
7272
" ...\n"
7373
"}"
7474
msgstr""
75+
"...\n"
76+
"static PyMethodDef my_obj_methods[] = {\n"
77+
" // 其他方法。\n"
78+
" ...\n"
79+
" {\"__class_getitem__\", Py_GenericAlias, METH_O|METH_CLASS,\"See PEP "
80+
"585\"}\n"
81+
" ...\n"
82+
"}"
7583

7684
#:../../c-api/typehints.rst:38
7785
msgid"The data model method :meth:`~object.__class_getitem__`."

‎extending/index.po

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# SOME DESCRIPTIVE TITLE.
2-
# Copyright (C) 2001-2022, Python Software Foundation
1+
# Copyright (C) 2001-2025, Python Software Foundation
32
# This file is distributed under the same license as the Python package.
43
#
54
# Translators:
@@ -90,7 +89,7 @@ msgstr ""
9089

9190
#:../../extending/index.rst:44
9291
msgid":pep:`489` -- Multi-phase extension module initialization"
93-
msgstr""
92+
msgstr":pep:`489` -- 多階段擴充模組初始化"
9493

9594
#:../../extending/index.rst:57
9695
msgid"Embedding the CPython runtime in a larger application"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp