From 27e2da1e01e654da4ed112181e48b7e3d7c9e4f4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Sun, 6 Jul 2008 18:13:38 +0000 Subject: [PATCH] * Split date and time to two variables to allow better translations in rcnote without breaking current ones --- includes/specials/SpecialRecentchanges.php | 4 +++- includes/specials/SpecialWatchlist.php | 19 +++++++++++++++---- languages/messages/MessagesEn.php | 2 +- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 5114ee89dd..cb718bdcbf 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -599,7 +599,9 @@ class SpecialRecentChanges extends SpecialPage { $note = wfMsgExt( 'rcnote', array( 'parseinline' ), $wgLang->formatNum( $options['limit'] ), $wgLang->formatNum( $options['days'] ), - $wgLang->timeAndDate( wfTimestampNow(), true ) ); + $wgLang->timeAndDate( wfTimestampNow(), true ), + $wgLang->date( wfTimestampNow(), true ), + $wgLang->time( wfTimestampNow(), true ) ); # Sort data for display and make sure it's unique after we've added user data. $wgRCLinkLimits[] = $options['limit']; diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 4af22c7dff..db7cd42353 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -206,11 +206,22 @@ function wfSpecialWatchlist( $par ) { $wgOut->addHTML( "
\n" ); if($days >= 1) { - $wgOut->addWikiText( wfMsgExt( 'rcnote', array( 'parseinline' ), $wgLang->formatNum( $numRows ), - $wgLang->formatNum( $days ), $wgLang->timeAndDate( wfTimestampNow(), true ) ) . '
' , false ); + $wgOut->addHTML( + wfMsgExt( 'rcnote', 'parseinline', + $wgLang->formatNum( $numRows ), + $wgLang->formatNum( $days ), + $wgLang->timeAndDate( wfTimestampNow(), true ), + $wgLang->date( wfTimestampNow(), true ), + $wgLang->time( wfTimestampNow(), true ) + ) . '
' + ); } elseif($days > 0) { - $wgOut->addWikiText( wfMsgExt( 'wlnote', array( 'parseinline' ), $wgLang->formatNum( $numRows ), - $wgLang->formatNum( round($days*24) ) ) . '
' , false ); + $wgOut->addHtml( + wfMsgExt( 'wlnote', 'parseinline', + $wgLang->formatNum( $numRows ), + $wgLang->formatNum( round($days*24) ) + ) . '
' + ); } $wgOut->addHTML( "\n" . wlCutoffLinks( $days, 'Watchlist', $nondefaults ) . "
\n" ); diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index b4a8a34a18..1493a7acb4 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1560,7 +1560,7 @@ please see math/README to configure.', 'recentchanges-url' => 'Special:Recentchanges', # do not translate or duplicate this message to other languages 'recentchangestext' => 'Track the most recent changes to the wiki on this page.', 'recentchanges-feed-description' => 'Track the most recent changes to the wiki in this feed.', -'rcnote' => "Below {{PLURAL:$1|is '''1''' change|are the last '''$1''' changes}} in the last {{PLURAL:$2|day|'''$2''' days}}, as of $3.", +'rcnote' => "Below {{PLURAL:$1|is '''1''' change|are the last '''$1''' changes}} in the last {{PLURAL:$2|day|'''$2''' days}}, as of $5, $4.", 'rcnotefrom' => "Below are the changes since '''$2''' (up to '''$1''' shown).", 'rclistfrom' => 'Show new changes starting from $1', 'rcshowhideminor' => '$1 minor edits', -- 2.20.1