r102284 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102283‎ | r102284 | r102285 >
Date:14:20, 7 November 2011
Author:hashar
Status:ok
Tags:
Comment:
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.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWatchlist.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesQqq.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -127,6 +127,7 @@
128128 * (bug 32022) Our phpunit.php script can now be executed from another directory
129129 * (bug 26020) Setting $wgEmailConfirmToEdit to true no longer removes diffs
130130 from recent changes feeds
 131+* (bug 30232) add current time to message wlnote on Special:Watchlist
131132
132133 === API changes in 1.19 ===
133134 * (bug 19838) siprop=interwikimap can now use the interwiki cache.
Index: trunk/phase3/includes/specials/SpecialWatchlist.php
@@ -298,20 +298,14 @@
299299 /* Start bottom header */
300300
301301 $wlInfo = '';
302 - if( $values['days'] >= 1 ) {
 302+ if( $values['days'] > 0 ) {
303303 $timestamp = wfTimestampNow();
304 - $wlInfo = wfMsgExt( 'rcnote', 'parseinline',
 304+ $wlInfo = wfMsgExt( 'wlnote', 'parseinline',
305305 $lang->formatNum( $numRows ),
306 - $lang->formatNum( $values['days'] ),
307 - $lang->timeAndDate( $timestamp, true ),
 306+ $lang->formatNum( round( $values['days'] * 24 ) ),
308307 $lang->date( $timestamp, true ),
309308 $lang->time( $timestamp, true )
310309 ) . '<br />';
311 - } elseif( $values['days'] > 0 ) {
312 - $wlInfo = wfMsgExt( 'wlnote', 'parseinline',
313 - $lang->formatNum( $numRows ),
314 - $lang->formatNum( round( $values['days'] * 24 ) )
315 - ) . '<br />';
316310 }
317311
318312 $cutofflinks = "\n" . $this->cutoffLinks( $values['days'], $nondefaults ) . "<br />\n";
Index: trunk/phase3/languages/messages/MessagesQqq.php
@@ -1713,6 +1713,7 @@
17141714 'recentchanges-label-bot' => 'Tooltip for {{msg-mw|boteditletter}}',
17151715 'recentchanges-label-unpatrolled' => 'Tooltip for {{msg-mw|unpatrolledletter}}',
17161716 'rcnote' => 'Used on [[Special:RecentChanges]].
 1717+Shoulds looks like the message wlnote used similary but on Special:Recentchanges
17171718 * $1 is the number of changes shown,
17181719 * $2 is the number of days for which the changes are shown,
17191720 * $3 is a date and time (deprecated),
@@ -2411,6 +2412,13 @@
24122413 'nowatchlist' => 'Displayed when there is no pages in the watchlist.',
24132414 'watchlistanontext' => '* $1 is a link to [[Special:UserLogin]] with {{msg-mw|loginreqlink}} as link description',
24142415 'watchnologin' => '{{Identical|Not logged in}}',
 2416+'wlnote' => 'Used on Special:WatchList when days > 0
 2417+Shoulds looks like the message rcnote used similary but on Special:Recentchanges
 2418+* $1 is the number of changes shown,
 2419+* $2 is the number of days for which the changes are shown,
 2420+* $3 is a date alone,
 2421+* $4 is a time alone.
 2422+',
24152423 'addwatch' => 'Link to a dialog box, displayed at the end of the list of categories at the foot of each page.',
24162424 'addedwatchtext' => 'Explanation shown when clicking on the {{msg|watch}} tab. See also {{msg|addedwatch}}.',
24172425 '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}}.",
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -2731,7 +2731,7 @@
27322732 'watchmethod-list' => 'checking watched pages for recent edits',
27332733 'watchlistcontains' => 'Your watchlist contains $1 {{PLURAL:$1|page|pages}}.',
27342734 'iteminvalidname' => "Problem with item '$1', invalid name...",
2735 -'wlnote' => "Below {{PLURAL:$1|is the last change|are the last '''$1''' changes}} in the last {{PLURAL:$2|hour|'''$2''' hours}}.",
 2735+'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.",
27362736 'wlshowlast' => 'Show last $1 hours $2 days $3',
27372737 'watchlist-options' => 'Watchlist options',
27382738

Follow-up revisions

RevisionCommit summaryAuthorDate
r105651Fix message documentation from r102284tstarling05:22, 9 December 2011

Status & tagging log