Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6facb37

Browse files
Dr-XYZjosix
andauthored
translate (#1079)
Co-authored-by: Josix <[email protected]>
1 parent b208964 commit 6facb37

File tree

1 file changed

+64
-16
lines changed

1 file changed

+64
-16
lines changed

library/zipimport.po

Lines changed: 64 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
# This file is distributed under the same license as the Python package.
44
#
55
# Translators:
6+
# Adrian Liaw <[email protected]>, 2018
7+
# Dr-XYZ <[email protected]>, 2025
68
msgid ""
79
msgstr ""
810
"Project-Id-Version: Python 3.13\n"
911
"Report-Msgid-Bugs-To: \n"
1012
"POT-Creation-Date: 2024-09-23 07:52+0800\n"
11-
"PO-Revision-Date: 2018-05-23 16:17+0000\n"
12-
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
13+
"PO-Revision-Date: 2025-06-29 00:00+0800\n"
14+
"Last-Translator: Dr-XYZ <dr.xyz.tw@gmail.com>\n"
1315
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1416
"tw)\n"
1517
"Language: zh_TW\n"
@@ -34,6 +36,10 @@ msgid ""
3436
"the built-in :keyword:`import` mechanism for :data:`sys.path` items that are "
3537
"paths to ZIP archives."
3638
msgstr ""
39+
"此模組新增了從 ZIP 格式封存檔案中引入 Python 模組(:file:`\\*.py`、:file:`"
40+
"\\*.pyc`)和套件的能力。通常不需要明確地使用 :mod:`zipimport` 模組;對於 :"
41+
"data:`sys.path` 中指向 ZIP 封存檔案路徑的項目,內建的 :keyword:`import` 機制"
42+
"會自動使用它。"
3743

3844
#: ../../library/zipimport.rst:19
3945
msgid ""
@@ -45,6 +51,10 @@ msgid ""
4551
"lib/` would only import from the :file:`lib/` subdirectory within the "
4652
"archive."
4753
msgstr ""
54+
"通常 :data:`sys.path` 是一個由目錄名稱字串組成的串列。此模組也允許 :data:"
55+
"`sys.path` 的一個項目是命名 ZIP 封存檔案的字串。ZIP 封存檔案可以包含子目錄結"
56+
"構以支援套件引入,並且可以指定封存檔案內的路徑以僅從子目錄中引入。例如路徑 :"
57+
"file:`example.zip/lib/` 將只會從封存檔案內的 :file:`lib/` 子目錄中引入。"
4858

4959
#: ../../library/zipimport.rst:26
5060
msgid ""
@@ -55,30 +65,38 @@ msgid ""
5565
"adding the corresponding :file:`.pyc` file, meaning that if a ZIP archive "
5666
"doesn't contain :file:`.pyc` files, importing may be rather slow."
5767
msgstr ""
68+
"ZIP 封存檔案中可以存在任何檔案,但引入器只會對 :file:`.py` 和 :file:`.pyc` 檔"
69+
"案起作用。不允許從 ZIP 引入動態模組(:file:`.pyd`、:file:`.so`)。請注意,如"
70+
"果封存檔案只包含 :file:`.py` 檔案,Python 將不會試圖透過新增對應的 :file:`."
71+
"pyc` 檔案來修改封存檔案,這意味著如果 ZIP 封存檔案不包含 :file:`.pyc` 檔案,"
72+
"引入可能會相當慢。"
5873

5974
#: ../../library/zipimport.rst:33
6075
msgid "ZIP64 is supported"
61-
msgstr ""
76+
msgstr "支援 ZIP64。"
6277

6378
#: ../../library/zipimport.rst:36
6479
msgid "Previously, ZIP archives with an archive comment were not supported."
65-
msgstr ""
80+
msgstr "在過去,不支援帶有封存檔案註解的 ZIP 封存檔案。"
6681

6782
#: ../../library/zipimport.rst:41
6883
msgid ""
6984
"`PKZIP Application Note <https://pkware.cachefly.net/webdocs/casestudies/"
7085
"APPNOTE.TXT>`_"
7186
msgstr ""
87+
"`PKZIP Application Note <https://pkware.cachefly.net/webdocs/casestudies/"
88+
"APPNOTE.TXT>`_"
7289

7390
#: ../../library/zipimport.rst:42
7491
msgid ""
7592
"Documentation on the ZIP file format by Phil Katz, the creator of the format "
7693
"and algorithms used."
7794
msgstr ""
95+
"由 ZIP 格式和所用演算法的創造者 Phil Katz 編寫的關於 ZIP 檔案格式的文件。"
7896

7997
#: ../../library/zipimport.rst:45
8098
msgid ":pep:`273` - Import Modules from Zip Archives"
81-
msgstr ""
99+
msgstr ":pep:`273` - 從 Zip 封存檔案引入模組"
82100

83101
#: ../../library/zipimport.rst:46
84102
msgid ""
@@ -87,33 +105,38 @@ msgid ""
87105
"written by Just van Rossum that uses the import hooks described in :pep:"
88106
"`302`."
89107
msgstr ""
108+
"由 James C. Ahlstrom 編寫,他也提供了一個實作。Python 2.3 遵循 :pep:`273` 中"
109+
"的規範,但使用由 Just van Rossum 編寫的實作,該實作使用了 :pep:`302` 中描述的"
110+
"引入掛鉤。"
90111

91112
#: ../../library/zipimport.rst:50
92113
msgid ":mod:`importlib` - The implementation of the import machinery"
93-
msgstr ""
114+
msgstr ":mod:`importlib` - 引入機制的實作"
94115

95116
#: ../../library/zipimport.rst:51
96117
msgid ""
97118
"Package providing the relevant protocols for all importers to implement."
98-
msgstr ""
119+
msgstr "提供所有引入器要實作的相關協定的套件。"
99120

100121
#: ../../library/zipimport.rst:55
101122
msgid "This module defines an exception:"
102-
msgstr ""
123+
msgstr "此模組定義了一個例外:"
103124

104125
#: ../../library/zipimport.rst:59
105126
msgid ""
106127
"Exception raised by zipimporter objects. It's a subclass of :exc:"
107128
"`ImportError`, so it can be caught as :exc:`ImportError`, too."
108129
msgstr ""
130+
"由 zipimporter 物件引發的例外。它是 :exc:`ImportError` 的子類別,所以也可以被"
131+
"捕捉為 :exc:`ImportError`。"
109132

110133
#: ../../library/zipimport.rst:66
111134
msgid "zipimporter Objects"
112135
msgstr "zipimporter 物件"
113136

114137
#: ../../library/zipimport.rst:68
115138
msgid ":class:`zipimporter` is the class for importing ZIP files."
116-
msgstr ""
139+
msgstr ":class:`zipimporter` 是用於引入 ZIP 檔案的類別。"
117140

118141
#: ../../library/zipimport.rst:72
119142
msgid ""
@@ -123,103 +146,126 @@ msgid ""
123146
"`lib` directory inside the ZIP file :file:`foo/bar.zip` (provided that it "
124147
"exists)."
125148
msgstr ""
149+
"建立一個新的 zipimporter 實例。*archivepath* 必須是 ZIP 檔案的路徑,或是 ZIP "
150+
"檔案內的特定路徑。例如,:file:`foo/bar.zip/lib` 的 *archivepath* 將會在 ZIP "
151+
"檔案 :file:`foo/bar.zip` 內的 :file:`lib` 目錄中尋找模組(如果該目錄存在的"
152+
"話)。"
126153

127154
#: ../../library/zipimport.rst:77
128155
msgid ""
129156
":exc:`ZipImportError` is raised if *archivepath* doesn't point to a valid "
130157
"ZIP archive."
131158
msgstr ""
159+
"如果 *archivepath* 未指向一個有效的 ZIP 封存檔案,則會引發 :exc:"
160+
"`ZipImportError`。"
132161

133162
#: ../../library/zipimport.rst:82
134163
msgid ""
135164
"Methods ``find_loader()`` and ``find_module()``, deprecated in 3.10 are now "
136165
"removed. Use :meth:`find_spec` instead."
137166
msgstr ""
167+
"在 3.10 版中已棄用的 ``find_loader()`` 和 ``find_module()`` 方法現已被移除。"
168+
"請改用 :meth:`find_spec`。"
138169

139170
#: ../../library/zipimport.rst:87
140171
msgid ""
141172
"Implementation of :meth:`importlib.abc.Loader.create_module` that returns :"
142173
"const:`None` to explicitly request the default semantics."
143174
msgstr ""
175+
":meth:`importlib.abc.Loader.create_module` 的實作,回傳 :const:`None` 以明確"
176+
"請求預設語意。"
144177

145178
#: ../../library/zipimport.rst:95
146179
msgid "Implementation of :meth:`importlib.abc.Loader.exec_module`."
147-
msgstr ""
180+
msgstr ":meth:`importlib.abc.Loader.exec_module` 的實作。"
148181

149182
#: ../../library/zipimport.rst:102
150183
msgid "An implementation of :meth:`importlib.abc.PathEntryFinder.find_spec`."
151-
msgstr ""
184+
msgstr ":meth:`importlib.abc.PathEntryFinder.find_spec` 的一個實作。"
152185

153186
#: ../../library/zipimport.rst:109
154187
msgid ""
155188
"Return the code object for the specified module. Raise :exc:`ZipImportError` "
156189
"if the module couldn't be imported."
157190
msgstr ""
191+
"回傳指定模組的程式碼物件。如果模組無法被引入,則引發 :exc:`ZipImportError`。"
158192

159193
#: ../../library/zipimport.rst:115
160194
msgid ""
161195
"Return the data associated with *pathname*. Raise :exc:`OSError` if the file "
162196
"wasn't found."
163-
msgstr ""
197+
msgstr "回傳與 *pathname* 相關的資料。如果找不到檔案,則引發 :exc:`OSError`。"
164198

165199
#: ../../library/zipimport.rst:118
166200
msgid ":exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`."
167-
msgstr ":exc:`IOError` 曾經被引發,現在它是一個 :exc:`OSError` 的別名。"
201+
msgstr "過去會引發 :exc:`IOError`,現在它是 :exc:`OSError` 的別名。"
168202

169203
#: ../../library/zipimport.rst:124
170204
msgid ""
171205
"Return the value ``__file__`` would be set to if the specified module was "
172206
"imported. Raise :exc:`ZipImportError` if the module couldn't be imported."
173207
msgstr ""
208+
"回傳如果指定模組被引入時 ``__file__`` 會被設定的值。如果模組無法被引入,則引"
209+
"發 :exc:`ZipImportError`。"
174210

175211
#: ../../library/zipimport.rst:133
176212
msgid ""
177213
"Return the source code for the specified module. Raise :exc:`ZipImportError` "
178214
"if the module couldn't be found, return :const:`None` if the archive does "
179215
"contain the module, but has no source for it."
180216
msgstr ""
217+
"回傳指定模組的原始碼。如果找不到模組,則引發 :exc:`ZipImportError`;如果封存"
218+
"檔案包含該模組但沒有其原始碼,則回傳 :const:`None`。"
181219

182220
#: ../../library/zipimport.rst:141
183221
msgid ""
184222
"Return ``True`` if the module specified by *fullname* is a package. Raise :"
185223
"exc:`ZipImportError` if the module couldn't be found."
186224
msgstr ""
225+
"如果由 *fullname* 指定的模組是一個套件,則回傳 ``True``。如果找不到模組,則引"
226+
"發 :exc:`ZipImportError`。"
187227

188228
#: ../../library/zipimport.rst:147
189229
msgid ""
190230
"Load the module specified by *fullname*. *fullname* must be the fully "
191231
"qualified (dotted) module name. Returns the imported module on success, "
192232
"raises :exc:`ZipImportError` on failure."
193233
msgstr ""
234+
"載入由 *fullname* 指定的模組。*fullname* 必須是完整限定(以點分隔)的模組名"
235+
"稱。成功時回傳引入的模組,失敗時引發 :exc:`ZipImportError`。"
194236

195237
#: ../../library/zipimport.rst:153
196238
msgid "Use :meth:`exec_module` instead."
197-
msgstr ""
239+
msgstr "請改用 :meth:`exec_module`。"
198240

199241
#: ../../library/zipimport.rst:158
200242
msgid ""
201243
"Clear out the internal cache of information about files found within the ZIP "
202244
"archive."
203-
msgstr ""
245+
msgstr "清除關於在 ZIP 封存檔案中找到的檔案資訊的內部快取。"
204246

205247
#: ../../library/zipimport.rst:166
206248
msgid ""
207249
"The file name of the importer's associated ZIP file, without a possible "
208250
"subpath."
209-
msgstr ""
251+
msgstr "引入器關聯的 ZIP 檔案的檔名,不包含可能的子路徑。"
210252

211253
#: ../../library/zipimport.rst:172
212254
msgid ""
213255
"The subpath within the ZIP file where modules are searched. This is the "
214256
"empty string for zipimporter objects which point to the root of the ZIP file."
215257
msgstr ""
258+
"在 ZIP 檔案內搜尋模組的子路徑。對於指向 ZIP 檔案根目錄的 zipimporter 物件,這"
259+
"是一個空字串。"
216260

217261
#: ../../library/zipimport.rst:176
218262
msgid ""
219263
"The :attr:`archive` and :attr:`prefix` attributes, when combined with a "
220264
"slash, equal the original *archivepath* argument given to the :class:"
221265
"`zipimporter` constructor."
222266
msgstr ""
267+
":attr:`archive` 和 :attr:`prefix` 屬性(attribute),當用斜線組合時,等於給"
268+
"予 :class:`zipimporter` 建構函式的原始 *archivepath* 引數。"
223269

224270
#: ../../library/zipimport.rst:184
225271
msgid "Examples"
@@ -230,6 +276,8 @@ msgid ""
230276
"Here is an example that imports a module from a ZIP archive - note that the :"
231277
"mod:`zipimport` module is not explicitly used."
232278
msgstr ""
279+
"這是一個從 ZIP 封存檔案引入模組的範例——請注意,:mod:`zipimport` 模組並未被明"
280+
"確使用。"
233281

234282
#: ../../library/zipimport.rst:189
235283
msgid ""

0 commit comments

Comments
 (0)