From 5ab846c70f961155b53fa9208b2919e67b1ffcda Mon Sep 17 00:00:00 2001 From: cschan <45995789+cschan1828@users.noreply.github.com> Date: Mon, 11 Dec 2023 00:50:42 +0800 Subject: [PATCH 1/3] Add more translations of library/io --- library/io.po | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/library/io.po b/library/io.po index c190abe473..dbfc5774f9 100644 --- a/library/io.po +++ b/library/io.po @@ -593,6 +593,10 @@ msgid "" "raise a :exc:`ValueError` (or :exc:`UnsupportedOperation`) when operations " "they do not support are called." msgstr "" +"即使 :class:`IOBase` 因為實作的簽章差異巨大而沒有宣告 :meth:`!read` 或 :meth:" +"`!write` 方法,實作與用戶端應把這些方法視為介面的一部份。此外,當呼叫不被它們" +"支援的操作時,可能會引發 :exc:`ValueError` (或 :exc:`UnsupportedOperation`)" +"例外。" #: ../../library/io.rst:329 msgid "" @@ -606,6 +610,8 @@ msgid "" "Note that calling any method (even inquiries) on a closed stream is " "undefined. Implementations may raise :exc:`ValueError` in this case." msgstr "" +"請注意,在一個已經關閉的串流上呼叫任何方法(即使只是查詢)都是未定義的。在這" +"種情況下,實作可能會引發 :exc:`ValueError` 例外。" #: ../../library/io.rst:336 msgid "" @@ -622,10 +628,12 @@ msgid "" "keyword:`with` statement. In this example, *file* is closed after the :" "keyword:`!with` statement's suite is finished---even if an exception occurs::" msgstr "" +":class:`IOBase` 也是個情境管理器,因此支援 :keyword:`with` 語句。在這個例子" +"中,*file* 會在 :keyword:`!with` 語句執行完畢後關閉——即使發生了異常。" #: ../../library/io.rst:349 msgid ":class:`IOBase` provides these data attributes and methods:" -msgstr "" +msgstr ":class:`IOBase` 提供這些資料屬性與方法:" #: ../../library/io.rst:353 msgid "" @@ -633,12 +641,14 @@ msgid "" "already closed. Once the file is closed, any operation on the file (e.g. " "reading or writing) will raise a :exc:`ValueError`." msgstr "" +"清除並關閉這個串流。若檔案已經關閉,則此方法沒有作用。一旦檔案被關閉,任何對" +"檔案的操作(例如讀取或寫入)將引發 :exc:`ValueError` 異常。" #: ../../library/io.rst:357 msgid "" "As a convenience, it is allowed to call this method more than once; only the " "first call, however, will have an effect." -msgstr "" +msgstr "為了方便起見,允許多次呼叫這個方法;然而,只有第一次呼叫會有效果。" #: ../../library/io.rst:362 msgid "``True`` if the stream is closed." From 74f2ee02e3f02b45dc0f76f88a10cae80e6d7d56 Mon Sep 17 00:00:00 2001 From: cschan <45995789+cschan1828@users.noreply.github.com> Date: Mon, 11 Dec 2023 02:22:47 +0800 Subject: [PATCH 2/3] Update library/io.po Co-authored-by: Wei-Hsiang (Matt) Wang --- library/io.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/io.po b/library/io.po index dbfc5774f9..5618ba0a78 100644 --- a/library/io.po +++ b/library/io.po @@ -593,7 +593,7 @@ msgid "" "raise a :exc:`ValueError` (or :exc:`UnsupportedOperation`) when operations " "they do not support are called." msgstr "" -"即使 :class:`IOBase` 因為實作的簽章差異巨大而沒有宣告 :meth:`!read` 或 :meth:" +"即使 :class:`IOBase` 因為實作的簽名差異巨大而沒有宣告 :meth:`!read` 或 :meth:" "`!write` 方法,實作與用戶端應把這些方法視為介面的一部份。此外,當呼叫不被它們" "支援的操作時,可能會引發 :exc:`ValueError` (或 :exc:`UnsupportedOperation`)" "例外。" From 9fd874e9d6fc0e3a65896703aac0255608d25616 Mon Sep 17 00:00:00 2001 From: cschan <45995789+cschan1828@users.noreply.github.com> Date: Mon, 11 Dec 2023 02:22:53 +0800 Subject: [PATCH 3/3] Update library/io.po Co-authored-by: Wei-Hsiang (Matt) Wang --- library/io.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/io.po b/library/io.po index 5618ba0a78..d8f43c3f63 100644 --- a/library/io.po +++ b/library/io.po @@ -628,8 +628,8 @@ msgid "" "keyword:`with` statement. In this example, *file* is closed after the :" "keyword:`!with` statement's suite is finished---even if an exception occurs::" msgstr "" -":class:`IOBase` 也是個情境管理器,因此支援 :keyword:`with` 語句。在這個例子" -"中,*file* 會在 :keyword:`!with` 語句執行完畢後關閉——即使發生了異常。" +":class:`IOBase` 也是個情境管理器,因此支援 :keyword:`with` 陳述式。在這個例子" +"中,*file* 會在 :keyword:`!with` 陳述式執行完畢後關閉——即使發生了異常。" #: ../../library/io.rst:349 msgid ":class:`IOBase` provides these data attributes and methods:"