Skip to content

Commit 510713a

Browse files
sync with cpython 686b543e
1 parent c49658d commit 510713a

5 files changed

Lines changed: 895 additions & 420 deletions

File tree

library/mimetypes.po

Lines changed: 43 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: Python 3.14\n"
88
"Report-Msgid-Bugs-To: \n"
9-
"POT-Creation-Date: 2026-07-19 00:28+0000\n"
9+
"POT-Creation-Date: 2026-08-31 00:22+0000\n"
1010
"PO-Revision-Date: 2016-11-19 00:32+0000\n"
1111
"Last-Translator: Liang-Bo Wang <me@liang2.tw>\n"
1212
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -175,7 +175,7 @@ msgid ""
175175
"extensions."
176176
msgstr ""
177177

178-
#: ../../library/mimetypes.rst:136 ../../library/mimetypes.rst:310
178+
#: ../../library/mimetypes.rst:136 ../../library/mimetypes.rst:312
179179
msgid ""
180180
"When *strict* is ``True`` (the default), the mapping will be added to the "
181181
"official MIME types, otherwise to the non-standard ones."
@@ -258,11 +258,12 @@ msgstr ""
258258
#: ../../library/mimetypes.rst:205
259259
msgid ""
260260
"This class represents a MIME-types database. By default, it provides access "
261-
"to the same database as the rest of this module. The initial database is a "
262-
"copy of that provided by the module, and may be extended by loading "
263-
"additional :file:`mime.types`\\ -style files into the database using the :"
264-
"meth:`read` or :meth:`readfp` methods. The mapping dictionaries may also be "
265-
"cleared before loading additional data if the default data is not desired."
261+
"to the same database as the rest of this module. The initial database is "
262+
"created from Python's built-in MIME type tables. It may be extended by "
263+
"loading additional :file:`mime.types`\\ -style files into the database using "
264+
"the :meth:`read` or :meth:`readfp` methods. The mapping dictionaries may "
265+
"also be cleared before loading additional data if the default data is not "
266+
"desired."
266267
msgstr ""
267268

268269
#: ../../library/mimetypes.rst:212
@@ -276,155 +277,157 @@ msgid ""
276277
"Dictionary mapping suffixes to suffixes. This is used to allow recognition "
277278
"of encoded files for which the encoding and the type are indicated by the "
278279
"same extension. For example, the :file:`.tgz` extension is mapped to :file:"
279-
"`.tar.gz` to allow the encoding and type to be recognized separately. This "
280-
"is initially a copy of the global :data:`suffix_map` defined in the module."
280+
"`.tar.gz` to allow the encoding and type to be recognized separately. This "
281+
"is initialized with some predefined values."
281282
msgstr ""
282283

283284
#: ../../library/mimetypes.rst:227
284285
msgid ""
285-
"Dictionary mapping filename extensions to encoding types. This is initially "
286-
"a copy of the global :data:`encodings_map` defined in the module."
286+
"Dictionary mapping filename extensions to encoding types. This is "
287+
"initialized with some predefined values."
287288
msgstr ""
288289

289290
#: ../../library/mimetypes.rst:233
290291
msgid ""
291292
"Tuple containing two dictionaries, mapping filename extensions to MIME "
292293
"types: the first dictionary is for the non-standards types and the second "
293-
"one is for the standard types. They are initialized by :data:`common_types` "
294-
"and :data:`types_map`."
294+
"one is for the standard types. They are initialized with some predefined "
295+
"values and MIME type information loaded from files specified by the "
296+
"*filenames* argument."
295297
msgstr ""
296298

297-
#: ../../library/mimetypes.rst:241
299+
#: ../../library/mimetypes.rst:242
298300
msgid ""
299301
"Tuple containing two dictionaries, mapping MIME types to a list of filename "
300302
"extensions: the first dictionary is for the non-standards types and the "
301-
"second one is for the standard types. They are initialized by :data:"
302-
"`common_types` and :data:`types_map`."
303+
"second one is for the standard types. They are initialized with some "
304+
"predefined values and MIME type information loaded from files specified by "
305+
"the *filenames* argument."
303306
msgstr ""
304307

305-
#: ../../library/mimetypes.rst:249
308+
#: ../../library/mimetypes.rst:251
306309
msgid ""
307310
"Similar to the :func:`guess_extension` function, using the tables stored as "
308311
"part of the object."
309312
msgstr ""
310313

311-
#: ../../library/mimetypes.rst:255
314+
#: ../../library/mimetypes.rst:257
312315
msgid ""
313316
"Similar to the :func:`guess_type` function, using the tables stored as part "
314317
"of the object."
315318
msgstr ""
316319

317-
#: ../../library/mimetypes.rst:261
320+
#: ../../library/mimetypes.rst:263
318321
msgid ""
319322
"Similar to the :func:`guess_file_type` function, using the tables stored as "
320323
"part of the object."
321324
msgstr ""
322325

