From 703dd35a7b2f2f5a8826360c24834ef7869e968b Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Mon, 7 Nov 2011 14:20:17 +0000 Subject: [PATCH] Bug 30232 - add current time to message wlnote on Special:Watchlist 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 | 1 + includes/specials/SpecialWatchlist.php | 12 +++--------- languages/messages/MessagesEn.php | 2 +- languages/messages/MessagesQqq.php | 8 ++++++++ 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index 7f85921f8f..a434b7f480 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -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. diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index ad2c5eba94..330f0b40f2 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -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 ) ) . '
'; - } elseif( $values['days'] > 0 ) { - $wlInfo = wfMsgExt( 'wlnote', 'parseinline', - $lang->formatNum( $numRows ), - $lang->formatNum( round( $values['days'] * 24 ) ) - ) . '
'; } $cutofflinks = "\n" . $this->cutoffLinks( $values['days'], $nondefaults ) . "
\n"; diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 766de9eff6..a6e77ad64f 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -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', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index fe948520b5..0d4f07e946 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -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}}.", -- 2.20.1