diff --git a/c-api/marshal.po b/c-api/marshal.po index 3e1eb7377f..88d77fe2c1 100644 --- a/c-api/marshal.po +++ b/c-api/marshal.po @@ -1,15 +1,16 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation +# Copyright (C) 2001-2025, Python Software Foundation # This file is distributed under the same license as the Python package. # # Translators: +# Adrian Liaw , 2018 +# Matt Wang , 2025 msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-07-20 00:03+0000\n" -"PO-Revision-Date: 2018-05-23 14:06+0000\n" -"Last-Translator: Adrian Liaw \n" +"PO-Revision-Date: 2025-06-28 02:44+0800\n" +"Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" "Language: zh_TW\n" @@ -17,10 +18,11 @@ 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" #: ../../c-api/marshal.rst:6 msgid "Data marshalling support" -msgstr "資料 marshal 的支援" +msgstr "資料 marshal 操作的支援" #: ../../c-api/marshal.rst:8 msgid "" @@ -30,10 +32,13 @@ msgid "" "read the data back. Files used to store marshalled data must be opened in " "binary mode." msgstr "" +"這些例程允許 C 程式碼使用與 :mod:`marshal` 模組相同的資料格式來處理序列化物" +"件。有函式可以將資料寫入序列化格式,還有其他函式可以用來讀取回資料。用來儲存 " +"marshal 過的資料的檔案必須以二進位模式開啟。" #: ../../c-api/marshal.rst:14 msgid "Numeric values are stored with the least significant byte first." -msgstr "" +msgstr "數值會以最低有效位元組 (the least significant byte) 優先的方式儲存。" #: ../../c-api/marshal.rst:16 msgid "" @@ -42,6 +47,9 @@ msgid "" "unmarshalling. Version 2 uses a binary format for floating-point numbers. " "``Py_MARSHAL_VERSION`` indicates the current file format (currently 2)." msgstr "" +"這個模組支援兩個版本的資料格式:版本 0 是歷史版本,版本 1 在檔案中共享駐留字" +"串 (interned strings),並在 unmarshal 時使用。版本 2 使用二進位格式來儲存浮點" +"數。``Py_MARSHAL_VERSION`` 表示目前的檔案格式(目前為 2)。" #: ../../c-api/marshal.rst:24 msgid "" @@ -49,28 +57,35 @@ msgid "" "the least-significant 32 bits of *value*; regardless of the size of the " "native :c:expr:`long` type. *version* indicates the file format." msgstr "" +"將一個 :c:expr:`long` 整數 *value* marshal 為 *file*。這只會寫入 *value* 的最" +"低有效 32 位元;無論原生 :c:expr:`long` 型別的大小如何。*version* 表示檔案的格" +"式。" #: ../../c-api/marshal.rst:28 ../../c-api/marshal.rst:36 msgid "" -"This function can fail, in which case it sets the error indicator. Use :c:" -"func:`PyErr_Occurred` to check for that." +"This function can fail, in which case it sets the error indicator. " +"Use :c:func:`PyErr_Occurred` to check for that." msgstr "" +"這個函式可能會失敗,這時會設定錯誤指示器。使用 :c:func:`PyErr_Occurred` 來檢" +"查是否發生錯誤。" #: ../../c-api/marshal.rst:33 msgid "" "Marshal a Python object, *value*, to *file*. *version* indicates the file " "format." msgstr "" +"將一個 Python 物件 *value* marshal 為 *file*。*version* 表示檔案的格式。" #: ../../c-api/marshal.rst:41 msgid "" "Return a bytes object containing the marshalled representation of *value*. " "*version* indicates the file format." msgstr "" +"回傳一個位元組物件,包含 *value* 的 marshal 表示。*version* 為檔案的格式。" #: ../../c-api/marshal.rst:45 msgid "The following functions allow marshalled values to be read back in." -msgstr "" +msgstr "以下函式允許將 marshal 過後的值讀取回來。" #: ../../c-api/marshal.rst:50 msgid "" @@ -78,12 +93,14 @@ msgid "" "for reading. Only a 32-bit value can be read in using this function, " "regardless of the native size of :c:expr:`long`." msgstr "" +"從一個為讀取而開啟的 :c:expr:`FILE*` 中的資料串流回傳一個 C :c:expr:`long`。" +"無論 :c:expr:`long` 的原生大小如何,這個函式只能讀取 32 位元的值。" #: ../../c-api/marshal.rst:54 ../../c-api/marshal.rst:64 msgid "" "On error, sets the appropriate exception (:exc:`EOFError`) and returns " "``-1``." -msgstr "" +msgstr "在錯誤發生時,會設定合適的例外(:exc:`EOFError`)並回傳 ``-1``。" #: ../../c-api/marshal.rst:60 msgid "" @@ -91,12 +108,15 @@ msgid "" "for reading. Only a 16-bit value can be read in using this function, " "regardless of the native size of :c:expr:`short`." msgstr "" +"從一個為讀取而開啟的 :c:expr:`FILE*` 中的資料串流回傳一個 C :c:expr:`short`。" +"無論 :c:expr:`short` 的原生大小如何,這個函式只能讀取 16 位元的值。" #: ../../c-api/marshal.rst:70 msgid "" "Return a Python object from the data stream in a :c:expr:`FILE*` opened for " "reading." msgstr "" +"從一個為讀取而開啟的 :c:expr:`FILE*` 中的資料串流回傳一個 Python 物件。" #: ../../c-api/marshal.rst:73 ../../c-api/marshal.rst:87 #: ../../c-api/marshal.rst:96 @@ -104,6 +124,8 @@ msgid "" "On error, sets the appropriate exception (:exc:`EOFError`, :exc:`ValueError` " "or :exc:`TypeError`) and returns ``NULL``." msgstr "" +"在錯誤發生時,會設定合適的例外(:exc:`EOFError`、:exc:`ValueError` " +"或 :exc:`TypeError`)並回傳 ``NULL``。" #: ../../c-api/marshal.rst:79 msgid "" @@ -115,9 +137,16 @@ msgid "" "file. Only use these variant if you are certain that you won't be reading " "anything else from the file." msgstr "" +"從一個為讀取而開啟的 :c:expr:`FILE*` 中的資料串流回傳一個 Python 物件。" +"與 :c:func:`PyMarshal_ReadObjectFromFile` 不同,這個函式假設不會從檔案中讀取" +"其他物件,允許它積極地將檔案資料載入記憶體,以便反序列化可以從記憶體中的資料" +"操作,而不是從檔案中逐位元組讀取。只有在確定不會從檔案中讀取其他內容時,才使" +"用這個變體。" #: ../../c-api/marshal.rst:93 msgid "" "Return a Python object from the data stream in a byte buffer containing " "*len* bytes pointed to by *data*." msgstr "" +"從一個包含 *len* 位元組、被 *data* 指向的位元組緩衝區中的資料串流回傳一個 " +"Python 物件。"