Skip to content

Commit 156dbcd

Browse files
github-actions[bot]mattwang44
authored andcommitted
sync with cpython d31a16e6
1 parent 7fe1bd6 commit 156dbcd

File tree

2 files changed

+253
-236
lines changed

2 files changed

+253
-236
lines changed

library/glob.po

Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.14\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2025-10-21 00:14+0000\n"
10+
"POT-Creation-Date: 2026-04-09 11:50+0000\n"
1111
"PO-Revision-Date: 2023-01-24 01:21+0800\n"
1212
"Last-Translator: Matt Wang <mattwang44@gmail.com>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -35,16 +35,16 @@ msgid ""
3535
"done by using the :func:`os.scandir` and :func:`fnmatch.fnmatch` functions "
3636
"in concert, and not by actually invoking a subshell."
3737
msgstr ""
38-
":mod:`!glob` 模組使用類似於 Unix shell 的模式匹配規則來尋找路徑名稱。不會進"
39-
"行波浪號擴展 (tilde expansion) ,但 ``*``、``?`` 和使用 ``[]`` 表達的字元範圍將會被正確匹配。這"
40-
"是透過結合使用 :func:`os.scandir` 和 :func:`fnmatch.fnmatch` 函式來完成的,而沒有實際呼叫 subshell。"
38+
":mod:`!glob` 模組使用類似於 Unix shell 的模式匹配規則來尋找路徑名稱。不會進行"
39+
"波浪號擴展 (tilde expansion) ,但 ``*``、``?`` 和使用 ``[]`` 表達的字元範圍將"
40+
"會被正確匹配。這是透過結合使用 :func:`os.scandir` 和 :func:`fnmatch.fnmatch` "
41+
"函式來完成的,而沒有實際呼叫 subshell。"
4142

4243
#: ../../library/glob.rst:29
4344
msgid ""
4445
"The pathnames are returned in no particular order. If you need a specific "
4546
"order, sort the results."
46-
msgstr ""
47-
"路徑名稱不會以特定順序回傳。如果你需要特定的順序,請對結果進行排序。"
47+
msgstr "路徑名稱不會以特定順序回傳。如果你需要特定的順序,請對結果進行排序。"
4848

4949
#: ../../library/glob.rst:32
5050
msgid ""
@@ -53,9 +53,9 @@ msgid ""
5353
"glob`. For tilde and shell variable expansion, use :func:`os.path."
5454
"expanduser` and :func:`os.path.expandvars`."
5555
msgstr ""
56-
"以點 (``.``) 開頭的檔案只能與同樣以點開頭的模式匹配,這與 :func:"
57-
"`fnmatch.fnmatch` 或 :func:`pathlib.Path.glob` 不同。對於波浪號和 shell "
58-
"數擴展,請使用 :func:`os.path.expanduser` 和 :func:`os.path.expandvars`。"
56+
"以點 (``.``) 開頭的檔案只能與同樣以點開頭的模式匹配,這與 :func:`fnmatch."
57+
"fnmatch` 或 :func:`pathlib.Path.glob` 不同。對於波浪號和 shell 變數擴展,請使"
58+
" :func:`os.path.expanduser` 和 :func:`os.path.expandvars`。"
5959

6060
#: ../../library/glob.rst:38
6161
msgid ""
@@ -122,15 +122,15 @@ msgid ""
122122
"directories."
123123
msgstr "如果 *include_hidden* 為真,\"``**``\" 模式將匹配被隱藏的目錄。"
124124

125-
#: ../../library/glob.rst:75 ../../library/glob.rst:102
125+
#: ../../library/glob.rst:75 ../../library/glob.rst:107
126126
msgid ""
127127
"Raises an :ref:`auditing event <auditing>` ``glob.glob`` with arguments "
128128
"``pathname``, ``recursive``."
129129
msgstr ""
130130
"引發一個附帶引數 ``pathname``、``recursive`` 的\\ :ref:`稽核事件 <auditing>` "
131131
"``glob.glob``。"
132132

