Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d73f342

Browse filesBrowse files
committed
feat: translate library/sched.po
1 parent 2501ea7 commit d73f342
Copy full SHA for d73f342

File tree

Expand file treeCollapse file tree

1 file changed

+40
-16
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+40
-16
lines changed

‎library/sched.po

Copy file name to clipboardExpand all lines: library/sched.po
+40-16Lines changed: 40 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# SOME DESCRIPTIVE TITLE.
2-
# Copyright (C) 2001-2022, Python Software Foundation
1+
# Copyright (C) 2001-2024, Python Software Foundation
32
# This file is distributed under the same license as the Python package.
43
#
54
# Translators:
5+
# Matt Wang <mattwang44@gmail.com>, 2024
66
msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.12\n"
99
"Report-Msgid-Bugs-To: \n"
1010
"POT-Creation-Date: 2024-05-09 00:03+0000\n"
11-
"PO-Revision-Date: 2018-05-23 16:09+0000\n"
12-
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
11+
"PO-Revision-Date: 2024-05-09 16:09+0000\n"
12+
"Last-Translator: Matt Wang <mattwang44@gmail.com>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1414
"tw)\n"
1515
"Language: zh_TW\n"
@@ -30,7 +30,7 @@ msgstr "**原始碼:**\\ :source:`Lib/sched.py`"
3030
msgid ""
3131
"The :mod:`sched` module defines a class which implements a general purpose "
3232
"event scheduler:"
33-
msgstr ""
33+
msgstr ":mod:`sched` 模組定義了一個有實作通用事件排程器的類別:"
3434

3535
#: ../../library/sched.rst:20
3636
msgid ""
@@ -43,30 +43,32 @@ msgid ""
4343
"argument ``0`` after each event is run to allow other threads an opportunity "
4444
"to run in multi-threaded applications."
4545
msgstr ""
46+
":class:`scheduler` 類別定義了事件排程的泛用介面。它需要兩個函式來和「外部世"
47+
"界」作用 —— *timefunc* 應不帶引數地被呼叫,並回傳一個數字(為「時間」,可為任"
48+
"何單位)。*delayfunc* 函式應以一個引數呼叫,並與 *timefunc* 的輸出相容,且應"
49+
"延遲其指定的時間單位。每個事件運行後,也會以引數 ``0`` 呼叫 *delayfunc*,來使"
50+
"得其他執行緒有機會在多執行緒應用程式中運行。"
4651

4752
#: ../../library/sched.rst:29
4853
msgid "*timefunc* and *delayfunc* parameters are optional."
49-
msgstr ""
54+
msgstr "*timefunc* 和 *delayfunc* 參數是可選的。"
5055

5156
#: ../../library/sched.rst:32
5257
msgid ""
5358
":class:`scheduler` class can be safely used in multi-threaded environments."
54-
msgstr ""
59+
msgstr ":class:`scheduler` 類別可以安全地在多執行緒環境中使用。"
5560

5661
#: ../../library/sched.rst:36
5762
msgid "Example::"
58-
msgstr ""
59-
"範例:\n"
60-
"\n"
61-
"::"
63+
msgstr "範例: ::"
6264

6365
#: ../../library/sched.rst:67
6466
msgid "Scheduler Objects"
65-
msgstr ""
67+
msgstr "排程器物件"
6668

6769
#: ../../library/sched.rst:69
6870
msgid ":class:`scheduler` instances have the following methods and attributes:"
69-
msgstr ""
71+
msgstr ":class:`scheduler` 實例具有以下方法和屬性:"
7072

7173
#: ../../library/sched.rst:74
7274
msgid ""
@@ -75,23 +77,28 @@ msgid ""
7577
"constructor. Events scheduled for the same *time* will be executed in the "
7678
"order of their *priority*. A lower number represents a higher priority."
7779
msgstr ""
80+
"為一個新事件排程。*time* 引數應該是與傳遞給建構函式的 *timefunc* 函式回傳值相"
81+
"容的數字型別。安排在相同 *time* 的事件將按照其 *priority* 的順序執行。數字越"
82+
"小代表優先順序越高。"
7883

7984
#: ../../library/sched.rst:79
8085
msgid ""
8186
"Executing the event means executing ``action(*argument, **kwargs)``. "
8287
"*argument* is a sequence holding the positional arguments for *action*. "
8388
"*kwargs* is a dictionary holding the keyword arguments for *action*."
8489
msgstr ""
90+
"執行事件意味著執行 ``action(*argument, **kwargs)``。*argument* 是一個包含 "
91+
"*action* 之位置引數的序列。*kwargs* 是一個字典,帶有 *action* 的關鍵字引數。"
8592

