From eec105388167c5e8b1fcef327ca1c7c7e60904c2 Mon Sep 17 00:00:00 2001 From: Steven Hsu <81967953+StevenHsuYL@users.noreply.github.com> Date: Thu, 9 Jun 2022 13:06:32 +0800 Subject: [PATCH 1/2] Update glossary.po Complete new entries in 3.10. --- glossary.po | 54 ++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 43 insertions(+), 11 deletions(-) diff --git a/glossary.po b/glossary.po index ca3e9cdbed..4451b29d20 100644 --- a/glossary.po +++ b/glossary.po @@ -2,15 +2,15 @@ # Copyright (C) 2001-2022, Python Software Foundation # This file is distributed under the same license as the Python package. # Translators: -# Steven Hsu , 2021 +# Steven Hsu , 2021-2022 # Matt Wang , 2021 msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-05-21 17:35+0000\n" -"PO-Revision-Date: 2021-11-15 11:05+0800\n" -"Last-Translator: Matt Wang \n" +"PO-Revision-Date: 2022-06-09 12:59+0800\n" +"Last-Translator: Steven Hsu \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.0\n" +"X-Generator: Poedit 3.1\n" #: ../../glossary.rst:5 msgid "Glossary" @@ -379,7 +379,7 @@ msgstr "" #: ../../glossary.rst:162 msgid "borrowed reference" -msgstr "" +msgstr "borrowed reference(借用參照)" #: ../../glossary.rst:164 msgid "" @@ -388,6 +388,10 @@ msgid "" "object is destroyed. For example, a garbage collection can remove the last :" "term:`strong reference` to the object and so destroy it." msgstr "" +"在 Python 的 C API 中,借用參照是一個對物件的參照。它不會修改該物件的參照計" +"數 (reference count)。如果該物件被銷毀,它會成為一個迷途指標 (dangling " +"pointer)。例如,一次垃圾回收 (garbage collection) 可以移除對物件的最後一個 :" +"term:`strong reference`\\ (強參照),而將該物件銷毀。" #: ../../glossary.rst:169 msgid "" @@ -397,6 +401,10 @@ msgid "" "func:`Py_NewRef` function can be used to create a new :term:`strong " "reference`." msgstr "" +"對 :term:`borrowed reference` 呼叫 :c:func:`Py_INCREF` 以將它原地 (in-place) " +"轉換為 :term:`strong reference` 是被建議的做法,除非該物件不能在最後一次使用" +"借用參照之前被銷毀。\\ :c:func:`Py_NewRef` 函式可用於建立一個新的 :term:" +"`strong reference`。" #: ../../glossary.rst:174 msgid "bytes-like object" @@ -898,13 +906,15 @@ msgstr ":term:`file object`\\ (檔案物件)的同義字。" #: ../../glossary.rst:402 msgid "filesystem encoding and error handler" -msgstr "" +msgstr "filesystem encoding and error handler(檔案系統編碼和錯誤處理函式)" #: ../../glossary.rst:404 msgid "" "Encoding and error handler used by Python to decode bytes from the operating " "system and encode Unicode to the operating system." msgstr "" +"Python 所使用的一種編碼和錯誤處理函式,用來解碼來自作業系統的位元組,以及將 " +"Unicode 編碼到作業系統。" #: ../../glossary.rst:407 msgid "" @@ -912,6 +922,8 @@ msgid "" "below 128. If the file system encoding fails to provide this guarantee, API " "functions can raise :exc:`UnicodeError`." msgstr "" +"檔案系統編碼必須保證能成功解碼所有小於 128 的位元組。如果檔案系統編碼無法提供" +"此保證,則 API 函式會引發 :exc:`UnicodeError`\\ 。" #: ../../glossary.rst:411 msgid "" @@ -919,6 +931,8 @@ msgid "" "getfilesystemencodeerrors` functions can be used to get the filesystem " "encoding and error handler." msgstr "" +":func:`sys.getfilesystemencoding` 和 :func:`sys.getfilesystemencodeerrors` 函" +"式可用於取得檔案系統編碼和錯誤處理函式。" #: ../../glossary.rst:415 msgid "" @@ -927,10 +941,14 @@ msgid "" "filesystem_encoding` and :c:member:`~PyConfig.filesystem_errors` members of :" "c:type:`PyConfig`." msgstr "" +":term:`filesystem encoding and error handler`\\ (檔案系統編碼和錯誤處理函" +"式)會在 Python 啟動時由 :c:func:`PyConfig_Read` 函式來配置:請參閱 :c:" +"member:`~PyConfig.filesystem_encoding`\\ ,以及 :c:type:`PyConfig` 的成員 :c:" +"member:`~PyConfig.filesystem_errors`\\ 。" #: ../../glossary.rst:420 msgid "See also the :term:`locale encoding`." -msgstr "另請參閱 :term:`locale encoding`\\ 。" +msgstr "另請參閱 :term:`locale encoding`\\ (區域編碼)。" #: ../../glossary.rst:421 msgid "finder" @@ -1588,22 +1606,26 @@ msgid "" "On Unix, it is the encoding of the LC_CTYPE locale. It can be set with " "``locale.setlocale(locale.LC_CTYPE, new_locale)``." msgstr "" +"在 Unix 上,它是 LC_CTYPE 區域設定的編碼。它可以用 ``locale.setlocale(locale." +"LC_CTYPE, new_locale)`` 來設定。" #: ../../glossary.rst:722 msgid "On Windows, it is the ANSI code page (ex: ``cp1252``)." -msgstr "" +msgstr "在 Windows 上,它是 ANSI 代碼頁(code page,例如 ``cp1252``\\ )。" #: ../../glossary.rst:724 msgid "" "``locale.getpreferredencoding(False)`` can be used to get the locale " "encoding." -msgstr "" +msgstr "``locale.getpreferredencoding(False)`` 可以用來取得區域編碼。" #: ../../glossary.rst:727 msgid "" "Python uses the :term:`filesystem encoding and error handler` to convert " "between Unicode filenames and bytes filenames." msgstr "" +"Python 使用 :term:`filesystem encoding and error handler`\\ (檔案系統編碼和" +"錯誤處理函式)在 Unicode 檔案名稱和位元組檔案名稱之間進行轉換。" #: ../../glossary.rst:729 msgid "list" @@ -2464,7 +2486,7 @@ msgstr "" #: ../../glossary.rst:1125 msgid "strong reference" -msgstr "" +msgstr "strong reference(強參照)" #: ../../glossary.rst:1127 msgid "" @@ -2472,6 +2494,8 @@ msgid "" "increments the object's reference count when it is created and decrements " "the object's reference count when it is deleted." msgstr "" +"在 Python 的 C API 中,強參照是一個對物件的參照,在它被建立時會增加該物件的參" +"照計數 (reference count),在它被刪除時則會減少該物件的參照計數。" #: ../../glossary.rst:1131 msgid "" @@ -2480,10 +2504,12 @@ msgid "" "strong reference before exiting the scope of the strong reference, to avoid " "leaking one reference." msgstr "" +":c:func:`Py_NewRef` 函式可用於建立一個對物件的強參照。通常,在退出強參照的作" +"用域之前,必須在該強參照上呼叫 :c:func:`Py_DECREF` 函式,以避免洩漏一個參照。" #: ../../glossary.rst:1136 msgid "See also :term:`borrowed reference`." -msgstr "另請參閱 :term:`borrowed reference`\\ 。" +msgstr "另請參閱 :term:`borrowed reference`\\ (借用參照)。" #: ../../glossary.rst:1137 msgid "text encoding" @@ -2495,18 +2521,24 @@ msgid "" "+0000``--``U+10FFFF``). To store or transfer a string, it needs to be " "serialized as a sequence of bytes." msgstr "" +"Python 中的字串是一個 Unicode 碼點 (code point) 的序列(範圍在 ``U+0000`` -- " +"``U+10FFFF`` 之間)。若要儲存或傳送一個字串,它必須被序列化為一個位元組序列。" #: ../../glossary.rst:1143 msgid "" "Serializing a string into a sequence of bytes is known as \"encoding\", and " "recreating the string from the sequence of bytes is known as \"decoding\"." msgstr "" +"將一個字串序列化為位元組序列,稱為「編碼」,而從位元組序列重新建立該字串則稱" +"為「解碼 (decoding)」。" #: ../../glossary.rst:1146 msgid "" "There are a variety of different text serialization :ref:`codecs `, which are collectively referred to as \"text encodings\"." msgstr "" +"有多種不同的文字序列化編解碼器 (:ref:`codecs `),它們被統" +"稱為「文字編碼」。" #: ../../glossary.rst:1149 msgid "text file" From 258a118ca40f915082a44bd9b3fb2b80003a9961 Mon Sep 17 00:00:00 2001 From: Steven Hsu <81967953+StevenHsuYL@users.noreply.github.com> Date: Thu, 9 Jun 2022 21:55:17 +0800 Subject: [PATCH 2/2] Update glossary.po Complete a missing one. --- glossary.po | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/glossary.po b/glossary.po index 4451b29d20..52e0160c8a 100644 --- a/glossary.po +++ b/glossary.po @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-05-21 17:35+0000\n" -"PO-Revision-Date: 2022-06-09 12:59+0800\n" +"PO-Revision-Date: 2022-06-09 21:52+0800\n" "Last-Translator: Steven Hsu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -1501,6 +1501,8 @@ msgid "" "CPython does not consistently apply the requirement that an iterator define :" "meth:`__iter__`." msgstr "" +"CPython 並不是始終如一地都會檢查「疊代器有定義 :meth:`__iter__`\\ 」這個規" +"定。" #: ../../glossary.rst:676 msgid "key function"