From c1690fa4e84afc9496c5ca3563b908b670906fcc Mon Sep 17 00:00:00 2001 From: lamentxu <1372449351@qq.com> Date: Wed, 8 Oct 2025 20:47:33 +0800 Subject: [PATCH 01/13] Update slice.po --- c-api/slice.po | 42 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/c-api/slice.po b/c-api/slice.po index 57288261d1..d129282460 100644 --- a/c-api/slice.po +++ b/c-api/slice.po @@ -3,13 +3,14 @@ # # Translators: # Leon H., 2017 +# Weilin Du, 2025 msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2025-02-18 00:13+0000\n" -"PO-Revision-Date: 2018-05-23 14:07+0000\n" -"Last-Translator: Adrian Liaw \n" +"PO-Revision-Date: 2025-10-08 20:45+0800\n" +"Last-Translator: Weilin Du <1372449351@qq.com>\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" "Language: zh_TW\n" @@ -17,6 +18,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 3.6\n" #: ../../c-api/slice.rst:6 msgid "Slice Objects" @@ -26,13 +28,14 @@ msgstr "切片物件" msgid "" "The type object for slice objects. This is the same as :class:`slice` in " "the Python layer." -msgstr "" +msgstr "slice 物件的類型物件。這與 Python 層中的 :class:`slice` 相同。" #: ../../c-api/slice.rst:17 msgid "" "Return true if *ob* is a slice object; *ob* must not be ``NULL``. This " "function always succeeds." msgstr "" +"如果 *ob* 是 slice 物件,則回傳 true;*ob* 不能是 ``NULL``。此函式永遠成功。" #: ../../c-api/slice.rst:23 msgid "" @@ -41,12 +44,15 @@ msgid "" "the same names. Any of the values may be ``NULL``, in which case the " "``None`` will be used for the corresponding attribute." msgstr "" +"以指定的值回傳一個新的切片物件。*start*、*stop* 及 *step* 參數會被用為同名" +"的 slice 物件屬性值。任何值都可能是 ``NULL``,在這種情況下,``None`` 將用於" +"相對應的屬性。" #: ../../c-api/slice.rst:28 msgid "" "Return ``NULL`` with an exception set if the new object could not be " "allocated." -msgstr "" +msgstr "如果無法分配新物件,則回傳 ``NULL`` 並設定異常。" #: ../../c-api/slice.rst:34 msgid "" @@ -54,6 +60,8 @@ msgid "" "assuming a sequence of length *length*. Treats indices greater than *length* " "as errors." msgstr "" +"從 slice 物件 *slice* 讀取開始、停止和步進索引,假設序列長度為 *length*。將大" +"於 *length* 的索引視為錯誤。" #: ../../c-api/slice.rst:38 msgid "" @@ -61,15 +69,17 @@ msgid "" "one of the indices was not ``None`` and failed to be converted to an " "integer, in which case ``-1`` is returned with an exception set)." msgstr "" +"成功時回傳 ``0``, 錯誤時回傳 ``-1``, 並無異常設定 (除非其中一個索引不是 " +"``None` 並且未能轉換成整數,在這種情況下會回傳 ``-1`, 並有異常設定)。" #: ../../c-api/slice.rst:42 msgid "You probably do not want to use this function." -msgstr "" +msgstr "您可能不想使用此功能。" #: ../../c-api/slice.rst:44 ../../c-api/slice.rst:75 msgid "" "The parameter type for the *slice* parameter was ``PySliceObject*`` before." -msgstr "" +msgstr "之前 *slice* 的參數類型是 ``PySliceObject*`` 。" #: ../../c-api/slice.rst:51 msgid "" @@ -79,6 +89,9 @@ msgid "" "bounds indices are clipped in a manner consistent with the handling of " "normal slices." msgstr "" +"可用來取代 :c:func:`PySlice_GetIndices`。從假設序列長度為 *length* 的 slice " +"物件 *slice* 擷取開始、停止和步長索引,並將 slice 的長度存入 *slicelength*。" +"超出範圍的索引會被剪切,剪切方式與一般切片的處理方式一致。" #: ../../c-api/slice.rst:57 msgid "Return ``0`` on success and ``-1`` on error with an exception set." @@ -90,6 +103,9 @@ msgid "" "should be replaced by a combination of :c:func:`PySlice_Unpack` " "and :c:func:`PySlice_AdjustIndices` where ::" msgstr "" +"這個函式對於可調整大小的序列並不安全。它的呼叫應該" +"被 :c:func:`PySlice_Unpack` 和 :c:func:`PySlice_AdjustIndices` 的組合取代,其" +"中 ::" #: ../../c-api/slice.rst:64 msgid "" @@ -101,7 +117,7 @@ msgstr "" #: ../../c-api/slice.rst:68 msgid "is replaced by ::" -msgstr "" +msgstr "被更換為 ::" #: ../../c-api/slice.rst:70 msgid "" @@ -135,6 +151,10 @@ msgid "" "``PY_SSIZE_T_MIN`` to ``PY_SSIZE_T_MIN``, and silently boost the step values " "less than ``-PY_SSIZE_T_MAX`` to ``-PY_SSIZE_T_MAX``." msgstr "" +"以 C 整數的形式從 slice 物件中抽取 start、stop 及 step 資料成員。將大於 " +"`PY_SSIZE_T_MAX`` 的值靜默減少為 `PY_SSIZE_T_MAX``, 將小於 `PY_SSIZE_T_MIN`` " +"的 start 和 stop 值靜默提升為 `PY_SSIZE_T_MIN``, 將小於 `-PY_SSIZE_T_MAX`` " +"的 step 值靜默提升為 `-PY_SSIZE_T_MAX``。" #: ../../c-api/slice.rst:100 msgid "Return ``-1`` with an exception set on error, ``0`` on success." @@ -146,12 +166,14 @@ msgid "" "Out of bounds indices are clipped in a manner consistent with the handling " "of normal slices." msgstr "" +"假設序列長度為指定長度,調整開始/結束切片索引。超出範圍的索引會以與處理正常切" +"片一致的方式切除。" #: ../../c-api/slice.rst:111 msgid "" "Return the length of the slice. Always successful. Doesn't call Python " "code." -msgstr "" +msgstr "回傳切片的長度。永遠成功。不呼叫 Python 程式碼。" #: ../../c-api/slice.rst:118 msgid "Ellipsis Object" @@ -162,12 +184,16 @@ msgid "" "The type of Python :const:`Ellipsis` object. Same " "as :class:`types.EllipsisType` in the Python layer." msgstr "" +"Python :const:`Ellipsis` 物件的類型。與 Python 層中" +"的 :class:`types.EllipsisType` 相同。" #: ../../c-api/slice.rst:129 msgid "" "The Python ``Ellipsis`` object. This object has no methods. " "Like :c:data:`Py_None`, it is an :term:`immortal` singleton object." msgstr "" +"Python ``Ellipsis`` 物件。這個物件沒有方法。就像 :c:data:`Py_None` 一樣,它" +"是一個 :term:`immortal` 單一物件。" #: ../../c-api/slice.rst:132 msgid ":c:data:`Py_Ellipsis` is immortal." From 9d0be5131bb9a490140c140ec3eb68c9ce865159 Mon Sep 17 00:00:00 2001 From: lamentxu <1372449351@qq.com> Date: Wed, 8 Oct 2025 20:48:24 +0800 Subject: [PATCH 02/13] Update slice.po --- c-api/slice.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c-api/slice.po b/c-api/slice.po index d129282460..89485fdcfb 100644 --- a/c-api/slice.po +++ b/c-api/slice.po @@ -74,7 +74,7 @@ msgstr "" #: ../../c-api/slice.rst:42 msgid "You probably do not want to use this function." -msgstr "您可能不想使用此功能。" +msgstr "你可能不想使用此功能。" #: ../../c-api/slice.rst:44 ../../c-api/slice.rst:75 msgid "" From 6e0e089e8e5398ba59ac48a7083f01177680af67 Mon Sep 17 00:00:00 2001 From: lamentxu <1372449351@qq.com> Date: Wed, 8 Oct 2025 20:52:43 +0800 Subject: [PATCH 03/13] Update slice.po --- c-api/slice.po | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/c-api/slice.po b/c-api/slice.po index 89485fdcfb..1256bbe31b 100644 --- a/c-api/slice.po +++ b/c-api/slice.po @@ -2,8 +2,8 @@ # This file is distributed under the same license as the Python package. # # Translators: -# Leon H., 2017 -# Weilin Du, 2025 +# Leon H.,2017 +# Weilin Du,2025 msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" @@ -39,9 +39,9 @@ msgstr "" #: ../../c-api/slice.rst:23 msgid "" -"Return a new slice object with the given values. The *start*, *stop*, and " +"Return a new slice object with the given values. The *start*,*stop*,and " "*step* parameters are used as the values of the slice object attributes of " -"the same names. Any of the values may be ``NULL``, in which case the " +"the same names. Any of the values may be ``NULL``,in which case the " "``None`` will be used for the corresponding attribute." msgstr "" "以指定的值回傳一個新的切片物件。*start*、*stop* 及 *step* 參數會被用為同名" @@ -56,7 +56,7 @@ msgstr "如果無法分配新物件,則回傳 ``NULL`` 並設定異常。" #: ../../c-api/slice.rst:34 msgid "" -"Retrieve the start, stop and step indices from the slice object *slice*, " +"Retrieve the start,stop and step indices from the slice object *slice*," "assuming a sequence of length *length*. Treats indices greater than *length* " "as errors." msgstr "" @@ -67,10 +67,10 @@ msgstr "" msgid "" "Returns ``0`` on success and ``-1`` on error with no exception set (unless " "one of the indices was not ``None`` and failed to be converted to an " -"integer, in which case ``-1`` is returned with an exception set)." +"integer,in which case ``-1`` is returned with an exception set)." msgstr "" -"成功時回傳 ``0``, 錯誤時回傳 ``-1``, 並無異常設定 (除非其中一個索引不是 " -"``None` 並且未能轉換成整數,在這種情況下會回傳 ``-1`, 並有異常設定)。" +"成功時回傳 ``0``,錯誤時回傳 ``-1``,並無異常設定 (除非其中一個索引不是 " +"``None` 並且未能轉換成整數,在這種情況下會回傳 ``-1`,並有異常設定)。" #: ../../c-api/slice.rst:42 msgid "You probably do not want to use this function." @@ -83,9 +83,9 @@ msgstr "之前 *slice* 的參數類型是 ``PySliceObject*`` 。" #: ../../c-api/slice.rst:51 msgid "" -"Usable replacement for :c:func:`PySlice_GetIndices`. Retrieve the start, " -"stop, and step indices from the slice object *slice* assuming a sequence of " -"length *length*, and store the length of the slice in *slicelength*. Out of " +"Usable replacement for :c:func:`PySlice_GetIndices`. Retrieve the start," +"stop,and step indices from the slice object *slice* assuming a sequence of " +"length *length*,and store the length of the slice in *slicelength*. Out of " "bounds indices are clipped in a manner consistent with the handling of " "normal slices." msgstr "" @@ -109,7 +109,7 @@ msgstr "" #: ../../c-api/slice.rst:64 msgid "" -"if (PySlice_GetIndicesEx(slice, length, &start, &stop, &step, &slicelength) " +"if (PySlice_GetIndicesEx(slice,length,&start,&stop,&step,&slicelength) " "< 0) {\n" " // return error\n" "}" @@ -121,10 +121,10 @@ msgstr "被更換為 ::" #: ../../c-api/slice.rst:70 msgid "" -"if (PySlice_Unpack(slice, &start, &stop, &step) < 0) {\n" +"if (PySlice_Unpack(slice,&start,&stop,&step) < 0) {\n" " // return error\n" "}\n" -"slicelength = PySlice_AdjustIndices(length, &start, &stop, step);" +"slicelength = PySlice_AdjustIndices(length,&start,&stop,step);" msgstr "" #: ../../c-api/slice.rst:79 @@ -132,7 +132,7 @@ msgid "" "If ``Py_LIMITED_API`` is not set or set to the value between ``0x03050400`` " "and ``0x03060000`` (not including) or ``0x03060100`` or higher :c:func:`!" "PySlice_GetIndicesEx` is implemented as a macro using :c:func:`!" -"PySlice_Unpack` and :c:func:`!PySlice_AdjustIndices`. Arguments *start*, " +"PySlice_Unpack` and :c:func:`!PySlice_AdjustIndices`. Arguments *start*," "*stop* and *step* are evaluated more than once." msgstr "" @@ -145,19 +145,19 @@ msgstr "" #: ../../c-api/slice.rst:94 msgid "" -"Extract the start, stop and step data members from a slice object as C " +"Extract the start,stop and step data members from a slice object as C " "integers. Silently reduce values larger than ``PY_SSIZE_T_MAX`` to " -"``PY_SSIZE_T_MAX``, silently boost the start and stop values less than " -"``PY_SSIZE_T_MIN`` to ``PY_SSIZE_T_MIN``, and silently boost the step values " +"``PY_SSIZE_T_MAX``,silently boost the start and stop values less than " +"``PY_SSIZE_T_MIN`` to ``PY_SSIZE_T_MIN``,and silently boost the step values " "less than ``-PY_SSIZE_T_MAX`` to ``-PY_SSIZE_T_MAX``." msgstr "" "以 C 整數的形式從 slice 物件中抽取 start、stop 及 step 資料成員。將大於 " -"`PY_SSIZE_T_MAX`` 的值靜默減少為 `PY_SSIZE_T_MAX``, 將小於 `PY_SSIZE_T_MIN`` " -"的 start 和 stop 值靜默提升為 `PY_SSIZE_T_MIN``, 將小於 `-PY_SSIZE_T_MAX`` " +"`PY_SSIZE_T_MAX`` 的值靜默減少為 `PY_SSIZE_T_MAX``,將小於 `PY_SSIZE_T_MIN`` " +"的 start 和 stop 值靜默提升為 `PY_SSIZE_T_MIN``,將小於 `-PY_SSIZE_T_MAX`` " "的 step 值靜默提升為 `-PY_SSIZE_T_MAX``。" #: ../../c-api/slice.rst:100 -msgid "Return ``-1`` with an exception set on error, ``0`` on success." +msgid "Return ``-1`` with an exception set on error,``0`` on success." msgstr "成功時回傳 ``0``,在失敗時回傳 ``-1`` 並設定例外。" #: ../../c-api/slice.rst:107 @@ -190,7 +190,7 @@ msgstr "" #: ../../c-api/slice.rst:129 msgid "" "The Python ``Ellipsis`` object. This object has no methods. " -"Like :c:data:`Py_None`, it is an :term:`immortal` singleton object." +"Like :c:data:`Py_None`,it is an :term:`immortal` singleton object." msgstr "" "Python ``Ellipsis`` 物件。這個物件沒有方法。就像 :c:data:`Py_None` 一樣,它" "是一個 :term:`immortal` 單一物件。" From 41dc993172ee21e39b18b4e02631670ea63e9f2c Mon Sep 17 00:00:00 2001 From: lamentxu <1372449351@qq.com> Date: Wed, 8 Oct 2025 20:54:41 +0800 Subject: [PATCH 04/13] fix CI --- c-api/slice.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c-api/slice.po b/c-api/slice.po index 1256bbe31b..c3517e5d06 100644 --- a/c-api/slice.po +++ b/c-api/slice.po @@ -35,7 +35,7 @@ msgid "" "Return true if *ob* is a slice object; *ob* must not be ``NULL``. This " "function always succeeds." msgstr "" -"如果 *ob* 是 slice 物件,則回傳 true;*ob* 不能是 ``NULL``。此函式永遠成功。" +"如果 *ob* 是 slice 物件,則回傳 true;*ob* 不能是 ``NULL`` 。此函式永遠成功。" #: ../../c-api/slice.rst:23 msgid "" From 3fce0d0ef3cc1a1e4835dd1e25bcc2acb693dda8 Mon Sep 17 00:00:00 2001 From: Weilin Du <108666168+LamentXU123@users.noreply.github.com> Date: Wed, 8 Oct 2025 21:34:46 +0800 Subject: [PATCH 05/13] Apply suggestions from code review Co-authored-by: W. H. Wang --- c-api/slice.po | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/c-api/slice.po b/c-api/slice.po index c3517e5d06..60b613e91e 100644 --- a/c-api/slice.po +++ b/c-api/slice.po @@ -28,7 +28,7 @@ msgstr "切片物件" msgid "" "The type object for slice objects. This is the same as :class:`slice` in " "the Python layer." -msgstr "slice 物件的類型物件。這與 Python 層中的 :class:`slice` 相同。" +msgstr "slice 物件的型別物件。這與 Python 層中的 :class:`slice` 相同。" #: ../../c-api/slice.rst:17 msgid "" @@ -52,7 +52,7 @@ msgstr "" msgid "" "Return ``NULL`` with an exception set if the new object could not be " "allocated." -msgstr "如果無法分配新物件,則回傳 ``NULL`` 並設定異常。" +msgstr "如果無法分配新物件,則回傳 ``NULL`` 並設定例外。" #: ../../c-api/slice.rst:34 msgid "" @@ -69,8 +69,8 @@ msgid "" "one of the indices was not ``None`` and failed to be converted to an " "integer,in which case ``-1`` is returned with an exception set)." msgstr "" -"成功時回傳 ``0``,錯誤時回傳 ``-1``,並無異常設定 (除非其中一個索引不是 " -"``None` 並且未能轉換成整數,在這種情況下會回傳 ``-1`,並有異常設定)。" +"成功時回傳 ``0``,錯誤時回傳 ``-1``,並無例外設定(除非其中一個索引不是 " +"``None` 並且未能轉換成整數,在這種情況下會回傳 ``-1`,並有設定例外)。" #: ../../c-api/slice.rst:42 msgid "You probably do not want to use this function." @@ -79,7 +79,7 @@ msgstr "你可能不想使用此功能。" #: ../../c-api/slice.rst:44 ../../c-api/slice.rst:75 msgid "" "The parameter type for the *slice* parameter was ``PySliceObject*`` before." -msgstr "之前 *slice* 的參數類型是 ``PySliceObject*`` 。" +msgstr "之前 *slice* 的參數型別是 ``PySliceObject*`` 。" #: ../../c-api/slice.rst:51 msgid "" @@ -105,7 +105,7 @@ msgid "" msgstr "" "這個函式對於可調整大小的序列並不安全。它的呼叫應該" "被 :c:func:`PySlice_Unpack` 和 :c:func:`PySlice_AdjustIndices` 的組合取代,其" -"中 ::" +"中: ::" #: ../../c-api/slice.rst:64 msgid "" @@ -154,7 +154,7 @@ msgstr "" "以 C 整數的形式從 slice 物件中抽取 start、stop 及 step 資料成員。將大於 " "`PY_SSIZE_T_MAX`` 的值靜默減少為 `PY_SSIZE_T_MAX``,將小於 `PY_SSIZE_T_MIN`` " "的 start 和 stop 值靜默提升為 `PY_SSIZE_T_MIN``,將小於 `-PY_SSIZE_T_MAX`` " -"的 step 值靜默提升為 `-PY_SSIZE_T_MAX``。" +"的 step 值靜默提升為 ``-PY_SSIZE_T_MAX``。" #: ../../c-api/slice.rst:100 msgid "Return ``-1`` with an exception set on error,``0`` on success." @@ -184,7 +184,7 @@ msgid "" "The type of Python :const:`Ellipsis` object. Same " "as :class:`types.EllipsisType` in the Python layer." msgstr "" -"Python :const:`Ellipsis` 物件的類型。與 Python 層中" +"Python :const:`Ellipsis` 物件的型別。與 Python 層中" "的 :class:`types.EllipsisType` 相同。" #: ../../c-api/slice.rst:129 From a0798b3554234e1bf3cbcfee370d7a5319327185 Mon Sep 17 00:00:00 2001 From: lamentxu <1372449351@qq.com> Date: Wed, 8 Oct 2025 21:37:24 +0800 Subject: [PATCH 06/13] Update slice.po --- c-api/slice.po | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/c-api/slice.po b/c-api/slice.po index 60b613e91e..d961713754 100644 --- a/c-api/slice.po +++ b/c-api/slice.po @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2025-02-18 00:13+0000\n" -"PO-Revision-Date: 2025-10-08 20:45+0800\n" +"PO-Revision-Date: 2025-10-08 21:36+0800\n" "Last-Translator: Weilin Du <1372449351@qq.com>\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -39,14 +39,14 @@ msgstr "" #: ../../c-api/slice.rst:23 msgid "" -"Return a new slice object with the given values. The *start*,*stop*,and " +"Return a new slice object with the given values. The *start*, *stop*, and " "*step* parameters are used as the values of the slice object attributes of " -"the same names. Any of the values may be ``NULL``,in which case the " +"the same names. Any of the values may be ``NULL``, in which case the " "``None`` will be used for the corresponding attribute." msgstr "" -"以指定的值回傳一個新的切片物件。*start*、*stop* 及 *step* 參數會被用為同名" -"的 slice 物件屬性值。任何值都可能是 ``NULL``,在這種情況下,``None`` 將用於" -"相對應的屬性。" +"以指定的值回傳一個新的切片物件。*start*、*stop* 及 *step* 參數會被用為同名的 " +"slice 物件屬性值。任何值都可能是 ``NULL``,在這種情況下,``None`` 將用於相對" +"應的屬性。" #: ../../c-api/slice.rst:28 msgid "" @@ -114,6 +114,10 @@ msgid "" " // return error\n" "}" msgstr "" +"if (PySlice_GetIndicesEx(slice,length,&start,&stop,&step,&slicelength) " +"< 0) {\n" +" // return error\n" +"}" #: ../../c-api/slice.rst:68 msgid "is replaced by ::" @@ -126,15 +130,24 @@ msgid "" "}\n" "slicelength = PySlice_AdjustIndices(length,&start,&stop,step);" msgstr "" +"if (PySlice_Unpack(slice,&start,&stop,&step) < 0) {\n" +" // return error\n" +"}\n" +"slicelength = PySlice_AdjustIndices(length,&start,&stop,step);" #: ../../c-api/slice.rst:79 msgid "" "If ``Py_LIMITED_API`` is not set or set to the value between ``0x03050400`` " "and ``0x03060000`` (not including) or ``0x03060100`` or higher :c:func:`!" "PySlice_GetIndicesEx` is implemented as a macro using :c:func:`!" -"PySlice_Unpack` and :c:func:`!PySlice_AdjustIndices`. Arguments *start*," +"PySlice_Unpack` and :c:func:`!PySlice_AdjustIndices`. Arguments *start*," "*stop* and *step* are evaluated more than once." msgstr "" +"If ``Py_LIMITED_API`` is not set or set to the value between ``0x03050400`` " +"and ``0x03060000`` (not including) or ``0x03060100`` or higher :c:func:`!" +"PySlice_GetIndicesEx` is implemented as a macro using :c:func:`!" +"PySlice_Unpack` and :c:func:`!PySlice_AdjustIndices`. Arguments *start*," +"*stop* and *step* are evaluated more than once." #: ../../c-api/slice.rst:86 msgid "" @@ -142,6 +155,9 @@ msgid "" "between ``0x03060000`` and ``0x03060100`` (not including) :c:func:`!" "PySlice_GetIndicesEx` is a deprecated function." msgstr "" +"If ``Py_LIMITED_API`` is set to the value less than ``0x03050400`` or " +"between ``0x03060000`` and ``0x03060100`` (not including) :c:func:`!" +"PySlice_GetIndicesEx` is a deprecated function." #: ../../c-api/slice.rst:94 msgid "" @@ -192,8 +208,8 @@ msgid "" "The Python ``Ellipsis`` object. This object has no methods. " "Like :c:data:`Py_None`,it is an :term:`immortal` singleton object." msgstr "" -"Python ``Ellipsis`` 物件。這個物件沒有方法。就像 :c:data:`Py_None` 一樣,它" -"是一個 :term:`immortal` 單一物件。" +"Python ``Ellipsis`` 物件。這個物件沒有方法。就像 :c:data:`Py_None` 一樣,它是" +"一個 :term:`immortal` 單一物件。" #: ../../c-api/slice.rst:132 msgid ":c:data:`Py_Ellipsis` is immortal." From 203b61b84bd39fbf936dc01a606fe9502fa2de2c Mon Sep 17 00:00:00 2001 From: lamentxu <1372449351@qq.com> Date: Wed, 8 Oct 2025 21:40:36 +0800 Subject: [PATCH 07/13] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=A0=87=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- c-api/slice.po | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/c-api/slice.po b/c-api/slice.po index d961713754..e9828ad1b5 100644 --- a/c-api/slice.po +++ b/c-api/slice.po @@ -2,8 +2,8 @@ # This file is distributed under the same license as the Python package. # # Translators: -# Leon H.,2017 -# Weilin Du,2025 +# Leon H., 2017 +# Weilin Du, 2025 msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" @@ -56,7 +56,7 @@ msgstr "如果無法分配新物件,則回傳 ``NULL`` 並設定例外。" #: ../../c-api/slice.rst:34 msgid "" -"Retrieve the start,stop and step indices from the slice object *slice*," +"Retrieve the start, stop and step indices from the slice object *slice*, " "assuming a sequence of length *length*. Treats indices greater than *length* " "as errors." msgstr "" @@ -67,10 +67,10 @@ msgstr "" msgid "" "Returns ``0`` on success and ``-1`` on error with no exception set (unless " "one of the indices was not ``None`` and failed to be converted to an " -"integer,in which case ``-1`` is returned with an exception set)." +"integer, in which case ``-1`` is returned with an exception set)." msgstr "" "成功時回傳 ``0``,錯誤時回傳 ``-1``,並無例外設定(除非其中一個索引不是 " -"``None` 並且未能轉換成整數,在這種情況下會回傳 ``-1`,並有設定例外)。" +"``None`` 並且未能轉換成整數,在這種情況下會回傳 ``-1`` ,並有設定例外)。" #: ../../c-api/slice.rst:42 msgid "You probably do not want to use this function." @@ -83,9 +83,9 @@ msgstr "之前 *slice* 的參數型別是 ``PySliceObject*`` 。" #: ../../c-api/slice.rst:51 msgid "" -"Usable replacement for :c:func:`PySlice_GetIndices`. Retrieve the start," -"stop,and step indices from the slice object *slice* assuming a sequence of " -"length *length*,and store the length of the slice in *slicelength*. Out of " +"Usable replacement for :c:func:`PySlice_GetIndices`. Retrieve the start, " +"stop, and step indices from the slice object *slice* assuming a sequence of " +"length *length*, and store the length of the slice in *slicelength*. Out of " "bounds indices are clipped in a manner consistent with the handling of " "normal slices." msgstr "" @@ -109,12 +109,12 @@ msgstr "" #: ../../c-api/slice.rst:64 msgid "" -"if (PySlice_GetIndicesEx(slice,length,&start,&stop,&step,&slicelength) " +"if (PySlice_GetIndicesEx(slice, length, &start, &stop, &step, &slicelength) " "< 0) {\n" " // return error\n" "}" msgstr "" -"if (PySlice_GetIndicesEx(slice,length,&start,&stop,&step,&slicelength) " +"if (PySlice_GetIndicesEx(slice, length, &start, &stop, &step, &slicelength) " "< 0) {\n" " // return error\n" "}" @@ -125,15 +125,15 @@ msgstr "被更換為 ::" #: ../../c-api/slice.rst:70 msgid "" -"if (PySlice_Unpack(slice,&start,&stop,&step) < 0) {\n" +"if (PySlice_Unpack(slice, &start, &stop, &step) < 0) {\n" " // return error\n" "}\n" -"slicelength = PySlice_AdjustIndices(length,&start,&stop,step);" +"slicelength = PySlice_AdjustIndices(length, &start, &stop, step);" msgstr "" -"if (PySlice_Unpack(slice,&start,&stop,&step) < 0) {\n" +"if (PySlice_Unpack(slice, &start, &stop, &step) < 0) {\n" " // return error\n" "}\n" -"slicelength = PySlice_AdjustIndices(length,&start,&stop,step);" +"slicelength = PySlice_AdjustIndices(length, &start, &stop, step);" #: ../../c-api/slice.rst:79 msgid "" @@ -161,10 +161,10 @@ msgstr "" #: ../../c-api/slice.rst:94 msgid "" -"Extract the start,stop and step data members from a slice object as C " +"Extract the start, stop and step data members from a slice object as C " "integers. Silently reduce values larger than ``PY_SSIZE_T_MAX`` to " -"``PY_SSIZE_T_MAX``,silently boost the start and stop values less than " -"``PY_SSIZE_T_MIN`` to ``PY_SSIZE_T_MIN``,and silently boost the step values " +"``PY_SSIZE_T_MAX``, silently boost the start and stop values less than " +"``PY_SSIZE_T_MIN`` to ``PY_SSIZE_T_MIN``, and silently boost the step values " "less than ``-PY_SSIZE_T_MAX`` to ``-PY_SSIZE_T_MAX``." msgstr "" "以 C 整數的形式從 slice 物件中抽取 start、stop 及 step 資料成員。將大於 " @@ -173,7 +173,7 @@ msgstr "" "的 step 值靜默提升為 ``-PY_SSIZE_T_MAX``。" #: ../../c-api/slice.rst:100 -msgid "Return ``-1`` with an exception set on error,``0`` on success." +msgid "Return ``-1`` with an exception set on error, ``0`` on success." msgstr "成功時回傳 ``0``,在失敗時回傳 ``-1`` 並設定例外。" #: ../../c-api/slice.rst:107 @@ -206,7 +206,7 @@ msgstr "" #: ../../c-api/slice.rst:129 msgid "" "The Python ``Ellipsis`` object. This object has no methods. " -"Like :c:data:`Py_None`,it is an :term:`immortal` singleton object." +"Like :c:data:`Py_None`, it is an :term:`immortal` singleton object." msgstr "" "Python ``Ellipsis`` 物件。這個物件沒有方法。就像 :c:data:`Py_None` 一樣,它是" "一個 :term:`immortal` 單一物件。" From ee863a66cc80445bf27a9d716662fa9162c7a41a Mon Sep 17 00:00:00 2001 From: Weilin Du <108666168+LamentXU123@users.noreply.github.com> Date: Wed, 8 Oct 2025 21:44:11 +0800 Subject: [PATCH 08/13] Update c-api/slice.po Co-authored-by: W. H. Wang --- c-api/slice.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/c-api/slice.po b/c-api/slice.po index e9828ad1b5..f43026199c 100644 --- a/c-api/slice.po +++ b/c-api/slice.po @@ -168,8 +168,8 @@ msgid "" "less than ``-PY_SSIZE_T_MAX`` to ``-PY_SSIZE_T_MAX``." msgstr "" "以 C 整數的形式從 slice 物件中抽取 start、stop 及 step 資料成員。將大於 " -"`PY_SSIZE_T_MAX`` 的值靜默減少為 `PY_SSIZE_T_MAX``,將小於 `PY_SSIZE_T_MIN`` " -"的 start 和 stop 值靜默提升為 `PY_SSIZE_T_MIN``,將小於 `-PY_SSIZE_T_MAX`` " +"``PY_SSIZE_T_MAX`` 的值靜默減少為 ``PY_SSIZE_T_MAX``,將小於 ``PY_SSIZE_T_MIN`` " +"的 start 和 stop 值靜默提升為 ``PY_SSIZE_T_MIN``,將小於 ``-PY_SSIZE_T_MAX`` " "的 step 值靜默提升為 ``-PY_SSIZE_T_MAX``。" #: ../../c-api/slice.rst:100 From db2c03e158f242e0ff49af8fc3b4d2c7bb445b85 Mon Sep 17 00:00:00 2001 From: lamentxu <1372449351@qq.com> Date: Wed, 8 Oct 2025 21:53:53 +0800 Subject: [PATCH 09/13] Update slice.po --- c-api/slice.po | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/c-api/slice.po b/c-api/slice.po index f43026199c..5b209ff368 100644 --- a/c-api/slice.po +++ b/c-api/slice.po @@ -143,11 +143,10 @@ msgid "" "PySlice_Unpack` and :c:func:`!PySlice_AdjustIndices`. Arguments *start*," "*stop* and *step* are evaluated more than once." msgstr "" -"If ``Py_LIMITED_API`` is not set or set to the value between ``0x03050400`` " -"and ``0x03060000`` (not including) or ``0x03060100`` or higher :c:func:`!" -"PySlice_GetIndicesEx` is implemented as a macro using :c:func:`!" -"PySlice_Unpack` and :c:func:`!PySlice_AdjustIndices`. Arguments *start*," -"*stop* and *step* are evaluated more than once." +"如果 ``Py_LIMITED_API`` 沒有設定或設定為 ``0x03050400`` 和 ``0x03060000`` (不" +"包括) 或 ``0x03060100` 或更高的值 :c:func:`!PySlice_GetIndicesEx` 是使" +"用 :c:func:`!PySlice_Unpack` 和 :c:func:`!PySlice_AdjustIndices` 來實作一個巨" +"集。參數 *start*,*stop* 和 *step* 會被評估多次。" #: ../../c-api/slice.rst:86 msgid "" @@ -155,9 +154,9 @@ msgid "" "between ``0x03060000`` and ``0x03060100`` (not including) :c:func:`!" "PySlice_GetIndicesEx` is a deprecated function." msgstr "" -"If ``Py_LIMITED_API`` is set to the value less than ``0x03050400`` or " -"between ``0x03060000`` and ``0x03060100`` (not including) :c:func:`!" -"PySlice_GetIndicesEx` is a deprecated function." +"如果 ``Py_LIMITED_API`` 設定為小於 ``0x03050400`` 或介於 ``0x03060000`` 和 " +"``0x03060100`` 之間 (不包括邊界值) :c:func:`!PySlice_GetIndicesEx` 是一個" +"已廢棄的函式。" #: ../../c-api/slice.rst:94 msgid "" From 60f4d71bce1ba16a6bec72057d977ce5204bda53 Mon Sep 17 00:00:00 2001 From: lamentxu <1372449351@qq.com> Date: Wed, 8 Oct 2025 21:54:18 +0800 Subject: [PATCH 10/13] Update slice.po --- c-api/slice.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c-api/slice.po b/c-api/slice.po index 5b209ff368..f0bc9c59b7 100644 --- a/c-api/slice.po +++ b/c-api/slice.po @@ -140,7 +140,7 @@ msgid "" "If ``Py_LIMITED_API`` is not set or set to the value between ``0x03050400`` " "and ``0x03060000`` (not including) or ``0x03060100`` or higher :c:func:`!" "PySlice_GetIndicesEx` is implemented as a macro using :c:func:`!" -"PySlice_Unpack` and :c:func:`!PySlice_AdjustIndices`. Arguments *start*," +"PySlice_Unpack` and :c:func:`!PySlice_AdjustIndices`. Arguments *start*, " "*stop* and *step* are evaluated more than once." msgstr "" "如果 ``Py_LIMITED_API`` 沒有設定或設定為 ``0x03050400`` 和 ``0x03060000`` (不" From 79e198607f73b8e6f6f2b56dc90439cdd1241a31 Mon Sep 17 00:00:00 2001 From: lamentxu <1372449351@qq.com> Date: Wed, 8 Oct 2025 21:55:48 +0800 Subject: [PATCH 11/13] =?UTF-8?q?=E8=A9=95=E4=BC=B0->=E8=A8=88=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- c-api/slice.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c-api/slice.po b/c-api/slice.po index f0bc9c59b7..d4ba85440e 100644 --- a/c-api/slice.po +++ b/c-api/slice.po @@ -146,7 +146,7 @@ msgstr "" "如果 ``Py_LIMITED_API`` 沒有設定或設定為 ``0x03050400`` 和 ``0x03060000`` (不" "包括) 或 ``0x03060100` 或更高的值 :c:func:`!PySlice_GetIndicesEx` 是使" "用 :c:func:`!PySlice_Unpack` 和 :c:func:`!PySlice_AdjustIndices` 來實作一個巨" -"集。參數 *start*,*stop* 和 *step* 會被評估多次。" +"集。參數 *start*,*stop* 和 *step* 會被計算多次。" #: ../../c-api/slice.rst:86 msgid "" From c4e33b169dbd929084409d580a1f40d388437216 Mon Sep 17 00:00:00 2001 From: lamentxu <1372449351@qq.com> Date: Wed, 8 Oct 2025 21:56:39 +0800 Subject: [PATCH 12/13] =?UTF-8?q?macro=20->=20=E5=AE=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- c-api/slice.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/c-api/slice.po b/c-api/slice.po index d4ba85440e..4103e14d58 100644 --- a/c-api/slice.po +++ b/c-api/slice.po @@ -145,8 +145,8 @@ msgid "" msgstr "" "如果 ``Py_LIMITED_API`` 沒有設定或設定為 ``0x03050400`` 和 ``0x03060000`` (不" "包括) 或 ``0x03060100` 或更高的值 :c:func:`!PySlice_GetIndicesEx` 是使" -"用 :c:func:`!PySlice_Unpack` 和 :c:func:`!PySlice_AdjustIndices` 來實作一個巨" -"集。參數 *start*,*stop* 和 *step* 會被計算多次。" +"用 :c:func:`!PySlice_Unpack` 和 :c:func:`!PySlice_AdjustIndices` 來實作一個宏" +"。參數 *start*,*stop* 和 *step* 會被計算多次。" #: ../../c-api/slice.rst:86 msgid "" From 92fee8509bf8fd43ac7374f2f60c9d2d1a8d1568 Mon Sep 17 00:00:00 2001 From: Weilin Du <108666168+LamentXU123@users.noreply.github.com> Date: Thu, 9 Oct 2025 09:08:39 +0800 Subject: [PATCH 13/13] Apply suggestions from code review Co-authored-by: W. H. Wang --- c-api/slice.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/c-api/slice.po b/c-api/slice.po index 4103e14d58..7cbae1a4ee 100644 --- a/c-api/slice.po +++ b/c-api/slice.po @@ -121,7 +121,7 @@ msgstr "" #: ../../c-api/slice.rst:68 msgid "is replaced by ::" -msgstr "被更換為 ::" +msgstr "被更換為: ::" #: ../../c-api/slice.rst:70 msgid "" @@ -144,9 +144,9 @@ msgid "" "*stop* and *step* are evaluated more than once." msgstr "" "如果 ``Py_LIMITED_API`` 沒有設定或設定為 ``0x03050400`` 和 ``0x03060000`` (不" -"包括) 或 ``0x03060100` 或更高的值 :c:func:`!PySlice_GetIndicesEx` 是使" -"用 :c:func:`!PySlice_Unpack` 和 :c:func:`!PySlice_AdjustIndices` 來實作一個宏" -"。參數 *start*,*stop* 和 *step* 會被計算多次。" +"包括) 或 ``0x03060100`` 或更高的值 :c:func:`!PySlice_GetIndicesEx` 是使" +"用 :c:func:`!PySlice_Unpack` 和 :c:func:`!PySlice_AdjustIndices` 來實作一個巨集" +"。引數 *start*、*stop* 和 *step* 會被計算多次。" #: ../../c-api/slice.rst:86 msgid ""