From e58ccf2add7cc98c0b9f0041e3b2e625fb94ee8e Mon Sep 17 00:00:00 2001 From: cschan <45995789+cschan1828@users.noreply.github.com> Date: Wed, 22 Nov 2023 00:54:02 +0800 Subject: [PATCH 1/2] Add more translations of library/io --- library/io.po | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/library/io.po b/library/io.po index fba54e7c27..29556da878 100644 --- a/library/io.po +++ b/library/io.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-08-30 00:04+0000\n" -"PO-Revision-Date: 2023-08-01 12:20+0800\n" +"PO-Revision-Date: 2023-11-22 00:45+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -16,7 +16,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.3.2\n" +"X-Generator: Poedit 3.4.1\n" #: ../../library/io.rst:2 msgid ":mod:`io` --- Core tools for working with streams" @@ -328,6 +328,10 @@ msgid "" "same as ``open(path, 'rb')``. Overriding the behavior is intended for " "additional validation or preprocessing of the file." msgstr "" +"這個函式的行為可能會被之前對 :c:func:`PyFile_SetOpenCodeHook` 的呼叫覆寫。然" +"而,假設 *path* 是個 :class:`str` 且為絕對路徑,則 ``open_code(path)`` 總是" +"與 ``open(path, 'rb')`` 有相同行為。覆寫這個行為是為了對檔案進行額外驗證或預" +"處理。" #: ../../library/io.rst:200 msgid "" @@ -343,6 +347,8 @@ msgid "" "returns ``\"locale\"`` or ``\"utf-8\"`` depending on :ref:`UTF-8 Mode `." msgstr "" +"若 *encoding* 不為 ``None``,此函式將回傳 *encoding*。否則,將根據 :ref:" +"`UTF-8 Mode ` 回傳 ``\"locale\"`` 或 ``\"utf-8\"``。" #: ../../library/io.rst:207 msgid "" @@ -350,6 +356,11 @@ msgid "" "warn_default_encoding ` is true and *encoding* is ``None``. " "*stacklevel* specifies where the warning is emitted. For example::" msgstr "" +"若 :data:`sys.flags.warn_default_encoding ` 為真,且 *encoding* " +"為 ``None``,此函式會發出一個 :class:`EncodingWarning`。*stacklevel* 指定警告" +"在哪層發出。範例:\n" +"\n" +"::" #: ../../library/io.rst:217 msgid "" From 0dd2efe0ef02539a15c66e4ef29a3ffe66260162 Mon Sep 17 00:00:00 2001 From: cschan <45995789+cschan1828@users.noreply.github.com> Date: Wed, 22 Nov 2023 15:50:47 +0800 Subject: [PATCH 2/2] Update library/io.po Co-authored-by: Wei-Hsiang (Matt) Wang --- library/io.po | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/library/io.po b/library/io.po index 29556da878..10bc84371b 100644 --- a/library/io.po +++ b/library/io.po @@ -358,9 +358,7 @@ msgid "" msgstr "" "若 :data:`sys.flags.warn_default_encoding ` 為真,且 *encoding* " "為 ``None``,此函式會發出一個 :class:`EncodingWarning`。*stacklevel* 指定警告" -"在哪層發出。範例:\n" -"\n" -"::" +"在哪層發出。範例: ::" #: ../../library/io.rst:217 msgid ""