Skip to content

Commit abb8e44

Browse files
authored
Merge pull request #254 from mattwang44/library/asyncio-queue
Translate `library/asyncio-queue.po`
2 parents a67c64b + a38e5cd commit abb8e44

File tree

1 file changed

+52
-26
lines changed

1 file changed

+52
-26
lines changed

‎library/asyncio-queue.po

+52-26
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
1-
# SOME DESCRIPTIVE TITLE.
21
# Copyright (C) 2001-2022, Python Software Foundation
32
# This file is distributed under the same license as the Python package.
43
#
54
# Translators:
5+
# Adrian Liaw <adrianliaw2000@gmail.com>, 2018
6+
# Matt Wang <mattwang44@gmail.com>, 2022
67
msgid ""
78
msgstr ""
89
"Project-Id-Version: Python 3.10\n"
910
"Report-Msgid-Bugs-To: \n"
1011
"POT-Creation-Date: 2022-02-19 00:13+0000\n"
11-
"PO-Revision-Date: 2018-05-23 14:39+0000\n"
12-
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
12+
"PO-Revision-Date: 2022-02-20 18:34+0800\n"
13+
"Last-Translator: Matt Wang <mattwang44@gmail.com>\n"
1314
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1415
"tw)\n"
1516
"Language: zh_TW\n"
1617
"MIME-Version: 1.0\n"
1718
"Content-Type: text/plain; charset=UTF-8\n"
1819
"Content-Transfer-Encoding: 8bit\n"
1920
"Plural-Forms: nplurals=1; plural=0;\n"
21+
"X-Generator: Poedit 3.0.1\n"
2022

2123
#: ../../library/asyncio-queue.rst:7
2224
msgid "Queues"
23-
msgstr ""
25+
msgstr "佇列 (Queues)"
2426

2527
#: ../../library/asyncio-queue.rst:9
2628
msgid "**Source code:** :source:`Lib/asyncio/queues.py`"
@@ -32,78 +34,89 @@ msgid ""
3234
"module. Although asyncio queues are not thread-safe, they are designed to "
3335
"be used specifically in async/await code."
3436
msgstr ""
37+
"asyncio 佇列被設計成與 :mod:`queue` 模組類似。儘管 asyncio 佇列不支援執行緒安"
38+
"全 (thread-safe),但他們是被設計來專用於 async/await 程式。"
3539

3640
#: ../../library/asyncio-queue.rst:17
3741
msgid ""
3842
"Note that methods of asyncio queues don't have a *timeout* parameter; use :"
3943
"func:`asyncio.wait_for` function to do queue operations with a timeout."
4044
msgstr ""
45+
"注意 asyncio 的佇列沒有 *timeout* 參��;請使用 :func:`asyncio.wait_for` 函式"
46+
"來為佇列新增具有超時 (timeout) 設定的操作。"
4147

4248
#: ../../library/asyncio-queue.rst:21
4349
msgid "See also the `Examples`_ section below."
44-
msgstr "另請參閱下方\\ `Examples`_\\ 。"
50+
msgstr "另請參閱下方 `Examples`_\\ 。"
4551

4652
#: ../../library/asyncio-queue.rst:24
4753
msgid "Queue"
48-
msgstr ""
54+
msgstr "Queue"
4955

5056
#: ../../library/asyncio-queue.rst:28
5157
msgid "A first in, first out (FIFO) queue."
52-
msgstr ""
58+
msgstr "先進先出 (FIFO) 佇列。"
5359

5460
#: ../../library/asyncio-queue.rst:30
5561
msgid ""
5662
"If *maxsize* is less than or equal to zero, the queue size is infinite. If "
5763
"it is an integer greater than ``0``, then ``await put()`` blocks when the "
5864
"queue reaches *maxsize* until an item is removed by :meth:`get`."
5965
msgstr ""
66+
"如果 *maxsize* 小於或等於零,則佇列尺寸是無限制的。如果是��於 ``0`` 的整數,"
67+
"則當佇列達到 *maxsize* 時,\\ ``await put()`` 將會阻塞 (block),直到某個元素"
68+
"被 :meth:`get` 取出。"
6069

6170
#: ../../library/asyncio-queue.rst:35
6271
msgid ""
6372
"Unlike the standard library threading :mod:`queue`, the size of the queue is "
6473
"always known and can be returned by calling the :meth:`qsize` method."
6574
msgstr ""
75+
"不像標準函式庫中執行緒類型的 :mod:`queue`\\ ,佇列的尺寸一直是已知的,可以透"
76+
"過呼叫 :meth:`qsize` 方法回傳。"
6677

