diff --git a/c-api/buffer.po b/c-api/buffer.po index b2bca54a18..045193ecf9 100644 --- a/c-api/buffer.po +++ b/c-api/buffer.po @@ -20,7 +20,7 @@ msgstr "" #: ../../c-api/buffer.rst:11 msgid "Buffer Protocol" -msgstr "" +msgstr "緩衝協定 (Buffer Protocol)" #: ../../c-api/buffer.rst:18 msgid "" diff --git a/c-api/objbuffer.po b/c-api/objbuffer.po index 03bdd7641c..98ba10850e 100644 --- a/c-api/objbuffer.po +++ b/c-api/objbuffer.po @@ -20,7 +20,7 @@ msgstr "" #: ../../c-api/objbuffer.rst:4 msgid "Old Buffer Protocol" -msgstr "" +msgstr "舊式緩衝協定 (Buffer Protocol)" #: ../../c-api/objbuffer.rst:8 msgid "" diff --git a/library/array.po b/library/array.po index f00e94eaa1..b6bc1bddea 100644 --- a/library/array.po +++ b/library/array.po @@ -5,13 +5,15 @@ # Translators: # Liang-Bo Wang , 2016 # 周 忠毅 , 2016 +# Adrian Liaw , 2018 +# Benson Chen , 2021 msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-10-26 16:47+0000\n" -"PO-Revision-Date: 2018-05-23 14:38+0000\n" -"Last-Translator: Adrian Liaw \n" +"PO-Revision-Date: 2021-11-23 18:40+0800\n" +"Last-Translator: Benson Chen \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" "Language: zh_TW\n" @@ -19,10 +21,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.0\n" #: ../../library/array.rst:2 msgid ":mod:`array` --- Efficient arrays of numeric values" -msgstr ":mod:`array` --- 高效率的數值型態陣列" +msgstr ":mod:`array` --- 高效率的數值型陣列" #: ../../library/array.rst:11 msgid "" @@ -34,9 +37,9 @@ msgid "" "following type codes are defined:" msgstr "" "這個模組定義了一個物件型別,可以簡潔的表達一個包含基本數值的陣列:字元、整" -"數、浮點數。陣列是一個非常類似 list 的序列型態,除了陣列會限制儲存的物件型" -"別。在建立陣列時可以使用一個字元的 :dfn:`type code` 來指定儲存的資料型別。下" -"面是 type codes 的定義。" +"數、浮點數。陣列是一個非常類似 list(串列)的序列型別,除了陣列會限制儲存的物" +"件型別。在建立陣列時可以使用一個字元的 :dfn:`type code` 來指定儲存的資料型" +"別。以下為有被定義的 type codes:" #: ../../library/array.rst:19 msgid "Type code" @@ -52,7 +55,7 @@ msgstr "Python Type" #: ../../library/array.rst:19 msgid "Minimum size in bytes" -msgstr "最小所需的位元組" +msgstr "所需的最小位元組 (bytes)" #: ../../library/array.rst:19 msgid "Notes" @@ -92,7 +95,7 @@ msgstr "``'u'``" #: ../../library/array.rst:25 msgid "wchar_t" -msgstr "" +msgstr "wchar_t" #: ../../library/array.rst:25 msgid "Unicode character" @@ -204,7 +207,7 @@ msgstr "註解:" #: ../../library/array.rst:51 msgid "It can be 16 bits or 32 bits depending on the platform." -msgstr "" +msgstr "根據平台的不同,它有可能是 16 位元或者 32 位元。" #: ../../library/array.rst:53 msgid "" @@ -212,6 +215,9 @@ msgid "" "``Py_UNICODE``. This change doesn't affect to its behavior because " "``Py_UNICODE`` is alias of ``wchar_t`` since Python 3.3." msgstr "" +"目前 ``array(‘u’)`` 使用 ``wchar_t`` 取代已棄用的 ``Py_UNICODE`` 作為 C " +"type。這個異動並沒有影響到它的作用,因爲自從 Python 3.3 開始 ``Py_UNICODE`` " +"即為 ``wchar_t`` 的別名。" #: ../../library/array.rst:61 msgid "" @@ -233,8 +239,8 @@ msgid "" "object`, or iterable over elements of the appropriate type." msgstr "" "一個新的陣列中的元素被 *typecode* 限制,並由選用的 *initializer* 參數初始" -"化, *initializer* 必須是一個 list、 :term:`bytes-like object` 或包含適當型別" -"變數的 iterable 。" +"化,\\ *initializer* 必須是一個 list、\\ :term:`bytes-like object`\\ (類位元" +"組串物件)或包含適當型別變數的可疊代物件 (iterable)。" #: ../../library/array.rst:75 msgid "" @@ -243,19 +249,21 @@ msgid "" "below) to add initial items to the array. Otherwise, the iterable " "initializer is passed to the :meth:`extend` method." msgstr "" -"如果指定一個 list 或 string ,新的陣列初始化時會傳入 :meth:`fromlist` 、 :" +"如果指定一個 list 或 string,新的陣列初始化時會傳入 :meth:`fromlist`\\ 、\\ :" "meth:`frombytes` 或 :meth:`fromunicode` 方法(參照下方)將元素新增到其中。其" -"他型態的變數則會傳入 :meth:`extend` 方法初始化。" +"他情況時, 一個 iterable initializer 將被傳入 :meth:`extend` 方法之中。" #: ../../library/array.rst:80 msgid "" "Raises an :ref:`auditing event ` ``array.__new__`` with arguments " "``typecode``, ``initializer``." msgstr "" +"引發\\ :ref:`稽核事件 (auditing event) ` ``array.__new__`` 並帶入引" +"數 ``typecode``\\ 、\\ ``initializer``\\。" #: ../../library/array.rst:84 msgid "A string with all available type codes." -msgstr "一個包含所有可用的 type code 的字串。" +msgstr "一個包含所有可用的 type codes 的字串。" #: ../../library/array.rst:86 msgid "" @@ -266,10 +274,15 @@ msgid "" "interface, and may be used wherever :term:`bytes-like objects ` are supported." msgstr "" +"陣列支援常見的序列操作,包含索引 (indexing)、切片 (slicing)、串接 " +"(concatenation)、相乘 (multiplication) 等。當使用切片進行賦值時,賦值的陣列必" +"須具備相同的 type code,其他型別的數值將導致 :exc:`TypeError`\\ 。陣列同時也" +"實作了緩衝區介面,可以在任何支援 :term:`bytes-like objects ` 的地方使用。" #: ../../library/array.rst:92 msgid "The following data items and methods are also supported:" -msgstr "提供下方的資料物件與方法。" +msgstr "提供下方的資料物件與方法:" #: ../../library/array.rst:96 msgid "The typecode character used to create the array." @@ -277,7 +290,7 @@ msgstr "typecode 字元被用在建立陣列時。" #: ../../library/array.rst:101 msgid "The length in bytes of one array item in the internal representation." -msgstr "陣列當中的一個元素在內部需要的位元組 (bytes) 長度。" +msgstr "陣列當中的一個元素在內部需要的位元組長度。" #: ../../library/array.rst:106 msgid "Append a new item with value *x* to the end of the array." @@ -295,7 +308,7 @@ msgid "" "it." msgstr "" "回傳一個 tuple ``(address, length)`` 表示當前的記憶體位置和陣列儲存元素的緩衝" -"區記憶體長度。緩衝區的長度單位是 bytes ,並可以用 ``array.buffer_info()[1] * " +"區記憶體長度。緩衝區的長度單位是位元組,並可以用 ``array.buffer_info()[1] * " "array.itemsize`` 計算得到。這偶爾會在底層操作需要記憶體位置的輸出輸入時很有" "用,例如 :c:func:`ioctl` 指令。只要陣列存在且沒有使用任何更改長度的操作時,回" "傳的數值就有效。" @@ -308,9 +321,9 @@ msgid "" "backward compatibility and should be avoided in new code. The buffer " "interface is documented in :ref:`bufferobjects`." msgstr "" -"當使用來自 C 或 C++ 程式碼(這是唯一使得這個資訊有效的途徑) 的陣列物件時,更" +"當使用來自 C 或 C++ 程式碼(這是唯一使得這個資訊有效的途徑)的陣列物件時,更" "適當的做法是使用陣列物件支援的緩衝區介面。這個方法維護了向後兼容性,並應該在" -"新的程式碼中避免。關於緩衝區介面的文件在 :ref:`bufferobjects` 。" +"新的程式碼中避免。關於緩衝區介面的文件在\\ :ref:`bufferobjects`\\ 。" #: ../../library/array.rst:130 msgid "" @@ -320,8 +333,8 @@ msgid "" "written on a machine with a different byte order." msgstr "" "\"Byteswap\" 所有陣列中的物件。這只有支援物件長度為 1、2、4 或 8 位元組的陣" -"列,其他型別的值會導致 :exc:`RuntimeError` 。這在從機器讀取位元順序不同的檔案" -"時很有用。" +"列,其他型別的值會導致 :exc:`RuntimeError`\\ 。這在從機器讀取位元順序不同的檔" +"案時很有用。" #: ../../library/array.rst:138 msgid "Return the number of occurrences of *x* in the array." @@ -334,10 +347,10 @@ msgid "" "`TypeError` will be raised. If *iterable* is not an array, it must be " "iterable and its elements must be the right type to be appended to the array." msgstr "" -"從 *iterable* 中新增元素到陣列的尾端,如果 *iterable* 是另一個陣列,他必須有" -"完全相同的 type code ,如果不同會產生 :exc:`TypeError` 。如果 *iterable* 不是" -"一個陣列,他必須可以被迭代 (iterable) 且其中的元素必須是可以被加入陣列中的正" -"確型態。" +"從 *iterable* 中新增元素到陣列的尾端,如果 *iterable* 是另一個陣列,它必須有" +"完全相同的 type code,如果不同會導致 :exc:`TypeError`\\ 。如果 *iterable* 不" +"是一個陣列,它必須可以被迭代 (iterable) 且其中的元素必須是可以被加入陣列中的" +"正確型別。" #: ../../library/array.rst:151 msgid "" @@ -345,12 +358,12 @@ msgid "" "machine values (as if it had been read from a file using the :meth:" "`fromfile` method)." msgstr "" -"從字串中新增元素。讀取時會將字串當作一個陣列,裡面包含了 machine value(就像" -"從檔案中使用 :meth:`fromfile` 方法讀出的資料)。" +"從字串中新增元素。讀取時會將字串當作一個機器數值組成的陣列(就像從檔案中使" +"用 :meth:`fromfile` 方法讀出的資料)。" #: ../../library/array.rst:154 msgid ":meth:`fromstring` is renamed to :meth:`frombytes` for clarity." -msgstr "為了更明確,之前的 :meth:`fromstring` 被更名為 :meth:`frombytes` 。" +msgstr "將 :meth:`fromstring` 更名為 :meth:`frombytes`\\ ,使其更加清晰易懂。" #: ../../library/array.rst:160 msgid "" @@ -359,17 +372,17 @@ msgid "" "exc:`EOFError` is raised, but the items that were available are still " "inserted into the array." msgstr "" -"從 :term:`file object` *f* 讀取 *n* 個 machine value 類型的元素,接著將這些元" -"素加入陣列的最尾端。如果只有少於 *n* 個有效的元素會產生 :exc:`EOFError` 錯" -"誤,但有效的元素仍然會被加入陣列中。" +"從 :term:`file object` *f* 讀取 *n* 個元素(作為機器數值),接著將這些元素加" +"入陣列的最尾端。如果只有少於 *n* 個有效的元素會導致 :exc:`EOFError`\\ ,但有" +"效的元素仍然會被加入陣列中。" #: ../../library/array.rst:168 msgid "" "Append items from the list. This is equivalent to ``for x in list: a." "append(x)`` except that if there is a type error, the array is unchanged." msgstr "" -"從 list 中新增元素。這等價於 ``for x in list: a.append(x)`` ,除了有型態錯誤" -"產生時,陣列會保持原狀不會被更改。" +"從 list 中新增元素。這等價於 ``for x in list: a.append(x)``\\ ,除了有型別錯" +"誤產生時,陣列會保持原狀不會被更改。" #: ../../library/array.rst:174 msgid "" @@ -378,9 +391,9 @@ msgid "" "``array.frombytes(unicodestring.encode(enc))`` to append Unicode data to an " "array of some other type." msgstr "" -"用給定的 unicode 字串擴展這個陣列。陣列必須是型態 ``u`` 的陣列;其他的型態會" -"產生 :exc:`ValueError` 錯誤。使用 ``array.frombytes(unicodestring." -"encode(enc))`` 來新增 Unicode 資料到一個其他型態的陣列。" +"用給定的 unicode 字串擴展這個陣列。陣列必須是 ``u`` 型別的陣列;其他的型別會" +"導致 :exc:`ValueError` 錯誤。使用 ``array.frombytes(unicodestring." +"encode(enc))`` 來新增 Unicode 資料到一個其他型別的陣列。" #: ../../library/array.rst:182 msgid "" @@ -389,16 +402,19 @@ msgid "" "specified to search for *x* within a subsection of the array. Raise :exc:" "`ValueError` if *x* is not found." msgstr "" +"回傳 *i* 的最小數值,使得 *i* 成為陣列之中第一次出現 *x* 的索引。選擇性的引" +"數 *start* 及 *stop* 則可以被用來在指定的陣列空間中搜尋 *x*\\ 。如果 *x* 不存" +"在將導致 :exc:`ValueError`\\ 。" #: ../../library/array.rst:187 msgid "Added optional *start* and *stop* parameters." -msgstr "" +msgstr "新增選擇性的參數 *start* 及 *stop*\\ 。" #: ../../library/array.rst:192 msgid "" "Insert a new item with value *x* in the array before position *i*. Negative " "values are treated as being relative to the end of the array." -msgstr "在位置 *i* 之前插入一個元素 *x* 。負數的索引值會從陣列尾端開始數。" +msgstr "在位置 *i* 之前插入一個元素 *x*\\ 。負數的索引值會從陣列尾端開始數。" #: ../../library/array.rst:198 msgid "" @@ -406,16 +422,16 @@ msgid "" "optional argument defaults to ``-1``, so that by default the last item is " "removed and returned." msgstr "" -"移除並回傳陣列索引值 *i* 的元素。選擇性的參數 *i* 預設為 ``-1`` ,所以預設會" -"刪除並回傳最後一個元素。" +"移除並回傳陣列索引值 *i* 的元素。選擇性的引數 *i* 預設為 ``-1``\\ ,所以預設" +"會刪除並回傳最後一個元素。" #: ../../library/array.rst:205 msgid "Remove the first occurrence of *x* from the array." -msgstr "從陣列中刪除第一個出現的 *x* 。" +msgstr "從陣列中刪除第一個出現的 *x*\\ 。" #: ../../library/array.rst:210 msgid "Reverse the order of the items in the array." -msgstr "將整個陣列的元素按照順序逆轉。" +msgstr "反轉陣列中元素的順序。" #: ../../library/array.rst:215 msgid "" @@ -423,20 +439,20 @@ msgid "" "representation (the same sequence of bytes that would be written to a file " "by the :meth:`tofile` method.)" msgstr "" -"將陣列轉為另一個 machine values 的陣列並回傳他的位元組表示(跟用 :meth:" -"`tofile` 方法寫入檔案時的位元序列相同)。" +"將陣列轉為另一個機器數值組成的陣列並回傳它的位元組表示(跟用 :meth:`tofile` " +"方法寫入檔案時的位元序列相同)。" #: ../../library/array.rst:219 msgid ":meth:`tostring` is renamed to :meth:`tobytes` for clarity." -msgstr "為了明確性,過去的 :meth:`tostring` 已更名為 :meth:`tobytes` 。" +msgstr "為了明確性,過去的 :meth:`tostring` 已更名為 :meth:`tobytes`\\ 。" #: ../../library/array.rst:225 msgid "Write all items (as machine values) to the :term:`file object` *f*." -msgstr "將所有元素 (以 machine code 的形式)寫入 :term:`file object` *f* 。" +msgstr "將所有元素(作為機器數值)寫入 :term:`file object` *f*\\ 。" #: ../../library/array.rst:230 msgid "Convert the array to an ordinary list with the same items." -msgstr "不更改元素,將陣列轉為一般的 list 。" +msgstr "不更改元素,將陣列轉為一般的 list。" #: ../../library/array.rst:235 msgid "" @@ -444,8 +460,8 @@ msgid "" "array; otherwise a :exc:`ValueError` is raised. Use ``array.tobytes()." "decode(enc)`` to obtain a unicode string from an array of some other type." msgstr "" -"將陣列轉為一個字串。陣列的型態必須為 ``u`` 。其他型態的陣列會產生 :exc:" -"`ValueError` 錯誤。使用 ``array.tobytes().decode(enc)`` 將其他型態的陣列轉為" +"將陣列轉為一個字串。陣列的型別必須為 ``u``\\ 。其他型別的陣列會導致 :exc:" +"`ValueError` 錯誤。使用 ``array.tobytes().decode(enc)`` 將其他型別的陣列轉為" "字串。" #: ../../library/array.rst:240 @@ -458,10 +474,17 @@ msgid "" "`eval`, so long as the :class:`~array.array` class has been imported using " "``from array import array``. Examples::" msgstr "" +"當一個陣列物件被列印或轉換成字串時,它會被表示為 ``array(typecode, " +"initializer)``\\ 。若為空陣列則參數 *initializer* 被省略,若 *typecode* 是 " +"``’u’`` 將被表示為字串,其他情況則被表示為由數字組成的 list。只要 :class:" +"`~array.array` class(類別)透過 ``from array import array`` 的方式引入,便能" +"確保該字串能透過 :func:`eval` 轉換回一個擁有相同型別及數值的陣列。範例:\n" +"\n" +"::" #: ../../library/array.rst:257 msgid "Module :mod:`struct`" -msgstr "模組 :mod:`struct`" +msgstr ":mod:`struct` 模組" #: ../../library/array.rst:257 msgid "Packing and unpacking of heterogeneous binary data." @@ -469,7 +492,7 @@ msgstr "將包含不同資料類型的二進位資料包裝與解開包裝。" #: ../../library/array.rst:261 msgid "Module :mod:`xdrlib`" -msgstr "模組 :mod:`xdrlib`" +msgstr ":mod:`xdrlib` 模組" #: ../../library/array.rst:260 msgid "" @@ -485,50 +508,4 @@ msgstr "`NumPy `_" #: ../../library/array.rst:264 msgid "The NumPy package defines another array type." -msgstr "NumPy 套件定義了另一個陣列型態" - -#~ msgid "" -#~ "Return the smallest *i* such that *i* is the index of the first " -#~ "occurrence of *x* in the array." -#~ msgstr "回傳最小的 *i* ,使得 *i* 是陣列中第一個 *x* 出現的索引值。" - -#~ msgid "" -#~ "The Numeric Python extension (NumPy) defines another array type; see " -#~ "http://www.numpy.org/ for further information about Numerical Python." -#~ msgstr "" -#~ "Python 數值運算的擴充 (The Numeric Python extension, NumPy) 定義了另一個陣" -#~ "列型態,更多關於 Python 的數值運算參考 http://www.numpy.org/ 。" - -#~ msgid "Py_UNICODE" -#~ msgstr "Py_UNICODE" - -#~ msgid "\\(2)" -#~ msgstr "\\(2)" - -#~ msgid "" -#~ "The ``'u'`` type code corresponds to Python's obsolete unicode character " -#~ "(:c:type:`Py_UNICODE` which is :c:type:`wchar_t`). Depending on the " -#~ "platform, it can be 16 bits or 32 bits." -#~ msgstr "" -#~ "``u`` type code 對應到的是 Python 過去的 unicode 字母( :c:type:" -#~ "`Py_UNICODE` 是 :c:type:`wchar_t` )。根據平台不同,他有可能是 16 bits 或 " -#~ "32 bits。" - -#~ msgid "" -#~ "``'u'`` will be removed together with the rest of the :c:type:" -#~ "`Py_UNICODE` API." -#~ msgstr "``'u'`` 會跟著 :c:type:`Py_UNICODE` API 的停用一起被移除。" - -#~ msgid "" -#~ "The ``'q'`` and ``'Q'`` type codes are available only if the platform C " -#~ "compiler used to build Python supports C :c:type:`long long`, or, on " -#~ "Windows, :c:type:`__int64`." -#~ msgstr "" -#~ " ``'q'`` 和 ``'Q'`` type codes 只有在平台上建立 Python 的 C 編譯器時支援 " -#~ "C 的 long long 型別或支援 Windows 上的 :c:type:`__int64` 型別時有效。" - -#~ msgid "Deprecated alias for :meth:`frombytes`." -#~ msgstr ":meth:`frombytes` 方法的另一個(已經過時的)名字。" - -#~ msgid "Deprecated alias for :meth:`tobytes`." -#~ msgstr ":meth:`tobytes` 方法的另一個(已經過時的)名字。" +msgstr "NumPy 套件定義了另一個陣列型別" diff --git a/whatsnew/2.6.po b/whatsnew/2.6.po index 4b6564631e..73bb1f35d5 100644 --- a/whatsnew/2.6.po +++ b/whatsnew/2.6.po @@ -1229,7 +1229,7 @@ msgstr "" #: ../../whatsnew/2.6.rst:1111 msgid "PEP 3118: Revised Buffer Protocol" -msgstr "" +msgstr "PEP 3118:修訂緩衝協定" #: ../../whatsnew/2.6.rst:1113 msgid "" diff --git a/whatsnew/3.3.po b/whatsnew/3.3.po index 5c04793b7f..aa62e3c42b 100644 --- a/whatsnew/3.3.po +++ b/whatsnew/3.3.po @@ -294,7 +294,7 @@ msgstr "" #: ../../whatsnew/3.3.rst:203 msgid ":pep:`3118` - Revising the Buffer Protocol" -msgstr "" +msgstr ":pep:`3118` - 修訂緩衝協定" #: ../../whatsnew/3.3.rst:209 msgid "PEP 393: Flexible String Representation"