jenkins-bot has submitted this change and it was merged.
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, 12 insertions(+), 5 deletions(-)
Approvals:
Dr0ptp4kt: Verified; Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/CarrierConfig.php b/includes/CarrierConfig.php
index 90868d7..1ec9aca 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
@@ -342,6 +346,8 @@
$value = null;
$duplicates = array();
+ // @TODO: Change from array results/exceptions to Message
objects in case of an error
+
// check for exact field name match
if ( array_key_exists( $field, $this->json ) ) {
$duplicates[] = $field;
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: merged
Gerrit-Change-Id: I43d09aae7c00fe926964bbdb473d5991a5d2de56
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ZeroRatedMobileAccess
Gerrit-Branch: master
Gerrit-Owner: Yurik <[email protected]>
Gerrit-Reviewer: Dr0ptp4kt <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits