From e807ddedafc8ba6ac0effd89ba447031c4f8cd53 Mon Sep 17 00:00:00 2001 From: Carisa-Li Date: Tue, 2 Jan 2024 00:39:31 +0800 Subject: [PATCH 01/10] translate 2~3 introduction --- library/math.po | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/library/math.po b/library/math.po index 2a69da0cae..5667a0a795 100644 --- a/library/math.po +++ b/library/math.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-07-17 17:39+0800\n" -"PO-Revision-Date: 2018-05-23 16:05+0000\n" +"PO-Revision-Date: 2024-01-02 00:30+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -17,6 +17,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.4.2\n" #: ../../library/math.rst:2 msgid ":mod:`math` --- Mathematical functions" @@ -26,7 +27,7 @@ msgstr ":mod:`math` --- 數學函式" msgid "" "This module provides access to the mathematical functions defined by the C " "standard." -msgstr "" +msgstr "此模組提供 C 標準中定義的數學相關函式。" #: ../../library/math.rst:16 msgid "" @@ -39,6 +40,10 @@ msgid "" "of the unexpected complex number used as a parameter, so that the programmer " "can determine how and why it was generated in the first place." msgstr "" +"這些函式不支援複數;若您需要計算複數,請使用 :mod:`cmath` 模組的同名函式。這" +"是因為大多數的使用者並不想學習那麼多理解複數所需的數學概念,所以根據支援複數" +"與否分為兩種函式。收到一個例外而非複數回傳值,有助於程式設計師提早察覺參數中" +"包含非預期的複數,進而從源頭查出導致此情況的原因。" #: ../../library/math.rst:25 msgid "" From c4706c839e0f845240a9a31c01eb3d433d9819fd Mon Sep 17 00:00:00 2001 From: Carisa-Li Date: Wed, 3 Jan 2024 17:04:55 +0800 Subject: [PATCH 02/10] update rst: 13-24 --- library/math.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/math.po b/library/math.po index 5667a0a795..113904e178 100644 --- a/library/math.po +++ b/library/math.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-07-17 17:39+0800\n" -"PO-Revision-Date: 2024-01-02 00:30+0800\n" +"PO-Revision-Date: 2024-01-03 17:00+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -27,7 +27,7 @@ msgstr ":mod:`math` --- 數學函式" msgid "" "This module provides access to the mathematical functions defined by the C " "standard." -msgstr "此模組提供 C 標準中定義的數學相關函式。" +msgstr "此模組提供對 C 標準中定義的數學相關函式的存取。" #: ../../library/math.rst:16 msgid "" @@ -49,7 +49,7 @@ msgstr "" msgid "" "The following functions are provided by this module. Except when explicitly " "noted otherwise, all return values are floats." -msgstr "" +msgstr "此模組提供下列函式。除非特意註明,否則回傳值皆為浮點數。" #: ../../library/math.rst:30 msgid "Number-theoretic and representation functions" From 87e5d2b4506a301c10623369547c02e1f053e79e Mon Sep 17 00:00:00 2001 From: Carisa-Li Date: Fri, 12 Jan 2024 23:42:08 +0800 Subject: [PATCH 03/10] rst: 30-101 --- library/math.po | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/library/math.po b/library/math.po index 113904e178..c9d07380d4 100644 --- a/library/math.po +++ b/library/math.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-07-17 17:39+0800\n" -"PO-Revision-Date: 2024-01-03 17:00+0800\n" +"PO-Revision-Date: 2024-01-14 01:32+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -53,7 +53,7 @@ msgstr "此模組提供下列函式。除非特意註明,否則回傳值皆為 #: ../../library/math.rst:30 msgid "Number-theoretic and representation functions" -msgstr "" +msgstr "數論與表現函式" #: ../../library/math.rst:34 msgid "" @@ -61,30 +61,37 @@ msgid "" "*x*. If *x* is not a float, delegates to :meth:`x.__ceil__ `, which should return an :class:`~numbers.Integral` value." msgstr "" +"回傳 *x* 經上取整函數的值,即大於或等於 *x* 的最小整數。若 *x* 並非浮點數,此" +"函式將委託給 :meth:`x.__ceil__ `,並回傳 :class:`~numbers." +"Integral` 型別的值。" #: ../../library/math.rst:41 msgid "" "Return the number of ways to choose *k* items from *n* items without " "repetition and without order." -msgstr "" +msgstr "回傳從 *n* 個物品中不重複且不考慮排序地取出 *k* 個物品的方法數。" #: ../../library/math.rst:44 msgid "" "Evaluates to ``n! / (k! * (n - k)!)`` when ``k <= n`` and evaluates to zero " "when ``k > n``." -msgstr "" +msgstr "當 ``k <= n`` 時回傳 ``n! / (k! * (n - k)!)``,否則回傳 ``0``。" #: ../../library/math.rst:47 msgid "" "Also called the binomial coefficient because it is equivalent to the " "coefficient of k-th term in polynomial expansion of ``(1 + x)ⁿ``." msgstr "" +"因為此值等同於 ``(1 + x)ⁿ`` 進行多項式展開後第 k 項的係數,所以又稱為二項式係" +"數。" #: ../../library/math.rst:51 ../../library/math.rst:258 msgid "" "Raises :exc:`TypeError` if either of the arguments are not integers. Raises :" "exc:`ValueError` if either of the arguments are negative." msgstr "" +"當任一參數非整數型別時會引發 :exc:`TypeError`。當任一參數為負數時會引發 :exc:" +"`ValueError`。" #: ../../library/math.rst:59 msgid "" @@ -92,20 +99,24 @@ msgid "" "*y*. On platforms that support signed zeros, ``copysign(1.0, -0.0)`` " "returns *-1.0*." msgstr "" +"回傳與 *x* 相同長度(絕對值)且與 *y* 同號的浮點數。在支援帶符號零的平臺上," +"``copysign(1.0, -0.0)`` 回傳 *-1.0*。" #: ../../library/math.rst:66 msgid "Return the absolute value of *x*." -msgstr "" +msgstr "回傳 *x* 的絕對值。" #: ../../library/math.rst:71 msgid "" "Return *n* factorial as an integer. Raises :exc:`ValueError` if *n* is not " "integral or is negative." msgstr "" +"以整數型別回傳 *n* 的階乘。若 *n* 非整數型別或其值為負會引發 :exc:" +"`ValueError`。" #: ../../library/math.rst:74 msgid "Accepting floats with integral values (like ``5.0``) is deprecated." -msgstr "" +msgstr "允許傳入其值為整數的浮點數(如:``5.0``)已被棄用。" #: ../../library/math.rst:80 msgid "" @@ -113,6 +124,9 @@ msgid "" "*x* is not a float, delegates to :meth:`x.__floor__ `, " "which should return an :class:`~numbers.Integral` value." msgstr "" +"回傳 *x* 經下取整函數的值,即小於或等於 *x* 的最大整數。若 *x* 並非浮點數,此" +"函式將委託給 :meth:`x.__floor__ `,並回傳 :class:`~numbers." +"Integral` 型別的值。" #: ../../library/math.rst:87 msgid "" @@ -129,6 +143,14 @@ msgid "" "generally preferred when working with floats, while Python's ``x % y`` is " "preferred when working with integers." msgstr "" +"回傳和 C 函式庫中 ``fmod(x, y)`` 函式相同的值。請注意此值與 Python 運算式 " +"``x % y`` 的結果可能不同。C 標準定義 ``fmod(x, y)`` 的回傳值完全等同(數學定" +"義上,即無限精度)於 ``x - n*y``,*n* 為使回傳值與 *x* 同號且長度小於 " +"``abs(y)`` 的整數;Python 運算式 ``x % y`` 的回傳值則與 *y* 同號,且可能無法" +"精確地計算浮點數。例如:``fmod(-1e-100, 1e100)`` 的回傳值為 ``-1e-100``,但 " +"``-1e-100 % 1e100`` 的回傳值為 ``1e100-1e-100``,此值無法準確地以浮點數表示," +"並會四捨五入為令人驚訝的 ``1e100``。因此,處理浮點數時通常建議使用 :func:" +"`fmod`,而處理整數時建議使用 ``x % y``。" #: ../../library/math.rst:102 msgid "" From c545b7ab20459fa36d64852e423124f67197be55 Mon Sep 17 00:00:00 2001 From: Carisa-Li Date: Mon, 15 Jan 2024 23:38:16 +0800 Subject: [PATCH 04/10] Update library/math.po Co-authored-by: Payon --- library/math.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/math.po b/library/math.po index c9d07380d4..cf081238ba 100644 --- a/library/math.po +++ b/library/math.po @@ -99,7 +99,7 @@ msgid "" "*y*. On platforms that support signed zeros, ``copysign(1.0, -0.0)`` " "returns *-1.0*." msgstr "" -"回傳與 *x* 相同長度(絕對值)且與 *y* 同號的浮點數。在支援帶符號零的平臺上," +"回傳與 *x* 相同長度(絕對值)且與 *y* 同號的浮點數。在支援帶符號零的平臺上," "``copysign(1.0, -0.0)`` 回傳 *-1.0*。" #: ../../library/math.rst:66 From e76d71c482d5c7c8f00843ffccef5b6aef1f05f1 Mon Sep 17 00:00:00 2001 From: Carisa-Li Date: Mon, 15 Jan 2024 23:51:38 +0800 Subject: [PATCH 05/10] Update library/math.po Co-authored-by: Payon --- library/math.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/math.po b/library/math.po index cf081238ba..e6c85e3d34 100644 --- a/library/math.po +++ b/library/math.po @@ -61,7 +61,7 @@ msgid "" "*x*. If *x* is not a float, delegates to :meth:`x.__ceil__ `, which should return an :class:`~numbers.Integral` value." msgstr "" -"回傳 *x* 經上取整函數的值,即大於或等於 *x* 的最小整數。若 *x* 並非浮點數,此" +"回傳 *x* 經上取整的值,即大於或等於 *x* 的最小整數。若 *x* 並非浮點數,此" "函式將委託給 :meth:`x.__ceil__ `,並回傳 :class:`~numbers." "Integral` 型別的值。" From 75a1bbd3eea5142e46265bc38ef42e6e2894b3ed Mon Sep 17 00:00:00 2001 From: Carisa-Li Date: Mon, 15 Jan 2024 23:56:47 +0800 Subject: [PATCH 06/10] Update library/math.po Co-authored-by: Payon --- library/math.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/math.po b/library/math.po index e6c85e3d34..0883849621 100644 --- a/library/math.po +++ b/library/math.po @@ -62,7 +62,7 @@ msgid "" "__ceil__>`, which should return an :class:`~numbers.Integral` value." msgstr "" "回傳 *x* 經上取整的值,即大於或等於 *x* 的最小整數。若 *x* 並非浮點數,此" -"函式將委託給 :meth:`x.__ceil__ `,並回傳 :class:`~numbers." +"函式將委派給 :meth:`x.__ceil__ `,並回傳 :class:`~numbers." "Integral` 型別的值。" #: ../../library/math.rst:41 From 8600332490b45bed93ff9e9e841dd8ec83247096 Mon Sep 17 00:00:00 2001 From: Carisa-Li Date: Tue, 16 Jan 2024 00:02:51 +0800 Subject: [PATCH 07/10] Update library/math.po Co-authored-by: Payon --- library/math.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/math.po b/library/math.po index 0883849621..03555de45b 100644 --- a/library/math.po +++ b/library/math.po @@ -124,7 +124,7 @@ msgid "" "*x* is not a float, delegates to :meth:`x.__floor__ `, " "which should return an :class:`~numbers.Integral` value." msgstr "" -"回傳 *x* 經下取整函數的值,即小於或等於 *x* 的最大整數。若 *x* 並非浮點數,此" +"回傳 *x* 經下取整的值,即小於或等於 *x* 的最大整數。若 *x* 並非浮點數,此" "函式將委託給 :meth:`x.__floor__ `,並回傳 :class:`~numbers." "Integral` 型別的值。" From 03e4c96c0926fdd45c0499b21542e5559d368bab Mon Sep 17 00:00:00 2001 From: Carisa-Li Date: Tue, 16 Jan 2024 00:03:25 +0800 Subject: [PATCH 08/10] Update library/math.po Co-authored-by: Payon --- library/math.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/math.po b/library/math.po index 03555de45b..5010ff7866 100644 --- a/library/math.po +++ b/library/math.po @@ -125,7 +125,7 @@ msgid "" "which should return an :class:`~numbers.Integral` value." msgstr "" "回傳 *x* 經下取整的值,即小於或等於 *x* 的最大整數。若 *x* 並非浮點數,此" -"函式將委託給 :meth:`x.__floor__ `,並回傳 :class:`~numbers." +"函式將委派給 :meth:`x.__floor__ `,並回傳 :class:`~numbers." "Integral` 型別的值。" #: ../../library/math.rst:87 From e93753c954c67bf0dfa380e2c6f3bcd63794289c Mon Sep 17 00:00:00 2001 From: Carisa-Li Date: Tue, 30 Jan 2024 23:38:58 +0800 Subject: [PATCH 09/10] fix rst: 30-101 part 1 --- library/math.po | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/library/math.po b/library/math.po index 5010ff7866..df9e101831 100644 --- a/library/math.po +++ b/library/math.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-07-17 17:39+0800\n" -"PO-Revision-Date: 2024-01-14 01:32+0800\n" +"PO-Revision-Date: 2024-01-31 17:12+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -61,8 +61,8 @@ msgid "" "*x*. If *x* is not a float, delegates to :meth:`x.__ceil__ `, which should return an :class:`~numbers.Integral` value." msgstr "" -"回傳 *x* 經上取整的值,即大於或等於 *x* 的最小整數。若 *x* 並非浮點數,此" -"函式將委派給 :meth:`x.__ceil__ `,並回傳 :class:`~numbers." +"回傳 *x* 經上取整的值,即大於或等於 *x* 的最小整數。若 *x* 並非浮點數,此函式" +"將委派給 :meth:`x.__ceil__ `,並回傳 :class:`~numbers." "Integral` 型別的值。" #: ../../library/math.rst:41 @@ -75,7 +75,7 @@ msgstr "回傳從 *n* 個物品中不重複且不考慮排序地取出 *k* 個 msgid "" "Evaluates to ``n! / (k! * (n - k)!)`` when ``k <= n`` and evaluates to zero " "when ``k > n``." -msgstr "當 ``k <= n`` 時回傳 ``n! / (k! * (n - k)!)``,否則回傳 ``0``。" +msgstr "當 ``k <= n`` 時其值為 ``n! / (k! * (n - k)!)``,否則其值為 ``0``。" #: ../../library/math.rst:47 msgid "" @@ -111,8 +111,7 @@ msgid "" "Return *n* factorial as an integer. Raises :exc:`ValueError` if *n* is not " "integral or is negative." msgstr "" -"以整數型別回傳 *n* 的階乘。若 *n* 非整數型別或其值為負會引發 :exc:" -"`ValueError`。" +"以整數回傳 *n* 的階乘。若 *n* 非整數型別或其值為負會引發 :exc:`ValueError`。" #: ../../library/math.rst:74 msgid "Accepting floats with integral values (like ``5.0``) is deprecated." @@ -124,8 +123,8 @@ msgid "" "*x* is not a float, delegates to :meth:`x.__floor__ `, " "which should return an :class:`~numbers.Integral` value." msgstr "" -"回傳 *x* 經下取整的值,即小於或等於 *x* 的最大整數。若 *x* 並非浮點數,此" -"函式將委派給 :meth:`x.__floor__ `,並回傳 :class:`~numbers." +"回傳 *x* 經下取整的值,即小於或等於 *x* 的最大整數。若 *x* 並非浮點數,此函式" +"將委派給 :meth:`x.__floor__ `,並回傳 :class:`~numbers." "Integral` 型別的值。" #: ../../library/math.rst:87 @@ -143,14 +142,14 @@ msgid "" "generally preferred when working with floats, while Python's ``x % y`` is " "preferred when working with integers." msgstr "" -"回傳和 C 函式庫中 ``fmod(x, y)`` 函式相同的值。請注意此值與 Python 運算式 " -"``x % y`` 的結果可能不同。C 標準定義 ``fmod(x, y)`` 的回傳值完全等同(數學定" -"義上,即無限精度)於 ``x - n*y``,*n* 為使回傳值與 *x* 同號且長度小於 " -"``abs(y)`` 的整數;Python 運算式 ``x % y`` 的回傳值則與 *y* 同號,且可能無法" -"精確地計算浮點數。例如:``fmod(-1e-100, 1e100)`` 的回傳值為 ``-1e-100``,但 " -"``-1e-100 % 1e100`` 的回傳值為 ``1e100-1e-100``,此值無法準確地以浮點數表示," -"並會四捨五入為令人驚訝的 ``1e100``。因此,處理浮點數時通常建議使用 :func:" -"`fmod`,而處理整數時建議使用 ``x % y``。" +"回傳 C 函式庫所定義的 ``fmod(x, y)`` 函式值。請注意此函式與 Python 運算式 " +"``x % y`` 可能會回傳不同結果。C 標準要求 ``fmod(x, y)`` 的回傳值完全等同(數" +"學定義上,即無限精度)於 ``x - n*y``,*n* 為可使回傳值與 *x* 同號且長度小於 " +"``abs(y)`` 的整數。Python 運算式 ``x % y`` 的回傳值則與 *y* 同號,且可能無法" +"精確地計算浮點數參數。例如:``fmod(-1e-100, 1e100)`` 的值為 ``-1e-100``,但運" +"算式 ``-1e-100 % 1e100`` 的結果為 ``1e100-1e-100``,此值無法準確地表示成浮點" +"數,並會四捨五入為出乎意料的 ``1e100``。因此,處理浮點數時通常會選擇函式 :" +"func:`fmod`,而處理整數時會選擇運算式 ``x % y``。" #: ../../library/math.rst:102 msgid "" From 5a0038cf46e14b612bbc08f2dbb26e7a14c23ce2 Mon Sep 17 00:00:00 2001 From: Carisa-Li Date: Fri, 2 Feb 2024 21:26:53 +0800 Subject: [PATCH 10/10] fix rst: 30-101 --- library/math.po | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/library/math.po b/library/math.po index df9e101831..93e0cc4928 100644 --- a/library/math.po +++ b/library/math.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-07-17 17:39+0800\n" -"PO-Revision-Date: 2024-01-31 17:12+0800\n" +"PO-Revision-Date: 2024-02-05 16:30+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -146,10 +146,10 @@ msgstr "" "``x % y`` 可能會回傳不同結果。C 標準要求 ``fmod(x, y)`` 的回傳值完全等同(數" "學定義上,即無限精度)於 ``x - n*y``,*n* 為可使回傳值與 *x* 同號且長度小於 " "``abs(y)`` 的整數。Python 運算式 ``x % y`` 的回傳值則與 *y* 同號,且可能無法" -"精確地計算浮點數參數。例如:``fmod(-1e-100, 1e100)`` 的值為 ``-1e-100``,但運" -"算式 ``-1e-100 % 1e100`` 的結果為 ``1e100-1e-100``,此值無法準確地表示成浮點" -"數,並會四捨五入為出乎意料的 ``1e100``。因此,處理浮點數時通常會選擇函式 :" -"func:`fmod`,而處理整數時會選擇運算式 ``x % y``。" +"精確地計算浮點數引數。例如:``fmod(-1e-100, 1e100)`` 的值為 ``-1e-100``,但 " +"Python 運算式 ``-1e-100 % 1e100`` 的結果為 ``1e100-1e-100``,此值無法準確地表" +"示成浮點數,並會四捨五入為出乎意料的 ``1e100``。因此,處理浮點數時通常會選擇" +"函式 :func:`fmod`,而處理整數時會選擇 Python 運算式 ``x % y``。" #: ../../library/math.rst:102 msgid ""