From 0714c056e2268215fef42f994368a785deb74e97 Mon Sep 17 00:00:00 2001 From: cschan Date: Tue, 27 Jun 2023 15:16:00 +0800 Subject: [PATCH 1/4] Updates and enhances translation for library/heaps.po --- library/heapq.po | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/library/heapq.po b/library/heapq.po index f99b75b778..7e4fddfd2f 100644 --- a/library/heapq.po +++ b/library/heapq.po @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-10-19 17:24+0800\n" -"PO-Revision-Date: 2017-09-22 18:26+0000\n" +"PO-Revision-Date: 2023-06-27 14:42+0800\n" "Last-Translator: Liang-Bo Wang \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.3.2\n" #: ../../library/heapq.rst:2 msgid ":mod:`heapq` --- Heap queue algorithm" @@ -181,22 +182,21 @@ msgstr "" "一個比較的依據。預設的值是 ``None`` (直接比較元素)。" #: ../../library/heapq.rst:102 -#, fuzzy msgid "" "*reverse* is a boolean value. If set to ``True``, then the input elements " "are merged as if each comparison were reversed. To achieve behavior similar " "to ``sorted(itertools.chain(*iterables), reverse=True)``, all iterables must " "be sorted from largest to smallest." msgstr "" -"*reverse* 是一個布林值。如果設定為 ``True`` ,那輸入的元素被 merge 時每一個比" -"較結果都是相反的。" +"*reverse* 是一個布林值,如果設定為 ``True`` ,則輸入的元素將以相反的比較順序" +"進行合併。為了達成類似 ``sorted(itertools.chain(*iterables), reverse=True)`` " +"的行為,所有 ``iterables`` 必須由大到小排序。" #: ../../library/heapq.rst:107 msgid "Added the optional *key* and *reverse* parameters." msgstr "加入選用參數 *key* 和 *reverse* 。" #: ../../library/heapq.rst:113 -#, fuzzy msgid "" "Return a list with the *n* largest elements from the dataset defined by " "*iterable*. *key*, if provided, specifies a function of one argument that " @@ -205,12 +205,11 @@ msgid "" "reverse=True)[:n]``." msgstr "" "回傳一個包含資料 *iterable* 中前 *n* 大元素的 list 。如果有指定 *key* 參數," -"*key* 會是只有一個參數的函式,用來從每一個 *iterable* 的元素中決定一個比較的" -"依據:``key=str.lower`` 等價於 ``sorted(iterable, key=key, reverse=True)[:" -"n]``" +"*key* 會是只有一個參數的函式,用來為每一個在 *iterable* 中的元素提供一個比較" +"的依據(例如 ``key=str.lower`` )。效果相當於 ``sorted(iterable, key=key, " +"reverse=True)[:n]`` 。" #: ../../library/heapq.rst:122 -#, fuzzy msgid "" "Return a list with the *n* smallest elements from the dataset defined by " "*iterable*. *key*, if provided, specifies a function of one argument that " @@ -219,8 +218,9 @@ msgid "" "n]``." msgstr "" "回傳一個包含資料 *iterable* 中前 *n* 小元素的 list 。如果有指定 *key* 參數," -"*key* 會是只有一個參數的函式,用來從每一個 *iterable* 的元素中決定一個比較的" -"依據:``key=str.lower`` 等價於 ``sorted(iterable, key=key)[:n]``" +"*key* 會是只有一個參數的函式,用來為每一個在 *iterable* 中的元素提供一個比較" +"的依據(例如 ``key=str.lower`` )。效果相當於 ``sorted(iterable, key=key)[:" +"n]`` 。" #: ../../library/heapq.rst:128 msgid "" @@ -390,13 +390,13 @@ msgstr "" #: ../../library/heapq.rst:275 msgid "" "A nice feature of this sort is that you can efficiently insert new items " -"while the sort is going on, provided that the inserted items are not \"better" -"\" than the last 0'th element you extracted. This is especially useful in " -"simulation contexts, where the tree holds all incoming events, and the \"win" -"\" condition means the smallest scheduled time. When an event schedules " -"other events for execution, they are scheduled into the future, so they can " -"easily go into the heap. So, a heap is a good structure for implementing " -"schedulers (this is what I used for my MIDI sequencer :-)." +"while the sort is going on, provided that the inserted items are not " +"\"better\" than the last 0'th element you extracted. This is especially " +"useful in simulation contexts, where the tree holds all incoming events, and " +"the \"win\" condition means the smallest scheduled time. When an event " +"schedules other events for execution, they are scheduled into the future, so " +"they can easily go into the heap. So, a heap is a good structure for " +"implementing schedulers (this is what I used for my MIDI sequencer :-)." msgstr "" #: ../../library/heapq.rst:284 From fd12376af5b31b74dd1d57859344044911bf798f Mon Sep 17 00:00:00 2001 From: cschan Date: Wed, 28 Jun 2023 14:37:55 +0800 Subject: [PATCH 2/4] Updates and enhances translation for library/heaps.po --- library/heapq.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/heapq.po b/library/heapq.po index 7e4fddfd2f..ce5bd7708c 100644 --- a/library/heapq.po +++ b/library/heapq.po @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-10-19 17:24+0800\n" -"PO-Revision-Date: 2023-06-27 14:42+0800\n" +"PO-Revision-Date: 2023-06-28 14:36+0800\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -190,7 +190,7 @@ msgid "" msgstr "" "*reverse* 是一個布林值,如果設定為 ``True`` ,則輸入的元素將以相反的比較順序" "進行合併。為了達成類似 ``sorted(itertools.chain(*iterables), reverse=True)`` " -"的行為,所有 ``iterables`` 必須由大到小排序。" +"的行為,所有 iterables 必須由大到小排序。" #: ../../library/heapq.rst:107 msgid "Added the optional *key* and *reverse* parameters." @@ -205,7 +205,7 @@ msgid "" "reverse=True)[:n]``." msgstr "" "回傳一個包含資料 *iterable* 中前 *n* 大元素的 list 。如果有指定 *key* 參數," -"*key* 會是只有一個參數的函式,用來為每一個在 *iterable* 中的元素提供一個比較" +"*key* 會是只有一個引數的函式,用來從每一個在 *iterable* 中的元素提取一個比較" "的依據(例如 ``key=str.lower`` )。效果相當於 ``sorted(iterable, key=key, " "reverse=True)[:n]`` 。" @@ -218,7 +218,7 @@ msgid "" "n]``." msgstr "" "回傳一個包含資料 *iterable* 中前 *n* 小元素的 list 。如果有指定 *key* 參數," -"*key* 會是只有一個參數的函式,用來為每一個在 *iterable* 中的元素提供一個比較" +"*key* 會是只有一個引數的函式,用來從每一個在 *iterable* 中的元素提取一個比較" "的依據(例如 ``key=str.lower`` )。效果相當於 ``sorted(iterable, key=key)[:" "n]`` 。" From 3326e2f17dccfea0c24dd90e419d32791c95db4f Mon Sep 17 00:00:00 2001 From: cschan <45995789+cschan1828@users.noreply.github.com> Date: Wed, 28 Jun 2023 14:50:40 +0800 Subject: [PATCH 3/4] Update library/heapq.po Co-authored-by: Wei-Hsiang (Matt) Wang --- library/heapq.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/heapq.po b/library/heapq.po index ce5bd7708c..5ecf08abd4 100644 --- a/library/heapq.po +++ b/library/heapq.po @@ -204,7 +204,7 @@ msgid "" "example, ``key=str.lower``). Equivalent to: ``sorted(iterable, key=key, " "reverse=True)[:n]``." msgstr "" -"回傳一個包含資料 *iterable* 中前 *n* 大元素的 list 。如果有指定 *key* 參數," +"回傳一個包含資料 *iterable* 中前 *n* 大元素的 list 。如果有指定 *key* 引數," "*key* 會是只有一個引數的函式,用來從每一個在 *iterable* 中的元素提取一個比較" "的依據(例如 ``key=str.lower`` )。效果相當於 ``sorted(iterable, key=key, " "reverse=True)[:n]`` 。" From 428cf51425c63ee7cbe1b70c0ded408e30aa8d9a Mon Sep 17 00:00:00 2001 From: cschan <45995789+cschan1828@users.noreply.github.com> Date: Wed, 28 Jun 2023 14:56:21 +0800 Subject: [PATCH 4/4] Update heapq.po --- library/heapq.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/heapq.po b/library/heapq.po index 5ecf08abd4..21b46cfbac 100644 --- a/library/heapq.po +++ b/library/heapq.po @@ -217,7 +217,7 @@ msgid "" "example, ``key=str.lower``). Equivalent to: ``sorted(iterable, key=key)[:" "n]``." msgstr "" -"回傳一個包含資料 *iterable* 中前 *n* 小元素的 list 。如果有指定 *key* 參數," +"回傳一個包含資料 *iterable* 中前 *n* 小元素的 list 。如果有指定 *key* 引數," "*key* 會是只有一個引數的函式,用來從每一個在 *iterable* 中的元素提取一個比較" "的依據(例如 ``key=str.lower`` )。效果相當於 ``sorted(iterable, key=key)[:" "n]`` 。"