@@ -8,7 +8,7 @@ msgstr ""
8
8
"Project-Id-Version : Python 3.7\n "
9
9
"Report-Msgid-Bugs-To : \n "
10
10
"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 "
12
12
"Last-Translator : Adrian Liaw <adrianliaw2000@gmail.com>\n "
13
13
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
14
14
"tw)\n "
@@ -17,10 +17,11 @@ msgstr ""
17
17
"Content-Type : text/plain; charset=UTF-8\n "
18
18
"Content-Transfer-Encoding : 8bit\n "
19
19
"Plural-Forms : nplurals=1; plural=0;\n "
20
+ "X-Generator : Poedit 2.1.1\n "
20
21
21
22
#: ../../tutorial/venv.rst:6
22
23
msgid "Virtual Environments and Packages"
23
- msgstr ""
24
+ msgstr "虛擬環境與套件 "
24
25
25
26
#: ../../tutorial/venv.rst:9
26
27
msgid "Introduction"
@@ -34,6 +35,9 @@ msgid ""
34
35
"bug has been fixed or the application may be written using an obsolete "
35
36
"version of the library's interface."
36
37
msgstr ""
38
+ "Python 應用程式通常會用到不在標準函式庫的套件和模組。應用程式有時候會需要某個"
39
+ "特定版本的函式庫,因為這個應用程式可能需要某個特殊的臭蟲修正,或是這個應用程"
40
+ "式是根據該函式庫特定版本的介面所撰寫。"
37
41
38
42
#: ../../tutorial/venv.rst:17
39
43
msgid ""
@@ -43,13 +47,19 @@ msgid ""
43
47
"are in conflict and installing either version 1.0 or 2.0 will leave one "
44
48
"application unable to run."
45
49
msgstr ""
50
+ "這意味著不太可能安裝一套 Python 就可以滿足所有應用程式的要求。如果應用程式 A "
51
+ "需要一個特定的模組的 1.0 版,但另外一個應用程式 B 需要 2.0 版,那麼這整個需求"
52
+ "不管安裝 1.0 或是 2.0 都會衝突,以致於應用程式無法使用。"
46
53
47
54
#: ../../tutorial/venv.rst:23
48
55
msgid ""
49
56
"The solution for this problem is to create a :term:`virtual environment`, a "
50
57
"self-contained directory tree that contains a Python installation for a "
51
58
"particular version of Python, plus a number of additional packages."
52
59
msgstr ""
60
+ "解決方案是創建一個\\ :term:`虛擬環境(virtual environment) <virtual "
61
+ "environment>`,這是一個獨立的資料夾,並且裡面裝好了特定版本的 Python,以及一"
62
+ "系列相關的套件。"
53
63
54
64
#: ../../tutorial/venv.rst:27
55
65
msgid ""
@@ -60,10 +70,14 @@ msgid ""
60
70
"application B requires a library be upgraded to version 3.0, this will not "
61
71
"affect application A's environment."
62
72
msgstr ""
73
+ "不同的應用程式可以使用不同的虛擬環境。以前述中需要被解決的例子中,應用程式 A "
74
+ "能夠擁有它自己的虛擬環境,並且是裝好 1.0 版,然而應用程式 B 則可以是用另外一"
75
+ "個有 2.0 版的虛擬環境。要是應用程式 B 需要某個函式庫被升級到 3.0 版,這並不會"
76
+ "影響到應用程式 A 的環境。"
63
77
64
78
#: ../../tutorial/venv.rst:36
65
79
msgid "Creating Virtual Environments"
66
- msgstr ""
80
+ msgstr "建立虛擬環境 "
67
81
68
82
#: ../../tutorial/venv.rst:38
69
83
msgid ""
@@ -73,39 +87,57 @@ msgid ""
73
87
"system, you can select a specific Python version by running ``python3`` or "
74
88
"whichever version you want."
75
89
msgstr ""
90
+ "用來建立與管理虛擬環境的模組叫做 :mod:`venv`。:mod:`venv` 通常會安裝你能夠取"
91
+ "得的最新版本的 Python。要是你的系統有不同版本的 Python,你可以透過 "
92
+ "``python3`` 這個指令選擇特定或是任意版本的 Python。"
76
93
77
94
#: ../../tutorial/venv.rst:44
78
95
msgid ""
79
96
"To create a virtual environment, decide upon a directory where you want to "
80
97
"place it, and run the :mod:`venv` module as a script with the directory "
81
98
"path::"
82
99
msgstr ""
100
+ "在建立虛擬環境的時候,在你決定要放該虛擬環境的資料夾之後,在 script 中執行 :"
101
+ "mod:`venv` 模組並且給定資料夾 path:\n"
102
+ "\n"
103
+ "::"
83
104
84
105
#: ../../tutorial/venv.rst:49
85
106
msgid ""
86
107
"This will create the ``tutorial-env`` directory if it doesn't exist, and "
87
108
"also create directories inside it containing a copy of the Python "
88
109
"interpreter, the standard library, and various supporting files."
89
110
msgstr ""
111
+ "如果 ``tutorial-env`` 不存在的話,這會建立 ``tutorial-env`` 資料夾,並且也會"
112
+ "在裡面建立一個有 Python 直譯器的複本、標準函式庫、以及不同的支援檔案的資料"
113
+ "夾。"
90
114
91
115
#: ../../tutorial/venv.rst:53
92
116
msgid "Once you've created a virtual environment, you may activate it."
93
- msgstr ""
117
+ msgstr "一旦你建立了一個虛擬環境,你可以啟動他。 "
94
118
95
119
#: ../../tutorial/venv.rst:55
96
120
msgid "On Windows, run::"
97
121
msgstr ""
122
+ "在 Windows 系統中,使用:\n"
123
+ "\n"
124
+ "::"
98
125
99
126
#: ../../tutorial/venv.rst:59
100
127
msgid "On Unix or MacOS, run::"
101
128
msgstr ""
129
+ "在 Unix 或 MacOS 系統,使用:\n"
130
+ "\n"
131
+ "::"
102
132
103
133
#: ../../tutorial/venv.rst:63
104
134
msgid ""
105
135
"(This script is written for the bash shell. If you use the :program:`csh` "
106
136
"or :program:`fish` shells, there are alternate ``activate.csh`` and "
107
137
"``activate.fish`` scripts you should use instead.)"
108
138
msgstr ""
139
+ "(這段程式碼適用於 bash shell。如果你是用 :program:`csh` 或者 :program:"
140
+ "`fish` shell,應當使用替代的 ``activate.csh`` 與 ``activate.fish`` 腳本。)"
109
141
110
142
#: ../../tutorial/venv.rst:68
111
143
msgid ""
@@ -114,10 +146,12 @@ msgid ""
114
146
"running ``python`` will get you that particular version and installation of "
115
147
"Python. For example:"
116
148
msgstr ""
149
+ "啟動虛擬環境會改變你的 shell 提示字元來顯示你正在使用的虛擬環境,並且修改環境"
150
+ "以讓你在執行 ``python`` 的時候可以得到特定的 Python 版本,例如說:"
117
151
118
152
#: ../../tutorial/venv.rst:87
119
153
msgid "Managing Packages with pip"
120
- msgstr ""
154
+ msgstr "用 pip 管理套件 "
121
155
122
156
#: ../../tutorial/venv.rst:89
123
157
msgid ""
@@ -127,25 +161,31 @@ msgid ""
127
161
"by going to it in your web browser, or you can use ``pip``'s limited search "
128
162
"feature:"
129
163
msgstr ""
164
+ "你可以
F438
使用一個叫做 :program:`pip` 的程式來安裝、升級和移除套件。``pip`` 預設"
165
+ "會從 Python Package Index <https://pypi.org> 安裝套件。你可以透過你的瀏覽器"
166
+ "瀏覽 Python Package Index,或是使用 ``pip`` 的限定搜索功能:"
130
167
131
168
#: ../../tutorial/venv.rst:105
132
169
msgid ""
133
170
"``pip`` has a number of subcommands: \" search\" , \" install\" , \" uninstall\" , "
134
171
"\" freeze\" , etc. (Consult the :ref:`installing-index` guide for complete "
135
172
"documentation for ``pip``.)"
136
173
msgstr ""
174
+ "``pip`` 有好幾個子指令:\" search\" 、\" install\" 、\" uninstall\" 、\" freeze\" 等"
175
+ "等。(這可以參考\\ :ref:`installing-index`\\ 說明書來取得 ``pip`` 的完整文件"
176
+ "說明。)"
137
177
138
178
#: ../../tutorial/venv.rst:109
139
179
msgid ""
140
180
"You can install the latest version of a package by specifying a package's "
141
181
"name:"
142
- msgstr ""
182
+ msgstr "你可以透過指定套件名字來安裝最新版本的套件: "
143
183
144
184
#: ../../tutorial/venv.rst:120
145
185
msgid ""
146
186
"You can also install a specific version of a package by giving the package "
147
187
"name followed by ``==`` and the version number:"
148
- msgstr ""
188
+ msgstr "你也可以透過在套件名稱之後接上 ``==`` 和版號來指定特定版本: "
149
189
150
190
#: ../../tutorial/venv.rst:131
151
191
msgid ""
@@ -154,36 +194,44 @@ msgid ""
154
194
"number to get that version, or you can run ``pip install --upgrade`` to "
155
195
"upgrade the package to the latest version:"
156
196
msgstr ""
197
+ "要是你重新執行此指令,``pip`` 會知道該版本已經安裝過,然後什麼也不做。你可以"
198
+ "提供不同的版本號碼來取得該版本,或是可以執行 ``pip install --upgrade`` 來把套"
199
+ "件升級到最新的版本:"
157
200
158
201
#: ../../tutorial/venv.rst:146
159
202
msgid ""
160
203
"``pip uninstall`` followed by one or more package names will remove the "
161
204
"packages from the virtual environment."
162
- msgstr ""
205
+ msgstr "``pip uninstall`` 後面接一個或是多個套件名稱可以從虛擬環境中移除套件。 "
163
206
164
207
#: ../../tutorial/venv.rst:149
165
208
msgid "``pip show`` will display information about a particular package:"
166
- msgstr ""
209
+ msgstr "``pip show`` 可以顯示一個特定套件的資訊: "
167
210
168
211
#: ../../tutorial/venv.rst:166
169
212
msgid ""
170
213
"``pip list`` will display all of the packages installed in the virtual "
171
214
"environment:"
172
- msgstr ""
215
+ msgstr "``pip list`` 會顯示虛擬環境中所有已經安裝的套件: "
173
216
174
217
#: ../../tutorial/venv.rst:178
175
218
msgid ""
176
219
"``pip freeze`` will produce a similar list of the installed packages, but "
177
220
"the output uses the format that ``pip install`` expects. A common convention "
178
221
"is to put this list in a ``requirements.txt`` file:"
179
222
msgstr ""
223
+ "``pip freeze`` 可以複製一整個已經安裝的套件清單,但是輸出使用 ``pip "
224
+ "install`` 可以讀懂的格式。一個常見的慣例是放這整個清單到一個叫做 "
225
+ "``requirements.txt`` 的檔案:"
180
226
181
227
#: ../../tutorial/venv.rst:190
182
228
msgid ""
183
229
"The ``requirements.txt`` can then be committed to version control and "
184
230
"shipped as part of an application. Users can then install all the necessary "
185
231
"packages with ``install -r``:"
186
232
msgstr ""
233
+ "``requirements.txt`` 可以提交到版本控制,並且作為釋出應用程式的一部分。使用者"
234
+ "可以透過 ``install -r`` 安裝對應的的套件:"
187
235
188
236
#: ../../tutorial/venv.rst:207
189
237
msgid ""
@@ -192,3 +240,6 @@ msgid ""
192
240
"want to make it available on the Python Package Index, consult the :ref:"
193
241
"`distributing-index` guide."
194
242
msgstr ""
243
+ "``pip`` 還有更多功能。可以參考\\ :ref:`installing-index`\\ 說明書來取得完整"
244
+ "的 ``pip`` 參考資料。當你撰寫了一個套件並且想要讓它可以在 Python Package "
245
+ "Index 上可以取得的話,可以參考\\ :ref:`distributing-index`\\ 說明。"
0 commit comments