Skip to content

Commit ec24680

Browse files
committed
merged the changes (r369:550) for Japanese translation in scripts.rst
1 parent 867e017 commit ec24680

File tree

1 file changed

+77
-23
lines changed

1 file changed

+77
-23
lines changed

docs/ja/scripts.rst

Lines changed: 77 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616
1717
エンドユーザのカスタマイズスクリプトは *読み込み* (シェル環境を変更できる) されるか、適切な条件で外部プログラムのように *実行* されるかのどちらかです。
1818

19+
..
20+
The global scripts applied to all environments should be placed in the
21+
directory named by :ref:`VIRTUALENVWRAPPER_HOOK_DIR
22+
<variable-VIRTUALENVWRAPPER_HOOK_DIR>`. The local scripts should be
23+
placed in the ``bin`` directory of the virtualenv.
24+
25+
全ての環境に適用されるグローバルスクリプトは、 :ref:`VIRTUALENVWRAPPER_HOOK_DIR <variable-VIRTUALENVWRAPPER_HOOK_DIR>` で指定したディレクトリに置きます。ローカルスクリプトは virtualenv の ``bin`` ディレクトリに置きます。
26+
1927
.. _scripts-get_env_details:
2028

2129
get_env_details
@@ -30,12 +38,12 @@ get_env_details
3038
:読み込み/実行: 実行
3139

3240
..
33-
``$WORKON_HOME/get_env_details`` is run when ``workon`` is run with no
41+
``$VIRTUALENVWRAPPER_HOOK_DIR/get_env_details`` is run when ``workon`` is run with no
3442
arguments and a list of the virtual environments is printed. The hook
3543
is run once for each environment, after the name is printed, and can
3644
print additional information about that environment.
3745
38-
``$WORKON_HOME/get_env_details`` は ``workon`` が引数無しで実行されるときに実行されます。そして、仮想環境のリストを表示します。仮想環境の名前が表示された後で、そのフックは環境毎に一度実行されて、その環境に関する追加情報を表示します。
46+
``$VIRTUALENVWRAPPER_HOOK_DIR/get_env_details`` は ``workon`` が引数無しで実行されるときに実行されます。そして、仮想環境のリストを表示します。仮想環境の名前が表示された後で、そのフックは環境毎に一度実行されて、その環境に関する追加情報を表示します。
3947

4048
.. _scripts-initialize:
4149

@@ -51,11 +59,11 @@ initialize
5159
:読み込み/実行: 読み込み
5260

5361
..
54-
``$WORKON_HOME/initialize`` is sourced when ``virtualenvwrapper.sh``
62+
``$VIRTUALENVWRAPPER_HOOK_DIR/initialize`` is sourced when ``virtualenvwrapper.sh``
5563
is loaded into your environment. Use it to adjust global settings
5664
when virtualenvwrapper is enabled.
5765
58-
あなたの環境に ``virtualenvwrapper.sh`` を読み込むときに ``$WORKON_HOME/initialize`` が読み込まれます。virtualenvwrapper が有効になるときにグローバルな設定を調整するために使用してください。
66+
あなたの環境に ``virtualenvwrapper.sh`` を読み込むときに ``$VIRTUALENVWRAPPER_HOOK_DIR/initialize`` が読み込まれます。virtualenvwrapper が有効になるときにグローバルな設定を調整するために使用してください。
5967

6068
.. _scripts-premkvirtualenv:
6169

@@ -71,13 +79,13 @@ premkvirtualenv
7179
:読み込み/実行: 実行
7280

7381
..
74-
``$WORKON_HOME/premkvirtualenv`` is run as an external program after
82+
``$VIRTUALENVWRAPPER_HOOK_DIR/premkvirtualenv`` is run as an external program after
7583
the virtual environment is created but before the current environment
7684
is switched to point to the new env. The current working directory for
7785
the script is ``$WORKON_HOME`` and the name of the new environment is
7886
passed as an argument to the script.
7987
80-
``$WORKON_HOME/premkvirtualenv`` は仮想環境が作成された後で外部プログラムのように実行されますが、カレントの環境が新しい環境へ切り替わる前に実行されます。そのスクリプトのカレントワークディレクトリは ``$WORKON_HOME`` で、そのスクリプトへの引数として新しい環境の名前が渡されます。
88+
``$VIRTUALENVWRAPPER_HOOK_DIR/premkvirtualenv`` は仮想環境が作成された後で外部プログラムのように実行されますが、カレントの環境が新しい環境へ切り替わる前に実行されます。そのスクリプトのカレントワークディレクトリは ``$WORKON_HOME`` で、そのスクリプトへの引数として新しい環境の名前が渡されます。
8189

8290
.. _scripts-postmkvirtualenv:
8391

@@ -93,10 +101,11 @@ postmkvirtualenv
93101
:読み込み/実行: 読み込み
94102