323-
#: ../../library/mimetypes.rst:269
326+
#: ../../library/mimetypes.rst:271
324327
msgid ""
325328
"Similar to the :func:`guess_all_extensions` function, using the tables "
326329
"stored as part of the object."
327330
msgstr ""
328331

329-
#: ../../library/mimetypes.rst:275
332+
#: ../../library/mimetypes.rst:277
330333
msgid ""
331334
"Load MIME information from a file named *filename*. This uses :meth:"
332335
"`readfp` to parse the file."
333336
msgstr ""
334337

335-
#: ../../library/mimetypes.rst:278
338+
#: ../../library/mimetypes.rst:280
336339
msgid ""
337340
"If *strict* is ``True``, information will be added to list of standard "
338341
"types, else to the list of non-standard types."
339342
msgstr ""
340343

341-
#: ../../library/mimetypes.rst:284
344+
#: ../../library/mimetypes.rst:286
342345
msgid ""
343346
"Load MIME type information from an open file *fp*. The file must have the "
344347
"format of the standard :file:`mime.types` files."
345348
msgstr ""
346349

347-
#: ../../library/mimetypes.rst:287 ../../library/mimetypes.rst:297
350+
#: ../../library/mimetypes.rst:289 ../../library/mimetypes.rst:299
348351
msgid ""
349352
"If *strict* is ``True``, information will be added to the list of standard "
350353
"types, else to the list of non-standard types."
351354
msgstr ""
352355

353-
#: ../../library/mimetypes.rst:293
356+
#: ../../library/mimetypes.rst:295
354357
msgid "Load MIME type information from the Windows registry."
355358
msgstr ""
356359

357-
#: ../../library/mimetypes.rst:295
360+
#: ../../library/mimetypes.rst:297
358361
msgid "Availability"
359362
msgstr "可用性"
360363

361-
#: ../../library/mimetypes.rst:305
364+
#: ../../library/mimetypes.rst:307
362365
msgid ""
363366
"Add a mapping from the MIME type *type* to the extension *ext*. Valid "
364367
"extensions start with a '.' or are empty. When the extension is already "
365368
"known, the new type will replace the old one. When the type is already known "
366369
"the extension will be added to the list of known extensions."
367370
msgstr ""
368371

369-
#: ../../library/mimetypes.rst:313
372+
#: ../../library/mimetypes.rst:315
370373
msgid ""
371374
"Invalid, undotted extensions will raise a :exc:`ValueError` in Python 3.16."
372375
msgstr ""
373376

374-
#: ../../library/mimetypes.rst:321
377+
#: ../../library/mimetypes.rst:323
375378
msgid "Command-line usage"
376379
msgstr "命令列用法"
377380

378-
#: ../../library/mimetypes.rst:323
381+
#: ../../library/mimetypes.rst:325
379382
msgid ""
380383
"The :mod:`!mimetypes` module can be executed as a script from the command "
381384
"line."
382385
msgstr ""
383386

384-
#: ../../library/mimetypes.rst:325
387+
#: ../../library/mimetypes.rst:327
385388
msgid "python -m mimetypes [-h] [-e] [-l] type [type ...]"
386389
msgstr "python -m mimetypes [-h] [-e] [-l] type [type ...]"
387390

388-
#: ../../library/mimetypes.rst:329
391+
#: ../../library/mimetypes.rst:331
389392
msgid "The following options are accepted:"
390393
msgstr ""
391394

392-
#: ../../library/mimetypes.rst:336
395+
#: ../../library/mimetypes.rst:338
393396
msgid "Show the help message and exit."
394397
msgstr ""
395398

396-
#: ../../library/mimetypes.rst:341
399+
#: ../../library/mimetypes.rst:343
397400
msgid "Guess extension instead of type."
398401
msgstr ""
399402

400-
#: ../../library/mimetypes.rst:346
403+
#: ../../library/mimetypes.rst:348
401404
msgid "Additionally search for some common, but non-standard types."
402405
msgstr ""
403406

404-
#: ../../library/mimetypes.rst:348
407+
#: ../../library/mimetypes.rst:350
405408
msgid ""
406409
"By default the script converts MIME types to file extensions. However, if "
407410
"``--extension`` is specified, it converts file extensions to MIME types."
408411
msgstr ""
409412

410-
#: ../../library/mimetypes.rst:352
413+
#: ../../library/mimetypes.rst:354
411414
msgid ""
412415
"For each ``type`` entry, the script writes a line into the standard output "
413416
"stream. If an unknown type occurs, it writes an error message into the "
414417
"standard output stream and exits with the return code ``1``."
415418
msgstr ""
416419

417-
#: ../../library/mimetypes.rst:360
420+
#: ../../library/mimetypes.rst:362
418421
msgid "Command-line example"
419422
msgstr ""
420423

421-
#: ../../library/mimetypes.rst:362
424+
#: ../../library/mimetypes.rst:364
422425
msgid ""
423426
"Here are some examples of typical usage of the :mod:`!mimetypes` command-"
424427
"line interface:"
425428
msgstr ""
426429

