r37189 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r37188‎ | r37189 | r37190 >
Date:18:13, 6 July 2008
Author:nikerabbit
Status:old
Tags:
Comment:
* Split date and time to two variables to allow better translations in rcnote without breaking current ones
Modified paths:
  • /trunk/phase3/includes/specials/SpecialRecentchanges.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWatchlist.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialRecentchanges.php
@@ -599,7 +599,9 @@
600600 $note = wfMsgExt( 'rcnote', array( 'parseinline' ),
601601 $wgLang->formatNum( $options['limit'] ),
602602 $wgLang->formatNum( $options['days'] ),
603 - $wgLang->timeAndDate( wfTimestampNow(), true ) );
 603+ $wgLang->timeAndDate( wfTimestampNow(), true ),
 604+ $wgLang->date( wfTimestampNow(), true ),
 605+ $wgLang->time( wfTimestampNow(), true ) );
604606
605607 # Sort data for display and make sure it's unique after we've added user data.
606608 $wgRCLinkLimits[] = $options['limit'];
Index: trunk/phase3/includes/specials/SpecialWatchlist.php
@@ -206,11 +206,22 @@
207207 $wgOut->addHTML( "<hr />\n" );
208208
209209 if($days >= 1) {
210 - $wgOut->addWikiText( wfMsgExt( 'rcnote', array( 'parseinline' ), $wgLang->formatNum( $numRows ),
211 - $wgLang->formatNum( $days ), $wgLang->timeAndDate( wfTimestampNow(), true ) ) . '<br />' , false );
 210+ $wgOut->addHTML(
 211+ wfMsgExt( 'rcnote', 'parseinline',
 212+ $wgLang->formatNum( $numRows ),
 213+ $wgLang->formatNum( $days ),
 214+ $wgLang->timeAndDate( wfTimestampNow(), true ),
 215+ $wgLang->date( wfTimestampNow(), true ),
 216+ $wgLang->time( wfTimestampNow(), true )
 217+ ) . '<br />'
 218+ );
212219 } elseif($days > 0) {
213 - $wgOut->addWikiText( wfMsgExt( 'wlnote', array( 'parseinline' ), $wgLang->formatNum( $numRows ),
214 - $wgLang->formatNum( round($days*24) ) ) . '<br />' , false );
 220+ $wgOut->addHtml(
 221+ wfMsgExt( 'wlnote', 'parseinline',
 222+ $wgLang->formatNum( $numRows ),
 223+ $wgLang->formatNum( round($days*24) )
 224+ ) . '<br />'
 225+ );
215226 }
216227
217228 $wgOut->addHTML( "\n" . wlCutoffLinks( $days, 'Watchlist', $nondefaults ) . "<br />\n" );
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1560,7 +1560,7 @@
15611561 'recentchanges-url' => 'Special:Recentchanges', # do not translate or duplicate this message to other languages
15621562 'recentchangestext' => 'Track the most recent changes to the wiki on this page.',
15631563 'recentchanges-feed-description' => 'Track the most recent changes to the wiki in this feed.',
1564 -'rcnote' => "Below {{PLURAL:$1|is '''1''' change|are the last '''$1''' changes}} in the last {{PLURAL:$2|day|'''$2''' days}}, as of $3.",
 1564+'rcnote' => "Below {{PLURAL:$1|is '''1''' change|are the last '''$1''' changes}} in the last {{PLURAL:$2|day|'''$2''' days}}, as of $5, $4.",
15651565 'rcnotefrom' => "Below are the changes since '''$2''' (up to '''$1''' shown).",
15661566 'rclistfrom' => 'Show new changes starting from $1',
15671567 'rcshowhideminor' => '$1 minor edits',

Status & tagging log