Modifying the Sidebar

From KDE Wiki Sandbox
Revision as of 16:17, 3 June 2011 by Pipesmoker (talk | contribs) (Created page with "== Pages that are involved == The Sidebar ist generated with a special page in the MediaWiki namespace, that is MediaWiki:Sidebar. It is a bullet list with special items. Do...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Pages that are involved

The Sidebar ist generated with a special page in the MediaWiki namespace, that is MediaWiki:Sidebar. It is a bullet list with special items. Don't mix it up with common list styling!

The list-level controls if the item is written as a seperating heading or a link.

The list items are divided into two parts by a pipe "|". Both parts shall be the name of a page that belongs to the MediaWiki namespace as well. The first part is a placholder for the link, the second one is a placeholder for the title of the link shown in the sidebar.

For UserBase related changes we prefer following nomenclature:

** ub-name-url | ub-name

Replace name to your needs.

Now you have to edit MediaWiki:ub-name and MediaWiki:ub-name-url. These pages will contain only one line with the title of the link and the page the link shall point to.

Example:

  • MediaWiki:Sidebar:
    ...
    ** ub-helpfiles-new-content-url | ub-helpfiles-new-content
    ...
  • MediaWiki:ub-helpfiles-new-content:
    Add new pages
  • MediaWiki:ub-helpfiles-new-content-url:
    Tasks and Tools

Where "Tasks and Tools" is the name of an existing page of the Main namespace.

Links to Anchors

If the link shall point to an anchor of a page you have to insert a redirect-page as a work around. Following the nomenclature this page should be called ub-name-redirect and shall only contain the #REDIRECT statement wich leads to the final destination page.

So let's improve the example from above:

  • MediaWiki:Sidebar:
    ...
    ** ub-helpfiles-new-content-url | ub-helpfiles-new-content
    ...
  • MediaWiki:ub-helpfiles-new-content:
    Add new pages
  • MediaWiki:ub-helpfiles-new-content-url:
    ub-helpfiles-new_content-redirect
  • ub-helpfiles-new-content-redirect:
    Tasks and Tools#Add_New_Pages

Translating Sidebar Items

The pages containing the link titles are listed in a special page that is MediaWiki:Userbase-messages. Just write them down without any list formatting or such.

In our example we have to insert the line

...
ub-helpfiles-new-content
...

Now the new items can be translated. Visit the Translate page. Notice the Group selected: "Userbase's custom interface messages". Choose your language and fetch the items to be translated.