Skip to content

Commit 40ba09c

Browse files
committed
feat: translate library/asyncio-graph.po
Complete translation of asyncio Call Graph Introspection documentation covering print_call_graph(), format_call_graph(), capture_call_graph() and low-level utility functions.
1 parent 4e4af0d commit 40ba09c

File tree

1 file changed

+34
-5
lines changed

1 file changed

+34
-5
lines changed

library/asyncio-graph.po

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ msgstr ""
1818

1919
#: ../../library/asyncio-graph.rst:8
2020
msgid "Call Graph Introspection"
21-
msgstr ""
21+
msgstr "呼叫圖內省(Graph Introspection)"
2222

2323
#: ../../library/asyncio-graph.rst:10
2424
msgid "**Source code:** :source:`Lib/asyncio/graph.py`"
@@ -31,31 +31,38 @@ msgid ""
3131
"*future*. These utilities and the underlying machinery can be used from "
3232
"within a Python program or by external profilers and debuggers."
3333
msgstr ""
34+
"asyncio 擁有強大的執行期呼叫圖內省工具,可以追蹤執行中的\\ *協程*\\\\ "
35+
"*任務*\\ ,或是暫停的\\ *future*\\ 的完整呼叫圖。這些工具和底層機制可以在 "
36+
"Python 程式內部使用,或被外部分析器和除錯器使用。"
3437

3538
#: ../../library/asyncio-graph.rst:25
3639
msgid ""
3740
"Print the async call graph for the current task or the "
3841
"provided :class:`Task` or :class:`Future`."
3942
msgstr ""
43+
"印出當前任務或所提供的 :class:`Task` 或 :class:`Future` 的非同步呼叫圖。"
4044

4145
#: ../../library/asyncio-graph.rst:28
4246
msgid ""
4347
"This function prints entries starting from the top frame and going down "
4448
"towards the invocation point."
45-
msgstr ""
49+
msgstr "此函式會從頂層框架開始印出條目,然後往下到呼叫點。"
4650

4751
#: ../../library/asyncio-graph.rst:31
4852
msgid ""
4953
"The function receives an optional *future* argument. If not passed, the "
5054
"current running task will be used."
5155
msgstr ""
56+
"此函式接受一個選擇性的 *future* 引數。如果未傳入,將使用當前執行中的任務。"
5257

5358
#: ../../library/asyncio-graph.rst:34 ../../library/asyncio-graph.rst:93
5459
msgid ""
5560
"If the function is called on *the current task*, the optional keyword-only "
5661
"*depth* argument can be used to skip the specified number of frames from top "
5762
"of the stack."
5863
msgstr ""
64+
"如果在\\ *當前任務*\\ 上呼叫此函式,可以使用選擇性的僅限關鍵字引數 *depth* "
65+
"來跳過堆疊頂端指定數量的框架(frames)。"
5966

6067
#: ../../library/asyncio-graph.rst:38
6168
msgid ""
@@ -67,12 +74,18 @@ msgid ""
6774
"``0``, the call stack is not printed at all, only \"awaited by\" information "
6875
"is printed."
6976
msgstr ""
77+
"如果提供了選擇性的僅限關鍵字引數 *limit*\\ ,結果圖中的每個呼叫堆疊會被截斷"
78+
"為最多包含 ``abs(limit)`` 個條目。如果 *limit* 為正數,保留的條目是最接近呼"
79+
"叫點的。如果 *limit* 為負數,保留最頂層的條目。如果 *limit* 被省略或為 "
80+
"``None``\\ ,則顯示所有條目。如果 *limit* 為 ``0``\\ ,則完全不印出呼叫堆"
81+
"疊,只印出「awaited by」資訊。"
7082

7183
#: ../../library/asyncio-graph.rst:46
7284
msgid ""
7385
"If *file* is omitted or ``None``, the function will print "
7486
"to :data:`sys.stdout`."
7587
msgstr ""
88+
"如果 *file* 被省略或為 ``None``\\ ,此函式將印出到 :data:`sys.stdout`\\ 。"
7689

7790
#: ../../library/asyncio-graph.rst:49
7891
msgid "**Example:**"
@@ -135,19 +148,24 @@ msgid ""
135148
"Like :func:`print_call_graph`, but returns a string. If *future* is ``None`` "
136149
"and there's no current task, the function returns an empty string."
137150
msgstr ""
151+
"類似於 :func:`print_call_graph`\\ ,但回傳一個字串。如果 *future* 為 "
152+
"``None`` 且沒有當前任務,此函式回傳一個空字串。"
138153

