![]() | This is aninformation page. It is not one ofWikipedia's policies or guidelines;rather, its purpose is to explain certain aspects of Wikipedia's norms, customs, technicalities, or practices. It may reflect differing levels ofconsensusandvetting. |
Namespaces | |||
---|---|---|---|
Subject namespaces | Talk namespaces | ||
0 | (Main/Article) | Talk | 1 |
2 | User | User talk | 3 |
4 | Wikipedia | Wikipedia talk | 5 |
6 | File | File talk | 7 |
8 | MediaWiki | MediaWiki talk | 9 |
10 | Template | Template talk | 11 |
12 | Help | Help talk | 13 |
14 | Category | Category talk | 15 |
100 | Portal | Portal talk | 101 |
118 | Draft | Draft talk | 119 |
710 | TimedText | TimedText talk | 711 |
828 | Module | Module talk | 829 |
Former namespaces | |||
108 | Book | Book talk | 109 |
442 | Course | Course talk | 443 |
444 | Institution | Institution talk | 445 |
446 | Education Program | Education Program talk | 447 |
2300 | Gadget | Gadget talk | 2301 |
2302 | Gadget definition | Gadget definition talk | 2303 |
2600 | Topic | 2601 | |
Virtual namespaces | |||
-1 | Special | ||
-2 | Media | ||
Current list (API call) |
TheMediaWiki namespaceis anamespacecontaining system messages, the text to be displayed in certain places in the interface. Onlyadministrators,interface administratorsandinterface editorscan edit pages in this namespace. In addition, pages in this namespace ending with.css
or.js
are furthermore restricted to interface administrators and interface editors. However, all editors can propose changes on appropriate talk pages.
Overview
editThe MediaWiki namespace allows administrators and interface editors tocustomise or translate the MediaWiki web interface.
Some messagesmusthave HTML links, and othersmusthave wikilinks. To find out which is which, you must know where the message is used in the interface. |
Because the changes to these pages have a global effect, they areprotectedfrom editing, andonly administrators and interface editors have the ability to edit them.[1]Non-admins who would like to request a minor change can do so by using the{{editprotected}}
template on the talk page of the MediaWiki page. More substantive changes should be discussed at an appropriate section of theWikipedia:Village pump;an edit request should then be made if there isconsensusfor the change.
Changes that can benefit other wiki sites and are not specific to Wikipedia can be submitted totranslatewiki.net(also known as TWN, formerly known as BetaWiki). Seetranslatewiki:Translating:MediaWiki.Since English is the original language of the messages, changes to them cannot be directly edited in translatewiki.net, and have to be discussed in thesupport page there.
MediaWiki pages can not and should not have documentation on the page itself for several reasons: among other things <noinclude> tags usually do not function in this namespace and the amount of data in MediaWiki space needs to be kept low for performance reasons. Instead, a description of the message can be put at the top of the talk page. A template{{interface explanation}}is available for this. Pages using this template can be found inCategory:MediaWiki messages with interface explanation.
Some messages have old documentation available by setting the 'language' toqqq.For instance,MediaWiki:Loginhas old, and somewhat incorrect, documentation atMediaWiki:Login/qqq.Don't update the /qqq messages, instead update the top of the talk page.
The message names for a particular interface element can be found using the "Add a toolbox link to reload the current page with the system message names exposed" Advanced Gadget in theSpecial:Preferences.Once enabled a "message names" item appears in the tool box, when clicked the names of all items are displayed.
Overview of messages
editThe template{{MediaWiki messages}}(shown below) lists a selection of key messages. Not included are
- Edit filterwarnings, as there many of these, and they can be foundhere.
- Tagsadded automatically toedit summariesbyedit filters,which are listed atSpecial:Tags.
- Messages describing Preferences options (Mediawiki:Tog-) –search for these.
- Messages providingtooltips(Mediawiki:Tooltip-) –search for these.
- Messages relating toCite.phpare listed and discussed atHelp talk:Cite errors.
- MediaWiki:Uploadtextand related subpages (the subpages transclude pages fromWikipedia:space) – these are covered atWikipedia talk:Upload.
- CSSfiles, which are described atMediaWiki talk:Common.css.
- Gadget-related messages –Gadgets.
The template{{interface explanation}},used onMediaWiki talk:pages (generally those with some discussion), adds pages it is on intoCategory:MediaWiki messages with interface explanation.
A complete list of messages is available atSpecial:Allmessages.MediaWiki messages serving the software default are called "unmodified" and appear as red links in the Allmessages list, and do not appear in aPrefix-based searchas they don't technically exist as pages. BecauseSpecial:Allmessagesdisplaysallsystem messages and it's contents (the page is over 1 MB) some users might prefer to view these messages alphabetically: @ABCDEFGHIJKLMNOPQRSTUVWXYZ
For a list ofallMediaWiki pages, seeSpecial:Prefixindex/MediaWiki:,orsearch the MediaWiki namespace.This includes custom titleblacklist notices, or edit filter notices and other pages that is not part of standard MediaWiki messages.
Finding system messages
editYou can find a message key by browsing Wikipedia in the special pseudo-language codeqqx
,which can be done by appending?uselang=qqx
to the URL, or&uselang=qqx
if the URL already contains a?
character (example). All the messages will then be replaced by their message keys, so you can identify which message is responsible. Messages that are always in the content language will not be shown using qqx.Special:Preferences#mw-prefsection-gadgetshas the option "Add a toolbox link to reload the current page with the system message names exposed". This gadget uses the same qqx you can add manually.
When the URL includes a fragment that links to a particular point on the page such as a section or a tab like e.g.special page "Preferences"you will have to add the fragment after the uselang parameter, e.g.Special:Preferences?uselang=qqx#mw-prefsection-rendering
.
Message keys which depend on data sent by the user may not be shown when qqx is used.Allmessages from the APIlists around 26,000 messages. They can be searched for a string withCtrl+Fin many browsers. Note that the underlying wikitext is often shown and not only the rendered text.
A list of all messages can be seen atSpecial:AllMessages.
Technical details
editThe MediaWiki namespace is a mechanism allowing administrators tocustomise or translate the MediaWiki web interface.It is enabled by default in recent mediawiki versions,mw:Manual:$wgUseDatabaseMessages= true enables them. The contents of the MediaWiki namespace pages override any corresponding settings in the language files, i.e., the static version of messages. Using the MediaWiki namespace is a bit slower than other namespaces.
The namespace number of MediaWiki messages is8,with a corresponding MediaWiki talk namespace9to discuss individual messages. Some projects offer templates likeen:Template:editprotected(backlinksedit)to propose modifications, others have a page like Meta:Requests for help from a sysop or bureaucratfor this purpose.
- Links to MediaWiki messages work like links to ordinary pages, examples
- [[MediaWiki:Edit]]MediaWiki:Edit,
- [[w:de:MediaWiki:Edit]]w:de:MediaWiki:Edit,
- [{{fullurl:m:MediaWiki:Edit|action=render}} demo]demo.
Each message in thei18n/en.json
file corresponds to a page in the MediaWiki namespace. For example, there is a line in the JSON file:
"recentchanges":"Recent changes",
This corresponds to the pageMediaWiki:Recentchanges,and{{int:Recentchanges}}
gives Recent changes. When this page is edited the new message is automatically used for the recent changes link in the left pane of the desktop site. Similarlyw:fr:MediaWiki:Recentchangeshas the contentModifications récentes,note that the page name itself is not translated.
Transclusion
editTransclusionof MediaWiki messages can make sense, as noted below historically these messages also covered the function of templates.
{{MediaWiki:Edit}}
= Edit this page, seem:Template:Ed(backlinksedit).{{int:Edit}}
= Edit this page,colon functionint:is a shorthand forMediaWiki:.{{int:Example}}
= ⧼Example⧽, but only as far as the message exists.{{MediaWiki:Example}}
=MediaWiki:Exampledoesn't exist.
The difference between{{MediaWiki:}}
and{{int:}}
is that{{MediaWiki:}}
transcludes using the default language of the Wiki (i.e. English), whereas{{int:}}
transcludes using the language set by the user's preferences. For example, if your user language is not set to English, the following two lines will differ:
- View article
- View article
However many messages are not suited for transclusion, because they contain$1and similar parameters not evaluated by the template parser, or rawCSSandXHTMLmarkup not permitted on normal pages.
With parameters
editMediaWiki messages may have parameters as$1,$2,... and they are variables used in the software. When transcluding it with custom changed parameters,{{int:}}
transclusions would be preferred.
Interlanguage links
editInterlanguage linksin MediaWiki messages typically won't work as expected. Adding<noinclude>isn't good enough, because something has to evaluate it, as it's the case for messagesincludedlike ordinary templates, but not[clarification needed]for messages used internally as system messages.
Instead, one can use in-page interlanguage links on the talk pages,m:Template:ilm(backlinksedit)does this for some major projects.
History
editThe MediaWiki namespace was introduced on December 6, 2003. Before this time, user interface text was part of the PHP software and could only be changed by software developers. Since the introduction they have been editable by normal administrators.
Until June 2004, the MediaWiki namespace was also used for creating other boilerplate text messages, to be used in articles. This function was replaced with theTemplate namespace;a conversion script running as "Template namespace initialisation script"was run by developerTim Starling,which moved all non-system messages to the new namespace, and replaced MediaWiki: (via the {{msg:}} magic word) references in articles with Template: in order to bypass the redirects. In October and November 2005, these redirects were deleted. This background explains why the concept now known as "templates" is sometimes referred to as "messages".
For a short time, before the renaming from votes for deletion (VfD) toarticles for deletion(AfD), deletion debates used MediaWiki: messages named in the format "MediaWiki:VfD-articlename".These were moved to the Template: space in June 2004 and are now (as of January 2006) subpages ofWikipedia:Articles for deletionorWikipedia:Votes for deletion.
See also
edit- MediaWiki namespace in version 1.2.6
- Template:MediaWiki redirect
- Wikipedia:WikiProject Usability/MediaWiki
- MediaWiki talk:Sitenotice- creating sitenotices
- Wikipedia:Bug reports and feature requests- on filing a "bug" to get the MediaWiki software fixed or enhanced. See alsoWP:DevMemo.
- Wikipedia:Template limits
- WP:Tools/Tools by tags- externally hosted tools which complement the MediaWiki software
Notes
edit- ^By default, all messages are protected. This is necessary for a number of reasons:
- Many messages are in plain HTML, so users could insert malicious scripts
- Vandalism of some messages would be extremely disruptive; for example, changes to the text of the links in the sidebar would immediately be visible to all users
- A few messages can in theory cause the software to stop working if they are changed. In practice the software ignores the database contents for the changed page, taking the regular expression straight out of the message files, for performance and stability reasons.