Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3b90a37

Browse files
authored
feat(library/tempfile): translate new strings from 3.12 (#626)
1 parent78f3579 commit3b90a37

File tree

1 file changed

+50
-16
lines changed

1 file changed

+50
-16
lines changed

‎library/tempfile.po‎

Lines changed: 50 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
# SOME DESCRIPTIVE TITLE.
2-
# Copyright (C) 2001-2022, Python Software Foundation
1+
# Copyright (C) 2001-2023, Python Software Foundation
32
# This file is distributed under the same license as the Python package.
43
#
54
# Translators:
65
# Adrian Liaw <adrianliaw2000@gmail.com>, 2018
7-
# Matt Wang <mattwang44@gmail.com>, 2021-2022
6+
# Matt Wang <mattwang44@gmail.com>, 2021-2023
87
msgid ""
98
msgstr ""
109
"Project-Id-Version:Python 3.12\n"
@@ -74,11 +73,12 @@ msgid ""
7473
"rely on a temporary file created using this function having or not having a "
7574
"visible name in the file system."
7675
msgstr""
77-
"回傳一個可當作臨時儲存區域的 :term:`file-like object`。建立該檔案使用了與 :"
78-
"func:`mkstemp` 相同的安全規則。它將在關閉(包括當物件被垃圾回收 (garbage "
79-
"collect) 時的隱式關閉)後立即銷毀。在 Unix 下,該檔案所在的目錄可能根本不被建"
80-
"立、或者在建立檔案後立即就被刪除,其他平臺不支援此功能;你的程式不應依賴使用"
81-
"此功能建立的臨時檔案名稱,因為它在檔案系統中的名稱有可能是不可見的。"
76+
"回傳一個可當作臨時儲存區域的\\ :term:`類檔案物件 <file-like object>`。建立該"
77+
"檔案使用了與 :func:`mkstemp` 相同的安全規則。它將在關閉(包括當物件被垃圾回"
78+
"收 (garbage collect) 時的隱式關閉)後立即銷毀。在 Unix 下,該檔案所在的目錄可"
79+
"能根本不被建立、或者在建立檔案後立即就被刪除,其他平臺不支援此功能;你的程式"
80+
"不應依賴使用此功能建立的臨時檔案名稱,因為它在檔案系統中的名稱有可能是不可見"
81+
"的。"
8282

8383
#:../../library/tempfile.rst:44
8484
msgid""
@@ -156,20 +156,22 @@ msgstr "新增 *errors* 參數。"
156156
msgid""
157157
"This function operates exactly as :func:`TemporaryFile` does, except the "
158158
"following differences:"
159-
msgstr""
159+
msgstr"此函式的操作與 :func:`TemporaryFile` 完全相同,但存在以下差異:"
160160

161161
#:../../library/tempfile.rst:83
162162
msgid""
163163
"This function returns a file that is guaranteed to have a visible name in "
164164
"the file system."
165-
msgstr""
165+
msgstr"此函式回傳一個保證在檔案系統中具有可見名稱的檔案。"
166166

167167
#:../../library/tempfile.rst:85
168168
msgid""
169169
"To manage the named file, it extends the parameters of :func:`TemporaryFile` "
170170
"with *delete* and *delete_on_close* parameters that determine whether and "
171171
"how the named file should be automatically deleted."
172172
msgstr""
173+
"為了管理指定檔案,它使用 *delete* 和 *delete_on_close* 參數擴充 :func:"
174+
"`TemporaryFile` 來指定是否以及如何自動刪除指定檔案。"
173175

174176
#:../../library/tempfile.rst:89
175177
msgid""
@@ -181,6 +183,11 @@ msgid ""
181183
"`TemporaryFile`, the directory entry does not get unlinked immediately after "
182184
"the file creation."
183185
msgstr""
186+
"回傳的物件始終是一個\\ :term:`類檔案物件 <file-like object>`,其 :attr:`!"
187+
"file` 屬性是底層的真實檔案物件。這個\\ :term:`類檔案物件 <file-like "
188+
"object>`\\ 可以在 :keyword:`with` 陳述式中使用,就像普通檔案一樣。臨時檔案的"
189+
"名稱可以從回傳的類檔案物件的 :attr:`name` 屬性中取得。在 Unix 上則與 :func:"
190+
"`TemporaryFile` 不同,目錄條目不會在檔案建立後立即被取消鏈接 (unlink)。"
184191

185192
#:../../library/tempfile.rst:97
186193
msgid""
@@ -191,6 +198,12 @@ msgid ""
191198
"not always guaranteed in this case (see :meth:`object.__del__`). If *delete* "
192199
"is false, the value of *delete_on_close* is ignored."
193200
msgstr""
201+
"如果 *delete* 為 true(預設值)並且 *delete_on_close* 為 true(預設值),則檔"
202+
"案在關閉後會立即被刪除。如果 *delete* 為 true 並且 *delete_on_close* 為 "
203+
"false,則僅在情境管理器退出時刪除檔案,或者在\\ :term:`類檔案物件 <file-like "
204+
"object>`\\ 完結時刪除檔案。在這種情況下,並不總是保證能成功刪除(請參閱 :"
205+
"meth:`object.__del__`\\ )。如果 *delete* 為 false,則會忽略 "
206+
"*delete_on_close* 的值。"
194207

195208
#:../../library/tempfile.rst:104
196209
msgid""
@@ -201,32 +214,38 @@ msgid ""
201214
"false. The latter approach is recommended as it provides assistance in "
202215
"automatic cleaning of the temporary file upon the context manager exit."
203216
msgstr""
217+
"因此,要在關閉檔案後使用臨時檔案的名稱重新打開檔案,請確保在關閉時不刪除檔案"
218+
"(將 *delete* 參數設定為 false),或者如果臨時檔案是以 :keyword:`with` 陳述式"
219+
"建立,要將 *delete_on_close* 參數設定為 false。建議使用後者,因為它有助於在情"
220+
"境管理器退出時自動清理臨時檔案。"
204221

205222
#:../../library/tempfile.rst:111
206223
msgid""
207224
"Opening the temporary file again by its name while it is still open works as "
208225
"follows:"
209-
msgstr""
226+
msgstr"在臨時檔案仍處於打開狀態時再次按其名稱打開它,其作用方式如下:"
210227

211228
#:../../library/tempfile.rst:114
212229
msgid"On POSIX the file can always be opened again."
213-
msgstr""
230+
msgstr"在 POSIX 上,檔案始終可以再次打開。"
214231

215232
#:../../library/tempfile.rst:115
216233
msgid""
217234
"On Windows, make sure that at least one of the following conditions are "
218235
"fulfilled:"
219-
msgstr""
236+
msgstr"在 Windows 上,確保至少滿足以下條件之一:"
220237

221238
#:../../library/tempfile.rst:118
222239
msgid"*delete* is false"
223-
msgstr""
240+
msgstr"*delete* 為 false"
224241

225242
#:../../library/tempfile.rst:119
226243
msgid""
227244
"additional open shares delete access (e.g. by calling :func:`os.open` with "
228245
"the flag ``O_TEMPORARY``)"
229246
msgstr""
247+
"額外的 open 會共享刪除存取權限(例如,通過使用旗標 ``O_TEMPORARY`` 來呼叫 :"
248+
"func:`os.open`\\ )"
230249

231250
#:../../library/tempfile.rst:121
232251
msgid""
@@ -236,6 +255,10 @@ msgid ""
236255
"func:`os.unlink` call on context manager exit will fail with a :exc:"
237256
"`PermissionError`."
238257
msgstr""
258+
"*delete* 為 true 但 *delete_on_close* 為 false。請注意,在這種情況下不共享刪"
259+
"除存取權限的其他 open(例如透過內建的 :func:`open` 建立)必須在退出情境管理器"
260+
"之前關閉,否則情境管理器上的 :func:`os.unlink` 呼叫退出將失敗並出現 :exc:"
261+
"`PermissionError`。"
239262

240263
#:../../library/tempfile.rst:127
241264
msgid""
@@ -246,12 +269,18 @@ msgid ""
246269
"requested by the open, which fails immediately if the requested access is "
247270
"not granted."
248271
msgstr""
272+
"在 Windows 上,如果 *delete_on_close* 為 false,並且檔案是在使用者缺乏刪除存"
273+
"取權限的目錄中建立的,則情境管理器退出時的 :func:`os.unlink` 呼叫將失敗,並引"
274+
"發 :exc:`PermissionError`。當 *delete_on_close* 為 true 時,不會發生這種情"
275+
"況,因為刪除存取權限是由 open 來要求的,如果未授予存取權限則會立即失敗。"
249276

250277
#:../../library/tempfile.rst:134
251278
msgid""
252279
"On POSIX (only), a process that is terminated abruptly with SIGKILL cannot "
253280
"automatically delete any NamedTemporaryFiles it created."
254281
msgstr""
282+
"(僅)在 POSIX 上,因使用 SIGKILL 而被終止的行程無法自動刪除它建立的任何 "
283+
"NamedTemporaryFiles。"
255284

256285
#:../../library/tempfile.rst:142
257286
msgid"Added *delete_on_close* parameter."
@@ -299,6 +328,8 @@ msgid ""
299328
"abstract base classes (depending on whether binary or text *mode* was "
300329
"specified)."
301330
msgstr""
331+
"完全實作 :class:`io.BufferedIOBase` 和 :class:`io.TextIOBase` 抽象基底類別"
332+
"(取決於指定的是二進位還是文本 *mode*\\ )。"
302333

303334
#:../../library/tempfile.rst:178
304335
msgid""
@@ -349,6 +380,9 @@ msgid ""
349380
"during debugging or when you need your cleanup behavior to be conditional "
350381
"based on other logic."
351382
msgstr""
383+
"*delete* 參數可以停用在退出情境時對目錄樹的清理,雖然停用情境管理器在退出情境"
384+
"時所採取的操作似乎不常見,但它在除錯期間或當你需要基於其他邏輯的清理行為時會"
385+
"非常有用。"
352386

353387
#:../../library/tempfile.rst:204../../library/tempfile.rst:284
354388
msgid""
@@ -494,13 +528,13 @@ msgstr ""
494528

495529
#:../../library/tempfile.rst:282
496530
msgid":func:`mkdtemp` returns the absolute pathname of the new directory."
497-
msgstr""
531+
msgstr":func:`mkdtemp` 回傳新目錄的絕對路徑名稱。"
498532

499533
#:../../library/tempfile.rst:295
500534
msgid""
501535
":func:`mkdtemp` now always returns an absolute path, even if *dir* is "
502536
"relative."
503-
msgstr""
537+
msgstr":func:`mkdtemp` 現在都會回傳絕對路徑,即使 *dir* 是相對路徑。"
504538

505539
#:../../library/tempfile.rst:301
506540
msgid""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp