From de584f53e61c36aaa72ea4b7d102c6d69a8a699a Mon Sep 17 00:00:00 2001 From: tomatoprinx Date: Sat, 13 Nov 2021 22:31:09 +0800 Subject: [PATCH 01/11] first translation --- library/array.po | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/library/array.po b/library/array.po index f00e94eaa1..2e9fab1fbe 100644 --- a/library/array.po +++ b/library/array.po @@ -10,7 +10,7 @@ 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" +"PO-Revision-Date: 2021-11-13 22:30+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -19,6 +19,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" #: ../../library/array.rst:2 msgid ":mod:`array` --- Efficient arrays of numeric values" @@ -91,8 +92,9 @@ msgid "``'u'``" msgstr "``'u'``" #: ../../library/array.rst:25 +#, fuzzy msgid "wchar_t" -msgstr "" +msgstr "wchar_t" #: ../../library/array.rst:25 msgid "Unicode character" @@ -203,15 +205,20 @@ msgid "Notes:" msgstr "註解:" #: ../../library/array.rst:51 +#, fuzzy msgid "It can be 16 bits or 32 bits depending on the platform." -msgstr "" +msgstr "根據平台的不同,他有可能是 16 位元 或者 32 位元。" #: ../../library/array.rst:53 +#, fuzzy msgid "" "``array('u')`` now uses ``wchar_t`` as C type instead of deprecated " "``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 "" @@ -248,10 +255,13 @@ msgstr "" "他型態的變數則會傳入 :meth:`extend` 方法初始化。" #: ../../library/array.rst:80 +#, fuzzy 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." @@ -266,6 +276,11 @@ 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:" @@ -383,16 +398,21 @@ msgstr "" "encode(enc))`` 來新增 Unicode 資料到一個其他型態的陣列。" #: ../../library/array.rst:182 +#, fuzzy msgid "" "Return the smallest *i* such that *i* is the index of the first occurrence " "of *x* in the array. The optional arguments *start* and *stop* can be " "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 +#, fuzzy msgid "Added optional *start* and *stop* parameters." -msgstr "" +msgstr "新增選擇性的參數 *start* 及 *stop* 。" #: ../../library/array.rst:192 msgid "" @@ -449,6 +469,7 @@ msgstr "" "字串。" #: ../../library/array.rst:240 +#, fuzzy msgid "" "When an array object is printed or converted to a string, it is represented " "as ``array(typecode, initializer)``. The *initializer* is omitted if the " @@ -458,6 +479,13 @@ 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`" From ede05b9d09a2082e9ef24e50de293f06327913bc Mon Sep 17 00:00:00 2001 From: tomatoprinx Date: Sat, 13 Nov 2021 23:09:10 +0800 Subject: [PATCH 02/11] align wording --- library/array.po | 58 ++++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/library/array.po b/library/array.po index 2e9fab1fbe..4e1f26618a 100644 --- a/library/array.po +++ b/library/array.po @@ -10,7 +10,7 @@ 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: 2021-11-13 22:30+0800\n" +"PO-Revision-Date: 2021-11-13 23:06+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -35,9 +35,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" @@ -240,8 +240,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 "" @@ -250,9 +250,9 @@ 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` 、 :" -"meth:`frombytes` 或 :meth:`fromunicode` 方法(參照下方)將元素新增到其中。其" -"他型態的變數則會傳入 :meth:`extend` 方法初始化。" +"如果指定一個 list(串列)或 string ,新的陣列初始化時會傳入 :meth:" +"`fromlist` 、 :meth:`frombytes` 或 :meth:`fromunicode` 方法(參照下方)將元素" +"新增到其中。其他型態的變數則會傳入 :meth:`extend` 方法初始化。" #: ../../library/array.rst:80 #, fuzzy @@ -265,7 +265,7 @@ msgstr "" #: ../../library/array.rst:84 msgid "A string with all available type codes." -msgstr "一個包含所有可用的 type code 的字串。" +msgstr "一個包含所有可用的 type codes 的字串。" #: ../../library/array.rst:86 msgid "" @@ -278,9 +278,9 @@ msgid "" msgstr "" "陣列支援常見的序列操作,包含索引(indexing)、切片(slicing)、串接" "(concatenation)、相乘(multiplication)等。當使用切片進行賦值時,賦值的陣列" -"必須具備相同的型別代號(type code),其他型別的數值將引發 :exc:" -"`TypeError` 。陣列同時也實作了緩衝區介面,可以在任何支援 :term:`bytes-like " -"objects ` 的地方使用。" +"必須具備相同的 type code ,其他型別的數值將導致 :exc:`TypeError` 。陣列同時" +"也實作了緩衝區介面,可以在任何支援 :term:`bytes-like objects ` 的地方使用。" #: ../../library/array.rst:92 msgid "The following data items and methods are also supported:" @@ -350,9 +350,9 @@ msgid "" "iterable and its elements must be the right type to be appended to the array." msgstr "" "從 *iterable* 中新增元素到陣列的尾端,如果 *iterable* 是另一個陣列,他必須有" -"完全相同的 type code ,如果不同會產生 :exc:`TypeError` 。如果 *iterable* 不是" +"完全相同的 type code ,如果不同會導致 :exc:`TypeError` 。如果 *iterable* 不是" "一個陣列,他必須可以被迭代 (iterable) 且其中的元素必須是可以被加入陣列中的正" -"確型態。" +"確型別。" #: ../../library/array.rst:151 msgid "" @@ -375,16 +375,16 @@ msgid "" "inserted into the array." msgstr "" "從 :term:`file object` *f* 讀取 *n* 個 machine value 類型的元素,接著將這些元" -"素加入陣列的最尾端。如果只有少於 *n* 個有效的元素會產生 :exc:`EOFError` 錯" -"誤,但有效的元素仍然會被加入陣列中。" +"素加入陣列的最尾端。如果只有少於 *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 "" @@ -393,9 +393,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 #, fuzzy @@ -407,7 +407,7 @@ msgid "" msgstr "" "回傳 *i* 的最小數值,使得 *i* 成為陣列之中第一次出現 *x* 的索引。選擇性的參" "數 *start* 及 *stop* 則可以被用來在指定的陣列空間中搜尋 *x* 。如果 *x* 不存在" -"將引發 :exc:`ValueError` 。" +"將導致 :exc:`ValueError` 。" #: ../../library/array.rst:187 #, fuzzy @@ -456,7 +456,7 @@ msgstr "將所有元素 (以 machine code 的形式)寫入 :term:`file objec #: ../../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 "" @@ -464,8 +464,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 @@ -481,9 +481,9 @@ msgid "" msgstr "" "當一個陣列物件被列印或轉換成字串時,他會被表示為 ``array(typecode, " "initializer)`` 。若為空陣列則參數 *initializer* 被省略,若 *typecode* 是 " -"``’u’`` 將被表示為字串,其他情況則被表示為數字 list (串列)。只要 :class:" +"``’u’`` 將被表示為字串,其他情況則被表示為數字 list(串列)。只要 :class:" "`~array.array` class(類別)透過 ``from array import array`` 的方式引入,使" -"用 :func:`eval` 便能確保其字串被轉換回一個擁有相同型別及值的陣列。範例:\n" +"用 :func:`eval` 便能確保其字串被轉換回一個擁有相同型別及數值的陣列。範例:\n" "\n" "::" @@ -513,7 +513,7 @@ msgstr "`NumPy `_" #: ../../library/array.rst:264 msgid "The NumPy package defines another array type." -msgstr "NumPy 套件定義了另一個陣列型態" +msgstr "NumPy 套件定義了另一個陣列型別" #~ msgid "" #~ "Return the smallest *i* such that *i* is the index of the first " From 6eefdb3d87959b62ca5388277e54a235d083f29b Mon Sep 17 00:00:00 2001 From: tomatoprinx Date: Sat, 13 Nov 2021 23:10:10 +0800 Subject: [PATCH 03/11] remove fuzzy entries --- library/array.po | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/library/array.po b/library/array.po index 4e1f26618a..609d52953e 100644 --- a/library/array.po +++ b/library/array.po @@ -10,7 +10,7 @@ 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: 2021-11-13 23:06+0800\n" +"PO-Revision-Date: 2021-11-13 23:09+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -92,7 +92,6 @@ msgid "``'u'``" msgstr "``'u'``" #: ../../library/array.rst:25 -#, fuzzy msgid "wchar_t" msgstr "wchar_t" @@ -205,12 +204,10 @@ msgid "Notes:" msgstr "註解:" #: ../../library/array.rst:51 -#, fuzzy msgid "It can be 16 bits or 32 bits depending on the platform." msgstr "根據平台的不同,他有可能是 16 位元 或者 32 位元。" #: ../../library/array.rst:53 -#, fuzzy msgid "" "``array('u')`` now uses ``wchar_t`` as C type instead of deprecated " "``Py_UNICODE``. This change doesn't affect to its behavior because " @@ -255,7 +252,6 @@ msgstr "" "新增到其中。其他型態的變數則會傳入 :meth:`extend` 方法初始化。" #: ../../library/array.rst:80 -#, fuzzy msgid "" "Raises an :ref:`auditing event ` ``array.__new__`` with arguments " "``typecode``, ``initializer``." @@ -398,7 +394,6 @@ msgstr "" "encode(enc))`` 來新增 Unicode 資料到一個其他型別的陣列。" #: ../../library/array.rst:182 -#, fuzzy msgid "" "Return the smallest *i* such that *i* is the index of the first occurrence " "of *x* in the array. The optional arguments *start* and *stop* can be " @@ -410,7 +405,6 @@ msgstr "" "將導致 :exc:`ValueError` 。" #: ../../library/array.rst:187 -#, fuzzy msgid "Added optional *start* and *stop* parameters." msgstr "新增選擇性的參數 *start* 及 *stop* 。" @@ -469,7 +463,6 @@ msgstr "" "字串。" #: ../../library/array.rst:240 -#, fuzzy msgid "" "When an array object is printed or converted to a string, it is represented " "as ``array(typecode, initializer)``. The *initializer* is omitted if the " From 3f6f381d0e1cdd86acd40ec3f4470588c3f3dfe3 Mon Sep 17 00:00:00 2001 From: tomatoprinx Date: Fri, 19 Nov 2021 20:58:39 +0800 Subject: [PATCH 04/11] fix rst syntax render with space --- library/array.po | 84 +++++++++++++++++++++++++----------------------- 1 file changed, 43 insertions(+), 41 deletions(-) diff --git a/library/array.po b/library/array.po index 609d52953e..9d8d2abde8 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: 2021-11-13 23:09+0800\n" -"Last-Translator: Adrian Liaw \n" +"PO-Revision-Date: 2021-11-19 20:37+0800\n" +"Last-Translator: Benson Chen \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" "Language: zh_TW\n" @@ -35,8 +37,8 @@ msgid "" "following type codes are defined:" msgstr "" "這個模組定義了一個物件型別,可以簡潔的表達一個包含基本數值的陣列:字元、整" -"數、浮點數。陣列是一個非常類似 list(串列) 的序列型別,除了陣列會限制儲存的" -"物件型別。在建立陣列時可以使用一個字元的 :dfn:`type code` 來指定儲存的資料型" +"數、浮點數。陣列是一個非常類似 list(串列)的序列型別,除了陣列會限制儲存的物" +"件型別。在建立陣列時可以使用一個字元的 :dfn:`type code` 來指定儲存的資料型" "別。下面是 type codes 的定義。" #: ../../library/array.rst:19 @@ -205,7 +207,7 @@ msgstr "註解:" #: ../../library/array.rst:51 msgid "It can be 16 bits or 32 bits depending on the platform." -msgstr "根據平台的不同,他有可能是 16 位元 或者 32 位元。" +msgstr "根據平台的不同,他有可能是 16 位元或者 32 位元。" #: ../../library/array.rst:53 msgid "" @@ -214,7 +216,7 @@ msgid "" "``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`` " +"type。這個異動並沒有影響到他的作用,因爲自從 Python 3.3 開始 ``Py_UNICODE`` " "即為 ``wchar_t`` 的別名。" #: ../../library/array.rst:61 @@ -237,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 "" @@ -247,17 +249,17 @@ 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` 、 :meth:`frombytes` 或 :meth:`fromunicode` 方法(參照下方)將元素" -"新增到其中。其他型態的變數則會傳入 :meth:`extend` 方法初始化。" +"如果指定一個 list 或 string,新的陣列初始化時會傳入 :meth:`fromlist`\\ 、\\ :" +"meth:`frombytes` 或 :meth:`fromunicode` 方法(參照下方)將元素新增到其中。其" +"他型態的變數則會傳入 :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``." +"引發 :ref:`審核事件 (auditing event) ` ``array.__new__`` 並帶入引" +"數 ``typecode``, ``initializer``。" #: ../../library/array.rst:84 msgid "A string with all available type codes." @@ -272,10 +274,10 @@ 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 @@ -306,7 +308,7 @@ msgid "" "it." msgstr "" "回傳一個 tuple ``(address, length)`` 表示當前的記憶體位置和陣列儲存元素的緩衝" -"區記憶體長度。緩衝區的長度單位是 bytes ,並可以用 ``array.buffer_info()[1] * " +"區記憶體長度。緩衝區的長度單位是 bytes,並可以用 ``array.buffer_info()[1] * " "array.itemsize`` 計算得到。這偶爾會在底層操作需要記憶體位置的輸出輸入時很有" "用,例如 :c:func:`ioctl` 指令。只要陣列存在且沒有使用任何更改長度的操作時,回" "傳的數值就有效。" @@ -319,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 "" @@ -331,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." @@ -346,9 +348,9 @@ msgid "" "iterable and its elements must be the right type to be appended to the array." msgstr "" "從 *iterable* 中新增元素到陣列的尾端,如果 *iterable* 是另一個陣列,他必須有" -"完全相同的 type code ,如果不同會導致 :exc:`TypeError` 。如果 *iterable* 不是" -"一個陣列,他必須可以被迭代 (iterable) 且其中的元素必須是可以被加入陣列中的正" -"確型別。" +"完全相同的 type code ,如果不同會導致 :exc:`TypeError`\\ 。如果 *iterable* 不" +"是一個陣列,他必須可以被迭代 (iterable) 且其中的元素必須是可以被加入陣列中的" +"正確型別。" #: ../../library/array.rst:151 msgid "" @@ -361,7 +363,7 @@ msgstr "" #: ../../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 "" @@ -371,16 +373,16 @@ msgid "" "inserted into the array." msgstr "" "從 :term:`file object` *f* 讀取 *n* 個 machine value 類型的元素,接著將這些元" -"素加入陣列的最尾端。如果只有少於 *n* 個有效的元素會導致 :exc:`EOFError` ,但" -"有效的元素仍然會被加入陣列中。" +"素加入陣列的最尾端。如果只有少於 *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 "" @@ -402,17 +404,17 @@ msgid "" msgstr "" "回傳 *i* 的最小數值,使得 *i* 成為陣列之中第一次出現 *x* 的索引。選擇性的參" "數 *start* 及 *stop* 則可以被用來在指定的陣列空間中搜尋 *x* 。如果 *x* 不存在" -"將導致 :exc:`ValueError` 。" +"將導致 :exc:`ValueError`\\ 。" #: ../../library/array.rst:187 msgid "Added optional *start* and *stop* parameters." -msgstr "新增選擇性的參數 *start* 及 *stop* 。" +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 "" @@ -425,7 +427,7 @@ msgstr "" #: ../../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." @@ -442,15 +444,15 @@ msgstr "" #: ../../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 "將所有元素(以 machine code 的形式)寫入 :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 "" @@ -473,10 +475,10 @@ msgid "" "``from array import array``. Examples::" msgstr "" "當一個陣列物件被列印或轉換成字串時,他會被表示為 ``array(typecode, " -"initializer)`` 。若為空陣列則參數 *initializer* 被省略,若 *typecode* 是 " -"``’u’`` 將被表示為字串,其他情況則被表示為數字 list(串列)。只要 :class:" -"`~array.array` class(類別)透過 ``from array import array`` 的方式引入,使" -"用 :func:`eval` 便能確保其字串被轉換回一個擁有相同型別及數值的陣列。範例:\n" +"initializer)`` 。若為空陣列則參數 *initializer* 被省略,若 *typecode* 是 " +"``’u’`` 將被表示為字串,其他情況則被表示為數字 list。只要 :class:`~array." +"array` class(類別)透過 ``from array import array`` 的方式引入,使用 :func:" +"`eval` 便能確保其字串被轉換回一個擁有相同型別及數值的陣列。範例:\n" "\n" "::" From 7ff848ece431ec813d6ae6d9c8fe2e8398be3357 Mon Sep 17 00:00:00 2001 From: "Matt.Wang" Date: Sat, 20 Nov 2021 15:00:17 +0800 Subject: [PATCH 05/11] feat: translate for the term `buffer protocol` --- c-api/buffer.po | 2 +- c-api/objbuffer.po | 2 +- whatsnew/2.6.po | 2 +- whatsnew/3.3.po | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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/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" From b1d476d80849e5d2487766997fa2c4cfa3eebf59 Mon Sep 17 00:00:00 2001 From: Benson Date: Sun, 21 Nov 2021 18:36:46 +0800 Subject: [PATCH 06/11] fix based on review --- library/array.po | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/library/array.po b/library/array.po index 9d8d2abde8..10829105e8 100644 --- a/library/array.po +++ b/library/array.po @@ -12,7 +12,7 @@ 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: 2021-11-19 20:37+0800\n" +"PO-Revision-Date: 2021-11-21 16:39+0800\n" "Last-Translator: Benson Chen \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -25,7 +25,7 @@ msgstr "" #: ../../library/array.rst:2 msgid ":mod:`array` --- Efficient arrays of numeric values" -msgstr ":mod:`array` --- 高效率的數值型態陣列" +msgstr ":mod:`array` --- 高效率的數值型陣列" #: ../../library/array.rst:11 msgid "" @@ -39,7 +39,7 @@ msgstr "" "這個模組定義了一個物件型別,可以簡潔的表達一個包含基本數值的陣列:字元、整" "數、浮點數。陣列是一個非常類似 list(串列)的序列型別,除了陣列會限制儲存的物" "件型別。在建立陣列時可以使用一個字元的 :dfn:`type code` 來指定儲存的資料型" -"別。下面是 type codes 的定義。" +"別。以下為有被定義的 type codes:" #: ../../library/array.rst:19 msgid "Type code" @@ -239,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 "" @@ -251,15 +251,15 @@ msgid "" msgstr "" "如果指定一個 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``。" +"引發\\ :ref:`審核事件 (auditing event) ` ``array.__new__`` 並帶入引" +"數 ``typecode``、``initializer``。" #: ../../library/array.rst:84 msgid "A string with all available type codes." @@ -282,7 +282,7 @@ msgstr "" #: ../../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." @@ -460,7 +460,7 @@ 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:" +"將陣列轉為一個字串。陣列的型別必須為 ``u`` 。其他型別的陣列會導致 :exc:" "`ValueError` 錯誤。使用 ``array.tobytes().decode(enc)`` 將其他型別的陣列轉為" "字串。" @@ -476,15 +476,15 @@ msgid "" msgstr "" "當一個陣列物件被列印或轉換成字串時,他會被表示為 ``array(typecode, " "initializer)`` 。若為空陣列則參數 *initializer* 被省略,若 *typecode* 是 " -"``’u’`` 將被表示為字串,其他情況則被表示為數字 list。只要 :class:`~array." -"array` class(類別)透過 ``from array import array`` 的方式引入,使用 :func:" -"`eval` 便能確保其字串被轉換回一個擁有相同型別及數值的陣列。範例:\n" +"``’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." @@ -492,7 +492,7 @@ msgstr "將包含不同資料類型的二進位資料包裝與解開包裝。" #: ../../library/array.rst:261 msgid "Module :mod:`xdrlib`" -msgstr "模組 :mod:`xdrlib`" +msgstr ":mod:`xdrlib` 模組" #: ../../library/array.rst:260 msgid "" From 360dcf8cdeda2a7de996f035b950fb395a18dbb3 Mon Sep 17 00:00:00 2001 From: Benson Date: Sun, 21 Nov 2021 22:37:19 +0800 Subject: [PATCH 07/11] fix translate machine value --- library/array.po | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/library/array.po b/library/array.po index 10829105e8..d2bf112424 100644 --- a/library/array.po +++ b/library/array.po @@ -12,7 +12,7 @@ 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: 2021-11-21 16:39+0800\n" +"PO-Revision-Date: 2021-11-21 22:34+0800\n" "Last-Translator: Benson Chen \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -358,8 +358,8 @@ 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." @@ -372,9 +372,9 @@ 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 "" @@ -439,8 +439,8 @@ 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." @@ -448,7 +448,7 @@ 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." From aa5a6de175129b5a4cfaac20ab841a0d6952845a Mon Sep 17 00:00:00 2001 From: Benson Date: Mon, 22 Nov 2021 20:46:15 +0800 Subject: [PATCH 08/11] fix as review comment --- library/array.po | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/library/array.po b/library/array.po index d2bf112424..6ea47843ea 100644 --- a/library/array.po +++ b/library/array.po @@ -12,7 +12,7 @@ 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: 2021-11-21 22:34+0800\n" +"PO-Revision-Date: 2021-11-22 18:07+0800\n" "Last-Translator: Benson Chen \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -259,7 +259,7 @@ msgid "" "``typecode``, ``initializer``." msgstr "" "引發\\ :ref:`審核事件 (auditing event) ` ``array.__new__`` 並帶入引" -"數 ``typecode``、``initializer``。" +"數 ``typecode``\\ 、\\ ``initializer``\\。" #: ../../library/array.rst:84 msgid "A string with all available type codes." @@ -381,8 +381,8 @@ 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 "" @@ -403,8 +403,8 @@ msgid "" "`ValueError` if *x* is not found." msgstr "" "回傳 *i* 的最小數值,使得 *i* 成為陣列之中第一次出現 *x* 的索引。選擇性的參" -"數 *start* 及 *stop* 則可以被用來在指定的陣列空間中搜尋 *x* 。如果 *x* 不存在" -"將導致 :exc:`ValueError`\\ 。" +"數 *start* 及 *stop* 則可以被用來在指定的陣列空間中搜尋 *x*\\ 。如果 *x* 不存" +"在將導致 :exc:`ValueError`\\ 。" #: ../../library/array.rst:187 msgid "Added optional *start* and *stop* parameters." @@ -422,8 +422,8 @@ 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." @@ -460,7 +460,7 @@ 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:" +"將陣列轉為一個字串。陣列的型別必須為 ``u``\\ 。其他型別的陣列會導致 :exc:" "`ValueError` 錯誤。使用 ``array.tobytes().decode(enc)`` 將其他型別的陣列轉為" "字串。" @@ -475,7 +475,7 @@ msgid "" "``from array import array``. Examples::" msgstr "" "當一個陣列物件被列印或轉換成字串時,他會被表示為 ``array(typecode, " -"initializer)`` 。若為空陣列則參數 *initializer* 被省略,若 *typecode* 是 " +"initializer)``\\ 。若為空陣列則參數 *initializer* 被省略,若 *typecode* 是 " "``’u’`` 將被表示為字串,其他情況則被表示為由數字組成的 list。只要 :class:" "`~array.array` class(類別)透過 ``from array import array`` 的方式引入,便能" "確保該字串能透過 :func:`eval` 轉換回一個擁有相同型別及數值的陣列。範例:\n" From 59a1d3bda216da8ccf618c39425ca70bbf7962b6 Mon Sep 17 00:00:00 2001 From: Benson Date: Tue, 23 Nov 2021 18:36:06 +0800 Subject: [PATCH 09/11] fix review --- library/array.po | 62 +++++++----------------------------------------- 1 file changed, 8 insertions(+), 54 deletions(-) diff --git a/library/array.po b/library/array.po index 6ea47843ea..abec92e474 100644 --- a/library/array.po +++ b/library/array.po @@ -12,7 +12,7 @@ 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: 2021-11-22 18:07+0800\n" +"PO-Revision-Date: 2021-11-23 17:00+0800\n" "Last-Translator: Benson Chen \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -55,7 +55,7 @@ msgstr "Python Type" #: ../../library/array.rst:19 msgid "Minimum size in bytes" -msgstr "最小所需的位元組" +msgstr "所需的最小位元組 (bytes)" #: ../../library/array.rst:19 msgid "Notes" @@ -290,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." @@ -308,7 +308,7 @@ msgid "" "it." msgstr "" "回傳一個 tuple ``(address, length)`` 表示當前的記憶體位置和陣列儲存元素的緩衝" -"區記憶體長度。緩衝區的長度單位是 bytes,並可以用 ``array.buffer_info()[1] * " +"區記憶體長度。緩衝區的長度單位是位元組,並可以用 ``array.buffer_info()[1] * " "array.itemsize`` 計算得到。這偶爾會在底層操作需要記憶體位置的輸出輸入時很有" "用,例如 :c:func:`ioctl` 指令。只要陣列存在且沒有使用任何更改長度的操作時,回" "傳的數值就有效。" @@ -348,7 +348,7 @@ msgid "" "iterable and its elements must be the right type to be appended to the array." msgstr "" "從 *iterable* 中新增元素到陣列的尾端,如果 *iterable* 是另一個陣列,他必須有" -"完全相同的 type code ,如果不同會導致 :exc:`TypeError`\\ 。如果 *iterable* 不" +"完全相同的 type code,如果不同會導致 :exc:`TypeError`\\ 。如果 *iterable* 不" "是一個陣列,他必須可以被迭代 (iterable) 且其中的元素必須是可以被加入陣列中的" "正確型別。" @@ -363,7 +363,7 @@ msgstr "" #: ../../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 "" @@ -422,7 +422,7 @@ 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 @@ -431,7 +431,7 @@ msgstr "從陣列中刪除第一個出現的 *x*\\ 。" #: ../../library/array.rst:210 msgid "Reverse the order of the items in the array." -msgstr "將整個陣列的元素按照順序逆轉。" +msgstr "反轉陣列中元素的順序。" #: ../../library/array.rst:215 msgid "" @@ -509,49 +509,3 @@ 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` 方法的另一個(已經過時的)名字。" From b9a3dca91f7ebbd213d1d359487748d053aa6664 Mon Sep 17 00:00:00 2001 From: Benson Date: Tue, 23 Nov 2021 18:41:48 +0800 Subject: [PATCH 10/11] =?UTF-8?q?change=20the=20translation=20for=20it=20f?= =?UTF-8?q?rom=20"=E4=BB=96"=20to=20"=E5=AE=83"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/array.po | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/library/array.po b/library/array.po index abec92e474..ecd3517f4a 100644 --- a/library/array.po +++ b/library/array.po @@ -12,7 +12,7 @@ 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: 2021-11-23 17:00+0800\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" @@ -207,7 +207,7 @@ msgstr "註解:" #: ../../library/array.rst:51 msgid "It can be 16 bits or 32 bits depending on the platform." -msgstr "根據平台的不同,他有可能是 16 位元或者 32 位元。" +msgstr "根據平台的不同,它有可能是 16 位元或者 32 位元。" #: ../../library/array.rst:53 msgid "" @@ -216,7 +216,7 @@ msgid "" "``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`` " +"type。這個異動並沒有影響到它的作用,因爲自從 Python 3.3 開始 ``Py_UNICODE`` " "即為 ``wchar_t`` 的別名。" #: ../../library/array.rst:61 @@ -347,9 +347,9 @@ 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* 是另一個陣列,他必須有" +"從 *iterable* 中新增元素到陣列的尾端,如果 *iterable* 是另一個陣列,它必須有" "完全相同的 type code,如果不同會導致 :exc:`TypeError`\\ 。如果 *iterable* 不" -"是一個陣列,他必須可以被迭代 (iterable) 且其中的元素必須是可以被加入陣列中的" +"是一個陣列,它必須可以被迭代 (iterable) 且其中的元素必須是可以被加入陣列中的" "正確型別。" #: ../../library/array.rst:151 @@ -439,7 +439,7 @@ msgid "" "representation (the same sequence of bytes that would be written to a file " "by the :meth:`tofile` method.)" msgstr "" -"將陣列轉為另一個機器數值組成的陣列並回傳他的位元組表示(跟用 :meth:`tofile` " +"將陣列轉為另一個機器數值組成的陣列並回傳它的位元組表示(跟用 :meth:`tofile` " "方法寫入檔案時的位元序列相同)。" #: ../../library/array.rst:219 @@ -474,7 +474,7 @@ msgid "" "`eval`, so long as the :class:`~array.array` class has been imported using " "``from array import array``. Examples::" msgstr "" -"當一個陣列物件被列印或轉換成字串時,他會被表示為 ``array(typecode, " +"當一個陣列物件被列印或轉換成字串時,它會被表示為 ``array(typecode, " "initializer)``\\ 。若為空陣列則參數 *initializer* 被省略,若 *typecode* 是 " "``’u’`` 將被表示為字串,其他情況則被表示為由數字組成的 list。只要 :class:" "`~array.array` class(類別)透過 ``from array import array`` 的方式引入,便能" From ff3daf0480e80065f217dfe9f755751bfe7f5fd7 Mon Sep 17 00:00:00 2001 From: "Wei-Hsiang (Matt) Wang" Date: Thu, 9 Dec 2021 00:34:20 +0800 Subject: [PATCH 11/11] Apply suggestions from code review --- library/array.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/array.po b/library/array.po index ecd3517f4a..b6bc1bddea 100644 --- a/library/array.po +++ b/library/array.po @@ -258,7 +258,7 @@ msgid "" "Raises an :ref:`auditing event ` ``array.__new__`` with arguments " "``typecode``, ``initializer``." msgstr "" -"引發\\ :ref:`審核事件 (auditing event) ` ``array.__new__`` 並帶入引" +"引發\\ :ref:`稽核事件 (auditing event) ` ``array.__new__`` 並帶入引" "數 ``typecode``\\ 、\\ ``initializer``\\。" #: ../../library/array.rst:84 @@ -323,7 +323,7 @@ msgid "" msgstr "" "當使用來自 C 或 C++ 程式碼(這是唯一使得這個資訊有效的途徑)的陣列物件時,更" "適當的做法是使用陣列物件支援的緩衝區介面。這個方法維護了向後兼容性,並應該在" -"新的程式碼中避免。關於緩衝區介面的文件在 :ref:`bufferobjects`\\ 。" +"新的程式碼中避免。關於緩衝區介面的文件在\\ :ref:`bufferobjects`\\ 。" #: ../../library/array.rst:130 msgid "" @@ -402,7 +402,7 @@ msgid "" "specified to search for *x* within a subsection of the array. Raise :exc:" "`ValueError` if *x* is not found." msgstr "" -"回傳 *i* 的最小數值,使得 *i* 成為陣列之中第一次出現 *x* 的索引。選擇性的參" +"回傳 *i* 的最小數值,使得 *i* 成為陣列之中第一次出現 *x* 的索引。選擇性的引" "數 *start* 及 *stop* 則可以被用來在指定的陣列空間中搜尋 *x*\\ 。如果 *x* 不存" "在將導致 :exc:`ValueError`\\ 。"