Bug 30232 - add current time to message wlnote on Special:Watchlist
authorAntoine Musso <hashar@users.mediawiki.org>
Mon, 7 Nov 2011 14:20:17 +0000 (14:20 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Mon, 7 Nov 2011 14:20:17 +0000 (14:20 +0000)
Patch by Umherirrender. I did remove the rcnote message being used most
probably before we had support for {{PLURAL}}. So now we just rely
on the wlnote message.

As requested by Niklas, the timeanddate parameter was dropped from
original patch.

Umherirrender is already in the CREDITS file.

RELEASE-NOTES-1.19
includes/specials/SpecialWatchlist.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php

index 7f85921..a434b7f 100644 (file)
@@ -127,6 +127,7 @@ production.
 * (bug 32022) Our phpunit.php script can now be executed from another directory
 * (bug 26020) Setting $wgEmailConfirmToEdit to true no longer removes diffs
   from recent changes feeds
+* (bug 30232) add current time to message wlnote on Special:Watchlist
 
 === API changes in 1.19 ===
 * (bug 19838) siprop=interwikimap can now use the interwiki cache.
index ad2c5eb..330f0b4 100644 (file)
@@ -298,20 +298,14 @@ class SpecialWatchlist extends SpecialPage {
                /* Start bottom header */
 
                $wlInfo = '';
-               if( $values['days'] >= 1 ) {
+               if( $values['days'] > 0 ) {
                        $timestamp = wfTimestampNow();
-                       $wlInfo = wfMsgExt( 'rcnote', 'parseinline',
+                       $wlInfo = wfMsgExt( 'wlnote', 'parseinline',
                                        $lang->formatNum( $numRows ),
-                                       $lang->formatNum( $values['days'] ),
-                                       $lang->timeAndDate( $timestamp, true ),
+                                       $lang->formatNum( round( $values['days'] * 24 ) ),
                                        $lang->date( $timestamp, true ),
                                        $lang->time( $timestamp, true )
                                ) . '<br />';
-               } elseif( $values['days'] > 0 ) {
-                       $wlInfo = wfMsgExt( 'wlnote', 'parseinline',
-                                       $lang->formatNum( $numRows ),
-                                       $lang->formatNum( round( $values['days'] * 24 ) )
-                               ) . '<br />';
                }
 
                $cutofflinks = "\n" . $this->cutoffLinks( $values['days'], $nondefaults ) . "<br />\n";
index 766de9e..a6e77ad 100644 (file)
@@ -2731,7 +2731,7 @@ Future changes to this page and its associated talk page will be listed there, a
 'watchmethod-list'     => 'checking watched pages for recent edits',
 'watchlistcontains'    => 'Your watchlist contains $1 {{PLURAL:$1|page|pages}}.',
 'iteminvalidname'      => "Problem with item '$1', invalid name...",
-'wlnote'               => "Below {{PLURAL:$1|is the last change|are the last '''$1''' changes}} in the last {{PLURAL:$2|hour|'''$2''' hours}}.",
+'wlnote'               => "Below {{PLURAL:$1|is the last change|are the last '''$1''' changes}} in the last {{PLURAL:$2|hour|'''$2''' hours}}, as of $3, $4.",
 'wlshowlast'           => 'Show last $1 hours $2 days $3',
 'watchlist-options'    => 'Watchlist options',
 
index fe94852..0d4f07e 100644 (file)
@@ -1713,6 +1713,7 @@ This action allows editing of all of the "user rights", not just the rights of t
 'recentchanges-label-bot'         => 'Tooltip for {{msg-mw|boteditletter}}',
 'recentchanges-label-unpatrolled' => 'Tooltip for {{msg-mw|unpatrolledletter}}',
 'rcnote'                          => 'Used on [[Special:RecentChanges]].
+Shoulds looks like the message wlnote used similary but on Special:Recentchanges
 * $1 is the number of changes shown,
 * $2 is the number of days for which the changes are shown,
 * $3 is a date and time (deprecated),
@@ -2411,6 +2412,13 @@ This is a button text used in [[Special:Emailuser]] when called without a (valid
 'nowatchlist'          => 'Displayed when there is no pages in the watchlist.',
 'watchlistanontext'    => '* $1 is a link to [[Special:UserLogin]] with {{msg-mw|loginreqlink}} as link description',
 'watchnologin'         => '{{Identical|Not logged in}}',
+'wlnote' => 'Used on Special:WatchList when days > 0
+Shoulds looks like the message rcnote used similary but on Special:Recentchanges
+* $1 is the number of changes shown,
+* $2 is the number of days for which the changes are shown,
+* $3 is a date alone,
+* $4 is a time alone.
+',
 'addwatch'             => 'Link to a dialog box, displayed at the end of the list of categories at the foot of each page.',
 'addedwatchtext'       => 'Explanation shown when clicking on the {{msg|watch}} tab. See also {{msg|addedwatch}}.',
 'removedwatchtext'     => "After a page has been removed from a user's watchlist by clicking the {{msg|unwatch}} tab at the top of an article, this message appears just below the title of the article. $1 is the title of the article. See also {{msg|removedwatch}} and {{msg|addedwatchtext}}.",