From: Alexandre Emsenhuber Date: Thu, 17 Nov 2011 20:30:28 +0000 (+0000) Subject: Use local context to get messages X-Git-Tag: 1.31.0-rc.0~26438 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=78650b844798eb7b1cb31c4db6d7ad2771ff26c0;p=lhc%2Fweb%2Fwiklou.git Use local context to get messages --- diff --git a/includes/specials/SpecialBooksources.php b/includes/specials/SpecialBooksources.php index 208193299d..48ca4f05d5 100644 --- a/includes/specials/SpecialBooksources.php +++ b/includes/specials/SpecialBooksources.php @@ -115,11 +115,11 @@ class SpecialBookSources extends SpecialPage { private function makeForm() { global $wgScript; - $form = '
' . wfMsgHtml( 'booksources-search-legend' ) . ''; + $form = '
' . $this->msg( 'booksources-search-legend' )->escaped() . ''; $form .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ); $form .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() ); - $form .= '

' . Xml::inputLabel( wfMsg( 'booksources-isbn' ), 'isbn', 'isbn', 20, $this->isbn ); - $form .= ' ' . Xml::submitButton( wfMsg( 'booksources-go' ) ) . '

'; + $form .= '

' . Xml::inputLabel( $this->msg( 'booksources-isbn' )->text(), 'isbn', 'isbn', 20, $this->isbn ); + $form .= ' ' . Xml::submitButton( $this->msg( 'booksources-go' )->text() ) . '

'; $form .= Xml::closeElement( 'form' ); $form .= '
'; return $form; @@ -139,7 +139,8 @@ class SpecialBookSources extends SpecialPage { wfRunHooks( 'BookInformation', array( $this->isbn, $this->getOutput() ) ); # Check for a local page such as Project:Book_sources and use that if available - $title = Title::makeTitleSafe( NS_PROJECT, wfMsgForContent( 'booksources' ) ); # Show list in content language + $page = $this->msg( 'booksources' )->inContentLanguage()->text(); + $title = Title::makeTitleSafe( NS_PROJECT, $page ); # Show list in content language if( is_object( $title ) && $title->exists() ) { $rev = Revision::newFromTitle( $title ); $this->getOutput()->addWikiText( str_replace( 'MAGICNUMBER', $this->isbn, $rev->getText() ) );