Changes between Version 3 and Version 4 of WikiMacros


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

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiMacros

    v3 v4  
    1 =  Wiki Macros =
    2 Trac macros are plugins to extend the Trac engine with custom 'functions' written in Python. A macro inserts dynamic HTML data in any context supporting WikiFormatting.
     1=  Wiki マクロ =
     2Wiki マクロとは、Python で書かれた 'カスタム関数' によって Trac の Wiki エンジンを拡張するプラグインです。 WikiFormatting エンジンがサポートするあらゆるコンテキストにおいて、マクロを使用することによって、動的なHTMLデータが挿入されます。
    33
    4 Another kind of macros are WikiProcessors. They typically deal with alternate markup formats and representation of larger blocks of information (like source code highlighting).
     4もう1種類のマクロは WikiProcessors です。これは通常、Wiki以外のマークアップ形式と表示を取り扱うために使用し、多くは、(ソースコードハイライトのような)より大きいブロックに使用します。
    55
    6 == Using Macros ==
    7 Macro calls are enclosed in two ''square brackets''. Like python functions, macros can also have arguments, a comma separated list within parentheses.
     6== マクロの利用 ==
     7マクロ呼び出しは、二つの ''角括弧 (square brackets) '' で括られた箇所です。Python関数のように、マクロは引数を取ることができ、括弧 (parenthesis) の中に、カンマで区切ったリストで表記します。
    88
    9 === Examples ===
     9=== 利用例 ===
    1010
    1111{{{
    1212 [[Timestamp]]
    1313}}}
    14 Display:
     14は、以下のように表示されます:
    1515 [[Timestamp]]
    1616
     
    1818 [[HelloWorld(Testing)]]
    1919}}}
    20 Display:
     20は、以下のように表示されます:
    2121 [[HelloWorld(Testing)]]
    2222
    23 == Available Macros ==
     23== 利用可能なマクロ ==
    2424
    25 ''Note that the following list will only contain the macro documentation if you've not enabled `-OO` optimizations, or not set the `PythonOptimize` option for [wiki:TracModPython mod_python].''
     25''Note: 以下に示すリストはマクロドキュメントを含むものだけです。 `-OO` による最適化や、 [wiki:TracModPython mod_python] での `PythonOptimize` オプションが設定されていると表示されません。''
    2626
    2727[[MacroList]]
     
    3232----
    3333
    34 == Developing Custom Macros ==
    35 Macros, like Trac itself, are written in the [http://www.python.org/ Python programming language]. They are very simple modules, identified by the filename and should contain a single ''entry point'' function. Trac will display the returned data inserted into the HTML where the macro was called.
     34== カスタムマクロを開発する ==
     35マクロは、 Trac 自身と同じように [http://www.python.org/ Python programming language] で書かれています。とてもシンプルなモジュールで、たった一つの ''インタフェース (entry point) '' 関数だけを持ちます。マクロの識別はファイル名で行います。Trac は、呼び出されたマクロが返却したデータを HTML に挿入して表示を行います。
    3636
    37 It's easiest to learn from an example:
     37最も簡単なマクロの例です:
    3838{{{
    3939#!python
     
    4444}}}
    4545
    46 You can also use the environment (`env`) object, for example to access configuration data and the database, for example:
     46Environment (`env`) オブジェクトを使用することも出来ます。この例では、コンフィグレーションとデータベースにアクセスしています:
    4747{{{
    4848#!python
     
    5151}}}
    5252
    53 Note that since version 0.9, wiki macros can also be written as TracPlugins. This gives them some capabilities than “classic” macros do not have, such as directly access the HTTP request.
     53Note: バージョン 0.9 以降、 Wiki マクロは TracPlugins でも書くことが出来るようになりました。これによって、 HTTP request へのアクセスなど、 "古い" マクロでは実現できなかったことが出来るようになりました。
    5454
    55 For more information about developing macros, see the [http://projects.edgewall.com/trac/wiki/TracDev development resources] on the main project site.
     55マクロ開発についての詳しい情報は、プロジェクトメインサイトの [http://projects.edgewall.com/trac/wiki/TracDev 開発リソース] を参照してください。
    5656
    5757----