-
-
Notifications
You must be signed in to change notification settings - Fork 214
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
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (C) 2001-2022, Python Software Foundation | ||
s Copyright (C) 2001-2022, Python Software Foundation | ||
# This file is distributed under the same license as the Python package. | ||
# | ||
# Translators: | ||
|
@@ -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 00:38+0800\n" | ||
"Last-Translator: Adrian Liaw <[email protected]>\n" | ||
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" | ||
"tw)\n" | ||
|
@@ -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/" | ||
mattwang44 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"O)*。這些均為泛用 (generic) 類型,且每種類型都可以使用各式後端儲存 (backing " | ||
"store)。任一種屬於這些類型的具體物件稱為 :term:`file object`。其它常見的名詞" | ||
"還有 *資料串流 (stream)* 以及 *類檔案物件 (file-like objects)*。" | ||
mattwang44 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
#: ../../library/io.rst:34 | ||
msgid "" | ||
|
@@ -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 "" | ||
|
@@ -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" | ||
|
@@ -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 "" | ||
|
@@ -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 " | ||
mattwang44 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"objects <bytes-like object>` 且產生 :class:`bytes` 物件。不進行編碼、解碼或者" | ||
mattwang44 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"換行字元轉換。這種類型的資料串流可用於各種非文字資料,以及需要手動控制對文字" | ||
"資料的處理時。" | ||
|
||
#: ../../library/io.rst:80 | ||
msgid "" | ||
|
@@ -160,6 +175,11 @@ 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)*)通常作為二進位以及文字資料串" | ||
mattwang44 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"流的低階 building-block 使用;在使用者程式碼中直接操作原始資料串流很少有用。" | ||
"然而,你可以透過以無緩衝的二進位模式開啟一個檔案來建立一個原始資料串流:\n" | ||
"\n" | ||
"::" | ||
|
||
#: ../../library/io.rst:106 | ||
msgid "" | ||
|
@@ -302,6 +322,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`` 參數的 callables。" | ||
mattwang44 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
#: ../../library/io.rst:203 | ||
msgid "" | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.