From 00a913cecd549778dcd763573042eed491b1173b Mon Sep 17 00:00:00 2001 From: Purodha B Blissenbach Date: Mon, 1 Jun 2009 20:45:46 +0000 Subject: [PATCH] Message 'revisionasof' - date and time separated as of request by user "Der Umherirrende" at http://translatewiki.net/w/i.php?title=Support&oldid=1243738#split_date_and_time --- includes/FeedUtils.php | 10 +++++++--- includes/diff/DifferenceEngine.php | 8 ++++++-- includes/specials/SpecialUndelete.php | 4 +++- languages/messages/MessagesQqq.php | 2 +- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/includes/FeedUtils.php b/includes/FeedUtils.php index 9a2a724058..005069b289 100644 --- a/includes/FeedUtils.php +++ b/includes/FeedUtils.php @@ -76,7 +76,9 @@ class FeedUtils { wfProfileIn( __FUNCTION__."-dodiff" ); #$diffText = $de->getDiff( wfMsg( 'revisionasof', - # $wgContLang->timeanddate( $timestamp ) ), + # $wgContLang->timeanddate( $timestamp ), + # $wgContLang->date( $timestamp ), + # $wgContLang->time( $timestamp ) ), # wfMsg( 'currentrev' ) ); // Don't bother generating the diff if we won't be able to show it @@ -85,7 +87,9 @@ class FeedUtils { $diffText = $de->getDiff( wfMsg( 'previousrevision' ), // hack wfMsg( 'revisionasof', - $wgContLang->timeanddate( $timestamp ) ) ); + $wgContLang->timeanddate( $timestamp ), + $wgContLang->date( $timestamp ), + $wgContLang->time( $timestamp ) ) ); } if ( ( strlen( $diffText ) > $wgFeedDiffCutoff ) || ( $wgFeedDiffCutoff <= 0 ) ) { @@ -152,4 +156,4 @@ class FeedUtils { return $text; } -} \ No newline at end of file +} diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index 2df9e145bb..5e6b9c77cf 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -840,6 +840,8 @@ CONTROL; // Set assorted variables $timestamp = $wgLang->timeanddate( $this->mNewRev->getTimestamp(), true ); + $dateofrev = $wgLang->date( $this->mNewRev->getTimestamp(), true ); + $timeofrev = $wgLang->time( $this->mNewRev->getTimestamp(), true ); $this->mNewPage = $this->mNewRev->getTitle(); if( $this->mNewRev->isCurrent() ) { $newLink = $this->mNewPage->escapeLocalUrl( 'oldid=' . $this->mNewid ); @@ -851,7 +853,7 @@ CONTROL; } else { $newLink = $this->mNewPage->escapeLocalUrl( 'oldid=' . $this->mNewid ); $newEdit = $this->mNewPage->escapeLocalUrl( 'action=edit&oldid=' . $this->mNewid ); - $this->mPagetitle = htmlspecialchars( wfMsg( 'revisionasof', $timestamp ) ); + $this->mPagetitle = htmlspecialchars( wfMsg( 'revisionasof', $timestamp, $dateofrev, $timeofrev ) ); $this->mNewtitle = "{$this->mPagetitle}"; $this->mNewtitle .= " (" . wfMsgHtml( $editable ? 'editold' : 'viewsourceold' ) . ")"; @@ -886,9 +888,11 @@ CONTROL; $this->mOldPage = $this->mOldRev->getTitle(); $t = $wgLang->timeanddate( $this->mOldRev->getTimestamp(), true ); + $dateofrev = $wgLang->date( $this->mOldRev->getTimestamp(), true ); + $timeofrev = $wgLang->time( $this->mOldRev->getTimestamp(), true ); $oldLink = $this->mOldPage->escapeLocalUrl( 'oldid=' . $this->mOldid ); $oldEdit = $this->mOldPage->escapeLocalUrl( 'action=edit&oldid=' . $this->mOldid ); - $this->mOldPagetitle = htmlspecialchars( wfMsg( 'revisionasof', $t ) ); + $this->mOldPagetitle = htmlspecialchars( wfMsg( 'revisionasof', $t, $dateofrev, $timeofrev ) ); $this->mOldtitle = "{$this->mOldPagetitle}" . " (" . wfMsgHtml( $editable ? 'editold' : 'viewsourceold' ) . ")"; diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index 074a4bd606..b0e47cb836 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -869,7 +869,9 @@ class UndeleteForm { $targetPage, wfMsgHtml( 'revisionasof', - htmlspecialchars( $wgLang->timeanddate( $rev->getTimestamp(), true ) ) + htmlspecialchars( $wgLang->timeanddate( $rev->getTimestamp(), true ), + htmlspecialchars( $wgLang->date( $rev->getTimestamp(), true ), + htmlspecialchars( $wgLang->time( $rev->getTimestamp(), true ) ) ), array(), $targetQuery diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index 9a9be2ea47..5578910c3b 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -710,7 +710,7 @@ Please report at [[Support]] if you are unable to properly translate this messag 'viewpagelogs' => 'Link displayed in history of pages', 'currentrev' => '{{Identical|Current revision}}', 'currentrev-asof' => 'The text appears at the right side when comparing 2 different edits of the same page. For example: [http://translatewiki.net/w/i.php?title=FreeCol%3AIntegerAboveZero%2Fca&diff=788645&oldid=788644]', -'revisionasof' => "Used on a difference page when comparing different versions of a page or when viewing an non-current version of a page. \$1 is the date/time at which the revision was created. Example: \"''Revision as of 14:44, 24 January 2008''\".", +'revisionasof' => "Used on a difference page when comparing different versions of a page or when viewing an non-current version of a page. \$1 is the date/time at which the revision was created. Example: \"''Revision as of 14:44, 24 January 2008''\". \$2 is the date at which the revision was created. \$3 is the time at which the revision was created.", 'revision-info' => 'Appears just below the page title when an old version of the page is being viewed. * $1 indicates the time of that revision and -- 2.20.1