From: Brad Jorsch Date: Tue, 29 Jan 2013 03:13:16 +0000 (-0500) Subject: (bug 44253) Add message when there are few watchers X-Git-Tag: 1.31.0-rc.0~20770^2 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=1baa0e81514600f80aeccecfe0e78fdc5d0731bc;p=lhc%2Fweb%2Fwiklou.git (bug 44253) Add message when there are few watchers When a page has fewer than $wgUnwatchedPageThreshold watchers and the user does not have the 'unwatchedpages' right, the row for number if watchers is not being displayed at all. This is confusing to some users, so instead display the row with an appropriate message. Change-Id: I2425e45ec5db2dc743f875acf3fd3717b7d06286 --- diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php index 1cca95c485..acb8c00fe7 100644 --- a/includes/actions/InfoAction.php +++ b/includes/actions/InfoAction.php @@ -274,6 +274,11 @@ class InfoAction extends FormlessAction { $pageInfo['header-basic'][] = array( $this->msg( 'pageinfo-watchers' ), $lang->formatNum( $pageCounts['watchers'] ) ); + } elseif ( $wgUnwatchedPageThreshold !== false ) { + $pageInfo['header-basic'][] = array( + $this->msg( 'pageinfo-watchers' ), + $this->msg( 'pageinfo-few-watchers' )->numParams( $wgUnwatchedPageThreshold ) + ); } // Redirects to this page diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 7ed61237a3..3a477c70d7 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -3768,6 +3768,7 @@ This is probably caused by a link to a blacklisted external site.', 'pageinfo-robot-noindex' => 'Not indexable', 'pageinfo-views' => 'Number of views', 'pageinfo-watchers' => 'Number of page watchers', +'pageinfo-few-watchers' => 'Fewer than $1 {{PLURAL:$1|watcher|watchers}}', 'pageinfo-redirects-name' => 'Redirects to this page', 'pageinfo-redirects-value' => '$1', # only translate this message to other languages if you have to change it 'pageinfo-subpages-name' => 'Subpages of this page', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index bb0e151b26..429cd7efbf 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -6522,6 +6522,7 @@ See also: 'pageinfo-robot-noindex' => 'An indication that the page is not indexable (that is, is not listed on the results page of a search engine).', 'pageinfo-views' => 'The number of times the page has been viewed.', 'pageinfo-watchers' => 'The number of users watching the page.', +'pageinfo-few-watchers' => 'Message displayed when there are fewer than $wgUnwatchedPageThreshold watchers. $1 is the value of $wgUnwatchedPageThreshold.', 'pageinfo-redirects-name' => "The number of redirects to the page. Used as link text, linked to '{{int:Whatlinkshere-title}}' page ([[Special:WhatLinksHere]]).", diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 1ab22e2e64..e2997c4711 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -2702,6 +2702,7 @@ $wgMessageStructure = array( 'pageinfo-robot-noindex', 'pageinfo-views', 'pageinfo-watchers', + 'pageinfo-few-watchers', 'pageinfo-redirects-name', 'pageinfo-redirects-value', 'pageinfo-subpages-name',