3
3
# This file is distributed under the same license as the Python package.
4
4
#
5
5
# Translators:
6
+ # Adrian Liaw <[email protected] >, 2018
7
+ # Dr-XYZ <[email protected] >, 2025
6
8
msgid ""
7
9
msgstr ""
8
10
"Project-Id-Version : Python 3.13\n "
9
11
"Report-Msgid-Bugs-To : \n "
10
12
"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 "
13
15
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
14
16
"tw)\n "
15
17
"Language : zh_TW\n "
@@ -34,6 +36,10 @@ msgid ""
34
36
"the built-in :keyword:`import` mechanism for :data:`sys.path` items that are "
35
37
"paths to ZIP archives."
36
38
msgstr ""
39
+ "此模組新增了從 ZIP 格式封存檔案中引入 Python 模組(:file:`\\ *.py`、:file:`"
40
+ "\\ *.pyc`)和套件的能力。通常不需要明確地使用 :mod:`zipimport` 模組;對於 :"
41
+ "data:`sys.path` 中指向 ZIP 封存檔案路徑的項目,內建的 :keyword:`import` 機制"
42
+ "會自動使用它。"
37
43
38
44
#: ../../library/zipimport.rst:19
39
45
msgid ""
@@ -45,6 +51,10 @@ msgid ""
45
51
"lib/` would only import from the :file:`lib/` subdirectory within the "
46
52
"archive."
47
53
msgstr ""
54
+ "通常 :data:`sys.path` 是一個由目錄名稱字串組成的串列。此模組也允許 :data:"
55
+ "`sys.path` 的一個項目是命名 ZIP 封存檔案的字串。ZIP 封存檔案可以包含子目錄結"
56
+ "構以支援套件引入,並且可以指定封存檔案內的路徑以僅從子目錄中引入。例如路徑 :"
57
+ "file:`example.zip/lib/` 將只會從封存檔案內的 :file:`lib/` 子目錄中引入。"
48
58
49
59
#: ../../library/zipimport.rst:26
50
60
msgid ""
@@ -55,30 +65,38 @@ msgid ""
55
65
"adding the corresponding :file:`.pyc` file, meaning that if a ZIP archive "
56
66
"doesn't contain :file:`.pyc` files, importing may be rather slow."
57
67
msgstr ""
68
+ "ZIP 封存檔案中可以存在任何檔案,但引入器只會對 :file:`.py` 和 :file:`.pyc` 檔"
69
+ "案起作用。不允許從 ZIP 引入動態模組(:file:`.pyd`、:file:`.so`)。請注意,如"
70
+ "果封存檔案只包含 :file:`.py` 檔案,Python 將不會試圖透過新增對應的 :file:`."
71
+ "pyc` 檔案來修改封存檔案,這意味著如果 ZIP 封存檔案不包含 :file:`.pyc` 檔案,"
72
+ "引入可能會相當慢。"
58
73
59
74
#: ../../library/zipimport.rst:33
60
75
msgid "ZIP64 is supported"
61
- msgstr ""
76
+ msgstr "支援 ZIP64。 "
62
77
63
78
#: ../../library/zipimport.rst:36
64
79
msgid "Previously, ZIP archives with an archive comment were not supported."
65
- msgstr ""
80
+ msgstr "在過去,不支援帶有封存檔案註解的 ZIP 封存檔案。 "
66
81
67
82
#: ../../library/zipimport.rst:41
68
83
msgid ""
69
84
"`PKZIP Application Note <https://pkware.cachefly.net/webdocs/casestudies/"
70
85
"APPNOTE.TXT>`_"
71
86
msgstr ""
87
+ "`PKZIP Application Note <https://pkware.cachefly.net/webdocs/casestudies/"
88
+ "APPNOTE.TXT>`_"
72
89
73
90
#: ../../library/zipimport.rst:42
74
91
msgid ""
75
92
"Documentation on the ZIP file format by Phil Katz, the creator of the format "
76
93
"and algorithms used."
77
94
msgstr ""
95
+ "由 ZIP 格式和所用演算法的創造者 Phil Katz 編寫的關於 ZIP 檔案格式的文件。"
78
96
79
97
#: ../../library/zipimport.rst:45
80
98
msgid ":pep:`273` - Import Modules from Zip Archives"
81
- msgstr ""
99
+ msgstr ":pep:`273` - 從 Zip 封存檔案引入模組 "
82
100
83
101
#: ../../library/zipimport.rst:46
84
102
msgid ""
@@ -87,33 +105,38 @@ msgid ""
87
105
"written by Just van Rossum that uses the import hooks described in :pep:"
88
106
"`302`."
89
107
msgstr ""
108
+ "由 James C. Ahlstrom 編寫,他也提供了一個實作。Python 2.3 遵循 :pep:`273` 中"
109
+ "的規範,但使用由 Just van Rossum 編寫的實作,該實作使用了 :pep:`302` 中描述的"
110
+ "引入掛鉤。"
90
111
91
112
#: ../../library/zipimport.rst:50
92
113
msgid ":mod:`importlib` - The implementation of the import machinery"
93
- msgstr ""
114
+ msgstr ":mod:`importlib` - 引入機制的實作 "
94
115
95
116
#: ../../library/zipimport.rst:51
96
117
msgid ""
97
118
"Package providing the relevant protocols for all importers to implement."
98
- msgstr ""
119
+ msgstr "提供所有引入器要實作的相關協定的套件。 "
99
120
100
121
#: ../../library/zipimport.rst:55
101
122
msgid "This module defines an exception:"
102
- msgstr ""
123
+ msgstr "此模組定義了一個例外: "
103
124
104
125
#: ../../library/zipimport.rst:59
105
126
msgid ""
106
127
"Exception raised by zipimporter objects. It's a subclass of :exc:"
107
128
"`ImportError`, so it can be caught as :exc:`ImportError`, too."
108
129
msgstr ""
130
+ "由 zipimporter 物件引發的例外。它是 :exc:`ImportError` 的子類別,所以也可以被"
131
+ "捕捉為 :exc:`ImportError`。"
109
132
110
133
#: ../../library/zipimport.rst:66
111
134
msgid "zipimporter Objects"
112
135
msgstr "zipimporter 物件"
113
136
114
137
#: ../../library/zipimport.rst:68
115
138
msgid ":class:`zipimporter` is the class for importing ZIP files."
116
- msgstr ""
139
+ msgstr ":class:`zipimporter` 是用於引入 ZIP 檔案的類別。 "
117
140
118
141
#: ../../library/zipimport.rst:72
119
142
msgid ""
@@ -123,103 +146,126 @@ msgid ""
123
146
"`lib` directory inside the ZIP file :file:`foo/bar.zip` (provided that it "
124
147
"exists)."
125
148
msgstr ""
149
+ "建立一個新的 zipimporter 實例。*archivepath* 必須是 ZIP 檔案的路徑,或是 ZIP "
150
+ "檔案內的特定路徑。例如,:file:`foo/bar.zip/lib` 的 *archivepath* 將會在 ZIP "
151
+ "檔案 :file:`foo/bar.zip` 內的 :file:`lib` 目錄中尋找模組(如果該目錄存在的"
152
+ "話)。"
126
153
127
154
#: ../../library/zipimport.rst:77
128
155
msgid ""
129
156
":exc:`ZipImportError` is raised if *archivepath* doesn't point to a valid "
130
157
"ZIP archive."
131
158
msgstr ""
159
+ "如果 *archivepath* 未指向一個有效的 ZIP 封存檔案,則會引發 :exc:"
160
+ "`ZipImportError`。"
132
161
133
162
#: ../../library/zipimport.rst:82
134
163
msgid ""
135
164
"Methods ``find_loader()`` and ``find_module()``, deprecated in 3.10 are now "
136
165
"removed. Use :meth:`find_spec` instead."
137
166
msgstr ""
167
+ "在 3.10 版中已棄用的 ``find_loader()`` 和 ``find_module()`` 方法現已被移除。"
168
+ "請改用 :meth:`find_spec`。"
138
169
139
170
#: ../../library/zipimport.rst:87
140
171
msgid ""
141
172
"Implementation of :meth:`importlib.abc.Loader.create_module` that returns :"
142
173
"const:`None` to explicitly request the default semantics."
143
174
msgstr ""
175
+ ":meth:`importlib.abc.Loader.create_module` 的實作,回傳 :const:`None` 以明確"
176
+ "請求預設語意。"
144
177
145
178
#: ../../library/zipimport.rst:95
146
179
msgid "Implementation of :meth:`importlib.abc.Loader.exec_module`."
147
- msgstr ""
180
+ msgstr ":meth:`importlib.abc.Loader.exec_module` 的實作。 "
148
181
149
182
#: ../../library/zipimport.rst:102
150
183
msgid "An implementation of :meth:`importlib.abc.PathEntryFinder.find_spec`."
151
- msgstr ""
184
+ msgstr ":meth:`importlib.abc.PathEntryFinder.find_spec` 的一個實作。 "
152
185
153
186
#: ../../library/zipimport.rst:109
154
187
msgid ""
155
188
"Return the code object for the specified module. Raise :exc:`ZipImportError` "
156
189
"if the module couldn't be imported."
157
190
msgstr ""
191
+ "回傳指定模組的程式碼物件。如果模組無法被引入,則引發 :exc:`ZipImportError`。"
158
192
159
193
#: ../../library/zipimport.rst:115
160
194
msgid ""
161
195
"Return the data associated with *pathname*. Raise :exc:`OSError` if the file "
162
196
"wasn't found."
163
- msgstr ""
197
+ msgstr "回傳與 *pathname* 相關的資料。如果找不到檔案,則引發 :exc:`OSError`。 "
164
198
165
199
#: ../../library/zipimport.rst:118
166
200
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` 的別名。"
168
202
169
203
#: ../../library/zipimport.rst:124
170
204
msgid ""
171
205
"Return the value ``__file__`` would be set to if the specified module was "
172
206
"imported. Raise :exc:`ZipImportError` if the module couldn't be imported."
173
207
msgstr ""
208
+ "回傳如果指定模組被引入時 ``__file__`` 會被設定的值。如果模組無法被引入,則引"
209
+ "發 :exc:`ZipImportError`。"
174
210
175
211
#: ../../library/zipimport.rst:133
176
212
msgid ""
177
213
"Return the source code for the specified module. Raise :exc:`ZipImportError` "
178
214
"if the module couldn't be found, return :const:`None` if the archive does "
179
215
"contain the module, but has no source for it."
180
216
msgstr ""
217
+ "回傳指定模組的原始碼。如果找不到模組,則引發 :exc:`ZipImportError`;如果封存"
218
+ "檔案包含該模組但沒有其原始碼,則回傳 :const:`None`。"
181
219
182
220
#: ../../library/zipimport.rst:141
183
221
msgid ""
184
222
"Return ``True`` if the module specified by *fullname* is a package. Raise :"
185
223
"exc:`ZipImportError` if the module couldn't be found."
186
224
msgstr ""
225
+ "如果由 *fullname* 指定的模組是一個套件,則回傳 ``True``。如果找不到模組,則引"
226
+ "發 :exc:`ZipImportError`。"
187
227
188
228
#: ../../library/zipimport.rst:147
189
229
msgid ""
190
230
"Load the module specified by *fullname*. *fullname* must be the fully "
191
231
"qualified (dotted) module name. Returns the imported module on success, "
192
232
"raises :exc:`ZipImportError` on failure."
193
233
msgstr ""
234
+ "載入由 *fullname* 指定的模組。*fullname* 必須是完整限定(以點分隔)的模組名"
235
+ "稱。成功時回傳引入的模組,失敗時引發 :exc:`ZipImportError`。"
194
236
195
237
#: ../../library/zipimport.rst:153
196
238
msgid "Use :meth:`exec_module` instead."
197
- msgstr ""
239
+ msgstr "請改用 :meth:`exec_module`。 "
198
240
199
241
#: ../../library/zipimport.rst:158
200
242
msgid ""
201
243
"Clear out the internal cache of information about files found within the ZIP "
202
244
"archive."
203
- msgstr ""
245
+ msgstr "清除關於在 ZIP 封存檔案中找到的檔案資訊的內部快取。 "
204
246
205
247
#: ../../library/zipimport.rst:166
206
248
msgid ""
207
249
"The file name of the importer's associated ZIP file, without a possible "
208
250
"subpath."
209
- msgstr ""
251
+ msgstr "引入器關聯的 ZIP 檔案的檔名,不包含可能的子路徑。 "
210
252
211
253
#: ../../library/zipimport.rst:172
212
254
msgid ""
213
255
"The subpath within the ZIP file where modules are searched. This is the "
214
256
"empty string for zipimporter objects which point to the root of the ZIP file."
215
257
msgstr ""
258
+ "在 ZIP 檔案內搜尋模組的子路徑。對於指向 ZIP 檔案根目錄的 zipimporter 物件,這"
259
+ "是一個空字串。"
216
260
217
261
#: ../../library/zipimport.rst:176
218
262
msgid ""
219
263
"The :attr:`archive` and :attr:`prefix` attributes, when combined with a "
220
264
"slash, equal the original *archivepath* argument given to the :class:"
221
265
"`zipimporter` constructor."
222
266
msgstr ""
267
+ ":attr:`archive` 和 :attr:`prefix` 屬性(attribute),當用斜線組合時,等於給"
268
+ "予 :class:`zipimporter` 建構函式的原始 *archivepath* 引數。"
223
269
224
270
#: ../../library/zipimport.rst:184
225
271
msgid "Examples"
@@ -230,6 +276,8 @@ msgid ""
230
276
"Here is an example that imports a module from a ZIP archive - note that the :"
231
277
"mod:`zipimport` module is not explicitly used."
232
278
msgstr ""
279
+ "這是一個從 ZIP 封存檔案引入模組的範例——請注意,:mod:`zipimport` 模組並未被明"
280
+ "確使用。"
233
281
234
282
#: ../../library/zipimport.rst:189
235
283
msgid ""
0 commit comments