From 5bb1799d68c120b44a91e2712051b2aec85994e5 Mon Sep 17 00:00:00 2001 From: lamentxu <1372449351@qq.com> Date: Fri, 11 Jul 2025 00:02:19 +0800 Subject: [PATCH 01/11] translate `library/xml.sax.utils.po` --- library/xml.sax.utils.po | 58 +++++++++++++++++++++++++++++++--------- 1 file changed, 45 insertions(+), 13 deletions(-) diff --git a/library/xml.sax.utils.po b/library/xml.sax.utils.po index 12044fcbee..2dd1fea56d 100644 --- a/library/xml.sax.utils.po +++ b/library/xml.sax.utils.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-09-01 22:24+0800\n" -"PO-Revision-Date: 2018-05-23 16:16+0000\n" +"PO-Revision-Date: 2025-07-10 23:59+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -17,6 +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.6\n" #: ../../library/xml.sax.utils.rst:2 msgid ":mod:`!xml.sax.saxutils` --- SAX Utilities" @@ -32,10 +33,12 @@ msgid "" "functions that are commonly useful when creating SAX applications, either in " "direct use, or as base classes." msgstr "" +"模組 :mod:`xml.sax.saxutils` 包含了許多在建立 SAX 應用程式時非常有用的類別和" +"函式,這些類別和函式可以直接使用,也可以作為基礎類別。" #: ../../library/xml.sax.utils.rst:21 msgid "Escape ``'&'``, ``'<'``, and ``'>'`` in a string of data." -msgstr "" +msgstr "在資料字串中轉義 ``'&'``、``'<「`` 及 ``」>'``。" #: ../../library/xml.sax.utils.rst:23 msgid "" @@ -44,6 +47,9 @@ msgid "" "will be replaced with its corresponding value. The characters ``'&'``, " "``'<'`` and ``'>'`` are always escaped, even if *entities* is provided." msgstr "" +"您可以透過傳入字典作為可選的 *entities* 參數,來轉換其他資料字串。 鍵和值都必" +"須是字串;每個鍵都會被對應的值取代。 即使提供 *entities*,``'&'``、``'<「`` " +"和 ``」>'``字元始終會被轉義。" #: ../../library/xml.sax.utils.rst:30 msgid "" @@ -51,10 +57,12 @@ msgid "" "directly in XML. Do not use this function as a general string translation " "function." msgstr "" +"這個函式只能用來轉換 XML 中無法直接使用的字元。 請勿將此函式用作一般的字串轉" +"換函式。" #: ../../library/xml.sax.utils.rst:36 msgid "Unescape ``'&'``, ``'<'``, and ``'>'`` in a string of data." -msgstr "" +msgstr "取消轉義資料字串中的``'&'``、``'<’``和``‘>'``。" #: ../../library/xml.sax.utils.rst:38 msgid "" @@ -64,6 +72,9 @@ msgid "" "``'<'``, and ``'>'`` are always unescaped, even if *entities* is " "provided." msgstr "" +"您可以透過傳入字典作為可選的 *entities* 參數,來取消其他字串的資料。 鍵和值都" +"必須是字串;每個鍵都會被對應的值取代。 即使提供了 *entities*,``'&'``、" +"``'<’`` 和 ``‘>'`` 總是會取消轉換。" #: ../../library/xml.sax.utils.rst:46 msgid "" @@ -76,6 +87,10 @@ msgid "" "*data* will be wrapped in double-quotes. The resulting string can be used " "directly as an attribute value::" msgstr "" +"類似於 :func:`escape`,但也準備 *data* 作為屬性值。:func:`quoteattr` 會根據 " +"*data* 的內容選擇引號字元,嘗試避免在字串中編碼任何引號字元。如果 *data* 中已" +"經有單引號和雙引號字元,雙引號字元將被編碼,而 *data* 將被雙引號包覆。結果字" +"串可直接用作屬性值:" #: ../../library/xml.sax.utils.rst:55 msgid "" @@ -89,13 +104,13 @@ msgstr "" msgid "" "This function is useful when generating attribute values for HTML or any " "SGML using the reference concrete syntax." -msgstr "" +msgstr "當使用參考具體語法為 HTML 或任何 SGML 產生屬性值時,此功能非常有用。" #: ../../library/xml.sax.utils.rst:64 msgid "" "This class implements the :class:`~xml.sax.handler.ContentHandler` interface " -"by writing SAX events back into an XML document. In other words, using an :" -"class:`XMLGenerator` as the content handler will reproduce the original " +"by writing SAX events back into an XML document. In other words, using " +"an :class:`XMLGenerator` as the content handler will reproduce the original " "document being parsed. *out* should be a file-like object which will default " "to *sys.stdout*. *encoding* is the encoding of the output stream which " "defaults to ``'iso-8859-1'``. *short_empty_elements* controls the formatting " @@ -103,6 +118,13 @@ msgid "" "emitted as a pair of start/end tags, if set to ``True`` they are emitted as " "a single self-closed tag." msgstr "" +"這個類別透過將 SAX 事件寫回 XML 文件來實" +"作 :class:`~xml.sax.handler.ContentHandler` 介面。 換句話說,使" +"用 :class:`XMLGenerator` 作為內容處理器將會重現被解析的原始文件。 *out* 應該" +"是類似檔案的物件,預設為 *sys.stdout*。*encoding* 是輸出串流的編碼,預設為" +"``'iso-8859-1'``。*short_empty_elements* 控制不包含內容的元素的格式:如果設" +"定為 ``False``(預設值),它們會以一對 start/end 標籤的形式輸出;如果設定為 " +"``True``,它們會以單一自封標籤的形式輸出。" #: ../../library/xml.sax.utils.rst:74 msgid "Added the *short_empty_elements* parameter." @@ -110,12 +132,17 @@ msgstr "新增 *short_empty_elements* 參數。" #: ../../library/xml.sax.utils.rst:80 msgid "" -"This class is designed to sit between an :class:`~xml.sax.xmlreader." -"XMLReader` and the client application's event handlers. By default, it does " -"nothing but pass requests up to the reader and events on to the handlers " -"unmodified, but subclasses can override specific methods to modify the event " -"stream or the configuration requests as they pass through." +"This class is designed to sit between " +"an :class:`~xml.sax.xmlreader.XMLReader` and the client application's event " +"handlers. By default, it does nothing but pass requests up to the reader " +"and events on to the handlers unmodified, but subclasses can override " +"specific methods to modify the event stream or the configuration requests as " +"they pass through." msgstr "" +"這個類別的設計是在 :class:`~xml.sax.xmlreader.XMLReader` 與用戶端應用程式的事" +"件處理程式之間。 預設情況下,它什麼都不做,只是將要求傳送到閱讀器,並將事件未" +"經修改地傳送到處理程式,但子類可以覆寫特定的方法,以修改事件串流或配置要求," +"因為它們通過。" #: ../../library/xml.sax.utils.rst:90 msgid "" @@ -123,6 +150,11 @@ msgid "" "fully resolved :class:`~xml.sax.xmlreader.InputSource` object ready for " "reading. The input source can be given as a string, a file-like object, or " "an :class:`~xml.sax.xmlreader.InputSource` object; parsers will use this " -"function to implement the polymorphic *source* argument to their :meth:`~xml." -"sax.xmlreader.XMLReader.parse` method." +"function to implement the polymorphic *source* argument to " +"their :meth:`~xml.sax.xmlreader.XMLReader.parse` method." msgstr "" +"這個函式接收一個輸入來源和一個可選的基本 URL,並傳回一個完全解析" +"的 :class:`~xml.sax.xmlreader.InputSource` 物件,以準備讀取。輸入來源可以是字" +"串、類檔物件或 :class:`~xml.sax.xmlreader.InputSource` 物件;解析器會使用這個" +"函式來實作它們的 :meth:`~xml.sax.xmlreader.XMLReader.parse` 方法的多態 " +"*source* 參數。" From e9c9599f8e91ba6ded0aa9bd80098eda73be014e Mon Sep 17 00:00:00 2001 From: lamentxu <1372449351@qq.com> Date: Fri, 11 Jul 2025 00:02:55 +0800 Subject: [PATCH 02/11] Update xml.sax.utils.po --- library/xml.sax.utils.po | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/xml.sax.utils.po b/library/xml.sax.utils.po index 2dd1fea56d..b660c6a5ba 100644 --- a/library/xml.sax.utils.po +++ b/library/xml.sax.utils.po @@ -3,13 +3,14 @@ # This file is distributed under the same license as the Python package. # # Translators: +# Weilin Du, 2025 msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-09-01 22:24+0800\n" "PO-Revision-Date: 2025-07-10 23:59+0800\n" -"Last-Translator: Adrian Liaw \n" +"Last-Translator: Weilin Du <1372449351@qq.com>\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" "Language: zh_TW\n" From b34de240132ba5010a13489546a917c9aeaca3dc Mon Sep 17 00:00:00 2001 From: lamentxu <1372449351@qq.com> Date: Fri, 11 Jul 2025 00:06:36 +0800 Subject: [PATCH 03/11] Update xml.sax.utils.po --- library/xml.sax.utils.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/xml.sax.utils.po b/library/xml.sax.utils.po index b660c6a5ba..26007a3d32 100644 --- a/library/xml.sax.utils.po +++ b/library/xml.sax.utils.po @@ -39,7 +39,7 @@ msgstr "" #: ../../library/xml.sax.utils.rst:21 msgid "Escape ``'&'``, ``'<'``, and ``'>'`` in a string of data." -msgstr "在資料字串中轉義 ``'&'``、``'<「`` 及 ``」>'``。" +msgstr "在資料字串中轉義 ``'&'``、``'<'`` 及 ``'>'``。" #: ../../library/xml.sax.utils.rst:23 msgid "" @@ -49,8 +49,8 @@ msgid "" "``'<'`` and ``'>'`` are always escaped, even if *entities* is provided." msgstr "" "您可以透過傳入字典作為可選的 *entities* 參數,來轉換其他資料字串。 鍵和值都必" -"須是字串;每個鍵都會被對應的值取代。 即使提供 *entities*,``'&'``、``'<「`` " -"和 ``」>'``字元始終會被轉義。" +"須是字串;每個鍵都會被對應的值取代。 即使提供 *entities*,``'&'``、``'<'`` " +"和 ``'>'``字元始終會被轉義。" #: ../../library/xml.sax.utils.rst:30 msgid "" From 9ca97a92ba4f671d3c9fe8131801735f5b81c30e Mon Sep 17 00:00:00 2001 From: lamentxu <1372449351@qq.com> Date: Fri, 11 Jul 2025 00:06:36 +0800 Subject: [PATCH 04/11] Update xml.sax.utils.po --- library/xml.sax.utils.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/xml.sax.utils.po b/library/xml.sax.utils.po index b660c6a5ba..26007a3d32 100644 --- a/library/xml.sax.utils.po +++ b/library/xml.sax.utils.po @@ -39,7 +39,7 @@ msgstr "" #: ../../library/xml.sax.utils.rst:21 msgid "Escape ``'&'``, ``'<'``, and ``'>'`` in a string of data." -msgstr "在資料字串中轉義 ``'&'``、``'<「`` 及 ``」>'``。" +msgstr "在資料字串中轉義 ``'&'``、``'<'`` 及 ``'>'``。" #: ../../library/xml.sax.utils.rst:23 msgid "" @@ -49,8 +49,8 @@ msgid "" "``'<'`` and ``'>'`` are always escaped, even if *entities* is provided." msgstr "" "您可以透過傳入字典作為可選的 *entities* 參數,來轉換其他資料字串。 鍵和值都必" -"須是字串;每個鍵都會被對應的值取代。 即使提供 *entities*,``'&'``、``'<「`` " -"和 ``」>'``字元始終會被轉義。" +"須是字串;每個鍵都會被對應的值取代。 即使提供 *entities*,``'&'``、``'<'`` " +"和 ``'>'``字元始終會被轉義。" #: ../../library/xml.sax.utils.rst:30 msgid "" From 95694a68db7152b7e908d17340a9ef02965777f4 Mon Sep 17 00:00:00 2001 From: lamentxu <1372449351@qq.com> Date: Fri, 11 Jul 2025 00:12:31 +0800 Subject: [PATCH 05/11] Update xml.sax.utils.po --- library/xml.sax.utils.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/xml.sax.utils.po b/library/xml.sax.utils.po index 26007a3d32..028acc339a 100644 --- a/library/xml.sax.utils.po +++ b/library/xml.sax.utils.po @@ -50,7 +50,7 @@ msgid "" msgstr "" "您可以透過傳入字典作為可選的 *entities* 參數,來轉換其他資料字串。 鍵和值都必" "須是字串;每個鍵都會被對應的值取代。 即使提供 *entities*,``'&'``、``'<'`` " -"和 ``'>'``字元始終會被轉義。" +"和 ``'>'`` 字元始終會被轉義。" #: ../../library/xml.sax.utils.rst:30 msgid "" @@ -63,7 +63,7 @@ msgstr "" #: ../../library/xml.sax.utils.rst:36 msgid "Unescape ``'&'``, ``'<'``, and ``'>'`` in a string of data." -msgstr "取消轉義資料字串中的``'&'``、``'<’``和``‘>'``。" +msgstr "取消轉義資料字串中的 ``'&'``、``'<'`` 和 ``'>'``。" #: ../../library/xml.sax.utils.rst:38 msgid "" From 1284bfd332140ceeb93785f6d25c4c781903fc72 Mon Sep 17 00:00:00 2001 From: Weilin Du <108666168+LamentXU123@users.noreply.github.com> Date: Fri, 11 Jul 2025 10:34:30 +0800 Subject: [PATCH 06/11] Apply suggestions from code review Co-authored-by: W. H. Wang --- library/xml.sax.utils.po | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/library/xml.sax.utils.po b/library/xml.sax.utils.po index 028acc339a..148cd157fd 100644 --- a/library/xml.sax.utils.po +++ b/library/xml.sax.utils.po @@ -35,7 +35,7 @@ msgid "" "direct use, or as base classes." msgstr "" "模組 :mod:`xml.sax.saxutils` 包含了許多在建立 SAX 應用程式時非常有用的類別和" -"函式,這些類別和函式可以直接使用,也可以作為基礎類別。" +"函式,這些類別和函式可以直接使用,也可以作為基底類別。" #: ../../library/xml.sax.utils.rst:21 msgid "Escape ``'&'``, ``'<'``, and ``'>'`` in a string of data." @@ -48,7 +48,7 @@ msgid "" "will be replaced with its corresponding value. The characters ``'&'``, " "``'<'`` and ``'>'`` are always escaped, even if *entities* is provided." msgstr "" -"您可以透過傳入字典作為可選的 *entities* 參數,來轉換其他資料字串。 鍵和值都必" +"你可以透過傳入字典作為可選的 *entities* 參數,來轉換其他資料字串。 鍵和值都必" "須是字串;每個鍵都會被對應的值取代。 即使提供 *entities*,``'&'``、``'<'`` " "和 ``'>'`` 字元始終會被轉義。" @@ -73,7 +73,7 @@ msgid "" "``'<'``, and ``'>'`` are always unescaped, even if *entities* is " "provided." msgstr "" -"您可以透過傳入字典作為可選的 *entities* 參數,來取消其他字串的資料。 鍵和值都" +"你可以透過傳入字典作為可選的 *entities* 參數,來取消其他字串的資料。 鍵和值都" "必須是字串;每個鍵都會被對應的值取代。 即使提供了 *entities*,``'&'``、" "``'<’`` 和 ``‘>'`` 總是會取消轉換。" @@ -121,10 +121,10 @@ msgid "" msgstr "" "這個類別透過將 SAX 事件寫回 XML 文件來實" "作 :class:`~xml.sax.handler.ContentHandler` 介面。 換句話說,使" -"用 :class:`XMLGenerator` 作為內容處理器將會重現被解析的原始文件。 *out* 應該" -"是類似檔案的物件,預設為 *sys.stdout*。*encoding* 是輸出串流的編碼,預設為" +"用 :class:`XMLGenerator` 作為內容處理器將會重現被剖析的原始文件。 *out* 應該" +"是類檔案物件,預設為 *sys.stdout*。*encoding* 是輸出串流的編碼,預設為" "``'iso-8859-1'``。*short_empty_elements* 控制不包含內容的元素的格式:如果設" -"定為 ``False``(預設值),它們會以一對 start/end 標籤的形式輸出;如果設定為 " +"定為 ``False``\\ (預設值),它們會以一對 start/end 標籤的形式輸出;如果設定為 " "``True``,它們會以單一自封標籤的形式輸出。" #: ../../library/xml.sax.utils.rst:74 @@ -142,7 +142,7 @@ msgid "" msgstr "" "這個類別的設計是在 :class:`~xml.sax.xmlreader.XMLReader` 與用戶端應用程式的事" "件處理程式之間。 預設情況下,它什麼都不做,只是將要求傳送到閱讀器,並將事件未" -"經修改地傳送到處理程式,但子類可以覆寫特定的方法,以修改事件串流或配置要求," +"經修改地傳送到處理程式,但子類別可以覆寫特定的方法,以修改事件串流或配置請求," "因為它們通過。" #: ../../library/xml.sax.utils.rst:90 @@ -154,8 +154,8 @@ msgid "" "function to implement the polymorphic *source* argument to " "their :meth:`~xml.sax.xmlreader.XMLReader.parse` method." msgstr "" -"這個函式接收一個輸入來源和一個可選的基本 URL,並傳回一個完全解析" +"這個函式接收一個輸入來源和一個可選的基底 URL,並回傳一個完全解析" "的 :class:`~xml.sax.xmlreader.InputSource` 物件,以準備讀取。輸入來源可以是字" -"串、類檔物件或 :class:`~xml.sax.xmlreader.InputSource` 物件;解析器會使用這個" -"函式來實作它們的 :meth:`~xml.sax.xmlreader.XMLReader.parse` 方法的多態 " -"*source* 參數。" +"串、類檔案物件或 :class:`~xml.sax.xmlreader.InputSource` 物件;剖析器會使用這個" +"函式來實作它們的 :meth:`~xml.sax.xmlreader.XMLReader.parse` 方法的多型 " +"*source* 引數。" From 3f3b819c3379079695b7c2fcc1202c1d3deb5de5 Mon Sep 17 00:00:00 2001 From: Weilin Du <108666168+LamentXU123@users.noreply.github.com> Date: Fri, 11 Jul 2025 10:35:16 +0800 Subject: [PATCH 07/11] Update xml.sax.utils.po --- library/xml.sax.utils.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/xml.sax.utils.po b/library/xml.sax.utils.po index 148cd157fd..2c8c899c30 100644 --- a/library/xml.sax.utils.po +++ b/library/xml.sax.utils.po @@ -125,7 +125,7 @@ msgstr "" "是類檔案物件,預設為 *sys.stdout*。*encoding* 是輸出串流的編碼,預設為" "``'iso-8859-1'``。*short_empty_elements* 控制不包含內容的元素的格式:如果設" "定為 ``False``\\ (預設值),它們會以一對 start/end 標籤的形式輸出;如果設定為 " -"``True``,它們會以單一自封標籤的形式輸出。" +"``True``,它們會以單一自封(self-closed)標籤的形式輸出。" #: ../../library/xml.sax.utils.rst:74 msgid "Added the *short_empty_elements* parameter." From cbd995bcd0e0b4b8274ac304e22c28c51f6c00d6 Mon Sep 17 00:00:00 2001 From: Weilin Du <108666168+LamentXU123@users.noreply.github.com> Date: Fri, 11 Jul 2025 13:35:22 +0800 Subject: [PATCH 08/11] Update xml.sax.utils.po --- library/xml.sax.utils.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/xml.sax.utils.po b/library/xml.sax.utils.po index 2c8c899c30..69d2d90020 100644 --- a/library/xml.sax.utils.po +++ b/library/xml.sax.utils.po @@ -124,7 +124,7 @@ msgstr "" "用 :class:`XMLGenerator` 作為內容處理器將會重現被剖析的原始文件。 *out* 應該" "是類檔案物件,預設為 *sys.stdout*。*encoding* 是輸出串流的編碼,預設為" "``'iso-8859-1'``。*short_empty_elements* 控制不包含內容的元素的格式:如果設" -"定為 ``False``\\ (預設值),它們會以一對 start/end 標籤的形式輸出;如果設定為 " +"定為 ``False``\\ (預設值),它們會以一對開始/結束(start/end)標籤的形式輸出;如果設定為 " "``True``,它們會以單一自封(self-closed)標籤的形式輸出。" #: ../../library/xml.sax.utils.rst:74 From 6167b93538156e98246debe176f03d03bb8a1e76 Mon Sep 17 00:00:00 2001 From: Weilin Du <108666168+LamentXU123@users.noreply.github.com> Date: Fri, 11 Jul 2025 13:39:35 +0800 Subject: [PATCH 09/11] Update xml.sax.utils.po --- library/xml.sax.utils.po | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/library/xml.sax.utils.po b/library/xml.sax.utils.po index 69d2d90020..a0e1458648 100644 --- a/library/xml.sax.utils.po +++ b/library/xml.sax.utils.po @@ -48,8 +48,8 @@ msgid "" "will be replaced with its corresponding value. The characters ``'&'``, " "``'<'`` and ``'>'`` are always escaped, even if *entities* is provided." msgstr "" -"你可以透過傳入字典作為可選的 *entities* 參數,來轉換其他資料字串。 鍵和值都必" -"須是字串;每個鍵都會被對應的值取代。 即使提供 *entities*,``'&'``、``'<'`` " +"你可以透過傳入字典作為可選的 *entities* 參數,來轉換其他資料字串。鍵和值都必" +"須是字串;每個鍵都會被對應的值取代。即使提供 *entities*,``'&'``、``'<'`` " "和 ``'>'`` 字元始終會被轉義。" #: ../../library/xml.sax.utils.rst:30 @@ -58,7 +58,7 @@ msgid "" "directly in XML. Do not use this function as a general string translation " "function." msgstr "" -"這個函式只能用來轉換 XML 中無法直接使用的字元。 請勿將此函式用作一般的字串轉" +"這個函式只能用來轉換 XML 中無法直接使用的字元。請勿將此函式用作一般的字串轉" "換函式。" #: ../../library/xml.sax.utils.rst:36 @@ -73,8 +73,8 @@ msgid "" "``'<'``, and ``'>'`` are always unescaped, even if *entities* is " "provided." msgstr "" -"你可以透過傳入字典作為可選的 *entities* 參數,來取消其他字串的資料。 鍵和值都" -"必須是字串;每個鍵都會被對應的值取代。 即使提供了 *entities*,``'&'``、" +"你可以透過傳入字典作為可選的 *entities* 參數,來取消其他字串的資料。鍵和值都" +"必須是字串;每個鍵都會被對應的值取代。即使提供了 *entities*,``'&'``、" "``'<’`` 和 ``‘>'`` 總是會取消轉換。" #: ../../library/xml.sax.utils.rst:46 @@ -120,8 +120,8 @@ msgid "" "a single self-closed tag." msgstr "" "這個類別透過將 SAX 事件寫回 XML 文件來實" -"作 :class:`~xml.sax.handler.ContentHandler` 介面。 換句話說,使" -"用 :class:`XMLGenerator` 作為內容處理器將會重現被剖析的原始文件。 *out* 應該" +"作 :class:`~xml.sax.handler.ContentHandler` 介面。換句話說,使" +"用 :class:`XMLGenerator` 作為內容處理器將會重現被剖析的原始文件。*out* 應該" "是類檔案物件,預設為 *sys.stdout*。*encoding* 是輸出串流的編碼,預設為" "``'iso-8859-1'``。*short_empty_elements* 控制不包含內容的元素的格式:如果設" "定為 ``False``\\ (預設值),它們會以一對開始/結束(start/end)標籤的形式輸出;如果設定為 " @@ -141,9 +141,9 @@ msgid "" "they pass through." msgstr "" "這個類別的設計是在 :class:`~xml.sax.xmlreader.XMLReader` 與用戶端應用程式的事" -"件處理程式之間。 預設情況下,它什麼都不做,只是將要求傳送到閱讀器,並將事件未" -"經修改地傳送到處理程式,但子類別可以覆寫特定的方法,以修改事件串流或配置請求," -"因為它們通過。" +"件處理程式之間。預設情況下,它什麼都不做,只是將要求傳送到閱讀器,並將事件未" +"經修改地傳送到處理程式,但子類別可以覆寫特定的方法,以在傳送它們的時候修改事件串" +"流或配置請求。" #: ../../library/xml.sax.utils.rst:90 msgid "" From 65e6dbfaa2d5a77f910bc7042d583906e7da5b4c Mon Sep 17 00:00:00 2001 From: Weilin Du <108666168+LamentXU123@users.noreply.github.com> Date: Fri, 11 Jul 2025 17:49:00 +0800 Subject: [PATCH 10/11] Update xml.sax.utils.po --- library/xml.sax.utils.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/xml.sax.utils.po b/library/xml.sax.utils.po index a0e1458648..97d6df5912 100644 --- a/library/xml.sax.utils.po +++ b/library/xml.sax.utils.po @@ -39,7 +39,7 @@ msgstr "" #: ../../library/xml.sax.utils.rst:21 msgid "Escape ``'&'``, ``'<'``, and ``'>'`` in a string of data." -msgstr "在資料字串中轉義 ``'&'``、``'<'`` 及 ``'>'``。" +msgstr "在資料字串中跳脫 ``'&'``、``'<'`` 及 ``'>'``。" #: ../../library/xml.sax.utils.rst:23 msgid "" @@ -50,7 +50,7 @@ msgid "" msgstr "" "你可以透過傳入字典作為可選的 *entities* 參數,來轉換其他資料字串。鍵和值都必" "須是字串;每個鍵都會被對應的值取代。即使提供 *entities*,``'&'``、``'<'`` " -"和 ``'>'`` 字元始終會被轉義。" +"和 ``'>'`` 字元始終會被跳脫。" #: ../../library/xml.sax.utils.rst:30 msgid "" @@ -63,7 +63,7 @@ msgstr "" #: ../../library/xml.sax.utils.rst:36 msgid "Unescape ``'&'``, ``'<'``, and ``'>'`` in a string of data." -msgstr "取消轉義資料字串中的 ``'&'``、``'<'`` 和 ``'>'``。" +msgstr "取消跳脫資料字串中的 ``'&'``、``'<'`` 和 ``'>'``。" #: ../../library/xml.sax.utils.rst:38 msgid "" From 347a11bcddfe076565cd175a53d793980d3c29d5 Mon Sep 17 00:00:00 2001 From: Weilin Du <108666168+LamentXU123@users.noreply.github.com> Date: Fri, 11 Jul 2025 18:05:47 +0800 Subject: [PATCH 11/11] Apply suggestions from code review Co-authored-by: W. H. Wang --- library/xml.sax.utils.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/xml.sax.utils.po b/library/xml.sax.utils.po index 97d6df5912..fdab8c2f2d 100644 --- a/library/xml.sax.utils.po +++ b/library/xml.sax.utils.po @@ -48,7 +48,7 @@ msgid "" "will be replaced with its corresponding value. The characters ``'&'``, " "``'<'`` and ``'>'`` are always escaped, even if *entities* is provided." msgstr "" -"你可以透過傳入字典作為可選的 *entities* 參數,來轉換其他資料字串。鍵和值都必" +"你可以透過傳入字典作為可選的 *entities* 參數,來跳脫其他資料字串。鍵和值都必" "須是字串;每個鍵都會被對應的值取代。即使提供 *entities*,``'&'``、``'<'`` " "和 ``'>'`` 字元始終會被跳脫。" @@ -58,7 +58,7 @@ msgid "" "directly in XML. Do not use this function as a general string translation " "function." msgstr "" -"這個函式只能用來轉換 XML 中無法直接使用的字元。請勿將此函式用作一般的字串轉" +"這個函式只能用來跳脫 XML 中無法直接使用的字元。請勿將此函式用作一般的字串轉" "換函式。" #: ../../library/xml.sax.utils.rst:36 @@ -75,7 +75,7 @@ msgid "" msgstr "" "你可以透過傳入字典作為可選的 *entities* 參數,來取消其他字串的資料。鍵和值都" "必須是字串;每個鍵都會被對應的值取代。即使提供了 *entities*,``'&'``、" -"``'<’`` 和 ``‘>'`` 總是會取消轉換。" +"``'<’`` 和 ``‘>'`` 總是會取消跳脫。" #: ../../library/xml.sax.utils.rst:46 msgid ""