-
-
Notifications
You must be signed in to change notification settings - Fork 215
Translating library/asyncio #22
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
Conversation
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.
先 review 到一半,這一篇因為不是第一階段目標,有空才會 review 完XD
library/asyncio.po
Outdated
|
||
#: ../../library/asyncio.rst:2 | ||
msgid ":mod:`asyncio` --- Asynchronous I/O, event loop, coroutines and tasks" | ||
msgstr "" | ||
msgstr ":mod:`asyncio` — 非同步 I/O、事件迴圈、協同程序與任務" |
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.
已修正
library/asyncio.po
Outdated
@@ -33,53 +34,70 @@ msgid "" | |||
"resources, running network clients and servers, and other related " | |||
"primitives. Here is a more detailed list of the package contents:" | |||
msgstr "" | |||
"Asyncio 模組提供一個在單一線程(single-threaded)內使用協同程序(coroutines)" |
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.
這邊如果直接寫出 "Asyncio" 模組的話,應該直接用 inline literal 語法:``asyncio`` 模組提供 ....
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.
已修正
library/asyncio.po
Outdated
@@ -33,53 +34,70 @@ msgid "" | |||
"resources, running network clients and servers, and other related " | |||
"primitives. Here is a more detailed list of the package contents:" | |||
msgstr "" | |||
"Asyncio 模組提供一個在單一線程(single-threaded)內使用協同程序(coroutines)" | |||
"撰寫並發(concurrent)的程式碼,並使用多路復用 I/O(multiplexing I/O)方式來" |
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.
我覺得這邊原文應該是在列舉使用情境,所以應該也是使用頓點。
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.
已修正
library/asyncio.po
Outdated
@@ -33,53 +34,70 @@ msgid "" | |||
"resources, running network clients and servers, and other related " | |||
"primitives. Here is a more detailed list of the package contents:" | |||
msgstr "" | |||
"Asyncio 模組提供一個在單一線程(single-threaded)內使用協同程序(coroutines)" | |||
"撰寫並發(concurrent)的程式碼,並使用多路復用 I/O(multiplexing I/O)方式來" | |||
"連接 sockets 與其他的資源,運作在網路客戶端與伺服器端以及其他相關的原始基礎架" |
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.
s/sockets/socket/ (中文文法裡沒有複數概念
如果把這邊原文的這些逗點如上一則留言一樣看作頓點,那這邊 "running clients and servers" 應該會是「運行網路客戶端與伺服器」。"and other related primitives" 則會代表「multiplexing I/O over sockets、network client & server 之外的其他基礎操作」,我覺得這邊的 "primitives" 意思應該是作業 系統的基礎操作(原始操作?)[1]
[1] 可以參考看看這個,這篇問答有提到 send
、receive
這種 OS primitive: https://stackoverflow.com/questions/8022399/meaning-of-primitive-in-operating-system-algorithm-context
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.
感謝,我沒注意到 s
這個 primitive 是令我想了一下,會翻譯成原始架構一開始也如你提供的連結所說明,作業系統裡面稱呼 read, write, wait 這類最基礎的架構為 primitive。看過你的想法,這邊是需要呼應前面幾項動作,如果單單稱為原始基礎架構有點上文不接下文。如果這樣呢:以及其他相關的原始(primitives)的作業系統操作
,一樣保留 primitives 但作業系統操作就是我們翻譯者解釋 primitives 這個關鍵詞?
拍謝啦,知道有計劃性,但是想說最近很常用到 asyncio 乾脆一邊查文件一邊翻譯好惹,算是一種現學現賣??好想 cue TP 喔喔喔喔喔,疑? |
83e7d11
to
d7a1104
Compare
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.
@chairco 再麻煩你囉 🙏
library/asyncio.po
Outdated
@@ -33,53 +36,71 @@ msgid "" | |||
"resources, running network clients and servers, and other related " | |||
"primitives. Here is a more detailed list of the package contents:" | |||
msgstr "" | |||
"``Asyncio`` 模組提供一個在單一線程(single-threaded)內使用協同程序" |
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.
inline literal 裡面的 asyncio 應該要小寫喔,因為是 module 的名稱
s/線程/執行緒/g (記得改掉後面其他的「線程」
library/asyncio.po
Outdated
@@ -33,53 +36,71 @@ msgid "" | |||
"resources, running network clients and servers, and other related " | |||
"primitives. Here is a more detailed list of the package contents:" | |||
msgstr "" | |||
"``Asyncio`` 模組提供一個在單一線程(single-threaded)內使用協同程序" | |||
"(coroutines)撰寫並發(concurrent)的程式碼、並使用多路複用 I/" |
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.
s/並使用/使用/
library/asyncio.po
Outdated
@@ -33,53 +36,71 @@ msgid "" | |||
"resources, running network clients and servers, and other related " | |||
"primitives. Here is a more detailed list of the package contents:" | |||
msgstr "" | |||
"``Asyncio`` 模組提供一個在單一線程(single-threaded)內使用協同程序" | |||
"(coroutines)撰寫並發(concurrent)的程式碼、並使用多路複用 I/" | |||
"O(multiplexing I/O)方式來連接 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.
s/運作在/執行/
s/客戶端/用戶端/ (客戶端好像是中國的翻譯,台灣好像比較說用戶端
s/伺服器端/伺服器/ (大部分的翻譯好像都是寫「用戶端-伺服器」[1]
[1] https://zh.wikipedia.org/wiki/%E4%B8%BB%E5%BE%9E%E5%BC%8F%E6%9E%B6%E6%A7%8B
library/asyncio.po
Outdated
"``Asyncio`` 模組提供一個在單一線程(single-threaded)內使用協同程序" | ||
"(coroutines)撰寫並發(concurrent)的程式碼、並使用多路複用 I/" | ||
"O(multiplexing I/O)方式來連接 socket 與其他的資源、運作在網路客戶端與伺服器" | ||
"端以及其他相關的原始(primitives)的作業系統操作。以下列表包含著更多的套件的" |
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.
這邊的最後一個「以及」宜效仿原文在前面加上逗號,因為原文這樣逗開的意思應該是 "writing .... using coroutines", "multiplexing .... and other resources", "runnig .... and servers", "and other related primitives"
另外,我更正一下上一輪的 review,我其實也不確定這邊的 primitives 是不是指 OS primitives(如果你確定的話就保持這個翻譯吧),但是在原文沒有指出的情形下我會偏好直接逐字翻成「其他相關的原始操作(primitives)」
library/asyncio.po
Outdated
|
||
#: ../../library/asyncio.rst:18 | ||
msgid "" | ||
"a pluggable :ref:`event loop <asyncio-event-loop>` with various system-" | ||
"specific implementations;" | ||
msgstr "" | ||
"一個可插入的\\ :ref:`事件循環 <asyncio-event-loop>`\\ 實現於各類特定的系統;" |
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.
這邊的 "implementations" 是個名詞,翻成動詞的「實現」會有點怪,"implementation" 應該翻譯成「實作」,可以作名詞用。也許可以翻譯成「有各類特定系統的實作」
另外,這一排句子最後面的分號宜用全形分號,原文裡面的分號就真的是語意上分號的意思
library/asyncio.po
Outdated
|
||
#: ../../library/asyncio.rst:35 | ||
msgid "" | ||
":ref:`synchronization primitives <asyncio-sync>` for use between coroutines " | ||
"in a single thread, mimicking those in the :mod:`threading` module;" | ||
msgstr "" | ||
"類似\\ :mod:`threading`\\ 模組\\ :ref:`同步處理原語(synchronization " | ||
"primitives) <asyncio-sync>`\\ 用於單一線程的協同程序;" |
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.
原文中有 "between" coroutines,譯文中應該要加上「之間」,「用於單一執行緒的協同程序之間」,這樣比較能正確表達原文的意思
library/asyncio.po
Outdated
|
||
#: ../../library/asyncio.rst:38 | ||
msgid "" | ||
"an interface for passing work off to a threadpool, for times when you " | ||
"absolutely, positively have to use a library that makes blocking I/O calls." | ||
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.
這兩個句子應該前後對調比較順,「當某些時候 .... 的函式庫時,此模組有一個用來將工作 .... 的介面」
library/asyncio.po
Outdated
@@ -88,13 +109,19 @@ msgid "" | |||
"lists common traps and explains how to avoid them. :ref:`Enable the debug " | |||
"mode <asyncio-debug-mode>` during development to detect common issues." | |||
msgstr "" | |||
"非同步程式設計與傳統的”同步(sequential)”程式設計相較起來更為複雜:請參見" |
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.
請使用中文的引號
library/asyncio.po
Outdated
"非同步程式設計與傳統的”同步(sequential)”程式設計相較起來更為複雜:請參見" | ||
"\\ :ref:`Develop with asyncio <asyncio-dev>`\\ 頁面,這裡頭列出一些常見的陷" | ||
"阱並且解釋如何避免掉入這些陷阱中。開發過程中\\ :ref:`啟用偵錯模式 <asyncio-" | ||
"debug-mode>`\\ 可用來檢查常見問題。" |
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.
s/可用來檢查常見問題/可以偵測常見問題/
library/asyncio.po
Outdated
|
||
#: ../../library/asyncio.rst:64 | ||
msgid "" | ||
"The :mod:`asyncio` module was designed in :PEP:`3156`. For a motivational " | ||
"primer on transports and protocols, see :PEP:`3153`." | ||
msgstr "" | ||
":mod:`asyncio` 模組是根據\\ :PEP:`3156`\\ 所設計。基本的傳輸與協議等動機請" |
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.
s/協議/協定/
6071d35
to
648d058
Compare
648d058
to
80a7a9f
Compare
ac822ad
to
f2f2498
Compare
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.
🙏
Co-authored-by: Matt.Wang <mattwang44@gmail.com>
希望 asyncio 這一拖拉庫頁面能幫忙解決掉(聽說 core team 想對 asyncio library 的教學做大幅度調整)不過還沒聽到太多消息就先來做吧。