Skip to content
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 "Function" and "Exception" part of library/re.po #996

Open
wants to merge 1 commit into
base: 3.13
Choose a base branch
from

Conversation

mattwang44
Copy link
Collaborator

related issue: #631

@mattwang44 mattwang44 marked this pull request as ready for review November 12, 2024 07:54
@mattwang44 mattwang44 requested a review from beccalzh November 16, 2024 07:41
Copy link
Collaborator

@beccalzh beccalzh left a comment

Choose a reason for hiding this comment

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

review part 1: rst:1001

"串。如果未找到該模式,則不改變 *string* 並回傳。*repl* 可以是字串或函式;如果"
"它是字串,則處理其中的任何反斜線轉義。也就是說 ``\\n`` 會被轉換為單一換行符、"
"``\\r`` 會被轉換為回車符 (carriage return) 等等。ASCII 字母的未知轉義符會被保"
"留以供將來使用並被視為錯誤。其他未知轉義符例如 ``\\&`` 會被保留。例如 "
Copy link
Collaborator

@beccalzh beccalzh Dec 22, 2024

Choose a reason for hiding this comment

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

Suggested change
"留以供將來使用並被視為錯誤。其他未知轉義符例如 ``\\&`` 會被保留。例如 "
"留以供將來使用並被視為錯誤。其他未知轉義符例如 ``\\&`` 會被單獨保留。例如 "

"``\\g<number>`` 使用對應的群組編號;因此 ``\\g<2>`` 等價於 ``\\2``,但在諸如 "
"``\\g<2>0`` 之類的替換中並非模糊不清 (isn't ambiguous)。``\\20`` 將被直譯為對"
"群組 20 的參照,而不是對後面跟著字面字元 ``'0'`` 的群組 2 的參照。反向參照 "
"``\\g<0>`` 會取代以 RE 所匹配到的整個子字串。"
Copy link
Collaborator

Choose a reason for hiding this comment

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

想問個replacesubtitute,有需要統一分別翻成替換取代嗎?

@@ -1626,26 +1693,29 @@ msgid ""
"pattern. The ``PatternError`` instance has the following additional "
"attributes:"
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
"或在編譯或匹配期間發生某些其他錯誤時引發的例外。如果字串不包含模式匹配項,則"
"或在編譯或匹配期間發生某些其他錯誤時,將引發例外。如果字串不包含模式匹配項,則"

感覺語意上有點差別,一個描述例外發生的情形,一個是形容一種例外。

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.

2 participants