r24473 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24472‎ | r24473 | r24474 >
Date:19:08, 30 July 2007
Author:raymond
Status:old
Tags:
Comment:
Separate date and time in new 'filerevert-intro', 'filerevert-defaultcomment' and 'filerevert-success' messages to allow a better localization.
It's always a mess to localize with timestamps, at least in German :-(
Modified paths:
  • /trunk/phase3/includes/FileRevertForm.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesDe.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/FileRevertForm.php
@@ -68,7 +68,8 @@
6969 $status = $this->file->upload( $source, $comment, $comment );
7070 if( $status->isGood() ) {
7171 $wgOut->addHtml( wfMsgExt( 'filerevert-success', 'parse', $this->title->getText(),
72 - $wgLang->timeAndDate( $this->getTimestamp() ),
 72+ $wgLang->date( $this->getTimestamp() ),
 73+ $wgLang->time( $this->getTimestamp() ),
7374 $wgServer . $this->file->getArchiveUrl( $this->oldimage ) ) );
7475 $wgOut->returnToMain( false, $this->title );
7576 } else {
@@ -97,7 +98,7 @@
9899 $form .= Xml::hidden( 'wpEditToken', $wgUser->editToken( $this->oldimage ) );
99100 $form .= '<fieldset><legend>' . wfMsgHtml( 'filerevert-legend' ) . '</legend>';
100101 $form .= wfMsgExt( 'filerevert-intro', 'parse', $this->title->getText(),
101 - $wgLang->timeAndDate( $timestamp ), $wgServer . $this->file->getArchiveUrl( $this->oldimage ) );
 102+ $wgLang->date( $timestamp ), $wgLang->time( $timestamp ), $wgServer . $this->file->getArchiveUrl( $this->oldimage ) );
102103
103104 /*
104105 * I was going to do a little comparison (current vs. old) here,
@@ -119,7 +120,7 @@
120121
121122 $form .= '<p>' . Xml::inputLabel( wfMsg( 'filerevert-comment' ), 'wpComment', 'wpComment',
122123 60, wfMsgForContent( 'filerevert-defaultcomment',
123 - $wgContLang->timeAndDate( $timestamp, false, false ) ) ) . '</p>';
 124+ $wgContLang->date( $timestamp, false, false ), $wgContLang->time( $timestamp, false, false ) ) ) . '</p>';
124125 $form .= '<p>' . Xml::submitButton( wfMsg( 'filerevert-submit' ) ) . '</p>';
125126 $form .= '</fieldset>';
126127 $form .= '</form>';
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1439,17 +1439,17 @@
14401440 'imgdelete' => 'del',
14411441 'imgdesc' => 'desc',
14421442 'imgfile' => 'file',
1443 -'filehist' => 'File history',
1444 -'filehist-help' => 'Click on a date/time to view the file as it appeared at that time.',
1445 -'filehist-deleteall' => 'delete all',
1446 -'filehist-deleteone' => 'delete this',
1447 -'filehist-revert' => 'revert',
1448 -'filehist-current' => 'current',
1449 -'filehist-datetime' => 'Date/Time',
1450 -'filehist-user' => 'User',
1451 -'filehist-dimensions' => 'Dimensions',
1452 -'filehist-filesize' => 'File size',
1453 -'filehist-comment' => 'Comment',
 1443+'filehist' => 'File history',
 1444+'filehist-help' => 'Click on a date/time to view the file as it appeared at that time.',
 1445+'filehist-deleteall' => 'delete all',
 1446+'filehist-deleteone' => 'delete this',
 1447+'filehist-revert' => 'revert',
 1448+'filehist-current' => 'current',
 1449+'filehist-datetime' => 'Date/Time',
 1450+'filehist-user' => 'User',
 1451+'filehist-dimensions' => 'Dimensions',
 1452+'filehist-filesize' => 'File size',
 1453+'filehist-comment' => 'Comment',
14541454 'imagelinks' => 'Links',
14551455 'linkstoimage' => 'The following pages link to this file:',
14561456 'nolinkstoimage' => 'There are no pages that link to this file.',
@@ -1468,14 +1468,14 @@
14691469 'imagelist_search_for' => 'Search for image name:',
14701470
14711471 # File reversion
1472 -'filerevert' => 'Revert $1',
1473 -'filerevert-legend' => 'Revert file',
1474 -'filerevert-intro' => "<span class=\"plainlinks\">You are reverting '''[[Media:$1|$1]]''' to the [$3 version as of $2].</span>",
1475 -'filerevert-comment' => 'Comment:',
1476 -'filerevert-defaultcomment' => 'Reverted to version as of $1',
1477 -'filerevert-submit' => 'Revert',
1478 -'filerevert-success' => "<span class=\"plainlinks\">'''[[Media:$1|$1]]''' has been reverted to the [$3 version as of $2].</span>",
1479 -'filerevert-badversion' => 'There is no previous local version of this file with the provided timestamp.',
 1472+'filerevert' => 'Revert $1',
 1473+'filerevert-legend' => 'Revert file',
 1474+'filerevert-intro' => "<span class=\"plainlinks\">You are reverting '''[[Media:$1|$1]]''' to the [$4 version as of $2, $3].</span>",
 1475+'filerevert-comment' => 'Comment:',
 1476+'filerevert-defaultcomment' => 'Reverted to version as of $1, $2',
 1477+'filerevert-submit' => 'Revert',
 1478+'filerevert-success' => "<span class=\"plainlinks\">'''[[Media:$1|$1]]''' has been reverted to the [$4 version as of $2, $3].</span>",
 1479+'filerevert-badversion' => 'There is no previous local version of this file with the provided timestamp.',
14801480
14811481 # MIME search
14821482 'mimesearch' => 'MIME search',
Index: trunk/phase3/languages/messages/MessagesDe.php
@@ -1117,11 +1117,11 @@
11181118 # File reversion
11191119 'filerevert' => 'Zurücksetzen von $1',
11201120 'filerevert-legend' => 'Datei zurücksetzen',
1121 -'filerevert-intro' => '<span class="plainlinks">Du setzt die Datei \'\'\'[[Media:$1|$1]]\'\'\' auf die [$3 frühere Version zum Zeitpunkt $2] zurück.</span>',
 1121+'filerevert-intro' => '<span class="plainlinks">Du setzt die Datei \'\'\'[[Media:$1|$1]]\'\'\' auf die [$4 Version vom $2, $3 Uhr] zurück.</span>',
11221122 'filerevert-comment' => 'Grund:',
1123 -'filerevert-defaultcomment' => 'zurückgesetzt auf Version $1',
 1123+'filerevert-defaultcomment' => 'zurückgesetzt auf die Version vom $1, $2 Uhr',
11241124 'filerevert-submit' => 'Zurücksetzen',
1125 -'filerevert-success' => '<span class="plainlinks">\'\'\'[[Media:$1|$1]]\'\'\' wurde auf die frühere [$3 Version zum Zeitpunkt $2] zurückgesetzt.</span>',
 1125+'filerevert-success' => '<span class="plainlinks">\'\'\'[[Media:$1|$1]]\'\'\' wurde auf die [$4 Version vom $2, $3 Uhr] zurückgesetzt.</span>',
11261126 'filerevert-badversion' => 'Es gibt keine Version der Datei zu dem angegebenen Zeitpunkt.',
11271127
11281128 # MIME search

Follow-up revisions

RevisionCommit summaryAuthorDate
r24502Merged revisions 24415-24479 via svnmerge from...david22:31, 31 July 2007

Status & tagging log