-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
docs(howto/sockets.po): 翻譯 Binary Data
和 Disconnecting
區塊
#518
Conversation
howto/sockets.po
Outdated
@@ -417,7 +417,7 @@ msgstr "" | |||
|
|||
#: ../../howto/sockets.rst:252 | |||
msgid "Binary Data" | |||
msgstr "" | |||
msgstr "二進制資料" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我自己習慣「進制」都改成「進位」,可以再查一下有沒有可靠的翻譯依據
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
了解,進位感覺比較好。
維基百科(進位制) 也是用進位來表示
howto/sockets.po
Outdated
"Endianness#Networking>`_ 採用的是「大端序 big-endian」最大的位元組排在前面," | ||
"所以一個值為 ``1`` 的 16 位元整數會表示成兩個 16 進位的位元組 ``00 01``。然而" | ||
"大多數常見的處理器 (x86/AMD64,ARM,RISC-V) 採用的是「小端序 little-" | ||
"endian」,最小的位元組排在前面 - 所以相同的 ``1`` 會被表示成 ``01 00``。" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Endianness#Networking>`_ 採用的是「大端序 big-endian」最大的位元組排在前面," | |
"所以一個值為 ``1`` 的 16 位元整數會表示成兩個 16 進位的位元組 ``00 01``。然而" | |
"大多數常見的處理器 (x86/AMD64,ARM,RISC-V) 採用的是「小端序 little-" | |
"endian」,最小的位元組排在前面 - 所以相同的 ``1`` 會被表示成 ``01 00``。" | |
"Endianness#Networking>`_ 採用的是大端序 (big-endian),最大的位元組排在前面," | |
"所以一個值為 ``1`` 的 16 位元整數會表示成兩個 16 進位的位元組 ``00 01``。然而" | |
"大多數常見的處理器 (x86/AMD64,ARM,RISC-V) 採用的是小端序 (little-" | |
"endian),最小的位元組排在前面 - 所以相同的 ``1`` 會被表示成 ``01 00``。" |
howto/sockets.po
Outdated
@@ -430,6 +430,12 @@ msgid "" | |||
"little-endian, with the least significant byte first - that same ``1`` would " | |||
"be ``01 00``." | |||
msgstr "" | |||
"使用 socket 傳輸二進制資料完全是可行的。最主要的問題在於不同機器使用不同的二" | |||
"進制資料格式。例如,`網路二進制順序 <https://en.wikipedia.org/wiki/" | |||
"Endianness#Networking>`_ 採用的是「大端序 big-endian」最大的位元組排在前面," |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
most significant
& least significant
翻成「最大」、「最小」好像比較容易誤導成 bytes 大小,看有沒有更好的翻譯(像是「最高」、「最低」?),或者可以補充原文沒有的解釋(e.g. (譯者注:......)
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果是根據 維基百科 (位元組順序) 中,第三段第一行中的 將一個多位數的低位放在較小的位址處,高位放在較大的位址處,則稱小端序;反之則稱大端序。
這樣來解釋會不會比較清楚?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我覺得這樣 ok,再麻煩你幫忙修改~
howto/sockets.po
Outdated
@@ -439,6 +445,10 @@ msgid "" | |||
"these do nothing, but where the machine is byte-reversed, these swap the " | |||
"bytes around appropriately." | |||
msgstr "" | |||
"Socket 函式庫提供了用於轉換 16 位元和 32 位元整數的函式 - ``ntohl, htonl, " | |||
"ntohs, htons``,其中 \"n\" 表示 *網路*,\"h\" 表示 *主機*,\"s\" 表示 " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
跟開頭 character 有關,不翻譯比較好理解
"ntohs, htons``,其中 \"n\" 表示 *網路*,\"h\" 表示 *主機*,\"s\" 表示 " | |
"ntohs, htons``,其中 \"n\" 表示 *network*,\"h\" 表示 *host*,\"s\" 表示 " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的
howto/sockets.po
Outdated
@@ -465,6 +479,12 @@ msgid "" | |||
"same as ``shutdown(); close()``. So in most situations, an explicit " | |||
"``shutdown`` is not needed." | |||
msgstr "" | |||
"嚴格來說,在關閉 socket 前,你應該使用 ``shutdown`` 函式。``shutdown`` 函式是" | |||
"發送給 socket 另一端的一個提醒。根據你傳遞的參數,它可以表示「我不會再發送任" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter -> 參數
argument -> 引數
"發送給 socket 另一端的一個提醒。根據你傳遞的參數,它可以表示「我不會再發送任" | |
"發送給 socket 另一端的一個提醒。根據你傳遞的引數,它可以表示「我不會再發送任" |
howto/sockets.po
Outdated
@@ -475,6 +495,11 @@ msgid "" | |||
"complete request. The server sends a reply. If the ``send`` completes " | |||
"successfully then, indeed, the client was still receiving." | |||
msgstr "" | |||
"有效使用 ``shutdown`` 的一種方法是在類似 HTTP 的交換中,用戶端發送請求後,然" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit 為了與 method 的「方法」做區別,我會傾向翻成「方式」
"有效使用 ``shutdown`` 的一種方法是在類似 HTTP 的交換中,用戶端發送請求後,然" | |
"有效使用 ``shutdown`` 的一種方式是在類似 HTTP 的交換中,用戶端發送請求後,然" |
howto/sockets.po
Outdated
@@ -485,6 +510,11 @@ msgid "" | |||
"indefinitely, thinking you're just being slow. *Please* ``close`` your " | |||
"sockets when you're done." | |||
msgstr "" | |||
"Python 更近一步地採取自動關閉的步驟,並且當 socket 被回收機制回收時,如果需要" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Python 更近一步地採取自動關閉的步驟,並且當 socket 被回收機制回收時,如果需要" | |
"Python 更進一步地採取自動關閉的步驟,並且當 socket 被垃圾回收機制回收時,如果需要" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work 👍
…#518) * docs(howto/sockets.po): 翻譯 `Binary Data` 和 `Disconnecting` 區塊 pythongh-466 * docs(howto/sockets.po): 修改 文法、專有名詞 pythongh-466
gh-466
完成