Skip to content
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

Translate library/math.po rst: 30-101 #800

Merged
merged 12 commits into from
Feb 6, 2024
Merged

Conversation

Carisa-Li
Copy link
Contributor

No description provided.

@mattwang44
Copy link
Collaborator

有 conflict 記得先修掉歐

@Carisa-Li
Copy link
Contributor Author

感謝您的提醒,已經處理好了

@mattwang44 mattwang44 requested a review from ken71301 January 15, 2024 08:31
Copy link
Collaborator

@ken71301 ken71301 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

review p1~

library/math.po Outdated Show resolved Hide resolved
library/math.po Outdated

#: ../../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:"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit : integer 應該是可以翻成整數 型別稍微有點多翻,這個問題前後文都有一點,雖然出現是不影響語意,但已翻譯的角度來說我個人是認為不干擾流暢度的情況下盡量不多加翻譯的內容,這邊可以討論~

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

integral 如果原文沒有打錯應該是代表積分,這邊應該就不是整數的意思

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我開始覺得 python 的 Integral 不是積分而是這個了
https://docs.python.org/3/library/numbers.html#numbers.Integral
但這個就是一個更上層的抽象數值類別...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我同意型別不影響語意,會在修掉。
Integral經傳入字串參數後,確認為類別名,故同樣參照c-api/intro rst:573處,翻為整數型別。


#: ../../library/math.rst:74
msgid "Accepting floats with integral values (like ``5.0``) is deprecated."
msgstr ""
msgstr "允許傳入其值為整數的浮點數(如:``5.0``)已被棄用。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

integral應該是積分,但我越來越懷疑原文打錯了

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

考慮到python有名為Integral的類別名,並於線上python3.6編譯器進行測試後,確認此處為整數之義。

library/math.po Outdated Show resolved Hide resolved
library/math.po Outdated Show resolved Hide resolved
library/math.po Outdated Show resolved Hide resolved
library/math.po Outdated Show resolved Hide resolved
library/math.po Outdated
@@ -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 運算式 "
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

defined不見了,然後好像也不太對

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"回傳和 C 函式庫中 ``fmod(x, y)`` 函式相同的值。請注意此值與 Python 運算式 "
"回傳和 C 函式庫中定義的 ``fmod(x, y)``。請注意此值與 Python 運算式 "

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

後面這句應該是
請注意 Python 運算式 ...可能不會回傳相同的結果

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

回傳和 C 函式庫中定義的 fmod(x, y)
我認為「和」字會導致句子看似不完整,但刪除「和」字後,有被誤讀為回傳一個函式而非值的可能,這部分我會再加思考。

library/math.po Outdated
@@ -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)`` 的回傳值完全等同(數學定"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這裡原文的斷句應該要再看一下 我的理解是這樣斷句
The intent of the C standard is that fmod(x, y) be exactly (mathematically; to infinite precision) equal to x - n*y
for some integer n (所以這句可以搬到最前面)
such that
the result has the same sign as x and magnitude less than abs(y)
老樣子 可以討論

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我認為這幾句有順序關係,the result...為n的解釋,而for some integer n such that ...是x-n*y的補充說明,調換語句會影響到句義。

library/math.po Outdated
"精確地計算浮點數。例如:``fmod(-1e-100, 1e100)`` 的回傳值為 ``-1e-100``,但 "
"``-1e-100 % 1e100`` 的回傳值為 ``1e100-1e-100``,此值無法準確地以浮點數表示,"
"並會四捨五入為令人驚訝的 ``1e100``。因此,處理浮點數時通常建議使用 :func:"
"`fmod`,而處理整數時建議使用 ``x % y``。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這段先重翻吧?
原文漏了例如 argument 的翻譯,也多出了些不存在的詞,還有上述問題
這邊就留到下個review

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感謝您的協助與建議。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不用這麼客氣lol

@mattwang44 mattwang44 requested a review from ken71301 January 26, 2024 14:33
@ken71301
Copy link
Collaborator

@Carisa-Li rst:87 這一段還會修正嗎?

@Carisa-Li
Copy link
Contributor Author

抱歉,近期去做別的東西忘記了
剛剛推上來了

Copy link
Collaborator

@ken71301 ken71301 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

稍微漏翻了點,剩下看來OK

library/math.po Outdated
"``x % y`` 可能會回傳不同結果。C 標準要求 ``fmod(x, y)`` 的回傳值完全等同(數"
"學定義上,即無限精度)於 ``x - n*y``,*n* 為可使回傳值與 *x* 同號且長度小於 "
"``abs(y)`` 的整數。Python 運算式 ``x % y`` 的回傳值則與 *y* 同號,且可能無法"
"精確地計算浮點數參數。例如:``fmod(-1e-100, 1e100)`` 的值為 ``-1e-100``,但運"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arguments 為引數

library/math.po Outdated
"學定義上,即無限精度)於 ``x - n*y``,*n* 為可使回傳值與 *x* 同號且長度小於 "
"``abs(y)`` 的整數。Python 運算式 ``x % y`` 的回傳值則與 *y* 同號,且可能無法"
"精確地計算浮點數參數。例如:``fmod(-1e-100, 1e100)`` 的值為 ``-1e-100``,但運"
"算式 ``-1e-100 % 1e100`` 的結果為 ``1e100-1e-100``,此值無法準確地表示成浮點"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the result of Python's... 漏翻了

library/math.po Outdated
"精確地計算浮點數參數。例如:``fmod(-1e-100, 1e100)`` 的值為 ``-1e-100``,但運"
"算式 ``-1e-100 % 1e100`` 的結果為 ``1e100-1e-100``,此值無法準確地表示成浮點"
"數,並會四捨五入為出乎意料的 ``1e100``。因此,處理浮點數時通常會選擇函式 :"
"func:`fmod`,而處理整數時會選擇運算式 ``x % y``。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python's 漏翻

@Carisa-Li
Copy link
Contributor Author

已修改完畢,謝謝

Copy link
Collaborator

@ken71301 ken71301 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mattwang44 mattwang44 merged commit 80d2f31 into python:3.12 Feb 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants