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 5334cb2

Browse filesBrowse files
mattwang44ken71301
andauthored
Translate library/sched.po (#894)
Co-authored-by: Payon <ken71301@hotmail.com>
1 parent 1d9f32b commit 5334cb2
Copy full SHA for 5334cb2

File tree

Expand file treeCollapse file tree

1 file changed

+39
-12
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+39
-12
lines changed

‎library/sched.po

Copy file name to clipboardExpand all lines: library/sched.po
+39-12Lines changed: 39 additions & 12 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,27 +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::"
5863
msgstr "範例: ::"
5964

6065
#: ../../library/sched.rst:67
6166
msgid "Scheduler Objects"
62-
msgstr ""
67+
msgstr "排程器物件"
6368

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

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

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

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

8999
#: ../../library/sched.rst:86 ../../library/sched.rst:99
90100
msgid "*argument* parameter is optional."
91-
msgstr ""
101+
msgstr "*argument* 參數是可選的。"
92102

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

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

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

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

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

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

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

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

155182
#: ../../library/sched.rst:11
156183
msgid "event scheduling"

0 commit comments

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