// prev/next links
if ( $num || $this->offset ) {
// Show the create link ahead
- $this->showCreateLink( $t );
+ $this->showCreateLink( $t, $num );
$prevnext = $this->getLanguage()->viewPrevNext( $this->getTitle(), $this->offset, $this->limit,
$this->powerSearchOptions() + array( 'search' => $term ),
max( $titleMatchesNum, $textMatchesNum ) < $this->limit
} else {
$out->wrapWikiMsg( "<p class=\"mw-search-nonefound\">\n$1</p>",
array( 'search-nonefound', wfEscapeWikiText( $term ) ) );
- $this->showCreateLink( $t );
+ $this->showCreateLink( $t, $num );
}
}
$out->addHtml( "</div>" );
/**
* @param $t Title
+ * @param int $num The number of search results found
*/
- protected function showCreateLink( $t ) {
+ protected function showCreateLink( $t, $num ) {
// show direct page/create link if applicable
// Check DBkey !== '' in case of fragment link only.
} else {
$messageName = 'searchmenu-new-nocreate';
}
- $params = array( $messageName, wfEscapeWikiText( $t->getPrefixedText() ) );
+ $params = array( $messageName, wfEscapeWikiText( $t->getPrefixedText() ), Message::numParam( $num ) );
wfRunHooks( 'SpecialSearchCreateLink', array( $t, &$params ) );
// Extensions using the hook might still return an empty $messageName
'nextn-title' => 'Next $1 {{PLURAL:$1|result|results}}',
'shown-title' => 'Show $1 {{PLURAL:$1|result|results}} per page',
'viewprevnext' => 'View ($1 {{int:pipe-separator}} $2) ($3)',
-'searchmenu-exists' => "'''There is a page named \"[[:\$1]]\" on this wiki.'''",
-'searchmenu-new' => "'''Create the page \"[[:\$1]]\" on this wiki!'''",
+'searchmenu-exists' => "'''There is a page named \"[[:\$1]]\" on this wiki.''' {{PLURAL:$2|0=|See also the other search results found.}}",
+'searchmenu-new' => "'''Create the page \"[[:\$1]]\" on this wiki!''' {{PLURAL:$2|0=|See also the page found with your search.|See also the search results found.}}",
'searchmenu-new-nocreate' => '', # do not translate or duplicate this message to other languages
'searchprofile-articles' => 'Content pages',
'searchprofile-project' => 'Help and Project pages',
'searchmenu-exists' => 'An option shown in a menu beside search form offering a link to the existing page having the specified title (when using the default MediaWiki search engine).
Parameters:
-* $1 - page title',
+* $1 - page title
+* $2 - the number of search results found',
'searchmenu-new' => 'An option shown in a menu beside search form offering a red link to the not yet existing page having the specified title (when using the default MediaWiki search engine).
Parameters:
-* $1 - page title',
+* $1 - page title
+* $2 - the number of search results found',
'searchprofile-articles' => "A quick link in the advanced search box on [[Special:Search]]. Clicking on this link starts a search in the content pages of the wiki.
A 'content page' is a page that forms part of the purpose of the wiki. It includes the main page and pages in the main namespace and any other namespaces that are included when the wiki is customised. For example on Wikimedia Commons 'content pages' include pages in the file and category namespaces. On Wikinews 'content pages' include pages in the Portal namespace. For technical definition of 'content namespaces' see [[mw:Manual:Using_custom_namespaces#Content_namespaces|MediaWiki]].