Skip to content

Conversation

@JunliXiao
Copy link

Issue #1168

Done

這部分大概有兩個問題:

  1. 例如 introduction 1.2 這部分,跟之後章節偶爾出現的文法定義區塊,其實這些區塊裡很多字是可以翻,也出現在翻譯內文,像是 name、letter、digit 等,但因為那些區塊內容沒有在 po 檔內改不到,所以目前統一沒翻這些
  2. "token" 的翻譯問題,我有看到最後一章完整文法裡有出現「語彙符號」這個翻法,這個也許可以另外開個討論。目前簡介這章裡我是都保留為 “token"

@mattwang44 mattwang44 requested a review from rockleona November 23, 2025 14:46
Copy link
Collaborator

@rockleona rockleona left a comment

Choose a reason for hiding this comment

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

Review 1st round:

感謝你的貢獻!回覆你的問題

  1. 我們只專注在 po 檔案中的翻譯內容,如果沒出現的話就可以忽略了🤣
  2. 這部分沒問題,個人認為 token 這個詞的翻譯太仰賴前後文,但還是麻煩你有空去 Discussion 開一個討論吧!

Copy link
Collaborator

@rockleona rockleona left a comment

Choose a reason for hiding this comment

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

Review 2nd round,再麻煩修正,感謝!

Comment on lines +220 to +221
"每一條規則的開頭即規則名稱,接著一個分號 ``:``。分號右側是由下列語法元素所構"
"成的規則定義 :"
Copy link
Collaborator

Choose a reason for hiding this comment

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

