8000 Translate `library/{urllib.error,tty,sndhdr}.po` by mattwang44 · Pull Request #184 · python/python-docs-zh-tw · GitHub
[go: up one dir, main page]

Skip to content

Translate library/{urllib.error,tty,sndhdr}.po #184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions library/sndhdr.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,28 @@
# This file is distributed under the same license as the Python package.
#
# Translators:
# Liang-Bo Wang <me@liang2.tw>, 2015
# Matt Wang <mattwang44@gmail.com>, 2021
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.10\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-05-21 17:35+0000\n"
"PO-Revision-Date: 2022-05-22 02:13+0800\n"
"Last-Translator: Liang-Bo Wang <me@liang2.tw>\n"
"POT-Creation-Date: 2018-06-26 18:54+0800\n"
"PO-Revision-Date: 2022-06-11 15:40+0800\n"
"Last-Translator: Matt Wang <mattwang44@gmail.com>\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"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 3.0.1\n"
"X-Generator: Poedit 3.1\n"

#: ../../library/sndhdr.rst:2
msgid ":mod:`sndhdr` --- Determine type of sound file"
msgstr ":mod:`imghdr` --- 推測音檔種類"
msgstr ":mod:`sndhdr` --- 判定聲音檔案的型別"

#: ../../library/sndhdr.rst:11
msgid "**Source code:** :source:`Lib/sndhdr.py`"
Expand All @@ -33,7 +36,7 @@ msgid ""
"details and alternatives)."
msgstr ""
":mod:`sndhdr` 模組 (module) 即將被棄用(詳情與替代方案請見 :pep:`PEP 594 "
"<594#sndhdr>`\\ )。"
"<594#sndhdr>`)。"

#: ../../library/sndhdr.rst:23
msgid ""
Expand All @@ -52,21 +55,36 @@ msgid ""
"the tuple, *bits_per_sample*, will either be the sample size in bits or "
"``'A'`` for A-LAW or ``'U'`` for u-LAW."
msgstr ""
":mod:`sndhdr` 提供了企圖猜測檔案中聲音資料型別的工具函式。當這些函式可以推測"
"出儲存在檔案中聲音資料的型別,它們分別回傳一個 :func:`collections."
"namedtuple`,包含了五種屬性:(``filetype``、``framerate``、``nchannels``、"
"``nframes``、``sampwidth``)。這些 *type* 的值表示資料的型別,會是以下字串之"
"一:``'aifc'``、``'aiff'``、``'au'``、``'hcom'``、``'sndr'``、``'sndt'``、"
"``'voc'``、``'wav'``、``'8svx'``、``'sb'``、``'ub'`` 或 ``'ul'``。"
"*sampling_rate*\\ (取樣頻率)可能是實際值、或者當未知或者難以解碼時為 "
"``0``。同樣的,*channels*\\ (影像通道數)也會回傳實際值或者在無法推測或難以"
"解碼時回傳 ``0``。*frames*\\ (幀數)則是實際值或 ``-1``。tuple 的最後一項,"
"*bits_per_sample* 為位元表示的取樣大小,或者在 A-LAW 時為 ``'A'``,u-LAW 時"
"為 ``'U'``。"

#: ../../library/sndhdr.rst:40
msgid ""
"Determines the type of sound data stored in the file *filename* using :func:"
"`whathdr`. If it succeeds, returns a namedtuple as 8000 described above, "
"otherwise ``None`` is returned."
msgstr ""
"使用 :func:`whathdr` 推測儲存在 *filename* 檔案中聲音資料的型別。如果成功,回"
"傳上述的 namedtuple(附名元組),否則回傳 ``None``。"

#: ../../library/sndhdr.rst:44 ../../library/sndhdr.rst:54
msgid "Result changed from a tuple to a namedtuple."
msgstr ""
msgstr "結果從 tuple 改為 namedtuple。"

