Skip to content

Sync with CPython 3.13 #1118

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

Merged
merged 3 commits into from
Jul 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion c-api/allocation.po
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2001-2024, Python Software Foundation
# Copyright (C) 2001-2025, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
Expand Down Expand Up @@ -62,6 +62,8 @@ msgid ""
"`Py_TPFLAGS_HAVE_GC` set. For such objects, use :c:func:`PyObject_GC_New` "
"instead."
msgstr ""
"注意,如果 *typeobj* 有 :c:macro:`Py_TPFLAGS_HAVE_GC` 設定,則此函式不適用。"
"對於這種物件,請改用 :c:func:`PyObject_GC_New`。"

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

#: ../../c-api/allocation.rst:63
msgid ""
Expand Down
5 changes: 3 additions & 2 deletions c-api/bool.po
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# 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:
Expand Down Expand Up @@ -42,6 +41,8 @@ msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python boolean type; "
"it is the same object as :class:`bool` in the Python layer."
msgstr ""
"此 :c:type:`PyTypeObject` 實例代表 Python 的布林型別;它與 Python 層級中的 "
":class:`bool` 是同一個物件。"

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

#: ../../c-api/call.rst:69
msgid ""
Expand Down
24 changes: 23 additions & 1 deletion c-api/iter.po
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2001-2023, Python Software Foundation
# Copyright (C) 2001-2025, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
Expand Down Expand Up @@ -87,6 +87,28 @@ msgid ""
" /* continue doing useful work */\n"
"}"
msgstr ""
"PyObject *iterator = PyObject_GetIter(obj);\n"
"PyObject *item;\n"
"\n"
"if (iterator == NULL) {\n"
" /* 傳播錯誤 */\n"
"}\n"
"\n"
"while ((item = PyIter_Next(iterator))) {\n"
" /* 對 item 做些事情 */\n"
" ...\n"
" /* 完成後釋放參照 */\n"
" Py_DECREF(item);\n"
"}\n"
"\n"
"Py_DECREF(iterator);\n"
"\n"
"if (PyErr_Occurred()) {\n"
" /* 傳播錯誤 */\n"
"}\n"
"else {\n"
" /* 繼續做一些有用的任務 */\n"
"}"

#: ../../c-api/iter.rst:59
msgid ""
Expand Down
2 changes: 1 addition & 1 deletion c-api/module.po
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ msgstr ""

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

#: ../../c-api/module.rst:470
msgid "Low-level module creation functions"
Expand Down
4 changes: 3 additions & 1 deletion c-api/perfmaps.po
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2001-2024, Python Software Foundation
# Copyright (C) 2001-2025, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
Expand Down Expand Up @@ -90,6 +90,8 @@ msgid ""
"# address size name\n"
"7f3529fcf759 b py::bar:/run/t.py"
msgstr ""
"# 位址 大小 名稱\n"
"7f3529fcf759 b py::bar:/run/t.py"

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

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

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

#: ../../c-api/stable.rst:107
msgid ""
Expand Down
10 changes: 9 additions & 1 deletion c-api/typehints.po
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 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:
Expand Down Expand Up @@ -72,6 +72,14 @@ msgid ""
" ...\n"
"}"
msgstr ""
"...\n"
"static PyMethodDef my_obj_methods[] = {\n"
" // 其他方法。\n"
" ...\n"
" {\"__class_getitem__\", Py_GenericAlias, METH_O|METH_CLASS, \"See PEP "
"585\"}\n"
" ...\n"
"}"

#: ../../c-api/typehints.rst:38
msgid "The data model method :meth:`~object.__class_getitem__`."
Expand Down
5 changes: 2 additions & 3 deletions extending/index.po
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# 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:
Expand Down Expand Up @@ -90,7 +89,7 @@ msgstr ""

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

#: ../../extending/index.rst:57
msgid "Embedding the CPython runtime in a larger application"
Expand Down
3 changes: 2 additions & 1 deletion faq/gui.po
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 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:
Expand Down Expand Up @@ -95,6 +95,7 @@ msgid ""
"Various third-party freeze libraries such as py2exe and cx_Freeze have "
"handling for Tkinter applications built-in."
msgstr ""
"各種第三方凍結函式庫,例如 py2exe 和 cx_Freeze,都有內建了對 Tkinter 應用程式的處理。"

#: ../../faq/gui.rst:54
msgid "Can I have Tk events handled while waiting for I/O?"
Expand Down
18 changes: 6 additions & 12 deletions faq/windows.po
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# 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:
Expand Down Expand Up @@ -407,6 +406,11 @@ msgid ""
"initmyAppc(); // Initialize (import) the helper class.\n"
"PyRun_SimpleString(\"import myApp\"); // Import the shadow class."
msgstr ""
"#include <Python.h>\n"
"...\n"
"Py_Initialize(); // 初始化 Python。\n"
"initmyAppc(); // 初始化(引入)幫助類別。\n"
"PyRun_SimpleString(\"import myApp\"); // 引入 shadow 類別。"

#: ../../faq/windows.rst:218
msgid ""
Expand Down Expand Up @@ -550,13 +554,3 @@ msgstr ""
"上的版本發生這種情況。首先要確保你的作業系統仍受支援並且是最新的,如果這無法"
"解決問題,請造訪 `Microsoft 支援頁面 <https://support.microsoft.com/en-us/"
"help/3118401/>`_\\ 以取得關於手動安裝 C Runtime 更新的指南。"

#~ msgid ""
#~ "This series of screencasts aims to get you up and running with Python on "
#~ "Windows XP. The knowledge is distilled into 1.5 hours and will get you "
#~ "up and running with the right Python distribution, coding in your choice "
#~ "of IDE, and debugging and writing solid code with unit-tests."
#~ msgstr ""
#~ "這一組影片教學可以讓你在 Windows XP 上順利使用 Python。整組課程大約需要你"
#~ "一個半小時的時間。課程包含安裝正確的 Python 版本,在你喜歡的 IDE 中進行開"
#~ "發,除錯,以及對程式進行單元測試以生產可靠的程式。"
4 changes: 2 additions & 2 deletions howto/argparse.po
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2001-2024, Python Software Foundation
# Copyright (C) 2001-2025, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
Expand Down Expand Up @@ -1644,7 +1644,7 @@ msgstr "若要在 :mod:`argparse` 輸出中翻譯你自己的字串,請使用

#: ../../howto/argparse.rst:850
msgid "Custom type converters"
msgstr ""
msgstr "自定義型別轉換器"

#: ../../howto/argparse.rst:852
msgid ""
Expand Down
Loading