-
-
Notifications
You must be signed in to change notification settings - Fork 214
Continue tutorial/classes.po #77
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
Updated and finished.
Resolve Issue #4. |
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.
感謝 @StevenHsuYL 後續的翻譯,主要有兩個想要請教及討論的地方:
- 哪些專有名詞會需要以中文為主括號內使用英文,哪些會以英文括號內使用中文呢?
- reference 這個詞在不同段落有翻譯成不同詞的情形發生,想確認應該要以哪個為主比較好?
再麻煩 @StevenHsuYL 了,謝謝!
"計 (Object Oriented Programming) 的標準特色:class 繼承機制允許多個 base " | ||
"class(基底類別),一個 derived class(衍生類別)可以覆寫 (override) 其 base " |
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.
想要確認一下我們哪些詞會需要統一以中文為主括號內寫英文,哪些詞會是英文為主括號內寫中文?這邊判定的規則會是什麼?
"計 (Object Oriented Programming) 的標準特色:class 繼承機制允許多個 base " | |
"class(基底類別),一個 derived class(衍生類別)可以覆寫 (override) 其 base " | |
"計 (Object Oriented Programming) 的標準特色:class 繼承機制允許多個基底類別(base " | |
"class),一個衍生類別 (derived class)可以覆寫 (override) 其 base " |
"Class 提供了一種結合資料與功能的手段。建立一個 class 將會新增一個物件的\\ *型" | ||
"別 (type)*\\ ,並且允許建立該型別的新\\ *實例 (instance)*\\ 。每一個 class 實" | ||
"例可以擁有一些維持該實例狀態的屬性 (attribute)。Class 實例也可以有一些(由其 " | ||
"class 所定義的)method(方法),用於修改該實例的狀態。" |
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.
同上想請教 @StevenHsuYL 這邊想法
"class 所定義的)method(方法),用於修改該實例的狀態。" | |
"class 所定義的)方法(method),用於修改該實例的狀態。" |
"混合了 C++ 和 Modula-3 的 class 機制。Python 的 class 提供了所有物件導向程式設" | ||
"計 (Object Oriented Programming) 的標準特色:class 繼承機制允許多個 base " | ||
"class(基底類別),一個 derived class(衍生類別)可以覆寫 (override) 其 base " | ||
"class 的任何 method,且一個 method 可以用相同的名稱呼叫其 base 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.
同上,是否需要讓 "method" 統一使用 "方法"、"base class" 統一用 "基底類別" 呢?
"在介紹 class 之前,我必須先告訴你一些關於 Python 作用域的規則。Class " | ||
"definition(類別定義)以命名空間展現了一些俐落的技巧,而你需要了解作用域和命名" |
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.
這邊同樣是想要討論 class definition 是否需要以中文為主?
tutorial/classes.po
Outdated
"任何外圍函式 (enclosing function) 的作用域,會從最近的外圍作用域開始搜尋,它包" | ||
"含了非區域 (non-local) 也非全域 (non-global) 的名稱" |
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.
這邊“也”改成“和”可能會比較口語?
"任何外圍函式 (enclosing function) 的作用域,會從最近的外圍作用域開始搜尋,它包" | |
"含了非區域 (non-local) 也非全域 (non-global) 的名稱" | |
"任何外圍函式 (enclosing function) 的作用域,會從最近的外圍作用域開始搜尋,它包" | |
"含了非區域 (non-local) 和非全域 (non-global) 的名稱" |
"那麼 ``MyClass.i`` 和 ``MyClass.f`` 都是有效的屬性參照,會分別回傳一個整數和一" | ||
"個函式物件。Class 屬性也可以被指派 (assign),所以您可以透過賦值改變 ``MyClass." | ||
"i`` 的值。\\ :attr:`__doc__` 也是一個有效的屬性,會回傳屬於該 class 的說明字" | ||
"串 (docstring):\\ ``\"A simple example 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.
A simple example 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.
這句話是上段 code example 內的 code,這部分我是認為應該不用翻譯(因為 code 都是原文,如果翻譯了,讀者會找不到真正的回傳結果)。
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.
抱歉我沒有注意到,瞭解了感謝說明🙏
tutorial/classes.po
Outdated
msgid "" | ||
"Having seen the mechanics behind the iterator protocol, it is easy to add " | ||
"iterator behavior to your classes. Define an :meth:`__iter__` method which " | ||
"returns an object with a :meth:`~iterator.__next__` method. If the class " | ||
"defines :meth:`__next__`, then :meth:`__iter__` can just return ``self``::" | ||
msgstr "" | ||
"看過疊代器流程的幕後機制後,在你的 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.
protocol 我覺得翻成協定會比較適合,protocol 應該不是只 iterator 的行為,是指與 iterator 使用相關的規範/規則。
msgstr "" | ||
"資料屬性可能被 method 或是被物件的一般使用者(「客戶端」)所參照。也就是說," |
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.
這邊也有 reference 翻譯不一致, 在上面的段落被翻為引用但這裡翻譯成參照。
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.
我目前是希望我們能夠統一使用「參照」作為 reference 的翻譯,理由如末段回覆。
tutorial/classes.po
Outdated
msgid "" | ||
"Clients should use data attributes with care --- clients may mess up " | ||
"invariants maintained by the methods by stamping on their data attributes. " | ||
"Note that clients may add data attributes of their own to an instance object " | ||
"without affecting the validity of the methods, as long as name conflicts are " | ||
"avoided --- again, a naming convention can save a lot of headaches here." | ||
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.
stamping on their data attributes 感覺有客戶端自行覆蓋了資料屬性的意味,不太確定翻譯成標記合不合適?
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.
同意需要修正。
"Stamp on" 在字典裡是翻作「蓋戳於,銘刻在...」,也許這句可以改成「客戶端可能會因為覆寫他們的資料屬性,...」
雖然原文沒有 override,但此處意思相似,您覺得如何?
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.
沒問題,我覺得應該可以
msgid "" | ||
"There is no shorthand for referencing data attributes (or other methods!) " | ||
"from within methods. I find that this actually increases the readability of " | ||
"methods: there is no chance of confusing local variables and instance " | ||
"variables when glancing through a method." | ||
msgstr "" | ||
"在 method 中參照資料屬性(或其他 method!)是沒有簡寫的。我發現這實際上增加了 " |
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.
這邊 reference 翻譯也有與前文不一致的現象,不確定是以 "引用" 還是 "參照" 為主?
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.
我目前是希望我們能夠統一使用「參照」作為 reference 的翻譯,理由如末段回覆。
感謝審閱!我表達一下翻譯時的想法,但也都可以討論再修正:
以上是我的想法,在翻譯規則上有任何需要修正改進之處,也都可以討論修正,謝謝! |
Unify "reference" to "參照"。Apply review suggestions.
Fix a typo.
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, 謝謝 @StevenHsuYL
Continue tutorial/classes.po
This PR is continued from #52 , with minor revision to previous translation.
The rest of the file was updated and finished.
Thanks for the patient review.
Reference: https://terms.naer.edu.tw/