Skip to content

Add more translations of library/io #720

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 1 commit into from
Dec 8, 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
48 changes: 38 additions & 10 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-08-30 00:04+0000\n"
"PO-Revision-Date: 2023-11-22 00:45+0800\n"
"PO-Revision-Date: 2023-12-08 00:08+0800\n"
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
"tw)\n"
Expand Down Expand Up @@ -417,6 +417,9 @@ msgid ""
"used to specify the various categories of streams, then concrete classes "
"providing the standard stream implementations."
msgstr ""
"I/O 串流的實作是由多個類別組合成的階層結構所構成。首先是 :term:`abstract "
"base classes <abstract base class>` (抽象基底類別,ABCs),它們被用來規範各"
"種不同類型的串流,接著具體類別會提供標準串流的實作。"

#: ../../library/io.rst:258
msgid ""
Expand All @@ -425,6 +428,9 @@ msgid ""
"example, :class:`BufferedIOBase` provides unoptimized implementations of :"
"meth:`!readinto` and :meth:`!readline`."
msgstr ""
"為了協助具體串流類別的實作,抽象基底類別提供了某些方法的預設實作。舉例來說,:"
"class:`BufferedIOBase` 提供未經最佳化的 :meth:`!readinto` 與 :meth:`!"
"readline` 實作。"

#: ../../library/io.rst:263
msgid ""
Expand All @@ -434,13 +440,19 @@ msgid ""
"allowed to raise :exc:`UnsupportedOperation` if they do not support a given "
"operation."
msgstr ""
"I/O 階層結構的最上層是抽象基底類別 :class:`IOBase`。它定義了串流的基礎的介"
"面。然而,請注意,讀取串流與寫入串流之間並沒有分離;若不支援給定的操作,實作"
"是允許引發 :exc:`UnsupportedOperation` 例外的。"

#: ../../library/io.rst:268
msgid ""
"The :class:`RawIOBase` ABC extends :class:`IOBase`. It deals with the "
"reading and writing of bytes to a stream. :class:`FileIO` subclasses :class:"
"`RawIOBase` to provide an interface to files in the machine's file system."
msgstr ""
"抽象基底類別 :class:`RawIOBase` 繼承 :class:`IOBase`。此類別處理對串流的位元"
"組讀寫。:class:`FileIO` 則繼承 :class:`RawIOBase` 來提供一個介面以存取機器檔"
"案系統內的檔案。"

#: ../../library/io.rst:272
msgid ""
Expand All @@ -452,6 +464,12 @@ msgid ""
"interface to seekable streams. Another :class:`BufferedIOBase` subclass, :"
"class:`BytesIO`, is a stream of in-memory bytes."
msgstr ""
"抽象基底類別 :class:`BufferedIOBase` 繼承 :class:`IOBase`。此類別緩衝原始二進"
"位串流 (:class:`RawIOBase`)。它的子類別 :class:`BufferedWriter`、:class:"
"`BufferedReader` 與 :class:`BufferedRWPair` 分別緩衝可寫、可讀、可讀也可寫的"
"的原始二進位串流。類別 :class:`BufferedRandom` 則提供一個對可搜尋串流 "
"(seekable stream) 的緩衝介面。另一個類別 :class:`BufferedIOBase` 的子類別 :"
"class:`BytesIO`,是一個記憶體內位元組串流。"

#: ../../library/io.rst:280
msgid ""
Expand All @@ -461,6 +479,10 @@ msgid ""
"buffered text interface to a buffered raw stream (:class:`BufferedIOBase`). "
"Finally, :class:`StringIO` is an in-memory stream for text."
msgstr ""
"抽象基底類別 :class:`TextIOBase` 繼承 :class:`IOBase`。此類別處理文本位元組串"
"流,並處理字串的編碼和解碼。類別 :class:`TextIOWrapper` 繼承自 :class:"
"`TextIOBase`,這是個對緩衝原始串流 (:class:`BufferedIOBase`) 的緩衝文本介面。"
"最後,:class:`StringIO` 是個文字記憶體內串流。"

