@@ -372,45 +372,58 @@ msgid ""
372
372
"customize environment creation according to their needs, the :class:"
373
373
"`EnvBuilder` class."
374
374
msgstr ""
375
+ "上述提到的高階 method(方法)透過簡單的 API 使用, 為第三方虛擬環境建立者"
376
+ "提供可以依據他們需求來建立環境的客製化機制: :class:`EnvBuilder` "
377
+ "class。"
375
378
376
379
#: ../../library/venv.rst:148
377
380
msgid ""
378
381
"The :class:`EnvBuilder` class accepts the following keyword arguments on "
379
382
"instantiation:"
380
- msgstr ""
383
+ msgstr "進行實例化時,class :class:`EnvBuilder` 接受下列的關鍵字引數: "
381
384
382
385
#: ../../library/venv.rst:151
383
386
msgid ""
384
387
"``system_site_packages`` -- a Boolean value indicating that the system "
385
388
"Python site-packages should be available to the environment (defaults to "
386
389
"``False``)."
387
390
msgstr ""
391
+ "``system_site_packages`` -- 為一個 Boolean (布林值),並表明系統的 Python "
392
+ "site-packages 是否可以在環境中可用(預設為 ``False`` )。"
388
393
389
394
#: ../../library/venv.rst:154
390
395
msgid ""
391
396
"``clear`` -- a Boolean value which, if true, will delete the contents of any "
392
397
"existing target directory, before creating the environment."
393
398
msgstr ""
399
+ "``clear`` -- 為一個 Boolean,如果為 true,則在建立環境之前,刪除目"
400
+ "標目錄內所有存在的內容。"
394
401
395
402
#: ../../library/venv.rst:157
396
403
msgid ""
397
404
"``symlinks`` -- a Boolean value indicating whether to attempt to symlink the "
398
405
"Python binary rather than copying."
399
406
msgstr ""
407
+ "``symlinks`` -- 為一個 Boolean,並表明是否嘗試與 Python 二進位檔案建"
408
+ "立符號連結而不是複製該檔案。"
400
409
401
410
#: ../../library/venv.rst:160
402
411
msgid ""
403
412
"``upgrade`` -- a Boolean value which, if true, will upgrade an existing "
404
413
"environment with the running Python - for use when that Python has been "
405
414
"upgraded in-place (defaults to ``False``)."
406
415
msgstr ""
416
+ "``upgrade`` -- 為一個 Boolean,若為 true,則會在執行 Python 時為現"
417
+ "有的環境進行升級。目的是讓 Python 可以升級到位(預設為 ``False``)。"
407
418
408
419
#: ../../library/venv.rst:164
409
420
msgid ""
410
421
"``with_pip`` -- a Boolean value which, if true, ensures pip is installed in "
411
422
"the virtual environment. This uses :mod:`ensurepip` with the ``--default-"
412
423
"pip`` option."
413
424
msgstr ""
425
+ "``with_pip`` -- 為一個 Boolean,若為 true,則確保 pip 有安裝至虛擬"
426
+ "環境之中。當有 ``--default-pip`` 的選項時,會使用 :mod:`ensurepip`。"
414
427
415
428
#: ../../library/venv.rst:168
416
429
msgid ""
@@ -419,10 +432,13 @@ msgid ""
419
432
"used). If the special string ``\" .\" `` is provided, the basename of the "
420
433
"current directory is used as the prompt."
421
434
msgstr ""
435
+ "``prompt`` -- 為一個 String(字串),該字串會在虛擬環境啟動時被使用。(預設"
436
+ "為 ``None``,代表該環境的目錄名稱會被使用)倘若出現特殊字串 ``\" .\" `` ,則當"
437
+ "前目錄的 basename 會做為提示路徑使用。"
422
438
423
439
#: ../../library/venv.rst:173
424
440
msgid "``upgrade_deps`` -- Update the base venv modules to the latest on PyPI"
425
- msgstr ""
441
+ msgstr "``upgrade_deps`` -- 更新基礎 venv 模組至 PyPI 的最新版本 "
426
442
427
443
#: ../../library/venv.rst:175 ../../library/venv.rst:350
428
444
msgid "Added the ``with_pip`` parameter"
@@ -441,10 +457,12 @@ msgid ""
441
457
"Creators of third-party virtual environment tools will be free to use the "
442
458
"provided :class:`EnvBuilder` class as a base class."
443
459
msgstr ""
460
+ "第三方虛擬環境工具的建立者可以自由地使用 :class:`EnvBuilder` class 作"
461
+ "為 base class(基底類別)使用."
444
462
445
463
#: ../../library/venv.rst:187
446
464
msgid "The returned env-builder is an object which has a method, ``create``:"
447
- msgstr ""
465
+ msgstr "回傳的 env-builder 為一個物件,且帶有一個 method ``create``: "
448
466
449
467
#: ../../library/venv.rst:191
450
468
msgid ""
@@ -453,19 +471,28 @@ msgid ""
453
471
"environment. The ``create`` method will either create the environment in "
454
472
"the specified directory, or raise an appropriate exception."
455
473
msgstr ""
474
+ "透過指定將會容納虛擬環境的目標目錄來建立一個虛擬環境(絕對路徑或"
475
+ "相對路徑到該目錄),也就是在該目錄中容納虛擬環境。"
476
+ "``create`` method 將會在指定的目錄下建立環境,或是觸發"
477
+ "適當的例外。"
456
478
457
479
#: ../../library/venv.rst:197
458
480
msgid ""
459
481
"The ``create`` method of the :class:`EnvBuilder` class illustrates the hooks "
460
482
"available for subclass customization::"
461
483
msgstr ""
484
+ ":class:`EnvBuilder` class 的 ``create`` method 會闡述可用的 "
485
+ "Hooks 以客製化 subclass (子類別)::"
462
486
463
487
#: ../../library/venv.rst:212
464
488
msgid ""
465
489
"Each of the methods :meth:`ensure_directories`, :meth:"
466
490
"`create_configuration`, :meth:`setup_python`, :meth:`setup_scripts` and :"
467
491
"meth:`post_setup` can be overridden."
468
492
msgstr ""
493
+ "每個 methods :meth:`ensure_directories`、:meth:"
494
+ "`create_configuration`、:meth:`setup_python`、:meth:`setup_scripts` 及 :meth:"
495
+ "`post_setup` 都可以被覆寫。"
469
496
470
497
#: ../../library/venv.rst:218
471
498
msgid ""
@@ -476,13 +503,17 @@ msgid ""
476
503
"of the environment directory will be cleared and then all necessary "
477
504
"subdirectories will be recreated."
478
505
msgstr ""
506
+ "建立還不存在的環境目錄及必要的子目錄,並回傳一個情境物件(context object)。這個情境物件"
507
+ "只是一個屬性 (例如:路徑) 的所有者,可被其他 method 使用。如"
508
+ "果 :class:`EnvBuilder` 已被建立且帶有 ``clear=True`` 的引數,該環境目錄下的內"
509
+ "容將被清空,以及所有必要的子目錄將被重新建立。"
479
510
480
511
#: ../../library/venv.rst:225
481
512
msgid ""
482
513
"The returned context object is a :class:`types.SimpleNamespace` with the "
483
514
"following attributes:"
484
515
msgstr ""
485
- "回傳的內容物件 (context object)其型別會是 :class:`types.SimpleNamespace`,"
516
+ "回傳的情境物件 (context object)其型別會是 :class:`types.SimpleNamespace`,"
486
517
"並包含以下屬性:"
487
518
488
519
#: ../../library/venv.rst:228
0 commit comments