@@ -8,7 +8,7 @@ msgstr ""
88"Project-Id-Version :Python 3.7\n "
99"Report-Msgid-Bugs-To :\n "
1010"POT-Creation-Date :2018-06-26 18:54+0800\n "
11- "PO-Revision-Date :2018-05-23 16:19+0000 \n "
11+ "PO-Revision-Date :2018-08-22 16:21+0800 \n "
1212"Last-Translator :Adrian Liaw <adrianliaw2000@gmail.com>\n "
1313"Language-Team :Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
1414"tw)\n "
@@ -17,10 +17,11 @@ msgstr ""
1717"Content-Type :text/plain; charset=UTF-8\n "
1818"Content-Transfer-Encoding :8bit\n "
1919"Plural-Forms :nplurals=1; plural=0;\n "
20+ "X-Generator :Poedit 2.1.1\n "
2021
2122#: ../../tutorial/venv.rst:6
2223msgid "Virtual Environments and Packages"
23- msgstr ""
24+ msgstr "虛擬環境與套件 "
2425
2526#: ../../tutorial/venv.rst:9
2627msgid "Introduction"
@@ -34,6 +35,9 @@ msgid ""
3435"bug has been fixed or the application may be written using an obsolete "
3536"version of the library's interface."
3637msgstr ""
38+ "Python 應用程式通常會用到不在標準函式庫的套件和模組。應用程式有時候會需要某個"
39+ "特定版本的函式庫,因為這個應用程式可能需要某個特殊的臭蟲修正,或是這個應用程"
40+ "式是根據該函式庫特定版本的介面所撰寫。"
3741
3842#: ../../tutorial/venv.rst:17
3943msgid ""
@@ -43,13 +47,19 @@ msgid ""
4347"are in conflict and installing either version 1.0 or 2.0 will leave one "
4448"application unable to run."
4549msgstr ""
50+ "這意味著不太可能安裝一套 Python 就可以滿足所有應用程式的要求。如果應用程式 A "
51+ "需要一個特定的模組的 1.0 版,但另外一個應用程式 B 需要 2.0 版,那麼這整個需求"
52+ "不管安裝 1.0 或是 2.0 都會衝突,以致於應用程式無法使用。"
4653
4754#: ../../tutorial/venv.rst:23
4855msgid ""
4956"The solution for this problem is to create a :term:`virtual environment`, a "
5057"self-contained directory tree that contains a Python installation for a "
5158"particular version of Python, plus a number of additional packages."
5259msgstr ""
60+ "解決方案是創建一個\\ :term:`虛擬環境(virtual environment) <virtual "
61+ "environment>`,這是一個獨立的資料夾,並且裡面裝好了特定版本的 Python,以及一"
62+ "系列相關的套件。"
5363
5464#: ../../tutorial/venv.rst:27
5565msgid ""
@@ -60,10 +70,14 @@ msgid ""
6070"application B requires a library be upgraded to version 3.0, this will not "
6171"affect application A's environment."
6272msgstr ""
73+ "不同的應用程式可以使用不同的虛擬環境。以前述中需要被解決的例子中,應用程式 A "
74+ "能夠擁有它自己的虛擬環境,並且是裝好 1.0 版,然而應用程式 B 則可以是用另外一"
75+ "個有 2.0 版的虛擬環境。要是應用程式 B 需要某個函式庫被升級到 3.0 版,這並不會"
76+ "影響到應用程式 A 的環境。"
6377
6478#: ../../tutorial/venv.rst:36
6579msgid "Creating Virtual Environments"
66- msgstr ""
80+ msgstr "建立虛擬環境 "
6781
6882#: ../../tutorial/venv.rst:38
6983msgid ""
@@ -73,39 +87,57 @@ msgid ""
7387"system, you can select a specific Python version by running ``python3`` or "
7488"whichever version you want."
7589msgstr ""
90+ "用來建立與管理虛擬環境的模組叫做 :mod:`venv`。:mod:`venv` 通常會安裝你能夠取"
91+ "得的最新版本的 Python。要是你的系統有不同版本的 Python,你可以透過 "
92+ "``python3`` 這個指令選擇特定或是任意版本的 Python。"
7693
7794#: ../../tutorial/venv.rst:44
7895msgid ""
7996"To create a virtual environment, decide upon a directory where you want to "
8097"place it, and run the :mod:`venv` module as a script with the directory "
8198"path::"
8299msgstr ""
100+ "在建立虛擬環境的時候,在你決定要放該虛擬環境的資料夾之後,在 script 中執行 :"
101+ "mod:`venv` 模組並且給定資料夾 path:\n"
102+ "\n"
103+ "::"
83104
84105#: ../../tutorial/venv.rst:49
85106msgid ""
86107"This will create the ``tutorial-env`` directory if it doesn't exist, and "
87108"also create directories inside it containing a copy of the Python "
88109"interpreter, the standard library, and various supporting files."
89110msgstr ""
111+ "如果 ``tutorial-env`` 不存在的話,這會建立 ``tutorial-env`` 資料夾,並且也會"
112+ "在裡面建立一個有 Python 直譯器的複本、標準函式庫、以及不同的支援檔案的資料"
113+ "夾。"
90114
91115#: ../../tutorial/venv.rst:53
92116msgid "Once you've created a virtual environment, you may activate it."
93- msgstr ""
117+ msgstr "一旦你建立了一個虛擬環境,你可以啟動他。 "
94118
95119#: ../../tutorial/venv.rst:55
96120msgid "On Windows, run::"
97121msgstr ""
122+ "在 Windows 系統中,使用:\n"
123+ "\n"
124+ "::"
98125
99126#: ../../tutorial/venv.rst:59
100127msgid "On Unix or MacOS, run::"
101128msgstr ""
129+ "在 Unix 或 MacOS 系統,使用:\n"
130+ "\n"
131+ "::"
102132
103133#: ../../tutorial/venv.rst:63
104134msgid ""
105135"(This script is written for the bash shell. If you use the :program:`csh` "
106136"or :program:`fish` shells, there are alternate ``activate.csh`` and "
107137"``activate.fish`` scripts you should use instead.)"
108138msgstr ""
139+ "(這段程式碼適用於 bash shell。如果你是用 :program:`csh` 或者 :program:"
140+ "`fish` shell,應當使用替代的 ``activate.csh`` 與 ``activate.fish`` 腳本。)"
109141
110142#: ../../tutorial/venv.rst:68
111143msgid ""
@@ -114,10 +146,12 @@ msgid ""
114146"running ``python`` will get you that particular version and installation of "
115147"Python. For example:"
116148msgstr ""
149+ "啟動虛擬環境會改變你的 shell 提示字元來顯示你正在使用的虛擬環境,並且修改環境"
150+ "以讓你在執行 ``python`` 的時候可以得到特定的 Python 版本,例如說:"
117151
118152#: ../../tutorial/venv.rst:87
119153msgid "Managing Packages with pip"
120- msgstr ""
154+ msgstr "用 pip 管理套件 "
121155
122156#: ../../tutorial/venv.rst:89
123157msgid ""
@@ -127,25 +161,31 @@ msgid ""
127161"by going to it in your web browser, or you can use ``pip``'s limited search "
128162"feature:"
129163msgstr ""
164+ "你可以使用一個叫做 :program:`pip` 的程式來安裝、升級和移除套件。``pip`` 預設"
165+ "會從 Python Package Index <https://pypi.org> 安裝套件。你可以透過你的瀏覽器"
166+ "瀏覽 Python Package Index,或是使用 ``pip`` 的限定搜索功能:"
130167
131168#: ../../tutorial/venv.rst:105
132169msgid ""
133170"``pip`` has a number of subcommands:\" search\" ,\" install\" ,\" uninstall\" , "
134171"\" freeze\" , etc. (Consult the :ref:`installing-index` guide for complete "
135172"documentation for ``pip``.)"
136173msgstr ""
174+ "``pip`` 有好幾個子指令:\" search\" 、\" install\" 、\" uninstall\" 、\" freeze\" 等"
175+ "等。(這可以參考\\ :ref:`installing-index`\\ 說明書來取得 ``pip`` 的完整文件"
176+ "說明。)"
137177
138178#: ../../tutorial/venv.rst:109
139179msgid ""
140180"You can install the latest version of a package by specifying a package's "
141181"name:"
142- msgstr ""
182+ msgstr "你可以透過指定套件名字來安裝最新版本的套件: "
143183
144184#: ../../tutorial/venv.rst:120
145185msgid ""
146186"You can also install a specific version of a package by giving the package "
147187"name followed by ``==`` and the version number:"
148- msgstr ""
188+ msgstr "你也可以透過在套件名稱之後接上 ``==`` 和版號來指定特定版本: "
149189
150190#: ../../tutorial/venv.rst:131
151191msgid ""
@@ -154,36 +194,44 @@ msgid ""
154194"number to get that version, or you can run ``pip install --upgrade`` to "
155195"upgrade the package to the latest version:"
156196msgstr ""
197+ "要是你重新執行此指令,``pip`` 會知道該版本已經安裝過,然後什麼也不做。你可以"
198+ "提供不同的版本號碼來取得該版本,或是可以執行 ``pip install --upgrade`` 來把套"
199+ "件升級到最新的版本:"
157200
158201#: ../../tutorial/venv.rst:146
159202msgid ""
160203"``pip uninstall`` followed by one or more package names will remove the "
161204"packages from the virtual environment."
162- msgstr ""
205+ msgstr "``pip uninstall`` 後面接一個或是多個套件名稱可以從虛擬環境中移除套件。 "
163206
164207#: ../../tutorial/venv.rst:149
165208msgid "``pip show`` will display information about a particular package:"
166- msgstr ""
209+ msgstr "``pip show`` 可以顯示一個特定套件的資訊: "
167210
168211#: ../../tutorial/venv.rst:166
169212msgid ""
170213"``pip list`` will display all of the packages installed in the virtual "
171214"environment:"
172- msgstr ""
215+ msgstr "``pip list`` 會顯示虛擬環境中所有已經安裝的套件: "
173216
174217#: ../../tutorial/venv.rst:178
175218msgid ""
176219"``pip freeze`` will produce a similar list of the installed packages, but "
177220"the output uses the format that ``pip install`` expects. A common convention "
178221"is to put this list in a ``requirements.txt`` file:"
179222msgstr ""
223+ "``pip freeze`` 可以複製一整個已經安裝的套件清單,但是輸出使用 ``pip "
224+ "install`` 可以讀懂的格式。一個常見的慣例是放這整個清單到一個叫做 "
225+ "``requirements.txt`` 的檔案:"
180226
181227#: ../../tutorial/venv.rst:190
182228msgid ""
183229"The ``requirements.txt`` can then be committed to version control and "
184230"shipped as part of an application. Users can then install all the necessary "
185231"packages with ``install -r``:"
186232msgstr ""
233+ "``requirements.txt`` 可以提交到版本控制,並且作為釋出應用程式的一部分。使用者"
234+ "可以透過 ``install -r`` 安裝對應的的套件:"
187235
188236#: ../../tutorial/venv.rst:207
189237msgid ""
@@ -192,3 +240,6 @@ msgid ""
192240"want to make it available on the Python Package Index, consult the :ref:"
193241"`distributing-index` guide."
194242msgstr ""
243+ "``pip`` 還有更多功能。可以參考\\ :ref:`installing-index`\\ 說明書來取得完整"
244+ "的 ``pip`` 參考資料。當你撰寫了一個套件並且想要讓它可以在 Python Package "
245+ "Index 上可以取得的話,可以參考\\ :ref:`distributing-index`\\ 說明。"