@@ -8,7 +8,7 @@ msgstr ""
8
8
"Project-Id-Version : Python 3.11\n "
9
9
"Report-Msgid-Bugs-To : \n "
10
10
"POT-Creation-Date : 2023-05-11 00:16+0000\n "
11
- "PO-Revision-Date : 2018-05-23 16:07+0000 \n "
11
+ "PO-Revision-Date : 2023-07-11 01:08+0800 \n "
12
12
"
Last-Translator :
Adrian Liaw <[email protected] >\n "
13
13
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
14
14
"tw)\n "
@@ -17,6 +17,7 @@ msgstr ""
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.1\n "
20
21
21
22
#: ../../library/pathlib.rst:3
22
23
msgid ":mod:`pathlib` --- Object-oriented filesystem paths"
@@ -101,110 +102,153 @@ msgstr ""
101
102
102
103
#: ../../library/pathlib.rst:94
103
104
msgid "Pure paths"
104
- msgstr ""
105
+ msgstr "純路徑 "
105
106
106
107
#: ../../library/pathlib.rst:96
107
108
msgid ""
108
109
"Pure path objects provide path-handling operations which don't actually "
109
110
"access a filesystem. There are three ways to access these classes, which we "
110
111
"also call *flavours*:"
111
112
msgstr ""
113
+ "純路徑物件提供處理路徑的操作,實際上不會存取檔案系統。有三種方法可以存取"
114
+ "這些類別 (class),我們也稱之為\\ *類型*:"
112
115
113
116
#: ../../library/pathlib.rst:102
114
117
msgid ""
115
118
"A generic class that represents the system's path flavour (instantiating it "
116
119
"creates either a :class:`PurePosixPath` or a :class:`PureWindowsPath`)::"
117
120
msgstr ""
121
+ "一個通用的類別,表示系統的路徑類型(實例化時會建立一個 :class:"
122
+ "`PurePosixPath` 或 :class:`PureWindowsPath`):\n"
123
+ "\n"
124
+ "::"
118
125
119
126
#: ../../library/pathlib.rst:108
120
127
msgid ""
121
128
"Each element of *pathsegments* can be either a string representing a path "
122
129
"segment, an object implementing the :class:`os.PathLike` interface which "
123
130
"returns a string, or another path object::"
124
131
msgstr ""
132
+ "*pathsegments* 中的每個元素可以是以下三種的其中一種:一個表示路徑片段的字串、實"
133
+ "作了 :class:`os.PathLike` 介面 (interface) 並回傳字串的物件,或者另一個路徑物"
134
+ "件:\n"
135
+ "\n"
136
+ "::"
125
137
126
138
#: ../../library/pathlib.rst:117
127
139
msgid "When *pathsegments* is empty, the current directory is assumed::"
128
140
msgstr ""
141
+ "當 *pathsegments* 是空的時候,預設使用目前的目錄:\n"
142
+ "\n"
143
+ "::"
129
144
130
145
#: ../../library/pathlib.rst:122
131
146
msgid ""
132
147
"If a segment is an absolute path, all previous segments are ignored (like :"
133
148
"func:`os.path.join`)::"
134
149
msgstr ""
150
+ "如果一個片段是絕對路徑,則所有先前的片段將被忽略(類似於 :func:`os.path."
151
+ "join`):\n"
152
+ "\n"
153
+ "::"
135
154
136
155
#: ../../library/pathlib.rst:130
137
156
msgid ""
138
157
"On Windows, the drive is not reset when a rooted relative path segment (e."
139
158
"g., ``r'\\ foo'``) is encountered::"
140
159
msgstr ""
160
+ "在 Windows 系統上,當遇到具有根目錄的相對路徑片段(例如 ``r'\\ foo'``)時,磁碟"
161
+ "機 (drive) 部分不會被重置:\n"
162
+ "\n"
163
+ "::"
141
164
142
165
#: ../../library/pathlib.rst:136
143
166
msgid ""
144
167
"Spurious slashes and single dots are collapsed, but double dots (``'..'``) "
145
168
"and leading double slashes (``'//'``) are not, since this would change the "
146
169
"meaning of a path for various reasons (e.g. symbolic links, UNC paths)::"
147
170
msgstr ""
171
+ "不必要的斜線和單點會被合併,但雙點 (``'..'``) 和前置的雙斜線 (``'//'``) 不會"
172
+ "被合併,因為這樣會因為各種原因改變路徑的意義(例如符號連結 (symbolic links)、"
173
+ "UNC 路徑):\n"
174
+ "\n"
175
+ "::"
148
176
149
177
#: ../../library/pathlib.rst:149
150
178
msgid ""
151
179
"(a naïve approach would make ``PurePosixPath('foo/../bar')`` equivalent to "
152
180
"``PurePosixPath('bar')``, which is wrong if ``foo`` is a symbolic link to "
153
181
"another directory)"
154
182
msgstr ""
183
+ "(一個使得 ``PurePosixPath('foo/../bar')`` 等同於 ``PurePosixPath('bar')`` "
184
+ "的單純方法,但如果 ``foo`` 是一個目錄的符號連結,這是錯誤的。)"
155
185
156
186
#: ../../library/pathlib.rst:153
157
187
msgid ""
158
188
"Pure path objects implement the :class:`os.PathLike` interface, allowing "
159
189
"them to be used anywhere the interface is accepted."
160
190
msgstr ""
191
+ "純路徑物件實作了 :class:`os.PathLike` 介面,使得它們可以在任何接受該介面的地"
192
+ "方使用。"
161
193
162
194
#: ../../library/pathlib.rst:156
163
195
msgid "Added support for the :class:`os.PathLike` interface."
164
- msgstr ""
196
+ msgstr "新增了對於 :class:`os.PathLike` 介面的支援。 "
165
197
166
198
#: ../../library/pathlib.rst:161
167
199
msgid ""
168
200
"A subclass of :class:`PurePath`, this path flavour represents non-Windows "
169
201
"filesystem paths::"
170
202
msgstr ""
203
+ ":class:`PurePath` 的一個子類別 (subclass),該路徑類型表示非 Windows 檔案系統的"
204
+ "路徑:\n"
205
+ "\n"
206
+ "::"
171
207
172
208
#: ../../library/pathlib.rst:167 ../../library/pathlib.rst:179
173
209
#: ../../library/pathlib.rst:672 ../../library/pathlib.rst:682
174
210
#: ../../library/pathlib.rst:692
175
211
msgid "*pathsegments* is specified similarly to :class:`PurePath`."
176
- msgstr ""
212
+ msgstr "*pathsegments* 的指定方式與 :class:`PurePath` 類似。 "
177
213
178
214
#: ../../library/pathlib.rst:171
179
215
msgid ""
180
216
"A subclass of :class:`PurePath`, this path flavour represents Windows "
181
217
"filesystem paths, including `UNC paths`_::"
182
218
msgstr ""
219
+ ":class:`PurePath` 的一個子類別,該路徑類型表示 Windows 檔案系統的路徑,包括 "
220
+ " `UNC paths`_:\n"
221
+ "\n"
222
+ "::"
183
223
184
224
#: ../../library/pathlib.rst:183
185
225
msgid ""
186
226
"Regardless of the system you're running on, you can instantiate all of these "
187
227
"classes, since they don't provide any operation that does system calls."
188
228
msgstr ""
229
+ "不論你使用的是什麼系統,你都可以實例化這些類別,因為它們不提供任何涉"
230
+ "及系統呼叫 (system calls) 的操作。"
189
231
190
232
#: ../../library/pathlib.rst:188
191
233
msgid "General properties"
192
- msgstr ""
234
+ msgstr "通用特性 "
193
235
194
236
#: ../../library/pathlib.rst:190
195
237
msgid ""
196
238
"Paths are immutable and :term:`hashable`. Paths of a same flavour are "
197
239
"comparable and orderable. These properties respect the flavour's case-"
198
240
"folding semantics::"
199
241
msgstr ""
242
+ "路徑物件是不可變 (immutable) 且 :term:`hashable` (可雜湊)的。相同類型的路"
243
+ "徑物件可以被比較和排序。這些特性遵守該類型的大小寫規則:"
200
244
201
245
#: ../../library/pathlib.rst:203
202
246
msgid "Paths of a different flavour compare unequal and cannot be ordered::"
203
- msgstr ""
247
+ msgstr "不同類型的路徑物件在比較時視為不相等且無法被排序: "
204
248
205
249
#: ../../library/pathlib.rst:214
206
250
msgid "Operators"
207
- msgstr ""
251
+ msgstr "運算子 "
208
252
209
253
#: ../../library/pathlib.rst:216
210
254
msgid ""
@@ -213,12 +257,15 @@ msgid ""
213
257
"the drive is not reset when the argument is a rooted relative path (e.g., "
214
258
"``r'\\ foo'``)::"
215
259
msgstr ""
260
+ "斜線運算子(slash operator)用於建立子路徑,就像是 :func:`os.path.join` 函式"
261
+ "一樣。如果引數是絕對路徑,則忽略前一個路徑。在 Windows 系統上,當引數是以根目"
262
+ "錄為基礎的相對路徑(例如,``r’\\ foo’``),磁碟路徑不會被重置:"
216
263
217
264
#: ../../library/pathlib.rst:234
218
265
msgid ""
219
266
"A path object can be used anywhere an object implementing :class:`os."
220
267
"PathLike` is accepted::"
221
- msgstr ""
268
+ msgstr "路徑物件可以被用在任何可以使用 :class:`os.PathLike` 的地方: "
222
269
223
270
#: ../../library/pathlib.rst:242
224
271
msgid ""
@@ -745,26 +792,37 @@ msgid ""
745
792
"Return the name of the user owning the file. :exc:`KeyError` is raised if "
746
793
"the file's uid isn't found in the system database."
747
794
msgstr ""
795
+ "回傳擁有該檔案的用戶的名稱。如果在系統資料庫中找不到該檔案的 uid ,則會引發 :"
796
+ "exc:`KeyError`。"
748
797
749
798
#: ../../library/pathlib.rst:1014
750
799
msgid "Return the binary contents of the pointed-to file as a bytes object::"
751
800
msgstr ""
801
+ "將指向檔案的二進制內容以一個位元組 (bytes) 物件回傳:\n"
802
+ "\n"
803
+ "::"
752
804
753
805
#: ../../library/pathlib.rst:1027
754
806
msgid "Return the decoded contents of the pointed-to file as a string::"
755
807
msgstr ""
808
+ "將指向檔案的解碼內容以字串形式回傳:\n"
809
+ "\n"
810
+ "::"
756
811
757
812
#: ../../library/pathlib.rst:1035
758
813
msgid ""
759
814
"The file is opened and then closed. The optional parameters have the same "
760
815
"meaning as in :func:`open`."
761
- msgstr ""
816
+ msgstr "該檔案被打開並且隨後關閉。選填參數的含義與 :func:`open` 函數中的相同。 "
762
817
763
818
#: ../../library/pathlib.rst:1043
764
819
msgid ""
765
820
"Return the path to which the symbolic link points (as returned by :func:`os."
766
821
"readlink`)::"
767
822
msgstr ""
823
+ "回傳符號連結指向的路徑(如 :func:`os.readlink` 的回傳值):\n"
824
+ "\n"
825
+ "::"
768
826
769
827
#: ../../library/pathlib.rst:1056
770
828
msgid ""
@@ -774,48 +832,67 @@ msgid ""
774
832
"*target* exists, :exc:`FileExistsError` will be raised. *target* can be "
775
833
"either a string or another path object::"
776
834
msgstr ""
835
+ "將此檔案或目錄重新命名為所提供的 *target* ,並回傳一個新的路徑 (Path) 物件指"
836
+ "向該 *target* 。在 Unix 系統上,若 *target* 存在且為一個檔案,若使用者有權"
837
+ "限,則會在不顯示訊息的情況下進行取代。在 Windows 系統上,若 *target* 存在,則"
838
+ "會引發 :exc:`FileExistsError` 錯誤。*target* 可以是字串或另一個路徑物件:\n"
839
+ "\n"
840
+ "::"
777
841
778
842
#: ../../library/pathlib.rst:1071 ../../library/pathlib.rst:1087
779
843
msgid ""
780
844
"The target path may be absolute or relative. Relative paths are interpreted "
781
845
"relative to the current working directory, *not* the directory of the Path "
782
846
"object."
783
847
msgstr ""
848
+ "目標路徑可以是絕對路徑或相對路徑。相對路徑會相對於當前的工作目錄進行解釋,"
849
+ "*not* 相對於路徑物件所在的目錄。"
784
850
785
851
#: ../../library/pathlib.rst:1075
786
852
msgid ""
787
853
"It is implemented in terms of :func:`os.rename` and gives the same "
788
854
"guarantees."
789
- msgstr ""
855
+ msgstr "此功能是使用 :func:`os.rename` 實現的,並提供相同的保證。 "
790
856
791
857
#: ../../library/pathlib.rst:1077 ../../library/pathlib.rst:1091
792
858
msgid "Added return value, return the new Path instance."
793
- msgstr ""
859
+ msgstr "新增了回傳值,回傳新的路徑 (Path) 物件。 "
794
860
795
861
#: ../../library/pathlib.rst:1083
796
862
msgid ""
797
863
"Rename this file or directory to the given *target*, and return a new Path "
798
864
"instance pointing to *target*. If *target* points to an existing file or "
799
865
"empty directory, it will be unconditionally replaced."
800
866
msgstr ""
867
+ "將此檔案或目錄重新命名為給定的 *target* ,並回傳一個指向 *target* 的新路徑物"
868
+ "件。如果 *target* 指向一個現有的檔案或空目錄,它將被無條件地取代。"
801
869
802
870
#: ../../library/pathlib.rst:1097
803
871
msgid ""
804
872
"Make the path absolute, without normalization or resolving symlinks. Returns "
805
873
"a new path object::"
806
874
msgstr ""
875
+ "使路徑成為絕對路徑,不進行標準化或解析符號連結。 回傳一個新的路徑物件:\n"
876
+ "\n"
877
+ "::"
807
878
808
879
#: ../../library/pathlib.rst:1109
809
880
msgid ""
810
881
"Make the path absolute, resolving any symlinks. A new path object is "
811
882
"returned::"
812
883
msgstr ""
884
+ "將路徑轉換為絕對路徑,解析所有符號連結。回傳一個新的路徑物件:\n"
885
+ "\n"
886
+ "::"
813
887
814
888
#: ../../library/pathlib.rst:1118
815
889
msgid ""
816
890
"\" ``..``\" components are also eliminated (this is the only method to do "
817
891
"so)::"
818
892
msgstr ""
893
+ "同時也會消除 \" ``..``\" 的路徑組件(這是唯一的方法):\n"
894
+ "\n"
895
+ "::"
819
896
820
897
#: ../../library/pathlib.rst:1124
821
898
msgid ""
@@ -825,16 +902,24 @@ msgid ""
825
902
"If an infinite loop is encountered along the resolution path, :exc:"
826
903
"`RuntimeError` is raised."
827
904
msgstr ""
905
+ "如果路徑不存在且 *strict* 為 ``True``, 則引發 :exc:`FileNotFoundError`。如"
906
+ "果 *strict* 為 ``False``, 則將盡可能解析該路徑,並將任何剩餘部分追加到路徑"
907
+ "中,而不檢查其是否存在。 如果在解析過程中遇到無窮迴圈,則引發 :exc:"
908
+ "`RuntimeError`。"
828
909
829
910
#: ../../library/pathlib.rst:1130
830
911
msgid "The *strict* argument (pre-3.6 behavior is strict)."
831
- msgstr ""
912
+ msgstr "*strict* 引數(在 3.6 版本之前的行為是嚴格的)。 "
832
913
833
914
#: ../../library/pathlib.rst:1135
834
915
msgid ""
835
916
"This is like calling :func:`Path.glob` with \" ``**/``\" added in front of "
836
917
"the given relative *pattern*::"
837
918
msgstr ""
919
+ "這相當於在給定的相對 *pattern* 前面加上 \" ``**/``\" 並呼叫 :func:`Path.glob` "
920
+ ":\n"
921
+ "\n"
922
+ "::"
838
923
839
924
#: ../../library/pathlib.rst:1145
840
925
msgid ""
@@ -846,14 +931,17 @@ msgstr ""
846
931
847
932
#: ../../library/pathlib.rst:1153
848
933
msgid "Remove this directory. The directory must be empty."
849
- msgstr ""
934
+ msgstr "移除此目錄。該目錄必須為空。 "
850
935
851
936
#: ../../library/pathlib.rst:1158
852
937
msgid ""
853
938
"Return whether this path points to the same file as *other_path*, which can "
854
939
"be either a Path object, or a string. The semantics are similar to :func:"
855
940
"`os.path.samefile` and :func:`os.path.samestat`."
856
941
msgstr ""
942
+ "回傳是否此路徑指向與 *other_path* 相同的檔案,*other_path* 可以是路徑 (Path) "
943
+ "物件或字串。其語義類似於 :func:`os.path.samefile` 和 :func:`os.path."
944
+ "samestat`。"
857
945
858
946
#: ../../library/pathlib.rst:1162
859
947
msgid ""
0 commit comments