2605:6000:6a51:2b00:eced:4fbe:d357:8880 (talk) Hacking pages Tags: Visual edit Mobile edit Mobile web edit |
m Reverted edits by 2605:6000:6A51:2B00:ECED:4FBE:D357:8880 (talk) to last version by UnitedStatesian Tag: Rollback |
||
Line 1: | Line 1: | ||
{{redirect|Wikipedia:MediaWiki|information about the entire MediaWiki software application|MediaWiki}} |
|||
⚫ | The '''MediaWiki namespace''' is one of the standard namespaces in the database structure of the MediaWiki software, on which Wikipedia runs. The pages in this namespace (which have titles beginning with '''MediaWiki:''') contain the text to be displayed in certain places in the web interface. Only administrators and interface editors can edit this namespace, but all editors can propose changes on appropriate talk pages. |
||
{{Information page|WP:MWN|WP:MEDIAWIKI}} |
|||
{{namespaces}} |
|||
⚫ | The '''MediaWiki namespace''' is one of the standard [[Help:namespace|namespaces]] in the database structure of the [[MediaWiki]] software, on which Wikipedia runs. The pages in this namespace (which have titles beginning with '''MediaWiki:''') contain the text to be displayed in certain places in the web interface. Only [[Help:Administration|administrators]] and [[m:interface editors|interface editors]] can edit this namespace, but all editors can propose changes on appropriate talk pages. |
||
== Overview == |
== Overview == |
||
The MediaWiki namespace allows |
The MediaWiki namespace allows [[Help:Administration|administrator]]s and [[m:interface editors|interface editors]] to [[m:Help:System message|customise or translate the MediaWiki web interface]]. |
||
{{Caution|text= Some messages ''must'' have HTML links, and others ''must'' have 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 are [[WP:PROT|protected]] from editing, and '''only administrators and interface editors have the ability to edit them'''.<ref>By default, all messages are protected. This is necessary for a number of reasons: |
|||
⚫ | Changes that can benefit other wiki sites and are not specific to Wikipedia can be submitted to translatewiki.net (also known as TWN, formerly known as BetaWiki). See translatewiki:Translate: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 the support page there. |
||
* 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, for example [[MediaWiki:Linktrail]]. In practice the software ignores the database contents for [[MediaWiki:Linktrail]], taking the regular expression straight out of the message files, for performance and stability reasons. |
|||
⚫ | If an administrator wishes to allow non-admins to edit a MediaWiki page, a method is to place the message on a template, and then transclude the template back onto the MediaWiki page. Another method is to redirect the page to one in a non-MediaWiki namespace.</ref> Non-admins who would like to request a minor change can do so by using the {{tlx|editprotected}} template on the talk page of the MediaWiki page. More substantive changes should be discussed at an appropriate section of the [[Wikipedia:Village pump]]; an edit request should then be made if there is [[WP:Consensus|consensus]] for the change. |
||
⚫ | 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 is available for this. Pages using this template can be found in Category:MediaWiki messages with interface explanation. |
||
⚫ | Changes that can benefit other wiki sites and are not specific to Wikipedia can be submitted to [[translatewiki.net]] (also known as TWN, formerly known as BetaWiki). See [[translatewiki:Translate: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 the [[translatewiki:Support|support 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 {{tl|interface explanation}} is available for this. Pages using this template can be found in [[:Category:MediaWiki messages with interface explanation]]. |
||
⚫ | 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 the Special:Preferences. Once enabled a "message names" item appears in the tool box, when clicked the names of all items are displayed. |
||
⚫ | |||
⚫ | 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 the [[Special:Preferences#mw-prefsection-gadgets|Special:Preferences]]. Once enabled a "message names" item appears in the tool box, when clicked the names of all items are displayed. |
||
==Overview of messages== |
==Overview of messages== |
||
{{See|Help:System message|Wikipedia:Software notices}} |
|||
The template (shown below) lists a selection of key messages. Not included are |
The template {{tl|MediaWiki messages}} (shown below) lists a selection of key messages. Not included are |
||
* Abusefilter warnings, as there many of these, and they can be found here. |
* [[WP:Abusefilter|Abusefilter]] warnings, as there many of these, and they can be found [[Special:PrefixIndex/MediaWiki:Abusefilter-|here]]. |
||
* Tags added automatically to edit summaries by edit filters, which are listed at Special:Tags. |
* [[Wikipedia:tags|Tags]] added automatically to [[help:edit summary|edit summaries]] by [[wp:edit filter|edit filters]], which are listed at [[Special:Tags]]. |
||
* Messages describing Preferences options (<kbd>Mediawiki:Tog-</kbd>) - Search for these |
* Messages describing Preferences options (<kbd>Mediawiki:Tog-</kbd>) - [{{fullurl:Special:AllMessages|prefix=tog-}} Search for these] |
||
* Messages providing |
* Messages providing [[tooltip]]s (<kbd>Mediawiki:Tooltip-</kbd>) - [{{fullurl:Special:AllMessages|prefix=tooltip-}} Search for these] |
||
* Messages relating to Cite.php are listed and discussed at Help talk:Cite errors. |
* Messages relating to [[WP:Cite.php|Cite.php]] are listed and discussed at [[Help talk:Cite errors]]. |
||
* MediaWiki:Uploadtext and related subpages (the subpages transclude pages from <kbd>Wikipedia:</kbd> space) - these are covered at Wikipedia talk:Upload. |
* [[MediaWiki:Uploadtext]] and related subpages (the subpages transclude pages from <kbd>Wikipedia:</kbd> space) - these are covered at [[Wikipedia talk:Upload]]. |
||
* CSS files, which are described at MediaWiki talk:Common.css. |
* [[CSS]] files, which are described at [[MediaWiki talk:Common.css]]. |
||
* Gadget-related messages - Gadgets |
* [[Wikipedia:Gadget|Gadget]]-related messages - [[Special:PrefixIndex/MediaWiki:Gadget|Gadgets]] |
||
The template , used on <kbd>MediaWiki talk:</kbd> pages (generally those with some discussion), adds pages it is on into Category:MediaWiki messages with interface explanation. |
The template {{tl|interface explanation}}, used on <kbd>MediaWiki talk:</kbd> pages (generally those with some discussion), adds pages it is on into [[:Category:MediaWiki messages with interface explanation]]. |
||
A complete list of messages is available at Special:Allmessages. MediaWiki messages serving the software default are called "unmodified" and appear as red links in the Allmessages list, and do not appear in a Prefix-based search as they don't technically exist as pages. Because Special:Allmessages displays '''all''' system messages (the page is over 1 MB) some users might prefer to view these messages alphabetically: |
A complete list of messages is available at [[Special:Allmessages]]. MediaWiki messages serving the software default are called "unmodified" and appear as red links in the Allmessages list, and do not appear in a [//en.wikipedia.org/w/index.php?title=Special:PrefixIndex&prefix=&namespace=8 Prefix-based search] as they don't technically exist as pages. Because [[Special:Allmessages]] displays '''all''' system messages (the page is over 1 MB) some users might prefer to view these messages alphabetically: |
||
[{{fullurl:Special:Allpages|from=MediaWiki:%21}} @] [[Special:Prefixindex/MediaWiki:A|A]] [[Special:Prefixindex/MediaWiki:B|B]] [[Special:Prefixindex/MediaWiki:C|C]] [[Special:Prefixindex/MediaWiki:D|D]] [[Special:Prefixindex/MediaWiki:E|E]] [[Special:Prefixindex/MediaWiki:F|F]] [[Special:Prefixindex/MediaWiki:G|G]] [[Special:Prefixindex/MediaWiki:H|H]] [[Special:Prefixindex/MediaWiki:I|<small> </small>I<small> </small>]] [[Special:Prefixindex/MediaWiki:J|J]] [[Special:Prefixindex/MediaWiki:K|K]] [[Special:Prefixindex/MediaWiki:L|L]] [[Special:Prefixindex/MediaWiki:M|M]] [[Special:Prefixindex/MediaWiki:N|N]] [[Special:Prefixindex/MediaWiki:O|O]] [[Special:Prefixindex/MediaWiki:P|P]] [[Special:Prefixindex/MediaWiki:Q|Q]] [[Special:Prefixindex/MediaWiki:R|R]] [[Special:Prefixindex/MediaWiki:S|S]] [[Special:Prefixindex/MediaWiki:T|T]] [[Special:Prefixindex/MediaWiki:U|U]] [[Special:Prefixindex/MediaWiki:V|V]] [[Special:Prefixindex/MediaWiki:W|W]] [[Special:Prefixindex/MediaWiki:X|X]] [[Special:Prefixindex/MediaWiki:Y|Y]] [[Special:Prefixindex/MediaWiki:Z|Z]] |
|||
@ A B C D E F G H <small> </small>I<small> </small> J K L M N O P Q R S T U V W X Y Z |
|||
For a list of '''all''' MediaWiki pages, see Special:Prefixindex/MediaWiki:, or search the MediaWiki namespace. |
For a list of '''all''' MediaWiki pages, see [[Special:Prefixindex/MediaWiki:]], or [//en.wikipedia.org/w/index.php?title=Special%3ASearch&redirs=1&ns8=1 search the MediaWiki namespace]. |
||
{{MediaWiki messages|state=expanded}} |
{{MediaWiki messages|state=expanded}} |
||
==Technical details== |
==Technical details== |
||
The MediaWiki namespace is a mechanism allowing |
The MediaWiki namespace is a mechanism allowing [[Help:Administration|administrator]]s to [[m:Help:System message|customise 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 messages is '''8''', with a corresponding {{ns:9}} namespace '''9''' to discuss individual messages. |
The namespace number of {{ns:8}} messages is '''8''', with a corresponding {{ns:9}} namespace '''9''' to discuss individual messages. |
||
Some projects offer templates like to propose modifications, others have a page like |
Some projects offer templates like {{tiw|en|editprotected}} to propose modifications, others have a page like |
||
Meta:Requests for help from a sysop or bureaucrat for this purpose. |
[[m:Meta:Requests for help from a sysop or bureaucrat|Meta:Requests for help from a sysop or bureaucrat]] for this purpose. |
||
;Links to MediaWiki messages work like links to ordinary pages, examples: |
;Links to MediaWiki messages work like links to ordinary pages, examples: |
||
:<kbd><nowiki>[[MediaWiki:Edit]]</nowiki></kbd> |
:<kbd><nowiki>[[MediaWiki:Edit]]</nowiki></kbd> [[MediaWiki:Edit]], |
||
:w:de:MediaWiki:Edit, |
:<kbd><nowiki>[[w:de:MediaWiki:Edit]]</nowiki></kbd> [[w:de:MediaWiki:Edit]], |
||
:<kbd><nowiki>[{{fullurl:m:MediaWiki:Edit|action=render}} demo]</nowiki></kbd> demo. |
:<kbd><nowiki>[{{fullurl:m:MediaWiki:Edit|action=render}} demo]</nowiki></kbd> [{{fullurl:m:MediaWiki:Edit|action=render}} demo]. |
||
Each message in the <code>$wgAllMessagesEn</code> array in Messages.php corresponds to a page in the MediaWiki namespace. example, there may be a line in the php file: |
Each message in the <code>$wgAllMessagesEn</code> array in [http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3/languages/Messages.php Messages.php]{{dead link}} corresponds to a page in the MediaWiki namespace. For example, there may be a line in the php file: |
||
'recentchanges' => 'Recent changes', |
'recentchanges' => 'Recent changes', |
||
To this corresponds the page MediaWiki:Recentchanges, and . When this page is edited the new message is automatically used for the recent changes link in the left pane of the desktop site. Similarly w:fr:MediaWiki:Recentchanges has the content <em>Modifications récentes</em>, note that the page name itself is not translated. |
To this corresponds the page [[MediaWiki:Recentchanges]], and {{evaldemo|int:Recentchanges}}. When this page is edited the new message is automatically used for the recent changes link in the left pane of the desktop site. Similarly [[w:fr:MediaWiki:Recentchanges]] has the content <em>Modifications récentes</em>, note that the page name itself is not translated. |
||
===Transclusion=== |
===Transclusion=== |
||
Transclusion of MediaWiki messages can make sense, as noted below historically these messages also covered the function of templates. |
[[WP:TRANS|Transclusion]] of MediaWiki messages can make sense, as noted below historically these messages also covered the function of templates. |
||
*{{evaldemo|MediaWiki:Edit|=}}, see {{tim|Ed}}. |
|||
⚫ | |||
*, see . |
|||
⚫ | |||
⚫ | |||
*{{evaldemo|MediaWiki:Example|=}} doesn't exist. |
|||
⚫ | |||
*doesn't exist. |
|||
⚫ | |||
⚫ | The difference between {{tlc|MediaWiki:}} and {{tlc|int:}} is that {{tlc|MediaWiki:}} transcludes using the default language of the Wiki (i.e. English), whereas {{tlc|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: |
||
* |
|||
*{{MediaWiki:articlepage}} |
|||
* |
|||
*{{int:articlepage}} |
|||
However many messages are not suited for transclusion, because they contain '''$1''' and similar parameters not evaluated by the |
However many messages are not suited for transclusion, because they contain '''$1''' and similar parameters not evaluated by the |
||
template parser, or raw CSS and XHTML markup not permitted on normal pages. |
template parser, or raw [[w:Cascading Style Sheets|CSS]] and [[w:en:XHTML|XHTML]] markup not permitted on normal pages. |
||
===Interlanguage links=== |
===Interlanguage links=== |
||
Interlanguage |
[[Help:Interwiki linking|Interlanguage link]]s in MediaWiki messages typically won't work as expected. Adding <kbd><noinclude></kbd> isn't good enough, because something has to evaluate it, as it's the case for messages [[#Inclusion|included]] like ordinary templates, but not {{clarifyme}} for messages used internally as system messages. |
||
Instead, one can use in-page interlanguage links on the talk pages, does this for some major projects. |
Instead, one can use in-page interlanguage links on the talk pages, {{tim|ilm}} does this for some major projects. |
||
===Strings exclusive to language file=== |
===Strings exclusive to language file=== |
||
Line 80: | Line 89: | ||
* The names of the special pages |
* The names of the special pages |
||
* Month and days-of-the-week names |
* Month and days-of-the-week names |
||
* A number of items in Special:Preferences |
* A number of items in [[Special:Preferences]] |
||
== History == |
== History == |
||
Line 86: | Line 95: | ||
The 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. |
The 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 the Template namespace; a conversion script running as "User:Template namespace initialisation script", was run by developer Tim Starling, which moved all non-system messages to the new namespace, and replaced MediaWiki: 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". |
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 the [[Wikipedia:Template namespace|Template namespace]]; a conversion script running as "[[User:Template namespace initialisation script]]", was run by developer [[User:Tim Starling|Tim Starling]], which moved all non-system messages to the new namespace, and replaced MediaWiki: 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) to articles 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 of Wikipedia:Articles for deletion or Wikipedia:Votes for deletion. |
For a short time, before the renaming from votes for deletion (VfD) to [[Wikipedia:articles for deletion|articles 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 of [[Wikipedia:Articles for deletion]] or [[Wikipedia:Votes for deletion]]. |
||
==See also== |
==See also== |
||
*MediaWiki namespace in version 1.26 |
*[[m:Help:MediaWiki namespace/old|MediaWiki namespace in version 1.26]] |
||
*Template:MediaWiki redundant / Template:MediaWiki redirect |
*[[Template:MediaWiki redundant]] / [[Template:MediaWiki redirect]] |
||
*Wikipedia:WikiProject Usability/MediaWiki |
*[[Wikipedia:WikiProject Usability/MediaWiki]] |
||
*MediaWiki talk:Sitenotice - creating sitenotices |
*[[MediaWiki talk:Sitenotice]] - creating sitenotices |
||
*Wikipedia:Bug reports and feature requests - on filing a "bug" to get the MediaWiki software fixed or enhanced. See also WP:DevMemo. |
*[[Wikipedia:Bug reports and feature requests]] - on filing a "bug" to get the MediaWiki software fixed or enhanced. See also [[WP:DevMemo]]. |
||
*Wikipedia:Template limits |
*[[Wikipedia:Template limits]] |
||
*WP:Tools / Tools by tags - externally hosted tools which complement the MediaWiki software |
*[[WP:Tools]] / [https://wiki.toolserver.org/view/Category:Tools_by_tags Tools by tags] - externally hosted tools which complement the MediaWiki software |
||
==Notes== |
==Notes== |
||
Line 103: | Line 112: | ||
==External links== |
==External links== |
||
* www.mediawiki.org. |
* [http://www.mediawiki.org www.mediawiki.org]. |
||
{{Wikipedia technical help|collapsed}} |
{{Wikipedia technical help|collapsed}} |
||
{{CSS and JS MediaWiki messages|style=}} |
{{CSS and JS MediaWiki messages|style=}} |
Revision as of 07:08, 2 May 2019
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) |
The MediaWiki namespace is one of the standard namespaces in the database structure of the MediaWiki software, on which Wikipedia runs. The pages in this namespace (which have titles beginning with MediaWiki:) contain the text to be displayed in certain places in the web interface. Only administrators and interface editors can edit this namespace, but all editors can propose changes on appropriate talk pages.
Overview
The MediaWiki namespace allows administrators and interface editors to customise or translate the MediaWiki web interface.
Because the changes to these pages have a global effect, they are protected from editing, and only 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 the Wikipedia:Village pump; an edit request should then be made if there is consensus for the change.
Changes that can benefit other wiki sites and are not specific to Wikipedia can be submitted to translatewiki.net (also known as TWN, formerly known as BetaWiki). See translatewiki:Translate: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 the support 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 in Category:MediaWiki messages with interface explanation.
Some messages have old documentation available by setting the 'language' to qqq. For instance MediaWiki:Login has old, and somewhat incorrect, documentation at MediaWiki: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 the Special:Preferences. Once enabled a "message names" item appears in the tool box, when clicked the names of all items are displayed.
Overview of messages
The template {{MediaWiki messages}} (shown below) lists a selection of key messages. Not included are
- Abusefilter warnings, as there many of these, and they can be found here.
- Tags added automatically to edit summaries by edit filters, which are listed at Special:Tags.
- Messages describing Preferences options (Mediawiki:Tog-) - Search for these
- Messages providing tooltips (Mediawiki:Tooltip-) - Search for these
- Messages relating to Cite.php are listed and discussed at Help talk:Cite errors.
- MediaWiki:Uploadtext and related subpages (the subpages transclude pages from Wikipedia: space) - these are covered at Wikipedia talk:Upload.
- CSS files, which are described at MediaWiki talk:Common.css.
- Gadget-related messages - Gadgets
The template {{interface explanation}}, used on MediaWiki talk: pages (generally those with some discussion), adds pages it is on into Category:MediaWiki messages with interface explanation.
A complete list of messages is available at Special:Allmessages. MediaWiki messages serving the software default are called "unmodified" and appear as red links in the Allmessages list, and do not appear in a Prefix-based search as they don't technically exist as pages. Because Special:Allmessages displays all system messages (the page is over 1 MB) some users might prefer to view these messages alphabetically: @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
For a list of all MediaWiki pages, see Special:Prefixindex/MediaWiki:, or search the MediaWiki namespace.
Technical details
The MediaWiki namespace is a mechanism allowing administrators to customise 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 is 8, with a corresponding MediaWiki talk namespace 9 to discuss individual messages. Some projects offer templates like en:Template:editprotected (backlinks ) to propose modifications, others have a page like Meta:Requests for help from a sysop or bureaucrat for 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 the $wgAllMessagesEn
array in Messages.php[dead link] corresponds to a page in the MediaWiki namespace. For example, there may be a line in the php file:
'recentchanges' => 'Recent changes',
To this corresponds the page MediaWiki: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. Similarly w:fr:MediaWiki:Recentchanges has the content Modifications récentes, note that the page name itself is not translated.
Transclusion
Transclusion of MediaWiki messages can make sense, as noted below historically these messages also covered the function of templates.
{{MediaWiki:Edit}}
= Edit this page, see m:Template:Ed (backlinks ).{{int:Edit}}
= Edit this page, colon function int: is a shorthand for MediaWiki:.{{int:Example}}
= ⧼Example⧽, but only as far as the message exists.{{MediaWiki:Example}}
= MediaWiki:Example doesn'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 $1 and similar parameters not evaluated by the template parser, or raw CSS and XHTML markup not permitted on normal pages.
Interlanguage links
Interlanguage links in 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 messages included like 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 (backlinks ) does this for some major projects.
Strings exclusive to language file
Some text strings cannot be customised using this feature, and so can only be changed by editing the language file. These include:
- The namespace titles "User", "Wikipedia", "Image", etc.
- The names of the special pages
- Month and days-of-the-week names
- A number of items in Special:Preferences
History
The 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 the Template namespace; a conversion script running as "User:Template namespace initialisation script", was run by developer Tim Starling, which moved all non-system messages to the new namespace, and replaced MediaWiki: 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) to articles 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 of Wikipedia:Articles for deletion or Wikipedia:Votes for deletion.
See also
- MediaWiki namespace in version 1.26
- Template:MediaWiki redundant / 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 also WP:DevMemo.
- Wikipedia:Template limits
- WP:Tools / Tools by tags - externally hosted tools which complement the MediaWiki software
Notes
- ^ 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, for example MediaWiki:Linktrail. In practice the software ignores the database contents for MediaWiki:Linktrail, taking the regular expression straight out of the message files, for performance and stability reasons.