From 2796362b314aef70934e36fbcb2b71b438936696 Mon Sep 17 00:00:00 2001 From: "Matt.Wang" Date: Thu, 27 Jan 2022 21:33:21 +0800 Subject: [PATCH 1/2] translate `library/asyncio-api-index.po` --- library/asyncio-api-index.po | 124 +++++++++++++++++++---------------- 1 file changed, 69 insertions(+), 55 deletions(-) diff --git a/library/asyncio-api-index.po b/library/asyncio-api-index.po index 49577bd2a0..87dc3b9075 100644 --- a/library/asyncio-api-index.po +++ b/library/asyncio-api-index.po @@ -1,40 +1,43 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2022, Python Software Foundation # This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. # -#, fuzzy +# Translators: +# Matt Wang , 2022 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: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2022-01-27 21:25+0800\n" +"Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" "Language: zh_TW\n" "MIME-Version: 1.0\n" "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.1\n" #: ../../library/asyncio-api-index.rst:6 msgid "High-level API Index" -msgstr "" +msgstr "高階 API 索引" #: ../../library/asyncio-api-index.rst:8 msgid "This page lists all high-level async/await enabled asyncio APIs." -msgstr "" +msgstr "這個頁面列出了所有能使用 async/wait 的高階 asyncio API。" #: ../../library/asyncio-api-index.rst:12 msgid "Tasks" -msgstr "" +msgstr "任務 (Tasks)" #: ../../library/asyncio-api-index.rst:14 msgid "" "Utilities to run asyncio programs, create Tasks, and await on multiple " "things with timeouts." msgstr "" +"用於執行非同步程式、建立 Task 物件、帶有超時 (timeout) 設定地等待多個事件的工" +"具程式。" #: ../../library/asyncio-api-index.rst:21 msgid ":func:`run`" @@ -42,7 +45,7 @@ msgstr ":func:`run`" #: ../../library/asyncio-api-index.rst:22 msgid "Create event loop, run a coroutine, close the loop." -msgstr "" +msgstr "建立事件迴圈 (event loop)、執行一個協程 (coroutine)、關閉事件迴圈。" #: ../../library/asyncio-api-index.rst:24 msgid ":func:`create_task`" @@ -50,7 +53,7 @@ msgstr ":func:`create_task`" #: ../../library/asyncio-api-index.rst:25 msgid "Start an asyncio Task." -msgstr "" +msgstr "啟動一個 asyncio 的 Task 物件。" #: ../../library/asyncio-api-index.rst:27 msgid "``await`` :func:`sleep`" @@ -58,7 +61,7 @@ msgstr "``await`` :func:`sleep`" #: ../../library/asyncio-api-index.rst:28 msgid "Sleep for a number of seconds." -msgstr "" +msgstr "休眠數秒鐘。" #: ../../library/asyncio-api-index.rst:30 msgid "``await`` :func:`gather`" @@ -66,7 +69,7 @@ msgstr "``await`` :func:`gather`" #: ../../library/asyncio-api-index.rst:31 msgid "Schedule and wait for things concurrently." -msgstr "" +msgstr "並行 (concurrent) 地執行事件的排程與等待。" #: ../../library/asyncio-api-index.rst:33 msgid "``await`` :func:`wait_for`" @@ -74,7 +77,7 @@ msgstr "``await`` :func:`wait_for`" #: ../../library/asyncio-api-index.rst:34 msgid "Run with a timeout." -msgstr "" +msgstr "有超時設置的執行。" #: ../../library/asyncio-api-index.rst:36 msgid "``await`` :func:`shield`" @@ -82,7 +85,7 @@ msgstr "``await`` :func:`shield`" #: ../../library/asyncio-api-index.rst:37 msgid "Shield from cancellation." -msgstr "" +msgstr "屏蔽取消操作。" #: ../../library/asyncio-api-index.rst:39 msgid "``await`` :func:`wait`" @@ -90,7 +93,7 @@ msgstr "``await`` :func:`wait`" #: ../../library/asyncio-api-index.rst:40 msgid "Monitor for completion." -msgstr "" +msgstr "監控完成情況。" #: ../../library/asyncio-api-index.rst:42 msgid ":func:`current_task`" @@ -98,7 +101,7 @@ msgstr ":func:`current_task`" #: ../../library/asyncio-api-index.rst:43 msgid "Return the current Task." -msgstr "" +msgstr "回傳當前 Task 物件。" #: ../../library/asyncio-api-index.rst:45 msgid ":func:`all_tasks`" @@ -106,7 +109,7 @@ msgstr ":func:`all_tasks`" #: ../../library/asyncio-api-index.rst:46 msgid "Return all tasks for an event loop." -msgstr "" +msgstr "回傳事件迴圈中所有的 task 物件。" #: ../../library/asyncio-api-index.rst:48 msgid ":class:`Task`" @@ -114,7 +117,7 @@ msgstr ":class:`Task`" #: ../../library/asyncio-api-index.rst:49 msgid "Task object." -msgstr "" +msgstr "Task 物件。" #: ../../library/asyncio-api-index.rst:51 msgid ":func:`to_thread`" @@ -122,7 +125,7 @@ msgstr ":func:`to_thread`" #: ../../library/asyncio-api-index.rst:52 msgid "Asynchronously run a function in a separate OS thread." -msgstr "" +msgstr "在不同的 OS 執行緒 (thread) 中非同步地執行一個函式。" #: ../../library/asyncio-api-index.rst:54 msgid ":func:`run_coroutine_threadsafe`" @@ -130,7 +133,7 @@ msgstr ":func:`run_coroutine_threadsafe`" #: ../../library/asyncio-api-index.rst:55 msgid "Schedule a coroutine from another OS thread." -msgstr "" +msgstr "從其他 OS 執行緒中為一個協程排程。" #: ../../library/asyncio-api-index.rst:57 msgid "``for in`` :func:`as_completed`" @@ -138,7 +141,7 @@ msgstr "``for in`` :func:`as_completed`" #: ../../library/asyncio-api-index.rst:58 msgid "Monitor for completion with a ``for`` loop." -msgstr "" +msgstr "用 ``for`` 迴圈來監控完成情況。" #: ../../library/asyncio-api-index.rst:62 #: ../../library/asyncio-api-index.rst:98 @@ -154,34 +157,39 @@ msgid "" ":ref:`Using asyncio.gather() to run things in parallel " "`." msgstr "" +":ref:`使用 asyncio.gather() 平行 (parallel) 執行 `" +"\\ 。" #: ../../library/asyncio-api-index.rst:66 msgid "" ":ref:`Using asyncio.wait_for() to enforce a timeout " "`." msgstr "" +":ref:`使用 asyncio.wait_for() 強制設置超時 `\\ 。" #: ../../library/asyncio-api-index.rst:69 msgid ":ref:`Cancellation `." -msgstr "" +msgstr ":ref:`取消任務 `\\ 。" #: ../../library/asyncio-api-index.rst:71 msgid ":ref:`Using asyncio.sleep() `." -msgstr "" +msgstr ":ref:`使用 asyncio.sleep() `\\ 。" #: ../../library/asyncio-api-index.rst:73 msgid "See also the main :ref:`Tasks documentation page `." -msgstr "" +msgstr "請參閱 :ref:`Tasks 文件頁面 `\\ 。" #: ../../library/asyncio-api-index.rst:77 msgid "Queues" -msgstr "" +msgstr "佇列 (Queues)" #: ../../library/asyncio-api-index.rst:79 msgid "" "Queues should be used to distribute work amongst multiple asyncio Tasks, " "implement connection pools, and pub/sub patterns." msgstr "" +"佇列應被用於為多個 asyncio Task 物件分配工作、實作 connection pools(連線池)" +"以及 pub/sub(發行/訂閱)模式。" #: ../../library/asyncio-api-index.rst:87 msgid ":class:`Queue`" @@ -189,7 +197,7 @@ msgstr ":class:`Queue`" #: ../../library/asyncio-api-index.rst:88 msgid "A FIFO queue." -msgstr "" +msgstr "一個先進先出 (FIFO) 佇列。" #: ../../library/asyncio-api-index.rst:90 msgid ":class:`PriorityQueue`" @@ -197,7 +205,7 @@ msgstr ":class:`PriorityQueue`" #: ../../library/asyncio-api-index.rst:91 msgid "A priority queue." -msgstr "" +msgstr "一個優先佇列 (priority queue)。" #: ../../library/asyncio-api-index.rst:93 msgid ":class:`LifoQueue`" @@ -205,25 +213,27 @@ msgstr ":class:`LifoQueue`" #: ../../library/asyncio-api-index.rst:94 msgid "A LIFO queue." -msgstr "" +msgstr "一個後進先出 (LIFO) 佇列。" #: ../../library/asyncio-api-index.rst:99 msgid "" ":ref:`Using asyncio.Queue to distribute workload between several Tasks " "`." msgstr "" +":ref:`使用 asyncio.Queue 為多個 Task 分配工作 `" +"\\ 。" #: ../../library/asyncio-api-index.rst:102 msgid "See also the :ref:`Queues documentation page `." -msgstr "" +msgstr "請參閱\\ :ref:`佇列文件頁面 `\\ 。" #: ../../library/asyncio-api-index.rst:106 msgid "Subprocesses" -msgstr "" +msgstr "子行程 (Subprocesses)" #: ../../library/asyncio-api-index.rst:108 msgid "Utilities to spawn subprocesses and run shell commands." -msgstr "" +msgstr "用於生成子行程和執行 shell 指令的工具程式。" #: ../../library/asyncio-api-index.rst:114 msgid "``await`` :func:`create_subprocess_exec`" @@ -231,7 +241,7 @@ msgstr "``await`` :func:`create_subprocess_exec`" #: ../../library/asyncio-api-index.rst:115 msgid "Create a subprocess." -msgstr "" +msgstr "建立一個子行程。" #: ../../library/asyncio-api-index.rst:117 msgid "``await`` :func:`create_subprocess_shell`" @@ -239,23 +249,23 @@ msgstr "``await`` :func:`create_subprocess_shell`" #: ../../library/asyncio-api-index.rst:118 msgid "Run a shell command." -msgstr "" +msgstr "執行一個 shell 命令。" #: ../../library/asyncio-api-index.rst:123 msgid ":ref:`Executing a shell command `." -msgstr "" +msgstr ":ref:`執行一個 shell 指令 `\\ 。" #: ../../library/asyncio-api-index.rst:125 msgid "See also the :ref:`subprocess APIs ` documentation." -msgstr "" +msgstr "請參閱\\ :ref:`子行程 APIs ` 相關文件。" #: ../../library/asyncio-api-index.rst:130 msgid "Streams" -msgstr "" +msgstr "串流 (Streams)" #: ../../library/asyncio-api-index.rst:132 msgid "High-level APIs to work with network IO." -msgstr "" +msgstr "用於網路 IO 處理的高階 API。" #: ../../library/asyncio-api-index.rst:138 msgid "``await`` :func:`open_connection`" @@ -263,7 +273,7 @@ msgstr "``await`` :func:`open_connection`" #: ../../library/asyncio-api-index.rst:139 msgid "Establish a TCP connection." -msgstr "" +msgstr "建立一個 TCP 連線。" #: ../../library/asyncio-api-index.rst:141 msgid "``await`` :func:`open_unix_connection`" @@ -271,7 +281,7 @@ msgstr "``await`` :func:`open_unix_connection`" #: ../../library/asyncio-api-index.rst:142 msgid "Establish a Unix socket connection." -msgstr "" +msgstr "建立一個 Unix socket 連線。" #: ../../library/asyncio-api-index.rst:144 msgid "``await`` :func:`start_server`" @@ -279,7 +289,7 @@ msgstr "``await`` :func:`start_server`" #: ../../library/asyncio-api-index.rst:145 msgid "Start a TCP server." -msgstr "" +msgstr "啟動一個 TCP 伺服器。" #: ../../library/asyncio-api-index.rst:147 msgid "``await`` :func:`start_unix_server`" @@ -287,7 +297,7 @@ msgstr "``await`` :func:`start_unix_server`" #: ../../library/asyncio-api-index.rst:148 msgid "Start a Unix socket server." -msgstr "" +msgstr "啟動一個 Unix socket 伺服器。" #: ../../library/asyncio-api-index.rst:150 msgid ":class:`StreamReader`" @@ -295,7 +305,7 @@ msgstr ":class:`StreamReader`" #: ../../library/asyncio-api-index.rst:151 msgid "High-level async/await object to receive network data." -msgstr "" +msgstr "接收網路資料的高階 async/await 物件。" #: ../../library/asyncio-api-index.rst:153 msgid ":class:`StreamWriter`" @@ -303,23 +313,23 @@ msgstr ":class:`StreamWriter`" #: ../../library/asyncio-api-index.rst:154 msgid "High-level async/await object to send network data." -msgstr "" +msgstr "傳送網路資料的高階 async/await 物件。" #: ../../library/asyncio-api-index.rst:159 msgid ":ref:`Example TCP client `." -msgstr "" +msgstr ":ref:`TCP 客戶端範例 `\\ 。" #: ../../library/asyncio-api-index.rst:161 msgid "See also the :ref:`streams APIs ` documentation." -msgstr "" +msgstr "請參閱\\ :ref:`串流 APIs ` 文件。" #: ../../library/asyncio-api-index.rst:166 msgid "Synchronization" -msgstr "" +msgstr "同步化 (Synchronization)" #: ../../library/asyncio-api-index.rst:168 msgid "Threading-like synchronization primitives that can be used in Tasks." -msgstr "" +msgstr "類似執行緒且能被用於 Task 中的同步化原始物件 (primitive)。" #: ../../library/asyncio-api-index.rst:174 msgid ":class:`Lock`" @@ -327,7 +337,7 @@ msgstr ":class:`Lock`" #: ../../library/asyncio-api-index.rst:175 msgid "A mutex lock." -msgstr "" +msgstr "一個互斥鎖 (mutex lock)。" #: ../../library/asyncio-api-index.rst:177 msgid ":class:`Event`" @@ -335,7 +345,7 @@ msgstr ":class:`Event`" #: ../../library/asyncio-api-index.rst:178 msgid "An event object." -msgstr "" +msgstr "一個事件物件。" #: ../../library/asyncio-api-index.rst:180 msgid ":class:`Condition`" @@ -343,7 +353,7 @@ msgstr ":class:`Condition`" #: ../../library/asyncio-api-index.rst:181 msgid "A condition object." -msgstr "" +msgstr "一個條件物件。" #: ../../library/asyncio-api-index.rst:183 msgid ":class:`Semaphore`" @@ -351,7 +361,7 @@ msgstr ":class:`Semaphore`" #: ../../library/asyncio-api-index.rst:184 msgid "A semaphore." -msgstr "" +msgstr "一個訊號量物件。" #: ../../library/asyncio-api-index.rst:186 msgid ":class:`BoundedSemaphore`" @@ -359,7 +369,7 @@ msgstr ":class:`BoundedSemaphore`" #: ../../library/asyncio-api-index.rst:187 msgid "A bounded semaphore." -msgstr "" +msgstr "一個有界的訊號量物件。" #: ../../library/asyncio-api-index.rst:192 msgid ":ref:`Using asyncio.Event `." @@ -369,7 +379,7 @@ msgstr ":ref:`使用 asyncio.Event `。" msgid "" "See also the documentation of asyncio :ref:`synchronization primitives " "`." -msgstr "" +msgstr "請參閱 asyncio 關於\\ :ref:`同步化原始物件 `\\ 的文件。" #: ../../library/asyncio-api-index.rst:199 msgid "Exceptions" @@ -385,6 +395,8 @@ msgid "" "``asyncio.TimeoutError`` is **unrelated** to the built-in :exc:" "`TimeoutError` exception." msgstr "" +"在像是 :func:`wait_for` 等函式超時的時候被引發。請注意 ``asyncio." +"TimeoutError`` 與內建例外 :exc:`TimeoutError` **無關**\\ 。" #: ../../library/asyncio-api-index.rst:211 msgid ":exc:`asyncio.CancelledError`" @@ -392,16 +404,18 @@ msgstr ":exc:`asyncio.CancelledError`" #: ../../library/asyncio-api-index.rst:212 msgid "Raised when a Task is cancelled. See also :meth:`Task.cancel`." -msgstr "" +msgstr "當一 Task 物件被取消時被引發。請參閱 :meth:`Task.cancel`\\ 。" #: ../../library/asyncio-api-index.rst:217 msgid "" ":ref:`Handling CancelledError to run code on cancellation request " "`." msgstr "" +":ref:`在取消請求發生的程式中處理 CancelledError 例外 " +"`\\ 。" #: ../../library/asyncio-api-index.rst:220 msgid "" "See also the full list of :ref:`asyncio-specific exceptions `." -msgstr "" +msgstr "請參閱 :ref:`asyncio 專用例外 `\\ 完整列表。" From ecf82b76877e1752ecb439967bd99d5f119cd7a9 Mon Sep 17 00:00:00 2001 From: "Wei-Hsiang (Matt) Wang" Date: Wed, 9 Feb 2022 13:22:24 +0800 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Josix --- library/asyncio-api-index.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/asyncio-api-index.po b/library/asyncio-api-index.po index 87dc3b9075..81a2db988e 100644 --- a/library/asyncio-api-index.po +++ b/library/asyncio-api-index.po @@ -233,7 +233,7 @@ msgstr "子行程 (Subprocesses)" #: ../../library/asyncio-api-index.rst:108 msgid "Utilities to spawn subprocesses and run shell commands." -msgstr "用於生成子行程和執行 shell 指令的工具程式。" +msgstr "用於衍生(spawn)子行程和執行 shell 指令的工具程式。" #: ../../library/asyncio-api-index.rst:114 msgid "``await`` :func:`create_subprocess_exec`" @@ -361,7 +361,7 @@ msgstr ":class:`Semaphore`" #: ../../library/asyncio-api-index.rst:184 msgid "A semaphore." -msgstr "一個訊號量物件。" +msgstr "一個旗號 (semaphore) 物件。" #: ../../library/asyncio-api-index.rst:186 msgid ":class:`BoundedSemaphore`" @@ -369,7 +369,7 @@ msgstr ":class:`BoundedSemaphore`" #: ../../library/asyncio-api-index.rst:187 msgid "A bounded semaphore." -msgstr "一個有界的訊號量物件。" +msgstr "一個有界的旗號物件。" #: ../../library/asyncio-api-index.rst:192 msgid ":ref:`Using asyncio.Event `."