r109749 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109748‎ | r109749 | r109750 >
Date:19:33, 22 January 2012
Author:siebrand
Status:ok
Tags:
Comment:
Add overrideBaseUrl setting to TranslateUtils::addSpecialHelpLink().
Add help link on Special:AdvancedTranslate.
Modified paths:
  • /trunk/extensions/Translate/TranslateUtils.php (modified) (history)
  • /trunk/extensions/Translate/specials/SpecialMagic.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/specials/SpecialMagic.php
@@ -138,6 +138,7 @@
139139
140140 $this->setup( $parameters );
141141 $this->setHeaders();
 142+ TranslateUtils::addSpecialHelpLink( $wgOut, '//translatewiki.net/wiki/FAQ#Special:AdvancedTranslate', true );
142143
143144 $wgOut->addHTML( $this->getForm() );
144145
Index: trunk/extensions/Translate/TranslateUtils.php
@@ -315,13 +315,20 @@
316316 /**
317317 * @since 2012-01-12
318318 */
319 - public static function addSpecialHelpLink( OutputPage $out, /*string*/$to ) {
 319+ public static function addSpecialHelpLink( OutputPage $out, /*string*/$to, $overrideBaseUrl = false ) {
320320 $out->addModules( 'ext.translate.helplink' );
321321 $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+
322329 $link = Html::rawElement(
323330 'a',
324331 array(
325 - 'href' => "//www.mediawiki.org/wiki/Special:MyLanguage/$to",
 332+ 'href' => $helpUrl,
326333 'target' => '_blank'
327334 ),
328335 "$text" );

Follow-up revisions

RevisionCommit summaryAuthorDate
r110310MFT 1.18wmf1 r108719 r108793 r108804 r108805 r109019 r109744 r109745 r109747 ...nikerabbit18:11, 30 January 2012

Status & tagging log