@@ -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."
@@ -1250,6 +1260,10 @@ msgid ""
12501260"return ``-1`` if the read is non-blocking or times out (see :meth:`nodelay` "
12511261"and :meth:`timeout`)."
12521262msgstr ""
1263+ "讀取一次按鍵,若有指定 *y*、*x* 則先將游標移動到該處,並以整數形式回傳。如果"
1264+ "該視窗不是 pad 且自上次重新整理後已被修改,則會先重新整理它。等待直到有按鍵被"
1265+ "按下,或者在讀取為非阻塞或逾時的情況下回傳 ``-1``\\ (請參閱 :meth:`nodelay` "
1266+ "和 :meth:`timeout`)。"
12531267
12541268#: ../../library/curses.rst:1023
12551269msgid ""
@@ -1258,6 +1272,10 @@ msgid ""
12581272"calls. For example, in a UTF-8 locale ``'é'`` is read as ``195``, then "
12591273"``169``. Use :meth:`get_wch` to read it as a single character."
12601274msgstr ""
1275+ "一般按鍵會以其在目前語言環境 (locale) 中編碼的單一位元組代碼回傳,因此一個以"
1276+ "多個位元組編碼的字元需要多次呼叫才能讀取完畢。舉例來說,在 UTF-8 語言環境下,"
1277+ "``'é'`` 會先讀到 ``195``,接著讀到 ``169``。若要將其讀取為單一字元,請使用 :"
1278+ "meth:`get_wch`。"
12611279
12621280#: ../../library/curses.rst:1029
12631281msgid ""
@@ -1267,12 +1285,18 @@ msgid ""
12671285"sequence does not arrive in time (see :meth:`notimeout` and :func:"
12681286"`set_escdelay`), their bytes are returned one at a time."
12691287msgstr ""
1288+ "在鍵盤模式 (keypad mode,請參閱 :meth:`keypad`) 下,功能鍵和其他特殊按鍵會"
1289+ "以 :ref:`KEY_* 常數之一 <curses-key-constants>` 的形式回傳,因此不會與一般按"
1290+ "鍵混淆。否則,或者如果它們的跳脫序列 (escape sequence) 未能及時送達(請參閱 :"
1291+ "meth:`notimeout` 和 :func:`set_escdelay`),則會逐一位元組回傳。"
12701292
12711293#: ../../library/curses.rst:1036 ../../library/curses.rst:1056
12721294msgid ""
12731295"In echo mode (see :func:`echo`) the key is added to the window as by :meth:"
12741296"`addch`; special keys are not echoed."
12751297msgstr ""
1298+ "在回顯模式 (echo mode,請參閱 :func:`echo`) 下,該按鍵會以 :meth:`addch` 的方"
1299+ "式被加入到視窗中;特殊按鍵則不會被回顯。"
12761300
12771301#: ../../library/curses.rst:1042
12781302msgid ""
@@ -1282,6 +1306,10 @@ msgid ""
12821306"pressed, or raise :exc:`error` if the read is non-blocking or times out "
12831307"(see :meth:`nodelay` and :meth:`timeout`)."
12841308msgstr ""
1309+ "讀取一次按鍵,若有指定 *y*、*x* 則先將游標移動到該處,並以單一字元的 :class:"
1310+ "`str` 形式回傳。如果該視窗不是 pad 且自上次重新整理後已被修改,則會先重新整理"
1311+ "它。等待直到有按鍵被按下,或者在讀取為非阻塞或逾時的情況下引發 :exc:"
1312+ "`error`\\ (請參閱 :meth:`nodelay` 和 :meth:`timeout`)。"
12851313
12861314#: ../../library/curses.rst:1049
12871315msgid ""
@@ -1291,6 +1319,10 @@ msgid ""
12911319"(see :meth:`notimeout` and :func:`set_escdelay`), their characters are "
12921320"returned one at a time."
12931321msgstr ""
1322+ "在鍵盤模式 (keypad mode,請參閱 :meth:`keypad`) 下,功能鍵和其他特殊按鍵會"
1323+ "以 :ref:`KEY_* 常數之一 <curses-key-constants>`\\ (一個整數)的形式回傳。否"
1324+ "則,或者如果它們的跳脫序列 (escape sequence) 未能及時送達(請參閱 :meth:"
1325+ "`notimeout` 和 :func:`set_escdelay`),則會逐一字元回傳。"
12941326
12951327#: ../../library/curses.rst:1064
12961328msgid ""
@@ -1299,6 +1331,10 @@ msgid ""
12991331"special key as its name, such as ``'KEY_UP'`` (see :func:`keyname`). Raise :"
13001332"exc:`error` instead of returning ``-1`` if there is no input."
13011333msgstr ""
1334+ "以與 :meth:`getch` 相同的方式讀取一次按鍵,但以 :class:`str` 形式回傳:一般按"
1335+ "鍵會是單一字元的字串(該位元組以 Latin-1 解碼),特殊按鍵則會是其名稱,例如 "
1336+ "``'KEY_UP'``\\ (請參閱 :func:`keyname`)。若沒有輸入,則引發 :exc:`error` 而"
1337+ "非回傳 ``-1``。"
13021338
13031339#: ../../library/curses.rst:1072
13041340msgid "Return a tuple ``(y, x)`` of the height and width of the window."
@@ -1457,6 +1493,9 @@ msgid ""
14571493"mode is disabled by default, but :func:`wrapper` enables it for the main "
14581494"window."
14591495msgstr ""
1496+ "如果 *flag* 為 ``True``,某些按鍵(keypad、功能鍵)產生的跳脫序列將由 :mod:`!"
1497+ "curses` 解讀。如果 *flag* 為 ``False``,跳脫序列會原樣保留在輸入串流中。鍵盤"
1498+ "模式預設為停用,但 :func:`wrapper` 會為主視窗啟用它。"
14601499
14611500#: ../../library/curses.rst:1227
14621501msgid ""
0 commit comments