#: ../../library/sndhdr.rst:50
msgid ""
"Determines the type of sound data stored in a file based on the file "
"header. The name of the file is given by *filename*. This function returns "
"a namedtuple as described above on success, or ``None``."
msgstr ""
"根據檔案標頭 (header) 推測儲存在檔案中的聲音資料型別。檔名由 *filename* 給"
"定。這個函式在成功時回傳上述 namedtuple,或在失敗時回傳 ``None``。"
21 changes: 14 additions & 7 deletions library/tty.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,27 @@
# This file is distributed under the same license as the Python package.
#
# Translators:
# Liang-Bo Wang <me@liang2.tw>, 2016
# Matt Wang <mattwang44@gmail.com>, 2021
msgid ""
msgstr ""
"Project-Id-Version: Python 3.10\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-06-26 18:54+0800\n"
"PO-Revision-Date: 2016-11-19 00:35+0000\n"
"Last-Translator: Liang-Bo Wang <me@liang2.tw>\n"
"PO-Revision-Date: 2021-12-17 17:00+0800\n"
"Last-Translator: Matt Wang <mattwang44@gmail.com>\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"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 3.0.1\n"

#: ../../library/tty.rst:2
msgid ":mod:`tty` --- Terminal control functions"
msgstr ""
msgstr ":mod:`tty` --- 終端機控制函式"

#: ../../library/tty.rst:11
msgid "**Source code:** :source:`Lib/tty.py`"
Expand All @@ -30,35 +33,39 @@ msgstr "**原始碼:**\\ :source:`Lib/tty.py`"
msgid ""
"The :mod:`tty` module defines functions for putting the tty into cbreak and "
"raw modes."
msgstr ""
msgstr ":mod:`tty` 模組定義了將 tty 放入 cbreak 和 raw 模式的函式。"

#: ../../library/tty.rst:18
msgid ""
"Because it requires the :mod:`termios` module, it will work only on Unix."
msgstr ""
msgstr "因為它需要 :mod:`termios` 模組,所以只能在 Unix 上執行。"

#: ../../library/tty.rst:20
msgid "The :mod:`tty` module defines the following functions:"
msgstr ""
msgstr ":mod:`tty` 模組定義了以下函式:"

#: ../../library/tty.rst:25
msgid ""
"Change the mode of the file descriptor *fd* to raw. If *when* is omitted, it "
"defaults to :const:`termios.TCSAFLUSH`, and is passed to :func:`termios."
"tcsetattr`."
msgstr ""
"將檔案描述器 *fd* 的模式更改為 raw。如果 *when* 被省略,則預設為 :const:"
"`termios.TCSAFLUSH`,並傳遞給 :func:`termios.tcsetattr`。"

#: ../../library/tty.rst:32
msgid ""
"Change the mode of file descriptor *fd* to cbreak. If *when* is omitted, it "
"defaults to :const:`termios.TCSAFLUSH`, and is passed to :func:`termios."
"tcsetattr`."
msgstr ""
"將檔案描述器 *fd* 的模式更改為 cbreak。如果 *when* 被省略,則預設為 :const:"
"`termios.TCSAFLUSH`,並傳遞給 :func:`termios.tcsetattr`。"

#: ../../library/tty.rst:39
msgid "Module :mod:`termios`"
msgstr ":mod:`termios` 模組"

#: ../../library/tty.rst:40
msgid "Low-level terminal control interface."
msgstr ""
msgstr "低階終端機控制介面。"
63 changes: 0 additions & 63 deletions library/undoc.po

This file was deleted.

31 changes: 24 additions & 7 deletions library/urllib.error.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,28 @@
# This file is distributed under the same license as the Python package.
#
# Translators:
# Liang-Bo Wang <me@liang2.tw>, 2016
# Matt Wang <mattwang44@gmail.com>, 2021
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.10\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-06-26 18:54+0800\n"
"PO-Revision-Date: 2016-11-19 00:35+0000\n"
"Last-Translator: Liang-Bo Wang <me@liang2.tw>\n"
"PO-Revision-Date: 2022-06-11 15:34+0800\n"
"Last-Translator: Matt Wang <mattwang44@gmail.com>\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"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 3.1\n"

