Krinkle has uploaded a new change for review.
https://gerrit.wikimedia.org/r/226916
Change subject: SpecialStatistics: Implement statistics-articles-desc message
......................................................................
SpecialStatistics: Implement statistics-articles-desc message
Similar to the statistics-pages-desc message that exists already.
This way mediawiki.org can top 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 Htm::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
---
M includes/specials/SpecialStatistics.php
M languages/i18n/en.json
M languages/i18n/qqq.json
3 files changed, 8 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/16/226916/1
diff --git a/includes/specials/SpecialStatistics.php
b/includes/specials/SpecialStatistics.php
index 652ea82..8de6f8b 100644
--- a/includes/specials/SpecialStatistics.php
+++ b/includes/specials/SpecialStatistics.php
@@ -107,11 +107,11 @@
) {
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" );
}
}
@@ -134,7 +134,8 @@
$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'
),
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 1fdd75d..cb09a16 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -1585,6 +1585,7 @@
"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",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index 872a89f..1c0b5b1 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -1756,6 +1756,7 @@
"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}}",
--
To view, visit https://gerrit.wikimedia.org/r/226916
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I547d1da16c8bdbabddad35525a5c9fa34b8318d4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits