// No framework specified
if ( $par == '' ) {
- $out->setPagetitle( wfMsgHtml( 'javascripttest' ) );
+ $out->setPageTitle( $this->msg( 'javascripttest' ) );
$summary = $this->wrapSummaryHtml(
- wfMsgHtml( 'javascripttest-pagetext-noframework' ) . $this->getFrameworkListHtml(),
+ $this->msg( 'javascripttest-pagetext-noframework' )->escaped() . $this->getFrameworkListHtml(),
'noframework'
);
$out->addHtml( $summary );
// Matched! Display proper title and initialize the framework
} elseif ( isset( self::$frameworks[$framework] ) ) {
- $out->setPagetitle( wfMsgHtml( 'javascripttest-title', wfMsgHtml( "javascripttest-$framework-name" ) ) );
- $out->setSubtitle(
- wfMessage( 'javascripttest-backlink' )->rawParams( Linker::linkKnown( $this->getTitle() ) )->escaped()
- );
+ $out->setPageTitle( $this->msg( 'javascripttest-title', $this->msg( "javascripttest-$framework-name" )->plain() ) );
+ $out->setSubtitle( $this->msg( 'javascripttest-backlink' )->rawParams( Linker::linkKnown( $this->getTitle() ) ) );
$this->{self::$frameworks[$framework]}();
// Framework not found, display error
} else {
- $out->setPagetitle( wfMsgHtml( 'javascripttest' ) );
+ $out->setPageTitle( $this->msg( 'javascripttest' ) );
$summary = $this->wrapSummaryHtml( '<p class="error">'
- . wfMsgHtml( 'javascripttest-pagetext-unknownframework', $par )
+ . $this->msg( 'javascripttest-pagetext-unknownframework', $par )->escaped()
. '</p>'
. $this->getFrameworkListHtml(),
'unknownframework'
$list .= Html::rawElement(
'li',
array(),
- Linker::link( $this->getTitle( $framework ), wfMsgHtml( "javascripttest-$framework-name" ) )
+ Linker::link( $this->getTitle( $framework ), $this->msg( "javascripttest-$framework-name" )->escaped() )
);
}
$list .= '</ul>';
- $msg = wfMessage( 'javascripttest-pagetext-frameworks' )->rawParams( $list )->parseAsBlock();
+ $msg = $this->msg( 'javascripttest-pagetext-frameworks' )->rawParams( $list )->parseAsBlock();
return $msg;
}
* Initialize the page for QUnit.
*/
private function initQUnitTesting() {
- global $wgJavaScriptTestConfig, $wgLang;
+ global $wgJavaScriptTestConfig;
$out = $this->getOutput();
$qunitTestModules = $out->getResourceLoader()->getTestModuleNames( 'qunit' );
$out->addModules( $qunitTestModules );
- $summary = wfMessage( 'javascripttest-qunit-intro' )
+ $summary = $this->msg( 'javascripttest-qunit-intro' )
->params( $wgJavaScriptTestConfig['qunit']['documentation'] )
->parseAsBlock();
- $header = wfMessage( 'javascripttest-qunit-heading' )->escaped();
- $userDir = $wgLang->getDir();
+ $header = $this->msg( 'javascripttest-qunit-heading' )->escaped();
+ $userDir = $this->getLanguage()->getDir();
$baseHtml = <<<HTML
<div class="mw-content-ltr">