Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upTranslating library/asyncio #22
Conversation
|
先 review 到一半,這一篇因為不是第一階段目標,有空才會 review 完XD |
|
|
||
| #: ../../library/asyncio.rst:2 | ||
| msgid ":mod:`asyncio` --- Asynchronous I/O, event loop, coroutines and tasks" | ||
| msgstr "" | ||
| msgstr ":mod:`asyncio` — 非同步 I/O、事件迴圈、協同程序與任務" |
| @@ -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)" | |||
adrianliaw
Jul 19, 2018
Collaborator
這邊如果直接寫出 "Asyncio" 模組的話,應該直接用 inline literal 語法:``asyncio`` 模組提供 ....
| @@ -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)方式來" | |||
| @@ -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 與其他的資源,運作在網路客戶端與伺服器端以及其他相關的原始基礎架" | |||
adrianliaw
Jul 19, 2018
Collaborator
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
chairco
Jul 19, 2018
Author
Contributor
感謝,我沒注意到 s
這個 primitive 是令我想了一下,會翻譯成原始架構一開始也如你提供的連結所說明,作業系統裡面稱呼 read, write, wait 這類最基礎的架構為 primitive。看過你的想法,這邊是需要呼應前面幾項動作,如果單單稱為原始基礎架構有點上文不接下文。如果這樣呢:以及其他相關的原始(primitives)的作業系統操作,一樣保留 primitives 但作業系統操作就是我們翻譯者解釋 primitives 這個關鍵詞?
|
拍謝啦,知道有計劃性,但是想說最近很常用到 asyncio 乾脆一邊查文件一邊翻譯好惹,算是一種現學現賣??好想 cue TP 喔喔喔喔喔,疑? |
|
@chairco 再麻煩你囉 |
| @@ -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)內使用協同程序" | |||
adrianliaw
Aug 2, 2018
Collaborator
inline literal 裡面的 asyncio 應該要小寫喔,因為是 module 的名稱
s/線程/執行緒/g (記得改掉後面其他的「線程」
| @@ -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/" | |||
| @@ -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 與其他的資源、運作在網路客戶端與伺服器" | |||
adrianliaw
Aug 2, 2018
Collaborator
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
| "``Asyncio`` 模組提供一個在單一線程(single-threaded)內使用協同程序" | ||
| "(coroutines)撰寫並發(concurrent)的程式碼、並使用多路複用 I/" | ||
| "O(multiplexing I/O)方式來連接 socket 與其他的資源、運作在網路客戶端與伺服器" | ||
| "端以及其他相關的原始(primitives)的作業系統操作。以下列表包含著更多的套件的" |
adrianliaw
Aug 2, 2018
Collaborator
這邊的最後一個「以及」宜效仿原文在前面加上逗號,因為原文這樣逗開的意思應該是 "writing .... using coroutines", "multiplexing .... and other resources", "runnig .... and servers", "and other related primitives"
另外,我更正一下上一輪的 review,我其實也不確定這邊的 primitives 是不是指 OS primitives(如果你確定的話就保持這個翻譯吧),但是在原文沒有指出的情形下我會偏好直接逐字翻成「其他相關的原始操作(primitives)」
|
|
||
| #: ../../library/asyncio.rst:18 | ||
| msgid "" | ||
| "a pluggable :ref:`event loop <asyncio-event-loop>` with various system-" | ||
| "specific implementations;" | ||
| msgstr "" | ||
| "一個可插入的\\ :ref:`事件循環 <asyncio-event-loop>`\\ 實現於各類特定的系統;" |
adrianliaw
Aug 2, 2018
Collaborator
這邊的 "implementations" 是個名詞,翻成動詞的「實現」會有點怪,"implementation" 應該翻譯成「實作」,可以作名詞用。也許可以翻譯成「有各類特定系統的實作」
另外,這一排句子最後面的分號宜用全形分號,原文裡面的分號就真的是語意上分號的意思
|
|
||
| #: ../../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>`\\ 用於單一線程的協同程序;" |
adrianliaw
Aug 2, 2018
Collaborator
原文中有 "between" coroutines,譯文中應該要加上「之間」,「用於單一執行緒的協同程序之間」,這樣比較能正確表達原文的意思
|
|
||
| #: ../../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 "" | ||
| "一個用來將工作傳遞到線程池的介面,當某些時候你必須得去呼叫與使用一個會造成阻" |
| @@ -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)”程式設計相較起來更為複雜:請參見" | |||
| "非同步程式設計與傳統的”同步(sequential)”程式設計相較起來更為複雜:請參見" | ||
| "\\ :ref:`Develop with asyncio <asyncio-dev>`\\ 頁面,這裡頭列出一些常見的陷" | ||
| "阱並且解釋如何避免掉入這些陷阱中。開發過程中\\ :ref:`啟用偵錯模式 <asyncio-" | ||
| "debug-mode>`\\ 可用來檢查常見問題。" |
|
|
||
| #: ../../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`\\ 所設計。基本的傳輸與協議等動機請" |
希望 asyncio 這一拖拉庫頁面能幫忙解決掉(聽說 core team 想對 asyncio library 的教學做大幅度調整)不過還沒聽到太多消息就先來做吧。