Changes between Version 5 and Version 6 of TracWikiNegotiatorPlugin


Ignore:
Timestamp:
Dec 8, 2008 5:41:17 AM (6 years ago)
Author:
gotoh
Comment:

Update page for ver 1.6.

Legend:

Unmodified
Added
Removed
Modified
  • TracWikiNegotiatorPlugin

    v5 v6  
    44 
    55This plugin provides content negotiation mechanism for Trac wiki 
    6 pages.  With this plugin, your trac site can provides multiple localized 
    7 pages for users. 
     6pages.  With this plugin, your trac site can provides localized pages 
     7for users. 
    88 
     9A live example site is [http://www.meadowy.org/~gotoh/projects/trac-wiki/ here]. 
    910 
    1011== Bugs/Feature Requests ==  
     
    2425You can check out TracWikiNegotiatorPlugin from [http://trac-hacks.org/svn/tracwikinegotiatorplugin here] using Subversion, or [source:tracwikinegotiatorplugin browse the source] with Trac. 
    2526 
    26 == How to Install == 
     27== Install == 
     28 
    2729Build egg file and place it appropriate place 
    2830 
     
    5557}}} 
    5658 
     59Note that `TitleIndex` macro and `TOC` macro (by tractoc plugin) is 
     60overridden by enabling this plugin. To use original macro, you should 
     61disable new macro explicitly. See [#BonusMacro Bonus Macro] for 
     62more detail. 
     63 
    5764 
    5865== How to Use == 
     
    7986 
    8087 
     88== Language Menu == 
     89 
     90By using this plugin, you can see new language menu bar above the 
     91wiki context navigation menu. It displays available languages 
     92on this site automatically by finding language suffixes of wiki pages. 
     93 
     94You can select language via this menu. Because it is holded in the session 
     95information, you can walk with the language without re-selection. 
     96 
     97The selected language are displayed underlined and bolded on the 
     98menu. If specific language content is not availabe, the language item 
     99in the menu is grayed. 
     100 
     101There are 5 kind of display styles: 
     102 
     103 `simple`:: 
     104   Solid menu bar above the wiki context navigation menu. 
     105   This is default style. 
     106 `ctxnav`:: 
     107   Like `simple` but displayed on the right of the wiki context menu. 
     108   It looks like a one of the context menu item. 
     109 `button`:: 
     110   Button faced selection menu. 
     111 `tab`:: 
     112   Tabbed page style of selector. 
     113 `none`:: 
     114   Hide language menu. 
     115 
     116The style of language menu can be changed by `menu_style` option: 
     117{{{ 
     118[wiki-negotiator] 
     119menu_style=ctxnav 
     120}}} 
     121 
     122 
    81123==  Bonus Macro == 
    82124 
     
    85127The former is an alternative macro of `TitleIndex`. 
    86128The later is an alternative of `TOC` macro. 
    87 (see [th:wiki:TocMacro] in Trac-Hacs for more detail) 
     129(see [th:wiki:tocmacro tocmacro] in Trac-Hacs for more detail) 
     130 
     131And this plugin has the definitions to override original 
     132`TitleIndexMacro` and `TOCMacro` automatically.  
     133'''So you do not need to edit wiki pages to use both two new macros'''. 
     134If you want to disable new feature and use original, 
     135disable new macros explicitly in `trac.ini` like this: 
     136{{{ 
     137[components] 
     138wikinegotiator.macros.titleindexmacro = disabled 
     139wikinegotiator.macros.tocmacro = disabled 
     140}}} 
    88141 
    89142=== `MultiLangTitleIndex` === 
    90143The differences against `TitleIndex` are: 
    91  * Display in one line for variants like: "* WikiStart (ja, en, other)". 
     144 * Display in one line for variants like: "* !WikiStart (ja, en, other)". 
    92145 * List pages in two columns: one is for user's pages, one is for 
    93146   system provided pages. System pages are the pages made by trac. 
     
    96149 
    97150It is useful for the site having many localized pages. 
    98 You can use it by editing `TitleIndex` page. 
     151 
     152'''This feature is automatically enabled''' by overriding `TitleIndexMacro` 
     153when this plugin is enabled. 
    99154 
    100155=== `NTOC` === 
    101 If you installed and enabled `TOC` macro on Trac 0.11 (or later), 
    102 `NTOC` macro is also enabled. It is delived macro from `TOC` so all 
    103 the features in `TOC` macro are available and plus handling lang 
    104 suffixed pages better. 
    105  
     156`NTOC` macro delives `TOC` macro, so all the features in `TOC` macro 
     157are available except handling lang suffixed pages. 
    106158If you specify normal page name without explicit lang suffix  
    107 (i.e. `!WikiStart`), `NTOC` look up localized page for language same to  
     159(i.e. `WikiStart`), `NTOC` look up localized page for language same to  
    108160parent page the macro is put on. If not exist, look up localized page 
    109161for preferred langs. If not found, use specified name as is. 
     
    114166suffixed pages. 
    115167 
    116 So, `TOC` can be simply replaced to `NTOC`. 
     168'''This feature is automatically enabled''' by overriding `TOCMacro`  if available 
     169when this plugin is enabled. 
     170 
    117171 
    118172== Recent Changes ==