Use local context to get messages
[lhc/web/wiklou.git] / includes / specials / SpecialFileDuplicateSearch.php
index 67f8a2d..18d19db 100644 (file)
@@ -108,9 +108,9 @@ class FileDuplicateSearchPage extends QueryPage {
                        Xml::openElement( 'form', array( 'id' => 'fileduplicatesearch', 'method' => 'get', 'action' => $wgScript ) ) .
                        Html::hidden( 'title', $this->getTitle()->getPrefixedDbKey() ) .
                        Xml::openElement( 'fieldset' ) .
-                       Xml::element( 'legend', null, wfMsg( 'fileduplicatesearch-legend' ) ) .
-                       Xml::inputLabel( wfMsg( 'fileduplicatesearch-filename' ), 'filename', 'filename', 50, $this->filename ) . ' ' .
-                       Xml::submitButton( wfMsg( 'fileduplicatesearch-submit' ) ) .
+                       Xml::element( 'legend', null, $this->msg( 'fileduplicatesearch-legend' )->text() ) .
+                       Xml::inputLabel( $this->msg( 'fileduplicatesearch-filename' )->text(), 'filename', 'filename', 50, $this->filename ) . ' ' .
+                       Xml::submitButton( $this->msg( 'fileduplicatesearch-submit' )->text() ) .
                        Xml::closeElement( 'fieldset' ) .
                        Xml::closeElement( 'form' )
                );
@@ -130,14 +130,12 @@ class FileDuplicateSearchPage extends QueryPage {
                        if ( $img ) {
                                $thumb = $img->transform( array( 'width' => 120, 'height' => 120 ) );
                                if( $thumb ) {
-                                       $out->addHTML( '<div class="mw-float-end" id="mw-fileduplicatesearch-icon">' .
+                                       $out->addHTML( '<div id="mw-fileduplicatesearch-icon">' .
                                                $thumb->toHtml( array( 'desc-link' => false ) ) . '<br />' .
-                                               wfMsgExt( 'fileduplicatesearch-info', array( 'parse' ),
-                                                       $this->getLang()->formatNum( $img->getWidth() ),
-                                                       $this->getLang()->formatNum( $img->getHeight() ),
-                                                       $this->getLang()->formatSize( $img->getSize() ),
-                                                       $img->getMimeType()
-                                               ) .
+                                               $this->msg( 'fileduplicatesearch-info' )->numParams(
+                                                       $img->getWidth(), $img->getHeight() )->params(
+                                                       $this->getLanguage()->formatSize( $img->getSize() ),
+                                                       $img->getMimeType() )->parseAsBlock() .
                                                '</div>' );
                                }
                        }
@@ -155,7 +153,7 @@ class FileDuplicateSearchPage extends QueryPage {
                                $out->wrapWikiMsg(
                                        "<p class='mw-fileduplicatesearch-result-n'>\n$1\n</p>",
                                        array( 'fileduplicatesearch-result-n', wfEscapeWikiText( $this->filename ),
-                                               $this->getLang()->formatNum( $numRows - 1 ) )
+                                               $this->getLanguage()->formatNum( $numRows - 1 ) )
                                );
                        }
 
@@ -181,7 +179,7 @@ class FileDuplicateSearchPage extends QueryPage {
 
                $userText = $result->getUser( 'text' );
                $user = Linker::link( Title::makeTitle( NS_USER, $userText ), $userText );
-               $time = $this->getLang()->timeanddate( $result->getTimestamp() );
+               $time = $this->getLanguage()->userTimeAndDate( $result->getTimestamp(), $this->getUser() );
 
                return "$plink . . $user . . $time";
        }