95103
..
96-
``$WORKON_HOME/postmkvirtualenv`` is sourced after the new environment
97-
is created and activated.
104+
``$VIRTUALENVWRAPPER_HOOK_DIR/postmkvirtualenv`` is sourced after the new environment
105+
is created and activated. If the ``-a`` <project_path> flag was used,
106+
the link to the project directory is set up before this script is sourced.
98107
99-
``$WORKON_HOME/postmkvirtualenv`` は新しい環境が作成されてアクティブ化された後で読み込まれます
108+
``$VIRTUALENVWRAPPER_HOOK_DIR/postmkvirtualenv`` は、新しい環境が作成されてアクティブ化された後で読み込まれます。 ``-a`` <project_path> フラグを指定された場合、このスクリプトを読み込む前にプロジェクトディレクトリへのリンクを設定します
100109

101110
.. _scripts-precpvirtualenv:
102111

@@ -112,14 +121,14 @@ precpvirtualenv
112121
:読み込み/実行: 実行
113122

114123
..
115-
``$WORKON_HOME/precpvirtualenv`` is run as an external program after
124+
``$VIRTUALENVWRAPPER_HOOK_DIR/precpvirtualenv`` is run as an external program after
116125
the source environment is duplicated and made relocatable, but before
117126
the ``premkvirtualenv`` hook is run or the current environment is
118127
switched to point to the new env. The current working directory for
119128
the script is ``$WORKON_HOME`` and the names of the source and new
120129
environments are passed as arguments to the script.
121130
122-
``$WORKON_HOME/precpvirtualenv`` は元の環境が複製されて再配置可能になるときに外部プログラムのように実行されますが、 ``premkvirtualenv`` フックが実行される前、もしくはカレントの環境が新しい環境へ切り替わる前に実行されます。そのスクリプトのカレントワークディレクトリは ``$WORKON_HOME`` で、そのスクリプトへの引数として元の環境名と新しい環境名が渡されます。
131+
``$VIRTUALENVWRAPPER_HOOK_DIR/precpvirtualenv`` は元の環境が複製されて再配置可能になるときに外部プログラムのように実行されますが、 ``premkvirtualenv`` フックが実行される前、もしくはカレントの環境が新しい環境へ切り替わる前に実行されます。そのスクリプトのカレントワークディレクトリは ``$WORKON_HOME`` で、そのスクリプトへの引数として元の環境名と新しい環境名が渡されます。
123132

124133
.. _scripts-postcpvirtualenv:
125134

@@ -135,10 +144,10 @@ postcpvirtualenv
135144
:読み込み/実行: 読み込み
136145

137146
..
138-
``$WORKON_HOME/postmkvirtualenv`` is sourced after the new environment
147+
``$VIRTUALENVWRAPPER_HOOK_DIR/postcpvirtualenv`` is sourced after the new environment
139148
is created and activated.
140149
141-
``$WORKON_HOME/postmkvirtualenv`` は新しい環境が作成されてアクティブ化された後で読み込まれます。
150+
``$VIRTUALENVWRAPPER_HOOK_DIR/postcpvirtualenv`` は新しい環境が作成されてアクティブ化された後で読み込まれます。
142151

143152
.. _scripts-preactivate:
144153

@@ -154,11 +163,11 @@ preactivate
154163
:読み込み/実行: 実行
155164

156165
..
157-
The global ``$WORKON_HOME/preactivate`` script is run before the new
166+
The global ``$VIRTUALENVWRAPPER_HOOK_DIR/preactivate`` script is run before the new
158167
environment is enabled. The environment name is passed as the first
159168
argument.
160169
161-
グローバルの ``$WORKON_HOME/preactivate`` スクリプトは新しい仮想環境が有効になる前に実行されます。その環境名は1番目の引数として渡されます。
170+
グローバルの ``$VIRTUALENVWRAPPER_HOOK_DIR/preactivate`` スクリプトは新しい仮想環境が有効になる前に実行されます。その環境名は1番目の引数として渡されます。
162171

163172
..
164173
The local ``$VIRTUAL_ENV/bin/preactivate`` hook is run before the new
@@ -181,11 +190,11 @@ postactivate
181190
:読み込み/実行: 読み込み
182191

183192
..
184-
The global ``$WORKON_HOME/postactivate`` script is sourced after the
193+
The global ``$VIRTUALENVWRAPPER_HOOK_DIR/postactivate`` script is sourced after the
185194
new environment is enabled. ``$VIRTUAL_ENV`` refers to the new
186195
environment at the time the script runs.
187196
188-
グローバルの ``$WORKON_HOME/postactivate`` スクリプトは新しい仮想環境が有効になった後で読み込まれます。 ``$VIRTUAL_ENV`` はそのスクリプトが実行されるときに新しい環境を参照します。
197+
グローバルの ``$VIRTUALENVWRAPPER_HOOK_DIR/postactivate`` スクリプトは新しい仮想環境が有効になった後で読み込まれます。 ``$VIRTUAL_ENV`` はそのスクリプトが実行されるときに新しい環境を参照します。
189198

