Modifying the Sidebar: Difference between revisions

From KDE TechBase
No edit summary
(fix typo)
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Being Edited}}
== Involved Pages ==
== Involved Pages ==


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 sidebar is 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-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.
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 placeholder for the link, the second one is a placeholder for the title of the link shown in the sidebar.


For TechBase related changes we prefer following nomenclature:
For TechBase related changes we prefer following nomenclature:
Line 18: Line 15:
Now you have to edit <tt>MediaWiki:tb-name</tt> and <tt>MediaWiki:tb-name-url</tt>. These pages will contain only one line with the title of the link and the page the link shall point to.  
Now you have to edit <tt>MediaWiki:tb-name</tt> and <tt>MediaWiki:tb-name-url</tt>. These pages will contain only one line with the title of the link and the page the link shall point to.  


Example:
===Example===
* <tt>MediaWiki:Sidebar</tt>:{{Input|1=<nowiki>...
* <tt>MediaWiki:Sidebar</tt>:{{Input|1=<nowiki>...
** tb-translation-workflow | ub-helpfiles-new-content
** tb-translation-workflow-url | tb-translation-workflow
...</nowiki>}}
...</nowiki>}}
* <tt>MediaWiki:ub-helpfiles-new-content</tt>:{{Input|1=<nowiki>Add new pages</nowiki>}}
* <tt>MediaWiki:tb-translation-workflow-url</tt>:{{Input|1=<nowiki>Translation Workflow</nowiki>}}Where "Translation Workflow" is the name of an existing page of the Main namespace. Please note, that this is not a <nowiki>[[...]]</nowiki> markuped link!
* <tt>MediaWiki:ub-helpfiles-new-content-url</tt>:{{Input|1=<nowiki>Tasks and Tools</nowiki>}}
* <tt>MediaWiki:tb-translation-workflow</tt>:{{Input|1=<nowiki>Translation Workflow</nowiki>}}
Where "Tasks and Tools" is the name of an existing page of the Main namespace.
 
{{Remember|1=Don't forget that all these pages must belong to the '''MediaWiki namespace!'''}}


== Links to Anchors ==
== 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 <tt>ub-name-redirect</tt> and shall only contain the #REDIRECT statement wich leads to the final destination page.
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 <tt>tb-name-redirect</tt> and shall only contain the #REDIRECT statement wich leads to the final destination page.


So let's improve the example from above:
So let's improve the example from above:
* <tt>MediaWiki:Sidebar</tt>:{{Input|1=<nowiki>...
* <tt>MediaWiki:Sidebar</tt>:{{Input|1=<nowiki>...
** ub-helpfiles-new-content-url | ub-helpfiles-new-content
** tb-translation-workflow-url | tb-translation-workflow
...</nowiki>}}
...</nowiki>}}
* <tt>MediaWiki:ub-helpfiles-new-content</tt>:{{Input|1=<nowiki>Add new pages</nowiki>}}
* <tt>MediaWiki:tb-translation-workflow</tt>:{{Input|1=<nowiki>Translation Workflow</nowiki>}}
* <tt>MediaWiki:ub-helpfiles-new-content-url</tt>:{{Input|1=<nowiki>ub-helpfiles-new_content-redirect</nowiki>}}
* <tt>MediaWiki:tb-translation-workflow-url</tt>:{{Input|1=<nowiki>tb-translation-workflow-redirect</nowiki>}}
* <tt>ub-helpfiles-new-content-redirect</tt>:{{Input|1=<nowiki>Tasks and Tools#Add_New_Pages</nowiki>}}
* <tt>tb-translation-workflow-redirect</tt>:{{Input|1=<nowiki>#REDIRECT [[Translation Workflow#Getting_a_Better_Understanding_of_the_Process]]</nowiki>}}Please notice, that this page is in the Main namespace!


<span id="Translating Sidebar Items"></span>
<span id="Translating Sidebar Items"></span>
Line 47: Line 45:
...</nowiki>}}
...</nowiki>}}


Now the new items can be translated. Visit the [[Special:Translate | Translate page]]. At the bottom of the list you will find the page "Userbase's custom interface messages". Finally choose your language and fetch the items to be translated.
Now the new items can be translated. Visit the [[Special:Translate | Translate page]]. At the bottom of the list you will find the page "TechBase's custom interface messages". Finally choose your language and fetch the items to be translated.


[[Category:Admin]]
[[Category:Admin]]

Latest revision as of 14:04, 31 August 2011

Involved Pages

The sidebar is 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 placeholder for the link, the second one is a placeholder for the title of the link shown in the sidebar.

For TechBase related changes we prefer following nomenclature:

** tb-name-url | tb-name

Replace name to your needs.

Now you have to edit MediaWiki:tb-name and MediaWiki:tb-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:
    ...
    ** tb-translation-workflow-url | tb-translation-workflow
    ...
  • MediaWiki:tb-translation-workflow-url:
    Translation Workflow
    Where "Translation Workflow" is the name of an existing page of the Main namespace. Please note, that this is not a [[...]] markuped link!
  • MediaWiki:tb-translation-workflow:
    Translation Workflow
 
Remember
Don't forget that all these pages must belong to the MediaWiki 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 tb-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:
    ...
    ** tb-translation-workflow-url | tb-translation-workflow
    ...
  • MediaWiki:tb-translation-workflow:
    Translation Workflow
  • MediaWiki:tb-translation-workflow-url:
    tb-translation-workflow-redirect
  • tb-translation-workflow-redirect:
    #REDIRECT [[Translation Workflow#Getting_a_Better_Understanding_of_the_Process]]
    Please notice, that this page is in the Main namespace!

Translating Sidebar Items

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

In our example we have to insert the line

...
tb-translation-workflow
...

Now the new items can be translated. Visit the Translate page. At the bottom of the list you will find the page "TechBase's custom interface messages". Finally choose your language and fetch the items to be translated.