Changes between Version 3 and Version 4 of TracIni


Ignore:
Timestamp:
Dec 30, 2016, 2:54:47 AM (7 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracIni

    v3 v4  
    1 = Trac 設定ファイル = #TheTracConfigurationFile
     1= The Trac Configuration File
    22
    33[[TracGuideToc]]
    4 [[PageOutline]]
     4[[PageOutline(2-5,Contents,pullout)]]
    55
    6 Trac の設定は `<projectenv>/conf/` にある '''`trac.ini`''' というファイルを編集して行います。変更した内容は通常、即座に反映されますが、 `[components]` セクションや `[logging]` セクションへの変更では Web サーバを再起動する必要があります。また、グローバルな設定ファイルを新しく作成した直後も Web サーバを再起動しなければなりません。
     6Trac is configured through the **`trac.ini`** file, located in the `<projectenv>/conf` directory. The `trac.ini` configuration file and its parent directory should be writable by the web server.
    77
    8 `trac.ini` 設定ファイルとそのファイルのあるディレクトリは Web サーバから書き込み可能でなければなりません。 Trac は現在のところ、キャッシュを破棄するために完全に Environment を再読み込みするトリガーとして利用しています。
     8Trac monitors the timestamp of the file to trigger a complete environment reload and flush its caches when the timestamp changes. Most changes to the configuration will be reflected immediately, though changes to the `[components]` or `[logging]` sections will require restarting the web server. You may also need to restart the web server after creating a [#GlobalConfiguration global configuration] file when none was previously present.
    99
    10 == グローバルな設定 == #GlobalConfiguration
     10== Global Configuration
    1111
    12 0.11 より前のバージョンでは、グローバルな設定ファイルは `$prefix/share/trac/conf/trac.ini` や `/etc/trac/trac.ini` などディストリビューションに依存した特定の位置に配置されていました。アップグレードする場合は、設定を継承するファイルを明示しなければなりません。以前のバージョンから 0.11 にアップグレードした場合、プロジェクトの `trac.ini` ファイルに `[inherit]` セクションを追加しなければなりません。カスタマイズしたテンプレートや画像のファイルは `$prefix/share/trac/...` から他の場所に移動することもできます。
    13 
    14 グローバルな設定は Environment 固有の設定とマージされます。ローカルの設定はグローバルの設定を上書きます。グローバルな設定ファイルは以下のように指定します:
    15 {{{
     12Configuration can be shared among environments using one or more global configuration files. Options in the global configuration will be merged with the environment-specific options, with local options overriding global options. The global configuration file is specified as follows:
     13{{{#!ini
    1614[inherit]
    1715file = /path/to/global/trac.ini
    1816}}}
    19 カンマ区切りにすることで、複数のファイルを指定することができます。
     17Multiple files can be specified using a comma-separated list.
    2018
    21 Note: 新しいプロジェクトを作る時に [TracAdmin#initenv trac-admin] の `initenv` コマンドに `--inherit=/path/to/global/trac.ini` オプションを追加することで、グローバル設定ファイルを指定することができます。オプションを追加せずにプロジェクトを作成した場合でも、新しく作成された `conf/trac.ini` ファイルを編集して、グローバルファイルの設定で上書きしたいエントリを削除すれば、新しい Environment でグローバル設定ファイルを使用することができます。
     19Note that you can also specify a global option file when creating a new project, by adding the option `--inherit=/path/to/global/trac.ini` to [TracAdmin#initenv trac-admin]'s `initenv` command. If you do not do this but nevertheless intend to use a global option file with your new environment, you will have to go through the newly generated `conf/trac.ini` file and delete the entries that will otherwise override those set in the global file.
    2220
    23 [#inherit-section| [inherit]] セクションには、共有するテンプレートの配置先を指す `templates_dir` と、共有するプラグインを指す `plugins_dir` という二つのエントリもあります。これらがグローバル設定ファイルに指定することができます。この場合、他の `[inherit] file` が指定されていれば、設定ファイルは順次読み込まれます。
     21There are two more entries in the [[#inherit-section| [inherit] ]] section, `templates_dir` for sharing global templates and `plugins_dir`, for sharing plugins. Those entries can themselves be specified in the shared configuration file, and in fact, configuration files can even be chained if you specify another `[inherit] file` there.
    2422
    25 TracEnvironment の `templates/` ディレクトリ内のテンプレートは、 `[inherit] templates_dir` で見つかるテンプレートより優先されます。次に、`[inherit] templates_dir` のテンプレートはインストールされているテンプレートより優先されます。これらを設定するには注意が必要です。特に、デフォルトのテンプレートをオーバーライドする場合、 Trac を新しいバージョンにアップデートする際には必ず変更点を再読み込みして下さい。 ( TracInterfaceCustomization を行うために推奨する方法は、適切に `ITemplateStreamFilter` の変更が行えるカスタムプラグインを作成することです。)
     23Note that the templates found in the `templates/` directory of the TracEnvironment have precedence over those found in `[inherit] templates_dir`. In turn, the latter have precedence over the installed templates, so be careful about what you put there. Notably, if you override a default template, refresh your modifications when you upgrade to a new version of Trac. The preferred way to perform TracInterfaceCustomization is still to write a custom plugin doing an appropriate `ITemplateStreamFilter` transformation.
    2624
    27 == リファレンス == #Referenceforsettings
     25== Reference for settings
    2826
    29 現在利用できる設定項目のリファレンスとデフォルトの設定です。(訳注: 0.12 ではデフォルトの値は表示されません。)
     27This is a brief reference of available configuration options, and their default settings.
    3028
     29Documentation improvements should be discussed on the [trac:MailingList#Trac-dev trac-dev mailing list] or described in a [trac:NewTicket ticket]. Even better, [trac:TracDev/SubmittingPatches submit a patch] against the docstrings in the code.
     30{{{ #!comment
     31Please don't waste your time by editing the HTML code below, changes won't be picked up. Instead, follow the above guidance for suggesting documentation improvements.
     32}}}
    3133[[TracIni]]
    3234