Add plural support for protocols in 'linksearch-text'
authorSiebrand Mazeland <s.mazeland@xs4all.nl>
Thu, 27 Dec 2012 22:54:54 +0000 (23:54 +0100)
committerSiebrand Mazeland <s.mazeland@xs4all.nl>
Fri, 28 Dec 2012 12:45:35 +0000 (13:45 +0100)
Change-Id: I6b043b4b3f7bba585abe6bd44d29a300a35d697c

includes/specials/SpecialLinkSearch.php
languages/messages/MessagesEn.php

index 5de6076..9a224b6 100644 (file)
@@ -84,7 +84,11 @@ class LinkSearchPage extends QueryPage {
                        $protocol = '';
                }
 
-               $out->addWikiMsg( 'linksearch-text', '<nowiki>' . $this->getLanguage()->commaList( $protocols_list ) . '</nowiki>' );
+               $out->addWikiMsg(
+                       'linksearch-text',
+                       '<nowiki>' . $this->getLanguage()->commaList( $protocols_list ) . '</nowiki>',
+                       count( $protocols_list )
+               );
                $s = Xml::openElement( 'form', array( 'id' => 'mw-linksearch-form', 'method' => 'get', 'action' => $GLOBALS['wgScript'] ) ) .
                        Html::hidden( 'title', $this->getTitle()->getPrefixedDbKey() ) .
                        '<fieldset>' .
index e1ffb68..e4acd18 100644 (file)
@@ -2760,7 +2760,7 @@ Also see [[Special:WantedCategories|wanted categories]].',
 'linksearch-ok'      => 'Search',
 'linksearch-text'    => 'Wildcards such as "*.wikipedia.org" may be used.
 Needs at least a top-level domain, for example "*.org".<br />
-Supported protocols: <code>$1</code> (defaults to http:// if no protocol is specified).',
+Supported {{PLURAL:$2|protocol|protocols}}: <code>$1</code> (defaults to http:// if no protocol is specified).',
 'linksearch-line'    => '$1 is linked from $2',
 'linksearch-error'   => 'Wildcards may appear only at the start of the hostname.',