Similar to the statistics-pages-desc message that exists already.
This way mediawiki.org can stop using the hack currently employed
in the local override for the 'statistics-articles' message which
adds a line break inside the link label to emulate a caption. This
doesn't work well because it breaks after the first link.
Also:
* Change from exists() to !isDisabled() so that it can be optional.
* Fix wrong use of Xml::element and use Html::rawElement instead.
The message in question is already escaped. This was causing
escaped parser html to render as text on the page when the desc
message contains e.g. a wiki link.
Change-Id: I547d1da16c8bdbabddad35525a5c9fa34b8318d4
) {
if ( $descMsg ) {
$msg = $this->msg( $descMsg, $descMsgParam );
- if ( $msg->exists() ) {
- $descriptionText = $this->msg( 'parentheses' )->rawParams( $msg->parse() )
+ if ( !$msg->isDisabled() ) {
+ $descriptionHtml = $this->msg( 'parentheses' )->rawParams( $msg->parse() )
->escaped();
- $text .= "<br />" . Xml::element( 'small', array( 'class' => 'mw-statistic-desc' ),
- " $descriptionText" );
+ $text .= "<br />" . Html::rawElement( 'small', array( 'class' => 'mw-statistic-desc' ),
+ " $descriptionHtml" );
}
}
$this->formatRow( Linker::linkKnown( SpecialPage::getTitleFor( 'Allpages' ),
$this->msg( 'statistics-articles' )->parse() ),
$this->getLanguage()->formatNum( $this->good ),
- array( 'class' => 'mw-statistics-articles' ) ) .
+ array( 'class' => 'mw-statistics-articles' ),
+ 'statistics-articles-desc' ) .
$this->formatRow( $this->msg( 'statistics-pages' )->parse(),
$this->getLanguage()->formatNum( $this->total ),
array( 'class' => 'mw-statistics-pages' ),
"statistics-header-users": "User statistics",
"statistics-header-hooks": "Other statistics",
"statistics-articles": "Content pages",
+ "statistics-articles-desc": "",
"statistics-pages": "Pages",
"statistics-pages-desc": "All pages in the wiki, including talk pages, redirects, etc.",
"statistics-files": "Uploaded files",
"statistics-header-users": "Used in [[Special:Statistics]].\n{{Identical|User statistics}}",
"statistics-header-hooks": "Header of a section on [[Special:Statistics]] containing data provided by MediaWiki extensions",
"statistics-articles": "Used in [[Special:Statistics]].\n\nA 'content page' is a page that forms part of the purpose of the wiki. It includes the main page and pages in the main namespace and any other namespaces that are included when the wiki is customised. For example on Wikimedia Commons 'content pages' include pages in the file and category namespaces. On Wikinews 'content pages' include pages in the Portal namespace. For technical definition of 'content namespaces' see [[mw:Manual:Using_custom_namespaces#Content_namespaces|MediaWiki]].\n\nPossible alternatives to the word 'content' are 'subject matter' or 'wiki subject' or 'wiki purpose'.\n\n{{Identical|Content page}}",
+ "statistics-articles-desc": "Caption shown below ''Content pages'' on [[Special:Statistics]]",
"statistics-pages": "Used in [[Special:Statistics]]\n{{Identical|Page}}",
"statistics-pages-desc": "Tooltip shown over ''Pages'' (or as a note below it) in [[Special:Statistics]]",
"statistics-files": "Used in [[Special:Statistics]].\n{{Identical|Uploaded file}}",