Skip to content

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

Merged
merged 4 commits into from
Sep 25, 2021
Merged

Continue tutorial/classes.po #77

merged 4 commits into from
Sep 25, 2021

Conversation

StevenHsuYL
Copy link
Contributor

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/

Updated and finished.
@josix
Copy link
Collaborator

josix commented Aug 14, 2021

Resolve Issue #4.
Thank you @StevenHsuYL for the translating this chapter. I'll try to review this translation and other members in sprint today will review other chapters so that this project could move faster. (for more detail you could read the listed action items here) We will exchange our reviews after we made the phase one review and try to make the rule of reviewing the translation and make the review process more smoothly.

@josix josix self-requested a review August 16, 2021 06:10
This was referenced Aug 16, 2021
@josix josix self-assigned this Sep 4, 2021
Copy link
Collaborator

@josix josix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感謝 @StevenHsuYL 後續的翻譯,主要有兩個想要請教及討論的地方:

  1. 哪些專有名詞會需要以中文為主括號內使用英文,哪些會以英文括號內使用中文呢?
  2. reference 這個詞在不同段落有翻譯成不同詞的情形發生,想確認應該要以哪個為主比較好?
    再麻煩 @StevenHsuYL 了,謝謝!

Comment on lines +57 to +58
"計 (Object Oriented Programming) 的標準特色:class 繼承機制允許多個 base "
"class(基底類別),一個 derived class(衍生類別)可以覆寫 (override) 其 base "
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

想要確認一下我們哪些詞會需要統一以中文為主括號內寫英文,哪些詞會是英文為主括號內寫中文?這邊判定的規則會是什麼?

Suggested change
"計 (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(方法),用於修改該實例的狀態。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上想請教 @StevenHsuYL 這邊想法

Suggested change
"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 的 "
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上,是否需要讓 "method" 統一使用 "方法"、"base class" 統一用 "基底類別" 呢?

Comment on lines +136 to +137
"在介紹 class 之前,我必須先告訴你一些關於 Python 作用域的規則。Class "
"definition(類別定義)以命名空間展現了一些俐落的技巧,而你需要了解作用域和命名"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這邊同樣是想要討論 class definition 是否需要以中文為主?

Comment on lines 255 to 256
"任何外圍函式 (enclosing function) 的作用域,會從最近的外圍作用域開始搜尋,它包"
"含了非區域 (non-local) 也非全域 (non-global) 的名稱"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這邊“也”改成“和”可能會比較口語?

Suggested change
"任何外圍函式 (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\"``。"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A simple example class 沒有翻譯到

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這句話是上段 code example 內的 code,這部分我是認為應該不用翻譯(因為 code 都是原文,如果翻譯了,讀者會找不到真正的回傳結果)。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

抱歉我沒有注意到,瞭解了感謝說明🙏

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 加入疊代器的行為就很容易了。定義一"
Copy link
Collaborator

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 或是被物件的一般使用者(「客戶端」)所參照。也就是說,"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這邊也有 reference 翻譯不一致, 在上面的段落被翻為引用但這裡翻譯成參照。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我目前是希望我們能夠統一使用「參照」作為 reference 的翻譯,理由如末段回覆。

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 ""
"客戶端應該小心使用資料屬性——客戶端可能會因為標記他們的資料屬性,而破壞了被 "
Copy link
Collaborator

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 感覺有客戶端自行覆蓋了資料屬性的意味,不太確定翻譯成標記合不合適?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同意需要修正。
"Stamp on" 在字典裡是翻作「蓋戳於,銘刻在...」,也許這句可以改成「客戶端可能會因為覆寫他們的資料屬性,...」
雖然原文沒有 override,但此處意思相似,您覺得如何?

Copy link
Collaborator

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!)是沒有簡寫的。我發現這實際上增加了 "
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這邊 reference 翻譯也有與前文不一致的現象,不確定是以 "引用" 還是 "參照" 為主?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我目前是希望我們能夠統一使用「參照」作為 reference 的翻譯,理由如末段回覆。

@StevenHsuYL
Copy link
Contributor Author

StevenHsuYL commented Sep 21, 2021

感謝 @StevenHsuYL 後續的翻譯,主要有兩個想要請教及討論的地方:

  1. 哪些專有名詞會需要以中文為主括號內使用英文,哪些會以英文括號內使用中文呢?
  2. reference 這個詞在不同段落有翻譯成不同詞的情形發生,想確認應該要以哪個為主比較好?
    再麻煩 @StevenHsuYL 了,謝謝!

感謝審閱!我表達一下翻譯時的想法,但也都可以討論再修正:

  1. 大部分的特殊專有名詞,都是以 "中文 (english)" 的模式來翻譯,除了以下的詞條:class, method, list...,原因是 README 的 glossary table 如此建議,我必須依照此規則進行翻譯。所以在文中第一次遇到這些字時,會變成 class(類別)、method(方法)、list(串列),然後這些字之後再出現時,就只會出現原文,不會再括號中文。
    因為有 "class" 必須保留原文的前提規則,所以 base class, class definition 等字,我也會一併保留完整名詞,翻譯規則就如同 class 的方式。我想 coordinator 當初訂此規則,是希望保留 "class" 的獨特性,不希望用「類別」來描述此字。method, list...似乎也是如此。
    如果要修改此規則,那麼有許多檔案都必須做出相應的修正,這個留給大家討論。

  2. Reference:
    當用於表示某個位址值時,我使用「參照」,如同維基百科的翻譯,通常是名詞。
    若用於表示使用上述位址連結到目標的「過程」,會翻成「參照」或「引用」,可能是名詞或動詞。
    但我剛剛搜尋網路也發現,「引用」似乎是中國用語(來源),而台灣的「引用」是 "citation" 的意思。所以我也希望我們的翻譯可以將 reference 全部統一為「參照」。
    雖然教育部辭典是用「參考」,但似乎較少被 IT 領域文章採用,所以這裡也沒有使用。

以上是我的想法,在翻譯規則上有任何需要修正改進之處,也都可以討論修正,謝謝!

Unify "reference" to "參照"。Apply review suggestions.
Fix a typo.
@josix josix self-requested a review September 23, 2021 08:40
Copy link
Collaborator

@josix josix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, 謝謝 @StevenHsuYL

@adrianliaw adrianliaw merged commit 3035926 into python:3.9 Sep 25, 2021
@StevenHsuYL StevenHsuYL deleted the classes branch October 9, 2021 06:05
beccalzh pushed a commit to beccalzh/python-docs-zh-tw that referenced this pull request Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants