Extension:WikimediaMessages/ast

Category:GPL licensed extensions/ast
MediaWiki extensions manual
WikimediaMessages
Release status: stableCategory:Stable extensions/ast
Implementation User interfaceCategory:User interface extensions/ast
Description Amiesta los mensaxes y gramática específicos de Wikimedia, lo mesmo que les adautaciones específiques de Wikimedia de los mensaxes rellacionaos con llicencies o xurídicos
Author(s)
  • Tim Starling
  • Siebrand Mazeland
  • James D. Forrrester
  • Multichill
MediaWiki 1.25+Category:Extensions with manual MediaWiki version
Database changes No
License GNU General Public License 2.0 or later
Download Category:Extensions in Wikimedia version control/ast
  • $wgWikimediaMessagesLicensing
  • $wgWikimediaMessagesAnonDonateLink
  • $wgWikimediaStylesSkins
Quarterly downloads 6 (Ranked 92nd)
Public wikis using 933 (Ranked 263rd)
Translate the WikimediaMessages extension if it is available at translatewiki.net
Issues Open tasks · Report a bug
Category:All extensions/ast

WikimediaMessages amiesta los mensaxes y gramática específicos de Wikimedia, lo mesmo que les adautaciones específiques de Wikimedia de los mensaxes rellacionaos con llicencies o xurídicos.

Instalación

  • Download and move the extracted WikimediaMessages folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/WikimediaMessages
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'WikimediaMessages' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Responsibilities

WikimediaMessages has several responsibilities which are documented here.

Cross-project message modification

The WikimediaMessages extension can be used to alter messages so they apply across sites. For example, to set the donate URL to point to "https://donate.wikimedia.org/" the sitesupport-url message can be modified by editing MediaWiki:sitesupport-url, however this will only apply to one wiki. The WikimediaMessages allows you to set the message for all wikis without needing to modify every site.

Note after changing a message you may need to rebuild the localization cache.

Defining new messages

You can define messages that are not defined in any other repository by modifying the associated language JSON files in i18n/wikimedia

Note if you want to override a message defined elsewhere, follow the guidelines for overrides.

Overriding existing messages

If a message exists in a repo and you want to override the message:

  1. Define these messages in the wikimediaoverrides folder. Make sure to append the message key of the message you want to override with "wikimedia-". For example: The message "foo" can be overridden using a key "wikimedia-foo"
  2. Update the hook onMessageCacheFetchOverrides in Hook.php so that the message for overriding is in the array of messages to override. Make sure to list the key of the message you are wanting to override (e.g. without the "wikimedia-" prefix)

Contact page styles

The WikimediaMessages extension adds the ext.wikimediamessages.contactpage module which adds Wikimedia-specific customisation to Extension:ContactPage.

Site admin helper

Many templates and associated styles were defined over a decade ago, and in many cases for many projects lack maintainers. The ext.wikimediamessages.styles module allows shipping of global styles for common templates across Wikimedia to apply Recommendations_for_night_mode_compatibility_on_Wikimedia_wikis and Recommendations for mobile friendly articles on Wikimedia wikis. The expectation is that community members at their own pace should upstream styles from this module into their own templates.

Finding styles

The styles provided are listed in the modules/ext.wikimediamessage.styles folder. Each file name corresponds with a "key".

The styles are expressed using LESS which is not available on wiki but an administrator can adapt these styles locally.

Disabling styles

In some cases styles won't apply to a project. For example the navbox and hatnote styles are not applicable to a project which uses neither of these templates. To disable the styles in hatnote.less and navbox.less an interface administrator can modify MediaWiki:wikimedia-styles-exclude with the text hatnote|navbox.

When disabling styles we recommend understanding what the styles are doing and first upstreaming relevant styles first.

To disable all styles provided by Wikimedia (not recommended unless you know what you are doing) the message can be set to:

ambox|hatnote|infobox|navbox|theme-night-mainpage|theme-night|theme-night-portal

Applying styles only to specific skins

If you want the styles to not apply to a certain skin, you generate the raw stylesheet prior to disabling a package of styles and copy and paste relevant styles to one of the skin site CSS pages e.g. MediaWiki:Minerva.css, MediaWiki:Vector-2022.css etc..

You can generate the full list of styles by visiting /w/load.php?lang=en&modules=ext.wikimediamessages.styles&debug=1&only=styles on your wiki. For example on English Wikipedia: https://en.wikipedia.org/w/load.php?lang=en&modules=ext.wikimediamessages.styles&debug=1&only=styles.

Category:Extensions used on Wikimedia/ast#WikimediaMessages/ast Category:Wiki-specific extensions/ast
Category:All extensions/ast Category:BeforePageDisplay extensions/ast Category:CampaignEventsGetPolicyMessageForRegistrationForm extensions/ast Category:CampaignEventsGetPolicyMessageForRegistration extensions/ast Category:DiscussionToolsTermsOfUseMessages extensions/ast Category:EditPageCopyrightWarning extensions/ast Category:Extensions in Wikimedia version control/ast Category:Extensions used on Wikimedia/ast Category:Extensions with manual MediaWiki version Category:FlowTermsOfUseMessages extensions/ast Category:GPL licensed extensions/ast Category:MessageCacheFetchOverrides extensions/ast Category:ResourceLoaderRegisterModules extensions/ast Category:SidebarBeforeOutput extensions/ast Category:SkinAddFooterLinks extensions/ast Category:SkinCopyrightFooterMessage extensions/ast Category:SkinTemplateNavigation::Universal extensions/ast Category:SpecialPageBeforeExecute extensions/ast Category:Stable extensions/ast Category:TorBlockBlockedMsg extensions/ast Category:UploadForm:initial extensions/ast Category:User interface extensions/ast Category:Wiki-specific extensions/ast