Skip to content

Commit 8969a48

Browse files
sync with cpython ba6d956e
1 parent b287ffa commit 8969a48

File tree

4 files changed

+375
-344
lines changed

4 files changed

+375
-344
lines changed

library/glob.po

Lines changed: 52 additions & 43 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: 2024-09-23 07:52+0800\n"
10+
"POT-Creation-Date: 2025-10-21 00:14+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-"
@@ -28,10 +28,10 @@ msgid "**Source code:** :source:`Lib/glob.py`"
2828
msgstr "**原始碼:**\\ :source:`Lib/glob.py`"
2929

3030
#: ../../library/glob.rst:21
31+
#, fuzzy
3132
msgid ""
32-
"The :mod:`glob` module finds all the pathnames matching a specified pattern "
33-
"according to the rules used by the Unix shell, although results are returned "
34-
"in arbitrary order. No tilde expansion is done, but ``*``, ``?``, and "
33+
"The :mod:`!glob` module finds pathnames using pattern matching rules similar "
34+
"to the Unix shell. No tilde expansion is done, but ``*``, ``?``, and "
3535
"character ranges expressed with ``[]`` will be correctly matched. This is "
3636
"done by using the :func:`os.scandir` and :func:`fnmatch.fnmatch` functions "
3737
"in concert, and not by actually invoking a subshell."
@@ -41,30 +41,38 @@ msgstr ""
4141
"示的字元範圍將被正確匹配。這是透過同時使用 :func:`os.scandir` 和 :func:"
4242
"`fnmatch.fnmatch` 函式來完成的,而沒有實際呼叫 subshell。"
4343

44-
#: ../../library/glob.rst:28
44+
#: ../../library/glob.rst:29
4545
msgid ""
46-
"Note that files beginning with a dot (``.``) can only be matched by patterns "
47-
"that also start with a dot, unlike :func:`fnmatch.fnmatch` or :func:`pathlib."
48-
"Path.glob`. (For tilde and shell variable expansion, use :func:`os.path."
49-
"expanduser` and :func:`os.path.expandvars`.)"
46+
"The pathnames are returned in no particular order. If you need a specific "
47+
"order, sort the results."
48+
msgstr ""
49+
50+
#: ../../library/glob.rst:32
51+
#, fuzzy
52+
msgid ""
53+
"Files beginning with a dot (``.``) can only be matched by patterns that also "
54+
"start with a dot, unlike :func:`fnmatch.fnmatch` or :func:`pathlib.Path."
55+
"glob`. For tilde and shell variable expansion, use :func:`os.path."
56+
"expanduser` and :func:`os.path.expandvars`."
5057
msgstr ""
5158
"請注意,以點 (``.``) 開頭的檔案只能與同樣以點開頭的模式匹配,這與 :func:"
5259
"`fnmatch.fnmatch` 或 :func:`pathlib.Path.glob` 不同。(對於波浪號和 shell 變"
5360
"數擴展,請使用 :func:`os.path.expanduser` 和 :func:`os.path.expandvars`。)"
5461

55-
#: ../../library/glob.rst:34
62+
#: ../../library/glob.rst:38
5663
msgid ""
5764
"For a literal match, wrap the meta-characters in brackets. For example, "
5865
"``'[?]'`` matches the character ``'?'``."
5966
msgstr ""
6067
"對於文本 (literal) 匹配,將元字元 (meta-character) 括在方括號中。例如,"
6168
"``'[?]'`` 會匹配 ``'?'`` 字元。"
6269

63-
#: ../../library/glob.rst:37
64-
msgid "The :mod:`glob` module defines the following functions:"
70+
#: ../../library/glob.rst:41
71+
#, fuzzy
72+
msgid "The :mod:`!glob` module defines the following functions:"
6573
msgstr ":mod:`glob` 模組定義了以下函式:"
6674

67-
#: ../../library/glob.rst:43
75+
#: ../../library/glob.rst:47
6876
msgid ""
6977
"Return a possibly empty list of path names that match *pathname*, which must "
7078
"be a string containing a path specification. *pathname* can be either "
@@ -82,25 +90,26 @@ msgstr ""
8290
"取決於檔案系統 (file system)。如果在呼叫此函式期間刪除或新增滿足條件的檔案,"
8391
"則結果不一定會包含該檔案的路徑名稱。"
8492

85-
#: ../../library/glob.rst:52
93+
#: ../../library/glob.rst:56
94+
#, fuzzy
8695
msgid ""
8796
"If *root_dir* is not ``None``, it should be a :term:`path-like object` "
8897
"specifying the root directory for searching. It has the same effect on :"
89-
"func:`glob` as changing the current directory before calling it. If "
98+
"func:`!glob` as changing the current directory before calling it. If "
9099
"*pathname* is relative, the result will contain paths relative to *root_dir*."
91100
msgstr ""
92101
"如果 *root_dir* 不是 ``None``,它應該是一個指定搜尋根目錄的 :term:`path-like "
93102
"object`。它在呼叫它之前更改目前目錄的影響與 :func:`glob` 相同。如果 "
94103
"*pathname* 是相對的,結果將包含相對於 *root_dir* 的路徑。"
95104