190199
..
191200
This example script adds a space between the virtual environment name
@@ -239,11 +248,11 @@ predeactivate
239248
ローカルの ``$VIRTUAL_ENV/bin/predeactivate`` スクリプトはカレントの仮想環境が非アクティブ化される前に読み込まれます。そして、あなたの環境の設定をクリアしたり、無効にするために使用されます。 ``$VIRTUAL_ENV`` はそのスクリプトが実行されるときに古い環境を参照します。
240249

241250
..
242-
The global ``$WORKON_HOME/predeactivate`` script is sourced before the
251+
The global ``$VIRTUALENVWRAPPER_HOOK_DIR/predeactivate`` script is sourced before the
243252
current environment is deactivated. ``$VIRTUAL_ENV`` refers to the
244253
old environment at the time the script runs.
245254
246-
グローバルの ``$WORKON_HOME/predeactivate`` スクリプトはカレントの仮想環境が非アクティブ化される前に読み込まれます。 ``$VIRTUAL_ENV`` はそのスクリプトが実行されるときに古い環境を参照します。
255+
グローバルの ``$VIRTUALENVWRAPPER_HOOK_DIR/predeactivate`` スクリプトはカレントの仮想環境が非アクティブ化される前に読み込まれます。 ``$VIRTUAL_ENV`` はそのスクリプトが実行されるときに古い環境を参照します。
247256

248257
.. _scripts-postdeactivate:
249258

@@ -280,11 +289,11 @@ prermvirtualenv
280289
:読み込み/実行: 実行
281290

282291
..
283-
The ``$WORKON_HOME/prermvirtualenv`` script is run as an external
292+
The ``$VIRTUALENVWRAPPER_HOOK_DIR/prermvirtualenv`` script is run as an external
284293
program before the environment is removed. The full path to the
285294
environment directory is passed as an argument to the script.
286295
287-
``$WORKON_HOME/prermvirtualenv`` スクリプトは仮想環境が削除される前に外部コマンドのように実行されます。そのスクリプトへの引数としてその環境のディレクトリに対するフルパスが渡されます。
296+
``$VIRTUALENVWRAPPER_HOOK_DIR/prermvirtualenv`` スクリプトは仮想環境が削除される前に外部コマンドのように実行されます。そのスクリプトへの引数としてその環境のディレクトリに対するフルパスが渡されます。
288297

289298
.. _scripts-postrmvirtualenv:
290299

@@ -300,8 +309,53 @@ postrmvirtualenv
300309
:読み込み/実行: 実行
301310

302311
..
303-
The ``$WORKON_HOME/postrmvirtualenv`` script is run as an external
312+
The ``$VIRTUALENVWRAPPER_HOOK_DIR/postrmvirtualenv`` script is run as an external
304313
program after the environment is removed. The full path to the
305314
environment directory is passed as an argument to the script.
306315
307-
``$WORKON_HOME/postrmvirtualenv`` スクリプトは仮想環境が削除された後で外部コマンドのように実行されます。そのスクリプトへの引数としてその環境のディレクトリに対するフルパスが渡されます。
316+
``$VIRTUALENVWRAPPER_HOOK_DIR/postrmvirtualenv`` スクリプトは仮想環境が削除された後で外部コマンドのように実行されます。そのスクリプトへの引数としてその環境のディレクトリに対するフルパスが渡されます。
317+
318+
.. _scripts-premkproject:
319+
320+
premkproject
321+
===============
322+
323+
.. :Global/Local: global
324+
:Argument(s): name of new project
325+
:Sourced/Run: run
326+
327+
:グローバル/ローカル: グローバル
328+
:引数: 新しいプロジェクト名
329+
:読み込み/実行: 実行
330+
331+
..
332+
``$WORKON_HOME/premkproject`` is run as an external program after the
333+
virtual environment is created and after the current environment is
334+
switched to point to the new env, but before the new project directory
335+
is created. The current working directory for the script is
336+
``$PROJECT_HOME`` and the name of the new project is passed as an
337+
argument to the script.
338+
339+
``$WORKON_HOME/premkproject`` は、仮想環境が作成されてカレントの環境が新しい環境を指すように切り替わった後で、外部プログラムとして実行されます。
340+
但し、そのタイミングは新しいプロジェクトディレクトリが作成される前です。
341+
このスクリプトのカレントのワークディレクトリは ``$PROJECT_HOME`` となり、新しいプロジェクト名がこのスクリプトの引数として渡されます。
342+
343+
.. _scripts-postmkproject:
344+
345+
postmkproject
346+
================
347+
348+
.. :Global/Local: global
349+
:Argument(s): none
350+
:Sourced/Run: sourced
351+
352+
:グローバル/ローカル: グローバル
353+
:引数: 無し
354+
:読み込み/実行: 読み込み
355+
356+
..
357+
``$WORKON_HOME/postmkproject`` is sourced after the new environment
358+
and project directories are created and the virtualenv is activated.
359+
The current working directory is the project directory.
360+
361+
``$WORKON_HOME/postmkproject`` は、新しい環境とプロジェクトディレクトリが作成されて virtualenv がアクティブ化された後で読み込まれます。カレントのワークディレクトリはプロジェクトディレクトリです。

0 commit comments

Comments
 (0)