扩展:维基媒体消息

This page is a translated version of the page Extension:WikimediaMessages and the translation is 100% complete.
MediaWiki扩展手册
WikimediaMessages
发行状态: 稳定版
实现 用户界面
描述 添加维基媒体基金会特定消息及语法,以及维基媒体基金会特定的覆盖许可证或法律相关的消息
作者
  • Tim Starling
  • Siebrand Mazeland
  • James D. Forrrester
  • Multichill
MediaWiki 1.25+
数据库更改
许可协议 GNU通用公眾授權條款2.0或更新版本
下載
  • $wgWikimediaMessagesLicensing
  • $wgWikimediaStylesSkins
季度下載量 22 (Ranked 116th)
正在使用的公开wiki数 933 (Ranked 263rd)
前往translatewiki.net翻譯WikimediaMessages扩展
問題 开启的任务 · 报告错误

维基媒体消息(WikimediaMessages)添加维基媒体基金会特定消息及语法,以及维基媒体基金会特定的覆盖许可证或法律相关的消息

安裝

  • 下载文件,并将其放置在您extensions/文件夹中的WikimediaMessages目录内。
    开发者和代码贡献人员应从Git安装扩展,输入:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/WikimediaMessages
  • 将下列代码放置在您的LocalSettings.php 的底部:
    wfLoadExtension( 'WikimediaMessages' );
    
  •   完成 – 在您的wiki上导航至Special:Version,以验证已成功安装扩展。

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.

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