diff --git a/library/glob.po b/library/glob.po index c96f68a159..6fa7f8ad7f 100644 --- a/library/glob.po +++ b/library/glob.po @@ -1,15 +1,15 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation +# Copyright (C) 2001-2023, Python Software Foundation # This file is distributed under the same license as the Python package. # # Translators: +# Matt Wang , 2023 msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-04-24 00:16+0000\n" -"PO-Revision-Date: 2018-05-23 16:02+0000\n" -"Last-Translator: Adrian Liaw \n" +"PO-Revision-Date: 2023-01-24 01:21+0800\n" +"Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" "Language: zh_TW\n" @@ -17,10 +17,11 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 3.2.2\n" #: ../../library/glob.rst:2 msgid ":mod:`glob` --- Unix style pathname pattern expansion" -msgstr "" +msgstr ":mod:`glob` --- Unix 風格的路徑名稱模式擴展" #: ../../library/glob.rst:7 msgid "**Source code:** :source:`Lib/glob.py`" @@ -35,6 +36,10 @@ msgid "" "done by using the :func:`os.scandir` and :func:`fnmatch.fnmatch` functions " "in concert, and not by actually invoking a subshell." msgstr "" +":mod:`glob` 模組根據 Unix shell 使用的規則查找與指定模式匹配的所有路徑名稱," +"結果以任意順序回傳。沒有波浪號 (tilde) 擴展,但是 ``*``、``?`` 和用 ``[]`` 表" +"示的字元範圍將被正確匹配。這是透過同時使用 :func:`os.scandir` 和 :func:" +"`fnmatch.fnmatch` 函式來完成的,而沒有實際調用 subshell。" #: ../../library/glob.rst:28 msgid "" @@ -43,16 +48,21 @@ msgid "" "Path.glob`. (For tilde and shell variable expansion, use :func:`os.path." "expanduser` and :func:`os.path.expandvars`.)" msgstr "" +"請注意,以點 (``.``) 開頭的檔案只能與同樣以點開頭的模式匹配,這與 :func:" +"`fnmatch.fnmatch` 或 :func:`pathlib.Path.glob` 不同。 (對於波浪號和 shell 變" +"數擴展,請使用 :func:`os.path.expanduser` 和 :func:`os.path.expandvars`。)" #: ../../library/glob.rst:34 msgid "" "For a literal match, wrap the meta-characters in brackets. For example, " "``'[?]'`` matches the character ``'?'``." msgstr "" +"對於文本 (literal) 匹配,將元字元 (meta-character) 括在方括號中。例如," +"``'[?]'`` 會匹配 ``'?'`` 字元。" #: ../../library/glob.rst:39 msgid "The :mod:`pathlib` module offers high-level path objects." -msgstr "" +msgstr ":mod:`pathlib` 模組提供高階路徑物件。" #: ../../library/glob.rst:45 msgid "" @@ -65,6 +75,12 @@ msgid "" "conditions is removed or added during the call of this function, whether a " "path name for that file be included is unspecified." msgstr "" +"回傳與 *pathname* 匹配、可能為空的路徑名稱 list,它必須是包含路徑規範的字" +"串。 *pathname* 可以是絕對的(如 :file:`/usr/src/Python-1.5/Makefile`)或相對" +"的(如 :file:`../../Tools/\\*/\\*.gif`),並且可以包含 shell 樣式的通用字元 " +"(wildcard)。已損壞的符號連接也會(如同在 shell)被包含在結果中。結果是否排序" +"取決於檔案系統 (file system)。如果在呼叫此函式期間刪除或新增滿足條件的檔案," +"則結果不一定會包含該檔案的路徑名稱。" #: ../../library/glob.rst:54 msgid "" @@ -73,12 +89,16 @@ msgid "" "func:`glob` as changing the current directory before calling it. If " "*pathname* is relative, the result will contain paths relative to *root_dir*." msgstr "" +"如果 *root_dir* 不是 ``None``,它應該是一個指定搜索根目錄的 :term:`path-like " +"object`。它在呼叫它之前更改當前目錄的影響與 :func:`glob` 相同。如果 " +"*pathname* 是相對的,結果將包含相對於 *root_dir* 的路徑。" #: ../../library/glob.rst:60 msgid "" "This function can support :ref:`paths relative to directory descriptors " "` with the *dir_fd* parameter." msgstr "" +"此函式可以支援以 *dir_fd* 參數使用\\ :ref:`相對目錄描述器的路徑 `。" #: ../../library/glob.rst:66 msgid "" @@ -87,34 +107,41 @@ msgid "" "the pattern is followed by an :data:`os.sep` or :data:`os.altsep` then files " "will not match." msgstr "" +"如果 *recursive* 為真,模式 \"``**``\" 將匹配任何檔案、零個或多個目錄、子目錄" +"和目錄的符號連結。如果模式後面有 :data:`os.sep` 或 :data:`os.altsep` 那麼檔案" +"將不會被匹配。" #: ../../library/glob.rst:71 msgid "" "If *include_hidden* is true, \"``**``\" pattern will match hidden " "directories." -msgstr "" +msgstr "如果 *include_hidden* 為真,\"``**``\" 模式將匹配被隱藏的目錄。" #: ../../library/glob.rst:73 ../../library/glob.rst:96 msgid "" "Raises an :ref:`auditing event ` ``glob.glob`` with arguments " "``pathname``, ``recursive``." msgstr "" +"使用引數 ``pathname``、``recursive`` 引發一個\\ :ref:`稽核事件 (auditing " +"event) ` ``glob.glob``。" #: ../../library/glob.rst:74 ../../library/glob.rst:97 msgid "" "Raises an :ref:`auditing event ` ``glob.glob/2`` with arguments " "``pathname``, ``recursive``, ``root_dir``, ``dir_fd``." msgstr "" +"使用引數 ``pathname``、``recursive``、``root_dir``、``dir_fd`` 引發一個\\ :" +"ref:`稽核事件 ` ``glob.glob/2``。" #: ../../library/glob.rst:77 msgid "" "Using the \"``**``\" pattern in large directory trees may consume an " "inordinate amount of time." -msgstr "" +msgstr "在大型目錄樹中使用 \"``**``\" 模式可能會消耗過多的時間。" #: ../../library/glob.rst:80 ../../library/glob.rst:99 msgid "Support for recursive globs using \"``**``\"." -msgstr "" +msgstr "支援以 \"``**``\" 使用遞迴 glob。" #: ../../library/glob.rst:83 ../../library/glob.rst:102 msgid "Added the *root_dir* and *dir_fd* parameters." @@ -129,6 +156,8 @@ msgid "" "Return an :term:`iterator` which yields the same values as :func:`glob` " "without actually storing them all simultaneously." msgstr "" +"回傳一個會產生與 :func:`glob` 相同的值的 :term:`iterator` ,而不是同時存儲全" +"部的值。" #: ../../library/glob.rst:111 msgid "" @@ -138,6 +167,10 @@ msgid "" "escaped, e.g. on Windows ``escape('//?/c:/Quo vadis?.txt')`` returns ``'//?/" "c:/Quo vadis[?].txt'``." msgstr "" +"跳脫 (escape) 所有特殊字元(``'?'``、``'*'`` 和 ``'['``)。如果你想匹配其中可" +"能包含特殊字元的任意文本字串,這將會很有用。驅動器 (drive)/UNC 共享點 " +"(sharepoints) 中的特殊字元不會被跳脫,例如在 Windows 上,``escape('//?/c:/" +"Quo vadis?.txt')`` 會回傳 ``'//?/c:/Quo vadis[?].txt'``。" #: ../../library/glob.rst:120 msgid "" @@ -147,6 +180,11 @@ msgid "" "following results. Notice how any leading components of the path are " "preserved. ::" msgstr "" +"例如,在一個包含以下檔案的目錄::file:`1.gif`、:file:`2.txt`、:file:`card." +"gif`,和一個僅包含 :file:`3.txt` 檔案的子目錄 :file:`sub`,:func:`glob` 將產" +"生以下結果。請注意路徑的任何前導部分是如何保留的。\n" +"\n" +" ::" #: ../../library/glob.rst:138 msgid "" @@ -154,6 +192,10 @@ msgid "" "default. For example, consider a directory containing :file:`card.gif` and :" "file:`.card.gif`::" msgstr "" +"如果目錄包含以 ``.`` 開頭的檔案,則預設情況下不會去匹配到它們。例如,一個包" +"含 :file:`card.gif` 和 :file:`.card.gif` 的目錄:\n" +"\n" +"::" #: ../../library/glob.rst:150 msgid "Module :mod:`fnmatch`" @@ -161,4 +203,4 @@ msgstr ":mod:`fnmatch` 模組" #: ../../library/glob.rst:151 msgid "Shell-style filename (not path) expansion" -msgstr "" +msgstr "Shell 風格檔案名(不是路徑)的擴展"