Skip to content

Translate apart of floatingpoint.po #51

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

Closed
wants to merge 6 commits into from

Conversation

yichung279
Copy link
Contributor

No description provided.

@adrianliaw
Copy link
Collaborator

Hi @yichung279, although I haven't review the pull request yet (thank you so much for keep contributing!! ✨😄), I've noticed that you've kept using the same branch for the previous PR, please do NOT reuse a previous branch unless you've recreated it. Please always follow the steps described in the 每一次翻譯時 section in https://github.com/python/python-docs-zh-tw#id3, where you should fetch from upstream (do NOT use git pull) and create a branch from upstream/3.7.

For now it's ok and I'll selectively merge your commits, no worries! Just remember to do so in your next PR 😉

I'll review it in a bit.

Copy link
Collaborator

@adrianliaw adrianliaw left a comment

Choose a reason for hiding this comment

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

Hi @yichung279 Sorry for the procrastination, I really like your translations and enjoyed reviewing it very much! There are a few details need to be tweaked, please take a look at the code review when you have a minute. Thank you so much for translating this, this is a rather difficult passage to translate!

@@ -105,6 +105,10 @@ msgid ""
"fraction is ``3602879701896397 / 2 ** 55`` which is close to but not exactly "
"equal to the true value of 1/10."
msgstr ""
"只要你停在任何有限的數或位數,您就只會得到近似值。而現在大多數的計算機中,浮"
"點數是透過二進位分數近似的,其中分子從最高有效位元使開始用53個位元表示,分母"
Copy link
Collaborator

Choose a reason for hiding this comment

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

53 旁邊要有空格

@@ -114,18 +118,30 @@ msgid ""
"if Python were to print the true decimal value of the binary approximation "
"stored for 0.1, it would have to display ::"
msgstr ""
"由於數值顯示的方式,很多使用者並沒有發現數值的近似。Python 只會印出一個十進位"
Copy link
Collaborator

Choose a reason for hiding this comment

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

我覺得「數值的近似」也許如果翻成「數值是個近似值」會比較順一點,原因是「數值的近似」這樣的文法讓「近似」可以是形容詞轉名詞,或是動詞轉名詞;如果以動詞轉名詞的方式解釋就沒有問題,但如果以形容詞轉名詞解釋的話,這句話的意思就會像是 "Many users are not aware of the similarity"。我有點這樣的感覺


#: ../../tutorial/floatingpoint.rst:71
msgid ""
"That is more digits than most people find useful, so Python keeps the number "
"of digits manageable by displaying a rounded value instead ::"
msgstr ""
"這比一般人感到有用的位數還多,所以 Python 將位數保持在可以接受的範圍,只顯示"
"簡化後的數值:\n"
Copy link
Collaborator

Choose a reason for hiding this comment

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

「簡化」可以再更貼近原文一點,原文是用 "rounded value" 也就是四捨五入。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

那我根據教育研究院的辭典,翻譯為捨入。


#: ../../tutorial/floatingpoint.rst:77
msgid ""
"Just remember, even though the printed result looks like the exact value of "
"1/10, the actual stored value is the nearest representable binary fraction."
msgstr ""
"一定要記住,雖然印出的數字看起來是精準的 1/10,但真正儲存的數值是能表示的二進"
"位分數中,最接近的精準數值的數。"
Copy link
Collaborator

Choose a reason for hiding this comment

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

「最接近的精準數值的數」中第一個「的」是不是能省略掉?

"字 ``0.1`` 和 ``0.10000000000000001`` 和 "
"``0.1000000000000000055511151231257827021181583404541015625``,都由 "
"``3602879701896397 / 2 ** 55`` 近似。由於這三個數值共用同一個近似值,任何一個"
"數值都可以被顯示,同時保持不變量 ``eval(repr(x)) == x``。"
Copy link
Collaborator

Choose a reason for hiding this comment

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

我覺得 "invariant" 在這邊好像沒有特別加上什麼意思,我自己是覺得如果把「不變量」拿掉可能甚至會比較好理解。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好,通順為主。

@@ -145,6 +166,9 @@ msgid ""
"Starting with Python 3.1, Python (on most systems) is now able to choose the "
"shortest of these and simply display ``0.1``."
msgstr ""
"歷史上,Python 的提示字元 (prompt) 與內建的 :func:`repr` 函式會選擇上段說明中"
"有17個有效位元的數:``0.10000000000000001``。從 Python 3.1 版開始,Python(在"
Copy link
Collaborator

Choose a reason for hiding this comment

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

17 旁邊要有空格

@@ -154,12 +178,18 @@ msgid ""
"arithmetic (although some languages may not *display* the difference by "
"default, or in all output modes)."
msgstr ""
"注意,這是二進位浮點數理所當然的特性,並不是 Python 的錯誤 (bug),更不是您程"
"式碼的錯誤。只要有程式語言支持硬體的浮點數運算,您將會看到同樣的事情出現在其"
"中(雖然某些程式語言預設不 *顯示* 差異,或者預設全部輸出)。"
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
"中(雖然某些程式語言預設不 *顯示* 差異,或者預設全部輸出)。"
"中(雖然某些程式語言預設不\\ *顯示*\\ 差異,或者預設全部輸出)。"

這邊需要加上這個倒斜線來拿掉空格,不過雖然這邊再 po 檔裡這樣寫,在 poedit 之類的軟體中打開的話只會看到一個斜線


#: ../../tutorial/floatingpoint.rst:99
msgid ""
"For more pleasant output, you may wish to use string formatting to produce a "
"limited number of significant digits::"
msgstr ""
"為求更優雅的輸出,您可能想要使用字串的格式化產生限定的有效位數:\n"
Copy link
Collaborator

Choose a reason for hiding this comment

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

這邊可以幫我在「字串的格式化」後面加上括弧來註明原文是 string formatting 嗎?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@yichung279 這邊可以再幫忙補上嗎?感謝你!

@yichung279
Copy link
Contributor Author

OK, I will fix them asap.

adrianliaw pushed a commit that referenced this pull request Nov 7, 2018
See #51 for the full PR revision history
adrianliaw added a commit that referenced this pull request Nov 7, 2018
Translate a part of floatingpoint.po
@adrianliaw
Copy link
Collaborator

adrianliaw commented Nov 7, 2018

@yichung279 Thank you! I've manually taken out merge commits and then squash-and-merged the pull request, now closing this.

@adrianliaw adrianliaw closed this Nov 7, 2018
beccalzh pushed a commit to beccalzh/python-docs-zh-tw that referenced this pull request Sep 4, 2024
See python#51 for the full PR revision history
beccalzh pushed a commit to beccalzh/python-docs-zh-tw that referenced this pull request Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants