From a61abba2936491b5999662dd1cab89cb2e25b6d9 Mon Sep 17 00:00:00 2001 From: Hsiang-Jen Li Date: Tue, 22 Aug 2023 11:36:49 +0800 Subject: [PATCH 01/21] trans: venv --- library/venv.po | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/library/venv.po b/library/venv.po index 8fab2532c7..f0debd1306 100644 --- a/library/venv.po +++ b/library/venv.po @@ -238,6 +238,10 @@ msgid "" "activation script is platform-specific (:samp:`{}` must be replaced by " "the path to the directory containing the virtual environment):" msgstr "" +"虛擬環境可以透過位於二進制目錄中的腳本「啟用」(在 POSIX 上為 ``bin``;在 Windows 上為 ``Scripts``)" +"這會將該目錄加入到你的 :envvar:`!PATH`,當你運行 `python` 時就會調用該環境的直譯器並且執行已安裝的腳本" +",而不需要使用完整的路徑。" +"啟動腳本的方式因平台而異(:samp:`{}` 需要替換成包含虛擬環境的目錄路徑)" #: ../../library/venv.rst:71 msgid "Platform" @@ -249,7 +253,7 @@ msgstr "" #: ../../library/venv.rst:71 msgid "Command to activate virtual environment" -msgstr "" +msgstr "啟動虛擬環境的指令" #: ../../library/venv.rst:73 msgid "POSIX" @@ -305,13 +309,13 @@ msgstr ":samp:`PS C:\\\\> {}\\\\Scripts\\\\Activate.ps1`" #: ../../library/venv.rst:86 msgid ":program:`fish` and :program:`csh` activation scripts." -msgstr "" +msgstr ":program:`fish` 和 :program:`csh` 啟動腳本。" #: ../../library/venv.rst:89 msgid "" "PowerShell activation scripts installed under POSIX for PowerShell Core " "support." -msgstr "" +msgstr "PowerShell 的啟動腳本安裝在 POSIX 上支援 PowerShell Core。" #: ../../library/venv.rst:93 msgid "" @@ -319,7 +323,7 @@ msgid "" "just specify the full path to that environment's Python interpreter when " "invoking Python. Furthermore, all scripts installed in the environment " "should be runnable without activating it." -msgstr "" +msgstr "你不用特別開啟虛擬環境,你可以直接在調用 Python 直譯器時指定該環境的完整路徑。此外,所有安裝在環境裡的腳本都應該都可以在未啟用虛擬環境的情況下運行。" #: ../../library/venv.rst:99 msgid "" @@ -341,6 +345,9 @@ msgid "" "VIRTUAL_ENV` cannot be relied upon to determine whether a virtual " "environment is being used." msgstr "" +"當虛擬環境被啟用時,:envvar:`!VIRTUAL_ENV` 環境變數會被設置為該環境的路徑。" +"由於開啟虛擬環境不需要使用到 :envvar:`!VIRTUAL_ENV`。" +"因此,無法依賴環境變數來判斷是否正在使用虛擬環境。" #: ../../library/venv.rst:114 msgid "" @@ -363,7 +370,7 @@ msgid "" "You can deactivate a virtual environment by typing ``deactivate`` in your " "shell. The exact mechanism is platform-specific and is an internal " "implementation detail (typically, a script or shell function will be used)." -msgstr "" +msgstr "你可以在 shell 輸入 ``deactivate`` 來關閉虛擬環境。具體的使用方式因平台而異,是內部實現的細節(通常會使用腳本或是 shell 函式)" #: ../../library/venv.rst:136 msgid "API" From 0c199667c0666e4649eb84f977c86e643fa73454 Mon Sep 17 00:00:00 2001 From: Hsiang-Jen Li Date: Tue, 22 Aug 2023 11:50:23 +0800 Subject: [PATCH 02/21] feat: trans venv --- library/venv.po | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/library/venv.po b/library/venv.po index f0debd1306..4cfe3ed0f0 100644 --- a/library/venv.po +++ b/library/venv.po @@ -364,6 +364,12 @@ msgid "" "directory of it, you should recreate the environment in its new location. " "Otherwise, software installed into the environment may not work as expected." msgstr "" +"因為在環境中安裝的腳本不應該預期環境已經啟用,所以它們的 ``#!`` 行會包含環境直譯器的絕對路徑。" +"因此,在一般情況下,環境本質上是不可攜帶的。" +"你應該使用一個簡單的方法來重新建立一個環境(例如:如果你有一個名為 ``requirements.txt``的需求檔案,你可以使用環境的 ``pip install -r requirements.txt`` 來安裝環境所需的所有套件)。" +"如果出於某種原因你需要將環境移至新位置,你應該在所需位置重新創建它,並刪除舊位置的環境。" +"如果你移動環境是因為移動了其父目錄,你應該在新位置重新創建環境。" +"否則,安裝在該環境中的軟體可能無法正常運作。" #: ../../library/venv.rst:128 msgid "" From c155f0c8b3a8e9e527d506640d31911118f8aaf7 Mon Sep 17 00:00:00 2001 From: Hsiang-Jen Li Date: Tue, 22 Aug 2023 12:05:07 +0800 Subject: [PATCH 03/21] feat: trans venv --- library/venv.po | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/library/venv.po b/library/venv.po index 4cfe3ed0f0..4927d9f043 100644 --- a/library/venv.po +++ b/library/venv.po @@ -249,7 +249,7 @@ msgstr "平台" #: ../../library/venv.rst:71 msgid "Shell" -msgstr "" +msgstr "殼" #: ../../library/venv.rst:71 msgid "Command to activate virtual environment" @@ -336,6 +336,10 @@ msgid "" "window should run it with the correct interpreter without the environment " "needing to be activated or on the :envvar:`PATH`." msgstr "" +"為了實現這一點,安裝在虛擬環境中的腳本會有一個 ``#!`` 行,該行指向該環境的 Python 直譯器,例如: :samp:`#!/{}/bin/python`。" +"這代表無論 :envvar:`!PATH` 的值為何,該腳本都會在直譯器上運行" +"在 Windows 上,如果你安裝了 :ref:`launcher`,則支援 ``#!`` 行處理。" +"因此,在 Windows 資源管理器窗口中雙擊已安裝的腳本,應該可以在不需要啟用環境或將其加入 :envvar:`!PATH` 的情況下,正確地運行。" #: ../../library/venv.rst:108 msgid "" From 8f82779907a04a38b588c71ed1b90f52fe91f5e3 Mon Sep 17 00:00:00 2001 From: Hsiang-Jen Li <71996166+hsiangjenli@users.noreply.github.com> Date: Tue, 22 Aug 2023 13:40:18 +0800 Subject: [PATCH 04/21] Update library/venv.po Co-authored-by: Wei-Hsiang (Matt) Wang --- library/venv.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/venv.po b/library/venv.po index 4927d9f043..f8d48f0eff 100644 --- a/library/venv.po +++ b/library/venv.po @@ -238,7 +238,7 @@ msgid "" "activation script is platform-specific (:samp:`{}` must be replaced by " "the path to the directory containing the virtual environment):" msgstr "" -"虛擬環境可以透過位於二進制目錄中的腳本「啟用」(在 POSIX 上為 ``bin``;在 Windows 上為 ``Scripts``)" +"虛擬環境可以透過位於二進位檔案目錄中的腳本「啟用」(在 POSIX 上為 ``bin``;在 Windows 上為 ``Scripts``)" "這會將該目錄加入到你的 :envvar:`!PATH`,當你運行 `python` 時就會調用該環境的直譯器並且執行已安裝的腳本" ",而不需要使用完整的路徑。" "啟動腳本的方式因平台而異(:samp:`{}` 需要替換成包含虛擬環境的目錄路徑)" From 00e551ea3b8c76f0ed062c5f37de732fd558fd8f Mon Sep 17 00:00:00 2001 From: Hsiang-Jen Li <71996166+hsiangjenli@users.noreply.github.com> Date: Tue, 22 Aug 2023 14:52:39 +0800 Subject: [PATCH 05/21] Update library/venv.po Co-authored-by: Wei-Hsiang (Matt) Wang --- library/venv.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/venv.po b/library/venv.po index f8d48f0eff..a73c5c6841 100644 --- a/library/venv.po +++ b/library/venv.po @@ -239,7 +239,7 @@ msgid "" "the path to the directory containing the virtual environment):" msgstr "" "虛擬環境可以透過位於二進位檔案目錄中的腳本「啟用」(在 POSIX 上為 ``bin``;在 Windows 上為 ``Scripts``)" -"這會將該目錄加入到你的 :envvar:`!PATH`,當你運行 `python` 時就會調用該環境的直譯器並且執行已安裝的腳本" +"這會將該目錄加入到你的 :envvar:`!PATH`,當你運行 :program:`python` 時就會調用該環境的直譯器並且執行已安裝的腳本" ",而不需要使用完整的路徑。" "啟動腳本的方式因平台而異(:samp:`{}` 需要替換成包含虛擬環境的目錄路徑)" From 604a914de8dc5e8585d82a7481c85e0c8c3fd8ca Mon Sep 17 00:00:00 2001 From: Hsiang-Jen Li <71996166+hsiangjenli@users.noreply.github.com> Date: Wed, 23 Aug 2023 02:24:55 +0800 Subject: [PATCH 06/21] Update library/venv.po --- library/venv.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/venv.po b/library/venv.po index a73c5c6841..f1e59cbeed 100644 --- a/library/venv.po +++ b/library/venv.po @@ -249,7 +249,7 @@ msgstr "平台" #: ../../library/venv.rst:71 msgid "Shell" -msgstr "殼" +msgstr "Shell" #: ../../library/venv.rst:71 msgid "Command to activate virtual environment" From 65fb71142e47d86b10c22bad6a9ce485afb63a4a Mon Sep 17 00:00:00 2001 From: Hsiang-Jen Li <71996166+hsiangjenli@users.noreply.github.com> Date: Wed, 23 Aug 2023 02:25:32 +0800 Subject: [PATCH 07/21] Update library/venv.po --- library/venv.po | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/venv.po b/library/venv.po index f1e59cbeed..1c50583e73 100644 --- a/library/venv.po +++ b/library/venv.po @@ -380,7 +380,9 @@ msgid "" "You can deactivate a virtual environment by typing ``deactivate`` in your " "shell. The exact mechanism is platform-specific and is an internal " "implementation detail (typically, a script or shell function will be used)." -msgstr "你可以在 shell 輸入 ``deactivate`` 來關閉虛擬環境。具體的使用方式因平台而異,是內部實現的細節(通常會使用腳本或是 shell 函式)" +msgstr "" +"你可以在 shell 輸入 ``deactivate`` 來關閉虛擬環境。具體的使用方式因平台而異," +"是內部實作的細節(通常會使用腳本或是 shell 函式)" #: ../../library/venv.rst:136 msgid "API" From 3732dc16a4f9cb984af92f885f07f01678759cc7 Mon Sep 17 00:00:00 2001 From: Hsiang-Jen Li <71996166+hsiangjenli@users.noreply.github.com> Date: Wed, 23 Aug 2023 02:25:39 +0800 Subject: [PATCH 08/21] Update library/venv.po --- library/venv.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/venv.po b/library/venv.po index 1c50583e73..61a5d1ac0b 100644 --- a/library/venv.po +++ b/library/venv.po @@ -336,7 +336,7 @@ msgid "" "window should run it with the correct interpreter without the environment " "needing to be activated or on the :envvar:`PATH`." msgstr "" -"為了實現這一點,安裝在虛擬環境中的腳本會有一個 ``#!`` 行,該行指向該環境的 Python 直譯器,例如: :samp:`#!/{}/bin/python`。" +"為了實現這一點,安裝在虛擬環境中的腳本會有一個 ``#!`` 列,此列指向該環境的 Python 直譯器,例如: :samp:`#!/{}/bin/python`。" "這代表無論 :envvar:`!PATH` 的值為何,該腳本都會在直譯器上運行" "在 Windows 上,如果你安裝了 :ref:`launcher`,則支援 ``#!`` 行處理。" "因此,在 Windows 資源管理器窗口中雙擊已安裝的腳本,應該可以在不需要啟用環境或將其加入 :envvar:`!PATH` 的情況下,正確地運行。" From 85bf350050b28fa78608906e2d52eb8c601ff87b Mon Sep 17 00:00:00 2001 From: Hsiang-Jen Li <71996166+hsiangjenli@users.noreply.github.com> Date: Wed, 23 Aug 2023 02:25:46 +0800 Subject: [PATCH 09/21] Update library/venv.po --- library/venv.po | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/venv.po b/library/venv.po index 61a5d1ac0b..ac29db5234 100644 --- a/library/venv.po +++ b/library/venv.po @@ -323,7 +323,9 @@ msgid "" "just specify the full path to that environment's Python interpreter when " "invoking Python. Furthermore, all scripts installed in the environment " "should be runnable without activating it." -msgstr "你不用特別開啟虛擬環境,你可以直接在調用 Python 直譯器時指定該環境的完整路徑。此外,所有安裝在環境裡的腳本都應該都可以在未啟用虛擬環境的情況下運行。" +msgstr "" +"你不用特別開啟虛擬環境,你可以直接在調用 Python 直譯器時指定該環境的完整路" +"徑。此外,所有安裝在環境裡的腳本都應該都可以在未啟用虛擬環境的情況下運行。" #: ../../library/venv.rst:99 msgid "" From f0813c3661e3a4bd0fc9b7c27117e4fb51df6efc Mon Sep 17 00:00:00 2001 From: Hsiang-Jen Li <71996166+hsiangjenli@users.noreply.github.com> Date: Wed, 23 Aug 2023 02:25:53 +0800 Subject: [PATCH 10/21] Update library/venv.po --- library/venv.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/venv.po b/library/venv.po index ac29db5234..15296e8569 100644 --- a/library/venv.po +++ b/library/venv.po @@ -341,7 +341,7 @@ msgstr "" "為了實現這一點,安裝在虛擬環境中的腳本會有一個 ``#!`` 列,此列指向該環境的 Python 直譯器,例如: :samp:`#!/{}/bin/python`。" "這代表無論 :envvar:`!PATH` 的值為何,該腳本都會在直譯器上運行" "在 Windows 上,如果你安裝了 :ref:`launcher`,則支援 ``#!`` 行處理。" -"因此,在 Windows 資源管理器窗口中雙擊已安裝的腳本,應該可以在不需要啟用環境或將其加入 :envvar:`!PATH` 的情況下,正確地運行。" +"因此,在 Windows 檔案總管(Windows Explorer)中雙擊已安裝的腳本,應該可以在不需要啟用環境或將其加入 :envvar:`!PATH` 的情況下,正確地運行。" #: ../../library/venv.rst:108 msgid "" From 57c58c0c65f6e454b2e974564dfd77ef539cb7c7 Mon Sep 17 00:00:00 2001 From: Hsiang-Jen Li <71996166+hsiangjenli@users.noreply.github.com> Date: Wed, 23 Aug 2023 02:26:00 +0800 Subject: [PATCH 11/21] Update library/venv.po --- library/venv.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/venv.po b/library/venv.po index 15296e8569..c307065489 100644 --- a/library/venv.po +++ b/library/venv.po @@ -374,7 +374,7 @@ msgstr "" "因此,在一般情況下,環境本質上是不可攜帶的。" "你應該使用一個簡單的方法來重新建立一個環境(例如:如果你有一個名為 ``requirements.txt``的需求檔案,你可以使用環境的 ``pip install -r requirements.txt`` 來安裝環境所需的所有套件)。" "如果出於某種原因你需要將環境移至新位置,你應該在所需位置重新創建它,並刪除舊位置的環境。" -"如果你移動環境是因為移動了其父目錄,你應該在新位置重新創建環境。" +"如果你移動環境是因為移動了其父目錄,你應該在新位置重新建立環境。" "否則,安裝在該環境中的軟體可能無法正常運作。" #: ../../library/venv.rst:128 From 9b5399b53a24cb9e2afe0b47f8e93df966671b4f Mon Sep 17 00:00:00 2001 From: Hsiang-Jen Li <71996166+hsiangjenli@users.noreply.github.com> Date: Wed, 23 Aug 2023 02:26:09 +0800 Subject: [PATCH 12/21] Update library/venv.po --- library/venv.po | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/library/venv.po b/library/venv.po index c307065489..e57f8fac68 100644 --- a/library/venv.po +++ b/library/venv.po @@ -370,10 +370,13 @@ msgid "" "directory of it, you should recreate the environment in its new location. " "Otherwise, software installed into the environment may not work as expected." msgstr "" -"因為在環境中安裝的腳本不應該預期環境已經啟用,所以它們的 ``#!`` 行會包含環境直譯器的絕對路徑。" -"因此,在一般情況下,環境本質上是不可攜帶的。" -"你應該使用一個簡單的方法來重新建立一個環境(例如:如果你有一個名為 ``requirements.txt``的需求檔案,你可以使用環境的 ``pip install -r requirements.txt`` 來安裝環境所需的所有套件)。" -"如果出於某種原因你需要將環境移至新位置,你應該在所需位置重新創建它,並刪除舊位置的環境。" +msgstr "" +"因為在環境中安裝的腳本不應該預期環境已經啟用,所以它們的 ``#!`` 行會包含環境" +"直譯器的絕對路徑。因此,在一般情況下,環境本質上是不可攜帶的。你應該使用一個" +"簡單的方法來重新建立一個環境(例如:如果你有一個名為 ``requirements.txt``的需" +"求檔案,你可以使用環境的 ``pip install -r requirements.txt`` 來安裝環境所需的" +"所有套件)。如果出於某種原因你需要將環境移至新位置,你應該在所需位置重新建立" +"它,並刪除舊位置的環境。" "如果你移動環境是因為移動了其父目錄,你應該在新位置重新建立環境。" "否則,安裝在該環境中的軟體可能無法正常運作。" From d97083adc24ab83b6e961d94e6feead88e4c4198 Mon Sep 17 00:00:00 2001 From: Hsiang-Jen Li <71996166+hsiangjenli@users.noreply.github.com> Date: Wed, 23 Aug 2023 02:31:22 +0800 Subject: [PATCH 13/21] Update library/venv.po --- library/venv.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/venv.po b/library/venv.po index e57f8fac68..2ab8d675aa 100644 --- a/library/venv.po +++ b/library/venv.po @@ -341,7 +341,7 @@ msgstr "" "為了實現這一點,安裝在虛擬環境中的腳本會有一個 ``#!`` 列,此列指向該環境的 Python 直譯器,例如: :samp:`#!/{}/bin/python`。" "這代表無論 :envvar:`!PATH` 的值為何,該腳本都會在直譯器上運行" "在 Windows 上,如果你安裝了 :ref:`launcher`,則支援 ``#!`` 行處理。" -"因此,在 Windows 檔案總管(Windows Explorer)中雙擊已安裝的腳本,應該可以在不需要啟用環境或將其加入 :envvar:`!PATH` 的情況下,正確地運行。" +"因此,在 Windows 檔案總管(Windows Explorer)中雙擊已安裝的腳本,應該可以在沒有啟用環境或將其加入 :envvar:`!PATH` 的情況下,正確地運行。" #: ../../library/venv.rst:108 msgid "" From 0d479a25caed5b7ed13739bdeb456ec67550a300 Mon Sep 17 00:00:00 2001 From: Hsiang-Jen Li <71996166+hsiangjenli@users.noreply.github.com> Date: Wed, 23 Aug 2023 08:26:23 +0800 Subject: [PATCH 14/21] Update library/venv.po Co-authored-by: Wei-Hsiang (Matt) Wang --- library/venv.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/venv.po b/library/venv.po index 2ab8d675aa..3d535154f3 100644 --- a/library/venv.po +++ b/library/venv.po @@ -340,7 +340,7 @@ msgid "" msgstr "" "為了實現這一點,安裝在虛擬環境中的腳本會有一個 ``#!`` 列,此列指向該環境的 Python 直譯器,例如: :samp:`#!/{}/bin/python`。" "這代表無論 :envvar:`!PATH` 的值為何,該腳本都會在直譯器上運行" -"在 Windows 上,如果你安裝了 :ref:`launcher`,則支援 ``#!`` 行處理。" +"在 Windows 上,如果你安裝了 :ref:`launcher`,則支援 ``#!`` 列處理。" "因此,在 Windows 檔案總管(Windows Explorer)中雙擊已安裝的腳本,應該可以在沒有啟用環境或將其加入 :envvar:`!PATH` 的情況下,正確地運行。" #: ../../library/venv.rst:108 From a6d7ce63223c4f73b92e730cc4ac6b0153229992 Mon Sep 17 00:00:00 2001 From: Hsiang-Jen Li <71996166+hsiangjenli@users.noreply.github.com> Date: Wed, 23 Aug 2023 08:26:45 +0800 Subject: [PATCH 15/21] Update library/venv.po Co-authored-by: Wei-Hsiang (Matt) Wang --- library/venv.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/venv.po b/library/venv.po index 3d535154f3..c1e807bc89 100644 --- a/library/venv.po +++ b/library/venv.po @@ -371,7 +371,7 @@ msgid "" "Otherwise, software installed into the environment may not work as expected." msgstr "" msgstr "" -"因為在環境中安裝的腳本不應該預期環境已經啟用,所以它們的 ``#!`` 行會包含環境" +"因為在環境中安裝的腳本不應該預期環境已經啟用,所以它們的 shebang 列會包含環境" "直譯器的絕對路徑。因此,在一般情況下,環境本質上是不可攜帶的。你應該使用一個" "簡單的方法來重新建立一個環境(例如:如果你有一個名為 ``requirements.txt``的需" "求檔案,你可以使用環境的 ``pip install -r requirements.txt`` 來安裝環境所需的" From 9be12474d9515786dd234f7ebca5d9bf644f6995 Mon Sep 17 00:00:00 2001 From: Hsiang-Jen Li Date: Wed, 23 Aug 2023 08:48:26 +0800 Subject: [PATCH 16/21] trans: format --- library/venv.po | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/library/venv.po b/library/venv.po index c1e807bc89..61bce042b2 100644 --- a/library/venv.po +++ b/library/venv.po @@ -238,10 +238,11 @@ msgid "" "activation script is platform-specific (:samp:`{}` must be replaced by " "the path to the directory containing the virtual environment):" msgstr "" -"虛擬環境可以透過位於二進位檔案目錄中的腳本「啟用」(在 POSIX 上為 ``bin``;在 Windows 上為 ``Scripts``)" -"這會將該目錄加入到你的 :envvar:`!PATH`,當你運行 :program:`python` 時就會調用該環境的直譯器並且執行已安裝的腳本" -",而不需要使用完整的路徑。" -"啟動腳本的方式因平台而異(:samp:`{}` 需要替換成包含虛擬環境的目錄路徑)" +"虛擬環境可以透過位於二進位檔案目錄中的腳本「啟用」(在 POSIX 上為 ``bin``;" +"在 Windows 上為 ``Scripts``)這會將該目錄加入到你的 :envvar:`!PATH`,當你運" +"行 :program:`python` 時就會調用該環境的直譯器並且執行已安裝的腳本,而不需要使" +"用完整的路徑。啟動腳本的方式因平台而異(:samp:`{}` 需要替換成包含虛擬環" +"境的目錄路徑)" #: ../../library/venv.rst:71 msgid "Platform" @@ -338,10 +339,12 @@ msgid "" "window should run it with the correct interpreter without the environment " "needing to be activated or on the :envvar:`PATH`." msgstr "" -"為了實現這一點,安裝在虛擬環境中的腳本會有一個 ``#!`` 列,此列指向該環境的 Python 直譯器,例如: :samp:`#!/{}/bin/python`。" -"這代表無論 :envvar:`!PATH` 的值為何,該腳本都會在直譯器上運行" -"在 Windows 上,如果你安裝了 :ref:`launcher`,則支援 ``#!`` 列處理。" -"因此,在 Windows 檔案總管(Windows Explorer)中雙擊已安裝的腳本,應該可以在沒有啟用環境或將其加入 :envvar:`!PATH` 的情況下,正確地運行。" +"為了實現這一點,安裝在虛擬環境中的腳本會有一個 ``#!`` 列,此列指向該環境的 " +"Python 直譯器,例如: :samp:`#!/{}/bin/python`。這代表無論 :" +"envvar:`!PATH` 的值為何,該腳本都會在直譯器上運行在 Windows 上,如果你安裝" +"了 :ref:`launcher`,則支援 ``#!`` 列處理。因此,在 Windows 檔案總管(Windows " +"Explorer)中雙擊已安裝的腳本,應該可以在沒有啟用環境或將其加入 :envvar:`!" +"PATH` 的情況下,正確地運行。" #: ../../library/venv.rst:108 msgid "" @@ -351,9 +354,9 @@ msgid "" "VIRTUAL_ENV` cannot be relied upon to determine whether a virtual " "environment is being used." msgstr "" -"當虛擬環境被啟用時,:envvar:`!VIRTUAL_ENV` 環境變數會被設置為該環境的路徑。" -"由於開啟虛擬環境不需要使用到 :envvar:`!VIRTUAL_ENV`。" -"因此,無法依賴環境變數來判斷是否正在使用虛擬環境。" +"當虛擬環境被啟用時,:envvar:`!VIRTUAL_ENV` 環境變數會被設置為該環境的路徑。由" +"於開啟虛擬環境不需要使用到 :envvar:`!VIRTUAL_ENV`。因此,無法依賴環境變數來判" +"斷是否正在使用虛擬環境。" #: ../../library/venv.rst:114 msgid "" @@ -370,15 +373,13 @@ msgid "" "directory of it, you should recreate the environment in its new location. " "Otherwise, software installed into the environment may not work as expected." msgstr "" -msgstr "" "因為在環境中安裝的腳本不應該預期環境已經啟用,所以它們的 shebang 列會包含環境" "直譯器的絕對路徑。因此,在一般情況下,環境本質上是不可攜帶的。你應該使用一個" "簡單的方法來重新建立一個環境(例如:如果你有一個名為 ``requirements.txt``的需" "求檔案,你可以使用環境的 ``pip install -r requirements.txt`` 來安裝環境所需的" "所有套件)。如果出於某種原因你需要將環境移至新位置,你應該在所需位置重新建立" -"它,並刪除舊位置的環境。" -"如果你移動環境是因為移動了其父目錄,你應該在新位置重新建立環境。" -"否則,安裝在該環境中的軟體可能無法正常運作。" +"它,並刪除舊位置的環境。如果你移動環境是因為移動了其父目錄,你應該在新位置重" +"新建立環境。否則,安裝在該環境中的軟體可能無法正常運作。" #: ../../library/venv.rst:128 msgid "" From 54cc072cd6ed5ed713355a1f242515ac53f9475d Mon Sep 17 00:00:00 2001 From: RN Date: Wed, 23 Aug 2023 09:03:35 +0800 Subject: [PATCH 17/21] fix: ``#!`` to \"shebang\" --- library/venv.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/venv.po b/library/venv.po index 61bce042b2..533b1f6ca6 100644 --- a/library/venv.po +++ b/library/venv.po @@ -339,10 +339,10 @@ msgid "" "window should run it with the correct interpreter without the environment " "needing to be activated or on the :envvar:`PATH`." msgstr "" -"為了實現這一點,安裝在虛擬環境中的腳本會有一個 ``#!`` 列,此列指向該環境的 " +"為了實現這一點,安裝在虛擬環境中的腳本會有一個 \"shebang\" 列,此列指向該環境的 " "Python 直譯器,例如: :samp:`#!/{}/bin/python`。這代表無論 :" "envvar:`!PATH` 的值為何,該腳本都會在直譯器上運行在 Windows 上,如果你安裝" -"了 :ref:`launcher`,則支援 ``#!`` 列處理。因此,在 Windows 檔案總管(Windows " +"了 :ref:`launcher`,則支援 \"shebang\" 列處理。因此,在 Windows 檔案總管(Windows " "Explorer)中雙擊已安裝的腳本,應該可以在沒有啟用環境或將其加入 :envvar:`!" "PATH` 的情況下,正確地運行。" From de19c4f6eedd6d27a1500f77a995141269e07ba7 Mon Sep 17 00:00:00 2001 From: RN Date: Wed, 23 Aug 2023 11:53:18 +0800 Subject: [PATCH 18/21] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E8=AA=9E?= =?UTF-8?q?=E5=8F=A5=E3=80=81=E6=A8=99=E9=BB=9E=E7=AC=A6=E8=99=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/venv.po | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/library/venv.po b/library/venv.po index 533b1f6ca6..c616cac518 100644 --- a/library/venv.po +++ b/library/venv.po @@ -325,7 +325,7 @@ msgid "" "invoking Python. Furthermore, all scripts installed in the environment " "should be runnable without activating it." msgstr "" -"你不用特別開啟虛擬環境,你可以直接在調用 Python 直譯器時指定該環境的完整路" +"你不用特別開啟虛擬環境,你可以直接在調用 Python 時指定該環境下 Python 直譯器的完整路" "徑。此外,所有安裝在環境裡的腳本都應該都可以在未啟用虛擬環境的情況下運行。" #: ../../library/venv.rst:99 @@ -341,10 +341,10 @@ msgid "" msgstr "" "為了實現這一點,安裝在虛擬環境中的腳本會有一個 \"shebang\" 列,此列指向該環境的 " "Python 直譯器,例如: :samp:`#!/{}/bin/python`。這代表無論 :" -"envvar:`!PATH` 的值為何,該腳本都會在直譯器上運行在 Windows 上,如果你安裝" +"envvar:`!PATH` 的值為何,該腳本都會在直譯器上運行。在 Windows 上,如果你安裝" "了 :ref:`launcher`,則支援 \"shebang\" 列處理。因此,在 Windows 檔案總管(Windows " "Explorer)中雙擊已安裝的腳本,應該可以在沒有啟用環境或將其加入 :envvar:`!" -"PATH` 的情況下,正確地運行。" +"PATH` 的情況下正確地運行。" #: ../../library/venv.rst:108 msgid "" @@ -355,7 +355,7 @@ msgid "" "environment is being used." msgstr "" "當虛擬環境被啟用時,:envvar:`!VIRTUAL_ENV` 環境變數會被設置為該環境的路徑。由" -"於開啟虛擬環境不需要使用到 :envvar:`!VIRTUAL_ENV`。因此,無法依賴環境變數來判" +"於不需要明確啟用虛擬環境才能使用它。因此,無法依賴 :envvar:`!VIRTUAL_ENV` 來判" "斷是否正在使用虛擬環境。" #: ../../library/venv.rst:114 @@ -373,11 +373,11 @@ msgid "" "directory of it, you should recreate the environment in its new location. " "Otherwise, software installed into the environment may not work as expected." msgstr "" -"因為在環境中安裝的腳本不應該預期環境已經啟用,所以它們的 shebang 列會包含環境" +"因為安裝在環境中的腳本不應該預期該環境已經被啟動,所以它們的 shebang 列會包含環境" "直譯器的絕對路徑。因此,在一般情況下,環境本質上是不可攜帶的。你應該使用一個" "簡單的方法來重新建立一個環境(例如:如果你有一個名為 ``requirements.txt``的需" "求檔案,你可以使用環境的 ``pip install -r requirements.txt`` 來安裝環境所需的" -"所有套件)。如果出於某種原因你需要將環境移至新位置,你應該在所需位置重新建立" +"所有套件)。如果出於某種原因,你需要將環境移至新位置,你應該在所需位置重新建立" "它,並刪除舊位置的環境。如果你移動環境是因為移動了其父目錄,你應該在新位置重" "新建立環境。否則,安裝在該環境中的軟體可能無法正常運作。" From ceeb38661898dc942f377cd75770148c8594d093 Mon Sep 17 00:00:00 2001 From: RN Date: Wed, 23 Aug 2023 11:56:30 +0800 Subject: [PATCH 19/21] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E8=AA=9E?= =?UTF-8?q?=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/venv.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/venv.po b/library/venv.po index c616cac518..61ab7dbe5e 100644 --- a/library/venv.po +++ b/library/venv.po @@ -325,7 +325,7 @@ msgid "" "invoking Python. Furthermore, all scripts installed in the environment " "should be runnable without activating it." msgstr "" -"你不用特別開啟虛擬環境,你可以直接在調用 Python 時指定該環境下 Python 直譯器的完整路" +"你不用特別開啟虛擬環境,你可以在調用 Python 時指定該環境下 Python 直譯器的完整路" "徑。此外,所有安裝在環境裡的腳本都應該都可以在未啟用虛擬環境的情況下運行。" #: ../../library/venv.rst:99 From 35a76f5c62f72cd676c4531a694de07e2bbab637 Mon Sep 17 00:00:00 2001 From: Matt Wang Date: Mon, 28 Aug 2023 02:01:57 +0800 Subject: [PATCH 20/21] chore(library/venv): format with powrap --- library/venv.po | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/library/venv.po b/library/venv.po index 61ab7dbe5e..625a370520 100644 --- a/library/venv.po +++ b/library/venv.po @@ -325,8 +325,9 @@ msgid "" "invoking Python. Furthermore, all scripts installed in the environment " "should be runnable without activating it." msgstr "" -"你不用特別開啟虛擬環境,你可以在調用 Python 時指定該環境下 Python 直譯器的完整路" -"徑。此外,所有安裝在環境裡的腳本都應該都可以在未啟用虛擬環境的情況下運行。" +"你不用特別開啟虛擬環境,你可以在調用 Python 時指定該環境下 Python 直譯器的完" +"整路徑。此外,所有安裝在環境裡的腳本都應該都可以在未啟用虛擬環境的情況下運" +"行。" #: ../../library/venv.rst:99 msgid "" @@ -339,12 +340,12 @@ msgid "" "window should run it with the correct interpreter without the environment " "needing to be activated or on the :envvar:`PATH`." msgstr "" -"為了實現這一點,安裝在虛擬環境中的腳本會有一個 \"shebang\" 列,此列指向該環境的 " -"Python 直譯器,例如: :samp:`#!/{}/bin/python`。這代表無論 :" +"為了實現這一點,安裝在虛擬環境中的腳本會有一個 \"shebang\" 列,此列指向該環境" +"的 Python 直譯器,例如: :samp:`#!/{}/bin/python`。這代表無論 :" "envvar:`!PATH` 的值為何,該腳本都會在直譯器上運行。在 Windows 上,如果你安裝" -"了 :ref:`launcher`,則支援 \"shebang\" 列處理。因此,在 Windows 檔案總管(Windows " -"Explorer)中雙擊已安裝的腳本,應該可以在沒有啟用環境或將其加入 :envvar:`!" -"PATH` 的情況下正確地運行。" +"了 :ref:`launcher`,則支援 \"shebang\" 列處理。因此,在 Windows 檔案總管" +"(Windows Explorer)中雙擊已安裝的腳本,應該可以在沒有啟用環境或將其加入 :" +"envvar:`!PATH` 的情況下正確地運行。" #: ../../library/venv.rst:108 msgid "" @@ -355,8 +356,8 @@ msgid "" "environment is being used." msgstr "" "當虛擬環境被啟用時,:envvar:`!VIRTUAL_ENV` 環境變數會被設置為該環境的路徑。由" -"於不需要明確啟用虛擬環境才能使用它。因此,無法依賴 :envvar:`!VIRTUAL_ENV` 來判" -"斷是否正在使用虛擬環境。" +"於不需要明確啟用虛擬環境才能使用它。因此,無法依賴 :envvar:`!VIRTUAL_ENV` 來" +"判斷是否正在使用虛擬環境。" #: ../../library/venv.rst:114 msgid "" @@ -373,13 +374,13 @@ msgid "" "directory of it, you should recreate the environment in its new location. " "Otherwise, software installed into the environment may not work as expected." msgstr "" -"因為安裝在環境中的腳本不應該預期該環境已經被啟動,所以它們的 shebang 列會包含環境" -"直譯器的絕對路徑。因此,在一般情況下,環境本質上是不可攜帶的。你應該使用一個" -"簡單的方法來重新建立一個環境(例如:如果你有一個名為 ``requirements.txt``的需" -"求檔案,你可以使用環境的 ``pip install -r requirements.txt`` 來安裝環境所需的" -"所有套件)。如果出於某種原因,你需要將環境移至新位置,你應該在所需位置重新建立" -"它,並刪除舊位置的環境。如果你移動環境是因為移動了其父目錄,你應該在新位置重" -"新建立環境。否則,安裝在該環境中的軟體可能無法正常運作。" +"因為安裝在環境中的腳本不應該預期該環境已經被啟動,所以它們的 shebang 列會包含" +"環境直譯器的絕對路徑。因此,在一般情況下,環境本質上是不可攜帶的。你應該使用" +"一個簡單的方法來重新建立一個環境(例如:如果你有一個名為 ``requirements.txt``" +"的需求檔案,你可以使用環境的 ``pip install -r requirements.txt`` 來安裝環境所" +"需的所有套件)。如果出於某種原因,你需要將環境移至新位置,你應該在所需位置重" +"新建立它,並刪除舊位置的環境。如果你移動環境是因為移動了其父目錄,你應該在新" +"位置重新建立環境。否則,安裝在該環境中的軟體可能無法正常運作。" #: ../../library/venv.rst:128 msgid "" From 819c9a6082132129e4f19bcd67b6f1ff8f4cb711 Mon Sep 17 00:00:00 2001 From: Matt Wang Date: Mon, 28 Aug 2023 02:19:13 +0800 Subject: [PATCH 21/21] fix(library/venv): fix incorrect translation --- library/venv.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/venv.po b/library/venv.po index 625a370520..a2c1384326 100644 --- a/library/venv.po +++ b/library/venv.po @@ -239,7 +239,7 @@ msgid "" "the path to the directory containing the virtual environment):" msgstr "" "虛擬環境可以透過位於二進位檔案目錄中的腳本「啟用」(在 POSIX 上為 ``bin``;" -"在 Windows 上為 ``Scripts``)這會將該目錄加入到你的 :envvar:`!PATH`,當你運" +"在 Windows 上為 ``Scripts``)這會將該目錄加入到你的 :envvar:`PATH`,當你運" "行 :program:`python` 時就會調用該環境的直譯器並且執行已安裝的腳本,而不需要使" "用完整的路徑。啟動腳本的方式因平台而異(:samp:`{}` 需要替換成包含虛擬環" "境的目錄路徑)" @@ -342,10 +342,10 @@ msgid "" msgstr "" "為了實現這一點,安裝在虛擬環境中的腳本會有一個 \"shebang\" 列,此列指向該環境" "的 Python 直譯器,例如: :samp:`#!/{}/bin/python`。這代表無論 :" -"envvar:`!PATH` 的值為何,該腳本都會在直譯器上運行。在 Windows 上,如果你安裝" +"envvar:`PATH` 的值為何,該腳本都會在直譯器上運行。在 Windows 上,如果你安裝" "了 :ref:`launcher`,則支援 \"shebang\" 列處理。因此,在 Windows 檔案總管" "(Windows Explorer)中雙擊已安裝的腳本,應該可以在沒有啟用環境或將其加入 :" -"envvar:`!PATH` 的情況下正確地運行。" +"envvar:`PATH` 的情況下正確地運行。" #: ../../library/venv.rst:108 msgid ""