133-
#: ../../library/glob.rst:76 ../../library/glob.rst:103
133+
#: ../../library/glob.rst:76 ../../library/glob.rst:108
134134
msgid ""
135135
"Raises an :ref:`auditing event <auditing>` ``glob.glob/2`` with arguments "
136136
"``pathname``, ``recursive``, ``root_dir``, ``dir_fd``."
@@ -144,33 +144,40 @@ msgid ""
144144
"inordinate amount of time."
145145
msgstr "在大型目錄樹中使用 \"``**``\" 模式可能會消耗過多的時間。"
146146

147-
#: ../../library/glob.rst:83 ../../library/glob.rst:106
147+
#: ../../library/glob.rst:83 ../../library/glob.rst:111
148148
msgid ""
149149
"This function may return duplicate path names if *pathname* contains "
150150
"multiple \"``**``\" patterns and *recursive* is true."
151151
msgstr ""
152152

153-
#: ../../library/glob.rst:86 ../../library/glob.rst:109
153+
#: ../../library/glob.rst:87 ../../library/glob.rst:115
154+
msgid ""
155+
"Any :exc:`OSError` exceptions raised from scanning the filesystem are "
156+
"suppressed. This includes :exc:`PermissionError` when accessing directories "
157+
"without read permission."
158+
msgstr ""
159+
160+
#: ../../library/glob.rst:91 ../../library/glob.rst:119
154161
msgid "Support for recursive globs using \"``**``\"."
155162
msgstr "支援以 \"``**``\" 使用遞迴 glob。"
156163

157-
#: ../../library/glob.rst:89 ../../library/glob.rst:112
164+
#: ../../library/glob.rst:94 ../../library/glob.rst:122
158165
msgid "Added the *root_dir* and *dir_fd* parameters."
159166
msgstr "新增 *root_dir* 與 *dir_fd* 參數。"
160167

161-
#: ../../library/glob.rst:92 ../../library/glob.rst:115
168+
#: ../../library/glob.rst:97 ../../library/glob.rst:125
162169
msgid "Added the *include_hidden* parameter."
163170
msgstr "新增 *include_hidden* 參數。"
164171

165-
#: ../../library/glob.rst:99
172+
#: ../../library/glob.rst:104
166173
msgid ""
167174
"Return an :term:`iterator` which yields the same values as :func:`glob` "
168175
"without actually storing them all simultaneously."
169176
msgstr ""
170177
"回傳一個會產生與 :func:`glob` 相同的值的 :term:`iterator` ,而不是同時儲存全"
171178
"部的值。"
172179

173-
#: ../../library/glob.rst:121
180+
#: ../../library/glob.rst:131
174181
msgid ""
175182
"Escape all special characters (``'?'``, ``'*'`` and ``'['``). This is useful "
176183
"if you want to match an arbitrary literal string that may have special "
@@ -183,52 +190,52 @@ msgstr ""
183190
"(sharepoints) 中的特殊字元不會被跳脫,例如在 Windows 上,``escape('//?/c:/"
184191
"Quo vadis?.txt')`` 會回傳 ``'//?/c:/Quo vadis[?].txt'``。"
185192

186-
#: ../../library/glob.rst:132
193+
#: ../../library/glob.rst:142
187194
msgid ""
188195
"Convert the given path specification to a regular expression for use with :"
189196
"func:`re.match`. The path specification can contain shell-style wildcards."
190197
msgstr ""
191198

192-
#: ../../library/glob.rst:135
199+
#: ../../library/glob.rst:145
193200
msgid "For example:"
194201
msgstr "舉例來說:"
195202

196-
#: ../../library/glob.rst:146
203+
#: ../../library/glob.rst:156
197204
msgid ""
198205
"Path separators and segments are meaningful to this function, unlike :func:"
199206
"`fnmatch.translate`. By default wildcards do not match path separators, and "
200207
"``*`` pattern segments match precisely one path segment."
201208
msgstr ""
202209

