Skip to content

Adds more translations of library/io #512

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 2 commits into from
Jul 31, 2023
Merged
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
33 changes: 28 additions & 5 deletions library/io.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-07-22 00:04+0000\n"
"PO-Revision-Date: 2023-07-17 17:38+0800\n"
"PO-Revision-Date: 2023-07-31 18:24+0800\n"
"Last-Translator: Adrian Liaw <[email protected]>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
"tw)\n"
Expand Down Expand Up @@ -39,6 +39,11 @@ msgid ""
"any of these categories is called a :term:`file object`. Other common terms "
"are *stream* and *file-like object*."
msgstr ""
":mod:`io` 模組替 Python 提供處理各種類型 IO 的主要工具。有三種主要的 IO 類"
"型: *文字 I/O (text I/O)*、*二進位 I/O (binary I/O)* 以及\\ *原始 I/O (raw "
"I/O)*。這些均為泛用 (generic) 類型,且每種類型都可以使用各式後端儲存 "
"(backing store)。任一種屬於這些類型的具體物件稱為 :term:`file object`。其它常"
"見的名詞還有\\ *資料串流 (stream)* 以及\\ *類檔案物件 (file-like objects)*。"

#: ../../library/io.rst:34
msgid ""
Expand All @@ -48,6 +53,9 @@ msgid ""
"location), or only sequential access (for example in the case of a socket or "
"pipe)."
msgstr ""
"無論其類型為何,每個具體的資料串流物件也將具有各種能力:唯讀的、只接受寫入"
"的、或者讀寫兼具的。它還允許任意的隨機存取(向前或向後尋找至任意位置),或者"
"只能依順序存取(例如 socket 或 pipe 的情形下)。"

#: ../../library/io.rst:40
msgid ""
Expand All @@ -58,16 +66,16 @@ msgid ""
msgstr ""
"所有的資料串流都會謹慎處理你所提供的資料的型別。舉例來說,提供一個 :class:"
"`str` 物件給二進位資料串流的 ``write()`` 方法將會引發 :exc:`TypeError`。同樣"
"地,若提供一個 :class:`bytes` 物件給文字資料串流的 ``write()`` 方法,也會引發同"
"樣的錯誤。"
"地,若提供一個 :class:`bytes` 物件給文字資料串流的 ``write()`` 方法,也會引發"
"同樣的錯誤。"

#: ../../library/io.rst:45
msgid ""
"Operations that used to raise :exc:`IOError` now raise :exc:`OSError`, "
"since :exc:`IOError` is now an alias of :exc:`OSError`."
msgstr ""
"原本會引發 :exc:`IOError` 的操作,現在將改成引發 :exc:`OSError`。因為 :"
"exc:`IOError` 現在是 :exc:`OSError` 的別名。"
"原本會引發 :exc:`IOError` 的操作,現在將改成引發 :exc:`OSError`。因為 :exc:"
"`IOError` 現在是 :exc:`OSError` 的別名。"

#: ../../library/io.rst:51 ../../library/io.rst:855 ../../library/io.rst:1122
msgid "Text I/O"
Expand All @@ -80,6 +88,9 @@ msgid ""
"a file), encoding and decoding of data is made transparently as well as "
"optional translation of platform-specific newline characters."
msgstr ""
"文字 I/O 要求和產出 :class:`str` 物件。這意味著每當後端儲存為原生 bytes 時"
"(例如在檔案的情形下),資料的編碼與解碼會以清楚易懂的方式進行,也可選擇同時"
"轉換特定於平台的換行字元。"

#: ../../library/io.rst:58
msgid ""
Expand Down Expand Up @@ -116,6 +127,10 @@ msgid ""
"be used for all kinds of non-text data, and also when manual control over "
"the handling of text data is desired."
msgstr ""
"二進位 I/O(也稱為\\ *緩衝 I/O (buffered I/O)*)要求的是\\ :term:`類位元組物"
"件 (bytes-like objects) <bytes-like object>` 且產生 :class:`bytes` 物件。不進"
"行編碼、解碼或者換行字元轉換。這種類型的資料串流可用於各種非文字資料,以及需"
"要手動控制對文字資料的處理時。"

#: ../../library/io.rst:80
msgid ""
Expand Down Expand Up @@ -160,6 +175,12 @@ msgid ""
"manipulate a raw stream from user code. Nevertheless, you can create a raw "
"stream by opening a file in binary mode with buffering disabled::"
msgstr ""
"原始 I/O(也稱為\\ *無緩衝 I/O (unbuffered I/O)*)通常作為二進位以及文字資料"
"串流的低階 building-block 使用;在使用者程式碼中直接操作原始資料串流很少有"
"用。然而,你可以透過以無緩衝的二進位模式開啟一個檔案來建立一個原始資料串"
"流:\n"
"\n"
"::"

#: ../../library/io.rst:106
msgid ""
Expand Down Expand Up @@ -302,6 +323,8 @@ msgid ""
"This is a helper function for callables that use :func:`open` or :class:"
"`TextIOWrapper` and have an ``encoding=None`` parameter."
msgstr ""
"這是個輔助函數,適用於使用 :func:`open` 或 :class:`TextIOWrapper` 且具有 "
"``encoding=None`` 參數的可呼叫物件。"

#: ../../library/io.rst:203
msgid ""
Expand Down