Add plural to message 'rcnotefrom'
authorumherirrender <umherirrender_de.wp@web.de>
Mon, 14 Jul 2014 12:21:54 +0000 (14:21 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Fri, 25 Jul 2014 07:22:21 +0000 (09:22 +0200)
Also use the splitted date and time on the message.

Change-Id: I495d19258205d8713a19aa934a7657aecbe240d4

includes/specialpage/ChangesListSpecialPage.php
includes/specials/SpecialRecentchanges.php
includes/specials/SpecialWatchlist.php
languages/i18n/en.json
languages/i18n/qqq.json

index 80c612f..3c8bdcc 100644 (file)
@@ -53,7 +53,7 @@ abstract class ChangesListSpecialPage extends SpecialPage {
                $opts = $this->getOptions();
                if ( $rows === false ) {
                        if ( !$this->including() ) {
-                               $this->doHeader( $opts );
+                               $this->doHeader( $opts, 0 );
                                $this->getOutput()->setStatusCode( 404 );
                        }
 
@@ -327,7 +327,7 @@ abstract class ChangesListSpecialPage extends SpecialPage {
        public function webOutput( $rows, $opts ) {
                if ( !$this->including() ) {
                        $this->outputFeedLinks();
-                       $this->doHeader( $opts );
+                       $this->doHeader( $opts, $rows->numRows() );
                }
 
                $this->outputChangesList( $rows, $opts );
@@ -352,8 +352,9 @@ abstract class ChangesListSpecialPage extends SpecialPage {
         * Set the text to be displayed above the changes
         *
         * @param FormOptions $opts
+        * @param int $numRows Number of rows in the result to show after this header
         */
-       public function doHeader( $opts ) {
+       public function doHeader( $opts, $numRows ) {
                $this->setTopText( $opts );
 
                // @todo Lots of stuff should be done here.
index c3d9d3e..a2e271e 100644 (file)
@@ -356,8 +356,9 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
         * Set the text to be displayed above the changes
         *
         * @param FormOptions $opts
+        * @param int $numRows Number of rows in the result to show after this header
         */
-       public function doHeader( $opts ) {
+       public function doHeader( $opts, $numRows ) {
                global $wgScript;
 
                $this->setTopText( $opts );
@@ -367,7 +368,7 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
 
                $panel = array();
                $panel[] = self::makeLegend( $this->getContext() );
-               $panel[] = $this->optionsPanel( $defaults, $nondefaults );
+               $panel[] = $this->optionsPanel( $defaults, $nondefaults, $numRows );
                $panel[] = '<hr />';
 
                $extraOpts = $this->getExtraOptions( $opts );
@@ -642,9 +643,10 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
         *
         * @param array $defaults
         * @param array $nondefaults
+        * @param int $numRows Number of rows in the result to show after this header
         * @return string
         */
-       function optionsPanel( $defaults, $nondefaults ) {
+       function optionsPanel( $defaults, $nondefaults, $numRows ) {
                global $wgRCLinkLimits, $wgRCLinkDays;
 
                $options = $nondefaults + $defaults;
@@ -658,10 +660,15 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
                $lang = $this->getLanguage();
                $user = $this->getUser();
                if ( $options['from'] ) {
-                       $note .= $this->msg( 'rcnotefrom' )->numParams( $options['limit'] )->params(
-                               $lang->userTimeAndDate( $options['from'], $user ),
-                               $lang->userDate( $options['from'], $user ),
-                               $lang->userTime( $options['from'], $user ) )->parse() . '<br />';
+                       $note .= $this->msg( 'rcnotefrom' )
+                               ->numParams( $options['limit'] )
+                               ->params(
+                                       $lang->userTimeAndDate( $options['from'], $user ),
+                                       $lang->userDate( $options['from'], $user ),
+                                       $lang->userTime( $options['from'], $user )
+                               )
+                               ->numParams( $numRows )
+                               ->parse() . '<br />';
                }
 
                # Sort data for display and make sure it's unique after we've added user data.
index 94de5ce..372886c 100644 (file)
@@ -391,8 +391,9 @@ class SpecialWatchlist extends ChangesListSpecialPage {
         * Set the text to be displayed above the changes
         *
         * @param FormOptions $opts
+        * @param int $numRows Number of rows in the result to show after this header
         */
-       public function doHeader( $opts ) {
+       public function doHeader( $opts, $numRows ) {
                $user = $this->getUser();
 
                $this->getOutput()->addSubtitle(
index e42d716..c730de8 100644 (file)
        "recentchanges-legend-bot": "{{int:recentchanges-label-bot}}",
        "recentchanges-legend-unpatrolled": "{{int:recentchanges-label-unpatrolled}}",
        "recentchanges-legend-plusminus": "(<em>±123</em>)",
-       "rcnotefrom": "Below are the changes since <strong>$2</strong> (up to <strong>$1</strong> shown).",
+       "rcnotefrom": "Below {{PLURAL:$5|is the change|are the changes}} since <strong>$3, $4</strong> (up to <strong>$1</strong> shown).",
        "rclistfrom": "Show new changes starting from $2, $3",
        "rcshowhideminor": "$1 minor edits",
        "rcshowhideminor-show": "Show",
index ad5b288..d54d721 100644 (file)
        "recentchanges-legend-bot": "Used as legend on [[Special:RecentChanges]] and [[Special:Watchlist]].\n\nRefers to {{msg-mw|Recentchanges-label-bot}}.",
        "recentchanges-legend-unpatrolled": "Used as legend on [[Special:RecentChanges]] and [[Special:Watchlist]].\n\nRefers to {{msg-mw|Recentchanges-label-unpatrolled}}.",
        "recentchanges-legend-plusminus": "{{optional}}\nA plus/minus sign with a number for the legend.",
-       "rcnotefrom": "This message is displayed at [[Special:RecentChanges]] when viewing recentchanges from some specific time.\n\nThe corresponding message is {{msg-mw|Rclistfrom}} (split into date and time).\n\nParameters:\n* $1 - the maximum number of changes that are displayed\n* $2 - a date and time\n* $3 - (Optional) a date\n* $4 - (Optional) a time",
+       "rcnotefrom": "This message is displayed at [[Special:RecentChanges]] when viewing recentchanges from some specific time.\n\nThe corresponding message is {{msg-mw|Rclistfrom}}.\n\nParameters:\n* $1 - the maximum number of changes that are displayed\n* $2 - a date and time (Optional)\n* $3 - a date\n* $4 - a time\n* $5 - Number of changes are displayed, for use with PLURAL",
        "rclistfrom": "Used on [[Special:RecentChanges]]. Parameters:\n* $1 - (Currently not use) date and time. The date and the time adds to the rclistfrom description.\n* $2 - time. The time adds to the rclistfrom link description (with split of date and time).\n* $3 - date. The date adds to the rclistfrom link description (with split of date and time).\n\nThe corresponding message is {{msg-mw|Rcnotefrom}}.",
        "rcshowhideminor": "Option text in [[Special:RecentChanges]]. Parameters:\n* $1 - the \"show/hide\" command, with the text taken from either {{msg-mw|rcshowhideminor-show}} or {{msg-mw|rcshowhideminor-hide}}\n{{Identical|Minor edit}}",
        "rcshowhideminor-show": "{{doc-actionlink}}\nOption text in [[Special:RecentChanges]] in conjunction with {{msg-mw|rcshowhideminor}}.\n\nSee also:\n* {{msg-mw|rcshowhideminor-hide}}\n{{Identical|Show}}",