Skip to content

Commit 2332301

Browse files
authored
Adds more translations of library/io (#512)
Adds more translations of library/io
1 parent c51ea89 commit 2332301

File tree

1 file changed

+28
-5
lines changed

1 file changed

+28
-5
lines changed

library/io.po

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

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

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

6472
#: ../../library/io.rst:45
6573
msgid ""
6674
"Operations that used to raise :exc:`IOError` now raise :exc:`OSError`, "
6775
"since :exc:`IOError` is now an alias of :exc:`OSError`."
6876
msgstr ""
69-
"原本會引發 :exc:`IOError` 的操作,現在將改成引發 :exc:`OSError`。因為 :"
70-
"exc:`IOError` 現在是 :exc:`OSError` 的別名。"
77+
"原本會引發 :exc:`IOError` 的操作,現在將改成引發 :exc:`OSError`。因為 :exc:"
78+
"`IOError` 現在是 :exc:`OSError` 的別名。"
7179

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

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

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

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

306329
#: ../../library/io.rst:203
307330
msgid ""

0 commit comments

Comments
 (0)