@@ -8,19 +8,20 @@ msgstr ""
8
8
"Project-Id-Version : Python 3.11\n "
9
9
"Report-Msgid-Bugs-To : \n "
10
10
"POT-Creation-Date : 2023-05-09 00:15+0000\n "
11
- "PO-Revision-Date : 2018-05-23 16:07+0000 \n "
12
- "Last-Translator : Adrian Liaw <adrianliaw2000 @gmail.com>\n "
11
+ "PO-Revision-Date : 2023-07-11 15:38+0800 \n "
12
+ "Last-Translator : Po-Chuan Chen <present90308 @gmail.com>\n "
13
13
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
14
14
"tw)\n "
15
15
"Language : zh_TW\n "
16
16
"MIME-Version : 1.0\n "
17
17
"Content-Type : text/plain; charset=UTF-8\n "
18
18
"Content-Transfer-Encoding : 8bit\n "
19
19
"Plural-Forms : nplurals=1; plural=0;\n "
20
+ "X-Generator : Poedit 3.3.2\n "
20
21
21
22
#: ../../library/os.path.rst:2
22
23
msgid ":mod:`os.path` --- Common pathname manipulations"
23
- msgstr ""
24
+ msgstr ":mod:`os.path` \\ --- 常見的路徑名操作 "
24
25
25
26
#: ../../library/os.path.rst:7
26
27
msgid ""
@@ -37,6 +38,9 @@ msgid ""
37
38
"module. The path parameters can be passed as strings, or bytes, or any "
38
39
"object implementing the :class:`os.PathLike` protocol."
39
40
msgstr ""
41
+ "該模組實現了一些有用的路徑名操作函數。若要讀取或寫入檔案,請參閱 \\ :func:"
42
+ "`open` \\ 函數,要訪問檔案系統,請參閱 \\ :mod:`os` \\ 模組。路徑參數可以以字"
43
+ "串、位元組或任何依照 \\ :class:`os.PathLike` \\ 協議實現的物件傳遞。"
40
44
41
45
#: ../../library/os.path.rst:19
42
46
msgid ""
@@ -45,17 +49,22 @@ msgid ""
45
49
"explicitly when an application desires shell-like path expansion. (See also "
46
50
"the :mod:`glob` module.)"
47
51
msgstr ""
52
+ "與 Unix shell 不同,Python 不會 *自動* 進行路徑展開(path expansions)。當應"
53
+ "用程式需要進行類似 shell 的路徑展開時,可以明確地調用 \\ :func:`expanduser` "
54
+ "\\ 和 \\ :func:`expandvars` \\ 等函數。(另請參閱 \\ :mod:`glob` \\ 模組。)"
48
55
49
56
#: ../../library/os.path.rst:26
50
57
msgid "The :mod:`pathlib` module offers high-level path objects."
51
- msgstr ""
58
+ msgstr ":mod:`pathlib` \\ 模組提供了高階的路徑物件。 "
52
59
53
60
#: ../../library/os.path.rst:31
54
61
msgid ""
55
62
"All of these functions accept either only bytes or only string objects as "
56
63
"their parameters. The result is an object of the same type, if a path or "
57
64
"file name is returned."
58
65
msgstr ""
66
+ "所有這些函數都只接受位元組或字元串物件作為參數。如果返回的是路徑或檔案名稱,"
67
+ "結果將是相同類型的物件。"
59
68
60
69
#: ../../library/os.path.rst:37
61
70
msgid ""
@@ -67,14 +76,18 @@ msgid ""
67
76
"path that is *always* in one of the different formats. They all have the "
68
77
"same interface:"
69
78
msgstr ""
79
+ "由於不同的作業系統具有不同的路徑命名慣例,在標準庫中有幾個版本的這個模組可供"
80
+ "使用。 :mod:`os.path` \\ 模組始終適用於 Python 所在作業系統的路徑模組,因此適"
81
+ "用於本地路徑。然而,如果你想要操作 *始終* 以不同格式之一表示的路徑,你也可以"
82
+ "導入並使用各個模組。它們都具有相同的接口:"
70
83
71
84
#: ../../library/os.path.rst:45
72
85
msgid ":mod:`posixpath` for UNIX-style paths"
73
- msgstr ""
86
+ msgstr ":mod:`posixpath` \\ 用於 UNIX 形式的路徑 "
74
87
75
88
#: ../../library/os.path.rst:46
76
89
msgid ":mod:`ntpath` for Windows paths"
77
- msgstr ""
90
+ msgstr ":mod:`ntpath` \\ 用於 Windows 的路徑 "
78
91
79
92
#: ../../library/os.path.rst:51
80
93
msgid ""
@@ -83,13 +96,18 @@ msgid ""
83
96
"exception for paths that contain characters or bytes unrepresentable at the "
84
97
"OS level."
85
98
msgstr ""
99
+ "現在,對於包含在作業系統層面無法表示的字符或位元組的路徑,:func:`exists`、:"
100
+ "func:`lexists`、:func:`isdir`、:func:`isfile`、:func:`islink` 和 :func:"
101
+ "`ismount` \\ 函數會返回 \\ ``False``,而不是引發異常。"
86
102
87
103
#: ../../library/os.path.rst:59
88
104
msgid ""
89
105
"Return a normalized absolutized version of the pathname *path*. On most "
90
106
"platforms, this is equivalent to calling the function :func:`normpath` as "
91
107
"follows: ``normpath(join(os.getcwd(), path))``."
92
108
msgstr ""
109
+ "返回經正規化的絕對路徑名 \\ *path* 。在大多數平台上,這等效於按照以下方式調用"
110
+ "函數 \\ :func:`normpath`:``normpath(join(os.getcwd(), path))``。"
93
111
94
112
#: ../../library/os.path.rst:63 ../../library/os.path.rst:76
95
113
#: ../../library/os.path.rst:116 ../../library/os.path.rst:125
@@ -105,7 +123,7 @@ msgstr ""
105
123
#: ../../library/os.path.rst:437 ../../library/os.path.rst:453
106
124
#: ../../library/os.path.rst:478 ../../library/os.path.rst:509
107
125
msgid "Accepts a :term:`path-like object`."
108
- msgstr ""
126
+ msgstr "接受一個 \\ :term:`path-like object`. "
109
127
110
128
#: ../../library/os.path.rst:69
111
129
msgid ""
@@ -115,6 +133,10 @@ msgid ""
115
133
"program; where :program:`basename` for ``'/foo/bar/'`` returns ``'bar'``, "
116
134
"the :func:`basename` function returns an empty string (``''``)."
117
135
msgstr ""
136
+ "返回路徑名 *path* 的基本名稱。這是將 *path* 傳遞給函數 \\ :func:`split` \\ 後"
137
+ "返回的結果中的第二個元素。請注意,此函數的結果與 Unix 的 \\ :program:"
138
+ "`basename` \\ 程式不同;對於 \\ ``'/foo/bar/'``,:program:`basename` \\ 返回 "
139
+ "\\ ``'bar'``,而 \\ :func:`basename` \\ 函數返回空字串(``''``)。"
118
140
119
141
#: ../../library/os.path.rst:82
120
142
msgid ""
@@ -123,6 +145,9 @@ msgid ""
123
145
"relative pathnames, the *paths* are on the different drives or if *paths* is "
124
146
"empty. Unlike :func:`commonprefix`, this returns a valid path."
125
147
msgstr ""
148
+ "返回序列 *paths* 中每個路徑名的最長共同子路徑。如果 *paths* 同時包含絕對路徑"
149
+ "和相對路徑、*paths* 位於不同的磁碟機或 *paths* 為空,則引發 \\ :exc:"
150
+ "`ValueError`。與 \\ :func:`commonprefix` \\ 不同,此函數返回的是有效路徑。"
126
151
127
152
#: ../../library/os.path.rst:88 ../../library/os.path.rst:388
128
153
#: ../../library/os.path.rst:400 ../../library/os.path.rst:416
@@ -132,26 +157,32 @@ msgstr ":ref:`適用 <availability>`:Unix、Windows。"
132
157
133
158
#: ../../library/os.path.rst:92
134
159
msgid "Accepts a sequence of :term:`path-like objects <path-like object>`."
135
- msgstr ""
160
+ msgstr "接受一個 \\ :term:`路徑類型物件 <path-like object>` \\ 的序列。 "
136
161
137
162
#: ../../library/os.path.rst:98
138
163
msgid ""
139
164
"Return the longest path prefix (taken character-by-character) that is a "
140
165
"prefix of all paths in *list*. If *list* is empty, return the empty string "
141
166
"(``''``)."
142
167
msgstr ""
168
+ "返回 *list* 中所有路徑的最長路徑前綴(逐字元比較)。如果 *list* 為空,則返回"
169
+ "空字串(``''``)。"
143
170
144
171
#: ../../library/os.path.rst:104
145
172
msgid ""
146
173
"This function may return invalid paths because it works a character at a "
147
174
"time. To obtain a valid path, see :func:`commonpath`."
148
175
msgstr ""
176
+ "由於此函數是逐字符比較,因此可能會返回無效的路徑。若要獲得有效的路徑,請參考 "
177
+ "\\ :func:`commonpath` \\ 函數。"
149
178
150
179
#: ../../library/os.path.rst:122
151
180
msgid ""
152
181
"Return the directory name of pathname *path*. This is the first element of "
153
182
"the pair returned by passing *path* to the function :func:`split`."
154
183
msgstr ""
184
+ "返回路徑名 *path* 的目錄名稱。這是將 *path* 傳遞給函數 \\ :func:`split` \\ 後"
185
+ "返回對結果中的第一個元素。"
155
186
156
187
#: ../../library/os.path.rst:131
157
188
msgid ""
@@ -161,25 +192,35 @@ msgid ""
161
192
"to execute :func:`os.stat` on the requested file, even if the *path* "
162
193
"physically exists."
163
194
msgstr ""
195
+ "返回 \\ ``True``,如果 *path* 是一個存在的路徑或一個開啟的檔案描述符。對於已"
196
+ "損壞的符號連結則返回 \\ ``False``。在某些平台上,即使 *path* 在物理上存在,如"
197
+ "果未被授予執行 \\ :func:`os.stat` \\ 的權限,此函數可能返回 \\ ``False``。"
164
198
165
199
#: ../../library/os.path.rst:137
166
200
msgid ""
167
201
"*path* can now be an integer: ``True`` is returned if it is an open file "
168
202
"descriptor, ``False`` otherwise."
169
203
msgstr ""
204
+ "現在,*path* 可以是一個整數:如果它是一個開啟的檔案描述符,則返回 \\ "
205
+ "``True``;否則返回 \\ ``False``。"
170
206
171
207
#: ../../library/os.path.rst:147
172
208
msgid ""
173
209
"Return ``True`` if *path* refers to an existing path. Returns ``True`` for "
174
210
"broken symbolic links. Equivalent to :func:`exists` on platforms lacking :"
175
211
"func:`os.lstat`."
176
212
msgstr ""
213
+ "返回 ``True``,如果 *path* 是一個存在的路徑。對於已損壞的符號連結也返回 \\ "
214
+ "``True``。在缺乏 \\ :func:`os.lstat` \\ 的平台上,與 \\ :func:`exists` \\ 函"
215
+ "數等效。"
177
216
178
217
#: ../../library/os.path.rst:159
179
218
msgid ""
180
219
"On Unix and Windows, return the argument with an initial component of ``~`` "
181
220
"or ``~user`` replaced by that *user*'s home directory."
182
221
msgstr ""
222
+ "在 Unix 和 Windows 上,將引數中以 \\ ``~`` \\ 或 \\ ``~user`` \\ 開頭的部分"
223
+ "替換為該 *user* 的家目錄。"
183
224
184
225
#: ../../library/os.path.rst:164
185
226
msgid ""
@@ -188,6 +229,9 @@ msgid ""
188
229
"up in the password directory through the built-in module :mod:`pwd`. An "
189
230
"initial ``~user`` is looked up directly in the password directory."
190
231
msgstr ""
232
+ "在 Unix 上,如果環境變數 \\ :envvar:`HOME` \\ 被設置,則將初始的 \\ ``~`` \\ "
233
+ "替換為該變數的值;否則將使用內建模組 \\ :mod:`pwd` \\ 在密碼目錄中查找當前使"
234
+ "用者的家目錄。對於初始的 \\ ``~user``,直接在密碼目錄中查找該使用者的家目錄。"
191
235
192
236
#: ../../library/os.path.rst:169
193
237
msgid ""
@@ -197,16 +241,21 @@ msgid ""
197
241
"of the current user's home directory matches :envvar:`USERNAME`, and "
198
242
"replacing it if so."
199
243
msgstr ""
244
+ "在 Windows 上,如果 \\ :envvar:`USERPROFILE` \\ 被設置,則使用該變數的值;否"
245
+ "則將結合 \\ :envvar:`HOMEPATH` \\ 和 \\ :envvar:`HOMEDRIVE`。對於初始的 \\ "
246
+ "``~user``,會檢查當前使用者的家目錄的最後一個目錄元件是否與 \\ :envvar:"
247
+ "`USERNAME` \\ 相符,如果相符則替換它。"
200
248
201
249
#: ../../library/os.path.rst:174
202
250
msgid ""
203
251
"If the expansion fails or if the path does not begin with a tilde, the path "
204
252
"is returned unchanged."
205
253
msgstr ""
254
+ "如果展開失敗或路徑不以波浪符號(tilde)開頭,則返回原始路徑,不做任何變更。"
206
255
207
256
#: ../../library/os.path.rst:180
208
257
msgid "No longer uses :envvar:`HOME` on Windows."
209
- msgstr ""
258
+ msgstr "在 Windows 上不再使用 \\ :envvar:`HOME` \\ 變數。 "
210
259
211
260
#: ../../library/os.path.rst:189
212
261
msgid ""
0 commit comments