Skip to content

Translate bisect.po (#305) #306

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 20 additions & 11 deletions library/bisect.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: Python 3.10\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-05-21 17:35+0000\n"
"PO-Revision-Date: 2017-09-22 18:26+0000\n"
"PO-Revision-Date: 2022-08-27 16:41+0800\n"
"Last-Translator: Liang-Bo Wang <me@liang2.tw>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
"tw)\n"
Expand All @@ -18,6 +18,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.1.1\n"

#: ../../library/bisect.rst:2
msgid ":mod:`bisect` --- Array bisection algorithm"
Expand Down Expand Up @@ -45,7 +46,7 @@ msgstr ""

#: ../../library/bisect.rst:21
msgid "The following functions are provided:"
msgstr "此模組提供下面的函式"
msgstr "此模組提供下面的函式"

#: ../../library/bisect.rst:26
msgid ""
Expand All @@ -56,10 +57,10 @@ msgid ""
"existing entries. The return value is suitable for use as the first "
"parameter to ``list.insert()`` assuming that *a* is already sorted."
msgstr ""
"在 *a* 當中找到一個位置,讓 *x* 插入後 *a* 仍然是排序好的。參數 *lo* 和 "
"*hi* 用來指定 list 中應該被考慮的子區間,預設是考慮整個 list 。如果 *a* 裡面"
"已經有 *x* 出現,插入的位置會在所有 *x* 的前面(左邊)。回傳值可以被當作 "
"``list.insert()`` 的第一個參數,但列表 *a* 必須先排序過。"
"在 *a* 當中找到一個位置,讓 *x* 插入後 *a* 仍然是排序好的。參數 *lo* 和 *hi* "
"用來指定 list 中應該被考慮的子區間,預設是考慮整個 list 。如果 *a* 裡面已經"
" *x* 出現,插入的位置會在所有 *x* 的前面(左邊)。回傳值可以被當作 ``list."
"insert()`` 的第一個參數,但列表 *a* 必須先排序過。"

#: ../../library/bisect.rst:33
msgid ""
Expand All @@ -76,12 +77,15 @@ msgid ""
"extract a comparison key from each element in the array. To support "
"searching complex records, the key function is not applied to the *x* value."
msgstr ""
"*key* 可指定一個單一參數的 :term:`key function`。函式將套用此 function 在陣列"
"所有元素以得到比較值來計算順位。注意此 function 只會套用在陣列中的元素,不會"
"套用在 *x*。"

#: ../../library/bisect.rst:41 ../../library/bisect.rst:62
msgid ""
"If *key* is ``None``, the elements are compared directly with no intervening "
"function call."
msgstr ""
msgstr "若 *key* 為 ``None``,則排序順位將直接以陣列中元素值決定。"

#: ../../library/bisect.rst:44 ../../library/bisect.rst:65
#: ../../library/bisect.rst:83 ../../library/bisect.rst:103
Expand All @@ -107,26 +111,29 @@ msgstr ""

#: ../../library/bisect.rst:71
msgid "Insert *x* in *a* in sorted order."
msgstr ""
msgstr "將元素 *x* 插入 list *a*,並維持順序。"

#: ../../library/bisect.rst:73
msgid ""
"This function first runs :func:`bisect_left` to locate an insertion point. "
"Next, it runs the :meth:`insert` method on *a* to insert *x* at the "
"appropriate position to maintain sort order."
msgstr ""
"此函式先使用 :func:`bisect_left` 搜索插入位置,接著用 :meth:`insert` 將 *x* "
"插入,以能維持添加元素後的順序。"

#: ../../library/bisect.rst:77 ../../library/bisect.rst:97
msgid ""
"To support inserting records in a table, the *key* function (if any) is "
"applied to *x* for the search step but not for the insertion step."
msgstr ""
msgstr "此函式只有在搜索時會使用 *key* 函式,插入時不會。"

#: ../../library/bisect.rst:80 ../../library/bisect.rst:100
msgid ""
"Keep in mind that the ``O(log n)`` search is dominated by the slow O(n) "
"insertion step."
msgstr ""
"注意雖然搜索是 ``O(log n)``,但插入是 O(n),因此此函式整體時間複雜度是 O(n)。"

#: ../../library/bisect.rst:90
msgid ""
Expand All @@ -142,10 +149,12 @@ msgid ""
"Next, it runs the :meth:`insert` method on *a* to insert *x* at the "
"appropriate position to maintain sort order."
msgstr ""
"此函式先使用 :func:`bisect_right` 搜索插入位置,接著用 :meth:`insert` 將 *x* "
"插入,以能維持添加元素後的順序。"

#: ../../library/bisect.rst:108
msgid "Performance Notes"
msgstr ""
msgstr "效能考量"

#: ../../library/bisect.rst:110
msgid ""
Expand Down Expand Up @@ -194,7 +203,7 @@ msgstr ""

#: ../../library/bisect.rst:141
msgid "Searching Sorted Lists"
msgstr ""
msgstr "搜尋一個已排序的 list"

#: ../../library/bisect.rst:143
msgid ""
Expand Down