Show range start and end in special page pagination
authorapexkid <aditya.iiita102@gmail.com>
Tue, 4 Feb 2014 21:27:16 +0000 (21:27 +0000)
committerBryanDavis <bdavis@wikimedia.org>
Wed, 5 Feb 2014 21:58:48 +0000 (21:58 +0000)
Changes pagination message from "starting with #X" to
"in range #X to #Y" for special pages such as
Special:MostLinkedCategories

Bug: 11269
Change-Id: Ibf9191f3a694014ad02eba9a58c600833e8361ec

includes/QueryPage.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc

index 7c2f8f7..bb6a0c3 100644 (file)
@@ -543,9 +543,9 @@ abstract class QueryPage extends SpecialPage {
                if ( $this->shownavigation ) {
                        $out->addHTML( $this->getPageHeader() );
                        if ( $this->numRows > 0 ) {
-                               $out->addHTML( $this->msg( 'showingresults' )->numParams(
+                               $out->addHTML( $this->msg( 'showingresultsinrange' )->numParams(
                                        min( $this->numRows, $this->limit ), # do not show the one extra row, if exist
-                                       $this->offset + 1 )->parseAsBlock() );
+                                       $this->offset + 1, (min( $this->numRows, $this->limit ) + $this->offset) )->parseAsBlock() );
                                # Disable the "next" link when we reach the end
                                $paging = $this->getLanguage()->viewPrevNext( $this->getPageTitle( $par ), $this->offset,
                                        $this->limit, $this->linkParameters(), ( $this->numRows <= $this->limit ) );
index fa0a354..497d2e7 100644 (file)
@@ -1855,6 +1855,7 @@ Details can be found in the [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENA
 'searchrelated'                    => 'related',
 'searchall'                        => 'all',
 'showingresults'                   => "Showing below up to {{PLURAL:$1|<strong>1</strong> result|<strong>$1</strong> results}} starting with #<strong>$2</strong>.",
+'showingresultsinrange'            => "Showing below up to {{PLURAL:$1|<strong>1</strong> result|<strong>$1</strong> results}} in range #<strong>$2</strong> to #<strong>$3</strong>.",
 'showingresultsnum'                => "Showing below {{PLURAL:$3|<strong>1</strong> result|<strong>$3</strong> results}} starting with #<strong>$2</strong>.",
 'showingresultsheader'             => "{{PLURAL:$5|Result <strong>$1</strong> of <strong>$3</strong>|Results <strong>$1 - $2</strong> of <strong>$3</strong>}} for <strong>$4</strong>",
 'search-nonefound'                 => 'There were no results matching the query.',
index dedf6f1..901cc2c 100644 (file)
@@ -2992,6 +2992,10 @@ See also:
 * $3 - total number of results
 * $4 - the search term
 * $5 - number of results',
+'showingresultsinrange' => 'Used in pagination of [[Special:MostLinkedCategories]]. Parameters:
+* $1 - the total number of results in the batch shown
+* $2 - the number of the first item listed
+* $3 - the number of last item in the batch shown',
 'search-nonefound' => 'Message shown when a search returned no results (when using the default MediaWiki search engine).',
 'powersearch-legend' => 'Advanced search
 
index f9eb675..ed85223 100644 (file)
@@ -991,6 +991,7 @@ $wgMessageStructure = array(
                'searchrelated',
                'searchall',
                'showingresults',
+               'showingresultsinrange',
                'showingresultsnum',
                'showingresultsheader',
                'search-nonefound',