From 0f233261f21fcb41627177a186b93cdd67667545 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 13 Jul 2025 11:33:48 +0000 Subject: [PATCH 1/9] sync with cpython fac28e47 --- glossary.po | 178 +++++++++++++++++++++++++++------------------------- 1 file changed, 93 insertions(+), 85 deletions(-) diff --git a/glossary.po b/glossary.po index b37eac2b1d..48c7e28cb0 100644 --- a/glossary.po +++ b/glossary.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-07-10 00:16+0000\n" +"POT-Creation-Date: 2025-07-13 11:32+0000\n" "PO-Revision-Date: 2023-07-02 22:47+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1968,7 +1968,7 @@ msgstr "" msgid "More information can be found in :ref:`metaclasses`." msgstr "更多資訊可以在\\ :ref:`metaclasses`\\ 章節中找到。" -#: ../../glossary.rst:831 ../../glossary.rst:863 ../../glossary.rst:1231 +#: ../../glossary.rst:831 ../../glossary.rst:863 ../../glossary.rst:1236 msgid "method" msgstr "method(方法)" @@ -2657,11 +2657,18 @@ msgstr "" "看不到,但它卻是 :term:`CPython` 實作的一個關鍵元素。程式設計師可以呼叫 :" "func:`~sys.getrefcount` 函式來回傳一個特定物件的參照計數。" -#: ../../glossary.rst:1165 +#: ../../glossary.rst:1166 +msgid "" +"In :term:`CPython`, reference counts are not considered to be stable or well-" +"defined values; the number of references to an object, and how that number " +"is affected by Python code, may be different between versions." +msgstr "" + +#: ../../glossary.rst:1170 msgid "regular package" msgstr "regular package(正規套件)" -#: ../../glossary.rst:1167 +#: ../../glossary.rst:1172 msgid "" "A traditional :term:`package`, such as a directory containing an ``__init__." "py`` file." @@ -2669,15 +2676,15 @@ msgstr "" "一個傳統的 :term:`package`\\ (套件),例如一個包含 ``__init__.py`` 檔案的目" "錄。" -#: ../../glossary.rst:1170 +#: ../../glossary.rst:1175 msgid "See also :term:`namespace package`." msgstr "另請參閱 :term:`namespace package`\\ (命名空間套件)。" -#: ../../glossary.rst:1171 +#: ../../glossary.rst:1176 msgid "REPL" msgstr "REPL" -#: ../../glossary.rst:1173 +#: ../../glossary.rst:1178 msgid "" "An acronym for the \"read–eval–print loop\", another name for the :term:" "`interactive` interpreter shell." @@ -2685,11 +2692,11 @@ msgstr "" "「read-eval-print 迴圈 (read–eval–print loop)」的縮寫,是\\ :term:`互動式 " "`\\ 直譯器 shell 的另一個名稱。" -#: ../../glossary.rst:1175 +#: ../../glossary.rst:1180 msgid "__slots__" msgstr "__slots__" -#: ../../glossary.rst:1177 +#: ../../glossary.rst:1182 msgid "" "A declaration inside a class that saves memory by pre-declaring space for " "instance attributes and eliminating instance dictionaries. Though popular, " @@ -2702,11 +2709,11 @@ msgstr "" "最好保留給那種在一個記憶體關鍵 (memory-critical) 的應用程式中存在大量實例的罕" "見情況。" -#: ../../glossary.rst:1182 +#: ../../glossary.rst:1187 msgid "sequence" msgstr "sequence(序列)" -#: ../../glossary.rst:1184 +#: ../../glossary.rst:1189 msgid "" "An :term:`iterable` which supports efficient element access using integer " "indices via the :meth:`~object.__getitem__` special method and defines a :" @@ -2725,7 +2732,7 @@ msgstr "" "為對映 (mapping) 而不是序列,因為其查找方式是使用任意的 :term:`hashable` 鍵," "而不是整數。" -#: ../../glossary.rst:1193 +#: ../../glossary.rst:1198 msgid "" "The :class:`collections.abc.Sequence` abstract base class defines a much " "richer interface that goes beyond just :meth:`~object.__getitem__` and :meth:" @@ -2742,11 +2749,11 @@ msgstr "" "用 :func:`~abc.ABCMeta.register` 被明確地註冊。更多關於序列方法的文件,請見" "\\ :ref:`常見序列操作 `。" -#: ../../glossary.rst:1202 +#: ../../glossary.rst:1207 msgid "set comprehension" msgstr "set comprehension(集合綜合運算)" -#: ../../glossary.rst:1204 +#: ../../glossary.rst:1209 msgid "" "A compact way to process all or part of the elements in an iterable and " "return a set with the results. ``results = {c for c in 'abracadabra' if c " @@ -2757,11 +2764,11 @@ msgstr "" "set 回傳。``results = {c for c in 'abracadabra' if c not in 'abc'}`` 會產生一" "個字串 set:``{'r', 'd'}``。請參閱\\ :ref:`comprehensions`。" -#: ../../glossary.rst:1208 +#: ../../glossary.rst:1213 msgid "single dispatch" msgstr "single dispatch(單一調度)" -#: ../../glossary.rst:1210 +#: ../../glossary.rst:1215 msgid "" "A form of :term:`generic function` dispatch where the implementation is " "chosen based on the type of a single argument." @@ -2769,11 +2776,11 @@ msgstr "" ":term:`generic function`\\ (泛型函式)調度的一種形式,在此,實作的選擇是基於" "單一引數的型別。" -#: ../../glossary.rst:1212 +#: ../../glossary.rst:1217 msgid "slice" msgstr "slice(切片)" -#: ../../glossary.rst:1214 +#: ../../glossary.rst:1219 msgid "" "An object usually containing a portion of a :term:`sequence`. A slice is " "created using the subscript notation, ``[]`` with colons between numbers " @@ -2785,11 +2792,11 @@ msgstr "" "之間使用冒號,例如 ``variable_name[1:3:5]``。在括號(下標)符號的內部,會使" "用 :class:`slice` 物件。" -#: ../../glossary.rst:1218 +#: ../../glossary.rst:1223 msgid "soft deprecated" msgstr "soft deprecated(軟性棄用)" -#: ../../glossary.rst:1220 +#: ../../glossary.rst:1225 msgid "" "A soft deprecated API should not be used in new code, but it is safe for " "already existing code to use it. The API remains documented and tested, but " @@ -2798,13 +2805,13 @@ msgstr "" "被軟性棄用的 API 代表不應再用於新程式碼中,但在現有程式碼中繼續使用它仍會是安" "全的。API 仍會以文件記錄並會被測試,但不會被繼續改進。" -#: ../../glossary.rst:1224 +#: ../../glossary.rst:1229 msgid "" "Soft deprecation, unlike normal deprecation, does not plan on removing the " "API and will not emit warnings." msgstr "與正常棄用不同,軟性棄用沒有刪除 API 的規劃,也不會發出警告。" -#: ../../glossary.rst:1227 +#: ../../glossary.rst:1232 msgid "" "See `PEP 387: Soft Deprecation `_." @@ -2812,11 +2819,11 @@ msgstr "" "請參閱 `PEP 387:軟性棄用 `_。" -#: ../../glossary.rst:1229 +#: ../../glossary.rst:1234 msgid "special method" msgstr "special method(特殊方法)" -#: ../../glossary.rst:1233 +#: ../../glossary.rst:1238 msgid "" "A method that is called implicitly by Python to execute a certain operation " "on a type, such as addition. Such methods have names starting and ending " @@ -2827,11 +2834,11 @@ msgstr "" "種 method 的名稱會在開頭和結尾有兩個下底線。Special method 在\\ :ref:" "`specialnames`\\ 中有詳細說明。" -#: ../../glossary.rst:1237 +#: ../../glossary.rst:1242 msgid "standard library" msgstr "標準函式庫" -#: ../../glossary.rst:1239 +#: ../../glossary.rst:1244 msgid "" "The collection of :term:`packages `, :term:`modules ` and :" "term:`extension modules ` distributed as a part of the " @@ -2839,23 +2846,24 @@ msgid "" "may vary based on platform, available system libraries, or other criteria. " "Documentation can be found at :ref:`library-index`." msgstr "" -"包含\\ :term:`套件 `、:term:`模組 `\\ 和\\ " -":term:`擴充模組 `\\ 的集合,它們是作為官方 Python " -"直譯器套件的一部分來發行。該集合的成員可能會因平台、可用的系統函式庫或其他條件而有所不同。" -"相關文件可以在 :ref:`library-index` 中找到。" +"包含\\ :term:`套件 `、:term:`模組 `\\ 和\\ :term:`擴充模組 " +"`\\ 的集合,它們是作為官方 Python 直譯器套件的一部分來發" +"行。該集合的成員可能會因平台、可用的系統函式庫或其他條件而有所不同。相關文件" +"可以在 :ref:`library-index` 中找到。" -#: ../../glossary.rst:1245 +#: ../../glossary.rst:1250 msgid "" "See also :data:`sys.stdlib_module_names` for a list of all possible standard " "library module names." msgstr "" -"請參閱 :data:`sys.stdlib_module_names` 以取得所有可能的標準函式庫模組名稱的列表。" +"請參閱 :data:`sys.stdlib_module_names` 以取得所有可能的標準函式庫模組名稱的列" +"表。" -#: ../../glossary.rst:1247 +#: ../../glossary.rst:1252 msgid "statement" msgstr "statement(陳述式)" -#: ../../glossary.rst:1249 +#: ../../glossary.rst:1254 msgid "" "A statement is part of a suite (a \"block\" of code). A statement is either " "an :term:`expression` or one of several constructs with a keyword, such as :" @@ -2865,11 +2873,11 @@ msgstr "" "term:`expression`\\ (運算式),或是含有關鍵字(例如 :keyword:`if`、:keyword:" "`while` 或 :keyword:`for`\\ )的多種結構之一。" -#: ../../glossary.rst:1252 +#: ../../glossary.rst:1257 msgid "static type checker" msgstr "static type checker(靜態型別檢查器)" -#: ../../glossary.rst:1254 +#: ../../glossary.rst:1259 msgid "" "An external tool that reads Python code and analyzes it, looking for issues " "such as incorrect types. See also :term:`type hints ` and the :" @@ -2879,19 +2887,19 @@ msgstr "" "另請參閱\\ :term:`型別提示 (type hints) ` 以及 :mod:`typing` 模" "組。" -#: ../../glossary.rst:1257 +#: ../../glossary.rst:1262 msgid "stdlib" msgstr "stdlib(標準函式庫)" -#: ../../glossary.rst:1259 +#: ../../glossary.rst:1264 msgid "An abbreviation of :term:`standard library`." msgstr ":term:`standard library` 的縮寫。" -#: ../../glossary.rst:1260 +#: ../../glossary.rst:1265 msgid "strong reference" msgstr "strong reference(強參照)" -#: ../../glossary.rst:1262 +#: ../../glossary.rst:1267 msgid "" "In Python's C API, a strong reference is a reference to an object which is " "owned by the code holding the reference. The strong reference is taken by " @@ -2902,7 +2910,7 @@ msgstr "" "有。建立參照時透過呼叫 :c:func:`Py_INCREF` 來獲得強參照、刪除參照時透過 :c:" "func:`Py_DECREF` 釋放強參照。" -#: ../../glossary.rst:1268 +#: ../../glossary.rst:1273 msgid "" "The :c:func:`Py_NewRef` function can be used to create a strong reference to " "an object. Usually, the :c:func:`Py_DECREF` function must be called on the " @@ -2912,15 +2920,15 @@ msgstr "" ":c:func:`Py_NewRef` 函式可用於建立一個對物件的強參照。通常,在退出強參照的作" "用域之前,必須在該強參照上呼叫 :c:func:`Py_DECREF` 函式,以避免洩漏一個參照。" -#: ../../glossary.rst:1273 +#: ../../glossary.rst:1278 msgid "See also :term:`borrowed reference`." msgstr "另請參閱 :term:`borrowed reference`\\ (借用參照)。" -#: ../../glossary.rst:1274 +#: ../../glossary.rst:1279 msgid "text encoding" msgstr "text encoding(文字編碼)" -#: ../../glossary.rst:1276 +#: ../../glossary.rst:1281 msgid "" "A string in Python is a sequence of Unicode code points (in range " "``U+0000``--``U+10FFFF``). To store or transfer a string, it needs to be " @@ -2929,7 +2937,7 @@ msgstr "" "Python 中的字串是一個 Unicode 碼點 (code point) 的序列(範圍在 ``U+0000`` -- " "``U+10FFFF`` 之間)。若要儲存或傳送一個字串,它必須被序列化為一個位元組序列。" -#: ../../glossary.rst:1280 +#: ../../glossary.rst:1285 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\"." @@ -2937,7 +2945,7 @@ msgstr "" "將一個字串序列化為位元組序列,稱為「編碼」,而從位元組序列重新建立該字串則稱" "為「解碼 (decoding)」。" -#: ../../glossary.rst:1283 +#: ../../glossary.rst:1288 msgid "" "There are a variety of different text serialization :ref:`codecs `, which are collectively referred to as \"text encodings\"." @@ -2945,11 +2953,11 @@ msgstr "" "有多種不同的文字序列化編解碼器 (:ref:`codecs `),它們被統" "稱為「文字編碼」。" -#: ../../glossary.rst:1286 +#: ../../glossary.rst:1291 msgid "text file" msgstr "text file(文字檔案)" -#: ../../glossary.rst:1288 +#: ../../glossary.rst:1293 msgid "" "A :term:`file object` able to read and write :class:`str` objects. Often, a " "text file actually accesses a byte-oriented datastream and handles the :term:" @@ -2963,7 +2971,7 @@ msgstr "" "有:以文字模式(``'r'`` 或 ``'w'``)開啟的檔案、:data:`sys.stdin`、:data:" "`sys.stdout` 以及 :class:`io.StringIO` 的實例。" -#: ../../glossary.rst:1295 +#: ../../glossary.rst:1300 msgid "" "See also :term:`binary file` for a file object able to read and write :term:" "`bytes-like objects `." @@ -2971,28 +2979,28 @@ msgstr "" "另請參閱 :term:`binary file`\\ (二進位檔案),它是一個能夠讀取和寫入\\ :" "term:`類位元組串物件 (bytes-like object) ` 的檔案物件。" -#: ../../glossary.rst:1297 +#: ../../glossary.rst:1302 msgid "token" msgstr "" -#: ../../glossary.rst:1300 +#: ../../glossary.rst:1305 msgid "" "A small unit of source code, generated by the :ref:`lexical analyzer " "` (also called the *tokenizer*). Names, numbers, strings, " "operators, newlines and similar are represented by tokens." msgstr "" -#: ../../glossary.rst:1305 +#: ../../glossary.rst:1310 msgid "" "The :mod:`tokenize` module exposes Python's lexical analyzer. The :mod:" "`token` module contains information on the various types of tokens." msgstr "" -#: ../../glossary.rst:1308 +#: ../../glossary.rst:1313 msgid "triple-quoted string" msgstr "triple-quoted string(三引號內字串)" -#: ../../glossary.rst:1310 +#: ../../glossary.rst:1315 msgid "" "A string which is bound by three instances of either a quotation mark (\") " "or an apostrophe ('). While they don't provide any functionality not " @@ -3007,11 +3015,11 @@ msgstr "" "中包含未跳脫 (unescaped) 的單引號和雙引號,而且它們不需使用連續字元 " "(continuation character) 就可以跨越多行,這使得它們在編寫說明字串時特別有用。" -#: ../../glossary.rst:1317 +#: ../../glossary.rst:1322 msgid "type" msgstr "type(型別)" -#: ../../glossary.rst:1319 +#: ../../glossary.rst:1324 msgid "" "The type of a Python object determines what kind of object it is; every " "object has a type. An object's type is accessible as its :attr:`~object." @@ -3021,22 +3029,22 @@ msgstr "" "件的型別可以用它的 :attr:`~object.__class__` 屬性來存取,或以 ``type(obj)`` " "來檢索。" -#: ../../glossary.rst:1323 +#: ../../glossary.rst:1328 msgid "type alias" msgstr "type alias(型別別名)" -#: ../../glossary.rst:1325 +#: ../../glossary.rst:1330 msgid "A synonym for a type, created by assigning the type to an identifier." msgstr "一個型別的同義詞,透過將型別指定給一個識別符 (identifier) 來建立。" -#: ../../glossary.rst:1327 +#: ../../glossary.rst:1332 msgid "" "Type aliases are useful for simplifying :term:`type hints `. For " "example::" msgstr "" "型別別名對於簡化\\ :term:`型別提示 (type hint) ` 很有用。例如: ::" -#: ../../glossary.rst:1330 +#: ../../glossary.rst:1335 msgid "" "def remove_gray_shades(\n" " colors: list[tuple[int, int, int]]) -> list[tuple[int, int, int]]:\n" @@ -3046,11 +3054,11 @@ msgstr "" " colors: list[tuple[int, int, int]]) -> list[tuple[int, int, int]]:\n" " pass" -#: ../../glossary.rst:1334 +#: ../../glossary.rst:1339 msgid "could be made more readable like this::" msgstr "可以寫成這樣,更具有可讀性: ::" -#: ../../glossary.rst:1336 +#: ../../glossary.rst:1341 msgid "" "Color = tuple[int, int, int]\n" "\n" @@ -3062,15 +3070,15 @@ msgstr "" "def remove_gray_shades(colors: list[Color]) -> list[Color]:\n" " pass" -#: ../../glossary.rst:1341 ../../glossary.rst:1355 +#: ../../glossary.rst:1346 ../../glossary.rst:1360 msgid "See :mod:`typing` and :pep:`484`, which describe this functionality." msgstr "請參閱 :mod:`typing` 和 :pep:`484`,有此功能的描述。" -#: ../../glossary.rst:1342 +#: ../../glossary.rst:1347 msgid "type hint" msgstr "type hint(型別提示)" -#: ../../glossary.rst:1344 +#: ../../glossary.rst:1349 msgid "" "An :term:`annotation` that specifies the expected type for a variable, a " "class attribute, or a function parameter or return value." @@ -3078,7 +3086,7 @@ msgstr "" "一種 :term:`annotation`\\ (註釋),它指定一個變數、一個 class 屬性或一個函式" "的參數或回傳值的預期型別。" -#: ../../glossary.rst:1347 +#: ../../glossary.rst:1352 msgid "" "Type hints are optional and are not enforced by Python but they are useful " "to :term:`static type checkers `. They can also aid " @@ -3088,7 +3096,7 @@ msgstr "" "(static type checkers) `\\ 很有用,並能協助 IDE 完成程式" "碼的補全 (completion) 和重構 (refactoring)。" -#: ../../glossary.rst:1351 +#: ../../glossary.rst:1356 msgid "" "Type hints of global variables, class attributes, and functions, but not " "local variables, can be accessed using :func:`typing.get_type_hints`." @@ -3096,11 +3104,11 @@ msgstr "" "全域變數、class 屬性和函式(不含區域變數)的型別提示,都可以使用 :func:" "`typing.get_type_hints` 來存取。" -#: ../../glossary.rst:1356 +#: ../../glossary.rst:1361 msgid "universal newlines" msgstr "universal newlines(通用換行字元)" -#: ../../glossary.rst:1358 +#: ../../glossary.rst:1363 msgid "" "A manner of interpreting text streams in which all of the following are " "recognized as ending a line: the Unix end-of-line convention ``'\\n'``, the " @@ -3113,20 +3121,20 @@ msgstr "" "``'\\r'``。請參閱 :pep:`278` 和 :pep:`3116`,以及用於 :func:`bytes." "splitlines` 的附加用途。" -#: ../../glossary.rst:1363 +#: ../../glossary.rst:1368 msgid "variable annotation" msgstr "variable annotation(變數註釋)" -#: ../../glossary.rst:1365 +#: ../../glossary.rst:1370 msgid "An :term:`annotation` of a variable or a class attribute." msgstr "一個變數或 class 屬性的 :term:`annotation`\\ (註釋)。" -#: ../../glossary.rst:1367 +#: ../../glossary.rst:1372 msgid "" "When annotating a variable or a class attribute, assignment is optional::" msgstr "註釋變數或 class 屬性時,賦值是選擇性的: ::" -#: ../../glossary.rst:1369 +#: ../../glossary.rst:1374 msgid "" "class C:\n" " field: 'annotation'" @@ -3134,7 +3142,7 @@ msgstr "" "class C:\n" " field: 'annotation'" -#: ../../glossary.rst:1372 +#: ../../glossary.rst:1377 msgid "" "Variable annotations are usually used for :term:`type hints `: " "for example this variable is expected to take :class:`int` values::" @@ -3142,15 +3150,15 @@ msgstr "" "變數註釋通常用於\\ :term:`型別提示 (type hint) `:例如,這個變數預" "期會取得 :class:`int`\\ (整數)值: ::" -#: ../../glossary.rst:1376 +#: ../../glossary.rst:1381 msgid "count: int = 0" msgstr "count: int = 0" -#: ../../glossary.rst:1378 +#: ../../glossary.rst:1383 msgid "Variable annotation syntax is explained in section :ref:`annassign`." msgstr "變數註釋的語法在\\ :ref:`annassign`\\ 章節有詳細的解釋。" -#: ../../glossary.rst:1380 +#: ../../glossary.rst:1385 msgid "" "See :term:`function annotation`, :pep:`484` and :pep:`526`, which describe " "this functionality. Also see :ref:`annotations-howto` for best practices on " @@ -3159,11 +3167,11 @@ msgstr "" "請參閱 :term:`function annotation`\\ (函式註釋)、:pep:`484` 和 :pep:`526`," "皆有此功能的描述。關於註釋的最佳實踐方法,另請參閱 :ref:`annotations-howto`。" -#: ../../glossary.rst:1384 +#: ../../glossary.rst:1389 msgid "virtual environment" msgstr "virtual environment(虛擬環境)" -#: ../../glossary.rst:1386 +#: ../../glossary.rst:1391 msgid "" "A cooperatively isolated runtime environment that allows Python users and " "applications to install and upgrade Python distribution packages without " @@ -3174,15 +3182,15 @@ msgstr "" "程式得以安裝和升級 Python 發佈套件,而不會對同一個系統上運行的其他 Python 應" "用程式的行為產生干擾。" -#: ../../glossary.rst:1391 +#: ../../glossary.rst:1396 msgid "See also :mod:`venv`." msgstr "另請參閱 :mod:`venv`。" -#: ../../glossary.rst:1392 +#: ../../glossary.rst:1397 msgid "virtual machine" msgstr "virtual machine(虛擬機器)" -#: ../../glossary.rst:1394 +#: ../../glossary.rst:1399 msgid "" "A computer defined entirely in software. Python's virtual machine executes " "the :term:`bytecode` emitted by the bytecode compiler." @@ -3190,11 +3198,11 @@ msgstr "" "一部完全由軟體所定義的電腦 (computer)。Python 的虛擬機器會執行由 :term:" "`bytecode`\\ (位元組碼)編譯器所發出的位元組碼。" -#: ../../glossary.rst:1396 +#: ../../glossary.rst:1401 msgid "Zen of Python" msgstr "Zen of Python(Python 之禪)" -#: ../../glossary.rst:1398 +#: ../../glossary.rst:1403 msgid "" "Listing of Python design principles and philosophies that are helpful in " "understanding and using the language. The listing can be found by typing " @@ -3215,7 +3223,7 @@ msgstr "Fortran contiguous(Fortran 連續的)" msgid "magic" msgstr "magic" -#: ../../glossary.rst:1231 +#: ../../glossary.rst:1236 msgid "special" msgstr "special" From 1c28c895e949294ac7a89849983a564de2c24a26 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 13 Jul 2025 11:52:06 +0000 Subject: [PATCH 2/9] Initial plan From 2107dadfa411c3db961ba600cf8844a54aef9b9f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 13 Jul 2025 12:04:03 +0000 Subject: [PATCH 3/9] Translate untranslated entries from PR 1109: CPython reference counts, token, lexical analyzer Co-authored-by: josix <18432820+josix@users.noreply.github.com> --- glossary.po | 190 ++++++++++++++++++++++++++++------------------------ 1 file changed, 102 insertions(+), 88 deletions(-) diff --git a/glossary.po b/glossary.po index b37eac2b1d..6e94f0211a 100644 --- a/glossary.po +++ b/glossary.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-07-10 00:16+0000\n" +"POT-Creation-Date: 2025-07-13 11:32+0000\n" "PO-Revision-Date: 2023-07-02 22:47+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1798,11 +1798,11 @@ msgstr "" #: ../../glossary.rst:789 msgid "lexical analyzer" -msgstr "" +msgstr "lexical analyzer(詞法分析器)" #: ../../glossary.rst:792 msgid "Formal name for the *tokenizer*; see :term:`token`." -msgstr "" +msgstr "標記器的正式名稱;請參閱 :term:`token`。" #: ../../glossary.rst:793 msgid "list" @@ -1968,7 +1968,7 @@ msgstr "" msgid "More information can be found in :ref:`metaclasses`." msgstr "更多資訊可以在\\ :ref:`metaclasses`\\ 章節中找到。" -#: ../../glossary.rst:831 ../../glossary.rst:863 ../../glossary.rst:1231 +#: ../../glossary.rst:831 ../../glossary.rst:863 ../../glossary.rst:1236 msgid "method" msgstr "method(方法)" @@ -2657,11 +2657,20 @@ msgstr "" "看不到,但它卻是 :term:`CPython` 實作的一個關鍵元素。程式設計師可以呼叫 :" "func:`~sys.getrefcount` 函式來回傳一個特定物件的參照計數。" -#: ../../glossary.rst:1165 +#: ../../glossary.rst:1166 +msgid "" +"In :term:`CPython`, reference counts are not considered to be stable or well-" +"defined values; the number of references to an object, and how that number " +"is affected by Python code, may be different between versions." +msgstr "" +"在 :term:`CPython` 中,參照計數不被視為穩定或明確定義的值;對物件的參照數量," +"以及該數量如何受到 Python 程式碼的影響,在不同版本之間可能會有所不同。" + +#: ../../glossary.rst:1170 msgid "regular package" msgstr "regular package(正規套件)" -#: ../../glossary.rst:1167 +#: ../../glossary.rst:1172 msgid "" "A traditional :term:`package`, such as a directory containing an ``__init__." "py`` file." @@ -2669,15 +2678,15 @@ msgstr "" "一個傳統的 :term:`package`\\ (套件),例如一個包含 ``__init__.py`` 檔案的目" "錄。" -#: ../../glossary.rst:1170 +#: ../../glossary.rst:1175 msgid "See also :term:`namespace package`." msgstr "另請參閱 :term:`namespace package`\\ (命名空間套件)。" -#: ../../glossary.rst:1171 +#: ../../glossary.rst:1176 msgid "REPL" msgstr "REPL" -#: ../../glossary.rst:1173 +#: ../../glossary.rst:1178 msgid "" "An acronym for the \"read–eval–print loop\", another name for the :term:" "`interactive` interpreter shell." @@ -2685,11 +2694,11 @@ msgstr "" "「read-eval-print 迴圈 (read–eval–print loop)」的縮寫,是\\ :term:`互動式 " "`\\ 直譯器 shell 的另一個名稱。" -#: ../../glossary.rst:1175 +#: ../../glossary.rst:1180 msgid "__slots__" msgstr "__slots__" -#: ../../glossary.rst:1177 +#: ../../glossary.rst:1182 msgid "" "A declaration inside a class that saves memory by pre-declaring space for " "instance attributes and eliminating instance dictionaries. Though popular, " @@ -2702,11 +2711,11 @@ msgstr "" "最好保留給那種在一個記憶體關鍵 (memory-critical) 的應用程式中存在大量實例的罕" "見情況。" -#: ../../glossary.rst:1182 +#: ../../glossary.rst:1187 msgid "sequence" msgstr "sequence(序列)" -#: ../../glossary.rst:1184 +#: ../../glossary.rst:1189 msgid "" "An :term:`iterable` which supports efficient element access using integer " "indices via the :meth:`~object.__getitem__` special method and defines a :" @@ -2725,7 +2734,7 @@ msgstr "" "為對映 (mapping) 而不是序列,因為其查找方式是使用任意的 :term:`hashable` 鍵," "而不是整數。" -#: ../../glossary.rst:1193 +#: ../../glossary.rst:1198 msgid "" "The :class:`collections.abc.Sequence` abstract base class defines a much " "richer interface that goes beyond just :meth:`~object.__getitem__` and :meth:" @@ -2742,11 +2751,11 @@ msgstr "" "用 :func:`~abc.ABCMeta.register` 被明確地註冊。更多關於序列方法的文件,請見" "\\ :ref:`常見序列操作 `。" -#: ../../glossary.rst:1202 +#: ../../glossary.rst:1207 msgid "set comprehension" msgstr "set comprehension(集合綜合運算)" -#: ../../glossary.rst:1204 +#: ../../glossary.rst:1209 msgid "" "A compact way to process all or part of the elements in an iterable and " "return a set with the results. ``results = {c for c in 'abracadabra' if c " @@ -2757,11 +2766,11 @@ msgstr "" "set 回傳。``results = {c for c in 'abracadabra' if c not in 'abc'}`` 會產生一" "個字串 set:``{'r', 'd'}``。請參閱\\ :ref:`comprehensions`。" -#: ../../glossary.rst:1208 +#: ../../glossary.rst:1213 msgid "single dispatch" msgstr "single dispatch(單一調度)" -#: ../../glossary.rst:1210 +#: ../../glossary.rst:1215 msgid "" "A form of :term:`generic function` dispatch where the implementation is " "chosen based on the type of a single argument." @@ -2769,11 +2778,11 @@ msgstr "" ":term:`generic function`\\ (泛型函式)調度的一種形式,在此,實作的選擇是基於" "單一引數的型別。" -#: ../../glossary.rst:1212 +#: ../../glossary.rst:1217 msgid "slice" msgstr "slice(切片)" -#: ../../glossary.rst:1214 +#: ../../glossary.rst:1219 msgid "" "An object usually containing a portion of a :term:`sequence`. A slice is " "created using the subscript notation, ``[]`` with colons between numbers " @@ -2785,11 +2794,11 @@ msgstr "" "之間使用冒號,例如 ``variable_name[1:3:5]``。在括號(下標)符號的內部,會使" "用 :class:`slice` 物件。" -#: ../../glossary.rst:1218 +#: ../../glossary.rst:1223 msgid "soft deprecated" msgstr "soft deprecated(軟性棄用)" -#: ../../glossary.rst:1220 +#: ../../glossary.rst:1225 msgid "" "A soft deprecated API should not be used in new code, but it is safe for " "already existing code to use it. The API remains documented and tested, but " @@ -2798,13 +2807,13 @@ msgstr "" "被軟性棄用的 API 代表不應再用於新程式碼中,但在現有程式碼中繼續使用它仍會是安" "全的。API 仍會以文件記錄並會被測試,但不會被繼續改進。" -#: ../../glossary.rst:1224 +#: ../../glossary.rst:1229 msgid "" "Soft deprecation, unlike normal deprecation, does not plan on removing the " "API and will not emit warnings." msgstr "與正常棄用不同,軟性棄用沒有刪除 API 的規劃,也不會發出警告。" -#: ../../glossary.rst:1227 +#: ../../glossary.rst:1232 msgid "" "See `PEP 387: Soft Deprecation `_." @@ -2812,11 +2821,11 @@ msgstr "" "請參閱 `PEP 387:軟性棄用 `_。" -#: ../../glossary.rst:1229 +#: ../../glossary.rst:1234 msgid "special method" msgstr "special method(特殊方法)" -#: ../../glossary.rst:1233 +#: ../../glossary.rst:1238 msgid "" "A method that is called implicitly by Python to execute a certain operation " "on a type, such as addition. Such methods have names starting and ending " @@ -2827,11 +2836,11 @@ msgstr "" "種 method 的名稱會在開頭和結尾有兩個下底線。Special method 在\\ :ref:" "`specialnames`\\ 中有詳細說明。" -#: ../../glossary.rst:1237 +#: ../../glossary.rst:1242 msgid "standard library" msgstr "標準函式庫" -#: ../../glossary.rst:1239 +#: ../../glossary.rst:1244 msgid "" "The collection of :term:`packages `, :term:`modules ` and :" "term:`extension modules ` distributed as a part of the " @@ -2839,23 +2848,24 @@ msgid "" "may vary based on platform, available system libraries, or other criteria. " "Documentation can be found at :ref:`library-index`." msgstr "" -"包含\\ :term:`套件 `、:term:`模組 `\\ 和\\ " -":term:`擴充模組 `\\ 的集合,它們是作為官方 Python " -"直譯器套件的一部分來發行。該集合的成員可能會因平台、可用的系統函式庫或其他條件而有所不同。" -"相關文件可以在 :ref:`library-index` 中找到。" +"包含\\ :term:`套件 `、:term:`模組 `\\ 和\\ :term:`擴充模組 " +"`\\ 的集合,它們是作為官方 Python 直譯器套件的一部分來發" +"行。該集合的成員可能會因平台、可用的系統函式庫或其他條件而有所不同。相關文件" +"可以在 :ref:`library-index` 中找到。" -#: ../../glossary.rst:1245 +#: ../../glossary.rst:1250 msgid "" "See also :data:`sys.stdlib_module_names` for a list of all possible standard " "library module names." msgstr "" -"請參閱 :data:`sys.stdlib_module_names` 以取得所有可能的標準函式庫模組名稱的列表。" +"請參閱 :data:`sys.stdlib_module_names` 以取得所有可能的標準函式庫模組名稱的列" +"表。" -#: ../../glossary.rst:1247 +#: ../../glossary.rst:1252 msgid "statement" msgstr "statement(陳述式)" -#: ../../glossary.rst:1249 +#: ../../glossary.rst:1254 msgid "" "A statement is part of a suite (a \"block\" of code). A statement is either " "an :term:`expression` or one of several constructs with a keyword, such as :" @@ -2865,11 +2875,11 @@ msgstr "" "term:`expression`\\ (運算式),或是含有關鍵字(例如 :keyword:`if`、:keyword:" "`while` 或 :keyword:`for`\\ )的多種結構之一。" -#: ../../glossary.rst:1252 +#: ../../glossary.rst:1257 msgid "static type checker" msgstr "static type checker(靜態型別檢查器)" -#: ../../glossary.rst:1254 +#: ../../glossary.rst:1259 msgid "" "An external tool that reads Python code and analyzes it, looking for issues " "such as incorrect types. See also :term:`type hints ` and the :" @@ -2879,19 +2889,19 @@ msgstr "" "另請參閱\\ :term:`型別提示 (type hints) ` 以及 :mod:`typing` 模" "組。" -#: ../../glossary.rst:1257 +#: ../../glossary.rst:1262 msgid "stdlib" msgstr "stdlib(標準函式庫)" -#: ../../glossary.rst:1259 +#: ../../glossary.rst:1264 msgid "An abbreviation of :term:`standard library`." msgstr ":term:`standard library` 的縮寫。" -#: ../../glossary.rst:1260 +#: ../../glossary.rst:1265 msgid "strong reference" msgstr "strong reference(強參照)" -#: ../../glossary.rst:1262 +#: ../../glossary.rst:1267 msgid "" "In Python's C API, a strong reference is a reference to an object which is " "owned by the code holding the reference. The strong reference is taken by " @@ -2902,7 +2912,7 @@ msgstr "" "有。建立參照時透過呼叫 :c:func:`Py_INCREF` 來獲得強參照、刪除參照時透過 :c:" "func:`Py_DECREF` 釋放強參照。" -#: ../../glossary.rst:1268 +#: ../../glossary.rst:1273 msgid "" "The :c:func:`Py_NewRef` function can be used to create a strong reference to " "an object. Usually, the :c:func:`Py_DECREF` function must be called on the " @@ -2912,15 +2922,15 @@ msgstr "" ":c:func:`Py_NewRef` 函式可用於建立一個對物件的強參照。通常,在退出強參照的作" "用域之前,必須在該強參照上呼叫 :c:func:`Py_DECREF` 函式,以避免洩漏一個參照。" -#: ../../glossary.rst:1273 +#: ../../glossary.rst:1278 msgid "See also :term:`borrowed reference`." msgstr "另請參閱 :term:`borrowed reference`\\ (借用參照)。" -#: ../../glossary.rst:1274 +#: ../../glossary.rst:1279 msgid "text encoding" msgstr "text encoding(文字編碼)" -#: ../../glossary.rst:1276 +#: ../../glossary.rst:1281 msgid "" "A string in Python is a sequence of Unicode code points (in range " "``U+0000``--``U+10FFFF``). To store or transfer a string, it needs to be " @@ -2929,7 +2939,7 @@ msgstr "" "Python 中的字串是一個 Unicode 碼點 (code point) 的序列(範圍在 ``U+0000`` -- " "``U+10FFFF`` 之間)。若要儲存或傳送一個字串,它必須被序列化為一個位元組序列。" -#: ../../glossary.rst:1280 +#: ../../glossary.rst:1285 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\"." @@ -2937,7 +2947,7 @@ msgstr "" "將一個字串序列化為位元組序列,稱為「編碼」,而從位元組序列重新建立該字串則稱" "為「解碼 (decoding)」。" -#: ../../glossary.rst:1283 +#: ../../glossary.rst:1288 msgid "" "There are a variety of different text serialization :ref:`codecs `, which are collectively referred to as \"text encodings\"." @@ -2945,11 +2955,11 @@ msgstr "" "有多種不同的文字序列化編解碼器 (:ref:`codecs `),它們被統" "稱為「文字編碼」。" -#: ../../glossary.rst:1286 +#: ../../glossary.rst:1291 msgid "text file" msgstr "text file(文字檔案)" -#: ../../glossary.rst:1288 +#: ../../glossary.rst:1293 msgid "" "A :term:`file object` able to read and write :class:`str` objects. Often, a " "text file actually accesses a byte-oriented datastream and handles the :term:" @@ -2963,7 +2973,7 @@ msgstr "" "有:以文字模式(``'r'`` 或 ``'w'``)開啟的檔案、:data:`sys.stdin`、:data:" "`sys.stdout` 以及 :class:`io.StringIO` 的實例。" -#: ../../glossary.rst:1295 +#: ../../glossary.rst:1300 msgid "" "See also :term:`binary file` for a file object able to read and write :term:" "`bytes-like objects `." @@ -2971,28 +2981,32 @@ msgstr "" "另請參閱 :term:`binary file`\\ (二進位檔案),它是一個能夠讀取和寫入\\ :" "term:`類位元組串物件 (bytes-like object) ` 的檔案物件。" -#: ../../glossary.rst:1297 +#: ../../glossary.rst:1302 msgid "token" -msgstr "" +msgstr "token(記號)" -#: ../../glossary.rst:1300 +#: ../../glossary.rst:1305 msgid "" "A small unit of source code, generated by the :ref:`lexical analyzer " "` (also called the *tokenizer*). Names, numbers, strings, " "operators, newlines and similar are represented by tokens." msgstr "" +"原始碼的小單位,由 :ref:`詞法分析器 `(也稱為 *標記器*)產生。名" +"稱、數字、字串、運算子、換行符號等都以記號表示。" -#: ../../glossary.rst:1305 +#: ../../glossary.rst:1310 msgid "" "The :mod:`tokenize` module exposes Python's lexical analyzer. The :mod:" "`token` module contains information on the various types of tokens." msgstr "" +":mod:`tokenize` 模組公開了 Python 的詞法分析器。:mod:`token` 模組包含各種記號" +"類型的資訊。" -#: ../../glossary.rst:1308 +#: ../../glossary.rst:1313 msgid "triple-quoted string" msgstr "triple-quoted string(三引號內字串)" -#: ../../glossary.rst:1310 +#: ../../glossary.rst:1315 msgid "" "A string which is bound by three instances of either a quotation mark (\") " "or an apostrophe ('). While they don't provide any functionality not " @@ -3007,11 +3021,11 @@ msgstr "" "中包含未跳脫 (unescaped) 的單引號和雙引號,而且它們不需使用連續字元 " "(continuation character) 就可以跨越多行,這使得它們在編寫說明字串時特別有用。" -#: ../../glossary.rst:1317 +#: ../../glossary.rst:1322 msgid "type" msgstr "type(型別)" -#: ../../glossary.rst:1319 +#: ../../glossary.rst:1324 msgid "" "The type of a Python object determines what kind of object it is; every " "object has a type. An object's type is accessible as its :attr:`~object." @@ -3021,22 +3035,22 @@ msgstr "" "件的型別可以用它的 :attr:`~object.__class__` 屬性來存取,或以 ``type(obj)`` " "來檢索。" -#: ../../glossary.rst:1323 +#: ../../glossary.rst:1328 msgid "type alias" msgstr "type alias(型別別名)" -#: ../../glossary.rst:1325 +#: ../../glossary.rst:1330 msgid "A synonym for a type, created by assigning the type to an identifier." msgstr "一個型別的同義詞,透過將型別指定給一個識別符 (identifier) 來建立。" -#: ../../glossary.rst:1327 +#: ../../glossary.rst:1332 msgid "" "Type aliases are useful for simplifying :term:`type hints `. For " "example::" msgstr "" "型別別名對於簡化\\ :term:`型別提示 (type hint) ` 很有用。例如: ::" -#: ../../glossary.rst:1330 +#: ../../glossary.rst:1335 msgid "" "def remove_gray_shades(\n" " colors: list[tuple[int, int, int]]) -> list[tuple[int, int, int]]:\n" @@ -3046,11 +3060,11 @@ msgstr "" " colors: list[tuple[int, int, int]]) -> list[tuple[int, int, int]]:\n" " pass" -#: ../../glossary.rst:1334 +#: ../../glossary.rst:1339 msgid "could be made more readable like this::" msgstr "可以寫成這樣,更具有可讀性: ::" -#: ../../glossary.rst:1336 +#: ../../glossary.rst:1341 msgid "" "Color = tuple[int, int, int]\n" "\n" @@ -3062,15 +3076,15 @@ msgstr "" "def remove_gray_shades(colors: list[Color]) -> list[Color]:\n" " pass" -#: ../../glossary.rst:1341 ../../glossary.rst:1355 +#: ../../glossary.rst:1346 ../../glossary.rst:1360 msgid "See :mod:`typing` and :pep:`484`, which describe this functionality." msgstr "請參閱 :mod:`typing` 和 :pep:`484`,有此功能的描述。" -#: ../../glossary.rst:1342 +#: ../../glossary.rst:1347 msgid "type hint" msgstr "type hint(型別提示)" -#: ../../glossary.rst:1344 +#: ../../glossary.rst:1349 msgid "" "An :term:`annotation` that specifies the expected type for a variable, a " "class attribute, or a function parameter or return value." @@ -3078,7 +3092,7 @@ msgstr "" "一種 :term:`annotation`\\ (註釋),它指定一個變數、一個 class 屬性或一個函式" "的參數或回傳值的預期型別。" -#: ../../glossary.rst:1347 +#: ../../glossary.rst:1352 msgid "" "Type hints are optional and are not enforced by Python but they are useful " "to :term:`static type checkers `. They can also aid " @@ -3088,7 +3102,7 @@ msgstr "" "(static type checkers) `\\ 很有用,並能協助 IDE 完成程式" "碼的補全 (completion) 和重構 (refactoring)。" -#: ../../glossary.rst:1351 +#: ../../glossary.rst:1356 msgid "" "Type hints of global variables, class attributes, and functions, but not " "local variables, can be accessed using :func:`typing.get_type_hints`." @@ -3096,11 +3110,11 @@ msgstr "" "全域變數、class 屬性和函式(不含區域變數)的型別提示,都可以使用 :func:" "`typing.get_type_hints` 來存取。" -#: ../../glossary.rst:1356 +#: ../../glossary.rst:1361 msgid "universal newlines" msgstr "universal newlines(通用換行字元)" -#: ../../glossary.rst:1358 +#: ../../glossary.rst:1363 msgid "" "A manner of interpreting text streams in which all of the following are " "recognized as ending a line: the Unix end-of-line convention ``'\\n'``, the " @@ -3113,20 +3127,20 @@ msgstr "" "``'\\r'``。請參閱 :pep:`278` 和 :pep:`3116`,以及用於 :func:`bytes." "splitlines` 的附加用途。" -#: ../../glossary.rst:1363 +#: ../../glossary.rst:1368 msgid "variable annotation" msgstr "variable annotation(變數註釋)" -#: ../../glossary.rst:1365 +#: ../../glossary.rst:1370 msgid "An :term:`annotation` of a variable or a class attribute." msgstr "一個變數或 class 屬性的 :term:`annotation`\\ (註釋)。" -#: ../../glossary.rst:1367 +#: ../../glossary.rst:1372 msgid "" "When annotating a variable or a class attribute, assignment is optional::" msgstr "註釋變數或 class 屬性時,賦值是選擇性的: ::" -#: ../../glossary.rst:1369 +#: ../../glossary.rst:1374 msgid "" "class C:\n" " field: 'annotation'" @@ -3134,7 +3148,7 @@ msgstr "" "class C:\n" " field: 'annotation'" -#: ../../glossary.rst:1372 +#: ../../glossary.rst:1377 msgid "" "Variable annotations are usually used for :term:`type hints `: " "for example this variable is expected to take :class:`int` values::" @@ -3142,15 +3156,15 @@ msgstr "" "變數註釋通常用於\\ :term:`型別提示 (type hint) `:例如,這個變數預" "期會取得 :class:`int`\\ (整數)值: ::" -#: ../../glossary.rst:1376 +#: ../../glossary.rst:1381 msgid "count: int = 0" msgstr "count: int = 0" -#: ../../glossary.rst:1378 +#: ../../glossary.rst:1383 msgid "Variable annotation syntax is explained in section :ref:`annassign`." msgstr "變數註釋的語法在\\ :ref:`annassign`\\ 章節有詳細的解釋。" -#: ../../glossary.rst:1380 +#: ../../glossary.rst:1385 msgid "" "See :term:`function annotation`, :pep:`484` and :pep:`526`, which describe " "this functionality. Also see :ref:`annotations-howto` for best practices on " @@ -3159,11 +3173,11 @@ msgstr "" "請參閱 :term:`function annotation`\\ (函式註釋)、:pep:`484` 和 :pep:`526`," "皆有此功能的描述。關於註釋的最佳實踐方法,另請參閱 :ref:`annotations-howto`。" -#: ../../glossary.rst:1384 +#: ../../glossary.rst:1389 msgid "virtual environment" msgstr "virtual environment(虛擬環境)" -#: ../../glossary.rst:1386 +#: ../../glossary.rst:1391 msgid "" "A cooperatively isolated runtime environment that allows Python users and " "applications to install and upgrade Python distribution packages without " @@ -3174,15 +3188,15 @@ msgstr "" "程式得以安裝和升級 Python 發佈套件,而不會對同一個系統上運行的其他 Python 應" "用程式的行為產生干擾。" -#: ../../glossary.rst:1391 +#: ../../glossary.rst:1396 msgid "See also :mod:`venv`." msgstr "另請參閱 :mod:`venv`。" -#: ../../glossary.rst:1392 +#: ../../glossary.rst:1397 msgid "virtual machine" msgstr "virtual machine(虛擬機器)" -#: ../../glossary.rst:1394 +#: ../../glossary.rst:1399 msgid "" "A computer defined entirely in software. Python's virtual machine executes " "the :term:`bytecode` emitted by the bytecode compiler." @@ -3190,11 +3204,11 @@ msgstr "" "一部完全由軟體所定義的電腦 (computer)。Python 的虛擬機器會執行由 :term:" "`bytecode`\\ (位元組碼)編譯器所發出的位元組碼。" -#: ../../glossary.rst:1396 +#: ../../glossary.rst:1401 msgid "Zen of Python" msgstr "Zen of Python(Python 之禪)" -#: ../../glossary.rst:1398 +#: ../../glossary.rst:1403 msgid "" "Listing of Python design principles and philosophies that are helpful in " "understanding and using the language. The listing can be found by typing " @@ -3215,7 +3229,7 @@ msgstr "Fortran contiguous(Fortran 連續的)" msgid "magic" msgstr "magic" -#: ../../glossary.rst:1231 +#: ../../glossary.rst:1236 msgid "special" msgstr "special" From e163fb3704abf9030da009333257b9f3d2100859 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 13 Jul 2025 12:18:09 +0000 Subject: [PATCH 4/9] Rebase translations onto cron/sync/3.13 branch per @josix feedback Co-authored-by: josix <18432820+josix@users.noreply.github.com> --- .scripts/README.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.scripts/README.md b/.scripts/README.md index fd25353962..73571101e9 100644 --- a/.scripts/README.md +++ b/.scripts/README.md @@ -2,16 +2,11 @@ Useful scripts for the translation. -## Translation Dictionary - -The repository includes terminology dictionaries (`terminology_dictionary.csv` and `focused_terminology_dictionary.csv`) that provide standard translations for important Python terms to maintain consistency across documents. These dictionaries are maintained using LLM knowledge and can be referenced by translators. - -See `TERMINOLOGY_DICTIONARY.md` for detailed usage and integration with translation workflow. - ## From Google Translation Translate all untranslated entries of the given .po file with Google Translate. + ```sh .scripts/google_translate.sh library/csv.po ``` From b5af8464b79dc20e6f3489114fea35a8e1a78d65 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 13 Jul 2025 13:54:14 +0000 Subject: [PATCH 5/9] Fix CI build error: add missing closing backtick in :ref: directive Co-authored-by: josix <18432820+josix@users.noreply.github.com> --- glossary.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glossary.po b/glossary.po index 6e94f0211a..0b7b27bb86 100644 --- a/glossary.po +++ b/glossary.po @@ -2991,7 +2991,7 @@ msgid "" "` (also called the *tokenizer*). Names, numbers, strings, " "operators, newlines and similar are represented by tokens." msgstr "" -"原始碼的小單位,由 :ref:`詞法分析器 `(也稱為 *標記器*)產生。名" +"原始碼的小單位,由 :ref:`詞法分析器 ` (也稱為 *標記器*)產生。名" "稱、數字、字串、運算子、換行符號等都以記號表示。" #: ../../glossary.rst:1310 From d5da31e608831764781da0624e5dfadadad0f2ce Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 13 Jul 2025 14:13:29 +0000 Subject: [PATCH 6/9] Update terminology dictionaries with new parsing terms: token, lexical analyzer, tokenizer Co-authored-by: josix <18432820+josix@users.noreply.github.com> --- focused_terminology_dictionary.csv | 3 +++ terminology_dictionary.csv | 3 +++ 2 files changed, 6 insertions(+) diff --git a/focused_terminology_dictionary.csv b/focused_terminology_dictionary.csv index c9e7e17fd6..88db0efb4f 100644 --- a/focused_terminology_dictionary.csv +++ b/focused_terminology_dictionary.csv @@ -117,3 +117,6 @@ sequence,序列,512,154,Medium,Common Terms,glossary.po; tutorial/classes.po; re slice,切片,515,155,Medium,Common Terms,glossary.po; tutorial/classes.po; reference/datamodel.po; library/functions.po; howto/descriptor.po special method,特殊方法,518,156,Medium,Common Terms,glossary.po; tutorial/classes.po; reference/datamodel.po; library/functions.po; howto/descriptor.po statement,陳述式,521,157,Medium,Common Terms,glossary.po; tutorial/classes.po; reference/datamodel.po; library/functions.po; howto/descriptor.po +token,記號,5,3,High,Parsing Terms,glossary.po; library/token.po; library/tokenize.po +lexical analyzer,詞法分析器,3,2,Medium,Parsing Terms,glossary.po; library/tokenize.po +tokenizer,標記器,4,2,Medium,Parsing Terms,glossary.po; library/tokenize.po diff --git a/terminology_dictionary.csv b/terminology_dictionary.csv index 54837338b7..ec9d9bd6a1 100644 --- a/terminology_dictionary.csv +++ b/terminology_dictionary.csv @@ -195,3 +195,6 @@ execution,執行,779,243,library/core.po,library,glossary.po; tutorial/classes.p runtime,runtime,782,244,library/core.po,library,glossary.po; tutorial/classes.po; reference/datamodel.po; library/functions.po; howto/descriptor.po compile time,編譯時期,785,245,library/core.po,library,glossary.po; tutorial/classes.po; reference/datamodel.po; library/functions.po; howto/descriptor.po import time,引入時期,788,246,library/core.po,library,glossary.po; tutorial/classes.po; reference/datamodel.po; library/functions.po; howto/descriptor.po +token,記號,5,3,glossary.po,,glossary.po; library/token.po; library/tokenize.po +lexical analyzer,詞法分析器,3,2,glossary.po,,glossary.po; library/tokenize.po +tokenizer,標記器,4,2,glossary.po,,glossary.po; library/tokenize.po From 19067eb42e8d8b53fe9693cb06b0d559a6f170d1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 13 Jul 2025 14:20:54 +0000 Subject: [PATCH 7/9] Add English term "tokenizer" in parentheses for clarity per @josix suggestion Co-authored-by: josix <18432820+josix@users.noreply.github.com> --- glossary.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glossary.po b/glossary.po index 0b7b27bb86..13d0180b9c 100644 --- a/glossary.po +++ b/glossary.po @@ -2991,7 +2991,7 @@ msgid "" "` (also called the *tokenizer*). Names, numbers, strings, " "operators, newlines and similar are represented by tokens." msgstr "" -"原始碼的小單位,由 :ref:`詞法分析器 ` (也稱為 *標記器*)產生。名" +"原始碼的小單位,由 :ref:`詞法分析器 ` (也稱為 *標記器(tokenizer)*)產生。名" "稱、數字、字串、運算子、換行符號等都以記號表示。" #: ../../glossary.rst:1310 From 8a27e92ab300b826c7027bff5238edf6043379fd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 13 Jul 2025 14:25:46 +0000 Subject: [PATCH 8/9] Update CSV files to include English term in parentheses for tokenizer translation Co-authored-by: josix <18432820+josix@users.noreply.github.com> --- focused_terminology_dictionary.csv | 2 +- terminology_dictionary.csv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/focused_terminology_dictionary.csv b/focused_terminology_dictionary.csv index 88db0efb4f..99818114b9 100644 --- a/focused_terminology_dictionary.csv +++ b/focused_terminology_dictionary.csv @@ -119,4 +119,4 @@ special method,特殊方法,518,156,Medium,Common Terms,glossary.po; tutorial/cl statement,陳述式,521,157,Medium,Common Terms,glossary.po; tutorial/classes.po; reference/datamodel.po; library/functions.po; howto/descriptor.po token,記號,5,3,High,Parsing Terms,glossary.po; library/token.po; library/tokenize.po lexical analyzer,詞法分析器,3,2,Medium,Parsing Terms,glossary.po; library/tokenize.po -tokenizer,標記器,4,2,Medium,Parsing Terms,glossary.po; library/tokenize.po +tokenizer,標記器(tokenizer),4,2,Medium,Parsing Terms,glossary.po; library/tokenize.po diff --git a/terminology_dictionary.csv b/terminology_dictionary.csv index ec9d9bd6a1..aa00b61633 100644 --- a/terminology_dictionary.csv +++ b/terminology_dictionary.csv @@ -197,4 +197,4 @@ compile time,編譯時期,785,245,library/core.po,library,glossary.po; tutorial/ import time,引入時期,788,246,library/core.po,library,glossary.po; tutorial/classes.po; reference/datamodel.po; library/functions.po; howto/descriptor.po token,記號,5,3,glossary.po,,glossary.po; library/token.po; library/tokenize.po lexical analyzer,詞法分析器,3,2,glossary.po,,glossary.po; library/tokenize.po -tokenizer,標記器,4,2,glossary.po,,glossary.po; library/tokenize.po +tokenizer,標記器(tokenizer),4,2,glossary.po,,glossary.po; library/tokenize.po From 4e88397194c2773a47736b0301cb48d488c6ed76 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 14 Jul 2025 07:56:11 +0000 Subject: [PATCH 9/9] Keep token and tokenizer terms in original English per @mattwang44 feedback Co-authored-by: mattwang44 <24987826+mattwang44@users.noreply.github.com> --- focused_terminology_dictionary.csv | 4 ++-- glossary.po | 10 +++++----- terminology_dictionary.csv | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/focused_terminology_dictionary.csv b/focused_terminology_dictionary.csv index 99818114b9..6c890ff578 100644 --- a/focused_terminology_dictionary.csv +++ b/focused_terminology_dictionary.csv @@ -117,6 +117,6 @@ sequence,序列,512,154,Medium,Common Terms,glossary.po; tutorial/classes.po; re slice,切片,515,155,Medium,Common Terms,glossary.po; tutorial/classes.po; reference/datamodel.po; library/functions.po; howto/descriptor.po special method,特殊方法,518,156,Medium,Common Terms,glossary.po; tutorial/classes.po; reference/datamodel.po; library/functions.po; howto/descriptor.po statement,陳述式,521,157,Medium,Common Terms,glossary.po; tutorial/classes.po; reference/datamodel.po; library/functions.po; howto/descriptor.po -token,記號,5,3,High,Parsing Terms,glossary.po; library/token.po; library/tokenize.po +token,token,5,3,High,Parsing Terms,glossary.po; library/token.po; library/tokenize.po lexical analyzer,詞法分析器,3,2,Medium,Parsing Terms,glossary.po; library/tokenize.po -tokenizer,標記器(tokenizer),4,2,Medium,Parsing Terms,glossary.po; library/tokenize.po +tokenizer,tokenizer,4,2,Medium,Parsing Terms,glossary.po; library/tokenize.po diff --git a/glossary.po b/glossary.po index 13d0180b9c..18ffbb20e3 100644 --- a/glossary.po +++ b/glossary.po @@ -1802,7 +1802,7 @@ msgstr "lexical analyzer(詞法分析器)" #: ../../glossary.rst:792 msgid "Formal name for the *tokenizer*; see :term:`token`." -msgstr "標記器的正式名稱;請參閱 :term:`token`。" +msgstr "tokenizer 的正式名稱;請參閱 :term:`token`。" #: ../../glossary.rst:793 msgid "list" @@ -2983,7 +2983,7 @@ msgstr "" #: ../../glossary.rst:1302 msgid "token" -msgstr "token(記號)" +msgstr "token" #: ../../glossary.rst:1305 msgid "" @@ -2991,15 +2991,15 @@ msgid "" "` (also called the *tokenizer*). Names, numbers, strings, " "operators, newlines and similar are represented by tokens." msgstr "" -"原始碼的小單位,由 :ref:`詞法分析器 ` (也稱為 *標記器(tokenizer)*)產生。名" -"稱、數字、字串、運算子、換行符號等都以記號表示。" +"原始碼的小單位,由 :ref:`詞法分析器 ` (也稱為 *tokenizer*)產生。名" +"稱、數字、字串、運算子、換行符號等都以 token 表示。" #: ../../glossary.rst:1310 msgid "" "The :mod:`tokenize` module exposes Python's lexical analyzer. The :mod:" "`token` module contains information on the various types of tokens." msgstr "" -":mod:`tokenize` 模組公開了 Python 的詞法分析器。:mod:`token` 模組包含各種記號" +":mod:`tokenize` 模組公開了 Python 的詞法分析器。:mod:`token` 模組包含各種 token " "類型的資訊。" #: ../../glossary.rst:1313 diff --git a/terminology_dictionary.csv b/terminology_dictionary.csv index aa00b61633..216acba515 100644 --- a/terminology_dictionary.csv +++ b/terminology_dictionary.csv @@ -195,6 +195,6 @@ execution,執行,779,243,library/core.po,library,glossary.po; tutorial/classes.p runtime,runtime,782,244,library/core.po,library,glossary.po; tutorial/classes.po; reference/datamodel.po; library/functions.po; howto/descriptor.po compile time,編譯時期,785,245,library/core.po,library,glossary.po; tutorial/classes.po; reference/datamodel.po; library/functions.po; howto/descriptor.po import time,引入時期,788,246,library/core.po,library,glossary.po; tutorial/classes.po; reference/datamodel.po; library/functions.po; howto/descriptor.po -token,記號,5,3,glossary.po,,glossary.po; library/token.po; library/tokenize.po +token,token,5,3,glossary.po,,glossary.po; library/token.po; library/tokenize.po lexical analyzer,詞法分析器,3,2,glossary.po,,glossary.po; library/tokenize.po -tokenizer,標記器(tokenizer),4,2,glossary.po,,glossary.po; library/tokenize.po +tokenizer,tokenizer,4,2,glossary.po,,glossary.po; library/tokenize.po