Index: trunk/tools/ToolserverI18N/TsIntuition.php |
— | — | @@ -959,7 +959,7 @@ |
960 | 960 | * - false: Disable this message all together. |
961 | 961 | * @return The HTML for the promo box. |
962 | 962 | */ |
963 | | - public function getPromoBox( $imgSize = 28, $helpTranslateDomain = null ) { |
| 963 | + public function getPromoBox( $imgSize = 28, $helpTranslateDomain = TSINT_HELP_CURRENT ) { |
964 | 964 | |
965 | 965 | // Logo |
966 | 966 | if ( is_int( $imgSize ) && $imgSize > 0 ) { |
— | — | @@ -992,18 +992,24 @@ |
993 | 993 | $change = $this->msg( 'bl-changelanguage', 'tsintuition' ); |
994 | 994 | |
995 | 995 | // Help translation |
996 | | - if ( $helpTranslateDomain === true ) { |
| 996 | + if ( $helpTranslateDomain === TSINT_HELP_ALL ) { |
997 | 997 | $helpTranslateDomain = '0-all'; |
998 | 998 | $twLinkText = $this->msg( 'help-translate-all', 'tsintuition' ); |
999 | | - } elseif ( is_null( $helpTranslateDomain ) ) { |
| 999 | + |
| 1000 | + } elseif ( $helpTranslateDomain === TSINT_HELP_CURRENT ) { |
1000 | 1001 | $helpTranslateDomain = $this->getDomain(); |
1001 | 1002 | $twLinkText = $this->msg( 'help-translate-tool', 'tsintuition' ); |
1002 | | - } else { |
| 1003 | + |
| 1004 | + } else { // TSINT_HELP_NONE |
1003 | 1005 | $twLinkText = $this->msg( 'help-translate-tool', 'tsintuition' ); |
1004 | 1006 | } |
| 1007 | + |
1005 | 1008 | $helpTranslateLink = ''; |
| 1009 | + |
1006 | 1010 | if ( is_string( $helpTranslateDomain ) ) { |
| 1011 | + |
1007 | 1012 | $helpTranslateDomain = strtolower( $helpTranslateDomain ); |
| 1013 | + |
1008 | 1014 | // http://translatewiki.net/w/i.php?language=nl&title=Special:Translate&group=tsint-0-all |
1009 | 1015 | $twParams = array( |
1010 | 1016 | 'title' => 'Special:Translate', |
— | — | @@ -1024,7 +1030,7 @@ |
1025 | 1031 | * Show a typical "powered by .." footer line. |
1026 | 1032 | * Same as getPromoBox() but without the image. |
1027 | 1033 | */ |
1028 | | - public function getFooterLine( $helpTranslateDomain = null ) { |
| 1034 | + public function getFooterLine( $helpTranslateDomain = TSINT_HELP_CURRENT ) { |
1029 | 1035 | return $this->getPromoBox( 'no-image', $helpTranslateDomain ); |
1030 | 1036 | } |
1031 | 1037 | |
Index: trunk/tools/ToolserverI18N/ToolStart.php |
— | — | @@ -20,5 +20,6 @@ |
21 | 21 | |
22 | 22 | |
23 | 23 | // Files |
| 24 | +require_once( __DIR__ . '/Defines.php' ) |
24 | 25 | require_once( __DIR__ . '/TsIntuitionUtil.php' ); |
25 | 26 | require_once( __DIR__ . '/TsIntuition.php' ); |
Index: trunk/tools/ToolserverI18N/Defines.php |
— | — | @@ -0,0 +1,15 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * |
| 5 | + * Created on March 23, 2011 |
| 6 | + * |
| 7 | + * @package TsIntuition |
| 8 | + */ |
| 9 | + |
| 10 | +/** |
| 11 | + * This file defines constants for Toolserver Intuition. |
| 12 | + */ |
| 13 | + |
| 14 | +define( 'TSINT_HELP_ALL', true ); |
| 15 | +define( 'TSINT_HELP_NONE', false ); |
| 16 | +define( 'TSINT_HELP_CURRENT', null ); |
Property changes on: trunk/tools/ToolserverI18N/Defines.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 17 | + native |