From 53637e4545005cdeb333f68cb38a818b193ee49e Mon Sep 17 00:00:00 2001 From: rockleona Date: Thu, 22 Feb 2024 16:11:54 +0800 Subject: [PATCH 1/2] feat: update translation in tkinter.messagebox --- library/tkinter.messagebox.po | 73 +++++++++++++++++++++++++---------- 1 file changed, 52 insertions(+), 21 deletions(-) diff --git a/library/tkinter.messagebox.po b/library/tkinter.messagebox.po index 8cc691f0de7..089919cd9f8 100644 --- a/library/tkinter.messagebox.po +++ b/library/tkinter.messagebox.po @@ -3,24 +3,24 @@ # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-11-02 00:03+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2024-02-22 15:59+0800\n" +"Last-Translator: Li-Hung Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" "Language: zh_TW\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.4\n" #: ../../library/tkinter.messagebox.rst:2 msgid ":mod:`tkinter.messagebox` --- Tkinter message prompts" -msgstr "" +msgstr ":mod:`tkinter.messagebox` --- Tkinter 訊息提示" #: ../../library/tkinter.messagebox.rst:8 msgid "**Source code:** :source:`Lib/tkinter/messagebox.py`" @@ -35,6 +35,10 @@ msgid "" "user's selection. Common message box styles and layouts include but are not " "limited to:" msgstr "" +":mod:`tkinter.messagebox` 模組提供了模板基底類別以及各種常用配置的便捷方法。" +"訊息框 (message box) 是互動視窗 (modal),會基於使用者的選擇回傳(``True``、" +"``False``、``None``、:data:`OK`、:data:`CANCEL`、:data:`YES`、:data:`NO`)的" +"子集。常見的訊息框樣式 (style) 和版面配置 (layout) 包括但不限於:" #: ../../library/tkinter.messagebox.rst:23 msgid "" @@ -42,10 +46,12 @@ msgid "" "set of buttons. Each of the buttons in the message window is identified by a " "unique symbolic name (see the *type* options)." msgstr "" +"建立一個訊息視窗,其中包含應用程式指定的訊息、一個圖示和一組按鈕。訊息視窗中" +"的每個按鈕都有唯一的符號名稱作為識別(請參考 *type* 選項)。" #: ../../library/tkinter.messagebox.rst:27 msgid "The following options are supported:" -msgstr "" +msgstr "支援以下選項:" #: ../../library/tkinter.messagebox.rst:33 msgid "*command*" @@ -57,6 +63,8 @@ msgid "" "of the button clicked by the user to close the dialog is passed as argument. " "This is only available on macOS." msgstr "" +"指定當使用者關閉對話框 (dialog) 時要呼叫的函式。使用者按一下以關閉對話框的按" +"鈕的名稱作為引數傳遞。此選項僅適用於 macOS。" #: ../../library/tkinter.messagebox.rst:39 msgid "*default*" @@ -69,6 +77,9 @@ msgid "" "option is not specified, the first button in the dialog will be made the " "default." msgstr "" +"給出此訊息視窗的預設按鈕的\\ :ref:`符號名稱 `\\(:data:" +"`OK`、:data:`CANCEL` 等)。如果未指定此選項,則對話框中的第一個按鈕將成為預設" +"按鈕。" #: ../../library/tkinter.messagebox.rst:46 msgid "*detail*" @@ -80,6 +91,8 @@ msgid "" "option. The message detail will be presented beneath the main message and, " "where supported by the OS, in a less emphasized font than the main message." msgstr "" +"透過 *message* 選項指定將輔助訊息給主訊息。訊息詳細資訊將顯示在主要訊息下方," +"並且在作業系統支援的情況下,將以比主要訊息更不強調的字體顯示。" #: ../../library/tkinter.messagebox.rst:51 msgid "*icon*" @@ -90,6 +103,8 @@ msgid "" "Specifies an :ref:`icon ` to display. If this option is " "not specified, then the :data:`INFO` icon will be displayed." msgstr "" +"指定要顯示的\\ :ref:`圖示 `\\ 。如果未指定此選項,則會顯" +"示 :data:`INFO` 圖示。" #: ../../library/tkinter.messagebox.rst:55 msgid "*message*" @@ -99,7 +114,7 @@ msgstr "*message*" msgid "" "Specifies the message to display in this message box. The default value is " "an empty string." -msgstr "" +msgstr "指定要在此訊息框中顯示的訊息。預設值為空字串。" #: ../../library/tkinter.messagebox.rst:59 msgid "*parent*" @@ -110,6 +125,8 @@ msgid "" "Makes the specified window the logical parent of the message box. The " "message box is displayed on top of its parent window." msgstr "" +"使指定視窗成為訊息框的邏輯父視窗 (logical parent window)。訊息框顯示在其父視" +"窗的頂部。" #: ../../library/tkinter.messagebox.rst:64 msgid "*title*" @@ -121,6 +138,8 @@ msgid "" "is ignored on macOS, where platform guidelines forbid the use of a title on " "this kind of dialog." msgstr "" +"指定顯示為訊息框標題的字串。此選項在 macOS 上被忽略,其平台指南禁止在此類對話" +"方塊上使用標題。" #: ../../library/tkinter.messagebox.rst:68 msgid "*type*" @@ -130,7 +149,7 @@ msgstr "*type*" msgid "" "Arranges for a :ref:`predefined set of buttons ` to be " "displayed." -msgstr "" +msgstr "安排一組需顯示的\\ :ref:`預先定義的按鈕組合 `\\ 。" #: ../../library/tkinter.messagebox.rst:72 msgid "" @@ -138,60 +157,69 @@ msgid "" "Then return the symbolic name of the selected button. Keyword arguments can " "override options specified in the constructor." msgstr "" +"顯示訊息視窗並等待使用者選擇其中一個按鈕。然後回傳所選按鈕的符號名稱。關鍵字" +"引數可以覆寫建構函式中指定的選項。" #: ../../library/tkinter.messagebox.rst:76 msgid "**Information message box**" -msgstr "" +msgstr "**資訊訊息框**" #: ../../library/tkinter.messagebox.rst:80 msgid "" "Creates and displays an information message box with the specified title and " "message." -msgstr "" +msgstr "建立並顯示具有指定標題和訊息的資訊訊息框。" #: ../../library/tkinter.messagebox.rst:83 msgid "**Warning message boxes**" -msgstr "" +msgstr "**警告訊息框**" #: ../../library/tkinter.messagebox.rst:87 msgid "" "Creates and displays a warning message box with the specified title and " "message." -msgstr "" +msgstr "建立並顯示具有指定標題和訊息的警告訊息框。" #: ../../library/tkinter.messagebox.rst:92 msgid "" "Creates and displays an error message box with the specified title and " "message." -msgstr "" +msgstr "建立並顯示具有指定標題和訊息的錯誤訊息框。" #: ../../library/tkinter.messagebox.rst:95 msgid "**Question message boxes**" -msgstr "" +msgstr "**問題留言框**" #: ../../library/tkinter.messagebox.rst:99 msgid "" "Ask a question. By default shows buttons :data:`YES` and :data:`NO`. Returns " "the symbolic name of the selected button." msgstr "" +"問一個問題。預設顯示按鈕 :data:`YES` 和 :data:`NO`。傳回所選按鈕的符號名稱。" #: ../../library/tkinter.messagebox.rst:104 msgid "" "Ask if operation should proceed. Shows buttons :data:`OK` and :data:" "`CANCEL`. Returns ``True`` if the answer is ok and ``False`` otherwise." msgstr "" +"詢問操作是否應該繼續。顯示按鈕 :data:`OK` 和 :data:`CANCEL`。如果答案正確則傳" +"回 ``True``,否則傳回 ``False``。" #: ../../library/tkinter.messagebox.rst:109 msgid "" "Ask if operation should be retried. Shows buttons :data:`RETRY` and :data:" "`CANCEL`. Return ``True`` if the answer is yes and ``False`` otherwise." msgstr "" +"詢問是否應重試操作。顯示按鈕 :data:`RETRY` 和 :data:`CANCEL`。如果答案為是," +"則傳回 ``True``,否則傳回 ``False``。" #: ../../library/tkinter.messagebox.rst:114 msgid "" "Ask a question. Shows buttons :data:`YES` and :data:`NO`. Returns ``True`` " "if the answer is yes and ``False`` otherwise." msgstr "" +"問一個問題。顯示按鈕 :data:`YES` 和 :data:`NO`。如果答案為是,則傳回“True”," +"否則傳回“False”。" #: ../../library/tkinter.messagebox.rst:119 msgid "" @@ -199,47 +227,50 @@ msgid "" "Return ``True`` if the answer is yes, ``None`` if cancelled, and ``False`` " "otherwise." msgstr "" +"問一個問題。顯示按鈕 :data:`YES`、:data:`NO` 和 :data:`CANCEL`。如果答案為" +"是,則回傳“True”;如果取消則回傳“None”,否則回傳“False”。" #: ../../library/tkinter.messagebox.rst:126 msgid "Symbolic names of buttons:" -msgstr "" +msgstr "按鈕的符號名稱:" #: ../../library/tkinter.messagebox.rst:145 msgid "Predefined sets of buttons:" -msgstr "" +msgstr "預先定義的按鈕組合:" #: ../../library/tkinter.messagebox.rst:150 msgid "" "Displays three buttons whose symbolic names are :data:`ABORT`, :data:`RETRY` " "and :data:`IGNORE`." msgstr "" +"顯示三個按鈕,其符號名稱為 :data:`ABORT`、:data:`RETRY` 和 :data:`IGNORE`。" #: ../../library/tkinter.messagebox.rst:157 msgid "Displays one button whose symbolic name is :data:`OK`." -msgstr "" +msgstr "顯示一個按鈕,其符號名稱為 :data:`OK`。" #: ../../library/tkinter.messagebox.rst:162 msgid "" "Displays two buttons whose symbolic names are :data:`OK` and :data:`CANCEL`." -msgstr "" +msgstr "顯示兩個按鈕,其符號名稱為 :data:`OK` 和 :data:`CANCEL`。" #: ../../library/tkinter.messagebox.rst:168 msgid "" "Displays two buttons whose symbolic names are :data:`RETRY` and :data:" "`CANCEL`." -msgstr "" +msgstr "顯示兩個按鈕,其符號名稱為 :data:`RETRY` 和 :data:`CANCEL`。" #: ../../library/tkinter.messagebox.rst:174 msgid "" "Displays two buttons whose symbolic names are :data:`YES` and :data:`NO`." -msgstr "" +msgstr "顯示兩個按鈕,其符號名稱為 :data:`YES` 和 :data:`NO`。" #: ../../library/tkinter.messagebox.rst:180 msgid "" "Displays three buttons whose symbolic names are :data:`YES`, :data:`NO` and :" "data:`CANCEL`." -msgstr "" +msgstr "顯示三個按鈕,其符號名稱為 :data:`YES`、:data:`NO` 和 :data:`CANCEL`。" #: ../../library/tkinter.messagebox.rst:185 msgid "Icon images:" -msgstr "" +msgstr "圖示圖像:" From c0e7154ed3191826351977ffea27545f3d182023 Mon Sep 17 00:00:00 2001 From: rockleona Date: Thu, 7 Mar 2024 23:19:14 +0800 Subject: [PATCH 2/2] fix: update with reviewer's suggestion --- library/tkinter.messagebox.po | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/library/tkinter.messagebox.po b/library/tkinter.messagebox.po index 089919cd9f8..fba5c040396 100644 --- a/library/tkinter.messagebox.po +++ b/library/tkinter.messagebox.po @@ -103,7 +103,7 @@ msgid "" "Specifies an :ref:`icon ` to display. If this option is " "not specified, then the :data:`INFO` icon will be displayed." msgstr "" -"指定要顯示的\\ :ref:`圖示 `\\ 。如果未指定此選項,則會顯" +"指定要顯示的\\ :ref:`圖示 `。如果未指定此選項,則會顯" "示 :data:`INFO` 圖示。" #: ../../library/tkinter.messagebox.rst:55 @@ -149,7 +149,7 @@ msgstr "*type*" msgid "" "Arranges for a :ref:`predefined set of buttons ` to be " "displayed." -msgstr "安排一組需顯示的\\ :ref:`預先定義的按鈕組合 `\\ 。" +msgstr "安排一組需顯示的\\ :ref:`預先定義的按鈕組合 `。" #: ../../library/tkinter.messagebox.rst:72 msgid "" @@ -195,7 +195,7 @@ msgid "" "Ask a question. By default shows buttons :data:`YES` and :data:`NO`. Returns " "the symbolic name of the selected button." msgstr "" -"問一個問題。預設顯示按鈕 :data:`YES` 和 :data:`NO`。傳回所選按鈕的符號名稱。" +"問一個問題。預設顯示按鈕 :data:`YES` 和 :data:`NO`。回傳所選按鈕的符號名稱。" #: ../../library/tkinter.messagebox.rst:104 msgid "" @@ -203,7 +203,7 @@ msgid "" "`CANCEL`. Returns ``True`` if the answer is ok and ``False`` otherwise." msgstr "" "詢問操作是否應該繼續。顯示按鈕 :data:`OK` 和 :data:`CANCEL`。如果答案正確則傳" -"回 ``True``,否則傳回 ``False``。" +"回 ``True``,否則回傳 ``False``。" #: ../../library/tkinter.messagebox.rst:109 msgid "" @@ -211,15 +211,15 @@ msgid "" "`CANCEL`. Return ``True`` if the answer is yes and ``False`` otherwise." msgstr "" "詢問是否應重試操作。顯示按鈕 :data:`RETRY` 和 :data:`CANCEL`。如果答案為是," -"則傳回 ``True``,否則傳回 ``False``。" +"則回傳 ``True``,否則回傳 ``False``。" #: ../../library/tkinter.messagebox.rst:114 msgid "" "Ask a question. Shows buttons :data:`YES` and :data:`NO`. Returns ``True`` " "if the answer is yes and ``False`` otherwise." msgstr "" -"問一個問題。顯示按鈕 :data:`YES` 和 :data:`NO`。如果答案為是,則傳回“True”," -"否則傳回“False”。" +"問一個問題。顯示按鈕 :data:`YES` 和 :data:`NO`。如果答案為是,則回傳 ``True``," +"否則回傳 ``False``。" #: ../../library/tkinter.messagebox.rst:119 msgid "" @@ -228,7 +228,7 @@ msgid "" "otherwise." msgstr "" "問一個問題。顯示按鈕 :data:`YES`、:data:`NO` 和 :data:`CANCEL`。如果答案為" -"是,則回傳“True”;如果取消則回傳“None”,否則回傳“False”。" +"是,則回傳 ``True``;如果取消則回傳 ``None``,否則回傳 ``False``。" #: ../../library/tkinter.messagebox.rst:126 msgid "Symbolic names of buttons:"