Variations of MediaWiki:Sidebar
This is how the sidebar works (at least for the Monobook skin):
For the built-in defaults, things like MediaWiki:Tooltip-n-currentevents have a system supplied value, which is why they often appear as redlinks. This means that the messages have not been customized on-wiki. The naming scheme for access keys and tooltips is extensible, so any new message added can use these system messages to get these values; in the case of new messages like "aboutwikipedia" (see below), this is required to get tooltips or access keys without using JavaScript.
There are some other wrinkles related to alternate user interface languages using the "uselang" parameter, but they're not particularly relevant.
Hopefully this shows why keeping the message keys the same is important; it allows consistent CSS/XHTML ids to be used for scripting and styling despite changes to the user interface messaging.
Changing the sidebar to use fixed key names instead of inline labels has the following benefits:
I believe these are the reasons why the core installation uses internal message keys for labels in the default MediaWiki installation. Modifying the sidebar as I've detailed here will regain these benefits.
Source | Expanded | Display |
---|---|---|
|
|
Source | Expanded | Display |
---|---|---|
|
|
|
Source | Expanded | Display |
---|---|---|
|
|
|
Identifier | Label | URL | Access Key | Tooltip | ||||
---|---|---|---|---|---|---|---|---|
Key | Value | Key | Value | Key | Value | Key | Value | |
about | about | About | N/A | N/A | N/A | N/A | N/A | N/A |
aboutwikipedia | aboutwikipedia | MediaWiki:Aboutwikipedia (About Wikipedia) |
aboutwikipedia-url | MediaWiki:Aboutwikipedia-url (Wikipedia:About) |
accesskey-n-aboutwikipedia | MediaWiki:Accesskey-n-aboutwikipedia | tooltip-n-aboutwikipedia | MediaWiki:Tooltip-n-aboutwikipedia |
contact | contact | Contact Wikipedia | contact-url | //en.wikipedia.org/wiki/Wikipedia:Contact_us | accesskey-n-contact | MediaWiki:Accesskey-n-contact | tooltip-n-contact | MediaWiki:Tooltip-n-contact |
contents | contents | Contents (Contents) |
contents-url | MediaWiki:Contents-url (Wikipedia:Contents) |
accesskey-n-contents | MediaWiki:Accesskey-n-contents | tooltip-n-contents | Guides to browsing Wikipedia |
currentevents | currentevents | Current events | currentevents-url | Portal:Current events | accesskey-n-currentevents | tooltip-n-currentevents | Articles related to current events | |
featured | featured | MediaWiki:Featured (Featured content) |
featured-url | MediaWiki:Featured-url (Wikipedia:Featured content) |
accesskey-n-featured | MediaWiki:Accesskey-n-featured | tooltip-n-featured | MediaWiki:Tooltip-n-featured |
help | help | Help | helppage | Help:Contents | accesskey-n-help | tooltip-n-help | Guidance on how to use and edit Wikipedia | |
interaction | interaction | Contribute (Interaction) |
N/A | N/A | N/A | N/A | N/A | N/A |
mainpage | mainpage | Main Page (Main page) |
mainpage-url | MediaWiki:Mainpage-url (Main Page) |
accesskey-n-mainpage | z | tooltip-n-mainpage | Visit the main page |
navigation | navigation | Navigation | N/A | N/A | N/A | N/A | N/A | N/A |
portal | portal | Community portal | portal-url | Wikipedia:Community portal | accesskey-n-portal | tooltip-n-portal | The hub for editors | |
randompage | randompage | Random article | randompage-url | Special:Random | accesskey-n-randompage | x | tooltip-n-randompage | Visit a randomly selected article |
recentchanges | recentchanges | Recent changes | recentchanges-url | Special:RecentChanges | accesskey-n-recentchanges | r | tooltip-n-recentchanges | A list of recent changes to Wikipedia |
sitesupport | sitesupport | Donate | sitesupport-url | https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_en.wikipedia.org&uselang=en | accesskey-n-sitesupport | MediaWiki:Accesskey-n-sitesupport | tooltip-n-sitesupport | Support us by donating to the Wikimedia Foundation |
* navigation ** mainpage-url|mainpage ** contents-url|contents ** featuredcontent-url|featuredcontent ** currentevents-url|currentevents ** randompage-url|randompage * interaction ** aboutwikipedia-url|aboutwikipedia ** portal-url|portal ** recentchanges-url|recentchanges ** contact-url|contact ** sitesupport-url|sitesupport ** helppage|help
* navigation ** mainpage|Main page ** contents-url|contents ** featuredcontent-url|featuredcontent ** currentevents-url|currentevents ** randompage-url|randompage * interaction ** aboutwikipedia-url|aboutwikipedia ** portal-url|portal ** recentchanges-url|recentchanges ** contact-url|contact ** sitesupport-url|sitesupport ** helppage|help
All of the keys listed above will need to have translations added to make interface localization work with the "uselang" parameter and/or user language preferences. This is done by editing the language-code specific subpage for each interface message. For instance, to localize the "Interaction" heading for Spanish, MediaWiki:Interaction/es should be set to "Interacción". If we want to lowercase the Turkish version of "Main page", MediaWiki:Mainpage/tr should be set to "Ana sayfa" (nearly all versions of "Main page" except English are already sentence case).
These localizations only need to be done for the interface messages used for labels, not the ones for URLs.
All of these searches were performed on April 17/18, 2007. They should be redone if/when the issues with the sidebar are dealt with.
These references will need to change from "n-Contents" to "n-contents".
These references will need to change from "n-Main-page" to "n-mainpage".