Yurik has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/67878


Change subject: Added count param for PLURAL to zeroconfig-sites msg
......................................................................

Added count param for PLURAL to zeroconfig-sites msg

Allows localizers a better way to localize the number of items
in the 'zeroconfig-sites' message

Change-Id: I43d09aae7c00fe926964bbdb473d5991a5d2de56
---
M includes/CarrierConfig.php
M includes/ZeroConfig.i18n.php
2 files changed, 10 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ZeroRatedMobileAccess 
refs/changes/78/67878/1

diff --git a/includes/CarrierConfig.php b/includes/CarrierConfig.php
index 90868d7..daf4cba 100644
--- a/includes/CarrierConfig.php
+++ b/includes/CarrierConfig.php
@@ -177,7 +177,11 @@
                                        && count( $v ) > 0
                                        && CarrierConfig::isArrayOfStrings( $v )
                                        ? array( null, $v )
-                                       : array( array( 'zeroconfig-sites', "'" 
. implode( "', '", $validValues ) . "'" ), $value );
+                                       : array(
+                                               array( 'zeroconfig-sites',
+                                                       "'" . implode( "', '", 
$validValues ) . "'",
+                                                       \Message::numParam( 
count( $validValues ) ) ),
+                                               $value );
                        } );
 
                //'name' => null,             // Map of localized partner names
diff --git a/includes/ZeroConfig.i18n.php b/includes/ZeroConfig.i18n.php
index 1ccfe56..acbe982 100644
--- a/includes/ZeroConfig.i18n.php
+++ b/includes/ZeroConfig.i18n.php
@@ -21,12 +21,12 @@
        'zeroconfig-duplicate_field' => 'More than one value \'$1\' found',
        'zeroconfig-opt_bool' => 'must be true or false (optional)',
        'zeroconfig-opt_string' => 'must be a string (optional)',
-       'zeroconfig-name' => 'must be a dictionary of valid language codes to 
strings',
+       'zeroconfig-name' => 'must be an object of valid language codes to 
strings. E.g. { "en":"English", ... }',
        'zeroconfig-show_langs' => 'must be a non-empty list of valid language 
codes',
        'zeroconfig-whitelisted_langs-all' => '(all)',
        'zeroconfig-whitelisted_langs' => 'must be a list of valid language 
codes and include all of \'showLangs\' languages (or empty for all)',
-       'zeroconfig-lang_name_overrides' => 'must be a dictionary of valid 
language codes to strings (optional)',
-       'zeroconfig-banner' => 'must be a dictionary of valid language codes to 
strings (optional)',
+       'zeroconfig-lang_name_overrides' => 'must be an object of valid 
language codes to strings (optional). E.g. { "en":"English", ... }',
+       'zeroconfig-banner' => 'must be an object of valid language codes to 
strings (optional).  E.g. { "en":"English", ... }',
        'zeroconfig-banner_url' => 'must be a valid URL (optional)',
        'zeroconfig-sites' => 'must be missing or be a list with one or more of 
these values: $1',
        'zeroconfig-ips' => 'must be an array of valid non-restricted (no 
private networks) CIDR IP blocks',
@@ -91,7 +91,8 @@
 Used as <code>$2</code> in the message {{msg-mw|Zeroconfig-field error}}.
 
 Parameters:
-* $1 - a string with comma separated list of allowed values in quotes.',
+* $1 - a string with comma separated list of allowed values in quotes.
+* $2 - an integer count of values in the list $1, will be 2 or greater.',
        'zeroconfig-ips' => 'IPs parameter validation error.
 
 Used as <code>$2</code> in the message {{msg-mw|Zeroconfig-field error}}.',

-- 
To view, visit https://gerrit.wikimedia.org/r/67878
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I43d09aae7c00fe926964bbdb473d5991a5d2de56
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ZeroRatedMobileAccess
Gerrit-Branch: master
Gerrit-Owner: Yurik <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to