96-
#: ../../library/glob.rst:58
105+
#: ../../library/glob.rst:62
97106
msgid ""
98107
"This function can support :ref:`paths relative to directory descriptors "
99108
"<dir_fd>` with the *dir_fd* parameter."
100109
msgstr ""
101110
"此函式可以支援以 *dir_fd* 參數使用\\ :ref:`相對目錄描述器的路徑 <dir_fd>`。"
102111

103-
#: ../../library/glob.rst:64
112+
#: ../../library/glob.rst:68
104113
msgid ""
105114
"If *recursive* is true, the pattern \"``**``\" will match any files and zero "
106115
"or more directories, subdirectories and symbolic links to directories. If "
@@ -111,61 +120,61 @@ msgstr ""
111120
"和目錄的符號連結。如果模式後面有 :data:`os.sep` 或 :data:`os.altsep` 那麼檔案"
112121
"將不會被匹配。"
113122

114-
#: ../../library/glob.rst:69
123+
#: ../../library/glob.rst:73
115124
msgid ""
116125
"If *include_hidden* is true, \"``**``\" pattern will match hidden "
117126
"directories."
118127
msgstr "如果 *include_hidden* 為真,\"``**``\" 模式將匹配被隱藏的目錄。"
119128

120-
#: ../../library/glob.rst:71 ../../library/glob.rst:98
129+
#: ../../library/glob.rst:75 ../../library/glob.rst:102
121130
msgid ""
122131
"Raises an :ref:`auditing event <auditing>` ``glob.glob`` with arguments "
123132
"``pathname``, ``recursive``."
124133
msgstr ""
125134
"引發一個附帶引數 ``pathname``、``recursive`` 的\\ :ref:`稽核事件 <auditing>` "
126135
"``glob.glob``。"
127136

128-
#: ../../library/glob.rst:72 ../../library/glob.rst:99
137+
#: ../../library/glob.rst:76 ../../library/glob.rst:103
129138
msgid ""
130139
"Raises an :ref:`auditing event <auditing>` ``glob.glob/2`` with arguments "
131140
"``pathname``, ``recursive``, ``root_dir``, ``dir_fd``."
132141
msgstr ""
133142
"引發一個附帶引數 ``pathname``、``recursive``、``root_dir``、``dir_fd`` 的\\ :"
134143
"ref:`稽核事件 <auditing>` ``glob.glob/2``。"
135144

136-
#: ../../library/glob.rst:75
145+
#: ../../library/glob.rst:79
137146
msgid ""
138147
"Using the \"``**``\" pattern in large directory trees may consume an "
139148
"inordinate amount of time."
140149
msgstr "在大型目錄樹中使用 \"``**``\" 模式可能會消耗過多的時間。"
141150

142-
#: ../../library/glob.rst:79 ../../library/glob.rst:102
151+
#: ../../library/glob.rst:83 ../../library/glob.rst:106
143152
msgid ""
144153
"This function may return duplicate path names if *pathname* contains "
145154
"multiple \"``**``\" patterns and *recursive* is true."
146155
msgstr ""
147156

148-
#: ../../library/glob.rst:82 ../../library/glob.rst:105
157+
#: ../../library/glob.rst:86 ../../library/glob.rst:109
149158
msgid "Support for recursive globs using \"``**``\"."
150159
msgstr "支援以 \"``**``\" 使用遞迴 glob。"
151160

152-
#: ../../library/glob.rst:85 ../../library/glob.rst:108
161+
#: ../../library/glob.rst:89 ../../library/glob.rst:112
153162
msgid "Added the *root_dir* and *dir_fd* parameters."
154163
msgstr "新增 *root_dir* 與 *dir_fd* 參數。"
155164

156-
#: ../../library/glob.rst:88 ../../library/glob.rst:111
165+
#: ../../library/glob.rst:92 ../../library/glob.rst:115
157166
msgid "Added the *include_hidden* parameter."
158167
msgstr "新增 *include_hidden* 參數。"
159168

160-
#: ../../library/glob.rst:95
169+
#: ../../library/glob.rst:99
161170
msgid ""
162171
"Return an :term:`iterator` which yields the same values as :func:`glob` "
163172
"without actually storing them all simultaneously."
164173
msgstr ""
165174
"回傳一個會產生與 :func:`glob` 相同的值的 :term:`iterator` ,而不是同時儲存全"
166175
"部的值。"
167176

168-
#: ../../library/glob.rst:117
177+
#: ../../library/glob.rst:121
169178
msgid ""
170179
"Escape all special characters (``'?'``, ``'*'`` and ``'['``). This is useful "
171180
"if you want to match an arbitrary literal string that may have special "
@@ -178,52 +187,52 @@ msgstr ""
178187
"(sharepoints) 中的特殊字元不會被跳脫,例如在 Windows 上,``escape('//?/c:/"
179188
"Quo vadis?.txt')`` 會回傳 ``'//?/c:/Quo vadis[?].txt'``。"
180189

181-
#: ../../library/glob.rst:128
190+
#: ../../library/glob.rst:132
182191
msgid ""
183192
"Convert the given path specification to a regular expression for use with :"
184193
"func:`re.match`. The path specification can contain shell-style wildcards."
185194
msgstr ""
186195

