Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit502b66f

Browse files
Copilotjosix
andcommitted
Translate initial sys.po sections: module intro, argv, audit functions
Co-authored-by: josix <18432820+josix@users.noreply.github.com>
1 parent64d1156 commit502b66f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

‎library/sys.po

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,21 @@ msgid ""
3030
"is always available. Unless explicitly noted otherwise, all variables are "
3131
"read-only."
3232
msgstr""
33+
"此模組提供存取一些由直譯器使用或維護的變數,以及與直譯器強烈互動的函式。它總是可用的。除非明確說明,否則所有變數都是唯讀的。"
3334

3435
#:../../library/sys.rst:16
3536
msgid""
3637
"On POSIX systems where Python was built with the standard ``configure`` "
3738
"script, this contains the ABI flags as specified by :pep:`3149`."
3839
msgstr""
40+
"在使用標準 ``configure`` 指令碼建置 Python 的 POSIX 系統上,這包含 :pep:`3149` 中規定的 ABI 旗標。"
3941

4042
#:../../library/sys.rst:21
4143
msgid""
4244
"Default flags became an empty string (``m`` flag for pymalloc has been "
4345
"removed)."
4446
msgstr""
47+
"預設旗標變成空字串(pymalloc 的 ``m`` 旗標已被移除)。"
4548

4649
#:../../library/sys.rst:25../../library/sys.rst:299../../library/sys.rst:369
4750
#:../../library/sys.rst:760../../library/sys.rst:778
@@ -57,6 +60,7 @@ msgid ""
5760
"Append the callable *hook* to the list of active auditing hooks for the "
5861
"current (sub)interpreter."
5962
msgstr""
63+
"將可呼叫的 *hook* 附加到目前(子)直譯器的活躍稽核 hook 清單中。"
6064

6165
#:../../library/sys.rst:33
6266
msgid""
@@ -67,6 +71,7 @@ msgid ""
6771
"Hooks can then log the event, raise an exception to abort the operation, or "
6872
"terminate the process entirely."
6973
msgstr""
74+
"當稽核事件透過 :func:`sys.audit` 函式引發時,每個 hook 都會按照其新增的順序被呼叫,並傳入事件名稱和引數元組。由 :c:func:`PySys_AddAuditHook` 新增的原生 hook 會先被呼叫,接著是在目前(子)直譯器中新增的 hook。Hook 可以記錄事件、引發例外以中止操作,或完全終止程序。"
7075

7176
#:../../library/sys.rst:40
7277
msgid""
@@ -79,6 +84,7 @@ msgid ""
7984
"runtime, and any modules allowing arbitrary memory modification (such as :"
8085
"mod:`ctypes`) should be completely removed or closely monitored."
8186
msgstr""
87+
"請注意稽核 hook 主要是用來收集關於內部或其他無法觀察的操作的資訊,無論是由 Python 或以 Python 撰寫的函式庫執行的。它們不適合用來實作「沙盒」。特別是,惡意程式碼可以輕易地停用或繞過使用此函式新增的 hook。至少,任何安全敏感的 hook 必須在初始化執行時期之前使用 C API :c:func:`PySys_AddAuditHook` 新增,而任何允許任意記憶體修改的模組(例如 :mod:`ctypes`)應該被完全移除或密切監控。"
8288

8389
#:../../library/sys.rst:49../../library/sys.rst:51
8490
msgid""
@@ -106,13 +112,15 @@ msgid ""
106112
"Exceptions derived from :class:`Exception` but not :class:`RuntimeError` are "
107113
"no longer suppressed."
108114
msgstr""
115+
"衍生自 :class:`Exception` 但非 :class:`RuntimeError` 的例外不再被抑制。"
109116

110117
#:../../library/sys.rst:70
111118
msgid""
112119
"When tracing is enabled (see :func:`settrace`), Python hooks are only traced "
113120
"if the callable has a ``__cantrace__`` member that is set to a true value. "
114121
"Otherwise, trace functions will skip the hook."
115122
msgstr""
123+
"當追蹤功能啟用時(參閱 :func:`settrace`),Python hook 只有在可呼叫物件具有設定為真值的 ``__cantrace__`` 成員時才會被追蹤。否則,追蹤函式會跳過該 hook。"
116124

117125
#:../../library/sys.rst:77
118126
msgid""
@@ -123,6 +131,7 @@ msgid ""
123131
"c'``. If no script name was passed to the Python interpreter, ``argv[0]`` "
124132
"is the empty string."
125133
msgstr""
134+
"傳遞給 Python 指令碼的命令列引數清單。``argv[0]`` 是指令碼名稱(這是否為完整路徑取決於作業系統)。如果命令是使用直譯器的 :option:`-c` 命令列選項執行的,``argv[0]`` 會被設定為字串 ``'-c'``。如果沒有將指令碼名稱傳遞給 Python 直譯器,``argv[0]`` 是空字串。"
126135

127136
#:../../library/sys.rst:83
128137
msgid""
@@ -141,6 +150,7 @@ msgid ""
141150
"you need original bytes, you can get it by ``[os.fsencode(arg) for arg in "
142151
"sys.argv]``."
143152
msgstr""
153+
"在 Unix 上,命令列引數會以位元組形式從作業系統傳遞。Python 使用檔案系統編碼和\"surrogateescape\" 錯誤處理器來解碼它們。當你需要原始位元組時,可以透過 ``[os.fsencode(arg) for arg in sys.argv]`` 來取得。"
144154

145155
#:../../library/sys.rst:101
146156
msgid""
@@ -150,6 +160,7 @@ msgid ""
150160
"given event are considered a public and stable API and should not be "
151161
"modified between releases."
152162
msgstr""
163+
"引發一個稽核事件並觸發任何活躍的稽核 hook。*event* 是識別事件的字串,*args* 可能包含關於該事件更多資訊的選擇性引數。給定事件的引數數量和型別被視為公開且穩定的 API,不應在版本之間修改。"
153164

154165
#:../../library/sys.rst:107
155166
msgid""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp