Index: trunk/extensions/Translate/specials/SpecialMagic.php |
— | — | @@ -138,6 +138,7 @@ |
139 | 139 | |
140 | 140 | $this->setup( $parameters ); |
141 | 141 | $this->setHeaders(); |
| 142 | + TranslateUtils::addSpecialHelpLink( $wgOut, '//translatewiki.net/wiki/FAQ#Special:AdvancedTranslate', true ); |
142 | 143 | |
143 | 144 | $wgOut->addHTML( $this->getForm() ); |
144 | 145 | |
Index: trunk/extensions/Translate/TranslateUtils.php |
— | — | @@ -315,13 +315,20 @@ |
316 | 316 | /** |
317 | 317 | * @since 2012-01-12 |
318 | 318 | */ |
319 | | - public static function addSpecialHelpLink( OutputPage $out, /*string*/$to ) { |
| 319 | + public static function addSpecialHelpLink( OutputPage $out, /*string*/$to, $overrideBaseUrl = false ) { |
320 | 320 | $out->addModules( 'ext.translate.helplink' ); |
321 | 321 | $text = wfMessage( 'translate-gethelp' )->escaped(); |
| 322 | + |
| 323 | + if( $overrideBaseUrl ) { |
| 324 | + $helpUrl = $to; |
| 325 | + } else { |
| 326 | + $helpUrl = "//www.mediawiki.org/wiki/Special:MyLanguage/$to"; |
| 327 | + } |
| 328 | + |
322 | 329 | $link = Html::rawElement( |
323 | 330 | 'a', |
324 | 331 | array( |
325 | | - 'href' => "//www.mediawiki.org/wiki/Special:MyLanguage/$to", |
| 332 | + 'href' => $helpUrl, |
326 | 333 | 'target' => '_blank' |
327 | 334 | ), |
328 | 335 | "$text" ); |