-
-
Notifications
You must be signed in to change notification settings - Fork 214
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 unittest.mock.po, from rst:17 to rst:201 #610
Conversation
翻譯rst:17與rst:21 可能需討論部分譯名(例如stub)
translate from rst:27 to rst:42
翻譯rst:60
翻譯rst:72至rst:201
咦是誤關嗎? |
忘了先跑make確認,跑完晚點我再reopen吧 |
fix rst error
fix format
有個地方要確定一下,就是斜體,例如 Python在翻譯中要視為rst語法使用/ ,還是當作正常英文留空就好? |
沒有看懂是在指哪一句,可以請你直接在覺得有問題的地方留言嗎 |
library/unittest.mock.po
Outdated
|
||
#: ../../library/unittest.mock.rst:3 | ||
msgid ":mod:`unittest.mock` --- mock object library" | ||
msgstr "" | ||
msgstr ":mod:`unittest.mock` — 模擬物件函式庫" |
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.
針對 mock 翻譯成「模擬」覺得還是有點疑慮:我自己認為意思比較接近「仿造」,和 simulation
相近但不完全一樣。不過既然 patch 不翻譯的話,mock 我覺得也可以不翻譯。你覺得呢?
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.
mock一方面是參照了樂詞網的 mock interviews (模擬面試)一詞,翻仿造又有跟 fake 搞混的可能性,好像也不太行。
mock整個不翻譯的話是一解,但我個人還是投模擬一票...,這邊看其他人有沒有想法吧。
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.
認真探討 simulation 與 mock 的差異的話,兩者都是 (廣義的)模擬,但前者是追求更完整的模擬、後者只為特定目的而達成最低需求的模擬;我自己是覺得找不到中文詞彙可以呈現這種差異。
測試領域的 stub, fake, spy, mock, dummy 在口語溝通上也通常直接使用英文原文而沒有慣用翻譯,即便我們自己定義了一套對映翻譯,應也難以讓人理解這幾個詞彙間的差異。
Anyway, 如果想要徵得更多人意見的話,可以考慮在 channel 發文或者發一篇 discussion 做紀錄歐!
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.
discussion at #613
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.
review round 1
library/unittest.mock.po
Outdated
@@ -89,6 +109,9 @@ msgid "" | |||
"from another object. Attempting to access attributes or methods on the mock " | |||
"that don't exist on the spec will fail with an :exc:`AttributeError`." | |||
msgstr "" | |||
"Mock 有許多其他方法可以讓你配置與控制它的行為。例如,\\ *spec*\\ 引數可以配" |
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.
這裡的spec是斜體,照一般英文的處理方式就可以了嗎? 這邊翻譯當下有跟特殊語法搞混,輸出html後發現好像該+空格
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.
的確把它當成英文字詞就好,改成 例如,*spec* 引數
即可。
翻譯的時候是參考首頁的rST 語法注意事項 |
space修正
@@ -50,23 +56,32 @@ msgid "" | |||
"some examples of how to use :class:`Mock`, :class:`MagicMock` and :func:" | |||
"`patch`." | |||
msgstr "" | |||
"此外,mock 還提供了一個 :func:`patch` 裝飾器,用於 patching 測試範圍內對 " | |||
"module(模組)以及 class(類別)級別的屬性,以及用於建立唯一物件的 :const:" | |||
"`sentinel`\\ 。有關如何使用 :class:`Mock`\\、\\ :class:`MagicMock` 和 :func:" |
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: rst/sphinx 特殊語法是能夠認得全形頓號、逗號和句號的(但認不得全形括號),這邊的 \\
有加和沒加的 render 結果相同。可改可不改。
"`sentinel`\\ 。有關如何使用 :class:`Mock`\\、\\ :class:`MagicMock` 和 :func:" | |
"`sentinel`。有關如何使用 :class:`Mock`、:class:`MagicMock` 和 :func:" |
fix space
修正半形冒號
library/unittest.mock.po
Outdated
|
||
#: ../../library/unittest.mock.rst:201 | ||
msgid "The Mock Class" | ||
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.
這裡是不是要翻成 Mock 類別
,下面是在介紹 Mock 這個 class
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.
可能先決定要怎麼翻,到時候這邊翻成 Mock(mock的翻譯)類別
之類的吧?
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.
我的意思是這裡 Mock 應該不用翻出來,因為下面都在說明 Mock() 相關的 methods、arguments
修正 mock 為不翻譯
修正Mock於翻譯時維持原文 |
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.
LGTM! 辛苦了
* docs(translate-mock): mock page翻譯 翻譯rst:17與rst:21 可能需討論部分譯名(例如stub) * docs: mock translate translate from rst:27 to rst:42 * docs(translate-mock): mock page翻譯 翻譯rst:60 * docs(translate-mock): mock page翻譯 翻譯rst:72至rst:201 * docs(translate-mock): mock page翻譯 fix rst error * docs(translate-mock): mock page翻譯 fix format * docs: mock translate 用詞修正 * docs: mock translate space修正 * fix(translate-mock): fix space * fix(translate-mock): 修正半形冒號 * fix: 用詞修正 修正錯用簡中用詞 * fix(translate-mock): 修正 mock 為不翻譯 --------- Co-authored-by: 鄭宇辰 <ken71301@gmail.com>
#565 related issue
translate till the end of Quick Guide part.