Changes between Version 1 and Version 2 of TracPlugins


Ignore:
Timestamp:
Dec 31, 2005, 5:43:43 PM (18 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracPlugins

    v1 v2  
    1 = Trac Plugins =
     1= Trac プラグイン =
    22[[TracGuideToc]]
    33
    4 Since version 0.9, Trac supports plugins that extend the built-in functionality. The plugin functionality is based on the [http://projects.edgewall.com/trac/wiki/TracDev/ComponentArchitecture component architecture].
     4バージョン 0.9 以降、 Trac はプラグインをサポートし、組み込み機能を拡張できるようになりました。プラグインの機能は [http://projects.edgewall.com/trac/wiki/TracDev/ComponentArchitecture コンポーネント設計] に基づいています。
    55
    6 == Requirements ==
     6== 必要条件 ==
    77
    8 To use plugins in Trac, you need to have [http://peak.telecommunity.com/DevCenter/setuptools setuptools] (version 0.6) installed.
     8Trac のプラグインを使用するためには、 [http://peak.telecommunity.com/DevCenter/setuptools setuptools] (バージョン 0.6) をインストールしなければなりません。
    99
    10 To install `setuptools`, download the bootstrap module [http://peak.telecommunity.com/dist/ez_setup.py ez_setup.py] and execute it as follows:
     10`setuptools` をインストールするために、ブートストラップモジュールである[http://peak.telecommunity.com/dist/ez_setup.py ez_setup.py]をダウンロードし、以下に示すように実行して下さい:
    1111{{{
    1212$ python ez_setup.py
    1313}}}
    1414
    15 If the `ez_setup.py` script fails to install the setuptools release, you can download it from [http://www.python.org/pypi/setuptools PyPI] and install it manually.
     15もし `ez_setup.py` スクリプトが setuptools のインストールに失敗したら、 [http://www.python.org/pypi/setuptools PyPI] をダウンロードして手動でインストールしてください。
    1616
    17 == Installing a Trac Plugin ==
     17== Trac プラグインのインストール ==
    1818
    19 === For a Single Project ===
     19=== 単一のプロジェクト ===
    2020
    21 Plugins are packaged as [http://peak.telecommunity.com/DevCenter/PythonEggs Python eggs]. That means they are ZIP archives with the file extension `.egg`. If you have downloaded a source distribution of a plugin, you can run:
     21プラグインは [http://peak.telecommunity.com/DevCenter/PythonEggs Python eggs] としてパッケージ化されています。つまり、拡張子が `.egg` となっている ZIP アーカイブのファイルです。プラグインのソースコードディストリビューションをダウンロードした場合は、以下のコマンドを実行して下さい:
    2222{{{
    2323$ python setup.py bdist_egg
    2424}}}
    25 to build the `.egg` file.
     25`.egg` ファイルをビルドできます。
    2626
    27 Once you have the plugin archive, you need to copy it into the `plugins` directory of the [wiki:TracEnvironment project environment]. Also, make sure that the web server has sufficient permissions to read the plugin egg.
     27一度、プラグインアーカイブを作成したら、 [wiki:TracEnvironment TracEnvironment] の `plugins` ディレクトリにコピーする必要があります。また、 Web サーバーが egg プラグインを読み取るのに必要なパーミッションをつけてください。
    2828
    29 === For All Projects ===
     29=== すべてのプロジェクト ===
    3030
    31 Plugins that you want to use in all your projects (such as [http://projects.edgewall.com/trac/wiki/WebAdmin WebAdmin]) can be installed globally by running:
     31すべてのプロジェクトでプラグインを使用したいとき ([http://projects.edgewall.com/trac/wiki/WebAdmin WebAdmin] など) はグローバルにインストールし動かすことができます。
    3232{{{
    3333$ python setup.py install
    3434}}}
    3535
    36 Alternatively, you can just drop the `.egg` file in the Python `site-packages` directory.
     36代わりに、`.egg` ファイルを Python の `site-packages` ディレクトリにおくだけでもいいです。
    3737
    38 Unlike plugins installed per-environment, you'll have to explicitly enable globally installed plugins via [wiki:TracIni trac.ini]. This is done in the `[components]` section of the configuration file, for example:
     38個別の TracEnvironment にプラグインをインストールする場合と異なり、システム全体にインストールしたプラグインを有効にするためには、 [wiki:TracIni trac.ini] ファイルで明示的に指定しなければいけません。これは設定ファイルの `[components]` セクションに次のような記載を行います:
    3939{{{
    4040[components]
     
    4242}}}
    4343
    44 The name of the option is the Python package of the plugin. This should be specified in the documentation of the Plugin, but can also be easily find out by looking at the source (look for a top-level directory that contains a file named `__init__.py`.)
     44オプションの名前はプラグインの Python パッケージ名です。これはプラグインのドキュメンテーションに指定されていなければいけませんが、ソースを見れば簡単に見つけることが出来ます。(最上位のディレクトリにあるファイル `__init__.py` を探してください。)
    4545
    46 == Setting up the Plugin Cache ==
     46== プラグインのキャッシュの設定 ==
    4747
    48 Some plugins will need to be extracted by the Python eggs runtime (`pkg_resources`), so that their contents are actual files on the file system. The directory in which they are extracted defaults to the home directory of the current user, which may or may not be a problem. You can however override the default location using the `PYTHON_EGG_CACHE` environment variable.
     48いくつかのプラグインは Python eggs のランタイム (`pkg_resources`) によって解凍される必要があります。というのもそれらの内容がファイルシステム上に実際に存在する必要があるからです。通常、 Python eggs は現在のユーザのホームディレクトリに解凍されますが、それにより問題が発生するかもしれません。その場合、環境変数 `PYTHON_EGG_CACHE` を設定してデフォルトのロケーションを上書きすることができます。
    4949
    50 To do this from the Apache configuration, use the `SetEnv` directive as follows:
     50`PYTHON_EGG_CACHE` を `SetEnv` ディレクティブを使用して Apache に設定するには以下のようにします:
    5151{{{
    5252SetEnv PYTHON_EGG_CACHE /path/to/dir
    5353}}}
    5454
    55 This works whether your using the [wiki:TracCgi CGI] or the [wiki:TracModPython mod_python] front-end. Put this directive next to where you set the path to the [wiki:TracEnvironment Trac environment], i.e. in the same `<Location>` block.
     55これは [wiki:TracCgi CGI] と [wiki:TracModPython mod_python] のどちらをフロントエンドにしようと動作します。このディレクティブに [wiki:TracEnvironment Trac Environment] へのパスに設定し、例えば同じ `<Location>` ブロックにおいてください。
    5656
    57 For example (for CGI):
     57例 (CGI用):
    5858{{{
    5959 <Location /trac>
     
    6363}}}
    6464
    65 or (for mod_python):
     65例 (mod_python用):
    6666{{{
    6767 <Location /trac>
     
    7272}}}
    7373
    74 For [wiki:TracFastCgi FastCGI], you'll need to `-initial-env` option, or whatever is provided by your web server for setting environment variables.
     74[wiki:TracFastCgi FastCGI] で、Web サーバに設定するためには、 `-initial-env` オプションやサーバーが指定している方法で、環境変数を設定する必要があります。
    7575
    7676----
    77 See also TracGuide, [http://projects.edgewall.com/trac/wiki/PluginList plugin list], [http://projects.edgewall.com/trac/wiki/TracDev/ComponentArchitecture component architecture]
     77See also: TracGuide, [http://projects.edgewall.com/trac/wiki/PluginList プラグイン一覧], [http://projects.edgewall.com/trac/wiki/TracDev/ComponentArchitecture コンポーネント設計]