6778
#: ../../library/asyncio-queue.rst:39
6879
msgid "Removed the *loop* parameter."
69-
msgstr ""
80+
msgstr "移除 *loop* 參數。"
7081

7182
#: ../../library/asyncio-queue.rst:43
7283
msgid "This class is :ref:`not thread safe <asyncio-multithreading>`."
73-
msgstr ""
84+
msgstr "這個類別是\\ :ref:`不支援執行緒安全的 <asyncio-multithreading>`\\"
7485

7586
#: ../../library/asyncio-queue.rst:47
7687
msgid "Number of items allowed in the queue."
77-
msgstr ""
88+
msgstr "佇列中可存放的元素數量。"
7889

7990
#: ../../library/asyncio-queue.rst:51
8091
msgid "Return ``True`` if the queue is empty, ``False`` otherwise."
81-
msgstr ""
92+
msgstr "如果佇列為空則回傳 ``True``\\ ,否則回傳 ``False``\\"
8293

8394
#: ../../library/asyncio-queue.rst:55
8495
msgid "Return ``True`` if there are :attr:`maxsize` items in the queue."
85-
msgstr ""
96+
msgstr "如果有 :attr:`maxsize` 個條目在佇列中,則回傳 ``True``\\"
8697

8798
#: ../../library/asyncio-queue.rst:57
8899
msgid ""
89100
"If the queue was initialized with ``maxsize=0`` (the default), then :meth:"
90101
"`full()` never returns ``True``."
91102
msgstr ""
103+
"如果佇列用 ``maxsize=0`` (預設)初始化,則 :meth:`full()` 永遠不會回傳 "
104+
"``True``\\ 。"
92105

93106
#: ../../library/asyncio-queue.rst:62
94107
msgid ""
95108
"Remove and return an item from the queue. If queue is empty, wait until an "
96109
"item is available."
97-
msgstr ""
110+
msgstr "從佇列中刪除並回傳一個元素。如果佇列為空,則持續等待直到佇列中有元素。"
98111

99112
#: ../../library/asyncio-queue.rst:67
100113
msgid ""
101114
"Return an item if one is immediately available, else raise :exc:`QueueEmpty`."
102-
msgstr ""
115+
msgstr "如果佇列內有值則立即回傳佇列中的元素,否則引發 :exc:`QueueEmpty`\\"
103116

104117
#: ../../library/asyncio-queue.rst:72
105118
msgid "Block until all items in the queue have been received and processed."
106-
msgstr ""
119+
msgstr "持續阻塞直到佇列中所有的元素都被接收和處理完畢。"
107120

108121
#: ../../library/asyncio-queue.rst:74
109122
msgid ""
@@ -113,72 +126,83 @@ msgid ""
113126
"complete. When the count of unfinished tasks drops to zero, :meth:`join` "
114127
"unblocks."
115128
msgstr ""
129+
"當條目新增到佇列的時候,未完成任務的計數就會增加。每當一個消耗者 (consumer) "
130+
"協程呼叫 :meth:`task_done`\\ ,表示這個條目已經被取回且被它包含的所有工作都已"
131+
"完成,未完成任務計數就會減少。當未完成計數降到零的時候,\\ :meth:`join` 阻塞"
132+
"會被解除 (unblock)。"
116133

117134
#: ../../library/asyncio-queue.rst:82
118135
msgid ""
119136
"Put an item into the queue. If the queue is full, wait until a free slot is "
120137
"available before adding the item."
121138
msgstr ""
139+
"將一個元素放進佇列。如果佇列滿了,在新增元素之前,會持續等待直到有空閒插槽 "
140+
"(free slot) 能被使用。"
122141

123142
#: ../../library/asyncio-queue.rst:87
124143
msgid "Put an item into the queue without blocking."
125-
msgstr ""
144+
msgstr "不阻塞地將一個元素放入佇列。"
126145

127146
#: ../../library/asyncio-queue.rst:89
128147
msgid "If no free slot is immediately available, raise :exc:`QueueFull`."
129-
msgstr ""
148+
msgstr "如果沒有立即可用的空閒插槽,引發 :exc:`QueueFull`\\"
130149

