From 96a24aa44792e69bfb8fdfc768aa3d4fa37b832a Mon Sep 17 00:00:00 2001 From: cschan Date: Thu, 29 Jun 2023 12:10:59 +0800 Subject: [PATCH 1/3] Translates more strings of heapq.po --- library/heapq.po | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/library/heapq.po b/library/heapq.po index 21b46cfbac..96cb81ee88 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-28 14:36+0800\n" +"PO-Revision-Date: 2023-06-29 12:10+0800\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -245,6 +245,8 @@ msgid "" "pushing all values onto a heap and then popping off the smallest values one " "at a time::" msgstr "" +"`堆積排序 `_\\ 可以透過將所有的值推入" +"一個堆積,並且從堆積中一個接一個彈出最小元素來實作:" #: ../../library/heapq.rst:151 msgid "" @@ -271,6 +273,8 @@ msgid "" "A `priority queue `_ is common " "use for a heap, and it presents several implementation challenges:" msgstr "" +"`優先佇列 `_\\ 是堆積的常見用途" +"之一,實作優先佇列伴隨著下列挑戰:" #: ../../library/heapq.rst:172 msgid "" @@ -322,6 +326,8 @@ msgid "" "wrapper class that ignores the task item and only compares the priority " "field::" msgstr "" +"task 無法比較的另一個解決方案是建立一個包裝類別,該類別忽略 task 項目,只比較" +"優先等級:" #: ../../library/heapq.rst:201 msgid "" @@ -362,6 +368,8 @@ msgid "" "The strange invariant above is meant to be an efficient memory " "representation for a tournament. The numbers below are *k*, not ``a[k]``::" msgstr "" +"上述乍看之下有些奇怪的不變式,是為了實作一個對記憶體來說有效率的方法,其表示" +"方式如同錦標賽一般。下列的數字為 *k*,而不是 ``a[k]``:" #: ../../library/heapq.rst:259 msgid "" @@ -375,6 +383,12 @@ msgid "" "two cells it tops contain three different items, but the top cell \"wins\" " "over the two topped cells." msgstr "" +"在上述的樹當中,每個單元 *k* 都會位在 ``2*k+1`` 與 ``2*k+2`` 上方。如同體育賽" +"事常見的錦標賽般,每個單元可視為其下方兩個單元當中的贏家,我們可以透過追溯整" +"棵樹來找到該贏家曾經對戰過的所有對手。然而,在許多電腦應用中,我們不需要追溯" +"贏家的完整對戰歷史。為了能更有效率地使用記憶體,當一個贏家晉級勝出時,我們用" +"下方較低層級的另一個項目來取代它,至此規則變為一個單元以及它下方兩個單元,包" +"含三個不同項目,但是最上方的單元「勝過」下方兩個單元。" #: ../../library/heapq.rst:268 msgid "" From 2e36dbe99a8d37eb7365924154f3074ee32299ab Mon Sep 17 00:00:00 2001 From: cschan Date: Thu, 29 Jun 2023 16:39:23 +0800 Subject: [PATCH 2/3] heapq: small fixes --- library/heapq.po | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/library/heapq.po b/library/heapq.po index 96cb81ee88..380ff9ea08 100644 --- a/library/heapq.po +++ b/library/heapq.po @@ -240,13 +240,14 @@ msgid "Basic Examples" msgstr "基礎範例" #: ../../library/heapq.rst:138 +#, fuzzy msgid "" "A `heapsort `_ can be implemented by " "pushing all values onto a heap and then popping off the smallest values one " "at a time::" msgstr "" -"`堆積排序 `_\\ 可以透過將所有的值推入" -"一個堆積,並且從堆積中一個接一個彈出最小元素來實作:" +"`堆積排序 (heapsort) `_\\ 可以透過將" +"所有的值推入一個 heap,並且從 heap 中一個接一個彈出最小元素來實作:" #: ../../library/heapq.rst:151 msgid "" @@ -273,8 +274,8 @@ msgid "" "A `priority queue `_ is common " "use for a heap, and it presents several implementation challenges:" msgstr "" -"`優先佇列 `_\\ 是堆積的常見用途" -"之一,實作優先佇列伴隨著下列挑戰:" +"`優先佇列 (priority queue) `_\\ 是 heap 的常見用途之一,實作優先佇列伴隨著下列挑戰:" #: ../../library/heapq.rst:172 msgid "" @@ -326,8 +327,8 @@ msgid "" "wrapper class that ignores the task item and only compares the priority " "field::" msgstr "" -"task 無法比較的另一個解決方案是建立一個包裝類別,該類別忽略 task 項目,只比較" -"優先等級:" +"task 無法比較的另一個解決方案是建立一個包裝器類別,該類別忽略 task 項目,只比" +"較優先等級:" #: ../../library/heapq.rst:201 msgid "" @@ -383,7 +384,7 @@ msgid "" "two cells it tops contain three different items, but the top cell \"wins\" " "over the two topped cells." msgstr "" -"在上述的樹當中,每個單元 *k* 都會位在 ``2*k+1`` 與 ``2*k+2`` 上方。如同體育賽" +"在上面的樹當中,每個單元 *k* 都會位在 ``2*k+1`` 與 ``2*k+2`` 上方。如同體育賽" "事常見的錦標賽般,每個單元可視為其下方兩個單元當中的贏家,我們可以透過追溯整" "棵樹來找到該贏家曾經對戰過的所有對手。然而,在許多電腦應用中,我們不需要追溯" "贏家的完整對戰歷史。為了能更有效率地使用記憶體,當一個贏家晉級勝出時,我們用" From 19aaebb858ac95d1afe838aa937eee845fb7fb4c Mon Sep 17 00:00:00 2001 From: cschan Date: Thu, 29 Jun 2023 17:59:18 +0800 Subject: [PATCH 3/3] heapq: small fixes --- library/heapq.po | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/library/heapq.po b/library/heapq.po index 380ff9ea08..a64f8d6756 100644 --- a/library/heapq.po +++ b/library/heapq.po @@ -240,14 +240,13 @@ msgid "Basic Examples" msgstr "基礎範例" #: ../../library/heapq.rst:138 -#, fuzzy msgid "" "A `heapsort `_ can be implemented by " "pushing all values onto a heap and then popping off the smallest values one " "at a time::" msgstr "" -"`堆積排序 (heapsort) `_\\ 可以透過將" -"所有的值推入一個 heap,並且從 heap 中一個接一個彈出最小元素來實作:" +"`堆積排序 (heapsort) `_ 可以透過將所" +"有的值推入一個 heap,並且從 heap 中一個接一個彈出最小元素來實作:" #: ../../library/heapq.rst:151 msgid "" @@ -267,15 +266,15 @@ msgstr "" #: ../../library/heapq.rst:167 msgid "Priority Queue Implementation Notes" -msgstr "優先佇列 (Priority Queue) 實作細節" +msgstr "優先佇列實作細節" #: ../../library/heapq.rst:169 msgid "" "A `priority queue `_ is common " "use for a heap, and it presents several implementation challenges:" msgstr "" -"`優先佇列 (priority queue) `_\\ 是 heap 的常見用途之一,實作優先佇列伴隨著下列挑戰:" +"`優先佇列 (priority queue) `_ " +"是 heap 的常見用途之一,實作優先佇列伴隨著下列挑戰:" #: ../../library/heapq.rst:172 msgid ""