203-
#: ../../library/glob.rst:150
210+
#: ../../library/glob.rst:160
204211
msgid ""
205212
"If *recursive* is true, the pattern segment \"``**``\" will match any number "
206213
"of path segments."
207214
msgstr ""
208215

209-
#: ../../library/glob.rst:153
216+
#: ../../library/glob.rst:163
210217
msgid ""
211218
"If *include_hidden* is true, wildcards can match path segments that start "
212219
"with a dot (``.``)."
213220
msgstr ""
214221

215-
#: ../../library/glob.rst:156
222+
#: ../../library/glob.rst:166
216223
msgid ""
217224
"A sequence of path separators may be supplied to the *seps* argument. If not "
218225
"given, :data:`os.sep` and :data:`~os.altsep` (if available) are used."
219226
msgstr ""
220227

221-
#: ../../library/glob.rst:161
228+
#: ../../library/glob.rst:171
222229
msgid ""
223230
":meth:`pathlib.PurePath.full_match` and :meth:`pathlib.Path.glob` methods, "
224231
"which call this function to implement pattern matching and globbing."
225232
msgstr ""
226233

227-
#: ../../library/glob.rst:169
234+
#: ../../library/glob.rst:179
228235
msgid "Examples"
229236
msgstr "範例"
230237

231-
#: ../../library/glob.rst:171
238+
#: ../../library/glob.rst:181
232239
msgid ""
233240
"Consider a directory containing the following files: :file:`1.gif`, :file:`2."
234241
"txt`, :file:`card.gif` and a subdirectory :file:`sub` which contains only "
@@ -239,7 +246,7 @@ msgstr ""
239246
"gif`,和一個僅包含 :file:`3.txt` 檔案的子目錄 :file:`sub`,:func:`glob` 將產"
240247
"生以下結果。請注意路徑的任何前導部分是如何保留的。 ::"
241248

242-
#: ../../library/glob.rst:177
249+
#: ../../library/glob.rst:187
243250
msgid ""
244251
">>> import glob\n"
245252
">>> glob.glob('./[0-9].*')\n"
@@ -265,7 +272,7 @@ msgstr ""
265272
">>> glob.glob('./**/', recursive=True)\n"
266273
"['./', './sub/']"
267274

268-
#: ../../library/glob.rst:189
275+
#: ../../library/glob.rst:199
269276
msgid ""
270277
"If the directory contains files starting with ``.`` they won't be matched by "
271278
"default. For example, consider a directory containing :file:`card.gif` and :"
@@ -274,7 +281,7 @@ msgstr ""
274281
"如果目錄包含以 ``.`` 開頭的檔案,則預設情況下不會去匹配到它們。例如,一個包"
275282
"含 :file:`card.gif` 和 :file:`.card.gif` 的目錄: ::"
276283

277-
#: ../../library/glob.rst:193
284+
#: ../../library/glob.rst:203
278285
msgid ""
279286
">>> import glob\n"
280287
">>> glob.glob('*.gif')\n"
@@ -288,12 +295,12 @@ msgstr ""
288295
">>> glob.glob('.c*')\n"
289296
"['.card.gif']"
290297

291-
#: ../../library/glob.rst:200
298+
#: ../../library/glob.rst:210
292299
msgid ""
293300
"The :mod:`fnmatch` module offers shell-style filename (not path) expansion."
294301
msgstr ":mod:`fnmatch` 模組提供了 shell 風格檔案名(不是路徑)的擴展"
295302

296-
#: ../../library/glob.rst:203
303+
#: ../../library/glob.rst:213
297304
msgid "The :mod:`pathlib` module offers high-level path objects."
298305
msgstr ":mod:`pathlib` 模組提供高階路徑物件。"
299306

0 commit comments

Comments
 (0)