Changes between Version 5 and Version 6 of TracWikiNegotiatorPlugin
- Timestamp:
- Dec 8, 2008, 4:41:17 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracWikiNegotiatorPlugin
v5 v6 4 4 5 5 This plugin provides content negotiation mechanism for Trac wiki 6 pages. With this plugin, your trac site can provides multiple localized7 pagesfor users.6 pages. With this plugin, your trac site can provides localized pages 7 for users. 8 8 9 A live example site is [http://www.meadowy.org/~gotoh/projects/trac-wiki/ here]. 9 10 10 11 == Bugs/Feature Requests == … … 24 25 You can check out TracWikiNegotiatorPlugin from [http://trac-hacks.org/svn/tracwikinegotiatorplugin here] using Subversion, or [source:tracwikinegotiatorplugin browse the source] with Trac. 25 26 26 == How to Install == 27 == Install == 28 27 29 Build egg file and place it appropriate place 28 30 … … 55 57 }}} 56 58 59 Note that `TitleIndex` macro and `TOC` macro (by tractoc plugin) is 60 overridden by enabling this plugin. To use original macro, you should 61 disable new macro explicitly. See [#BonusMacro Bonus Macro] for 62 more detail. 63 57 64 58 65 == How to Use == … … 79 86 80 87 88 == Language Menu == 89 90 By using this plugin, you can see new language menu bar above the 91 wiki context navigation menu. It displays available languages 92 on this site automatically by finding language suffixes of wiki pages. 93 94 You can select language via this menu. Because it is holded in the session 95 information, you can walk with the language without re-selection. 96 97 The selected language are displayed underlined and bolded on the 98 menu. If specific language content is not availabe, the language item 99 in the menu is grayed. 100 101 There 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 116 The style of language menu can be changed by `menu_style` option: 117 {{{ 118 [wiki-negotiator] 119 menu_style=ctxnav 120 }}} 121 122 81 123 == Bonus Macro == 82 124 … … 85 127 The former is an alternative macro of `TitleIndex`. 86 128 The 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 131 And 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'''. 134 If you want to disable new feature and use original, 135 disable new macros explicitly in `trac.ini` like this: 136 {{{ 137 [components] 138 wikinegotiator.macros.titleindexmacro = disabled 139 wikinegotiator.macros.tocmacro = disabled 140 }}} 88 141 89 142 === `MultiLangTitleIndex` === 90 143 The 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)". 92 145 * List pages in two columns: one is for user's pages, one is for 93 146 system provided pages. System pages are the pages made by trac. … … 96 149 97 150 It 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` 153 when this plugin is enabled. 99 154 100 155 === `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 157 are available except handling lang suffixed pages. 106 158 If you specify normal page name without explicit lang suffix 107 (i.e. ` !WikiStart`), `NTOC` look up localized page for language same to159 (i.e. `WikiStart`), `NTOC` look up localized page for language same to 108 160 parent page the macro is put on. If not exist, look up localized page 109 161 for preferred langs. If not found, use specified name as is. … … 114 166 suffixed pages. 115 167 116 So, `TOC` can be simply replaced to `NTOC`. 168 '''This feature is automatically enabled''' by overriding `TOCMacro` if available 169 when this plugin is enabled. 170 117 171 118 172 == Recent Changes ==