187-
#: ../../library/glob.rst:131
196+
#: ../../library/glob.rst:135
188197
msgid "For example:"
189198
msgstr "舉例來說:"
190199

191-
#: ../../library/glob.rst:142
200+
#: ../../library/glob.rst:146
192201
msgid ""
193202
"Path separators and segments are meaningful to this function, unlike :func:"
194203
"`fnmatch.translate`. By default wildcards do not match path separators, and "
195204
"``*`` pattern segments match precisely one path segment."
196205
msgstr ""
197206

198-
#: ../../library/glob.rst:146
207+
#: ../../library/glob.rst:150
199208
msgid ""
200209
"If *recursive* is true, the pattern segment \"``**``\" will match any number "
201210
"of path segments."
202211
msgstr ""
203212

204-
#: ../../library/glob.rst:149
213+
#: ../../library/glob.rst:153
205214
msgid ""
206215
"If *include_hidden* is true, wildcards can match path segments that start "
207216
"with a dot (``.``)."
208217
msgstr ""
209218

210-
#: ../../library/glob.rst:152
219+
#: ../../library/glob.rst:156
211220
msgid ""
212221
"A sequence of path separators may be supplied to the *seps* argument. If not "
213222
"given, :data:`os.sep` and :data:`~os.altsep` (if available) are used."
214223
msgstr ""
215224

216-
#: ../../library/glob.rst:157
225+
#: ../../library/glob.rst:161
217226
msgid ""
218227
":meth:`pathlib.PurePath.full_match` and :meth:`pathlib.Path.glob` methods, "
219228
"which call this function to implement pattern matching and globbing."
220229
msgstr ""
221230

222-
#: ../../library/glob.rst:165
231+
#: ../../library/glob.rst:169
223232
msgid "Examples"
224233
msgstr "範例"
225234

226-
#: ../../library/glob.rst:167
235+
#: ../../library/glob.rst:171
227236
msgid ""
228237
"Consider a directory containing the following files: :file:`1.gif`, :file:`2."
229238
"txt`, :file:`card.gif` and a subdirectory :file:`sub` which contains only "
@@ -234,7 +243,7 @@ msgstr ""
234243
"gif`,和一個僅包含 :file:`3.txt` 檔案的子目錄 :file:`sub`,:func:`glob` 將產"
235244
"生以下結果。請注意路徑的任何前導部分是如何保留的。 ::"
236245

237-
#: ../../library/glob.rst:173
246+
#: ../../library/glob.rst:177
238247
msgid ""
239248
">>> import glob\n"
240249
">>> glob.glob('./[0-9].*')\n"
@@ -260,7 +269,7 @@ msgstr ""
260269
">>> glob.glob('./**/', recursive=True)\n"
261270
"['./', './sub/']"
262271

263-
#: ../../library/glob.rst:185
272+
#: ../../library/glob.rst:189
264273
msgid ""
265274
"If the directory contains files starting with ``.`` they won't be matched by "
266275
"default. For example, consider a directory containing :file:`card.gif` and :"
@@ -269,7 +278,7 @@ msgstr ""
269278
"如果目錄包含以 ``.`` 開頭的檔案,則預設情況下不會去匹配到它們。例如,一個包"
270279
"含 :file:`card.gif` 和 :file:`.card.gif` 的目錄: ::"
271280

272-
#: ../../library/glob.rst:189
281+
#: ../../library/glob.rst:193
273282
msgid ""
274283
">>> import glob\n"
275284
">>> glob.glob('*.gif')\n"
@@ -283,12 +292,12 @@ msgstr ""
283292
">>> glob.glob('.c*')\n"
284293
"['.card.gif']"
285294

286-
#: ../../library/glob.rst:196
295+
#: ../../library/glob.rst:200
287296
msgid ""
288297
"The :mod:`fnmatch` module offers shell-style filename (not path) expansion."
289298
msgstr ":mod:`fnmatch` 模組提供了 shell 風格檔案名(不是路徑)的擴展"
290299

291-
#: ../../library/glob.rst:199
300+
#: ../../library/glob.rst:203
292301
msgid "The :mod:`pathlib` module offers high-level path objects."
293302
msgstr ":mod:`pathlib` 模組提供高階路徑物件。"
294303

@@ -304,7 +313,7 @@ msgstr "pathname expansion(路徑名稱展開)"
304313
msgid "* (asterisk)"
305314
msgstr "* (星號)"
306315

307-
#: ../../library/glob.rst:13 ../../library/glob.rst:61
316+
#: ../../library/glob.rst:13 ../../library/glob.rst:65
308317
msgid "in glob-style wildcards"
309318
msgstr "於 glob 風格的萬用字元中"
310319

@@ -328,6 +337,6 @@ msgstr "- (減號)"
328337
msgid ". (dot)"
329338
msgstr ". (點)"
330339

331-
#: ../../library/glob.rst:61
340+
#: ../../library/glob.rst:65
332341
msgid "**"
333342
msgstr "**"

0 commit comments

Comments
 (0)