From a324e6447f957d01549ebefbedadf190cfd6a72e Mon Sep 17 00:00:00 2001 From: AbyssDrake <40595377+AbyssDrake@users.noreply.github.com> Date: Sat, 8 Jul 2023 08:21:01 +0000 Subject: [PATCH] feat: translate library/eusurepip --- library/ensurepip.po | 66 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 51 insertions(+), 15 deletions(-) diff --git a/library/ensurepip.po b/library/ensurepip.po index b2b3d46843..2574dff11b 100644 --- a/library/ensurepip.po +++ b/library/ensurepip.po @@ -20,7 +20,7 @@ msgstr "" #: ../../library/ensurepip.rst:2 msgid ":mod:`ensurepip` --- Bootstrapping the ``pip`` installer" -msgstr "" +msgstr ":mod:`ensurepip` --- ``pip`` 安裝器的初始建置 (bootstrapping)" #: ../../library/ensurepip.rst:10 msgid "**Source code:** :source:`Lib/ensurepip`" @@ -35,6 +35,10 @@ msgid "" "is bundled with maintenance and feature releases of the CPython reference " "interpreter." msgstr "" +":mod:`ensurepip` 套件 (package) 為既有的 Python 安裝或虛擬環境提供 ``pip`` 安" +"裝器初始建置 (bootstrapping) 的支援。這個初始建置的方式應證了事實 —— ``pip`` " +"是有其獨立發布週期的專案,且其最新可用穩定的版本,會與 CPython 直譯器 " +"(interpreter) 之維護和功能發布綁定。" #: ../../library/ensurepip.rst:21 msgid "" @@ -43,12 +47,17 @@ msgid "" "needed if installing ``pip`` was skipped when installing Python (or when " "creating a virtual environment) or after explicitly uninstalling ``pip``." msgstr "" +"大多數情況下,Python 的終端使用者不需要直接調用此模組(因為 ``pip`` 預設應為" +"初始建置),但若安裝 Python 時 ``pip`` 被省略(或建立一虛擬環境時),又或是 " +"``pip`` 被明確解除安裝時,則此模組的初始建置仍有可能用上。" #: ../../library/ensurepip.rst:29 msgid "" "This module *does not* access the internet. All of the components needed to " "bootstrap ``pip`` are included as internal parts of the package." msgstr "" +"此模組\\ *不會*\\ 通過網路存取。所有需要用來初始建置 ``pip`` 的元件都已包含在" +"套件之內。" #: ../../library/ensurepip.rst:36 msgid ":ref:`installing-index`" @@ -56,15 +65,15 @@ msgstr ":ref:`installing-index`" #: ../../library/ensurepip.rst:36 msgid "The end user guide for installing Python packages" -msgstr "" +msgstr "對於終端使用者安裝 Python 套件的指引" #: ../../library/ensurepip.rst:38 msgid ":pep:`453`: Explicit bootstrapping of pip in Python installations" -msgstr "" +msgstr ":pep:`453`: 在 Python 安裝中的 pip 明確初始建置" #: ../../library/ensurepip.rst:39 msgid "The original rationale and specification for this module." -msgstr "" +msgstr "此模組的最初設計理念與規範。" #: ../../includes/wasm-notavail.rst:3 msgid ":ref:`Availability `: not Emscripten, not WASI." @@ -86,11 +95,14 @@ msgstr "命令列介面" #: ../../library/ensurepip.rst:46 msgid "" "The command line interface is invoked using the interpreter's ``-m`` switch." -msgstr "" +msgstr "使用直譯器 (interpreter) 的 ``-m`` 來調用命令列介面" #: ../../library/ensurepip.rst:48 msgid "The simplest possible invocation is::" msgstr "" +"最簡單可行的調用:\n" +"\n" +"::" #: ../../library/ensurepip.rst:52 msgid "" @@ -99,6 +111,11 @@ msgid "" "least as recent as the one available in ``ensurepip``, pass the ``--" "upgrade`` option::" msgstr "" +"若 ``pip`` 未安裝,此調用會將其安裝;否則甚麼也不做。可透過傳入 ``--" +"upgrade`` 參數來確保 ``pip`` 的安裝版本至少為當前 ``ensurepip`` 中最新可用的" +"版本:\n" +"\n" +"::" #: ../../library/ensurepip.rst:59 msgid "" @@ -107,6 +124,8 @@ msgid "" "virtual environment). The installation location can be controlled through " "two additional command line options:" msgstr "" +"預設上,``pip`` 會被安裝至當前虛擬環境(若已啟動虛擬環境)或系統端的套件(若" +"沒有啟動的虛擬環境)。安裝位置可透過兩個額外的命令列選項來控制:" #: ../../library/ensurepip.rst:64 msgid "" @@ -114,6 +133,8 @@ msgid "" "rather than the root of the currently active virtual environment (if any) or " "the default root for the current Python installation." msgstr "" +"``--root ``:安裝 ``pip`` 到給定的根目錄 (root directory) 的相對路徑,而" +"不是當前虛擬環境(若存在)的根目錄,或當前 Python 安裝版所預設的根目錄。" #: ../../library/ensurepip.rst:67 msgid "" @@ -121,6 +142,8 @@ msgid "" "than globally for the current Python installation (this option is not " "permitted inside an active virtual environment)." msgstr "" +"``--user`` :安裝 ``pip`` 到使用者端的套件目錄,而不是全域安裝到當前的 " +"Python 安裝版(此選項不允許在一啟動的虛擬環境中使用)。" #: ../../library/ensurepip.rst:71 msgid "" @@ -128,23 +151,28 @@ msgid "" "stands for the version of Python used to invoke ``ensurepip``). The scripts " "installed can be controlled through two additional command line options:" msgstr "" +"預設會安裝 ``pipX`` 和 ``pipX.Y`` 腳本(X.Y 代表用來調用 ``ensurepip`` 的 " +"Python 之版本)。安裝的腳本可透過兩個額外的命令列選項來控制:" #: ../../library/ensurepip.rst:76 msgid "" "``--altinstall``: if an alternate installation is requested, the ``pipX`` " "script will *not* be installed." msgstr "" +"``--altinstall``:若要求一個替代安裝版,則\\ *不會*\\ 安裝 ``pipX`` 腳本。" #: ../../library/ensurepip.rst:79 msgid "" "``--default-pip``: if a \"default pip\" installation is requested, the " "``pip`` script will be installed in addition to the two regular scripts." msgstr "" +"``--default-pip``: 若要求安裝「預設 pip」,則會安裝 ``pip`` 腳本,及 2 個常" +"規腳本。" #: ../../library/ensurepip.rst:82 msgid "" "Providing both of the script selection options will trigger an exception." -msgstr "" +msgstr "提供兩種指令選項將會導致例外 (exception) 。" #: ../../library/ensurepip.rst:86 msgid "Module API" @@ -152,17 +180,17 @@ msgstr "模組 API" #: ../../library/ensurepip.rst:88 msgid ":mod:`ensurepip` exposes two functions for programmatic use:" -msgstr "" +msgstr ":mod:`ensurepip` 開放了兩個用於編寫程式的函式:" #: ../../library/ensurepip.rst:92 msgid "" "Returns a string specifying the available version of pip that will be " "installed when bootstrapping an environment." -msgstr "" +msgstr "回傳一個字串,用以標明初始建置時,安裝的 pip 的可行版本號。" #: ../../library/ensurepip.rst:99 msgid "Bootstraps ``pip`` into the current or designated environment." -msgstr "" +msgstr "在當前或指定的環境之中建立 ``pip``。" #: ../../library/ensurepip.rst:101 msgid "" @@ -170,45 +198,48 @@ msgid "" "*root* is ``None``, then installation uses the default install location for " "the current environment." msgstr "" +"*root* 指定一個替代的根目錄,作為安裝的相對路徑。若 *root* 為 ``None``,則安" +"裝使用當前環境的預設安裝位置。" #: ../../library/ensurepip.rst:105 msgid "" "*upgrade* indicates whether or not to upgrade an existing installation of an " "earlier version of ``pip`` to the available version." -msgstr "" +msgstr "*upgrade* 指出是否要將一個既有的較早版本的 ``pip`` 升級至可用的新版。" #: ../../library/ensurepip.rst:108 msgid "" "*user* indicates whether to use the user scheme rather than installing " "globally." -msgstr "" +msgstr "*user* 指出是否要使用使用者的安裝方案而不是全域安裝。" #: ../../library/ensurepip.rst:111 msgid "" "By default, the scripts ``pipX`` and ``pipX.Y`` will be installed (where X.Y " "stands for the current version of Python)." -msgstr "" +msgstr "預設會安裝 ``pipX`` 和 ``pipX.Y`` 腳本(X.Y 代表 Python 的當前版本)。" #: ../../library/ensurepip.rst:114 msgid "If *altinstall* is set, then ``pipX`` will *not* be installed." -msgstr "" +msgstr "如果啟用了 *altinstall*,則不會安裝 ``pipX``。" #: ../../library/ensurepip.rst:116 msgid "" "If *default_pip* is set, then ``pip`` will be installed in addition to the " "two regular scripts." -msgstr "" +msgstr "如果啟用了 *default_pip*,則會安裝 ``pip``,以及 2 個常規腳本。" #: ../../library/ensurepip.rst:119 msgid "" "Setting both *altinstall* and *default_pip* will trigger :exc:`ValueError`." -msgstr "" +msgstr "同時啟用 *altinstall* 跟 *default_pip*,將會觸發 :exc:`ValueError`。" #: ../../library/ensurepip.rst:122 msgid "" "*verbosity* controls the level of output to :data:`sys.stdout` from the " "bootstrapping operation." msgstr "" +"*verbosity* 用來控制初始建置操作內,對於 :data:`sys.stdout` 的輸出等級。" #: ../../library/ensurepip.rst:136 msgid "" @@ -224,6 +255,8 @@ msgid "" "environ``. Invoking the command line interface in a subprocess instead " "allows these side effects to be avoided." msgstr "" +"初始建置的過程對於 ``sys.path`` 及 ``os.environ`` 均有副作用。改為在一子行程 " +"(subprocess) 調用命令列介面可避免這些副作用。" #: ../../library/ensurepip.rst:135 msgid "" @@ -232,3 +265,6 @@ msgid "" "be present by default (as the dependencies may be removed in a future " "version of ``pip``)." msgstr "" +"初始建置的過程也許會安裝 ``pip`` 所需要的額外的模組,但其他軟體不應該假設這些" +"相依 (dependency) 總是預設存在(因為這些相依很可能會在未來版本的 ``pip`` 中被" +"移除)。"