Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/113960
Change subject: Show relative 'last modified at' at bottom of each page ...................................................................... Show relative 'last modified at' at bottom of each page Bug: 30857 Change-Id: Ibc44cbd5e90aa0accd43e083435e3f9164cb259e --- M includes/Skin.php M languages/messages/MessagesEn.php M languages/messages/MessagesQqq.php 3 files changed, 4 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/60/113960/1 diff --git a/includes/Skin.php b/includes/Skin.php index 6722cca..1049822 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -885,9 +885,8 @@ } if ( $timestamp ) { - $d = $this->getLanguage()->userDate( $timestamp, $this->getUser() ); - $t = $this->getLanguage()->userTime( $timestamp, $this->getUser() ); - $s = ' ' . $this->msg( 'lastmodifiedat', $d, $t )->text(); + $mwTs = new MWTimestamp( $timestamp ); + $s = $this->msg( 'lastmodifiedat', $mwTs->getRelativeTimestamp() )->text(); } else { $s = ''; } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index d5198b6..1b7c1ef 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -888,7 +888,7 @@ 'redirectedfrom' => '(Redirected from $1)', 'redirectpagesub' => 'Redirect page', 'talkpageheader' => '-', # do not translate or duplicate this message to other languages -'lastmodifiedat' => 'This page was last modified on $1, at $2.', +'lastmodifiedat' => 'This page was last modified $1', 'viewcount' => 'This page has been accessed {{PLURAL:$1|once|$1 times}}.', 'protectedpage' => 'Protected page', 'jumpto' => 'Jump to:', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index 5e3662a..2d4608b 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -675,8 +675,7 @@ 'lastmodifiedat' => 'This message is shown below each page, in the footer with the logos and links. Parameters: -* $1 - date -* $2 - time +* $1 - how long ago, relative to current time, the page was modified See also: * {{msg-mw|Lastmodifiedatby}}', 'viewcount' => 'Used as page-view counter. Parameters: -- To view, visit https://gerrit.wikimedia.org/r/113960 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibc44cbd5e90aa0accd43e083435e3f9164cb259e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Yuvipanda <yuvipa...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits