From ac532c125ddbf86b10528a41450d003e07d6b7de Mon Sep 17 00:00:00 2001 From: "Dr.XYZ" Date: Mon, 19 May 2025 15:10:15 +0000 Subject: [PATCH 1/3] Translate library/winsound.po --- library/winsound.po | 79 ++++++++++++++++++++++++++++++++------------- 1 file changed, 57 insertions(+), 22 deletions(-) diff --git a/library/winsound.po b/library/winsound.po index 0113d36816..eb47f92d22 100644 --- a/library/winsound.po +++ b/library/winsound.po @@ -3,13 +3,14 @@ # This file is distributed under the same license as the Python package. # # Translators: +# Dr-XYZ , 2025 msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2025-03-17 00:15+0000\n" -"PO-Revision-Date: 2018-05-23 16:15+0000\n" -"Last-Translator: Adrian Liaw \n" +"PO-Revision-Date: 2025-05-19 23:00+0800\n" +"Last-Translator: Dr-XYZ \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" "Language: zh_TW\n" @@ -20,7 +21,7 @@ msgstr "" #: ../../library/winsound.rst:2 msgid ":mod:`!winsound` --- Sound-playing interface for Windows" -msgstr ":mod:`!winsound` --- Windows 的聲音播放介面" +msgstr ":mod:`!winsound` --- Windows 的音效播放介面" #: ../../library/winsound.rst:13 msgid "" @@ -28,6 +29,8 @@ msgid "" "machinery provided by Windows platforms. It includes functions and several " "constants." msgstr "" +":mod:`winsound` 模組提供存取 Windows 平台所提供的基本音效播放機制。它包含數個" +"函式與常數。" #: ../../library/winsound.rst:19 msgid "" @@ -37,6 +40,9 @@ msgid "" "last. If the system is not able to beep the speaker, :exc:`RuntimeError` is " "raised." msgstr "" +"讓電腦的喇叭發出嗶聲。*frequency* 參數指定音效的頻率(以赫茲為單位),範圍必" +"須介於 37 到 32,767 之間。*duration* 參數指定音效持續的時間(以毫秒為單位)。" +"若系統無法讓喇叭發出嗶聲,則會引發 :exc:`RuntimeError`。" #: ../../library/winsound.rst:27 msgid "" @@ -48,6 +54,11 @@ msgid "" "waveform sound is stopped. If the system indicates an error, :exc:" "`RuntimeError` is raised." msgstr "" +"呼叫平台 API 中底層的 :c:func:`!PlaySound` 函式。*sound* 引數可以是檔案名稱、" +"系統音效別名、作為 :term:`類位元組物件` 的音訊資料,或 ``None``。其直譯方式取" +"決於 *flags* 的值,該值可以是以下所述常數的按位 OR 組合。若 *sound* 為 " +"``None``,則會停止任何正在播放的波形音效。若系統回報錯誤,則會引發 :exc:" +"`RuntimeError`。" #: ../../library/winsound.rst:38 msgid "" @@ -60,12 +71,18 @@ msgid "" "played otherwise. If the system indicates an error, :exc:`RuntimeError` is " "raised." msgstr "" +"呼叫平台 API 中底層的 :c:func:`!MessageBeep` 函式。此函式會播放登錄檔中指定的" +"音效。*type* 引數指定要播放的音效類型,可接受的值包括 ``-1``、" +"``MB_ICONASTERISK``、``MB_ICONEXCLAMATION``、``MB_ICONHAND``、" +"``MB_ICONQUESTION`` 與 ``MB_OK``,這些皆會在下文中說明。數值 ``-1`` 會產生" +"「簡單嗶聲」,當無法播放其他音效時即作為最終退路。若系統回報錯誤,則會引發 :" +"exc:`RuntimeError`。" #: ../../library/winsound.rst:49 msgid "" "The *sound* parameter is the name of a WAV file. Do not use with :const:" "`SND_ALIAS`." -msgstr "" +msgstr "*sound* 參數為 WAV 檔案名稱。請勿與 :const:`SND_ALIAS` 同時使用。" #: ../../library/winsound.rst:55 msgid "" @@ -74,20 +91,23 @@ msgid "" "`SND_NODEFAULT` is also specified. If no default sound is registered, raise :" "exc:`RuntimeError`. Do not use with :const:`SND_FILENAME`." msgstr "" +"*sound* 參數為登錄檔中的音效關聯名稱。若登錄檔中找不到此名稱,則會播放系統預" +"設音效,除非同時指定了 :const:`SND_NODEFAULT`。若沒有註冊預設音效,則會引發 :" +"exc:`RuntimeError`。請勿與 :const:`SND_FILENAME` 同時使用。" #: ../../library/winsound.rst:60 msgid "" "All Win32 systems support at least the following; most systems support many " "more:" -msgstr "" +msgstr "所有 Win32 系統至少支援以下項目;大多數系統支援更多:" #: ../../library/winsound.rst:64 msgid ":func:`PlaySound` *name*" -msgstr "" +msgstr ":func:`PlaySound` *name*" #: ../../library/winsound.rst:64 msgid "Corresponding Control Panel Sound name" -msgstr "" +msgstr "對應的控制台音效名稱" #: ../../library/winsound.rst:66 msgid "``'SystemAsterisk'``" @@ -95,7 +115,7 @@ msgstr "``'SystemAsterisk'``" #: ../../library/winsound.rst:66 msgid "Asterisk" -msgstr "" +msgstr "星號" #: ../../library/winsound.rst:68 msgid "``'SystemExclamation'``" @@ -103,7 +123,7 @@ msgstr "``'SystemExclamation'``" #: ../../library/winsound.rst:68 msgid "Exclamation" -msgstr "" +msgstr "驚嘆號" #: ../../library/winsound.rst:70 msgid "``'SystemExit'``" @@ -111,7 +131,7 @@ msgstr "``'SystemExit'``" #: ../../library/winsound.rst:70 msgid "Exit Windows" -msgstr "" +msgstr "離開 Windows" #: ../../library/winsound.rst:72 msgid "``'SystemHand'``" @@ -119,7 +139,7 @@ msgstr "``'SystemHand'``" #: ../../library/winsound.rst:72 msgid "Critical Stop" -msgstr "" +msgstr "關鍵性停止" #: ../../library/winsound.rst:74 msgid "``'SystemQuestion'``" @@ -127,7 +147,7 @@ msgstr "``'SystemQuestion'``" #: ../../library/winsound.rst:74 msgid "Question" -msgstr "" +msgstr "問題" #: ../../library/winsound.rst:77 msgid "For example::" @@ -143,18 +163,29 @@ msgid "" "# \"*\" probably isn't the registered name of any sound).\n" "winsound.PlaySound(\"*\", winsound.SND_ALIAS)" msgstr "" +"import winsound\n" +"# 播放 Windows 的離開音效。\n" +"winsound.PlaySound(\"SystemExit\", winsound.SND_ALIAS)\n" +"\n" +"# 若有註冊預設音效,可能會播放該音效\n" +"# (因為 \"*\" 可能不是任何音效的註冊名稱)。\n" +"winsound.PlaySound(\"*\", winsound.SND_ALIAS)" #: ../../library/winsound.rst:90 msgid "" "Play the sound repeatedly. The :const:`SND_ASYNC` flag must also be used to " "avoid blocking. Cannot be used with :const:`SND_MEMORY`." msgstr "" +"重複播放音效。必須同時使用 :const:`SND_ASYNC` 旗標以避免阻塞。不能與 :const:" +"`SND_MEMORY` 一同使用。" #: ../../library/winsound.rst:96 msgid "" "The *sound* parameter to :func:`PlaySound` is a memory image of a WAV file, " "as a :term:`bytes-like object`." msgstr "" +"傳入 :func:`PlaySound` 的 *sound* 參數是 WAV 檔案的記憶體映像,型別為 :term:`" +"類位元組物件 `。" #: ../../library/winsound.rst:101 msgid "" @@ -162,31 +193,33 @@ msgid "" "a combination of this flag and :const:`SND_ASYNC` will raise :exc:" "`RuntimeError`." msgstr "" +"此模組不支援從記憶體映像非同步播放音效,因此若同時使用本旗標與 :const:" +"`SND_ASYNC`,將引發 :exc:`RuntimeError`。" #: ../../library/winsound.rst:107 msgid "Stop playing all instances of the specified sound." -msgstr "" +msgstr "停止播放指定音效的所有實例。" #: ../../library/winsound.rst:111 ../../library/winsound.rst:135 msgid "This flag is not supported on modern Windows platforms." -msgstr "" +msgstr "此旗標在現代 Windows 平台上不支援。" #: ../../library/winsound.rst:116 msgid "Return immediately, allowing sounds to play asynchronously." -msgstr "" +msgstr "立即回傳,使音效可非同步播放。" #: ../../library/winsound.rst:121 msgid "" "If the specified sound cannot be found, do not play the system default sound." -msgstr "" +msgstr "若找不到指定的音效,則不播放系統預設音效。" #: ../../library/winsound.rst:126 msgid "Do not interrupt sounds currently playing." -msgstr "" +msgstr "不中斷目前正在播放的音效。" #: ../../library/winsound.rst:131 msgid "Return immediately if the sound driver is busy." -msgstr "" +msgstr "若音效驅動程式正在忙碌,則立即回傳此。" #: ../../library/winsound.rst:140 msgid "" @@ -194,19 +227,21 @@ msgid "" "flag can be combined with the :const:`SND_ALIAS` flag to specify an " "application-defined sound alias." msgstr "" +"*sound* 參數為登錄檔中的應用程式特定別名。此旗標可與 :const:`SND_ALIAS` 一同" +"使用,以指定應用程式自訂的音效別名。" #: ../../library/winsound.rst:147 ../../library/winsound.rst:167 msgid "Play the ``SystemDefault`` sound." -msgstr "播放 ``SystemDefault`` 聲音。" +msgstr "播放 ``SystemDefault`` 音效。" #: ../../library/winsound.rst:152 msgid "Play the ``SystemExclamation`` sound." -msgstr "播放 ``SystemExclamation`` 聲音。" +msgstr "播放 ``SystemExclamation`` 音效。" #: ../../library/winsound.rst:157 msgid "Play the ``SystemHand`` sound." -msgstr "播放 ``SystemHand`` 聲音。" +msgstr "播放 ``SystemHand`` 音效。" #: ../../library/winsound.rst:162 msgid "Play the ``SystemQuestion`` sound." -msgstr "播放 ``SystemQuestion`` 聲音。" +msgstr "播放 ``SystemQuestion`` 音效。" From da2a011e53acf8be23b0066a6c88b2f19cb72295 Mon Sep 17 00:00:00 2001 From: "Dr.XYZ" Date: Mon, 19 May 2025 15:44:00 +0000 Subject: [PATCH 2/3] fix --- library/winsound.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/winsound.po b/library/winsound.po index eb47f92d22..ddba018564 100644 --- a/library/winsound.po +++ b/library/winsound.po @@ -55,8 +55,8 @@ msgid "" "`RuntimeError` is raised." msgstr "" "呼叫平台 API 中底層的 :c:func:`!PlaySound` 函式。*sound* 引數可以是檔案名稱、" -"系統音效別名、作為 :term:`類位元組物件` 的音訊資料,或 ``None``。其直譯方式取" -"決於 *flags* 的值,該值可以是以下所述常數的按位 OR 組合。若 *sound* 為 " +"系統音效別名、作為 :term:`bytes-like object` 的音訊資料,或 ``None``。其直譯" +"方式取決於 *flags* 的值,該值可以是以下所述常數的按位 OR 組合。若 *sound* 為 " "``None``,則會停止任何正在播放的波形音效。若系統回報錯誤,則會引發 :exc:" "`RuntimeError`。" @@ -184,8 +184,8 @@ msgid "" "The *sound* parameter to :func:`PlaySound` is a memory image of a WAV file, " "as a :term:`bytes-like object`." msgstr "" -"傳入 :func:`PlaySound` 的 *sound* 參數是 WAV 檔案的記憶體映像,型別為 :term:`" -"類位元組物件 `。" +"傳入 :func:`PlaySound` 的 *sound* 參數是 WAV 檔案的記憶體映像,型別為 :term:" +"`bytes-like object`。" #: ../../library/winsound.rst:101 msgid "" From 1a3c0b6f9ccd686187adcd9c92f5103ef68a5965 Mon Sep 17 00:00:00 2001 From: "Dr.XYZ" Date: Tue, 20 May 2025 09:13:31 +0800 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: W. H. Wang --- library/winsound.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/winsound.po b/library/winsound.po index ddba018564..7e7549c8d3 100644 --- a/library/winsound.po +++ b/library/winsound.po @@ -54,9 +54,9 @@ msgid "" "waveform sound is stopped. If the system indicates an error, :exc:" "`RuntimeError` is raised." msgstr "" -"呼叫平台 API 中底層的 :c:func:`!PlaySound` 函式。*sound* 引數可以是檔案名稱、" +"呼叫平台 API 中底層的 :c:func:`!PlaySound` 函式。*sound* 參數可以是檔案名稱、" "系統音效別名、作為 :term:`bytes-like object` 的音訊資料,或 ``None``。其直譯" -"方式取決於 *flags* 的值,該值可以是以下所述常數的按位 OR 組合。若 *sound* 為 " +"方式取決於 *flags* 的值,該值可以是以下所述常數的位元 OR 組合。若 *sound* 為 " "``None``,則會停止任何正在播放的波形音效。若系統回報錯誤,則會引發 :exc:" "`RuntimeError`。"