Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -760,6 +760,11 @@ |
761 | 761 | 'search' => array( |
762 | 762 | 'searchresults', |
763 | 763 | 'searchresults-title', |
| 764 | + 'searchresulttext', |
| 765 | + 'searchsubtitle', |
| 766 | + 'searchsubtitleinvalid', |
| 767 | + 'noexactmatch', |
| 768 | + 'noexactmatch-nocreate', |
764 | 769 | 'toomanymatches', |
765 | 770 | 'titlematches', |
766 | 771 | 'notitlematches', |
— | — | @@ -768,25 +773,6 @@ |
769 | 774 | 'prevn', |
770 | 775 | 'nextn', |
771 | 776 | 'viewprevnext', |
772 | | - 'searchmenu-legend', |
773 | | - 'searchmenu-exists', |
774 | | - 'searchmenu-new', |
775 | | - 'searchhelp-url', |
776 | | - 'searchmenu-prefix', |
777 | | - 'searchmenu-help', |
778 | | - 'searchprofile-articles', |
779 | | - 'searchprofile-articles-and-proj', |
780 | | - 'searchprofile-project', |
781 | | - 'searchprofile-images', |
782 | | - 'searchprofile-everything', |
783 | | - 'searchprofile-advanced', |
784 | | - 'searchprofile-articles-tooltip', |
785 | | - 'searchprofile-project-tooltip', |
786 | | - 'searchprofile-images-tooltip', |
787 | | - 'searchprofile-everything-tooltip', |
788 | | - 'searchprofile-advanced-tooltip', |
789 | | - 'prefs-search-nsdefault', |
790 | | - 'prefs-search-nscustom', |
791 | 777 | 'search-result-size', |
792 | 778 | 'search-result-score', |
793 | 779 | 'search-redirect', |
— | — | @@ -805,7 +791,7 @@ |
806 | 792 | 'showingresults', |
807 | 793 | 'showingresultsnum', |
808 | 794 | 'showingresultstotal', |
809 | | - 'search-nonefound', |
| 795 | + 'nonefound', |
810 | 796 | 'powersearch', |
811 | 797 | 'powersearch-legend', |
812 | 798 | 'powersearch-ns', |
— | — | @@ -879,6 +865,7 @@ |
880 | 866 | 'allowemail', |
881 | 867 | 'prefs-searchoptions', |
882 | 868 | 'prefs-namespaces', |
| 869 | + 'defaultns', |
883 | 870 | 'default', |
884 | 871 | 'files', |
885 | 872 | ), |
Index: trunk/phase3/skins/monobook/main.css |
— | — | @@ -1409,10 +1409,6 @@ |
1410 | 1410 | padding:2px; |
1411 | 1411 | } |
1412 | 1412 | |
1413 | | -#powersearch p { |
1414 | | - margin-top:0px; |
1415 | | -} |
1416 | | - |
1417 | 1413 | div.multipageimagenavbox { |
1418 | 1414 | border: solid 1px silver; |
1419 | 1415 | padding: 4px; |
Index: trunk/phase3/skins/common/shared.css |
— | — | @@ -106,18 +106,12 @@ |
107 | 107 | } |
108 | 108 | .mw-search-results li { |
109 | 109 | padding-bottom: 1em; |
110 | | - list-style:none; |
111 | 110 | } |
112 | 111 | .mw-search-result-data { |
113 | 112 | color: green; |
114 | 113 | font-size: 97%; |
115 | 114 | } |
116 | 115 | |
117 | | -td#mw-search-menu { |
118 | | - padding-left:6em; |
119 | | - font-size:85%; |
120 | | -} |
121 | | - |
122 | 116 | div#mw-search-interwiki { |
123 | 117 | float: right; |
124 | 118 | width: 18em; |
— | — | @@ -150,14 +144,6 @@ |
151 | 145 | font-weight: bold; |
152 | 146 | } |
153 | 147 | |
154 | | -div.searchresults { |
155 | | - border:1px solid darkblue; |
156 | | - padding-top: 5px; |
157 | | - padding-bottom: 5px; |
158 | | - padding-left: 15px; |
159 | | - padding-right: 15px; |
160 | | -} |
161 | | - |
162 | 148 | /* |
163 | 149 | * UserRights stuff |
164 | 150 | */ |
Index: trunk/phase3/includes/SearchEngine.php |
— | — | @@ -43,11 +43,6 @@ |
44 | 44 | return null; |
45 | 45 | } |
46 | 46 | |
47 | | - /** If this search backend can list/unlist redirects */ |
48 | | - function acceptListRedirects() { |
49 | | - return true; |
50 | | - } |
51 | | - |
52 | 47 | /** |
53 | 48 | * If an exact title match can be find, or a very slightly close match, |
54 | 49 | * return the title. If no match, returns NULL. |
— | — | @@ -267,52 +262,8 @@ |
268 | 263 | |
269 | 264 | return array_keys($wgNamespacesToBeSearchedDefault, true); |
270 | 265 | } |
271 | | - |
| 266 | + |
272 | 267 | /** |
273 | | - * Get a list of namespace names useful for showing in tooltips |
274 | | - * and preferences |
275 | | - * |
276 | | - * @param unknown_type $namespaces |
277 | | - */ |
278 | | - public static function namespacesAsText( $namespaces ){ |
279 | | - global $wgContLang; |
280 | | - |
281 | | - $formatted = array_map( array($wgContLang,'getFormattedNsText'), $namespaces ); |
282 | | - foreach( $formatted as $key => $ns ){ |
283 | | - if ( empty($ns) ) |
284 | | - $formatted[$key] = wfMsg( 'blanknamespace' ); |
285 | | - } |
286 | | - return $formatted; |
287 | | - } |
288 | | - |
289 | | - /** |
290 | | - * An array of "project" namespaces indexes typically searched |
291 | | - * by logged-in users |
292 | | - * |
293 | | - * @return array |
294 | | - * @static |
295 | | - */ |
296 | | - public static function projectNamespaces() { |
297 | | - global $wgNamespacesToBeSearchedDefault, $wgNamespacesToBeSearchedProject; |
298 | | - |
299 | | - return array_keys( $wgNamespacesToBeSearchedProject, true ); |
300 | | - } |
301 | | - |
302 | | - /** |
303 | | - * An array of "project" namespaces indexes typically searched |
304 | | - * by logged-in users in addition to the default namespaces |
305 | | - * |
306 | | - * @return array |
307 | | - * @static |
308 | | - */ |
309 | | - public static function defaultAndProjectNamespaces() { |
310 | | - global $wgNamespacesToBeSearchedDefault, $wgNamespacesToBeSearchedProject; |
311 | | - |
312 | | - return array_keys( $wgNamespacesToBeSearchedDefault + |
313 | | - $wgNamespacesToBeSearchedProject, true); |
314 | | - } |
315 | | - |
316 | | - /** |
317 | 268 | * Return a 'cleaned up' search string |
318 | 269 | * |
319 | 270 | * @return string |
— | — | @@ -534,11 +485,11 @@ |
535 | 486 | var $mRevision = null; |
536 | 487 | var $mImage = null; |
537 | 488 | |
538 | | - function __construct( $row ) { |
| 489 | + function SearchResult( $row ) { |
539 | 490 | $this->mTitle = Title::makeTitle( $row->page_namespace, $row->page_title ); |
540 | 491 | if( !is_null($this->mTitle) ){ |
541 | 492 | $this->mRevision = Revision::newFromTitle( $this->mTitle ); |
542 | | - if( $this->mTitle->getNamespace() === NS_IMAGE ) |
| 493 | + if($this->mTitle->getNamespace() == NS_IMAGE) |
543 | 494 | $this->mImage = wfFindFile( $this->mTitle ); |
544 | 495 | } |
545 | 496 | } |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -1436,7 +1436,7 @@ |
1437 | 1437 | * to ensure that client-side caches don't keep obsolete copies of global |
1438 | 1438 | * styles. |
1439 | 1439 | */ |
1440 | | -$wgStyleVersion = '184'; |
| 1440 | +$wgStyleVersion = '183'; |
1441 | 1441 | |
1442 | 1442 | |
1443 | 1443 | # Server-side caching: |
— | — | @@ -1924,20 +1924,6 @@ |
1925 | 1925 | ); |
1926 | 1926 | |
1927 | 1927 | /** |
1928 | | - * Additional namespaces to those in $wgNamespacesToBeSearchedDefault that |
1929 | | - * will be added to default search for "project" page inclusive searches |
1930 | | - * |
1931 | | - * Same format as $wgNamespacesToBeSearchedDefault |
1932 | | - */ |
1933 | | -$wgNamespacesToBeSearchedProject = array( |
1934 | | - NS_USER => true, |
1935 | | - NS_PROJECT => true, |
1936 | | - NS_HELP => true, |
1937 | | - NS_CATEGORY => true, |
1938 | | -); |
1939 | | - |
1940 | | - |
1941 | | -/** |
1942 | 1928 | * Site notice shown at the top of each page |
1943 | 1929 | * |
1944 | 1930 | * This message can contain wiki text, and can also be set through the |
Index: trunk/phase3/includes/specials/SpecialSearch.php |
— | — | @@ -39,8 +39,7 @@ |
40 | 40 | $searchPage = new SpecialSearch( $wgRequest, $wgUser ); |
41 | 41 | if( $wgRequest->getVal( 'fulltext' ) |
42 | 42 | || !is_null( $wgRequest->getVal( 'offset' )) |
43 | | - || !is_null( $wgRequest->getVal( 'searchx' )) ) |
44 | | - { |
| 43 | + || !is_null( $wgRequest->getVal( 'searchx' ))) { |
45 | 44 | $searchPage->showResults( $search, 'search' ); |
46 | 45 | } else { |
47 | 46 | $searchPage->goResult( $search ); |
— | — | @@ -70,7 +69,6 @@ |
71 | 70 | } |
72 | 71 | |
73 | 72 | $this->searchRedirects = $request->getcheck( 'redirs' ) ? true : false; |
74 | | - $this->searchAdvanced = $request->getVal('advanced'); |
75 | 73 | } |
76 | 74 | |
77 | 75 | /** |
— | — | @@ -79,7 +77,8 @@ |
80 | 78 | * @public |
81 | 79 | */ |
82 | 80 | function goResult( $term ) { |
83 | | - global $wgOut, $wgGoToEdit; |
| 81 | + global $wgOut; |
| 82 | + global $wgGoToEdit; |
84 | 83 | |
85 | 84 | $this->setupPage( $term ); |
86 | 85 | |
— | — | @@ -87,7 +86,7 @@ |
88 | 87 | $t = Title::newFromText( $term ); |
89 | 88 | |
90 | 89 | # If the string cannot be used to create a title |
91 | | - if( is_null( $t ) ) { |
| 90 | + if( is_null( $t ) ){ |
92 | 91 | return $this->showResults( $term ); |
93 | 92 | } |
94 | 93 | |
— | — | @@ -103,12 +102,19 @@ |
104 | 103 | if( ! is_null( $t ) ) { |
105 | 104 | wfRunHooks( 'SpecialSearchNogomatch', array( &$t ) ); |
106 | 105 | # If the feature is enabled, go straight to the edit page |
107 | | - if( $wgGoToEdit ) { |
| 106 | + if ( $wgGoToEdit ) { |
108 | 107 | $wgOut->redirect( $t->getFullURL( 'action=edit' ) ); |
109 | 108 | return; |
110 | 109 | } |
111 | 110 | } |
112 | 111 | |
| 112 | + $wgOut->wrapWikiMsg( "==$1==\n", 'notitlematches' ); |
| 113 | + if( $t->quickUserCan( 'create' ) && $t->quickUserCan( 'edit' ) ) { |
| 114 | + $wgOut->addWikiMsg( 'noexactmatch', wfEscapeWikiText( $term ) ); |
| 115 | + } else { |
| 116 | + $wgOut->addWikiMsg( 'noexactmatch-nocreate', wfEscapeWikiText( $term ) ); |
| 117 | + } |
| 118 | + |
113 | 119 | return $this->showResults( $term ); |
114 | 120 | } |
115 | 121 | |
— | — | @@ -123,36 +129,20 @@ |
124 | 130 | $sk = $wgUser->getSkin(); |
125 | 131 | |
126 | 132 | $this->setupPage( $term ); |
127 | | - $this->searchEngine = SearchEngine::create(); |
128 | | - |
129 | | - $t = Title::newFromText( $term ); |
130 | 133 | |
131 | | - $wgOut->addHtml( |
132 | | - Xml::openElement( 'table', array( 'border'=>0, 'cellpadding'=>0, 'cellspacing'=>0 ) ) . |
133 | | - Xml::openElement( 'tr' ) . |
134 | | - Xml::openElement( 'td' ) . "\n" |
135 | | - ); |
136 | | - if( $this->searchAdvanced ) { |
137 | | - $wgOut->addHTML( $this->powerSearchBox( $term ) ); |
138 | | - $showMenu = false; |
139 | | - } else { |
140 | | - $wgOut->addHTML( $this->shortDialog( $term ) ); |
141 | | - $showMenu = true; |
142 | | - } |
143 | | - $wgOut->addHtml( |
144 | | - Xml::closeElement('td') . |
145 | | - Xml::closeElement('tr') . |
146 | | - Xml::closeElement('table') |
147 | | - ); |
| 134 | + $wgOut->addWikiMsg( 'searchresulttext' ); |
148 | 135 | |
149 | 136 | if( '' === trim( $term ) ) { |
150 | 137 | // Empty query -- straight view of search form |
| 138 | + $wgOut->setSubtitle( '' ); |
| 139 | + $wgOut->addHTML( $this->powerSearchBox( $term ) ); |
| 140 | + $wgOut->addHTML( $this->powerSearchFocus() ); |
151 | 141 | wfProfileOut( $fname ); |
152 | 142 | return; |
153 | 143 | } |
154 | 144 | |
155 | 145 | global $wgDisableTextSearch; |
156 | | - if( $wgDisableTextSearch ) { |
| 146 | + if ( $wgDisableTextSearch ) { |
157 | 147 | global $wgSearchForwardUrl; |
158 | 148 | if( $wgSearchForwardUrl ) { |
159 | 149 | $url = str_replace( '$1', urlencode( $term ), $wgSearchForwardUrl ); |
— | — | @@ -175,7 +165,9 @@ |
176 | 166 | return; |
177 | 167 | } |
178 | 168 | |
179 | | - $search =& $this->searchEngine; |
| 169 | + $wgOut->addHTML( $this->shortDialog( $term ) ); |
| 170 | + |
| 171 | + $search = SearchEngine::create(); |
180 | 172 | $search->setLimitOffset( $this->limit, $this->offset ); |
181 | 173 | $search->setNamespaces( $this->namespaces ); |
182 | 174 | $search->showRedirects = $this->searchRedirects; |
— | — | @@ -184,53 +176,43 @@ |
185 | 177 | $titleMatches = $search->searchTitle( $rewritten ); |
186 | 178 | |
187 | 179 | // Sometimes the search engine knows there are too many hits |
188 | | - if( $titleMatches instanceof SearchResultTooMany ) { |
| 180 | + if ($titleMatches instanceof SearchResultTooMany) { |
189 | 181 | $wgOut->addWikiText( '==' . wfMsg( 'toomanymatches' ) . "==\n" ); |
| 182 | + $wgOut->addHTML( $this->powerSearchBox( $term ) ); |
| 183 | + $wgOut->addHTML( $this->powerSearchFocus() ); |
190 | 184 | wfProfileOut( $fname ); |
191 | 185 | return; |
192 | 186 | } |
193 | 187 | |
194 | 188 | $textMatches = $search->searchText( $rewritten ); |
195 | | - |
| 189 | + |
196 | 190 | // did you mean... suggestions |
197 | | - if( $textMatches && $textMatches->hasSuggestion() ) { |
| 191 | + if($textMatches && $textMatches->hasSuggestion()){ |
198 | 192 | $st = SpecialPage::getTitleFor( 'Search' ); |
199 | | - $stParams = wfArrayToCGI( |
200 | | - array( 'search' => $textMatches->getSuggestionQuery(), 'fulltext' => wfMsg('search') ), |
201 | | - $this->powerSearchOptions() |
202 | | - ); |
| 193 | + $stParams = wfArrayToCGI( array( |
| 194 | + 'search' => $textMatches->getSuggestionQuery(), |
| 195 | + 'fulltext' => wfMsg('search')), |
| 196 | + $this->powerSearchOptions()); |
| 197 | + |
203 | 198 | $suggestLink = '<a href="'.$st->escapeLocalURL($stParams).'">'. |
204 | | - $textMatches->getSuggestionSnippet().'</a>'; |
205 | | - |
| 199 | + $textMatches->getSuggestionSnippet().'</a>'; |
| 200 | + |
206 | 201 | $wgOut->addHTML('<div class="searchdidyoumean">'.wfMsg('search-suggest',$suggestLink).'</div>'); |
207 | 202 | } |
208 | | - |
209 | | - // show direct page/create link |
210 | | - if( !is_null($t) ) { |
211 | | - if( !$t->exists() ) { |
212 | | - $wgOut->addWikiMsg( 'searchmenu-new', wfEscapeWikiText( $t->getPrefixedText() ) ); |
213 | | - } else { |
214 | | - $wgOut->addWikiMsg( 'searchmenu-exists', wfEscapeWikiText( $t->getPrefixedText() ) ); |
215 | | - } |
216 | | - } |
217 | | - |
| 203 | + |
218 | 204 | // show number of results |
219 | | - $numTitleMatches = $titleMatches ? $titleMatches->numRows() : 0; |
220 | | - $numTextMatches = $textMatches ? $textMatches->numRows() : 0; |
221 | | - $highestNum = max( $numTitleMatches, $numTextMatches ); |
222 | | - // Total query matches (possible false positives) |
223 | | - $num = $numTitleMatches + $numTextMatches; |
224 | | - // Get total actual results |
| 205 | + $num = ( $titleMatches ? $titleMatches->numRows() : 0 ) |
| 206 | + + ( $textMatches ? $textMatches->numRows() : 0); |
225 | 207 | $totalNum = 0; |
226 | | - if( $titleMatches && !is_null($titleMatches->getTotalHits()) ) |
| 208 | + if($titleMatches && !is_null($titleMatches->getTotalHits())) |
227 | 209 | $totalNum += $titleMatches->getTotalHits(); |
228 | | - if( $textMatches && !is_null($textMatches->getTotalHits()) ) |
| 210 | + if($textMatches && !is_null($textMatches->getTotalHits())) |
229 | 211 | $totalNum += $textMatches->getTotalHits(); |
230 | | - if( $num > 0 ) { |
231 | | - if( $totalNum > 0 ) { |
| 212 | + if ( $num > 0 ) { |
| 213 | + if ( $totalNum > 0 ){ |
232 | 214 | $top = wfMsgExt('showingresultstotal', array( 'parseinline' ), |
233 | 215 | $this->offset+1, $this->offset+$num, $totalNum, $num ); |
234 | | - } elseif( $num >= $this->limit ) { |
| 216 | + } elseif ( $num >= $this->limit ) { |
235 | 217 | $top = wfShowingResults( $this->offset, $this->limit ); |
236 | 218 | } else { |
237 | 219 | $top = wfShowingResultsNum( $this->offset, $this->limit, $num ); |
— | — | @@ -242,17 +224,16 @@ |
243 | 225 | if( $num || $this->offset ) { |
244 | 226 | $prevnext = wfViewPrevNext( $this->offset, $this->limit, |
245 | 227 | SpecialPage::getTitleFor( 'Search' ), |
246 | | - wfArrayToCGI( $this->powerSearchOptions(), array( 'search' => $term ) ), |
247 | | - ($highestNum < $this->limit) |
248 | | - ); |
| 228 | + wfArrayToCGI( |
| 229 | + $this->powerSearchOptions(), |
| 230 | + array( 'search' => $term ) ), |
| 231 | + ($num < $this->limit) ); |
249 | 232 | $wgOut->addHTML( "<p class='mw-search-pager-top'>{$prevnext}</p>\n" ); |
250 | 233 | wfRunHooks( 'SpecialSearchResults', array( $term, &$titleMatches, &$textMatches ) ); |
251 | 234 | } else { |
252 | 235 | wfRunHooks( 'SpecialSearchNoResults', array( $term ) ); |
253 | 236 | } |
254 | 237 | |
255 | | - $wgOut->addHtml( "<div class='searchresults'>" ); |
256 | | - |
257 | 238 | if( $titleMatches ) { |
258 | 239 | if( $titleMatches->numRows() ) { |
259 | 240 | $wgOut->wrapWikiMsg( "==$1==\n", 'titlematches' ); |
— | — | @@ -282,27 +263,30 @@ |
283 | 264 | $textMatches->free(); |
284 | 265 | } |
285 | 266 | |
286 | | - if( $num == 0 ) { |
287 | | - $wgOut->addWikiMsg( 'search-nonefound' ); |
| 267 | + if ( $num == 0 ) { |
| 268 | + $wgOut->addWikiMsg( 'nonefound' ); |
288 | 269 | } |
289 | | - |
290 | | - $wgOut->addHtml( "</div>" ); |
291 | | - |
292 | 270 | if( $num || $this->offset ) { |
293 | 271 | $wgOut->addHTML( "<p class='mw-search-pager-bottom'>{$prevnext}</p>\n" ); |
294 | 272 | } |
| 273 | + $wgOut->addHTML( $this->powerSearchBox( $term ) ); |
295 | 274 | wfProfileOut( $fname ); |
296 | 275 | } |
| 276 | + |
| 277 | + #------------------------------------------------------------------ |
| 278 | + # Private methods below this line |
297 | 279 | |
298 | 280 | /** |
299 | 281 | * |
300 | 282 | */ |
301 | | - protected function setupPage( $term ) { |
| 283 | + function setupPage( $term ) { |
302 | 284 | global $wgOut; |
303 | | - if( !empty( $term ) ) { |
| 285 | + if( !empty( $term ) ){ |
304 | 286 | $wgOut->setPageTitle( wfMsg( 'searchresults') ); |
305 | 287 | $wgOut->setHTMLTitle( wfMsg( 'pagetitle', wfMsg( 'searchresults-title', $term) ) ); |
306 | 288 | } |
| 289 | + $subtitlemsg = ( Title::newFromText( $term ) ? 'searchsubtitle' : 'searchsubtitleinvalid' ); |
| 290 | + $wgOut->setSubtitle( $wgOut->parse( wfMsg( $subtitlemsg, wfEscapeWikiText($term) ) ) ); |
307 | 291 | $wgOut->setArticleRelated( false ); |
308 | 292 | $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
309 | 293 | } |
— | — | @@ -313,8 +297,9 @@ |
314 | 298 | * |
315 | 299 | * @param WebRequest $request |
316 | 300 | * @return array |
| 301 | + * @private |
317 | 302 | */ |
318 | | - protected function powerSearch( &$request ) { |
| 303 | + function powerSearch( &$request ) { |
319 | 304 | $arr = array(); |
320 | 305 | foreach( SearchEngine::searchableNamespaces() as $ns => $name ) { |
321 | 306 | if( $request->getCheck( 'ns' . $ns ) ) { |
— | — | @@ -327,15 +312,14 @@ |
328 | 313 | /** |
329 | 314 | * Reconstruct the 'power search' options for links |
330 | 315 | * @return array |
| 316 | + * @private |
331 | 317 | */ |
332 | | - protected function powerSearchOptions() { |
| 318 | + function powerSearchOptions() { |
333 | 319 | $opt = array(); |
334 | 320 | foreach( $this->namespaces as $n ) { |
335 | 321 | $opt['ns' . $n] = 1; |
336 | 322 | } |
337 | 323 | $opt['redirs'] = $this->searchRedirects ? 1 : 0; |
338 | | - if( $this->searchAdvanced ) |
339 | | - $opt['advanced'] = $this->searchAdvanced; |
340 | 324 | return $opt; |
341 | 325 | } |
342 | 326 | |
— | — | @@ -344,11 +328,11 @@ |
345 | 329 | * |
346 | 330 | * @param SearchResultSet $matches |
347 | 331 | */ |
348 | | - protected function showMatches( &$matches ) { |
349 | | - global $wgContLang; |
| 332 | + function showMatches( &$matches ) { |
350 | 333 | $fname = 'SpecialSearch::showMatches'; |
351 | 334 | wfProfileIn( $fname ); |
352 | 335 | |
| 336 | + global $wgContLang; |
353 | 337 | $terms = $wgContLang->convertForSearchResult( $matches->termMatches() ); |
354 | 338 | |
355 | 339 | $out = ""; |
— | — | @@ -360,12 +344,14 @@ |
361 | 345 | |
362 | 346 | $off = $this->offset + 1; |
363 | 347 | $out .= "<ul class='mw-search-results'>\n"; |
| 348 | + |
364 | 349 | while( $result = $matches->next() ) { |
365 | 350 | $out .= $this->showHit( $result, $terms ); |
366 | 351 | } |
367 | 352 | $out .= "</ul>\n"; |
368 | 353 | |
369 | 354 | // convert the whole thing to desired language variant |
| 355 | + global $wgContLang; |
370 | 356 | $out = $wgContLang->convert( $out ); |
371 | 357 | wfProfileOut( $fname ); |
372 | 358 | return $out; |
— | — | @@ -376,7 +362,7 @@ |
377 | 363 | * @param SearchResult $result |
378 | 364 | * @param array $terms terms to highlight |
379 | 365 | */ |
380 | | - protected function showHit( $result, $terms ) { |
| 366 | + function showHit( $result, $terms ) { |
381 | 367 | $fname = 'SpecialSearch::showHit'; |
382 | 368 | wfProfileIn( $fname ); |
383 | 369 | global $wgUser, $wgContLang, $wgLang; |
— | — | @@ -394,7 +380,7 @@ |
395 | 381 | //If page content is not readable, just return the title. |
396 | 382 | //This is not quite safe, but better than showing excerpts from non-readable pages |
397 | 383 | //Note that hiding the entry entirely would screw up paging. |
398 | | - if(!$t->userCanRead()) { |
| 384 | + if (!$t->userCanRead()) { |
399 | 385 | wfProfileOut( $fname ); |
400 | 386 | return "<li>{$link}</li>\n"; |
401 | 387 | } |
— | — | @@ -448,7 +434,7 @@ |
449 | 435 | |
450 | 436 | // link to related articles if supported |
451 | 437 | $related = ''; |
452 | | - if( $result->hasRelated() ) { |
| 438 | + if( $result->hasRelated() ){ |
453 | 439 | $st = SpecialPage::getTitleFor( 'Search' ); |
454 | 440 | $stParams = wfArrayToCGI( $this->powerSearchOptions(), |
455 | 441 | array('search' => wfMsgForContent('searchrelated').':'.$t->getPrefixedText(), |
— | — | @@ -466,13 +452,14 @@ |
467 | 453 | if( $thumb ) { |
468 | 454 | $desc = $img->getShortDesc(); |
469 | 455 | wfProfileOut( $fname ); |
| 456 | + // Ugly table. :D |
470 | 457 | // Float doesn't seem to interact well with the bullets. |
471 | | - // Table messes up vertical alignment of the bullets. |
472 | | - // Bullets are therefore disabled (didn't look great anyway). |
| 458 | + // Table messes up vertical alignment of the bullet, but I'm |
| 459 | + // not sure what more I can do about that. :( |
473 | 460 | return "<li>" . |
474 | 461 | '<table class="searchResultImage">' . |
475 | 462 | '<tr>' . |
476 | | - '<td width="120" align="center" valign="top">' . |
| 463 | + '<td width="120" align="center">' . |
477 | 464 | $thumb->toHtml( array( 'desc-link' => true ) ) . |
478 | 465 | '</td>' . |
479 | 466 | '<td valign="top">' . |
— | — | @@ -499,22 +486,21 @@ |
500 | 487 | * |
501 | 488 | * @param SearchResultSet $matches |
502 | 489 | */ |
503 | | - protected function showInterwiki( &$matches, $query ) { |
| 490 | + function showInterwiki( &$matches, $query ) { |
504 | 491 | $fname = 'SpecialSearch::showInterwiki'; |
505 | 492 | wfProfileIn( $fname ); |
506 | 493 | |
507 | 494 | global $wgContLang; |
508 | 495 | $terms = $wgContLang->convertForSearchResult( $matches->termMatches() ); |
509 | 496 | |
510 | | - $out = "<div id='mw-search-interwiki'><div id='mw-search-interwiki-caption'>". |
511 | | - wfMsg('search-interwiki-caption')."</div>\n"; |
| 497 | + $out = "<div id='mw-search-interwiki'><div id='mw-search-interwiki-caption'>".wfMsg('search-interwiki-caption')."</div>\n"; |
512 | 498 | $off = $this->offset + 1; |
513 | 499 | $out .= "<ul start='{$off}' class='mw-search-iwresults'>\n"; |
514 | 500 | |
515 | 501 | // work out custom project captions |
516 | 502 | $customCaptions = array(); |
517 | 503 | $customLines = explode("\n",wfMsg('search-interwiki-custom')); // format per line <iwprefix>:<caption> |
518 | | - foreach($customLines as $line) { |
| 504 | + foreach($customLines as $line){ |
519 | 505 | $parts = explode(":",$line,2); |
520 | 506 | if(count($parts) == 2) // validate line |
521 | 507 | $customCaptions[$parts[0]] = $parts[1]; |
— | — | @@ -545,7 +531,7 @@ |
546 | 532 | * @param string $query |
547 | 533 | * @param array $customCaptions iw prefix -> caption |
548 | 534 | */ |
549 | | - protected function showInterwikiHit( $result, $lastInterwiki, $terms, $query, $customCaptions) { |
| 535 | + function showInterwikiHit( $result, $lastInterwiki, $terms, $query, $customCaptions){ |
550 | 536 | $fname = 'SpecialSearch::showInterwikiHit'; |
551 | 537 | wfProfileIn( $fname ); |
552 | 538 | global $wgUser, $wgContLang, $wgLang; |
— | — | @@ -571,7 +557,7 @@ |
572 | 558 | |
573 | 559 | $out = ""; |
574 | 560 | // display project name |
575 | | - if(is_null($lastInterwiki) || $lastInterwiki != $t->getInterwiki()) { |
| 561 | + if(is_null($lastInterwiki) || $lastInterwiki != $t->getInterwiki()){ |
576 | 562 | if( key_exists($t->getInterwiki(),$customCaptions) ) |
577 | 563 | // captions from 'search-interwiki-custom' |
578 | 564 | $caption = $customCaptions[$t->getInterwiki()]; |
— | — | @@ -585,8 +571,7 @@ |
586 | 572 | $searchTitle = Title::newFromText($t->getInterwiki().":Special:Search"); |
587 | 573 | $searchLink = $sk->makeKnownLinkObj( $searchTitle, wfMsg('search-interwiki-more'), |
588 | 574 | wfArrayToCGI(array('search' => $query, 'fulltext' => 'Search'))); |
589 | | - $out .= "</ul><div class='mw-search-interwiki-project'><span class='mw-search-interwiki-more'> |
590 | | - {$searchLink}</span>{$caption}</div>\n<ul>"; |
| 575 | + $out .= "</ul><div class='mw-search-interwiki-project'><span class='mw-search-interwiki-more'>{$searchLink}</span>{$caption}</div>\n<ul>"; |
591 | 576 | } |
592 | 577 | |
593 | 578 | $out .= "<li>{$link} {$redirect}</li>\n"; |
— | — | @@ -600,7 +585,7 @@ |
601 | 586 | * @param $term string: search term |
602 | 587 | * @return $out string: HTML form |
603 | 588 | */ |
604 | | - protected function powerSearchBox( $term ) { |
| 589 | + function powerSearchBox( $term ) { |
605 | 590 | global $wgScript; |
606 | 591 | |
607 | 592 | $namespaces = ''; |
— | — | @@ -614,189 +599,61 @@ |
615 | 600 | Xml::closeElement( 'span' ) . "\n"; |
616 | 601 | } |
617 | 602 | |
618 | | - if( $this->searchEngine->acceptListRedirects() ) { |
619 | | - $redirect = Xml::check( 'redirs', $this->searchRedirects, array( 'value' => '1', 'id' => 'redirs' ) ); |
620 | | - $redirectLabel = Xml::label( wfMsg( 'powersearch-redir' ), 'redirs' ); |
621 | | - } else{ |
622 | | - $redirect = ''; |
623 | | - $redirectLabel = ''; |
624 | | - } |
| 603 | + $redirect = Xml::check( 'redirs', $this->searchRedirects, array( 'value' => '1', 'id' => 'redirs' ) ); |
| 604 | + $redirectLabel = Xml::label( wfMsg( 'powersearch-redir' ), 'redirs' ); |
625 | 605 | $searchField = Xml::input( 'search', 50, $term, array( 'type' => 'text', 'id' => 'powerSearchText' ) ); |
626 | 606 | $searchButton = Xml::submitButton( wfMsg( 'powersearch' ), array( 'name' => 'fulltext' ) ) . "\n"; |
627 | 607 | $searchTitle = SpecialPage::getTitleFor( 'Search' ); |
628 | 608 | |
629 | 609 | $out = Xml::openElement( 'form', array( 'id' => 'powersearch', 'method' => 'get', 'action' => $wgScript ) ) . |
630 | | - Xml::hidden( 'title', $searchTitle->getPrefixedText() ) . |
631 | | - Xml::hidden( 'advanced', 1 ) . |
632 | | - "<p>" . |
633 | | - wfMsgExt( 'powersearch-ns', array( 'parseinline' ) ) . |
634 | | - "<br />" . |
635 | | - $namespaces . |
636 | | - "</p>" . |
637 | | - "<p>" . |
638 | | - $redirect . " " . $redirectLabel . |
639 | | - "</p>" . |
640 | | - wfMsgExt( 'powersearch-field', array( 'parseinline' ) ) . |
641 | | - " " . |
642 | | - $searchField . |
643 | | - " " . |
644 | | - $searchButton . |
645 | | - ' (' . wfMsgExt('searchmenu-help',array('parseinline') ) . ')' . |
| 610 | + Xml::fieldset( wfMsg( 'powersearch-legend' ), |
| 611 | + Xml::hidden( 'title', $searchTitle->getPrefixedText() ) . |
| 612 | + "<p>" . |
| 613 | + wfMsgExt( 'powersearch-ns', array( 'parseinline' ) ) . |
| 614 | + "<br />" . |
| 615 | + $namespaces . |
| 616 | + "</p>" . |
| 617 | + "<p>" . |
| 618 | + $redirect . " " . $redirectLabel . |
| 619 | + "</p>" . |
| 620 | + wfMsgExt( 'powersearch-field', array( 'parseinline' ) ) . |
| 621 | + " " . |
| 622 | + $searchField . |
| 623 | + " " . |
| 624 | + $searchButton ) . |
646 | 625 | "</form>"; |
647 | | - if( $term ) |
648 | | - $out .= wfMsgExt( 'searchmenu-prefix', array('parseinline'), $term ); |
649 | 626 | |
650 | | - return Xml::openElement( 'fieldset', array('id' => 'mw-searchoptions','style' => 'margin:0em;') ) . |
651 | | - Xml::element( 'legend', null, wfMsg('searchmenu-legend') ) . |
652 | | - $this->formHeader($term) . $out . |
653 | | - Xml::closeElement( 'fieldset' ); |
| 627 | + return $out; |
654 | 628 | } |
655 | 629 | |
656 | | - protected function powerSearchFocus() { |
| 630 | + function powerSearchFocus() { |
657 | 631 | global $wgJsMimeType; |
658 | 632 | return "<script type=\"$wgJsMimeType\">" . |
659 | | - "hookEvent(\"load\", function() {" . |
| 633 | + "hookEvent(\"load\", function(){" . |
660 | 634 | "document.getElementById('powerSearchText').focus();" . |
661 | 635 | "});" . |
662 | 636 | "</script>"; |
663 | 637 | } |
664 | | - |
665 | | - /** Make a search link with some target namespaces */ |
666 | | - protected function makeSearchLink( $term, $namespaces, $label, $tooltip, $params=array() ) { |
667 | | - $opt = $params; |
668 | | - foreach( $namespaces as $n ) { |
669 | | - $opt['ns' . $n] = 1; |
670 | | - } |
671 | | - $opt['redirs'] = $this->searchRedirects ? 1 : 0; |
672 | 638 | |
673 | | - $st = SpecialPage::getTitleFor( 'Search' ); |
674 | | - $stParams = wfArrayToCGI( array( 'search' => $term, 'fulltext' => wfMsg( 'search' ) ), $opt ); |
675 | | - |
676 | | - return Xml::element( 'a', |
677 | | - array( 'href'=> $st->getLocalURL( $stParams ), 'title' => $tooltip ), |
678 | | - $label ); |
679 | | - } |
680 | | - |
681 | | - /** Check if query starts with image: prefix */ |
682 | | - protected function startsWithImage( $term ) { |
683 | | - global $wgContLang; |
684 | | - |
685 | | - $p = explode( ':', $term ); |
686 | | - if( count( $p ) > 1 ) { |
687 | | - return $wgContLang->getNsIndex( $p[0] ) == NS_IMAGE; |
688 | | - } |
689 | | - return false; |
690 | | - } |
691 | | - |
692 | | - protected function formHeader( $term ) { |
693 | | - global $wgContLang, $wgCanonicalNamespaceNames; |
694 | | - |
695 | | - $sep = ' '; |
696 | | - $out = Xml::openElement('div', array( 'style' => 'padding-bottom:0.5em;' ) ); |
697 | | - |
698 | | - $bareterm = $term; |
699 | | - if( $this->startsWithImage( $term ) ) |
700 | | - $bareterm = substr( $term, strpos( $term, ':' ) + 1 ); // delete all/image prefix |
701 | | - |
702 | | - $nsAllSet = array_keys( SearchEngine::searchableNamespaces() ); |
703 | | - // figure out the active search profile header |
704 | | - if( $this->searchAdvanced ) |
705 | | - $active = 'advanced'; |
706 | | - else if( $this->namespaces === NS_IMAGE || $this->startsWithImage( $term ) ) |
707 | | - $active = 'images'; |
708 | | - elseif( $this->namespaces === $nsAllSet ) |
709 | | - $active = 'all'; |
710 | | - elseif( $this->namespaces === SearchEngine::defaultNamespaces() ) |
711 | | - $active = 'default'; |
712 | | - elseif( $this->namespaces === SearchEngine::defaultAndProjectNamespaces() ) |
713 | | - $active = 'withproject'; |
714 | | - elseif( $this->namespaces === SearchEngine::projectNamespaces() ) |
715 | | - $active = 'project'; |
716 | | - else |
717 | | - $active = 'advanced'; |
718 | | - |
719 | | - |
720 | | - // search profiles headers |
721 | | - $m = wfMsg( 'searchprofile-articles' ); |
722 | | - $tt = wfMsg( 'searchprofile-articles-tooltip', |
723 | | - implode( ', ', SearchEngine::namespacesAsText( SearchEngine::defaultNamespaces() ) ) ); |
724 | | - if( $active == 'default' ) { |
725 | | - $out .= Xml::element( 'strong', array( 'title'=>$tt ), $m ); |
726 | | - } else { |
727 | | - $out .= $this->makeSearchLink( $bareterm, SearchEngine::defaultNamespaces(), $m, $tt ); |
728 | | - } |
729 | | - $out .= $sep; |
730 | | - |
731 | | - $m = wfMsg( 'searchprofile-images' ); |
732 | | - $tt = wfMsg( 'searchprofile-images-tooltip' ); |
733 | | - if( $active == 'images' ) { |
734 | | - $out .= Xml::element( 'strong', array( 'title'=>$tt ), $m ); |
735 | | - } else { |
736 | | - $imageTextForm = $wgContLang->getFormattedNsText(NS_IMAGE).':'.$bareterm; |
737 | | - $out .= $this->makeSearchLink( $imageTextForm, array( NS_IMAGE ) , $m, $tt ); |
738 | | - } |
739 | | - $out .= $sep; |
740 | | - |
741 | | - $m = wfMsg( 'searchprofile-articles-and-proj' ); |
742 | | - $tt = wfMsg( 'searchprofile-project-tooltip', |
743 | | - implode( ', ', SearchEngine::namespacesAsText( SearchEngine::defaultAndProjectNamespaces() ) ) ); |
744 | | - if( $active == 'withproject' ) { |
745 | | - $out .= Xml::element( 'strong', array( 'title'=>$tt ), $m ); |
746 | | - } else { |
747 | | - $out .= $this->makeSearchLink( $bareterm, SearchEngine::defaultAndProjectNamespaces(), $m, $tt ); |
748 | | - } |
749 | | - $out .= $sep; |
750 | | - |
751 | | - $m = wfMsg( 'searchprofile-project' ); |
752 | | - $tt = wfMsg( 'searchprofile-project-tooltip', |
753 | | - implode( ', ', SearchEngine::namespacesAsText( SearchEngine::projectNamespaces() ) ) ); |
754 | | - if( $active == 'project' ) { |
755 | | - $out .= Xml::element( 'strong', array( 'title'=>$tt ), $m ); |
756 | | - } else { |
757 | | - $out .= $this->makeSearchLink( $bareterm, SearchEngine::projectNamespaces(), $m, $tt ); |
758 | | - } |
759 | | - $out .= $sep; |
760 | | - |
761 | | - $m = wfMsg( 'searchprofile-everything' ); |
762 | | - $tt = wfMsg( 'searchprofile-everything-tooltip' ); |
763 | | - if( $active == 'all' ) { |
764 | | - $out .= Xml::element( 'strong', array( 'title'=>$tt ), $m ); |
765 | | - } else { |
766 | | - $out .= $this->makeSearchLink( $bareterm, $nsAllSet, $m, $tt ); |
767 | | - } |
768 | | - $out .= $sep; |
769 | | - |
770 | | - $m = wfMsg( 'searchprofile-advanced' ); |
771 | | - $tt = wfMsg( 'searchprofile-advanced-tooltip' ); |
772 | | - if( $active == 'advanced' ) { |
773 | | - $out .= Xml::element( 'strong', array( 'title'=>$tt ), $m ); |
774 | | - } else { |
775 | | - $out .= $this->makeSearchLink( $bareterm, $this->namespaces, $m, $tt, array( 'advanced' => '1' ) ); |
776 | | - } |
777 | | - $out .= Xml::closeElement('div') ; |
778 | | - |
779 | | - return $out; |
780 | | - } |
781 | | - |
782 | | - protected function shortDialog( $term ) { |
| 639 | + function shortDialog($term) { |
783 | 640 | global $wgScript; |
784 | | - $out = Xml::openElement( 'form', array( 'id' => 'search', 'method' => 'get', 'action' => $wgScript ) ); |
| 641 | + |
| 642 | + $out = Xml::openElement( 'form', array( |
| 643 | + 'id' => 'search', |
| 644 | + 'method' => 'get', |
| 645 | + 'action' => $wgScript |
| 646 | + )); |
785 | 647 | $searchTitle = SpecialPage::getTitleFor( 'Search' ); |
786 | | - $out .= Xml::hidden( 'title', $searchTitle->getPrefixedText() ) . "\n"; |
787 | | - $out .= Xml::input( 'search', 50, $term, array( 'type' => 'text', 'id' => 'searchText' ) ) . "\n"; |
| 648 | + $out .= Xml::hidden( 'title', $searchTitle->getPrefixedText() ); |
| 649 | + $out .= Xml::input( 'search', 50, $term, array( 'type' => 'text', 'id' => 'searchText' ) ) . ' '; |
788 | 650 | foreach( SearchEngine::searchableNamespaces() as $ns => $name ) { |
789 | 651 | if( in_array( $ns, $this->namespaces ) ) { |
790 | 652 | $out .= Xml::hidden( "ns{$ns}", '1' ); |
791 | 653 | } |
792 | 654 | } |
793 | 655 | $out .= Xml::submitButton( wfMsg( 'searchbutton' ), array( 'name' => 'fulltext' ) ); |
794 | | - $out .= ' (' . wfMsgExt('searchmenu-help',array('parseinline') ) . ')'; |
795 | 656 | $out .= Xml::closeElement( 'form' ); |
796 | | - if( $term ) |
797 | | - $out .= wfMsgExt( 'searchmenu-prefix', array('parseinline'), $term ); |
798 | | - return Xml::openElement( 'fieldset', array('id' => 'mw-searchoptions','style' => 'margin:0em;') ) . |
799 | | - Xml::element( 'legend', null, wfMsg('searchmenu-legend') ) . |
800 | | - $this->formHeader($term) . $out . |
801 | | - Xml::closeElement( 'fieldset' ); |
| 657 | + |
| 658 | + return $out; |
802 | 659 | } |
803 | 660 | } |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1418,61 +1418,49 @@ |
1419 | 1419 | 'diff-strike' => "'''strikethrough'''", |
1420 | 1420 | |
1421 | 1421 | # Search results |
1422 | | -'searchresults' => 'Search results', |
1423 | | -'searchresults-title' => 'Search results for "$1"', |
1424 | | -'toomanymatches' => 'Too many matches were returned, please try a different query', |
1425 | | -'titlematches' => 'Page title matches', |
1426 | | -'notitlematches' => 'No page title matches', |
1427 | | -'textmatches' => 'Page text matches', |
1428 | | -'notextmatches' => 'No page text matches', |
1429 | | -'prevn' => 'previous $1', |
1430 | | -'nextn' => 'next $1', |
1431 | | -'viewprevnext' => 'View ($1) ($2) ($3)', |
1432 | | -'searchmenu-legend' => 'Search options', |
1433 | | -'searchmenu-exists' => "'''There is page named \"[[\$1]]\" on this wiki'''", |
1434 | | -'searchmenu-new' => "'''[[:\$1|Create]] the page \"[[\$1]]\" on this wiki!'''", |
1435 | | -'searchhelp-url' => 'Project:Searching', |
1436 | | -'searchmenu-prefix' => '[[Special:PrefixIndex/$1|Browse pages with this prefix]]', |
1437 | | -'searchmenu-help' => '[[{{MediaWiki:Searchhelp-url}}|{{int:help}}]]?', # do not translate or duplicate this message to other languages |
1438 | | -'searchprofile-articles' => 'Pages', |
1439 | | -'searchprofile-articles-and-proj' => 'Pages & Project', |
1440 | | -'searchprofile-project' => 'Project', |
1441 | | -'searchprofile-images' => 'Files', |
1442 | | -'searchprofile-everything' => 'Everything', |
1443 | | -'searchprofile-advanced' => 'Advanced', |
1444 | | -'searchprofile-articles-tooltip' => 'Search in $1', |
1445 | | -'searchprofile-project-tooltip' => 'Search in $1', |
1446 | | -'searchprofile-images-tooltip' => 'Search for files', |
1447 | | -'searchprofile-everything-tooltip' => 'Search all of content (including talk pages)', |
1448 | | -'searchprofile-advanced-tooltip' => 'Search in custom namespaces', |
1449 | | -'prefs-search-nsdefault' => 'Search using defaults:', |
1450 | | -'prefs-search-nscustom' => 'Search custom namespaces:', |
1451 | | -'search-result-size' => '$1 ({{PLURAL:$2|1 word|$2 words}})', |
1452 | | -'search-result-score' => 'Relevance: $1%', |
1453 | | -'search-redirect' => '(redirect $1)', |
1454 | | -'search-section' => '(section $1)', |
1455 | | -'search-suggest' => 'Did you mean: $1', |
1456 | | -'search-interwiki-caption' => 'Sister projects', |
1457 | | -'search-interwiki-default' => '$1 results:', |
1458 | | -'search-interwiki-custom' => '', # do not translate or duplicate this message to other languages |
1459 | | -'search-interwiki-more' => '(more)', |
1460 | | -'search-mwsuggest-enabled' => 'with suggestions', |
1461 | | -'search-mwsuggest-disabled' => 'no suggestions', |
1462 | | -'search-relatedarticle' => 'Related', |
1463 | | -'mwsuggest-disable' => 'Disable AJAX suggestions', |
1464 | | -'searchrelated' => 'related', |
1465 | | -'searchall' => 'all', |
1466 | | -'showingresults' => "Showing below up to {{PLURAL:$1|'''1''' result|'''$1''' results}} starting with #'''$2'''.", |
1467 | | -'showingresultsnum' => "Showing below {{PLURAL:$3|'''1''' result|'''$3''' results}} starting with #'''$2'''.", |
1468 | | -'showingresultstotal' => "Showing below {{PLURAL:$4|result '''$1''' of '''$3'''|results '''$1 - $2''' of '''$3'''}}", |
1469 | | -'search-nonefound' => 'There were no results matching the query.', |
1470 | | -'powersearch' => 'Advanced search', |
1471 | | -'powersearch-legend' => 'Advanced search', |
1472 | | -'powersearch-ns' => 'Search in namespaces:', |
1473 | | -'powersearch-redir' => 'List redirects', |
1474 | | -'powersearch-field' => 'Search for', |
1475 | | -'search-external' => 'External search', |
1476 | | -'searchdisabled' => '{{SITENAME}} search is disabled. |
| 1422 | +'searchresults' => 'Search results', |
| 1423 | +'searchresults-title' => 'Search results for $1', |
| 1424 | +'searchresulttext' => 'For more information about searching {{SITENAME}}, see [[{{MediaWiki:Helppage}}|{{int:help}}]].', |
| 1425 | +'searchsubtitle' => 'You searched for \'\'\'[[:$1]]\'\'\' ([[Special:Prefixindex/$1|all pages starting with "$1"]] | [[Special:WhatLinksHere/$1|all pages that link to "$1"]])', |
| 1426 | +'searchsubtitleinvalid' => "You searched for '''$1'''", |
| 1427 | +'noexactmatch' => "'''There is no page titled \"\$1\".''' |
| 1428 | +You can [[:\$1|create this page]].", |
| 1429 | +'noexactmatch-nocreate' => "'''There is no page titled \"\$1\".'''", |
| 1430 | +'toomanymatches' => 'Too many matches were returned, please try a different query', |
| 1431 | +'titlematches' => 'Page title matches', |
| 1432 | +'notitlematches' => 'No page title matches', |
| 1433 | +'textmatches' => 'Page text matches', |
| 1434 | +'notextmatches' => 'No page text matches', |
| 1435 | +'prevn' => 'previous $1', |
| 1436 | +'nextn' => 'next $1', |
| 1437 | +'viewprevnext' => 'View ($1) ($2) ($3)', |
| 1438 | +'search-result-size' => '$1 ({{PLURAL:$2|1 word|$2 words}})', |
| 1439 | +'search-result-score' => 'Relevance: $1%', |
| 1440 | +'search-redirect' => '(redirect $1)', |
| 1441 | +'search-section' => '(section $1)', |
| 1442 | +'search-suggest' => 'Did you mean: $1', |
| 1443 | +'search-interwiki-caption' => 'Sister projects', |
| 1444 | +'search-interwiki-default' => '$1 results:', |
| 1445 | +'search-interwiki-custom' => '', # do not translate or duplicate this message to other languages |
| 1446 | +'search-interwiki-more' => '(more)', |
| 1447 | +'search-mwsuggest-enabled' => 'with suggestions', |
| 1448 | +'search-mwsuggest-disabled' => 'no suggestions', |
| 1449 | +'search-relatedarticle' => 'Related', |
| 1450 | +'mwsuggest-disable' => 'Disable AJAX suggestions', |
| 1451 | +'searchrelated' => 'related', |
| 1452 | +'searchall' => 'all', |
| 1453 | +'showingresults' => "Showing below up to {{PLURAL:$1|'''1''' result|'''$1''' results}} starting with #'''$2'''.", |
| 1454 | +'showingresultsnum' => "Showing below {{PLURAL:$3|'''1''' result|'''$3''' results}} starting with #'''$2'''.", |
| 1455 | +'showingresultstotal' => "Showing below {{PLURAL:$4|result '''$1''' of '''$3'''|results '''$1 - $2''' of '''$3'''}}", |
| 1456 | +'nonefound' => "'''Note''': Only some namespaces are searched by default. |
| 1457 | +Try prefixing your query with ''all:'' to search all content (including talk pages, templates, etc), or use the desired namespace as prefix.", |
| 1458 | +'powersearch' => 'Advanced search', |
| 1459 | +'powersearch-legend' => 'Advanced search', |
| 1460 | +'powersearch-ns' => 'Search in namespaces:', |
| 1461 | +'powersearch-redir' => 'List redirects', |
| 1462 | +'powersearch-field' => 'Search for', |
| 1463 | +'search-external' => 'External search', |
| 1464 | +'searchdisabled' => '{{SITENAME}} search is disabled. |
1477 | 1465 | You can search via Google in the meantime. |
1478 | 1466 | Note that their indexes of {{SITENAME}} content may be out of date.', |
1479 | 1467 | 'googlesearch' => '<form method="get" action="http://www.google.com/search" id="googlesearch"> |