https://www.mediawiki.org/wiki/Special:Code/MediaWiki/111487

Revision: 111487
Author:   bawolff
Date:     2012-02-14 21:04:57 +0000 (Tue, 14 Feb 2012)
Log Message:
-----------
follow-up r111437. I always forget the {{PLURAL's ....

Modified Paths:
--------------
    trunk/extensions/EtherpadLite/EtherpadLite.i18n.php
    trunk/extensions/EtherpadLite/EtherpadLite.php

Modified: trunk/extensions/EtherpadLite/EtherpadLite.i18n.php
===================================================================
--- trunk/extensions/EtherpadLite/EtherpadLite.i18n.php 2012-02-14 21:02:27 UTC 
(rev 111486)
+++ trunk/extensions/EtherpadLite/EtherpadLite.i18n.php 2012-02-14 21:04:57 UTC 
(rev 111487)
@@ -14,5 +14,10 @@
 $messages['en'] = array(
        'etherpadlite-desc' => 'Adds <eplite> parser tag to embed one or 
many Etherpad Lite pads (which are hosted on local or external Etherpad Lite 
server/s) on pages',
        'etherpadlite-invalid-pad-url' => '"$1" is not a valid Etherpad Lite 
URL or pad name.',
-       'etherpadlite-url-is-not-whitelisted' => '"$1" is not in the whitelist 
of allowed Etherpad Lite servers. The allowed servers are as follows: $2',
+       'etherpadlite-url-is-not-whitelisted' => '"$1" is not in the whitelist 
of allowed Etherpad Lite servers. {{PLURAL:$3|$2 is the only allowed server|The 
allowed servers are as follows: $2}}.',
 );
+
+$messages['qqq'] = array(
+       'etherpadlite-invalid-pad-url' => 'Error if the url did not meet 
validation (for example, if it didn\'t start with an allowed protocol). $1 is 
the invalid url',
+       'etherpadlite-url-is-not-whitelisted' => 'Error if url isn\'t in list 
of allowed urls. $1 is name of url specified by user, $2 is a comma separated 
list of allowed urls, $3 is the number of urls in the allowed list',
+);

Modified: trunk/extensions/EtherpadLite/EtherpadLite.php
===================================================================
--- trunk/extensions/EtherpadLite/EtherpadLite.php      2012-02-14 21:02:27 UTC 
(rev 111486)
+++ trunk/extensions/EtherpadLite/EtherpadLite.php      2012-02-14 21:04:57 UTC 
(rev 111487)
@@ -148,8 +148,9 @@
        
        if ( count( $wgEtherpadLiteUrlWhitelist ) && !in_array( $src, 
$wgEtherpadLiteUrlWhitelist ) ) {
                $listOfAllowed = $parser->getFunctionLang()->listToText( 
$wgEtherpadLiteUrlWhitelist );
+               $numberAllowed = $parser->getFunctionLang()->formatNum( count( 
$wgEtherpadLiteUrlWhitelist ) );
                return wfEtherpadLiteError( 
'etherpadlite-url-is-not-whitelisted',
-                       array( $src, $listOfAllowed )
+                       array( $src, $listOfAllowed, $numberAllowed )
                );
        }
 


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to