From d9640bfb32ecec0b923ddf83fc974e23f55fa2d5 Mon Sep 17 00:00:00 2001 From: isabellechiu <39623214+isabellechiu@users.noreply.github.com> Date: Sun, 20 Aug 2023 10:40:09 +0000 Subject: [PATCH 1/5] translate email.charset.rst: 27-39 --- library/email.charset.po | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/library/email.charset.po b/library/email.charset.po index ccca6d4771..0952ccf93c 100644 --- a/library/email.charset.po +++ b/library/email.charset.po @@ -58,7 +58,7 @@ msgstr "從 :mod:`email.charset` 模組中 import 此類別" #: ../../library/email.charset.rst:27 msgid "Map character sets to their email properties." -msgstr "" +msgstr "將字元集合對應到其電子郵件的屬性" #: ../../library/email.charset.rst:29 msgid "" @@ -68,6 +68,9 @@ msgid "" "codecs. Given a character set, it will do its best to provide information " "on how to use that character set in an email message in an RFC-compliant way." msgstr "" +"此類別提供相關資訊關於電子郵件對特定字元集合的要求。" +"同時也提供轉換字元集合之間便利的做法,並給予適用的編解碼器 (codecs) 可用性。" +"給定一個字元集合,此類別將會提供這個字元集合在電子郵件訊息中符合RFC (RFC-compliant) 的使用方式。" #: ../../library/email.charset.rst:35 msgid "" @@ -75,6 +78,8 @@ msgid "" "used in email headers or bodies. Certain character sets must be converted " "outright, and are not allowed in email." msgstr "" +"在電子郵件標題或內文用特定字元集合時必須使用 quoted-printable 或 base64 來編碼。" +"特定字元集合必須被徹底轉換並且不被允許在電子郵件中。" #: ../../library/email.charset.rst:39 msgid "" @@ -88,6 +93,11 @@ msgid "" "with base64, bodies will not be encoded, but output text will be converted " "from the ``euc-jp`` character set to the ``iso-2022-jp`` character set." msgstr "" +"備註 *input_charset* 描述如下;字元集合會被強制轉換為小寫。經過別名標準化後," +"會進到字元集合登錄檔 (registry)去查詢此字元集合使用的標題編碼、內文編碼以及輸出轉換編解碼器 (codec)。" +"例如:如果 *input_charset* 是 ``iso-8859-1`` 標題跟內文會被用 quoted-printable 編碼並且不需要輸出轉換編解碼器 (codecs)。" +"如果 *input_charset* 是 ``euc-jp`` 標題則會被編碼成 base64 但內文不會被編碼而輸出的文字則會從 ``euc-jp`` " +"字元集合被轉換成 ``iso-2022-jp`` 字元集合。" #: ../../library/email.charset.rst:49 msgid ":class:`Charset` instances have the following data attributes:" From 2cc352034e5af7ebc43a73f1c6f24b64d135e51e Mon Sep 17 00:00:00 2001 From: isabellechiu <39623214+isabellechiu@users.noreply.github.com> Date: Tue, 5 Dec 2023 07:36:11 +0000 Subject: [PATCH 2/5] Translate email charset rst: 49-100 --- library/email.charset.po | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/library/email.charset.po b/library/email.charset.po index 0952ccf93c..a06d695a18 100644 --- a/library/email.charset.po +++ b/library/email.charset.po @@ -101,7 +101,7 @@ msgstr "" #: ../../library/email.charset.rst:49 msgid ":class:`Charset` instances have the following data attributes:" -msgstr "" +msgstr ":class:`Charset` 含有以下數據屬性:" #: ../../library/email.charset.rst:53 msgid "" @@ -109,6 +109,9 @@ msgid "" "*official* email names (e.g. ``latin_1`` is converted to ``iso-8859-1``). " "Defaults to 7-bit ``us-ascii``." msgstr "" +"指定的初始字元集合。通用別名會被轉換成它們" +" *官方* 電子郵件名稱(例如: ``latin_1`` 會被轉換成 ``iso-8859-1``)。" +"預設值為7位元 ``us-ascii``。" #: ../../library/email.charset.rst:60 msgid "" @@ -117,6 +120,10 @@ msgid "" "``charset.BASE64`` (for base64 encoding), or ``charset.SHORTEST`` for the " "shortest of QP or BASE64 encoding. Otherwise, it will be ``None``." msgstr "" +"如果字元集合被用在電子郵件標題前必須被編碼的話," +"這個屬性會被設為 ``charset.QP`` (表quoted-printable編碼)," +" ``charset.BASE64`` (表base64編碼格式),或是 ``charset.SHORTEST`` 表示最短的 QP或是base64編碼格式。" +"不然,這個屬性會是 ``None``。" #: ../../library/email.charset.rst:69 msgid "" @@ -124,6 +131,8 @@ msgid "" "body, which indeed may be different than the header encoding. ``charset." "SHORTEST`` is not allowed for *body_encoding*." msgstr "" +"與 *header_encoding* 相同,但敘述郵件訊息內文的編碼格式,則與上述的標題編碼格式不同。" +" ``charset.SHORTEST`` 是不被允許在 *body_encoding* 使用。" #: ../../library/email.charset.rst:76 msgid "" @@ -132,6 +141,9 @@ msgid "" "will contain the name of the character set output will be converted to. " "Otherwise, it will be ``None``." msgstr "" +"部分的字元集合在用於電子郵件的標題或內文前必須先被轉換。" +"如果 *input_charset* 是這些字元集合中的其中之一,這個屬性將會包含輸出時被轉換的字元集合名稱。" +"不然,這個屬性則為 ``None``。" #: ../../library/email.charset.rst:84 msgid "" @@ -139,6 +151,8 @@ msgid "" "Unicode. If no conversion codec is necessary, this attribute will be " "``None``." msgstr "" +"用於將 *input_charset* 轉換成Unicode的Python編解碼器的名稱。" +"如果不需要轉換編解碼器,這個屬性則為 ``None``。" #: ../../library/email.charset.rst:91 msgid "" @@ -146,14 +160,16 @@ msgid "" "*output_charset*. If no conversion codec is necessary, this attribute will " "have the same value as the *input_codec*." msgstr "" +"用於將 *output_charset* 轉換成Unicode的Python編解碼器的名稱。" +"如果不需要轉換編解碼器,這個屬性將會與 *input_codec* 有相同的值。" #: ../../library/email.charset.rst:96 msgid ":class:`Charset` instances also have the following methods:" -msgstr "" +msgstr ":class:`Charset` 還有以下方法:" #: ../../library/email.charset.rst:100 msgid "Return the content transfer encoding used for body encoding." -msgstr "" +msgstr "回傳用於內文編碼的內容傳輸編碼(content-transfer-encoding)。" #: ../../library/email.charset.rst:102 msgid "" From 795efc326ea0947748c95ef95507b8bc77a343ca Mon Sep 17 00:00:00 2001 From: Matt Wang Date: Mon, 14 Oct 2024 01:24:45 +0800 Subject: [PATCH 3/5] refine and finish translating library/email.charset.po --- library/email.charset.po | 134 ++++++++++++++++++++++++--------------- 1 file changed, 83 insertions(+), 51 deletions(-) diff --git a/library/email.charset.po b/library/email.charset.po index a06d695a18..d40ab17ce3 100644 --- a/library/email.charset.po +++ b/library/email.charset.po @@ -1,5 +1,4 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation +# Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. # # Translators: @@ -20,7 +19,7 @@ msgstr "" #: ../../library/email.charset.rst:2 msgid ":mod:`!email.charset`: Representing character sets" -msgstr ":mod:`!email.charset`:表示字元集合" +msgstr ":mod:`!email.charset`:字元集合的表示" #: ../../library/email.charset.rst:7 msgid "**Source code:** :source:`Lib/email/charset.py`" @@ -38,7 +37,7 @@ msgstr "" msgid "" "The remaining text in this section is the original documentation of the " "module." -msgstr "此章節的其餘文字是原始模組的說明文件" +msgstr "此章節的其餘內容是模組的原始說明文件" #: ../../library/email.charset.rst:16 msgid "" @@ -48,17 +47,17 @@ msgid "" "Instances of :class:`Charset` are used in several other modules within the :" "mod:`email` package." msgstr "" -"此模組提供一個 class(類別) :class:`Charset` 來表示電子郵件中的字元集合和字" -"元集合轉換,以及字元集合登錄檔 (registry) 和其他許多便捷的方法以運用此登錄" -"檔。在 :mod:`email` 套件中有許多其他模組使用 :class:`Charset` 的實例。" +"此模組提供一個類別 :class:`Charset` 來表示電子郵件中的字元集合和字元集合轉" +"換,也包含字元集合登錄檔 (registry) 和其他許多運用此登錄檔的便捷方法。:class:" +"`Charset` 的實例被 :mod:`email` 套件中其他數個模組所使用。" #: ../../library/email.charset.rst:22 msgid "Import this class from the :mod:`email.charset` module." -msgstr "從 :mod:`email.charset` 模組中 import 此類別" +msgstr "從 :mod:`email.charset` 模組中引入此類別" #: ../../library/email.charset.rst:27 msgid "Map character sets to their email properties." -msgstr "將字元集合對應到其電子郵件的屬性" +msgstr "將字元集合對映到其電子郵件特性 (properties)。" #: ../../library/email.charset.rst:29 msgid "" @@ -68,9 +67,10 @@ msgid "" "codecs. Given a character set, it will do its best to provide information " "on how to use that character set in an email message in an RFC-compliant way." msgstr "" -"此類別提供相關資訊關於電子郵件對特定字元集合的要求。" -"同時也提供轉換字元集合之間便利的做法,並給予適用的編解碼器 (codecs) 可用性。" -"給定一個字元集合,此類別將會提供這個字元集合在電子郵件訊息中符合RFC (RFC-compliant) 的使用方式。" +"此類別提供有關於電子郵件對特定字元集合的規範資訊。考慮到適用之編解碼器 " +"(codec) 的可用性,它還提供了在字元集合之間進行轉換的便利例行操作 (routine)。" +"給定一個字元集合,它將盡量提供有關如何以符合 RFC (RFC-compliant) 的方式在電子" +"郵件訊息中使用該字元集合的資訊。" #: ../../library/email.charset.rst:35 msgid "" @@ -78,8 +78,9 @@ msgid "" "used in email headers or bodies. Certain character sets must be converted " "outright, and are not allowed in email." msgstr "" -"在電子郵件標題或內文用特定字元集合時必須使用 quoted-printable 或 base64 來編碼。" -"特定字元集合必須被徹底轉換並且不被允許在電子郵件中。" +"在電子郵件標頭 (header) 或內文 (body) 用特定字元集合時必須使用可列印字元編碼 " +"(quoted-printable) 或 base64 來編碼。特定字元集合不允許出現在電子郵件中、必須" +"被徹底轉換。" #: ../../library/email.charset.rst:39 msgid "" @@ -93,15 +94,17 @@ msgid "" "with base64, bodies will not be encoded, but output text will be converted " "from the ``euc-jp`` character set to the ``iso-2022-jp`` character set." msgstr "" -"備註 *input_charset* 描述如下;字元集合會被強制轉換為小寫。經過別名標準化後," -"會進到字元集合登錄檔 (registry)去查詢此字元集合使用的標題編碼、內文編碼以及輸出轉換編解碼器 (codec)。" -"例如:如果 *input_charset* 是 ``iso-8859-1`` 標題跟內文會被用 quoted-printable 編碼並且不需要輸出轉換編解碼器 (codecs)。" -"如果 *input_charset* 是 ``euc-jp`` 標題則會被編碼成 base64 但內文不會被編碼而輸出的文字則會從 ``euc-jp`` " -"字元集合被轉換成 ``iso-2022-jp`` 字元集合。" +"可選的 *input_charset* 描述如下;字元集合會被強制轉換 (coerced) 為小寫。經過" +"別名標準化 (alias normalize) 後,會進到字元集合登錄檔 (registry) 去查詢此字元" +"集合使用的標頭編碼、內文編碼以及輸出轉換編解碼器。舉例來說,如果 " +"*input_charset* 是 ``iso-8859-1``,標頭跟內文會以可列印字元編碼並且不需要輸出" +"轉換編解碼器。如果 *input_charset* 是 ``euc-jp``,標頭則會被編碼成 base64、內" +"文不會被編碼,但輸出文字則會從 ``euc-jp`` 字元集合被轉換成 ``iso-2022-jp`` 字" +"元集合。" #: ../../library/email.charset.rst:49 msgid ":class:`Charset` instances have the following data attributes:" -msgstr ":class:`Charset` 含有以下數據屬性:" +msgstr ":class:`Charset` 實例有以下資料屬性:" #: ../../library/email.charset.rst:53 msgid "" @@ -109,9 +112,8 @@ msgid "" "*official* email names (e.g. ``latin_1`` is converted to ``iso-8859-1``). " "Defaults to 7-bit ``us-ascii``." msgstr "" -"指定的初始字元集合。通用別名會被轉換成它們" -" *官方* 電子郵件名稱(例如: ``latin_1`` 會被轉換成 ``iso-8859-1``)。" -"預設值為7位元 ``us-ascii``。" +"指定的初始字元集合。通用別名會被轉換成它們的\\ *官方*\\ 電子郵件名稱(例如:" +"``latin_1`` 會被轉換成 ``iso-8859-1``)。預設為 7 位元 ``us-ascii``。" #: ../../library/email.charset.rst:60 msgid "" @@ -120,10 +122,10 @@ msgid "" "``charset.BASE64`` (for base64 encoding), or ``charset.SHORTEST`` for the " "shortest of QP or BASE64 encoding. Otherwise, it will be ``None``." msgstr "" -"如果字元集合被用在電子郵件標題前必須被編碼的話," -"這個屬性會被設為 ``charset.QP`` (表quoted-printable編碼)," -" ``charset.BASE64`` (表base64編碼格式),或是 ``charset.SHORTEST`` 表示最短的 QP或是base64編碼格式。" -"不然,這個屬性會是 ``None``。" +"如果字元集合在被用於電子郵件標頭前必須被編碼的話,這個屬性會被設為 ``charset." +"QP``\\ (表示可列印字元編碼)、``charset.BASE64``\\ (表 base64 編碼格式)或" +"是 ``charset.SHORTEST`` 表示最短的 QP 或是 base64 編碼格式。不然這個屬性會是 " +"``None``。" #: ../../library/email.charset.rst:69 msgid "" @@ -131,8 +133,8 @@ msgid "" "body, which indeed may be different than the header encoding. ``charset." "SHORTEST`` is not allowed for *body_encoding*." msgstr "" -"與 *header_encoding* 相同,但敘述郵件訊息內文的編碼格式,則與上述的標題編碼格式不同。" -" ``charset.SHORTEST`` 是不被允許在 *body_encoding* 使用。" +"與 *header_encoding* 相同,但敘述郵件訊息內文的編碼,與上述的標頭編碼有可能不" +"同。``charset.SHORTEST`` 是不允許於 *body_encoding* 使用的。" #: ../../library/email.charset.rst:76 msgid "" @@ -141,9 +143,9 @@ msgid "" "will contain the name of the character set output will be converted to. " "Otherwise, it will be ``None``." msgstr "" -"部分的字元集合在用於電子郵件的標題或內文前必須先被轉換。" -"如果 *input_charset* 是這些字元集合中的其中之一,這個屬性將會包含輸出時被轉換的字元集合名稱。" -"不然,這個屬性則為 ``None``。" +"部分的字元集合在用於電子郵件的標頭或內文前必須先被轉換。如果 *input_charset* " +"是這些字元集合的其中之一,這個屬性將會包含輸出時被轉換的字元集合名稱。不然這" +"個屬性則為 ``None``。" #: ../../library/email.charset.rst:84 msgid "" @@ -151,8 +153,8 @@ msgid "" "Unicode. If no conversion codec is necessary, this attribute will be " "``None``." msgstr "" -"用於將 *input_charset* 轉換成Unicode的Python編解碼器的名稱。" -"如果不需要轉換編解碼器,這個屬性則為 ``None``。" +"用於將 *input_charset* 轉換成 Unicode 的 Python 編解碼器的名稱。如果不需要轉" +"換編解碼器,這個屬性為 ``None``。" #: ../../library/email.charset.rst:91 msgid "" @@ -160,16 +162,16 @@ msgid "" "*output_charset*. If no conversion codec is necessary, this attribute will " "have the same value as the *input_codec*." msgstr "" -"用於將 *output_charset* 轉換成Unicode的Python編解碼器的名稱。" -"如果不需要轉換編解碼器,這個屬性將會與 *input_codec* 有相同的值。" +"用於將 Unicode 轉換成 *output_charset* 的 Python 編解碼器名稱。如果不需要轉換" +"編解碼器,這個屬性將會與 *input_codec* 有相同的值。" #: ../../library/email.charset.rst:96 msgid ":class:`Charset` instances also have the following methods:" -msgstr ":class:`Charset` 還有以下方法:" +msgstr ":class:`Charset` 實例還有以下方法:" #: ../../library/email.charset.rst:100 msgid "Return the content transfer encoding used for body encoding." -msgstr "回傳用於內文編碼的內容傳輸編碼(content-transfer-encoding)。" +msgstr "回傳用於內文編碼的內容傳輸編碼 (content transfer encoding)。" #: ../../library/email.charset.rst:102 msgid "" @@ -179,6 +181,10 @@ msgid "" "function should then set the :mailheader:`Content-Transfer-Encoding` header " "itself to whatever is appropriate." msgstr "" +"這可以是字串 ``quoted-printable`` 或 ``base64``,具體取決於所使用的編碼,或者" +"它也可以是一個函式,在這種情況下,你應該使用單個引數呼叫該函式,即正被編碼的 " +"Message 物件。然後函式應將 :mailheader:`Content-Transfer-Encoding` 標頭本身設" +"定為任何適當的值。" #: ../../library/email.charset.rst:108 msgid "" @@ -186,30 +192,33 @@ msgid "" "returns the string ``base64`` if *body_encoding* is ``BASE64``, and returns " "the string ``7bit`` otherwise." msgstr "" +"如果 *body_encoding* 為 ``QP`` 則回傳字串 ``quoted-printable``,如果 " +"*body_encoding* 為 ``BASE64`` 則回傳字串 ``base64``,否則回傳字串 ``7bit`` 。" #: ../../library/email.charset.rst:115 msgid "Return the output character set." -msgstr "" +msgstr "回傳輸出字元集合。" #: ../../library/email.charset.rst:117 msgid "" "This is the *output_charset* attribute if that is not ``None``, otherwise it " "is *input_charset*." msgstr "" +"如果不為 ``None`` 則這會是 *output_charset* 屬性,否則它是 *input_charset*。" #: ../../library/email.charset.rst:123 msgid "Header-encode the string *string*." -msgstr "" +msgstr "對字串 *string* 進行標頭編碼 (header-encode)。" #: ../../library/email.charset.rst:125 msgid "" "The type of encoding (base64 or quoted-printable) will be based on the " "*header_encoding* attribute." -msgstr "" +msgstr "編碼類型(base64 或可列印字元編碼)將基於 *header_encoding* 屬性。" #: ../../library/email.charset.rst:131 msgid "Header-encode a *string* by converting it first to bytes." -msgstr "" +msgstr "透過先將 *string* 轉換為位元組來對它進行標頭編碼。" #: ../../library/email.charset.rst:133 msgid "" @@ -218,56 +227,64 @@ msgid "" "iterator: each element returned from this iterator will provide the next " "maximum line length." msgstr "" +"這與 :meth:`header_encode` 類似,只不過字串不會超過由引數 *maxlengths* 給定的" +"最大列長度 (maximum line length),該引數必須是個疊代器:從此疊代器回傳的每個" +"元素將提供下一個最大列長度。" #: ../../library/email.charset.rst:141 msgid "Body-encode the string *string*." -msgstr "" +msgstr "對字串 *string* 進行內文編碼 (body-encode)。" #: ../../library/email.charset.rst:143 msgid "" "The type of encoding (base64 or quoted-printable) will be based on the " "*body_encoding* attribute." -msgstr "" +msgstr "編碼類型(base64 或可列印字元編碼)將基於 *body_encoding* 屬性。" #: ../../library/email.charset.rst:146 msgid "" "The :class:`Charset` class also provides a number of methods to support " "standard operations and built-in functions." -msgstr "" +msgstr ":class:`Charset` 類別也提供了許多支援標準操作和內建函式的方法。" #: ../../library/email.charset.rst:152 msgid "" "Returns *input_charset* as a string coerced to lower case. :meth:`!__repr__` " "is an alias for :meth:`!__str__`." msgstr "" +"回傳 *input_charset* 作為強制轉換為小寫的字串。:meth:`!__repr__` 是 :meth:`!" +"__str__` 的別名。" #: ../../library/email.charset.rst:158 msgid "" "This method allows you to compare two :class:`Charset` instances for " "equality." -msgstr "" +msgstr "此方法讓你比較兩個 :class:`Charset` 實例的相等性。" #: ../../library/email.charset.rst:164 msgid "" "This method allows you to compare two :class:`Charset` instances for " "inequality." -msgstr "" +msgstr "此方法讓你比較兩個 :class:`Charset` 實例的不相等性。" #: ../../library/email.charset.rst:167 msgid "" "The :mod:`email.charset` module also provides the following functions for " "adding new entries to the global character set, alias, and codec registries:" msgstr "" +":mod:`email.charset` 模組還提供以下函式,用於將項目新增至全域字元集合、別名和" +"編解碼器登錄檔中:" #: ../../library/email.charset.rst:173 msgid "Add character properties to the global registry." -msgstr "" +msgstr "將字元特性 (properties) 新增至全登錄檔。" #: ../../library/email.charset.rst:175 msgid "" "*charset* is the input character set, and must be the canonical name of a " "character set." msgstr "" +"*charset* 是輸入的字元集合,且必須是字元集合的規範名稱 (canonical name)。" #: ../../library/email.charset.rst:178 msgid "" @@ -277,6 +294,10 @@ msgid "" "encoding. ``SHORTEST`` is only valid for *header_enc*. The default is " "``None`` for no encoding." msgstr "" +"可選的 *header_enc* 和 *body_enc* 為 ``charset.QP``\\ (表示可列印字元編" +"碼)、``charset.BASE64``\\ (表示 base64 編碼)、``charset.SHORTEST``\\ (表" +"示最短的 base64 與可列印字元編碼)或 ``None``\\ (表示無編碼)。``SHORTEST`` " +"僅在用於 *header_enc* 時有效。預設為 ``None``,表示不編碼。" #: ../../library/email.charset.rst:184 msgid "" @@ -285,6 +306,9 @@ msgid "" "charset when the method :meth:`Charset.convert` is called. The default is " "to output in the same character set as the input." msgstr "" +"可選的 *output_charset* 是輸出應採用的字元集合。當呼叫 :meth:`Charset." +"convert` 方法時,將從輸入字元集合轉換為 Unicode,再轉換為輸出字元集合。預設是" +"以與輸入相同的字元集合輸出。" #: ../../library/email.charset.rst:189 msgid "" @@ -293,30 +317,36 @@ msgid "" "codecs the module does not know about. See the :mod:`codecs` module's " "documentation for more information." msgstr "" +"*input_charset* 和 *output_charset* 都必須在模組的字元集合到編解碼器對映 " +"(character set-to-codec mapping) 中具有 Unicode 編解碼器項目;使用 :func:" +"`add_codec` 來新增模組未知的編解碼器。有關更多資訊請參閱 :mod:`codecs` 模組的" +"文件。" #: ../../library/email.charset.rst:194 msgid "" "The global character set registry is kept in the module global dictionary " "``CHARSETS``." -msgstr "" +msgstr "全域字元集合登錄檔保存在模組全域字典 ``CHARSETS`` 中。" #: ../../library/email.charset.rst:200 msgid "" "Add a character set alias. *alias* is the alias name, e.g. ``latin-1``. " "*canonical* is the character set's canonical name, e.g. ``iso-8859-1``." msgstr "" +"新增字元集合別名。*alias* 是別名,例如 ``latin-1``。*canonical* 是字元集合的" +"規範名稱,例如 ``iso-8859-1``。" #: ../../library/email.charset.rst:203 msgid "" "The global charset alias registry is kept in the module global dictionary " "``ALIASES``." -msgstr "" +msgstr "全域字元集合別名登錄檔保存在模組全域字典 ``ALIASES`` 中。" #: ../../library/email.charset.rst:209 msgid "" "Add a codec that map characters in the given character set to and from " "Unicode." -msgstr "" +msgstr "新增一個編解碼器,將給定字元集合中的字元與 Unicode 進行對映。" #: ../../library/email.charset.rst:211 msgid "" @@ -324,3 +354,5 @@ msgid "" "of a Python codec, as appropriate for the second argument to the :class:" "`str`'s :meth:`~str.encode` method." msgstr "" +"*charset* 是字元集合的規範名稱。*codecname* 是 Python 編解碼器的名稱,適用" +"於 :class:`str` 的 :meth:`~str.encode` 方法的第二個引數。" From b55858a277ca35f42dacec094c217d6544828dc4 Mon Sep 17 00:00:00 2001 From: "Wei-Hsiang (Matt) Wang" Date: Thu, 17 Oct 2024 19:10:26 +0800 Subject: [PATCH 4/5] Apply suggestions from code review Co-authored-by: mindihx --- library/email.charset.po | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/library/email.charset.po b/library/email.charset.po index d40ab17ce3..4e2ed8a413 100644 --- a/library/email.charset.po +++ b/library/email.charset.po @@ -47,7 +47,7 @@ msgid "" "Instances of :class:`Charset` are used in several other modules within the :" "mod:`email` package." msgstr "" -"此模組提供一個類別 :class:`Charset` 來表示電子郵件中的字元集合和字元集合轉" +"此模組提供一個類別 :class:`Charset` 來表示電子郵件訊息中的字元集合和字元集合轉" "換,也包含字元集合登錄檔 (registry) 和其他許多運用此登錄檔的便捷方法。:class:" "`Charset` 的實例被 :mod:`email` 套件中其他數個模組所使用。" @@ -94,7 +94,7 @@ msgid "" "with base64, bodies will not be encoded, but output text will be converted " "from the ``euc-jp`` character set to the ``iso-2022-jp`` character set." msgstr "" -"可選的 *input_charset* 描述如下;字元集合會被強制轉換 (coerced) 為小寫。經過" +"可選的 *input_charset* 描述如下;*input_charset* 會被強制轉換 (coerced) 為小寫。經過" "別名標準化 (alias normalize) 後,會進到字元集合登錄檔 (registry) 去查詢此字元" "集合使用的標頭編碼、內文編碼以及輸出轉換編解碼器。舉例來說,如果 " "*input_charset* 是 ``iso-8859-1``,標頭跟內文會以可列印字元編碼並且不需要輸出" @@ -113,7 +113,7 @@ msgid "" "Defaults to 7-bit ``us-ascii``." msgstr "" "指定的初始字元集合。通用別名會被轉換成它們的\\ *官方*\\ 電子郵件名稱(例如:" -"``latin_1`` 會被轉換成 ``iso-8859-1``)。預設為 7 位元 ``us-ascii``。" +"``latin_1`` 會被轉換成 ``iso-8859-1``)。預設為 7 位元 ``us-ascii``。" #: ../../library/email.charset.rst:60 msgid "" @@ -123,7 +123,7 @@ msgid "" "shortest of QP or BASE64 encoding. Otherwise, it will be ``None``." msgstr "" "如果字元集合在被用於電子郵件標頭前必須被編碼的話,這個屬性會被設為 ``charset." -"QP``\\ (表示可列印字元編碼)、``charset.BASE64``\\ (表 base64 編碼格式)或" +"QP``\\ (表示可列印字元編碼)、``charset.BASE64``\\ (表示 base64 編碼格式)或" "是 ``charset.SHORTEST`` 表示最短的 QP 或是 base64 編碼格式。不然這個屬性會是 " "``None``。" @@ -133,7 +133,7 @@ msgid "" "body, which indeed may be different than the header encoding. ``charset." "SHORTEST`` is not allowed for *body_encoding*." msgstr "" -"與 *header_encoding* 相同,但敘述郵件訊息內文的編碼,與上述的標頭編碼有可能不" +"與 *header_encoding* 相同,但表示郵件訊息內文的編碼,與上述的標頭編碼有可能不" "同。``charset.SHORTEST`` 是不允許於 *body_encoding* 使用的。" #: ../../library/email.charset.rst:76 @@ -144,7 +144,7 @@ msgid "" "Otherwise, it will be ``None``." msgstr "" "部分的字元集合在用於電子郵件的標頭或內文前必須先被轉換。如果 *input_charset* " -"是這些字元集合的其中之一,這個屬性將會包含輸出時被轉換的字元集合名稱。不然這" +"是這些字元集合的其中之一,這個屬性將會包含輸出時轉換成的字元集合名稱。不然這" "個屬性則為 ``None``。" #: ../../library/email.charset.rst:84 @@ -252,7 +252,7 @@ msgid "" "Returns *input_charset* as a string coerced to lower case. :meth:`!__repr__` " "is an alias for :meth:`!__str__`." msgstr "" -"回傳 *input_charset* 作為強制轉換為小寫的字串。:meth:`!__repr__` 是 :meth:`!" +"回傳強制轉換 *input_charset* 為小寫後的字串。:meth:`!__repr__` 是 :meth:`!" "__str__` 的別名。" #: ../../library/email.charset.rst:158 @@ -277,7 +277,7 @@ msgstr "" #: ../../library/email.charset.rst:173 msgid "Add character properties to the global registry." -msgstr "將字元特性 (properties) 新增至全登錄檔。" +msgstr "將字元特性 (properties) 新增至全域登錄檔。" #: ../../library/email.charset.rst:175 msgid "" @@ -296,8 +296,8 @@ msgid "" msgstr "" "可選的 *header_enc* 和 *body_enc* 為 ``charset.QP``\\ (表示可列印字元編" "碼)、``charset.BASE64``\\ (表示 base64 編碼)、``charset.SHORTEST``\\ (表" -"示最短的 base64 與可列印字元編碼)或 ``None``\\ (表示無編碼)。``SHORTEST`` " -"僅在用於 *header_enc* 時有效。預設為 ``None``,表示不編碼。" +"示最短的 base64 或可列印字元編碼)或 ``None``\\ (表示無編碼)。``SHORTEST`` " +"僅在用於 *header_enc* 時有效。預設為 ``None``,表示無編碼。" #: ../../library/email.charset.rst:184 msgid "" From f5f5459311cdeb697548565b5b49a3df233d20ac Mon Sep 17 00:00:00 2001 From: "Wei-Hsiang (Matt) Wang" Date: Mon, 21 Oct 2024 01:45:08 +0800 Subject: [PATCH 5/5] Apply suggestions from code review Co-authored-by: mindihx --- library/email.charset.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/email.charset.po b/library/email.charset.po index 4e2ed8a413..34d6286033 100644 --- a/library/email.charset.po +++ b/library/email.charset.po @@ -113,7 +113,7 @@ msgid "" "Defaults to 7-bit ``us-ascii``." msgstr "" "指定的初始字元集合。通用別名會被轉換成它們的\\ *官方*\\ 電子郵件名稱(例如:" -"``latin_1`` 會被轉換成 ``iso-8859-1``)。預設為 7 位元 ``us-ascii``。" +"``latin_1`` 會被轉換成 ``iso-8859-1``)。預設為 7 位元 ``us-ascii``。" #: ../../library/email.charset.rst:60 msgid ""