131150
#: ../../library/asyncio-queue.rst:93
132151
msgid "Return the number of items in the queue."
133-
msgstr ""
152+
msgstr "回傳佇列中的元素數量。"
134153

135154
#: ../../library/asyncio-queue.rst:97
136155
msgid "Indicate that a formerly enqueued task is complete."
137-
msgstr ""
156+
msgstr "表示前面一個排隊的任務已經完成。"
138157

139158
#: ../../library/asyncio-queue.rst:99
140159
msgid ""
141160
"Used by queue consumers. For each :meth:`~Queue.get` used to fetch a task, a "
142161
"subsequent call to :meth:`task_done` tells the queue that the processing on "
143162
"the task is complete."
144163
msgstr ""
164+
"由佇列消耗者使用。對於每個用於獲取一個任務的 :meth:`~Queue.get`\\ ,接續的 :"
165+
"meth:`task_done` 呼叫會告訴佇列這個任務的處理已經完成。"
145166

146167
#: ../../library/asyncio-queue.rst:103
147168
msgid ""
148169
"If a :meth:`join` is currently blocking, it will resume when all items have "
149170
"been processed (meaning that a :meth:`task_done` call was received for every "
150171
"item that had been :meth:`~Queue.put` into the queue)."
151172
msgstr ""
173+
"如果 :meth:`join` 當前正在阻塞,在所有項目都被處理後會解除阻塞(意味著每個"
174+
"以 :meth:`~Queue.put` 放進佇列的條目都會收到一個 :meth:`task_done`\\ )。"
152175

153176
#: ../../library/asyncio-queue.rst:108
154177
msgid ""
155178
"Raises :exc:`ValueError` if called more times than there were items placed "
156179
"in the queue."
157180
msgstr ""
181+
"如果被呼叫的次數多於放入佇列中的項目數量,將引發 :exc:`ValueError`\\ 。"
158182

159183
#: ../../library/asyncio-queue.rst:113
160184
msgid "Priority Queue"
161-
msgstr ""
185+
msgstr "Priority Queue(優先佇列)"
162186

163187
#: ../../library/asyncio-queue.rst:117
164188
msgid ""
165189
"A variant of :class:`Queue`; retrieves entries in priority order (lowest "
166190
"first)."
167-
msgstr ""
191+
msgstr ":class:`Queue` 的變形;按優先順序取出條目 (最小的先取出)。"
168192

169193
#: ../../library/asyncio-queue.rst:120
170194
msgid "Entries are typically tuples of the form ``(priority_number, data)``."
171-
msgstr ""
195+
msgstr "條目通常是 ``(priority_number, data)`` 形式的 tuple(元組)。"
172196

173197
#: ../../library/asyncio-queue.rst:125
174198
msgid "LIFO Queue"
175-
msgstr ""
199+
msgstr "LIFO Queue"
176200

177201
#: ../../library/asyncio-queue.rst:129
178202
msgid ""
179203
"A variant of :class:`Queue` that retrieves most recently added entries first "
180204
"(last in, first out)."
181-
msgstr ""
205+
msgstr ":class:`Queue` 的變形,先取出最近新增的條目(後進先出)。"
182206

183207
#: ../../library/asyncio-queue.rst:134
184208
msgid "Exceptions"
@@ -188,13 +212,15 @@ msgstr "例外"
188212
msgid ""
189213
"This exception is raised when the :meth:`~Queue.get_nowait` method is called "
190214
"on an empty queue."
191-
msgstr ""
215+
msgstr "當佇列為空的時候,呼叫 :meth:`~Queue.get_nowait` 方法會引發這個例外。"
192216

193217
#: ../../library/asyncio-queue.rst:144
194218
msgid ""
195219
"Exception raised when the :meth:`~Queue.put_nowait` method is called on a "
196220
"queue that has reached its *maxsize*."
197221
msgstr ""
222+
"當佇列中條目數量已經達到它的 *maxsize* 時,呼叫 :meth:`~Queue.put_nowait` 方"
223+
"法會引發這個例外。"
198224

199225
#: ../../library/asyncio-queue.rst:149
200226
msgid "Examples"
@@ -203,4 +229,4 @@ msgstr "範例"
203229
#: ../../library/asyncio-queue.rst:153
204230
msgid ""
205231
"Queues can be used to distribute workload between several concurrent tasks::"
206-
msgstr ""
232+
msgstr "佇列能被用於多個並行任務的工作分配:"

0 commit comments

Comments
 (0)