Changes between Version 11 and Version 12 of TracWikiNegotiatorPlugin


Ignore:
Timestamp:
Nov 18, 2015, 11:17:44 AM (8 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • TracWikiNegotiatorPlugin

    v11 v12  
    55== Description
    66
    7 This plugin provides content negotiation mechanism for Trac wiki pages. With this plugin, your Trac site can provide localized pages for users.
     7This plugin provides a content negotiation mechanism for Trac wiki pages. With this plugin, your Trac site can provide localized pages for users.
    88
    99== Bugs/Feature Requests
     
    1919== Download
    2020
    21 Download the zipped source from [download:tracwikinegotiatorplugin here].
     21Download the zipped source from [export:tracwikinegotiatorplugin here].
    2222
    2323== Source
    2424
    25 You can check out TracWikiNegotiatorPlugin from [http://trac-hacks.org/svn/tracwikinegotiatorplugin here] using Subversion, or [source:tracwikinegotiatorplugin browse the source] with Trac.
     25You can check out TracWikiNegotiatorPlugin from [/svn/tracwikinegotiatorplugin here] using Subversion, or [source:tracwikinegotiatorplugin browse the source] with Trac.
    2626
    2727== Installation
     
    5252}}}
    5353
    54 Note that `TitleIndex` macro and `TOC` macro (by tractoc plugin) is overridden by enabling this plugin. To use original macro, you should
     54Note that `TitleIndex` macro and `TOC` macro (by tractoc plugin) is overridden by enabling this plugin. To use the original macro, you should
    5555disable the new macro explicitly, see [#BonusMacro Bonus Macro] for more detail.
    5656
    5757== Usage
    5858
    59 Using the negotiation feature is simply providing suffixed page like 'Foo.ja' for Japanese, 'Foo.fr' for French, so on. When Japanese user
    60 (with Japanese setting in browser) access to the page 'Foo', he will see the content of `Foo.ja` instead of `Foo`. Likewise, French user will see the content of `Foo.fr`. So what you should do is creating localized page content in the usual way. Note that suffix like '.ja' and '.fr' is to be a standard language code.
     59Using the negotiation feature is simply providing a suffixed page like 'Foo.ja' for Japanese, 'Foo.fr' for French, and so on. When a Japanese user with the Japanese setting in the browser accesses the page 'Foo', (s)he will see the content of `Foo.ja` instead of `Foo`. Likewise, a French user will see the content of `Foo.fr`. So what you should do is creating localized page content in the usual way. Note that a suffix like '.ja' and '.fr' needs to be a [https://en.wikipedia.org/wiki/Language_code standard language code].
    6160
    62 Non-suffixed page `Foo` is also usable for default content when no suffixed page is matched to user's request.
     61The non-suffixed page `Foo` is also usable for default content when no suffixed page is matched to the user's request.
    6362
    64 To see the page for your language, nothing to do to view localized page. To see the page for other language, specify the appropriate suffix for
    65 wiki page name in the url explicitly, or add query parameter like "?lang=xx".
     63To see the page for your language, there is nothing to do to view the localized page. To see the page for other language, specify the appropriate suffix for wiki page name in the url explicitly, or add query parameter like "?lang=xx".
    6664
    6765To edit the page, you can edit the page now you are seeing by simply press "Edit" button.
    68 To edit the page for another language, first visit the desired page with a way described above, then press "Edit" button.
     66To edit the page for another language, first visit the desired page in the way described above, then press the "Edit" button.
    6967
    7068== Language Menu
     
    7270By using this plugin, you can see new language menu bar above the wiki context navigation menu. It displays available languages on this site automatically by finding language suffixes of wiki pages.
    7371
    74 '''Note:''' Users who installed earlier version (before r4974) on Trac 0.11 may need enabling `WikiNegotiatorMenuBar` component to display language menu.
     72'''Note:''' Users who installed earlier version (before r4974) on Trac 0.11 may need enabling the `WikiNegotiatorMenuBar` component to display the language menu. You can select the language via this menu. Because it is held in the session information, you can run with the language without re-selection.
    7573
    76 You can select language via this menu. Because it is held in the session information, you can run with the language without re-selection.
     74The selected languages are displayed underlined and bolded on the menu. If the specific language content is not availabe, the language item in the menu is greyed out.
    7775
    78 The selected language are displayed underlined and bolded on the menu. If the specific language content is not availabe, the language item in the menu is greyed out.
    79 
    80 There are 5 kind of display styles:
     76There are 5 kinds of display styles:
    8177
    8278 `simple`::
     
    8581 `ctxnav`::
    8682   Like `simple` but displayed on the right of the wiki context menu.
    87    It looks like a one of the context menu item.
     83   It looks like one of the context menu items.
    8884 `button`::
    8985   Button faced selection menu.
     
    9389   Hide language menu.
    9490
    95 The style of language menu can be changed by `menu_style` option:
     91The style of the language menu can be changed through the `menu_style` option:
    9692{{{#!ini
    9793[wiki-negotiator]
     
    9995}}}
    10096
    101 ==  Bonus Macro
     97== Bonus Macro
    10298
    103 For bonus, this plugin contains two new macro: `MultiLangTitleIndex` and `NTOC`.
    104 The former is an alternative macro of `TitleIndex`.
    105 The later is an alternative of `TOC` macro, see [th:wiki:tocmacro tocmacro] in Trac-Hacs for more detail.
     99For bonus, this plugin contains two new macros: `MultiLangTitleIndex` and `NTOC`.
     100 * The former is an alternative macro of `TitleIndex`.
     101 * The latter is an alternative of the `TOC` macro, see [th:wiki:tocmacro tocmacro] for more detail.
    106102
    107 And this plugin has the definitions to override original `TitleIndexMacro` and `TOCMacro` automatically.
    108 '''So you do not need to edit wiki pages to use both two new macros'''.
     103And this plugin has the definitions to override the original `TitleIndexMacro` and `TOCMacro` automatically. '''So you do not need to edit the wiki pages to use both new macros'''.
    109104
    110 If you want to disable new feature and use original, disable new macros explicitly in `trac.ini` like this:
     105If you want to disable these new features and use the original instead, disable the new macros explicitly in `trac.ini` like this:
    111106{{{#!ini
    112107[components]
     
    117112=== `MultiLangTitleIndex`
    118113
    119 The differences against `TitleIndex` are:
     114The differences with `TitleIndex` are:
    120115 * Display in one line for variants like: "* !WikiStart (ja, en, other)".
    121  * List pages in two columns: one is for user's pages, one is for system provided pages. System pages are the pages made by Trac.
    122    `WikiStart` and `SandBox` are exception by default because it is a page to be edited by user.
     116 * List pages in two columns: one is for user's pages, one is for system provided pages. System pages are the pages generated by Trac.
     117   `WikiStart` and `SandBox` are exception by default, because it is a page to be edited by the user.
    123118
    124 It is useful for the site having many localized pages.
     119It is useful for a site that has many localized pages.
    125120
    126121'''This feature is automatically enabled''' by overriding `TitleIndexMacro` when this plugin is enabled.