From f6696e8bfdfe0a7c0dc73bcd97e6e744a0201af7 Mon Sep 17 00:00:00 2001 From: jacksonchen1998 Date: Tue, 11 Jul 2023 18:50:06 +0800 Subject: [PATCH 1/8] [UPDATE] Translate `os.path.po` --- library/os.path.po | 67 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 58 insertions(+), 9 deletions(-) diff --git a/library/os.path.po b/library/os.path.po index f1ec83dbbb..d1ae9d6b4c 100644 --- a/library/os.path.po +++ b/library/os.path.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-05-09 00:15+0000\n" -"PO-Revision-Date: 2018-05-23 16:07+0000\n" -"Last-Translator: Adrian Liaw \n" +"PO-Revision-Date: 2023-07-11 15:38+0800\n" +"Last-Translator: Po-Chuan Chen \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.3.2\n" #: ../../library/os.path.rst:2 msgid ":mod:`os.path` --- Common pathname manipulations" -msgstr "" +msgstr ":mod:`os.path`\\ --- 常見的路徑名操作" #: ../../library/os.path.rst:7 msgid "" @@ -37,6 +38,9 @@ msgid "" "module. The path parameters can be passed as strings, or bytes, or any " "object implementing the :class:`os.PathLike` protocol." msgstr "" +"該模組實現了一些有用的路徑名操作函數。若要讀取或寫入檔案,請參閱 \\ :func:" +"`open` \\ 函數,要訪問檔案系統,請參閱 \\ :mod:`os` \\ 模組。路徑參數可以以字" +"串、位元組或任何依照 \\ :class:`os.PathLike` \\ 協議實現的物件傳遞。" #: ../../library/os.path.rst:19 msgid "" @@ -45,10 +49,13 @@ msgid "" "explicitly when an application desires shell-like path expansion. (See also " "the :mod:`glob` module.)" msgstr "" +"與 Unix shell 不同,Python 不會 *自動* 進行路徑展開(path expansions)。當應" +"用程式需要進行類似 shell 的路徑展開時,可以明確地調用 \\ :func:`expanduser` " +"\\ 和 \\ :func:`expandvars` \\ 等函數。(另請參閱 \\ :mod:`glob` \\ 模組。)" #: ../../library/os.path.rst:26 msgid "The :mod:`pathlib` module offers high-level path objects." -msgstr "" +msgstr ":mod:`pathlib` \\ 模組提供了高階的路徑物件。" #: ../../library/os.path.rst:31 msgid "" @@ -56,6 +63,8 @@ msgid "" "their parameters. The result is an object of the same type, if a path or " "file name is returned." msgstr "" +"所有這些函數都只接受位元組或字元串物件作為參數。如果返回的是路徑或檔案名稱," +"結果將是相同類型的物件。" #: ../../library/os.path.rst:37 msgid "" @@ -67,14 +76,18 @@ msgid "" "path that is *always* in one of the different formats. They all have the " "same interface:" msgstr "" +"由於不同的作業系統具有不同的路徑命名慣例,在標準庫中有幾個版本的這個模組可供" +"使用。 :mod:`os.path` \\ 模組始終適用於 Python 所在作業系統的路徑模組,因此適" +"用於本地路徑。然而,如果你想要操作 *始終* 以不同格式之一表示的路徑,你也可以" +"導入並使用各個模組。它們都具有相同的接口:" #: ../../library/os.path.rst:45 msgid ":mod:`posixpath` for UNIX-style paths" -msgstr "" +msgstr ":mod:`posixpath` \\ 用於 UNIX 形式的路徑" #: ../../library/os.path.rst:46 msgid ":mod:`ntpath` for Windows paths" -msgstr "" +msgstr ":mod:`ntpath` \\ 用於 Windows 的路徑" #: ../../library/os.path.rst:51 msgid "" @@ -83,6 +96,9 @@ msgid "" "exception for paths that contain characters or bytes unrepresentable at the " "OS level." msgstr "" +"現在,對於包含在作業系統層面無法表示的字符或位元組的路徑,:func:`exists`、:" +"func:`lexists`、:func:`isdir`、:func:`isfile`、:func:`islink` 和 :func:" +"`ismount` \\ 函數會返回 \\ ``False``,而不是引發異常。" #: ../../library/os.path.rst:59 msgid "" @@ -90,6 +106,8 @@ msgid "" "platforms, this is equivalent to calling the function :func:`normpath` as " "follows: ``normpath(join(os.getcwd(), path))``." msgstr "" +"返回經正規化的絕對路徑名 \\ *path* 。在大多數平台上,這等效於按照以下方式調用" +"函數 \\ :func:`normpath`:``normpath(join(os.getcwd(), path))``。" #: ../../library/os.path.rst:63 ../../library/os.path.rst:76 #: ../../library/os.path.rst:116 ../../library/os.path.rst:125 @@ -105,7 +123,7 @@ msgstr "" #: ../../library/os.path.rst:437 ../../library/os.path.rst:453 #: ../../library/os.path.rst:478 ../../library/os.path.rst:509 msgid "Accepts a :term:`path-like object`." -msgstr "" +msgstr "接受一個 \\ :term:`path-like object`." #: ../../library/os.path.rst:69 msgid "" @@ -115,6 +133,10 @@ msgid "" "program; where :program:`basename` for ``'/foo/bar/'`` returns ``'bar'``, " "the :func:`basename` function returns an empty string (``''``)." msgstr "" +"返回路徑名 *path* 的基本名稱。這是將 *path* 傳遞給函數 \\ :func:`split` \\ 後" +"返回的結果中的第二個元素。請注意,此函數的結果與 Unix 的 \\ :program:" +"`basename` \\ 程式不同;對於 \\ ``'/foo/bar/'``,:program:`basename` \\ 返回 " +"\\ ``'bar'``,而 \\ :func:`basename` \\ 函數返回空字串(``''``)。" #: ../../library/os.path.rst:82 msgid "" @@ -123,6 +145,9 @@ msgid "" "relative pathnames, the *paths* are on the different drives or if *paths* is " "empty. Unlike :func:`commonprefix`, this returns a valid path." msgstr "" +"返回序列 *paths* 中每個路徑名的最長共同子路徑。如果 *paths* 同時包含絕對路徑" +"和相對路徑、*paths* 位於不同的磁碟機或 *paths* 為空,則引發 \\ :exc:" +"`ValueError`。與 \\ :func:`commonprefix` \\ 不同,此函數返回的是有效路徑。" #: ../../library/os.path.rst:88 ../../library/os.path.rst:388 #: ../../library/os.path.rst:400 ../../library/os.path.rst:416 @@ -132,7 +157,7 @@ msgstr ":ref:`適用 `:Unix、Windows。" #: ../../library/os.path.rst:92 msgid "Accepts a sequence of :term:`path-like objects `." -msgstr "" +msgstr "接受一個 \\ :term:`路徑類型物件 ` \\ 的序列。" #: ../../library/os.path.rst:98 msgid "" @@ -140,18 +165,24 @@ msgid "" "prefix of all paths in *list*. If *list* is empty, return the empty string " "(``''``)." msgstr "" +"返回 *list* 中所有路徑的最長路徑前綴(逐字元比較)。如果 *list* 為空,則返回" +"空字串(``''``)。" #: ../../library/os.path.rst:104 msgid "" "This function may return invalid paths because it works a character at a " "time. To obtain a valid path, see :func:`commonpath`." msgstr "" +"由於此函數是逐字符比較,因此可能會返回無效的路徑。若要獲得有效的路徑,請參考 " +"\\ :func:`commonpath` \\ 函數。" #: ../../library/os.path.rst:122 msgid "" "Return the directory name of pathname *path*. This is the first element of " "the pair returned by passing *path* to the function :func:`split`." msgstr "" +"返回路徑名 *path* 的目錄名稱。這是將 *path* 傳遞給函數 \\ :func:`split` \\ 後" +"返回對結果中的第一個元素。" #: ../../library/os.path.rst:131 msgid "" @@ -161,12 +192,17 @@ msgid "" "to execute :func:`os.stat` on the requested file, even if the *path* " "physically exists." msgstr "" +"返回 \\ ``True``,如果 *path* 是一個存在的路徑或一個開啟的檔案描述符。對於已" +"損壞的符號連結則返回 \\ ``False``。在某些平台上,即使 *path* 在物理上存在,如" +"果未被授予執行 \\ :func:`os.stat` \\ 的權限,此函數可能返回 \\ ``False``。" #: ../../library/os.path.rst:137 msgid "" "*path* can now be an integer: ``True`` is returned if it is an open file " "descriptor, ``False`` otherwise." msgstr "" +"現在,*path* 可以是一個整數:如果它是一個開啟的檔案描述符,則返回 \\ " +"``True``;否則返回 \\ ``False``。" #: ../../library/os.path.rst:147 msgid "" @@ -174,12 +210,17 @@ msgid "" "broken symbolic links. Equivalent to :func:`exists` on platforms lacking :" "func:`os.lstat`." msgstr "" +"返回 ``True``,如果 *path* 是一個存在的路徑。對於已損壞的符號連結也返回 \\ " +"``True``。在缺乏 \\ :func:`os.lstat` \\ 的平台上,與 \\ :func:`exists` \\ 函" +"數等效。" #: ../../library/os.path.rst:159 msgid "" "On Unix and Windows, return the argument with an initial component of ``~`` " "or ``~user`` replaced by that *user*'s home directory." msgstr "" +"在 Unix 和 Windows 上,將引數中以 \\ ``~`` \\ 或 \\ ``~user`` \\ 開頭的部分" +"替換為該 *user* 的家目錄。" #: ../../library/os.path.rst:164 msgid "" @@ -188,6 +229,9 @@ msgid "" "up in the password directory through the built-in module :mod:`pwd`. An " "initial ``~user`` is looked up directly in the password directory." msgstr "" +"在 Unix 上,如果環境變數 \\ :envvar:`HOME` \\ 被設置,則將初始的 \\ ``~`` \\ " +"替換為該變數的值;否則將使用內建模組 \\ :mod:`pwd` \\ 在密碼目錄中查找當前使" +"用者的家目錄。對於初始的 \\ ``~user``,直接在密碼目錄中查找該使用者的家目錄。" #: ../../library/os.path.rst:169 msgid "" @@ -197,16 +241,21 @@ msgid "" "of the current user's home directory matches :envvar:`USERNAME`, and " "replacing it if so." msgstr "" +"在 Windows 上,如果 \\ :envvar:`USERPROFILE` \\ 被設置,則使用該變數的值;否" +"則將結合 \\ :envvar:`HOMEPATH` \\ 和 \\ :envvar:`HOMEDRIVE`。對於初始的 \\ " +"``~user``,會檢查當前使用者的家目錄的最後一個目錄元件是否與 \\ :envvar:" +"`USERNAME` \\ 相符,如果相符則替換它。" #: ../../library/os.path.rst:174 msgid "" "If the expansion fails or if the path does not begin with a tilde, the path " "is returned unchanged." msgstr "" +"如果展開失敗或路徑不以波浪符號(tilde)開頭,則返回原始路徑,不做任何變更。" #: ../../library/os.path.rst:180 msgid "No longer uses :envvar:`HOME` on Windows." -msgstr "" +msgstr "在 Windows 上不再使用 \\ :envvar:`HOME` \\ 變數。" #: ../../library/os.path.rst:189 msgid "" From 91963363644e2529fb4f62ea03d2aabd5d62d4bb Mon Sep 17 00:00:00 2001 From: Jackson <56949000+jacksonchen1998@users.noreply.github.com> Date: Wed, 12 Jul 2023 12:15:26 +0800 Subject: [PATCH 2/8] Update library/os.path.po Co-authored-by: Wei-Hsiang (Matt) Wang --- library/os.path.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/os.path.po b/library/os.path.po index d1ae9d6b4c..4b96ce2974 100644 --- a/library/os.path.po +++ b/library/os.path.po @@ -21,7 +21,7 @@ msgstr "" #: ../../library/os.path.rst:2 msgid ":mod:`os.path` --- Common pathname manipulations" -msgstr ":mod:`os.path`\\ --- 常見的路徑名操作" +msgstr ":mod:`os.path` --- 常見的路徑名操作" #: ../../library/os.path.rst:7 msgid "" From 8a9df3a2447578d50eb38c73159cb62db89db623 Mon Sep 17 00:00:00 2001 From: jacksonchen1998 Date: Wed, 12 Jul 2023 12:42:20 +0800 Subject: [PATCH 3/8] [UPDATE] fix rst format --- library/os.path.po | 89 +++++++++++++++++++++++----------------------- 1 file changed, 44 insertions(+), 45 deletions(-) diff --git a/library/os.path.po b/library/os.path.po index 4b96ce2974..a79ab40752 100644 --- a/library/os.path.po +++ b/library/os.path.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-05-09 00:15+0000\n" -"PO-Revision-Date: 2023-07-11 15:38+0800\n" +"PO-Revision-Date: 2023-07-12 12:41+0800\n" "Last-Translator: Po-Chuan Chen \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -28,8 +28,8 @@ msgid "" "**Source code:** :source:`Lib/posixpath.py` (for POSIX) and :source:`Lib/" "ntpath.py` (for Windows)." msgstr "" -"**原始碼:**\\ :source:`Lib/posixpath.py`\\ (對於 POSIX)與 :source:`Lib/" -"ntpath.py`\\(對於 Windows)。" +"**原始碼:** :source:`Lib/posixpath.py`(對於 POSIX)與 :source:`Lib/ntpath." +"py`(對於 Windows)。" #: ../../library/os.path.rst:14 msgid "" @@ -38,9 +38,9 @@ msgid "" "module. The path parameters can be passed as strings, or bytes, or any " "object implementing the :class:`os.PathLike` protocol." msgstr "" -"該模組實現了一些有用的路徑名操作函數。若要讀取或寫入檔案,請參閱 \\ :func:" -"`open` \\ 函數,要訪問檔案系統,請參閱 \\ :mod:`os` \\ 模組。路徑參數可以以字" -"串、位元組或任何依照 \\ :class:`os.PathLike` \\ 協議實現的物件傳遞。" +"該模組實現了一些有用的路徑名操作函數。若要讀取或寫入檔案,請參閱 :func:" +"`open` 函數,要訪問檔案系統,請參閱 :mod:`os` 模組。路徑參數可以以字串、位" +"元組或任何依照 :class:`os.PathLike` 協議實現的物件傳遞。" #: ../../library/os.path.rst:19 msgid "" @@ -55,7 +55,7 @@ msgstr "" #: ../../library/os.path.rst:26 msgid "The :mod:`pathlib` module offers high-level path objects." -msgstr ":mod:`pathlib` \\ 模組提供了高階的路徑物件。" +msgstr ":mod:`pathlib` 模組提供了高階的路徑物件。" #: ../../library/os.path.rst:31 msgid "" @@ -77,17 +77,17 @@ msgid "" "same interface:" msgstr "" "由於不同的作業系統具有不同的路徑命名慣例,在標準庫中有幾個版本的這個模組可供" -"使用。 :mod:`os.path` \\ 模組始終適用於 Python 所在作業系統的路徑模組,因此適" -"用於本地路徑。然而,如果你想要操作 *始終* 以不同格式之一表示的路徑,你也可以" -"導入並使用各個模組。它們都具有相同的接口:" +"使用。 :mod:`os.path` 模組始終適用於 Python 所在作業系統的路徑模組,因此適用" +"於本地路徑。然而,如果你想要操作 *始終* 以不同格式之一表示的路徑,你也可以導" +"入並使用各個模組。它們都具有相同的接口:" #: ../../library/os.path.rst:45 msgid ":mod:`posixpath` for UNIX-style paths" -msgstr ":mod:`posixpath` \\ 用於 UNIX 形式的路徑" +msgstr ":mod:`posixpath` 用於 UNIX 形式的路徑" #: ../../library/os.path.rst:46 msgid ":mod:`ntpath` for Windows paths" -msgstr ":mod:`ntpath` \\ 用於 Windows 的路徑" +msgstr ":mod:`ntpath` 用於 Windows 的路徑" #: ../../library/os.path.rst:51 msgid "" @@ -98,7 +98,7 @@ msgid "" msgstr "" "現在,對於包含在作業系統層面無法表示的字符或位元組的路徑,:func:`exists`、:" "func:`lexists`、:func:`isdir`、:func:`isfile`、:func:`islink` 和 :func:" -"`ismount` \\ 函數會返回 \\ ``False``,而不是引發異常。" +"`ismount` 函數會返回 ``False``,而不是引發異常。" #: ../../library/os.path.rst:59 msgid "" @@ -106,8 +106,8 @@ msgid "" "platforms, this is equivalent to calling the function :func:`normpath` as " "follows: ``normpath(join(os.getcwd(), path))``." msgstr "" -"返回經正規化的絕對路徑名 \\ *path* 。在大多數平台上,這等效於按照以下方式調用" -"函數 \\ :func:`normpath`:``normpath(join(os.getcwd(), path))``。" +"返回經正規化的絕對路徑名 *path* 。在大多數平台上,這等效於按照以下方式調用函" +"數 :func:`normpath`:``normpath(join(os.getcwd(), path))``。" #: ../../library/os.path.rst:63 ../../library/os.path.rst:76 #: ../../library/os.path.rst:116 ../../library/os.path.rst:125 @@ -123,7 +123,7 @@ msgstr "" #: ../../library/os.path.rst:437 ../../library/os.path.rst:453 #: ../../library/os.path.rst:478 ../../library/os.path.rst:509 msgid "Accepts a :term:`path-like object`." -msgstr "接受一個 \\ :term:`path-like object`." +msgstr "接受一個 :term:`path-like object`." #: ../../library/os.path.rst:69 msgid "" @@ -133,10 +133,10 @@ msgid "" "program; where :program:`basename` for ``'/foo/bar/'`` returns ``'bar'``, " "the :func:`basename` function returns an empty string (``''``)." msgstr "" -"返回路徑名 *path* 的基本名稱。這是將 *path* 傳遞給函數 \\ :func:`split` \\ 後" -"返回的結果中的第二個元素。請注意,此函數的結果與 Unix 的 \\ :program:" -"`basename` \\ 程式不同;對於 \\ ``'/foo/bar/'``,:program:`basename` \\ 返回 " -"\\ ``'bar'``,而 \\ :func:`basename` \\ 函數返回空字串(``''``)。" +"返回路徑名 *path* 的基本名稱。這是將 *path* 傳遞給函數 :func:`split` 後返回" +"的結果中的第二個元素。請注意,此函數的結果與 Unix 的 :program:`basename` 程" +"式不同;對於 ``'/foo/bar/'``,:program:`basename` 返回 ``'bar'``,而 :" +"func:`basename` 函數返回空字串(``''``)。" #: ../../library/os.path.rst:82 msgid "" @@ -146,8 +146,8 @@ msgid "" "empty. Unlike :func:`commonprefix`, this returns a valid path." msgstr "" "返回序列 *paths* 中每個路徑名的最長共同子路徑。如果 *paths* 同時包含絕對路徑" -"和相對路徑、*paths* 位於不同的磁碟機或 *paths* 為空,則引發 \\ :exc:" -"`ValueError`。與 \\ :func:`commonprefix` \\ 不同,此函數返回的是有效路徑。" +"和相對路徑、*paths* 位於不同的磁碟機或 *paths* 為空,則引發 :exc:" +"`ValueError`。與 :func:`commonprefix` 不同,此函數返回的是有效路徑。" #: ../../library/os.path.rst:88 ../../library/os.path.rst:388 #: ../../library/os.path.rst:400 ../../library/os.path.rst:416 @@ -157,7 +157,7 @@ msgstr ":ref:`適用 `:Unix、Windows。" #: ../../library/os.path.rst:92 msgid "Accepts a sequence of :term:`path-like objects `." -msgstr "接受一個 \\ :term:`路徑類型物件 ` \\ 的序列。" +msgstr "接受一個\\ :term:`路徑類型物件 `\\ 的序列。" #: ../../library/os.path.rst:98 msgid "" @@ -173,16 +173,16 @@ msgid "" "This function may return invalid paths because it works a character at a " "time. To obtain a valid path, see :func:`commonpath`." msgstr "" -"由於此函數是逐字符比較,因此可能會返回無效的路徑。若要獲得有效的路徑,請參考 " -"\\ :func:`commonpath` \\ 函數。" +"由於此函數是逐字符比較,因此可能會返回無效的路徑。若要獲得有效的路徑,請參" +"考 :func:`commonpath` 函數。" #: ../../library/os.path.rst:122 msgid "" "Return the directory name of pathname *path*. This is the first element of " "the pair returned by passing *path* to the function :func:`split`." msgstr "" -"返回路徑名 *path* 的目錄名稱。這是將 *path* 傳遞給函數 \\ :func:`split` \\ 後" -"返回對結果中的第一個元素。" +"返回路徑名 *path* 的目錄名稱。這是將 *path* 傳遞給函數 :func:`split` 後返回" +"對結果中的第一個元素。" #: ../../library/os.path.rst:131 msgid "" @@ -192,17 +192,17 @@ msgid "" "to execute :func:`os.stat` on the requested file, even if the *path* " "physically exists." msgstr "" -"返回 \\ ``True``,如果 *path* 是一個存在的路徑或一個開啟的檔案描述符。對於已" -"損壞的符號連結則返回 \\ ``False``。在某些平台上,即使 *path* 在物理上存在,如" -"果未被授予執行 \\ :func:`os.stat` \\ 的權限,此函數可能返回 \\ ``False``。" +"返回 ``True``,如果 *path* 是一個存在的路徑或一個開啟的檔案描述符。對於已損" +"壞的符號連結則返回 ``False``。在某些平台上,即使 *path* 在物理上存在,如果未" +"被授予執行 :func:`os.stat` 的權限,此函數可能返回 ``False``。" #: ../../library/os.path.rst:137 msgid "" "*path* can now be an integer: ``True`` is returned if it is an open file " "descriptor, ``False`` otherwise." msgstr "" -"現在,*path* 可以是一個整數:如果它是一個開啟的檔案描述符,則返回 \\ " -"``True``;否則返回 \\ ``False``。" +"現在,*path* 可以是一個整數:如果它是一個開啟的檔案描述符,則返回 ``True``;" +"否則返回 ``False``。" #: ../../library/os.path.rst:147 msgid "" @@ -210,17 +210,16 @@ msgid "" "broken symbolic links. Equivalent to :func:`exists` on platforms lacking :" "func:`os.lstat`." msgstr "" -"返回 ``True``,如果 *path* 是一個存在的路徑。對於已損壞的符號連結也返回 \\ " -"``True``。在缺乏 \\ :func:`os.lstat` \\ 的平台上,與 \\ :func:`exists` \\ 函" -"數等效。" +"返回 ``True``,如果 *path* 是一個存在的路徑。對於已損壞的符號連結也返回 " +"``True``。在缺乏 :func:`os.lstat` 的平台上,與 :func:`exists` 函數等效。" #: ../../library/os.path.rst:159 msgid "" "On Unix and Windows, return the argument with an initial component of ``~`` " "or ``~user`` replaced by that *user*'s home directory." msgstr "" -"在 Unix 和 Windows 上,將引數中以 \\ ``~`` \\ 或 \\ ``~user`` \\ 開頭的部分" -"替換為該 *user* 的家目錄。" +"在 Unix 和 Windows 上,將引數中以 ``~`` 或 ``~user`` 開頭的部分替換為該 " +"*user* 的家目錄。" #: ../../library/os.path.rst:164 msgid "" @@ -229,9 +228,9 @@ msgid "" "up in the password directory through the built-in module :mod:`pwd`. An " "initial ``~user`` is looked up directly in the password directory." msgstr "" -"在 Unix 上,如果環境變數 \\ :envvar:`HOME` \\ 被設置,則將初始的 \\ ``~`` \\ " -"替換為該變數的值;否則將使用內建模組 \\ :mod:`pwd` \\ 在密碼目錄中查找當前使" -"用者的家目錄。對於初始的 \\ ``~user``,直接在密碼目錄中查找該使用者的家目錄。" +"在 Unix 上,如果環境變數 :envvar:`HOME` 被設置,則將初始的 ``~`` 替換為該變數" +"的值;否則將使用內建模組 :mod:`pwd` 在密碼目錄中查找當前使用者的家目錄。對於" +"初始的 ``~user``,直接在密碼目錄中查找該使用者的家目錄。" #: ../../library/os.path.rst:169 msgid "" @@ -241,10 +240,10 @@ msgid "" "of the current user's home directory matches :envvar:`USERNAME`, and " "replacing it if so." msgstr "" -"在 Windows 上,如果 \\ :envvar:`USERPROFILE` \\ 被設置,則使用該變數的值;否" -"則將結合 \\ :envvar:`HOMEPATH` \\ 和 \\ :envvar:`HOMEDRIVE`。對於初始的 \\ " -"``~user``,會檢查當前使用者的家目錄的最後一個目錄元件是否與 \\ :envvar:" -"`USERNAME` \\ 相符,如果相符則替換它。" +"在 Windows 上,如果 :envvar:`USERPROFILE` 被設置,則使用該變數的值;否則將結" +"合 :envvar:`HOMEPATH` 和 :envvar:`HOMEDRIVE`。對於初始的 ``~user``,會檢查當" +"前使用者的家目錄的最後一個目錄元件是否與 :envvar:`USERNAME` 相符,如果相符則" +"替換它。" #: ../../library/os.path.rst:174 msgid "" @@ -255,7 +254,7 @@ msgstr "" #: ../../library/os.path.rst:180 msgid "No longer uses :envvar:`HOME` on Windows." -msgstr "在 Windows 上不再使用 \\ :envvar:`HOME` \\ 變數。" +msgstr "在 Windows 上不再使用 :envvar:`HOME` 變數。" #: ../../library/os.path.rst:189 msgid "" From 1a62bfb0e361be969b23a8fde75fd7aaf6a7c279 Mon Sep 17 00:00:00 2001 From: jacksonchen1998 Date: Wed, 12 Jul 2023 12:44:43 +0800 Subject: [PATCH 4/8] [UDAPTE] fix rst format --- library/os.path.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/os.path.po b/library/os.path.po index a79ab40752..32f4c7ea39 100644 --- a/library/os.path.po +++ b/library/os.path.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-05-09 00:15+0000\n" -"PO-Revision-Date: 2023-07-12 12:41+0800\n" +"PO-Revision-Date: 2023-07-12 12:44+0800\n" "Last-Translator: Po-Chuan Chen \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -50,8 +50,8 @@ msgid "" "the :mod:`glob` module.)" msgstr "" "與 Unix shell 不同,Python 不會 *自動* 進行路徑展開(path expansions)。當應" -"用程式需要進行類似 shell 的路徑展開時,可以明確地調用 \\ :func:`expanduser` " -"\\ 和 \\ :func:`expandvars` \\ 等函數。(另請參閱 \\ :mod:`glob` \\ 模組。)" +"用程式需要進行類似 shell 的路徑展開時,可以明確地調用 :func:`expanduser` 和 :" +"func:`expandvars` 等函數。(另請參閱 :mod:`glob` 模組。)" #: ../../library/os.path.rst:26 msgid "The :mod:`pathlib` module offers high-level path objects." From 71f046c4e23345bff5c7c9484ee365898b4ed5fe Mon Sep 17 00:00:00 2001 From: jacksonchen1998 Date: Wed, 12 Jul 2023 12:48:31 +0800 Subject: [PATCH 5/8] [UPDATE] --- library/os.path.po | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/library/os.path.po b/library/os.path.po index 32f4c7ea39..69a9b253e1 100644 --- a/library/os.path.po +++ b/library/os.path.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-05-09 00:15+0000\n" -"PO-Revision-Date: 2023-07-12 12:44+0800\n" +"PO-Revision-Date: 2023-07-12 12:48+0800\n" "Last-Translator: Po-Chuan Chen \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -38,9 +38,9 @@ msgid "" "module. The path parameters can be passed as strings, or bytes, or any " "object implementing the :class:`os.PathLike` protocol." msgstr "" -"該模組實現了一些有用的路徑名操作函數。若要讀取或寫入檔案,請參閱 :func:" -"`open` 函數,要訪問檔案系統,請參閱 :mod:`os` 模組。路徑參數可以以字串、位" -"元組或任何依照 :class:`os.PathLike` 協議實現的物件傳遞。" +"該模組實現了一些有用的路徑名操作函數。若要讀取或寫入檔案,請參閱 :func:" +"`open` 函數,要訪問檔案系統,請參閱 :mod:`os` 模組。路徑參數可以以字串、位元" +"組或任何依照 :class:`os.PathLike` 協議實現的物件傳遞。" #: ../../library/os.path.rst:19 msgid "" @@ -77,17 +77,17 @@ msgid "" "same interface:" msgstr "" "由於不同的作業系統具有不同的路徑命名慣例,在標準庫中有幾個版本的這個模組可供" -"使用。 :mod:`os.path` 模組始終適用於 Python 所在作業系統的路徑模組,因此適用" +"使用。 :mod:`os.path` 模組始終適用於 Python 所在作業系統的路徑模組,因此適用" "於本地路徑。然而,如果你想要操作 *始終* 以不同格式之一表示的路徑,你也可以導" "入並使用各個模組。它們都具有相同的接口:" #: ../../library/os.path.rst:45 msgid ":mod:`posixpath` for UNIX-style paths" -msgstr ":mod:`posixpath` 用於 UNIX 形式的路徑" +msgstr ":mod:`posixpath` 用於 UNIX 形式的路徑" #: ../../library/os.path.rst:46 msgid ":mod:`ntpath` for Windows paths" -msgstr ":mod:`ntpath` 用於 Windows 的路徑" +msgstr ":mod:`ntpath` 用於 Windows 的路徑" #: ../../library/os.path.rst:51 msgid "" @@ -98,7 +98,7 @@ msgid "" msgstr "" "現在,對於包含在作業系統層面無法表示的字符或位元組的路徑,:func:`exists`、:" "func:`lexists`、:func:`isdir`、:func:`isfile`、:func:`islink` 和 :func:" -"`ismount` 函數會返回 ``False``,而不是引發異常。" +"`ismount` 函數會返回 ``False``,而不是引發異常。" #: ../../library/os.path.rst:59 msgid "" @@ -107,7 +107,7 @@ msgid "" "follows: ``normpath(join(os.getcwd(), path))``." msgstr "" "返回經正規化的絕對路徑名 *path* 。在大多數平台上,這等效於按照以下方式調用函" -"數 :func:`normpath`:``normpath(join(os.getcwd(), path))``。" +"數 :func:`normpath`:``normpath(join(os.getcwd(), path))``。" #: ../../library/os.path.rst:63 ../../library/os.path.rst:76 #: ../../library/os.path.rst:116 ../../library/os.path.rst:125 @@ -123,7 +123,7 @@ msgstr "" #: ../../library/os.path.rst:437 ../../library/os.path.rst:453 #: ../../library/os.path.rst:478 ../../library/os.path.rst:509 msgid "Accepts a :term:`path-like object`." -msgstr "接受一個 :term:`path-like object`." +msgstr "接受一個 :term:`path-like object`." #: ../../library/os.path.rst:69 msgid "" @@ -146,8 +146,8 @@ msgid "" "empty. Unlike :func:`commonprefix`, this returns a valid path." msgstr "" "返回序列 *paths* 中每個路徑名的最長共同子路徑。如果 *paths* 同時包含絕對路徑" -"和相對路徑、*paths* 位於不同的磁碟機或 *paths* 為空,則引發 :exc:" -"`ValueError`。與 :func:`commonprefix` 不同,此函數返回的是有效路徑。" +"和相對路徑、*paths* 位於不同的磁碟機或 *paths* 為空,則引發 :exc:" +"`ValueError`。與 :func:`commonprefix` 不同,此函數返回的是有效路徑。" #: ../../library/os.path.rst:88 ../../library/os.path.rst:388 #: ../../library/os.path.rst:400 ../../library/os.path.rst:416 @@ -174,15 +174,15 @@ msgid "" "time. To obtain a valid path, see :func:`commonpath`." msgstr "" "由於此函數是逐字符比較,因此可能會返回無效的路徑。若要獲得有效的路徑,請參" -"考 :func:`commonpath` 函數。" +"考 :func:`commonpath` 函數。" #: ../../library/os.path.rst:122 msgid "" "Return the directory name of pathname *path*. This is the first element of " "the pair returned by passing *path* to the function :func:`split`." msgstr "" -"返回路徑名 *path* 的目錄名稱。這是將 *path* 傳遞給函數 :func:`split` 後返回" -"對結果中的第一個元素。" +"返回路徑名 *path* 的目錄名稱。這是將 *path* 傳遞給函數 :func:`split` 後返回對" +"結果中的第一個元素。" #: ../../library/os.path.rst:131 msgid "" @@ -192,9 +192,9 @@ msgid "" "to execute :func:`os.stat` on the requested file, even if the *path* " "physically exists." msgstr "" -"返回 ``True``,如果 *path* 是一個存在的路徑或一個開啟的檔案描述符。對於已損" -"壞的符號連結則返回 ``False``。在某些平台上,即使 *path* 在物理上存在,如果未" -"被授予執行 :func:`os.stat` 的權限,此函數可能返回 ``False``。" +"返回 ``True``,如果 *path* 是一個存在的路徑或一個開啟的檔案描述符。對於已損壞" +"的符號連結則返回 ``False``。在某些平台上,即使 *path* 在物理上存在,如果未被" +"授予執行 :func:`os.stat` 的權限,此函數可能返回 ``False``。" #: ../../library/os.path.rst:137 msgid "" @@ -202,7 +202,7 @@ msgid "" "descriptor, ``False`` otherwise." msgstr "" "現在,*path* 可以是一個整數:如果它是一個開啟的檔案描述符,則返回 ``True``;" -"否則返回 ``False``。" +"否則返回 ``False``。" #: ../../library/os.path.rst:147 msgid "" @@ -218,7 +218,7 @@ msgid "" "On Unix and Windows, return the argument with an initial component of ``~`` " "or ``~user`` replaced by that *user*'s home directory." msgstr "" -"在 Unix 和 Windows 上,將引數中以 ``~`` 或 ``~user`` 開頭的部分替換為該 " +"在 Unix 和 Windows 上,將引數中以 ``~`` 或 ``~user`` 開頭的部分替換為該 " "*user* 的家目錄。" #: ../../library/os.path.rst:164 @@ -254,7 +254,7 @@ msgstr "" #: ../../library/os.path.rst:180 msgid "No longer uses :envvar:`HOME` on Windows." -msgstr "在 Windows 上不再使用 :envvar:`HOME` 變數。" +msgstr "在 Windows 上不再使用 :envvar:`HOME` 變數。" #: ../../library/os.path.rst:189 msgid "" From e47754c9054692c299a3631d6b7aa50e6bd343d3 Mon Sep 17 00:00:00 2001 From: jacksonchen1998 Date: Wed, 12 Jul 2023 13:55:17 +0800 Subject: [PATCH 6/8] [UPDATE] local build sucess --- library/os.path.po | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/library/os.path.po b/library/os.path.po index 69a9b253e1..1c02fc728f 100644 --- a/library/os.path.po +++ b/library/os.path.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-05-09 00:15+0000\n" -"PO-Revision-Date: 2023-07-12 12:48+0800\n" +"PO-Revision-Date: 2023-07-12 13:55+0800\n" "Last-Translator: Po-Chuan Chen \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -28,8 +28,8 @@ msgid "" "**Source code:** :source:`Lib/posixpath.py` (for POSIX) and :source:`Lib/" "ntpath.py` (for Windows)." msgstr "" -"**原始碼:** :source:`Lib/posixpath.py`(對於 POSIX)與 :source:`Lib/ntpath." -"py`(對於 Windows)。" +"**Source code:** :source:`Lib/posixpath.py` (用於 POSIX 系統) 和 :source:" +"`Lib/ntpath.py` (用於 Windows)." #: ../../library/os.path.rst:14 msgid "" @@ -55,7 +55,7 @@ msgstr "" #: ../../library/os.path.rst:26 msgid "The :mod:`pathlib` module offers high-level path objects." -msgstr ":mod:`pathlib` 模組提供了高階的路徑物件。" +msgstr ":mod:`pathlib` 模組提供了高階的路徑物件。" #: ../../library/os.path.rst:31 msgid "" @@ -77,9 +77,9 @@ msgid "" "same interface:" msgstr "" "由於不同的作業系統具有不同的路徑命名慣例,在標準庫中有幾個版本的這個模組可供" -"使用。 :mod:`os.path` 模組始終適用於 Python 所在作業系統的路徑模組,因此適用" -"於本地路徑。然而,如果你想要操作 *始終* 以不同格式之一表示的路徑,你也可以導" -"入並使用各個模組。它們都具有相同的接口:" +"使用。:mod:`os.path` 模組始終適用於 Python 所在作業系統的路徑模組,因此適用於" +"本地路徑。然而,如果你想要操作 *始終* 以不同格式之一表示的路徑,你也可以導入" +"並使用各個模組。它們都具有相同的接口:" #: ../../library/os.path.rst:45 msgid ":mod:`posixpath` for UNIX-style paths" @@ -106,7 +106,7 @@ msgid "" "platforms, this is equivalent to calling the function :func:`normpath` as " "follows: ``normpath(join(os.getcwd(), path))``." msgstr "" -"返回經正規化的絕對路徑名 *path* 。在大多數平台上,這等效於按照以下方式調用函" +"返回經正規化的絕對路徑名 *path* 。在大多數平台上,這等效於按照以下方式調用函" "數 :func:`normpath`:``normpath(join(os.getcwd(), path))``。" #: ../../library/os.path.rst:63 ../../library/os.path.rst:76 @@ -123,7 +123,7 @@ msgstr "" #: ../../library/os.path.rst:437 ../../library/os.path.rst:453 #: ../../library/os.path.rst:478 ../../library/os.path.rst:509 msgid "Accepts a :term:`path-like object`." -msgstr "接受一個 :term:`path-like object`." +msgstr "接受一個\\ :term:`path-like object`。" #: ../../library/os.path.rst:69 msgid "" @@ -133,10 +133,10 @@ msgid "" "program; where :program:`basename` for ``'/foo/bar/'`` returns ``'bar'``, " "the :func:`basename` function returns an empty string (``''``)." msgstr "" -"返回路徑名 *path* 的基本名稱。這是將 *path* 傳遞給函數 :func:`split` 後返回" -"的結果中的第二個元素。請注意,此函數的結果與 Unix 的 :program:`basename` 程" -"式不同;對於 ``'/foo/bar/'``,:program:`basename` 返回 ``'bar'``,而 :" -"func:`basename` 函數返回空字串(``''``)。" +"返回路徑名 *path* 的基本名稱。這是將 *path* 傳遞給函數 :func:`split` 後返回的" +"結果中的第二個元素。請注意,此函數的結果與 Unix 的 :program:`basename` 程式不" +"同;對於 ``'/foo/bar/'``,:program:`basename` 返回 ``'bar'``,而 :func:" +"`basename` 函數返回空字串(``''``)。" #: ../../library/os.path.rst:82 msgid "" @@ -194,7 +194,7 @@ msgid "" msgstr "" "返回 ``True``,如果 *path* 是一個存在的路徑或一個開啟的檔案描述符。對於已損壞" "的符號連結則返回 ``False``。在某些平台上,即使 *path* 在物理上存在,如果未被" -"授予執行 :func:`os.stat` 的權限,此函數可能返回 ``False``。" +"授予執行 :func:`os.stat` 的權限,此函數可能返回 ``False``。" #: ../../library/os.path.rst:137 msgid "" From dd07caf7e4894c41c89ff74aa8216249257f8193 Mon Sep 17 00:00:00 2001 From: jacksonchen1998 Date: Wed, 12 Jul 2023 13:58:17 +0800 Subject: [PATCH 7/8] [UPDATE] fix typo --- library/os.path.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/os.path.po b/library/os.path.po index 1c02fc728f..583ebcb7d0 100644 --- a/library/os.path.po +++ b/library/os.path.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-05-09 00:15+0000\n" -"PO-Revision-Date: 2023-07-12 13:55+0800\n" +"PO-Revision-Date: 2023-07-12 13:57+0800\n" "Last-Translator: Po-Chuan Chen \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -123,7 +123,7 @@ msgstr "" #: ../../library/os.path.rst:437 ../../library/os.path.rst:453 #: ../../library/os.path.rst:478 ../../library/os.path.rst:509 msgid "Accepts a :term:`path-like object`." -msgstr "接受一個\\ :term:`path-like object`。" +msgstr "接受一個 :term:`path-like object`。" #: ../../library/os.path.rst:69 msgid "" From 3c393d3a13aba617fbad72cd845757212576286d Mon Sep 17 00:00:00 2001 From: jacksonchen1998 Date: Thu, 13 Jul 2023 15:08:43 +0800 Subject: [PATCH 8/8] [UPDATE] Modified some terms --- library/os.path.po | 94 +++++++++++++++++++++++----------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/library/os.path.po b/library/os.path.po index 583ebcb7d0..52e6a1bf8c 100644 --- a/library/os.path.po +++ b/library/os.path.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-05-09 00:15+0000\n" -"PO-Revision-Date: 2023-07-12 13:57+0800\n" +"PO-Revision-Date: 2023-07-13 14:06+0800\n" "Last-Translator: Po-Chuan Chen \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -28,8 +28,8 @@ msgid "" "**Source code:** :source:`Lib/posixpath.py` (for POSIX) and :source:`Lib/" "ntpath.py` (for Windows)." msgstr "" -"**Source code:** :source:`Lib/posixpath.py` (用於 POSIX 系統) 和 :source:" -"`Lib/ntpath.py` (用於 Windows)." +"**原始碼:** :source:`Lib/posixpath.py` (用於 POSIX 系統) 和 :source:`Lib/" +"ntpath.py` (用於 Windows)." #: ../../library/os.path.rst:14 msgid "" @@ -38,9 +38,9 @@ msgid "" "module. The path parameters can be passed as strings, or bytes, or any " "object implementing the :class:`os.PathLike` protocol." msgstr "" -"該模組實現了一些有用的路徑名操作函數。若要讀取或寫入檔案,請參閱 :func:" -"`open` 函數,要訪問檔案系統,請參閱 :mod:`os` 模組。路徑參數可以以字串、位元" -"組或任何依照 :class:`os.PathLike` 協議實現的物件傳遞。" +"該模組實現了一些有用的路徑名操作函式。若要讀取或寫入檔案,請參閱 :func:" +"`open` 函數,要存取檔案系統,請參閱 :mod:`os` 模組。路徑參數可以以字串、位元" +"組或任何依照 :class:`os.PathLike` 協議實作的物件傳遞。" #: ../../library/os.path.rst:19 msgid "" @@ -49,9 +49,9 @@ msgid "" "explicitly when an application desires shell-like path expansion. (See also " "the :mod:`glob` module.)" msgstr "" -"與 Unix shell 不同,Python 不會 *自動* 進行路徑展開(path expansions)。當應" -"用程式需要進行類似 shell 的路徑展開時,可以明確地調用 :func:`expanduser` 和 :" -"func:`expandvars` 等函數。(另請參閱 :mod:`glob` 模組。)" +"與 Unix shell 不同,Python 不會\\ *自動*\\ 進行路徑展開(path expansions)。" +"當應用程式需要進行類似 shell 的路徑展開時,可以明確地呼叫 :func:`expanduser` " +"和 :func:`expandvars` 等函式。(另請參閱 :mod:`glob` 模組。)" #: ../../library/os.path.rst:26 msgid "The :mod:`pathlib` module offers high-level path objects." @@ -63,8 +63,8 @@ msgid "" "their parameters. The result is an object of the same type, if a path or " "file name is returned." msgstr "" -"所有這些函數都只接受位元組或字元串物件作為參數。如果返回的是路徑或檔案名稱," -"結果將是相同類型的物件。" +"所有這些函數都只接受位元組或字串物件作為參數。如果回傳的是路徑或檔案名稱,結" +"果將是相同型別的物件。" #: ../../library/os.path.rst:37 msgid "" @@ -76,10 +76,10 @@ msgid "" "path that is *always* in one of the different formats. They all have the " "same interface:" msgstr "" -"由於不同的作業系統具有不同的路徑命名慣例,在標準庫中有幾個版本的這個模組可供" -"使用。:mod:`os.path` 模組始終適用於 Python 所在作業系統的路徑模組,因此適用於" -"本地路徑。然而,如果你想要操作 *始終* 以不同格式之一表示的路徑,你也可以導入" -"並使用各個模組。它們都具有相同的接口:" +"由於不同的作業系統具有不同的路徑命名慣例,在標準函式庫中的路徑模組有數個版本" +"可供使用,而 :mod:`os.path` 模組都會是運行 Python 之作業系統所適用本地路徑。" +"然而,如果你想要操作\\ *始終*\\ 以某個不同於本機格式表示的路徑,你也可以引入" +"並使用對應的模組。它們都具有相同的介面:" #: ../../library/os.path.rst:45 msgid ":mod:`posixpath` for UNIX-style paths" @@ -96,9 +96,9 @@ msgid "" "exception for paths that contain characters or bytes unrepresentable at the " "OS level." msgstr "" -"現在,對於包含在作業系統層面無法表示的字符或位元組的路徑,:func:`exists`、:" -"func:`lexists`、:func:`isdir`、:func:`isfile`、:func:`islink` 和 :func:" -"`ismount` 函數會返回 ``False``,而不是引發異常。" +"對於包含有作業系統層級無法表示之字元或位元組的路徑,:func:`exists`、:func:" +"`lexists`、:func:`isdir`、:func:`isfile`、:func:`islink` 和 :func:`ismount` " +"函式現在會回傳 ``False``,而不是引發例外。" #: ../../library/os.path.rst:59 msgid "" @@ -106,8 +106,8 @@ msgid "" "platforms, this is equivalent to calling the function :func:`normpath` as " "follows: ``normpath(join(os.getcwd(), path))``." msgstr "" -"返回經正規化的絕對路徑名 *path* 。在大多數平台上,這等效於按照以下方式調用函" -"數 :func:`normpath`:``normpath(join(os.getcwd(), path))``。" +"回傳經正規化的絕對路徑名 *path* 。在大多數平台上,這等效於按照以下方式呼叫 :" +"func:`normpath` 函式:``normpath(join(os.getcwd(), path))``。" #: ../../library/os.path.rst:63 ../../library/os.path.rst:76 #: ../../library/os.path.rst:116 ../../library/os.path.rst:125 @@ -133,10 +133,10 @@ msgid "" "program; where :program:`basename` for ``'/foo/bar/'`` returns ``'bar'``, " "the :func:`basename` function returns an empty string (``''``)." msgstr "" -"返回路徑名 *path* 的基本名稱。這是將 *path* 傳遞給函數 :func:`split` 後返回的" -"結果中的第二個元素。請注意,此函數的結果與 Unix 的 :program:`basename` 程式不" -"同;對於 ``'/foo/bar/'``,:program:`basename` 返回 ``'bar'``,而 :func:" -"`basename` 函數返回空字串(``''``)。" +"回傳路徑名 *path* 的基底名稱。這是將 *path* 傳遞給函式 :func:`split` 後回傳結" +"果中的第二個元素。請注意,此函式的結果與 Unix 的 :program:`basename` 程式不" +"同;對於 ``'/foo/bar/'``,:program:`basename` 回傳 ``'bar'``,而 :func:" +"`basename` 函式回傳空字串(``''``)。" #: ../../library/os.path.rst:82 msgid "" @@ -145,9 +145,9 @@ msgid "" "relative pathnames, the *paths* are on the different drives or if *paths* is " "empty. Unlike :func:`commonprefix`, this returns a valid path." msgstr "" -"返回序列 *paths* 中每個路徑名的最長共同子路徑。如果 *paths* 同時包含絕對路徑" +"回傳序列 *paths* 中每個路徑名的最長共同子路徑。如果 *paths* 同時包含絕對路徑" "和相對路徑、*paths* 位於不同的磁碟機或 *paths* 為空,則引發 :exc:" -"`ValueError`。與 :func:`commonprefix` 不同,此函數返回的是有效路徑。" +"`ValueError`。與 :func:`commonprefix` 不同,此函式回傳的是有效路徑。" #: ../../library/os.path.rst:88 ../../library/os.path.rst:388 #: ../../library/os.path.rst:400 ../../library/os.path.rst:416 @@ -157,7 +157,7 @@ msgstr ":ref:`適用 `:Unix、Windows。" #: ../../library/os.path.rst:92 msgid "Accepts a sequence of :term:`path-like objects `." -msgstr "接受一個\\ :term:`路徑類型物件 `\\ 的序列。" +msgstr "接受一個\\ :term:`類路徑物件 `\\ 的序列。" #: ../../library/os.path.rst:98 msgid "" @@ -165,7 +165,7 @@ msgid "" "prefix of all paths in *list*. If *list* is empty, return the empty string " "(``''``)." msgstr "" -"返回 *list* 中所有路徑的最長路徑前綴(逐字元比較)。如果 *list* 為空,則返回" +"回傳 *list* 中所有路徑的最長路徑前綴(逐字元比較)。如果 *list* 為空,則回傳" "空字串(``''``)。" #: ../../library/os.path.rst:104 @@ -173,16 +173,16 @@ msgid "" "This function may return invalid paths because it works a character at a " "time. To obtain a valid path, see :func:`commonpath`." msgstr "" -"由於此函數是逐字符比較,因此可能會返回無效的路徑。若要獲得有效的路徑,請參" -"考 :func:`commonpath` 函數。" +"由於此函式是逐字元比較,因此可能會回傳無效的路徑。若要獲得有效的路徑,請參" +"考 :func:`commonpath` 函式。" #: ../../library/os.path.rst:122 msgid "" "Return the directory name of pathname *path*. This is the first element of " "the pair returned by passing *path* to the function :func:`split`." msgstr "" -"返回路徑名 *path* 的目錄名稱。這是將 *path* 傳遞給函數 :func:`split` 後返回對" -"結果中的第一個元素。" +"回傳路徑名 *path* 的目錄名稱。這是將 *path* 傳遞給函式 :func:`split` 後回傳之" +"成對結果中的第一個元素。" #: ../../library/os.path.rst:131 msgid "" @@ -192,17 +192,17 @@ msgid "" "to execute :func:`os.stat` on the requested file, even if the *path* " "physically exists." msgstr "" -"返回 ``True``,如果 *path* 是一個存在的路徑或一個開啟的檔案描述符。對於已損壞" -"的符號連結則返回 ``False``。在某些平台上,即使 *path* 在物理上存在,如果未被" -"授予執行 :func:`os.stat` 的權限,此函數可能返回 ``False``。" +"如果 *path* 是一個存在的路徑或一個開啟的檔案描述器則回傳 ``True``。對於已損壞" +"的符號連結則回傳 ``False``。在某些平台上,即使 *path* 實際存在,如果未被授予" +"執行 :func:`os.stat` 的權限,此函式仍可能回傳 ``False``。" #: ../../library/os.path.rst:137 msgid "" "*path* can now be an integer: ``True`` is returned if it is an open file " "descriptor, ``False`` otherwise." msgstr "" -"現在,*path* 可以是一個整數:如果它是一個開啟的檔案描述符,則返回 ``True``;" -"否則返回 ``False``。" +"現在 *path* 可以是一個整數:如果它是一個開啟的檔案描述器,則回傳 ``True``;否" +"則回傳 ``False``。" #: ../../library/os.path.rst:147 msgid "" @@ -210,8 +210,8 @@ msgid "" "broken symbolic links. Equivalent to :func:`exists` on platforms lacking :" "func:`os.lstat`." msgstr "" -"返回 ``True``,如果 *path* 是一個存在的路徑。對於已損壞的符號連結也返回 " -"``True``。在缺乏 :func:`os.lstat` 的平台上,與 :func:`exists` 函數等效。" +"如果 *path* 是一個存在的路徑則回傳 ``True``。對於已損壞的符號連結也回傳 " +"``True``。在缺乏 :func:`os.lstat` 的平台上,與 :func:`exists` 函式等效。" #: ../../library/os.path.rst:159 msgid "" @@ -228,9 +228,9 @@ msgid "" "up in the password directory through the built-in module :mod:`pwd`. An " "initial ``~user`` is looked up directly in the password directory." msgstr "" -"在 Unix 上,如果環境變數 :envvar:`HOME` 被設置,則將初始的 ``~`` 替換為該變數" -"的值;否則將使用內建模組 :mod:`pwd` 在密碼目錄中查找當前使用者的家目錄。對於" -"初始的 ``~user``,直接在密碼目錄中查找該使用者的家目錄。" +"在 Unix 上,如果環境變數 :envvar:`HOME` 有被設置,則將初始的 ``~`` 替換為該變" +"數的值;否則將使用內建模組 :mod:`pwd` 在密碼目錄中查找當前使用者的家目錄。對" +"於初始的 ``~user``,直接在密碼目錄中查找該使用者的家目錄。" #: ../../library/os.path.rst:169 msgid "" @@ -240,17 +240,17 @@ msgid "" "of the current user's home directory matches :envvar:`USERNAME`, and " "replacing it if so." msgstr "" -"在 Windows 上,如果 :envvar:`USERPROFILE` 被設置,則使用該變數的值;否則將結" -"合 :envvar:`HOMEPATH` 和 :envvar:`HOMEDRIVE`。對於初始的 ``~user``,會檢查當" -"前使用者的家目錄的最後一個目錄元件是否與 :envvar:`USERNAME` 相符,如果相符則" -"替換它。" +"在 Windows 上,如果 :envvar:`USERPROFILE` 有被設置,則使用該變數的值;否則將" +"結合 :envvar:`HOMEPATH` 和 :envvar:`HOMEDRIVE`。對於初始的 ``~user``,會檢查" +"當前使用者的家目錄的最後一個目錄元件是否與 :envvar:`USERNAME` 相符,如果相符" +"則替換它。" #: ../../library/os.path.rst:174 msgid "" "If the expansion fails or if the path does not begin with a tilde, the path " "is returned unchanged." msgstr "" -"如果展開失敗或路徑不以波浪符號(tilde)開頭,則返回原始路徑,不做任何變更。" +"如果展開失敗或路徑不以波浪符號(tilde)開頭,則回傳原始路徑,不做任何變更。" #: ../../library/os.path.rst:180 msgid "No longer uses :envvar:`HOME` on Windows."