#: ../../library/io.rst:286
msgid ""
Expand All @@ -471,23 +493,23 @@ msgstr "引數名稱不是規範的一部份,只有 :func:`open` 的引數將
#: ../../library/io.rst:289
msgid ""
"The following table summarizes the ABCs provided by the :mod:`io` module:"
msgstr "以下表格總結了 :mod:`io` 模組提供的抽象基礎類別 (ABC):"
msgstr "以下表格總結了 :mod:`io` 模組提供的抽象基底類別 (ABC):"

#: ../../library/io.rst:294
msgid "ABC"
msgstr "ABC"
msgstr "抽象基底類別 (ABC)"

#: ../../library/io.rst:294
msgid "Inherits"
msgstr ""
msgstr "繼承"

#: ../../library/io.rst:294
msgid "Stub Methods"
msgstr ""
msgstr "Stub 方法"

#: ../../library/io.rst:294
msgid "Mixin Methods and Properties"
msgstr ""
msgstr "Mixin 方法與屬性"

#: ../../library/io.rst:296 ../../library/io.rst:301 ../../library/io.rst:303
#: ../../library/io.rst:305
Expand All @@ -504,6 +526,9 @@ msgid ""
"``__iter__``, ``__next__``, ``readable``, ``readline``, ``readlines``, "
"``seekable``, ``tell``, ``writable``, and ``writelines``"
msgstr ""
"``close``、``closed``、``__enter__``、``__exit__``、``flush``、``isatty``、"
"``__iter__``、``__next__``、``readable``、``readline``、``readlines``、"
"``seekable``、``tell``、``writable`` 與 ``writelines``"

#: ../../library/io.rst:301
msgid ":class:`RawIOBase`"
Expand All @@ -515,7 +540,7 @@ msgstr "``readinto`` 和 ``write``"

#: ../../library/io.rst:301
msgid "Inherited :class:`IOBase` methods, ``read``, and ``readall``"
msgstr ""
msgstr "繼承自 :class:`IOBase` 的方法,``read`` 與 ``readall``"

#: ../../library/io.rst:303
msgid ":class:`BufferedIOBase`"
Expand All @@ -527,7 +552,7 @@ msgstr "``detach``\\ 、\\ ``read``\\ 、\\ ``read1`` 和 ``write``"

#: ../../library/io.rst:303
msgid "Inherited :class:`IOBase` methods, ``readinto``, and ``readinto1``"
msgstr ""
msgstr "繼承自 :class:`IOBase` 的方法,``readinto`` 與 ``readinto1``"

#: ../../library/io.rst:305
msgid ":class:`TextIOBase`"
Expand All @@ -541,21 +566,24 @@ msgstr "``detach``\\ 、\\ ``read``\\ 、\\ ``readline`` 和 ``write``"
msgid ""
"Inherited :class:`IOBase` methods, ``encoding``, ``errors``, and ``newlines``"
msgstr ""
"繼承自 :class:`IOBase` 的方法,``encoding``、``errors`` 與 ``newlines``"

#: ../../library/io.rst:312
msgid "I/O Base Classes"
msgstr ""
msgstr "I/O 基礎類別"

#: ../../library/io.rst:316
msgid "The abstract base class for all I/O classes."
msgstr ""
msgstr "所有 I/O 類別的抽象基礎類別。"

#: ../../library/io.rst:318
msgid ""
"This class provides empty abstract implementations for many methods that "
"derived classes can override selectively; the default implementations "
"represent a file that cannot be read, written or seeked."
msgstr ""
"為許多方法提供了空的抽象實作,衍伸類別可以選擇性地覆寫這些方法;預設的實作代"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這是 衍生 還是 衍伸?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

應為「衍生」才對,我把它跟「延伸」弄混了。

"表一個無法讀取、寫入或搜尋的檔案。"

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