@@ -66,6 +66,9 @@ msgid ""
6666"integer is the code of a single encoded byte, optionally combined with "
6767"attributes and a color pair, as returned by :meth:`window.inch`."
6868msgstr ""
69+ "當文件中提到\\ *字元*\\ 時,它可以被指定為一個整數、一個單一字元的 Unicode 字"
70+ "串,或一個單位元組的 byte 字串。整數是單一已編碼位元組的代碼,並可選擇性地與"
71+ "屬性和顏色對組合,如 :meth:`window.inch` 所回傳的值。"
6972
7073#: ../../library/curses.rst:36
7174msgid ""
@@ -636,6 +639,8 @@ msgid ""
636639"terminfo capability, a bytes object, for the current terminal. Note that the "
637640"output of :func:`putp` always goes to standard output."
638641msgstr ""
642+ "等同於 ``tputs(str, 1, putchar)``;為目前的終端機發出指定 terminfo 功能的值,"
643+ "該值為一個 bytes 物件。請注意,:func:`putp` 的輸出總是會被導向標準輸出。"
639644
640645#: ../../library/curses.rst:513 ../../library/curses.rst:656
641646#: ../../library/curses.rst:666 ../../library/curses.rst:676
@@ -842,6 +847,9 @@ msgid ""
842847"represented as a caret followed by the character, for example as ``b'^C'``. "
843848"Printing characters are left as they are."
844849msgstr ""
850+ "回傳一個 bytes 物件,其為字元 *ch* 的可列印表示形式;任何屬性和顏色對都會被忽"
851+ "略。控制字元會以插入符號 (caret) 加上該字元來表示,例如 ``b'^C'``。可列印字元"
852+ "則保持原樣。"
845853
846854#: ../../library/curses.rst:711
847855msgid "Push *ch* so the next :meth:`~window.getch` will return it."
@@ -852,6 +860,8 @@ msgid ""
852860"*ch* may be an integer (a key code or the code of an encoded byte), a byte, "
853861"or a string of length 1 which encodes to a single byte."
854862msgstr ""
863+ "*ch* 可以是一個整數(按鍵代碼或已編碼位元組的代碼)、一個 byte,或一個長度為 "
864+ "1 且會被編碼為單一位元組的字串。"
855865
856866#: ../../library/curses.rst:718
857867msgid "Only one *ch* can be pushed before :meth:`!getch` is called."
@@ -871,7 +881,7 @@ msgstr ""
871881msgid ""
872882"*ch* may be an integer (a character code, not a key code) or a string of "
873883"length 1."
874- msgstr ""
884+ msgstr "*ch* 可以是一個整數(字元代碼,而非按鍵代碼)或一個長度為 1 的字串。 "
875885
876886#: ../../library/curses.rst:738
877887msgid "Only one *ch* can be pushed before :meth:`!get_wch` is called."
@@ -1251,6 +1261,10 @@ msgid ""
12511261"return ``-1`` if the read is non-blocking or times out (see :meth:`nodelay` "
12521262"and :meth:`timeout`)."
12531263msgstr ""
1264+ "讀取一次按鍵,若有指定 *y*、*x* 則先將游標移動到該處,並以整數形式回傳。如果"
1265+ "該視窗不是 pad 且自上次重新整理後已被修改,則會先重新整理它。等待直到有按鍵被"
1266+ "按下,或者在讀取為非阻塞或逾時的情況下回傳 ``-1``\\ (請參閱 :meth:`nodelay` "
1267+ "和 :meth:`timeout`)。"
12541268
12551269#: ../../library/curses.rst:1024
12561270msgid ""
@@ -1259,6 +1273,10 @@ msgid ""
12591273"calls. For example, in a UTF-8 locale ``'é'`` is read as ``195``, then "
12601274"``169``. Use :meth:`get_wch` to read it as a single character."
12611275msgstr ""
1276+ "一般按鍵會以其在目前語言環境 (locale) 中編碼的單一位元組代碼回傳,因此一個以"
1277+ "多個位元組編碼的字元需要多次呼叫才能讀取完畢。舉例來說,在 UTF-8 語言環境下,"
1278+ "``'é'`` 會先讀到 ``195``,接著讀到 ``169``。若要將其讀取為單一字元,請使用 :"
1279+ "meth:`get_wch`。"
12621280
12631281#: ../../library/curses.rst:1030
12641282msgid ""
@@ -1268,12 +1286,18 @@ msgid ""
12681286"sequence does not arrive in time (see :meth:`notimeout` and :func:"
12691287"`set_escdelay`), their bytes are returned one at a time."
12701288msgstr ""
1289+ "在鍵盤模式 (keypad mode,請參閱 :meth:`keypad`) 下,功能鍵和其他特殊按鍵會"
1290+ "以 :ref:`KEY_* 常數之一 <curses-key-constants>` 的形式回傳,因此不會與一般按"
1291+ "鍵混淆。否則,或者如果它們的跳脫序列 (escape sequence) 未能及時送達(請參閱 :"
1292+ "meth:`notimeout` 和 :func:`set_escdelay`),則會逐一位元組回傳。"
12711293
12721294#: ../../library/curses.rst:1037 ../../library/curses.rst:1057
12731295msgid ""
12741296"In echo mode (see :func:`echo`) the key is added to the window as by :meth:"
12751297"`addch`; special keys are not echoed."
12761298msgstr ""
1299+ "在回顯模式 (echo mode,請參閱 :func:`echo`) 下,該按鍵會以 :meth:`addch` 的方"
1300+ "式被加入到視窗中;特殊按鍵則不會被回顯。"
12771301
12781302#: ../../library/curses.rst:1043
12791303msgid ""
@@ -1283,6 +1307,10 @@ msgid ""
12831307"pressed, or raise :exc:`error` if the read is non-blocking or times out "
12841308"(see :meth:`nodelay` and :meth:`timeout`)."
12851309msgstr ""
1310+ "讀取一次按鍵,若有指定 *y*、*x* 則先將游標移動到該處,並以單一字元的 :class:"
1311+ "`str` 形式回傳。如果該視窗不是 pad 且自上次重新整理後已被修改,則會先重新整理"
1312+ "它。等待直到有按鍵被按下,或者在讀取為非阻塞或逾時的情況下引發 :exc:"
1313+ "`error`\\ (請參閱 :meth:`nodelay` 和 :meth:`timeout`)。"
12861314
12871315#: ../../library/curses.rst:1050
12881316msgid ""
@@ -1292,6 +1320,10 @@ msgid ""
12921320"(see :meth:`notimeout` and :func:`set_escdelay`), their characters are "
12931321"returned one at a time."
12941322msgstr ""
1323+ "在鍵盤模式 (keypad mode,請參閱 :meth:`keypad`) 下,功能鍵和其他特殊按鍵會"
1324+ "以 :ref:`KEY_* 常數之一 <curses-key-constants>`\\ (一個整數)的形式回傳。否"
1325+ "則,或者如果它們的跳脫序列 (escape sequence) 未能及時送達(請參閱 :meth:"
1326+ "`notimeout` 和 :func:`set_escdelay`),則會逐一字元回傳。"
12951327
12961328#: ../../library/curses.rst:1065
12971329msgid ""
@@ -1300,6 +1332,10 @@ msgid ""
13001332"special key as its name, such as ``'KEY_UP'`` (see :func:`keyname`). Raise :"
13011333"exc:`error` instead of returning ``-1`` if there is no input."
13021334msgstr ""
1335+ "以與 :meth:`getch` 相同的方式讀取一次按鍵,但以 :class:`str` 形式回傳:一般按"
1336+ "鍵會是單一字元的字串(該位元組以 Latin-1 解碼),特殊按鍵則會是其名稱,例如 "
1337+ "``'KEY_UP'``\\ (請參閱 :func:`keyname`)。若沒有輸入,則引發 :exc:`error` 而"
1338+ "非回傳 ``-1``。"
13031339
13041340#: ../../library/curses.rst:1073
13051341msgid "Return a tuple ``(y, x)`` of the height and width of the window."
@@ -1458,6 +1494,9 @@ msgid ""
14581494"mode is disabled by default, but :func:`wrapper` enables it for the main "
14591495"window."
14601496msgstr ""
1497+ "如果 *flag* 為 ``True``,某些按鍵(keypad、功能鍵)產生的跳脫序列將由 :mod:`!"
1498+ "curses` 解讀。如果 *flag* 為 ``False``,跳脫序列會原樣保留在輸入串流中。鍵盤"
1499+ "模式預設為停用,但 :func:`wrapper` 會為主視窗啟用它。"
14611500
14621501#: ../../library/curses.rst:1228
14631502msgid ""
0 commit comments