Index: trunk/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.php |
— | — | @@ -43,7 +43,7 @@ |
44 | 44 | $wgHooks['BeforePageDisplay'][] = array( &$wgExtZeroRatedMobileAccess, 'beforePageDisplayHTML' ); |
45 | 45 | |
46 | 46 | class ExtZeroRatedMobileAccess { |
47 | | - const VERSION = '0.0.3'; |
| 47 | + const VERSION = '0.0.4'; |
48 | 48 | |
49 | 49 | public static $renderZeroRatedLandingPage; |
50 | 50 | private static $debugOutput = array(); |
— | — | @@ -98,20 +98,20 @@ |
99 | 99 | echo self::getSearchFormHtml( $language['language'] ); |
100 | 100 | } |
101 | 101 | } |
| 102 | + $output = Html::openElement( 'select', |
| 103 | + array( 'id' => 'languageselection', |
| 104 | + 'onchange' => 'javascript:window.location = this.options[this.selectedIndex].value;' ) ); |
| 105 | + foreach ( $languageNames as $languageCode => $languageName ) { |
| 106 | + $output .= Html::element( 'option', |
| 107 | + array( 'value' => '//' . $languageCode . '.m.wikipedia.org/' ), |
| 108 | + $languageName ); |
| 109 | + } |
| 110 | + $output .= Html::closeElement( 'select', array() ); |
| 111 | + echo $output; |
| 112 | + exit(); |
102 | 113 | } |
103 | | - $output = Html::openElement( 'select', |
104 | | - array( 'id' => 'languageselection', |
105 | | - 'onchange' => 'javascript:window.location = this.options[this.selectedIndex].value;' ) ); |
106 | | - foreach ( $languageNames as $languageCode => $languageName ) { |
107 | | - $output .= Html::element( 'option', |
108 | | - array( 'value' => '//' . $languageCode . '.m.wikipedia.org/' ), |
109 | | - $languageName ); |
110 | | - } |
111 | | - $output .= Html::closeElement( 'select', array() ); |
112 | | - echo $output; |
113 | 114 | |
114 | 115 | wfProfileOut( __METHOD__ ); |
115 | | - exit(); |
116 | 116 | return true; |
117 | 117 | } |
118 | 118 | |
— | — | @@ -419,6 +419,7 @@ |
420 | 420 | } |
421 | 421 | |
422 | 422 | private static function getSearchFormHtml( $langCode ) { |
| 423 | + $searchValue = wfMsg( 'zero-rated-mobile-access-search' ); |
423 | 424 | $formHtml = <<<HTML |
424 | 425 | <form action="//{$langCode}.wikipedia.org/w/index.php" class="search_bar" method="get"> |
425 | 426 | <input type="hidden" value="Special:Search" name="title"> |
— | — | @@ -426,7 +427,7 @@ |
427 | 428 | <input type="text" name="search" id="search" size="22" value="" autocorrect="off" autocomplete="off" autocapitalize="off" maxlength="1024"> |
428 | 429 | <div class="clearlink" id="clearsearch" title="Clear"></div> |
429 | 430 | </div> |
430 | | - <button id="goButton" type="submit">Search</button> |
| 431 | + <button id="goButton" type="submit">{$searchValue}</button> |
431 | 432 | </form> |
432 | 433 | HTML; |
433 | 434 | return $formHtml; |
Index: trunk/extensions/ZeroRatedMobileAccess/ZeroRatedMobileAccess.i18n.php |
— | — | @@ -14,6 +14,7 @@ |
15 | 15 | // en translation |
16 | 16 | $messages['en'] = array ( |
17 | 17 | 'zero-rated-mobile-access-desc' => 'Zero Rated Mobile Access', |
| 18 | + 'zero-rated-mobile-access-search' => 'Search', |
18 | 19 | ); |
19 | 20 | |
20 | 21 | $messages['qqq'] = array( |