427-
#: ../../library/mimetypes.rst:365
430+
#: ../../library/mimetypes.rst:367
428431
msgid ""
429432
"$ # get a MIME type by a file name\n"
430433
"$ python -m mimetypes filename.png\n"

library/site.po

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: Python 3.14\n"
88
"Report-Msgid-Bugs-To: \n"
9-
"POT-Creation-Date: 2026-08-14 00:20+0000\n"
9+
"POT-Creation-Date: 2026-08-31 00:22+0000\n"
1010
"PO-Revision-Date: 2018-05-23 16:10+0000\n"
1111
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1212
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -299,83 +299,84 @@ msgstr ""
299299

300300
#: ../../library/site.rst:248
301301
msgid ""
302-
"For each directory present in *prefixes* (or :data:`PREFIXES` if *prefixes* "
303-
"is ``None``), this function will find its site-packages subdirectory "
304-
"depending on the system environment, and will return a list of full paths."
302+
"For each directory given in *prefixes* (or :data:`PREFIXES` if *prefixes* is "
303+
"``None``), this function will compute its site-packages subdirectory "
304+
"depending on the system environment, and will return a list of full paths, "
305+
"which are not checked for existence."
305306
msgstr ""
306307

307-
#: ../../library/site.rst:254
308+
#: ../../library/site.rst:255
308309
msgid "Added the optional *prefixes* parameter."
309310
msgstr ""
310311

311-
#: ../../library/site.rst:260
312+
#: ../../library/site.rst:261
312313
msgid ""
313314
"Return the path of the user base directory, :data:`USER_BASE`. If it is not "
314315
"initialized yet, this function will also set it, respecting :envvar:"
315316
"`PYTHONUSERBASE`."
316317
msgstr ""
317318

318-
#: ../../library/site.rst:269
319+
#: ../../library/site.rst:270
319320
msgid ""
320321
"Return the path of the user-specific site-packages directory, :data:"
321322
"`USER_SITE`. If it is not initialized yet, this function will also set it, "
322323
"respecting :data:`USER_BASE`. To determine if the user-specific site-"
323324
"packages was added to ``sys.path`` :data:`ENABLE_USER_SITE` should be used."
324325
msgstr ""
325326

326-
#: ../../library/site.rst:281
327+
#: ../../library/site.rst:282
327328
msgid "Command-line interface"
328329
msgstr "命令列介面"
329330

330-
#: ../../library/site.rst:285
331+
#: ../../library/site.rst:286
331332
msgid ""
332333
"The :mod:`!site` module also provides a way to get the user directories from "
333334
"the command line:"
334335
msgstr ""
335336

336-
#: ../../library/site.rst:288
337+
#: ../../library/site.rst:289
337338
msgid ""
338339
"$ python -m site --user-site\n"
339340
"/home/user/.local/lib/python3.11/site-packages"
340341
msgstr ""
341342
"$ python -m site --user-site\n"
342343
"/home/user/.local/lib/python3.11/site-packages"
343344

344-
#: ../../library/site.rst:293
345+
#: ../../library/site.rst:294
345346
msgid ""
346347
"If it is called without arguments, it will print the contents of :data:`sys."
347348
"path` on the standard output, followed by the value of :data:`USER_BASE` and "
348349
"whether the directory exists, then the same thing for :data:`USER_SITE`, and "
349350
"finally the value of :data:`ENABLE_USER_SITE`."
350351
msgstr ""
351352

352-
#: ../../library/site.rst:300
353+
#: ../../library/site.rst:301
353354
msgid "Print the path to the user base directory."
354355
msgstr ""
355356

356-
#: ../../library/site.rst:304
357+
#: ../../library/site.rst:305
357358
msgid "Print the path to the user site-packages directory."
358359
msgstr ""
359360

360-
#: ../../library/site.rst:306
361+
#: ../../library/site.rst:307
361362
msgid ""
362363
"If both options are given, user base and user site will be printed (always "
363364
"in this order), separated by :data:`os.pathsep`."
364365
msgstr ""
365366

366-
#: ../../library/site.rst:309
367+
#: ../../library/site.rst:310
367368
msgid ""
368369
"If any option is given, the script will exit with one of these values: ``0`` "
369370
"if the user site-packages directory is enabled, ``1`` if it was disabled by "
370371
"the user, ``2`` if it is disabled for security reasons or by an "
371372
"administrator, and a value greater than 2 if there is an error."
372373
msgstr ""
373374

374-
#: ../../library/site.rst:316
375+
#: ../../library/site.rst:317
375376
msgid ":pep:`370` -- Per user site-packages directory"
376377
msgstr ""
377378

378-
#: ../../library/site.rst:317
379+
#: ../../library/site.rst:318
379380
msgid ":ref:`sys-path-init` -- The initialization of :data:`sys.path`."
380381
msgstr ":ref:`sys-path-init` -- :data:`sys.path` 的初始化。"
381382

0 commit comments

Comments
 (0)