#: ../../library/urllib.error.rst:2
msgid ":mod:`urllib.error` --- Exception classes raised by urllib.request"
msgstr ""
msgstr ":mod:`urllib.error` --- urllib.request 引發的例外類別"

#: ../../library/urllib.error.rst:10
msgid "**Source code:** :source:`Lib/urllib/error.py`"
Expand All @@ -32,29 +36,34 @@ msgid ""
"raised by :mod:`urllib.request`. The base exception class is :exc:"
"`URLError`."
msgstr ""
":mod:`urllib.error` module(模組)為 :mod:`urllib.request` 所引發的例外定義了"
"例外 (exception) 類別。基礎例外類別是 :exc:`URLError`。"

#: ../../library/urllib.error.rst:17
msgid ""
"The following exceptions are raised by :mod:`urllib.error` as appropriate:"
msgstr ""
msgstr "下列例外會被 :mod:`urllib.error` 適時引發:"

#: ../../library/urllib.error.rst:21
msgid ""
"The handlers raise this exception (or derived exceptions) when they run into "
"a problem. It is a subclass of :exc:`OSError`."
msgstr ""
"處理程式 (handler) 在遇到問題時會引發此例外(或其衍生例外)。它是 :exc:"
"`OSError` 的一個子類別。"

#: ../../library/urllib.error.rst:26
msgid ""
"The reason for this error. It can be a message string or another exception "
"instance."
msgstr ""
msgstr "此錯誤的原因。它可以是一個訊息字串或另一個例外實例。"

#: ../../library/urllib.error.rst:29
msgid ""
":exc:`URLError` has been made a subclass of :exc:`OSError` instead of :exc:"
"`IOError`."
msgstr ""
":exc:`URLError` 已被設為 :exc:`OSError` 而不是 :exc:`IOError` 的子類別。"

#: ../../library/urllib.error.rst:36
msgid ""
Expand All @@ -63,23 +72,28 @@ msgid ""
"(the same thing that :func:`~urllib.request.urlopen` returns). This is "
"useful when handling exotic HTTP errors, such as requests for authentication."
msgstr ""
"雖然是一個例外(:exc:`URLError` 的一個子類別),:exc:`HTTPError` 也可以作為一"
"個非例外的類檔案回傳值(與 :func:`~urllib.request.urlopen` 所回傳的物件相"
"同)。這適用於處理特殊 HTTP 錯誤,例如為請求認證。"

#: ../../library/urllib.error.rst:44
msgid ""
"An HTTP status code as defined in :rfc:`2616`. This numeric value "
"corresponds to a value found in the dictionary of codes as found in :attr:"
"`http.server.BaseHTTPRequestHandler.responses`."
msgstr ""< 7C02 /td>
"一個 HTTP 狀態碼,具體定義見 :rfc:`2616`。這個數值會對應到存放在 :attr:`http."
"server.BaseHTTPRequestHandler.responses` 程式碼 dictionary 中的某個值。"

#: ../../library/urllib.error.rst:50
msgid "This is usually a string explaining the reason for this error."
msgstr ""
msgstr "這通常是一個解釋本次錯誤原因的字串。"

#: ../../library/urllib.error.rst:54
msgid ""
"The HTTP response headers for the HTTP request that caused the :exc:"
"`HTTPError`."
msgstr ""
msgstr "導致 :exc:`HTTPError` 的特定 HTTP 請求的 HTTP 回應 header。"

#: ../../library/urllib.error.rst:61
msgid ""
Expand All @@ -88,3 +102,6 @@ msgid ""
"expected amount (given by the *Content-Length* header). The :attr:`content` "
"attribute stores the downloaded (and supposedly truncated) data."
msgstr ""
"此例外會在 :func:`~urllib.request.urlretrieve` 函式檢查到已下載的資料量小於期"
"待的資料量(由 *Content-Length* header 給定)時被引發。:attr:`content` 屬性中"
"將存放已下載(可能已被截斷)的資料。"
0