139154
#: ../../library/asyncio-graph.rst:86
140155
msgid ""
141156
"Capture the async call graph for the current task or the "
142157
"provided :class:`Task` or :class:`Future`."
143158
msgstr ""
159+
"捕獲當前任務或所提供的 :class:`Task` 或 :class:`Future` 的非同步呼叫圖。"
144160

145161
#: ../../library/asyncio-graph.rst:89
146162
msgid ""
147163
"The function receives an optional *future* argument. If not passed, the "
148164
"current running task will be used. If there's no current task, the function "
149165
"returns ``None``."
150166
msgstr ""
167+
"此函式接受一個選擇性的 *future* 引數。如果未傳入,將使用當前執行中的任務。"
168+
"如果沒有當前任務,此函式回傳 ``None``\\ 。"
151169

152170
#: ../../library/asyncio-graph.rst:97
153171
msgid "Returns a ``FutureCallGraph`` data class object:"
@@ -162,6 +180,8 @@ msgid ""
162180
"Where *future* is a reference to a :class:`Future` or a :class:`Task` (or "
163181
"their subclasses.)"
164182
msgstr ""
183+
"其中 *future* 是對 :class:`Future` 或 :class:`Task`\\ (或它們的子類別)的"
184+
"參照。"
165185

166186
#: ../../library/asyncio-graph.rst:104
167187
msgid "``call_stack`` is a tuple of ``FrameCallGraphEntry`` objects."
@@ -179,7 +199,7 @@ msgstr "``FrameCallGraphEntry(frame)``"
179199
msgid ""
180200
"Where *frame* is a frame object of a regular Python function in the call "
181201
"stack."
182-
msgstr ""
202+
msgstr "其中 *frame* 是呼叫堆疊中常規 Python 函式的框架物件。"
183203

184204
#: ../../library/asyncio-graph.rst:115
185205
msgid "Low level utility functions"
@@ -195,25 +215,34 @@ msgid ""
195215
"about how exactly such intermediate future objects are connected with the "
196216
"tasks they wrap or control."
197217
msgstr ""
218+
"要內省非同步呼叫圖,asyncio 需要來自控制流程結構的協作,例如 :func:`shield` "
219+
"或 :class:`TaskGroup`\\ 。任何時候涉及使用低階 API(如 :meth:`Future."
220+
"add_done_callback() <asyncio.Future.add_done_callback>`\\ )的中介 :class:"
221+
"`Future` 物件時,應使用以下兩個函式來告知 asyncio 這些中介 future 物件如何"
222+
"與它們所包裝或控制的任務連接。"
198223

199224
#: ../../library/asyncio-graph.rst:128
200225
msgid "Record that *future* is awaited on by *waiter*."
201-
msgstr ""
226+
msgstr "記錄 *future* 正被 *waiter* 等待。"
202227

203228
#: ../../library/asyncio-graph.rst:130 ../../library/asyncio-graph.rst:143
204229
msgid ""
205230
"Both *future* and *waiter* must be instances of :class:`Future` "
206231
"or :class:`Task` or their subclasses, otherwise the call would have no "
207232
"effect."
208233
msgstr ""
234+
"*future* 和 *waiter* 都必須是 :class:`Future` 或 :class:`Task` 或它們子類別"
235+
"的實例,否則呼叫將不會產生任何效果。"
209236

210237
#: ../../library/asyncio-graph.rst:134
211238
msgid ""
212239
"A call to ``future_add_to_awaited_by()`` must be followed by an eventual "
213240
"call to the :func:`future_discard_from_awaited_by` function with the same "
214241
"arguments."
215242
msgstr ""
243+
"對 ``future_add_to_awaited_by()`` 的呼叫必須最終跟隨一個對 :func:"
244+
"`future_discard_from_awaited_by` 函式的呼叫,並使用相同的引數。"
216245

217246
#: ../../library/asyncio-graph.rst:141
218247
msgid "Record that *future* is no longer awaited on by *waiter*."
219-
msgstr ""
248+
msgstr "記錄 *future* 不再被 *waiter* 等待。"

0 commit comments

Comments
 (0)