Changes between Version 1 and Version 2 of WikiProcessors


Ignore:
Timestamp:
Jun 21, 2008, 6:11:58 PM (16 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiProcessors

    v1 v2  
    1 = Wiki プロセッサ =
     1= Wiki Processors =
    22
    3 プロセッサは [TracWiki Trac Wiki エンジン] が、 Wiki 以外のフォーマットを提供するために設計された WikiMacros です。プロセッサは ''ユーザが編集したテキストを処理するマクロ機能'' と考えることができます。
     3Processors are WikiMacros designed to provide alternative markup formats for the [TracWiki Wiki engine]. Processors can be thought of as ''macro functions to process user-edited text''.
    44
    5 Trac 内の全ての Wiki テキストにおいて、 [wiki:WikiRestructuredText Restructured Text], [wiki:WikiHtml raw HTML] および [http://www.textism.com/tools/textile/ textile] をプロセッサとして使用することができます。
     5The Wiki engine uses processors to allow using [wiki:WikiRestructuredText Restructured Text], [wiki:WikiHtml raw HTML] and [http://www.textism.com/tools/textile/ textile] in any Wiki text throughout Trac.
    66
    7 == プロセッサを使用する ==
    87
    9 テキストブロックでプロセッサを使うには、 Wiki のコードブロックを使用し、プロセッサの名前を (Unix 系 OS のスクリプトのように) ''shebang 行'' (#!) に続いて指定します。
     8== Using Processors ==
    109
    11 '''例1''' (''Wiki テキストに 生 HTML を挿入する''):
     10To use a processor on a block of text, use a Wiki code block, selecting a processor by name using ''shebang notation'' (#!), familiar to most UNIX users from scripts.
     11
     12'''Example 1''' (''inserting raw HTML in a wiki text''):
    1213
    1314{{{
     
    1516<pre class="wiki">{{{
    1617#!html
    17 &lt;h1 style="color: orange"&gt;これは生 HTML です&lt;/h1&gt;
     18&lt;h1 style="color: orange"&gt;This is raw HTML&lt;/h1&gt;
    1819}}}</pre>
    1920}}}
    2021
    21 '''結果、このように表示されます:'''
     22'''Results in:'''
    2223{{{
    2324#!html
    24 <h1 style="color: orange">これは生 HTML です</h1>
     25<h1 style="color: orange">This is raw HTML</h1>
    2526}}}
    2627
    2728----
    2829
    29 '''例2''' (''Wiki テキストに !ReStructured テキストを挿入する''):
     30'''Example 2''' (''inserting Restructured Text in wiki text''):
    3031
    3132{{{
     
    3334<pre class="wiki">{{{
    3435#!rst
    35 見出し
    36 ------
    37 脚注 [*]_ 付きの **text** です。
     36A header
     37--------
     38This is some **text** with a footnote [*]_.
    3839
    39 .. [*] ここは脚注。
     40.. [*] This is the footnote.
    4041}}}</pre>
    4142}}}
    4243
    43 '''結果、このように表示されます:'''
     44'''Results in:'''
    4445{{{
    4546#!rst
    46 見出し
    47 ------
    48 脚注 [*]_ 付きの **text** です。
     47A header
     48--------
     49This is some **text** with a footnote [*]_.
    4950
    50 .. [*] ここは脚注。
     51.. [*] This is the footnote.
    5152}}}
    52 (訳注: !ReStructuredText は国際化が甘いので、使えないかもしれません)
    5353----
    54 '''例3''' (''Wiki テキストに C 言語ソースコードブロックを挿入する''):
     54'''Example 3''' (''inserting a block of C source code in wiki text''):
    5555
    5656{{{
     
    6666}}}
    6767
    68 '''結果、このように表示されます:'''
     68'''Results in:'''
    6969{{{
    7070#!c
     
    7878----
    7979
    80 == プロセッサ一覧 ==
    81 以下のプロセッサが Trac の配布に含まれています:
    82  * '''html''' -- Wiki ページにカスタム HTML を挿入する。 WikiHtml を参照してください。
    83  * '''rst''' -- Restructured テキスト を Trac で利用可能にする。 WikiRestructuredText を参照してください。
    84  * '''textile''' -- [http://dealmeida.net/projects/textile/ Textile] をインストールすれば利用可能です。 [http://hobix.com/textile/ a Textile reference] を参照。
     80== Available Processors ==
     81The following processors are included in the Trac distribution:
     82 * '''html''' -- Insert custom HTML in a wiki page. See WikiHtml.
     83 * '''rst''' -- Trac support for Restructured Text. See WikiRestructuredText.
     84 * '''textile''' -- Supported if  [http://dealmeida.net/projects/textile/ Textile] is installed. See [http://hobix.com/textile/ a Textile reference].
    8585
    86 上記の Textile のリンクは切れています。 [http://www.textism.com/tools/textile/ このサイト] は動いていて、試しに使ってみることが可能です。
     86Textile link above is rotten. [http://www.textism.com/tools/textile/ this one] works, allows to test example.
    8787
    88 === ソースコードの強調表示対応 ===
    89 Trac では、以下のプログラミング言語でのインライン [wiki:TracSyntaxColoring シンタックスハイライト] を行うプロセッサが組み込まれています。
     88=== Code Highlighting Support ===
     89Trac includes processors to provide inline [wiki:TracSyntaxColoring syntax highlighting] for the following languages:
    9090 * '''c''' -- C
    9191 * '''cpp''' -- C++
     
    9797 * '''sql''' -- SQL
    9898 * '''xml''' -- XML
    99 '''Note:''' ''Trac はシンタックスの色付けを、外部のソフトウェアパッケージに依存しています。詳しくは TracSyntaxColoring をご覧下さい。''
     99'''Note:''' ''Trac relies on external software packages for syntax coloring. See TracSyntaxColoring for more info.''
    100100
    101 プロセッサとして mime-type が指定されると、ソースコードをブラウズするときと同じく、対応されている言語であれば、シンタックスハイライトを行うことができます。例えば、以下のように書くと:
     101By using the MIME type as processor, it is possible to syntax-highlight the same languages that are supported when browsing source code. For example, you can write:
    102102{{{
    103103{{{
     
    107107}}}
    108108
    109 この結果はシンタックスハイライトされた HTML コードになります。対応している全ての mime-type でも、これは同じく有効です。
     109The result will be syntax highlighted HTML code. The same is valid for all other mime types supported.
    110110
    111111
    112 ユーザによるプロセッサマクロの開発やコントリビュート:
    113  * [http://trac.edgewall.org/wiki/ProcessorBazaar ProcessorBazaar]
    114  * [http://trac.edgewall.org/wiki/MacroBazaar MacroBazaar]
     112For more processor macros developed and/or contributed by users, visit:
     113 * [http://projects.edgewall.com/trac/wiki/ProcessorBazaar ProcessorBazaar]
     114 * [http://projects.edgewall.com/trac/wiki/MacroBazaar MacroBazaar]
    115115
    116116
    117 == 上級トピック: プロセッサマクロを開発する ==
    118 プロセッサの開発は WikiMacros と違いはありません。事実、これらは同じような機能を持ち、シンタックスだけが異なります。詳しくは WikiMacros に記述します。
     117== Advanced Topics: Developing Processor Macros ==
     118Developing processors is no different from WikiMacros. In fact they work the same way, only the usage syntax differs. See WikiMacros for more information.
    119119
    120 '''例:''' (''Restructured テキストプロセッサ''):
     120'''Example:''' (''Restructured Text Processor''):
    121121{{{
    122122#!python