(which identifies the rule that's being defined) 這句話好像沒翻譯到

Copy link
Author

Choose a reason for hiding this comment

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

括號這句我有點不解,好像是不必要的、很抽象的說明?
我是覺得略過這句也無礙對這段的理解

Copy link
Collaborator

Choose a reason for hiding this comment

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

TLDR 我覺得這句還是應該要翻譯

Suggested change
"每一條規則的開頭即規則名稱,接著一個分號 ``:``。分號右側是由下列語法元素所構"
"成的規則定義 :"
"每一條規則的開頭即規則名稱(用來識別被定義的規則),接著一個分號 ``:``。分號右側是由下列語法元素所構"
"成的規則定義 :"
簡單說明我的原因

這段說明和 reference/grammar 搭配一起看會比較好理解。

舉例 grammar 中的一部分:

statements: statement+ 

statement:
    | compound_stmt 
    | simple_stmts 

冒號前的 statementsstatement 都是文件原文講的 name

對於不熟悉 Python 與其 grammar 的讀者來說,如果缺少括號內的補述的話,在閱讀 grammar 描述時就更難以理解原意(例如我可能就不知道 statements: statement+ 裡的 statement 其實就是用來指到另一個部分的 identifier),又或者多一點理解成錯誤意思的可能(例如我可能將 name 一詞理解成 variable name、以為真的可以在 Python code 內使用)。

Copy link
Collaborator

@mattwang44 mattwang44 left a comment

Choose a reason for hiding this comment

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

我的最後 review,這邊修完就可以 merge,感謝 🙏🏽

msgstr ""
"在一份語言的參考文件中加入太多實作細節,是很危險的——這些細節將來可能變化,同"
"一個語言的其他實作也可能有不一樣的運作方式。然而,CPython 是一個廣泛使用的 "
"Python 實作(儘管其他可選的實作也在持續獲得更多支持),而有時候它的一些特別古"
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
"Python 實作(儘管其他可選的實作也在持續獲得更多支持),而有時候它的一些特別古"
"Python 實作(儘管其他可選的實作也在持續得到更多支援),而有時候它的一些特別古"

"choice of any single character in the given (inclusive) range of ASCII "
"characters."
msgstr ""
"``\"a\"\"z\"``:兩個字面值字元由三個點隔開,表示在此界定範圍內(含)任一個 "
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
"``\"a\"\"z\"``:兩個字面值字元由三個點隔開,表示在此界定範圍內(含)任一個 "
"``\"a\"...\"z\"``:兩個字面值字元由三個點隔開,表示在此界定範圍內(含)任一個 "

"\">``), or an abbreviation that is defined in nearby text (for example, "
"``<Lu>``)."
msgstr ""
"``<…>``:角括號內的文字片語是對匹配符號(例如,``<除了 \"\\\" 以外的任何 "
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
"``<>``:角括號內的文字片語是對匹配符號(例如,``<除了 \"\\\" 以外的任何 "
"``<...>``:角括號內的文字片語是對匹配符號(例如,``<除了 \"\\\" 以外的任何 "

msgstr ""
"*詞法* (lexical) 和\\ *語法* (syntactic) 分析是有一些差異的::term:`lexical "
"analyzer` 處理的對象是輸入來源的各個字元,而\\ *剖析器* (語法分析器)處理的"
"則是詞法分析產生的 :term:`tokens <token>` 流。然而在某些時候,這兩個階段的確"
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
"則是詞法分析產生的 :term:`tokens <token>` 。然而在某些時候,這兩個階段的確"
"則是詞法分析產生的 :term:`tokens <token>` 串流。然而在某些時候,這兩個階段的確"

#: ../../reference/introduction.rst:89
msgid "Notation"
msgstr ""
msgstr "表示法"
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
msgstr "表示法"
msgstr "標示法"

P.S. reference/grammar 頁面中已經將對這頁面的連結顯示文字翻譯成「標示法」

msgid ""
"``!e``: a negative lookahead (that is, ``e`` is required *not* to match)"
msgstr ""
msgstr "``!e``:負向預看,也就是 ``e`` 必須\\ *不匹配*"
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
msgstr "``!e``:負向預看,也就是 ``e`` 必須\\ *不匹配*"
msgstr "``!e``:負向預查,也就是 ``e`` 必須\\ *不匹配*"

"like :data:`token.INDENT` or :data:`~token.NEWLINE`. *Syntactic* definitions "
"then use these tokens, rather than source characters."
msgstr ""
"實務上,這兩個的差異在於:在\\ *詞法*\\定義裡,任何空格都是有影響的。詞法分析"
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit
實際上 \\ \\ (有無空格)效果相同,可以選擇一種就好(目前專案大多用前者)

"then use these tokens, rather than source characters."
msgstr ""
"實務上,這兩個的差異在於:在\\ *詞法*\\定義裡,任何空格都是有影響的。詞法分析"
"器\\ :ref:`捨棄<whitespace>`\\了那些無法轉換成 token(例"
Copy link
Collaborator

@mattwang44 mattwang44 Dec 14, 2025

Choose a reason for hiding this comment

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

nit: 沒空格 render 不會有問題,但希望還是留一下

Suggested change
"器\\ :ref:`捨棄<whitespace>`\\了那些無法轉換成 token(例"
"器\\ :ref:`捨棄 <whitespace>`\\了那些無法轉換成 token(例"

msgstr ""
"實務上,這兩個的差異在於:在\\ *詞法*\\定義裡,任何空格都是有影響的。詞法分析"
"器\\ :ref:`捨棄<whitespace>`\\了那些無法轉換成 token(例"
"如 :data:`token.INDENT` 或 :data:`~token.NEWLINE`)的空白。\\ *語法*\\定義才"
Copy link
Collaborator

@mattwang44 mattwang44 Dec 14, 2025

Choose a reason for hiding this comment

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

nit
除了全形的結尾括號 ()外,sphinx 標記語法前面和其他全形標點符號間緊鄰沒留空白的話沒有關係

Suggested change
"如 :data:`token.INDENT` 或 :data:`~token.NEWLINE`)的空白。\\ *語法*\\定義才"
"如 :data:`token.INDENT` 或 :data:`~token.NEWLINE`)的空白。*語法*\\定義才"

Comment on lines +220 to +221
"每一條規則的開頭即規則名稱,接著一個分號 ``:``。分號右側是由下列語法元素所構"
"成的規則定義 :"
Copy link
Collaborator

Choose a reason for hiding this comment

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

TLDR 我覺得這句還是應該要翻譯

Suggested change
"每一條規則的開頭即規則名稱,接著一個分號 ``:``。分號右側是由下列語法元素所構"
"成的規則定義 :"
"每一條規則的開頭即規則名稱(用來識別被定義的規則),接著一個分號 ``:``。分號右側是由下列語法元素所構"
"成的規則定義 :"
簡單說明我的原因

這段說明和 reference/grammar 搭配一起看會比較好理解。

舉例 grammar 中的一部分:

statements: statement+ 

statement:
    | compound_stmt 
    | simple_stmts 

冒號前的 statementsstatement 都是文件原文講的 name

對於不熟悉 Python 與其 grammar 的讀者來說,如果缺少括號內的補述的話,在閱讀 grammar 描述時就更難以理解原意(例如我可能就不知道 statements: statement+ 裡的 statement 其實就是用來指到另一個部分的 identifier),又或者多一點理解成錯誤意思的可能(例如我可能將 name 一詞理解成 variable name、以為真的可以在 Python code 內使用)。

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.

3 participants