8693
#: ../../library/sched.rst:83
8794
msgid ""
8895
"Return value is an event which may be used for later cancellation of the "
8996
"event (see :meth:`cancel`)."
90-
msgstr ""
97+
msgstr "回傳值是一個事件,可用於後續取消該事件(請見 :meth:`cancel`)。"
9198

9299
#: ../../library/sched.rst:86 ../../library/sched.rst:99
93100
msgid "*argument* parameter is optional."
94-
msgstr ""
101+
msgstr "*argument* 參數是可選的。"
95102

96103
#: ../../library/sched.rst:89 ../../library/sched.rst:102
97104
msgid "*kwargs* parameter was added."
@@ -103,30 +110,38 @@ msgid ""
103110
"the other arguments, the effect and the return value are the same as those "
104111
"for :meth:`enterabs`."
105112
msgstr ""
113+
"為一個排程事件延期 *delay* 時間單位。除了相對時間之外,其他引數、效果和回傳值"
114+
"皆與 :meth:`enterabs` 的相同。"
106115

107116
#: ../../library/sched.rst:107
108117
msgid ""
109118
"Remove the event from the queue. If *event* is not an event currently in the "
110119
"queue, this method will raise a :exc:`ValueError`."
111120
msgstr ""
121+
"從佇列中刪除該事件。如果 *event* 不是目前佇列中的事件,此方法將引發 :exc:"
122+
"`ValueError`。"
112123

113124
#: ../../library/sched.rst:113
114125
msgid "Return ``True`` if the event queue is empty."
115-
msgstr ""
126+
msgstr "如果事件佇列為空,則回傳 ``True``。"
116127

117128
#: ../../library/sched.rst:118
118129
msgid ""
119130
"Run all scheduled events. This method will wait (using the *delayfunc* "
120131
"function passed to the constructor) for the next event, then execute it and "
121132
"so on until there are no more scheduled events."
122133
msgstr ""
134+
"運行所有已排程的事件。此方法將會等待(使用傳遞給建構函式的 *delayfunc* 函式)"
135+
"下一個事件,然後執行它,並依此類推,直到不再有排程好的事件。"
123136

124137
#: ../../library/sched.rst:122
125138
msgid ""
126139
"If *blocking* is false executes the scheduled events due to expire soonest "
127140
"(if any) and then return the deadline of the next scheduled call in the "
128141
"scheduler (if any)."
129142
msgstr ""
143+
"如果 *blocking* 為 false,則執行最快到期的已排程事件(如存在),然後回傳排程"
144+
"器中下一個排程呼叫(如存在)的截止時間。"
130145

131146
#: ../../library/sched.rst:126
132147
msgid ""
@@ -135,6 +150,9 @@ msgid ""
135150
"an exception is raised by *action*, the event will not be attempted in "
136151
"future calls to :meth:`run`."
137152
msgstr ""
153+
"*action* 或 *delayfunc* 都可能引發例外。無論哪種情況,排程器都將保持一致的狀"
154+
"態並傳遞例外。如果是由 *action* 引發例外,則後續呼叫 :meth:`run` 時將不會嘗試"
155+
"運行該事件。"
138156

139157
#: ../../library/sched.rst:131
140158
msgid ""
@@ -143,6 +161,9 @@ msgid ""
143161
"dropped; the calling code is responsible for canceling events which are no "
144162
"longer pertinent."
145163
msgstr ""
164+
"如果一系列事件的運行時長比執行下一個事件前的可用時長 (available time) 更長,"
165+
"那麼排程器就單純會落後。不會有事件被丟棄;呼叫程式碼也要負責取消不再相關的事"
166+
"件。"
146167

147168
#: ../../library/sched.rst:136
148169
msgid "*blocking* parameter was added."
@@ -154,6 +175,9 @@ msgid ""
154175
"will be run. Each event is shown as a :term:`named tuple` with the "
155176
"following fields: time, priority, action, argument, kwargs."
156177
msgstr ""
178+
"會按事件運行順序回傳即將發生的事件串列的唯讀屬性。每個事件都以\\ :term:`附名"
179+
"元組 (named tuple) <named tuple>` 表示,並包含以下欄位:時間、優先順序、操"
180+
"作、引數、kwargs。"
157181

158182
#: ../../library/sched.rst:11
159183
msgid "event scheduling"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.