| Index: trunk/phase3/includes/specials/SpecialJavaScriptTest.php |
| — | — | @@ -44,26 +44,24 @@ |
| 45 | 45 | |
| 46 | 46 | // No framework specified |
| 47 | 47 | if ( $par == '' ) { |
| 48 | | - $out->setPagetitle( wfMsgHtml( 'javascripttest' ) ); |
| | 48 | + $out->setPageTitle( $this->msg( 'javascripttest' ) ); |
| 49 | 49 | $summary = $this->wrapSummaryHtml( |
| 50 | | - wfMsgHtml( 'javascripttest-pagetext-noframework' ) . $this->getFrameworkListHtml(), |
| | 50 | + $this->msg( 'javascripttest-pagetext-noframework' )->escaped() . $this->getFrameworkListHtml(), |
| 51 | 51 | 'noframework' |
| 52 | 52 | ); |
| 53 | 53 | $out->addHtml( $summary ); |
| 54 | 54 | |
| 55 | 55 | // Matched! Display proper title and initialize the framework |
| 56 | 56 | } elseif ( isset( self::$frameworks[$framework] ) ) { |
| 57 | | - $out->setPagetitle( wfMsgHtml( 'javascripttest-title', wfMsgHtml( "javascripttest-$framework-name" ) ) ); |
| 58 | | - $out->setSubtitle( |
| 59 | | - wfMessage( 'javascripttest-backlink' )->rawParams( Linker::linkKnown( $this->getTitle() ) )->escaped() |
| 60 | | - ); |
| | 57 | + $out->setPageTitle( $this->msg( 'javascripttest-title', $this->msg( "javascripttest-$framework-name" )->plain() ) ); |
| | 58 | + $out->setSubtitle( $this->msg( 'javascripttest-backlink' )->rawParams( Linker::linkKnown( $this->getTitle() ) ) ); |
| 61 | 59 | $this->{self::$frameworks[$framework]}(); |
| 62 | 60 | |
| 63 | 61 | // Framework not found, display error |
| 64 | 62 | } else { |
| 65 | | - $out->setPagetitle( wfMsgHtml( 'javascripttest' ) ); |
| | 63 | + $out->setPageTitle( $this->msg( 'javascripttest' ) ); |
| 66 | 64 | $summary = $this->wrapSummaryHtml( '<p class="error">' |
| 67 | | - . wfMsgHtml( 'javascripttest-pagetext-unknownframework', $par ) |
| | 65 | + . $this->msg( 'javascripttest-pagetext-unknownframework', $par )->escaped() |
| 68 | 66 | . '</p>' |
| 69 | 67 | . $this->getFrameworkListHtml(), |
| 70 | 68 | 'unknownframework' |
| — | — | @@ -82,11 +80,11 @@ |
| 83 | 81 | $list .= Html::rawElement( |
| 84 | 82 | 'li', |
| 85 | 83 | array(), |
| 86 | | - Linker::link( $this->getTitle( $framework ), wfMsgHtml( "javascripttest-$framework-name" ) ) |
| | 84 | + Linker::link( $this->getTitle( $framework ), $this->msg( "javascripttest-$framework-name" )->escaped() ) |
| 87 | 85 | ); |
| 88 | 86 | } |
| 89 | 87 | $list .= '</ul>'; |
| 90 | | - $msg = wfMessage( 'javascripttest-pagetext-frameworks' )->rawParams( $list )->parseAsBlock(); |
| | 88 | + $msg = $this->msg( 'javascripttest-pagetext-frameworks' )->rawParams( $list )->parseAsBlock(); |
| 91 | 89 | |
| 92 | 90 | return $msg; |
| 93 | 91 | } |
| — | — | @@ -114,7 +112,7 @@ |
| 115 | 113 | * Initialize the page for QUnit. |
| 116 | 114 | */ |
| 117 | 115 | private function initQUnitTesting() { |
| 118 | | - global $wgJavaScriptTestConfig, $wgLang; |
| | 116 | + global $wgJavaScriptTestConfig; |
| 119 | 117 | |
| 120 | 118 | $out = $this->getOutput(); |
| 121 | 119 | |
| — | — | @@ -122,11 +120,11 @@ |
| 123 | 121 | $qunitTestModules = $out->getResourceLoader()->getTestModuleNames( 'qunit' ); |
| 124 | 122 | $out->addModules( $qunitTestModules ); |
| 125 | 123 | |
| 126 | | - $summary = wfMessage( 'javascripttest-qunit-intro' ) |
| | 124 | + $summary = $this->msg( 'javascripttest-qunit-intro' ) |
| 127 | 125 | ->params( $wgJavaScriptTestConfig['qunit']['documentation'] ) |
| 128 | 126 | ->parseAsBlock(); |
| 129 | | - $header = wfMessage( 'javascripttest-qunit-heading' )->escaped(); |
| 130 | | - $userDir = $wgLang->getDir(); |
| | 127 | + $header = $this->msg( 'javascripttest-qunit-heading' )->escaped(); |
| | 128 | + $userDir = $this->getLanguage()->getDir(); |
| 131 | 129 | |
| 132 | 130 | $baseHtml = <<<HTML |
| 133 | 131 | <div class="mw-content-ltr"> |