From f0b8d94df57b3701c37d9b529efb3208496c1ab9 Mon Sep 17 00:00:00 2001 From: cschan <45995789+cschan1828@users.noreply.github.com> Date: Sun, 10 Mar 2024 17:04:26 +0800 Subject: [PATCH 1/9] Completed translation of class io.BufferedIOBase of library/io.po (#845) * Completed translation of class io.BufferedIOBase of library/io.po * Fix translation issues as per reviewer's suggestions --- library/io.po | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/library/io.po b/library/io.po index 7910d86d4a..229ca4a1c2 100644 --- a/library/io.po +++ b/library/io.po @@ -955,21 +955,25 @@ msgid "" "`BufferedIOBase` deals with. This is not part of the :class:" "`BufferedIOBase` API and may not exist on some implementations." msgstr "" +"底層的原始串流(一個 :class:`RawIOBase` 實例),:class:`BufferedIOBase` 處理" +"的對象。這不是 :class:`BufferedIOBase` API 的一部分,且在某些實作可能不存在。" #: ../../library/io.rst:552 msgid "Separate the underlying raw stream from the buffer and return it." -msgstr "" +msgstr "將底層的原始串流從緩衝區中分離出來,並回傳它。" #: ../../library/io.rst:554 msgid "" "After the raw stream has been detached, the buffer is in an unusable state." -msgstr "" +msgstr "在原始串流被分離後,緩衝區處於一個不可用的狀態。" #: ../../library/io.rst:557 msgid "" "Some buffers, like :class:`BytesIO`, do not have the concept of a single raw " "stream to return from this method. They raise :exc:`UnsupportedOperation`." msgstr "" +"某些緩衝區,如 :class:`BytesIO`,沒有單一原始串流的概念可從此方法回傳。它們會" +"引發 :exc:`UnsupportedOperation`。" #: ../../library/io.rst:565 msgid "" @@ -977,6 +981,9 @@ msgid "" "or negative, data is read and returned until EOF is reached. An empty :" "class:`bytes` object is returned if the stream is already at EOF." msgstr "" +"讀取並回傳最多 *size* 個位元組。如果引數被省略、為 ``None`` 或為負值,將讀取" +"並回傳資料直到達到 EOF 為止。如果串流已經處於 EOF,則回傳一個空的 :class:" +"`bytes` 物件。" #: ../../library/io.rst:569 msgid "" @@ -986,12 +993,17 @@ msgid "" "raw read will be issued, and a short result does not imply that EOF is " "imminent." msgstr "" +"如果引數為正數,且底層原始串流不是互動式的,可能會發出多次原始讀取來滿足位元" +"組數量(除非首先達到 EOF)。但對於互動式原始串流,最多只會發出一次原始讀取," +"且短少的資料不表示 EOF 即將到來。" #: ../../library/io.rst:575 ../../library/io.rst:598 ../../library/io.rst:608 msgid "" "A :exc:`BlockingIOError` is raised if the underlying raw stream is in non " "blocking-mode, and has no data available at the moment." msgstr "" +"如果底層原始串流處於非阻塞模式,且當前沒有可用資料,則會引發 :exc:" +"`BlockingIOError`。" #: ../../library/io.rst:580 msgid "" @@ -1000,12 +1012,17 @@ msgid "" "method. This can be useful if you are implementing your own buffering on " "top of a :class:`BufferedIOBase` object." msgstr "" +"讀取並回傳最多 *size* 個位元組,最多呼叫一次底層原始串流的 :meth:`~RawIOBase." +"read` (或 :meth:`~RawIOBase.readinto`) 方法。如果你正在 :class:" +"`BufferedIOBase` 物件之上實作自己的緩衝區,這可能會很有用。" #: ../../library/io.rst:586 msgid "" "If *size* is ``-1`` (the default), an arbitrary number of bytes are returned " "(more than zero unless EOF is reached)." msgstr "" +"如果 *size* 為 ``-1`` (預設值),則會回傳任意數量的位元組(除非達到 EOF,否" +"則會超過零)。" #: ../../library/io.rst:591 msgid "" @@ -1013,12 +1030,16 @@ msgid "" "return the number of bytes read. For example, *b* might be a :class:" "`bytearray`." msgstr "" +"讀取位元組到一個預先分配的、可寫的 :term:`bytes-like object` *b* 當中,並回傳" +"讀取的位元組數量。例如,*b* 可能是一個 :class:`bytearray`。" #: ../../library/io.rst:595 msgid "" "Like :meth:`read`, multiple reads may be issued to the underlying raw " "stream, unless the latter is interactive." msgstr "" +"類似於 :meth:`read`,除非後者是互動式的,否則可能會對底層原始串流發出多次讀" +"取。" #: ../../library/io.rst:603 msgid "" @@ -1027,6 +1048,9 @@ msgid "" "read` (or :meth:`~RawIOBase.readinto`) method. Return the number of bytes " "read." msgstr "" +"讀取位元組到一個預先分配的、可寫的 :term:`bytes-like object` *b* 中,最多呼叫" +"一次底層原始串流的 :meth:`~RawIOBase.read` (或 :meth:`~RawIOBase.readinto`)" +"方法。此方法回傳讀取的位元組數量。" #: ../../library/io.rst:615 msgid "" @@ -1036,6 +1060,10 @@ msgid "" "implementation, these bytes may be readily written to the underlying stream, " "or held in a buffer for performance and latency reasons." msgstr "" +"寫入給定的 :term:`bytes-like object`,*b*,並回傳寫入的位元組數量(總是等於 " +"*b* 的長度,以位元組計,因為如果寫入失敗將會引發 :exc:`OSError`)。根據實際的" +"實作,這些位元組可能會立即寫入底層串流,或出於性能和延遲的緣故而被留在緩衝區" +"當中。" #: ../../library/io.rst:622 msgid "" @@ -1043,12 +1071,16 @@ msgid "" "needed to be written to the raw stream but it couldn't accept all the data " "without blocking." msgstr "" +"當處於非阻塞模式時,如果需要將資料寫入原始串流,但它無法接受所有資料而不阻" +"塞,則會引發 :exc:`BlockingIOError`。" #: ../../library/io.rst:626 msgid "" "The caller may release or mutate *b* after this method returns, so the " "implementation should only access *b* during the method call." msgstr "" +"呼叫者可以在此方法回傳後釋放或變更 *b*,因此實作應該僅在方法呼叫期間存取 " +"*b*。" #: ../../library/io.rst:631 msgid "Raw File I/O" From ff1610de8f62dc7c6fc01124bab46063236889c1 Mon Sep 17 00:00:00 2001 From: JoycePan <81307247+wdbps93206@users.noreply.github.com> Date: Sun, 10 Mar 2024 16:19:10 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20library/logging.rst:53?= =?UTF-8?q?=20(#839)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 更新 library/logging.rst:53 * 修正library/logging.rst:53翻譯內容,格式化改為格式器 --- library/logging.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/logging.po b/library/logging.po index 7f58f336e4..45b7a1be5e 100644 --- a/library/logging.po +++ b/library/logging.po @@ -99,7 +99,7 @@ msgstr "" #: ../../library/logging.rst:53 msgid "Formatters specify the layout of log records in the final output." -msgstr "" +msgstr "格式器指定日誌記錄在最終輸出中的佈局。" #: ../../library/logging.rst:59 msgid "Logger Objects" From 240a91333294578d6f06394cc8c516bf1f961f69 Mon Sep 17 00:00:00 2001 From: Kyo Huang Date: Sun, 10 Mar 2024 21:32:00 +0800 Subject: [PATCH 3/9] Update logging.po with translated text (#844) * feat: update logging.po with translated text * Fix translation in logging constructor * Update library/logging.po change word Co-authored-by: Wei-Hsiang (Matt) Wang --------- Co-authored-by: Wei-Hsiang (Matt) Wang --- library/logging.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/logging.po b/library/logging.po index 45b7a1be5e..6e45cdb7e3 100644 --- a/library/logging.po +++ b/library/logging.po @@ -157,7 +157,7 @@ msgstr "" #: ../../library/logging.rst:100 msgid "The constructor sets this attribute to ``True``." -msgstr "" +msgstr "此建構函式將該屬性設為 ``True``。" #: ../../library/logging.rst:102 msgid "" From f8f2753c3c46a3a125f9ed61ea7b3c3275c9c155 Mon Sep 17 00:00:00 2001 From: Jimmy Ma Date: Sun, 10 Mar 2024 21:34:25 +0800 Subject: [PATCH 4/9] add i18n for logging (#847) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add i18n for logging * update 。 reviewer suggection for logging --- library/logging.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/logging.po b/library/logging.po index 6e45cdb7e3..a6c747a3b0 100644 --- a/library/logging.po +++ b/library/logging.po @@ -1139,7 +1139,7 @@ msgstr "" #: ../../library/logging.rst:917 ../../library/logging.rst:931 #: ../../library/logging.rst:959 ../../library/logging.rst:977 msgid "You shouldn't need to format this yourself." -msgstr "" +msgstr "你不需要自己格式化它。" #: ../../library/logging.rst:917 msgid "" @@ -1189,7 +1189,7 @@ msgstr "" #: ../../library/logging.rst:934 msgid "filename" -msgstr "" +msgstr "filename" #: ../../library/logging.rst:934 msgid "``%(filename)s``" @@ -1303,7 +1303,7 @@ msgstr "" #: ../../library/logging.rst:0 ../../library/logging.rst:964 msgid "name" -msgstr "" +msgstr "name" #: ../../library/logging.rst:964 msgid "``%(name)s``" From 7e530e142a65cf758df87c2b04a24aa6d2dd18ea Mon Sep 17 00:00:00 2001 From: "Wei-Chun, Chang" Date: Sun, 10 Mar 2024 21:35:05 +0800 Subject: [PATCH 5/9] Translate library/logging.rst:118 (#848) --- library/logging.po | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/logging.po b/library/logging.po index a6c747a3b0..3edfd943e3 100644 --- a/library/logging.po +++ b/library/logging.po @@ -187,6 +187,9 @@ msgid "" "delegation to the parent when the logger is a non-root logger). Note that " "the root logger is created with level :const:`WARNING`." msgstr "" +"當一個日誌記錄器被建立時,記錄等級會被設定成 :const:`NOTSET` (當此日誌記錄器" +"是根日誌記錄器,或是代表父日誌記錄器的非根日誌記錄器時,會使所有訊息被處" +"理)。請注意根日誌記錄器會以記錄等級 :const:`WARNING` 被建立。" #: ../../library/logging.rst:123 msgid "" From 0fe5e8a4b8fafc4d90b7923334d1845fbe616987 Mon Sep 17 00:00:00 2001 From: RockLeon <34214497+rockleona@users.noreply.github.com> Date: Sun, 10 Mar 2024 22:17:10 +0800 Subject: [PATCH 6/9] feat: logging translation update (#843) --- library/logging.po | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/library/logging.po b/library/logging.po index 3edfd943e3..798a7213d7 100644 --- a/library/logging.po +++ b/library/logging.po @@ -9,8 +9,8 @@ msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-02-02 00:03+0000\n" -"PO-Revision-Date: 2023-08-20 16:49+0800\n" -"Last-Translator: Adrian Liaw \n" +"PO-Revision-Date: 2024-03-10 15:10+0800\n" +"Last-Translator: rockleon \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" "Language: zh_TW\n" @@ -18,7 +18,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/logging.rst:2 msgid ":mod:`logging` --- Logging facility for Python" @@ -66,7 +66,7 @@ msgstr "" #: ../../library/logging.rst:33 msgid "The simplest example:" -msgstr "" +msgstr "最簡單的示範:" #: ../../library/logging.rst:41 msgid "" @@ -74,6 +74,8 @@ msgid "" "unfamiliar with logging, the best way to get to grips with it is to view the " "tutorials (**see the links above and on the right**)." msgstr "" +"這個模組提供了很多的功能性以及彈性。如果你對於 logging 不熟悉,熟悉他最好的方" +"法就是去看教學(**請看右上方的連結**)。" #: ../../library/logging.rst:45 msgid "" From 4074d473bda42023e56313248358cab3afd0c260 Mon Sep 17 00:00:00 2001 From: marychiou Date: Sun, 10 Mar 2024 18:50:31 +0800 Subject: [PATCH 7/9] Working on string. --- library/string.po | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/library/string.po b/library/string.po index e54e7c8a8d..ec4c552c39 100644 --- a/library/string.po +++ b/library/string.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-07-17 17:39+0800\n" -"PO-Revision-Date: 2023-12-06 11:46+0800\n" +"PO-Revision-Date: 2024-03-10 15:57+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -17,7 +17,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.4.1\n" +"X-Generator: Poedit 3.4.2\n" #: ../../library/string.rst:2 msgid ":mod:`string` --- Common string operations" @@ -118,6 +118,10 @@ msgid "" "behaviors using the same implementation as the built-in :meth:`~str.format` " "method." msgstr "" +"透過 :pep:`3101` 中描述的 :meth:`~str.format` 方法,內建字串類別提供了進行複" +"雜變數替換和數值格式化的能力。 :mod:`string` 模組中的 :class:`Formatter` 類別" +"模組可讓你使用與內建 :meth:`~str.format` 方法相同的實作來建立和自訂你自己的字" +"串格式化行為。" #: ../../library/string.rst:90 msgid "The :class:`Formatter` class has the following public methods:" @@ -136,7 +140,7 @@ msgstr "" msgid "" "A format string argument is now :ref:`positional-only `." -msgstr "" +msgstr "現在格式字串引數是 :ref:`positional-only `。" #: ../../library/string.rst:104 msgid "" From e08524a74ead3adf97788dbea698449485d06793 Mon Sep 17 00:00:00 2001 From: marychiou <50230427+marychiou@users.noreply.github.com> Date: Mon, 11 Mar 2024 00:30:46 +0800 Subject: [PATCH 8/9] Update library/string.po MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 中文標點符號 與 特殊符號 中間不用增加空格 Co-authored-by: RockLeon <34214497+rockleona@users.noreply.github.com> --- library/string.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/string.po b/library/string.po index ec4c552c39..285a1f7004 100644 --- a/library/string.po +++ b/library/string.po @@ -119,7 +119,7 @@ msgid "" "method." msgstr "" "透過 :pep:`3101` 中描述的 :meth:`~str.format` 方法,內建字串類別提供了進行複" -"雜變數替換和數值格式化的能力。 :mod:`string` 模組中的 :class:`Formatter` 類別" +"雜變數替換和數值格式化的能力。:mod:`string` 模組中的 :class:`Formatter` 類別" "模組可讓你使用與內建 :meth:`~str.format` 方法相同的實作來建立和自訂你自己的字" "串格式化行為。" From b2a0ad232e16c102a874464f67da3c99ca796ea3 Mon Sep 17 00:00:00 2001 From: marychiou <50230427+marychiou@users.noreply.github.com> Date: Mon, 11 Mar 2024 00:33:52 +0800 Subject: [PATCH 9/9] Update library/string.po MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻譯positional-only Co-authored-by: RockLeon <34214497+rockleona@users.noreply.github.com> --- library/string.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/string.po b/library/string.po index 285a1f7004..c62932fb30 100644 --- a/library/string.po +++ b/library/string.po @@ -140,7 +140,7 @@ msgstr "" msgid "" "A format string argument is now :ref:`positional-only `." -msgstr "現在格式字串引數是 :ref:`positional-only `。" +msgstr "現在格式字串引數是\\ :ref:`僅限位置參數 `。" #: ../../library/string.rst:104 msgid ""