Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#444 Transalte API venv.rst:140 to venv.rst:218 #460

Merged
merged 11 commits into from
Jul 13, 2023
37 changes: 34 additions & 3 deletions library/venv.po
Original file line number Diff line number Diff line change
Expand Up @@ -368,45 +368,58 @@ msgid ""
"customize environment creation according to their needs, the :class:"
"`EnvBuilder` class."
msgstr ""
"將上述提到的高階 method(方法)作為簡單的 API 使用, 可為第三方虛擬環境建立者"
mattwang44 marked this conversation as resolved.
Show resolved Hide resolved
"提供客製化機制, 並依據他們的需求,客製化建立環境: :class:`EnvBuilder` "
mattwang44 marked this conversation as resolved.
Show resolved Hide resolved
"class。"

#: ../../library/venv.rst:148
msgid ""
"The :class:`EnvBuilder` class accepts the following keyword arguments on "
"instantiation:"
msgstr ""
msgstr "進行實例化時,class :class:`EnvBuilder` 接受下列的關鍵字引數:"

#: ../../library/venv.rst:151
msgid ""
"``system_site_packages`` -- a Boolean value indicating that the system "
"Python site-packages should be available to the environment (defaults to "
"``False``)."
msgstr ""
"``system_site_packages`` -- 為一個 Boolean (布林值),並表明系統的 Python "
"site-packages 是否可以在環境中可用(預設為 ``False``)。"

#: ../../library/venv.rst:154
msgid ""
"``clear`` -- a Boolean value which, if true, will delete the contents of any "
"existing target directory, before creating the environment."
msgstr ""
"``clear`` -- 為一個 Boolean,如果為 true,則在建立環境之前,刪除目"
"標目錄內所有存在的內容。"

#: ../../library/venv.rst:157
msgid ""
"``symlinks`` -- a Boolean value indicating whether to attempt to symlink the "
"Python binary rather than copying."
msgstr ""
"``symlinks`` -- 為一個 Boolean,並表明是否嘗試與 Python 二進位檔案建"
"立符號連結而不是複製該檔案。"

#: ../../library/venv.rst:160
msgid ""
"``upgrade`` -- a Boolean value which, if true, will upgrade an existing "
"environment with the running Python - for use when that Python has been "
"upgraded in-place (defaults to ``False``)."
msgstr ""
"``upgrade`` -- 為一個 Boolean,若為 true,則會在執行 Python 時為現"
"有的環境進行升級。目的是讓 Python 可以升級到位(預設為 ``False``)。"

#: ../../library/venv.rst:164
msgid ""
"``with_pip`` -- a Boolean value which, if true, ensures pip is installed in "
"the virtual environment. This uses :mod:`ensurepip` with the ``--default-"
"pip`` option."
msgstr ""
"``with_pip`` -- 為一個 Boolean,若為 true,則確保 pip 有安裝至虛擬"
"環境之中。當有 ``--default-pip`` 的選項時,會使用 :mod:`ensurepip`。"

#: ../../library/venv.rst:168
msgid ""
Expand All @@ -415,10 +428,13 @@ msgid ""
"used). If the special string ``\".\"`` is provided, the basename of the "
"current directory is used as the prompt."
msgstr ""
"``prompt`` -- 為一個 String(字串),該字串會在虛擬環境啟動時被使用。(預設"
"為 ``None``,代表該環境的目錄名稱會被使用)倘若出現特殊字串 ``\".\"`` ,則當"
"前目錄的 basename 會做為提示路徑使用。"

#: ../../library/venv.rst:173
msgid "``upgrade_deps`` -- Update the base venv modules to the latest on PyPI"
msgstr ""
msgstr "``upgrade_deps`` -- 更新基礎 venv 模組至 PyPI 的最新版本"

#: ../../library/venv.rst:175 ../../library/venv.rst:350
msgid "Added the ``with_pip`` parameter"
Expand All @@ -437,10 +453,12 @@ msgid ""
"Creators of third-party virtual environment tools will be free to use the "
"provided :class:`EnvBuilder` class as a base class."
msgstr ""
"第三方虛擬環境工具的建立者可以自由地使用 :class:`EnvBuilder` class 作"
"為 base class(基礎類別)使用."
mattwang44 marked this conversation as resolved.
Show resolved Hide resolved

#: ../../library/venv.rst:187
msgid "The returned env-builder is an object which has a method, ``create``:"
msgstr ""
msgstr "回傳的 env-builder 為一個物件,且帶有一個 method ``create``:"

#: ../../library/venv.rst:191
msgid ""
Expand All @@ -449,19 +467,28 @@ msgid ""
"environment. The ``create`` method will either create the environment in "
"the specified directory, or raise an appropriate exception."
msgstr ""
"透過指定將會容納虛擬環境的目標目錄來建立一個虛擬環境(絕對路徑或"
"相對路徑到該目錄),也就是在該目錄中容納虛擬環境。"
"``create`` method 將會在指定的目錄下創建環境,或是觸發"
mattwang44 marked this conversation as resolved.
Show resolved Hide resolved
"適當的例外。"

#: ../../library/venv.rst:197
msgid ""
"The ``create`` method of the :class:`EnvBuilder` class illustrates the hooks "
"available for subclass customization::"
msgstr ""
":class:`EnvBuilder` class 的 ``create`` method 會闡述可用的 "
"Hooks 以客製化 subclass (子類別)::"

#: ../../library/venv.rst:212
msgid ""
"Each of the methods :meth:`ensure_directories`, :meth:"
"`create_configuration`, :meth:`setup_python`, :meth:`setup_scripts` and :"
"meth:`post_setup` can be overridden."
msgstr ""
"每個 methods :meth:`ensure_directories`、:meth:"
"`create_configuration`、:meth:`setup_python`、:meth:`setup_scripts` 及 :meth:"
"`post_setup` 都可以被覆寫。"

#: ../../library/venv.rst:218
msgid ""
Expand All @@ -472,6 +499,10 @@ msgid ""
"of the environment directory will be cleared and then all necessary "
"subdirectories will be recreated."
msgstr ""
"建立還不存在的環境目錄及必要的子目錄,並回傳一個情境物件(context object)。這個情境物件"
mattwang44 marked this conversation as resolved.
Show resolved Hide resolved
"只是一個屬性 (例如:路徑) 的所有者,可被其他 method 使用。如"
"果 :class:`EnvBuilder` 已被建立且帶有 ``clear=True`` 的引數,該環境目錄下的內"
"容將被清空,以及所有必要的子目錄將被重新建立。"

#: ../../library/venv.rst:225
msgid ""
Expand Down