Index: trunk/extensions/Translate/TranslateEditAddons.php |
— | — | @@ -485,4 +485,17 @@ |
486 | 486 | $out->addHtml( $output ); |
487 | 487 | return false; |
488 | 488 | } |
| 489 | + |
| 490 | + public static function searchProfile( &$profiles ) { |
| 491 | + global $wgTranslateMessageNamespaces; |
| 492 | + $insert = array(); |
| 493 | + $insert['translation'] = array( |
| 494 | + 'message' => 'translate-searchprofile', |
| 495 | + 'tooltip' => 'translate-searchprofile-tooltip', |
| 496 | + 'namespaces' => $wgTranslateMessageNamespaces, |
| 497 | + ); |
| 498 | + |
| 499 | + $profiles = wfArrayInsertAfter( $profiles, $insert, 'help' ); |
| 500 | + return true; |
| 501 | + } |
489 | 502 | } |
Index: trunk/extensions/Translate/Translate.php |
— | — | @@ -111,6 +111,9 @@ |
112 | 112 | // Translation display related |
113 | 113 | $wgHooks['ArticleContentOnDiff'][] = 'TranslateEditAddons::displayOnDiff'; |
114 | 114 | |
| 115 | +// Search profile |
| 116 | +$wgHooks['SpecialSearchProfiles'][] = 'TranslateEditAddons::searchProfile'; |
| 117 | + |
115 | 118 | // New rights |
116 | 119 | $wgAvailableRights[] = 'translate'; |
117 | 120 | $wgAvailableRights[] = 'translate-import'; |
Index: trunk/extensions/Translate/Translate.i18n.php |
— | — | @@ -357,6 +357,10 @@ |
358 | 358 | 'translate-gs-avgscore' => 'Avg. score', |
359 | 359 | |
360 | 360 | 'translate-documentation-language' => 'Message documentation', |
| 361 | + |
| 362 | + // Search profile hook |
| 363 | + 'translate-searchprofile' => 'Translations', |
| 364 | + 'translate-searchprofile-tooltip' => 'Search from all translations', |
361 | 365 | ); |
362 | 366 | |
363 | 367 | /** Message documentation (Message documentation) |