Translate tutorial/errors.po#76
Merged
Merged
Conversation
Completed and updated.
adrianliaw
reviewed
Jun 28, 2021
adrianliaw
left a comment
Collaborator
There was a problem hiding this comment.
今天先看到 errors.rst:109,明天有請假會繼續看!
| "Syntax errors, also known as parsing errors, are perhaps the most common " | ||
| "kind of complaint you get while you are still learning Python::" | ||
| msgstr "" | ||
| "句法錯誤又稱剖析錯誤 (parsing error),它或許是學習 Python 的過程最常聽見的抱" |
| "so you know where to look in case the input came from a script." | ||
| msgstr "" | ||
| "剖析器 (parser) 會重複犯錯的那一行,並用一個小「箭頭」指向該行檢測到的第一個" | ||
| "錯誤點。錯誤是由箭頭\\ *之前*\\ 的符記 (token) 導致的(或至少是在這裡檢測到" |
| msgstr "" | ||
| "即使一段陳述式或運算式使用了正確的語法,嘗試執行時仍可能導致錯誤。執行時檢測" | ||
| "到的錯誤稱為\\ *例外*\\ ,例外不一定都很嚴重:你很快就能學會在 Python 程式中" | ||
| "如何處理它們。大多數的例外不會被程式處理,但會顯示如下的錯誤訊息:\n" |
Collaborator
There was a problem hiding this comment.
不過大多數的例外.....,並且會顯示.... (那個 however 是給前面那一句轉折,不是後面那一句)
| "`NameError` 和 :exc:`TypeError`\\ 。作為例外類型被印出的字串,就是發生的內建" | ||
| "例外 (built-in exception) 的名稱。所有的內建例外都是如此運作,但對於使用者自" | ||
| "定的例外則不一定需要遵守(雖然這是一個有用的慣例)。標準例外名稱是內建的識別" | ||
| "符 (identifier),不是保留關鍵字 (reserved keyword)。" |
Collaborator
There was a problem hiding this comment.
稍微查了一下,台灣似乎比較常見的翻譯是「識別字」,如何?
| "message as shown above." | ||
| msgstr "" | ||
| "如果發生的例外未符合 except 子句中的例外名稱,則將其傳遞到外層的 :keyword:" | ||
| "`try` 陳述式;如果仍無法找到 handler(處置器),則它是一個\\ *未處理例外 " |
Collaborator
There was a problem hiding this comment.
「如果仍無法找到相對應的處理器」應該就可以了,handler 並不是專有名詞,只是統稱專門處理某特定例外的一段程式碼(我覺得甚至如果把所有的 handler 都換成「相對應的 except 子句」也是合理的)
adrianliaw
reviewed
Jun 29, 2021
| "message as shown above." | ||
| msgstr "" | ||
| "如果發生的例外未符合 except 子句中的例外名稱,則將其傳遞到外層的 :keyword:" | ||
| "`try` 陳述式;如果仍無法找到 handler(處置器),則它是一個\\ *未處理例外 " |
| ":keyword:`try` 陳述式可以有不只一個 except 子句,為不同的例外指定 handler,而" | ||
| "最多只有一個 handler 會被執行。Handler 只處理對應的 try 子句中發生的例外,而" | ||
| "不會處理同一 :keyword:`!try` 陳述式裡其他 handler 內的例外。一個 except 子句" | ||
| "可以用一組括號內的 tuple 命名多個例外,例如:\n" |
| "一個在 :keyword:`except` 子句中的 class(類別)和一個例外是可相容的,只要它與" | ||
| "例外是同一個 class 或是為其 base class(基底類別);反之則無法成立——列出 " | ||
| "derived class (衍生類別)的 except 子句並不能與 base class 相容。例如,以下" | ||
| "程式碼會依序印出 B, C, D:\n" |
| "message and then re-raise the exception (allowing a caller to handle the " | ||
| "exception as well)::" | ||
| msgstr "" | ||
| "最後一個 except 子句可以省略例外名稱,以用作通配符 (wildcard)。但使用上要極其" |
| msgstr "" | ||
| "最後一個 except 子句可以省略例外名稱,以用作通配符 (wildcard)。但使用上要極其" | ||
| "小心,因為這種方式容易遮蔽真正的程式設計錯誤!它也可用於印出錯誤訊息,然後重" | ||
| "新引發 (re-raise) 例外(也容許一個呼叫程式 (caller) 處理例外):\n" |
| "regardless of whether the use of the resource was successful." | ||
| msgstr "" | ||
| "在真實應用程式中,\\ :keyword:`finally` 子句對於釋放外部資源(例如檔案或網路" | ||
| "連接)很有用,無論該資源的使用是否成功。" |
| #: ../../tutorial/errors.rst:320 | ||
| msgid "User-defined Exceptions" | ||
| msgstr "" | ||
| msgstr "使用者自定的例外 (User-defined Exceptions)" |
Collaborator
There was a problem hiding this comment.
感覺這個就不需要註釋原文了,畢竟也不是真正在使用 Python 時會看到的術語
| #: ../../tutorial/errors.rst:375 | ||
| msgid "Defining Clean-up Actions" | ||
| msgstr "" | ||
| msgstr "定義清理動作 (Clean-up Actions)" |
| #: ../../tutorial/errors.rst:468 | ||
| msgid "Predefined Clean-up Actions" | ||
| msgstr "" | ||
| msgstr "預定義 (Predefined) 的清理動作" |
| "files, provide predefined clean-up actions will indicate this in their " | ||
| "documentation." | ||
| msgstr "" | ||
| "陳述式執行完畢後,就算是在處理行 (line) 時遇到問題,檔案 *f* 總是會被關閉。和" |
Collaborator
There was a problem hiding this comment.
s/處理行/處理內容
(沒有完全逐字翻譯但意思是一樣的)
All suggestions were applied.
Contributor
Author
|
All suggestions above were applied. |
Collaborator
|
感恩! |
This was referenced Oct 26, 2021
Closed
beccalzh
pushed a commit
to beccalzh/python-docs-zh-tw
that referenced
this pull request
Sep 4, 2024
* Translate tutorial/errors.po Completed and updated. * Update errors.po All suggestions were applied.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Continued from #49 , it's completed and updated of tutorial/errors.po
Thanks for reviewing.
The work load was reduced during lock down period in Taiwan, so the translation would be faster recently.
Reference: https://terms.naer.edu.tw/