r69166 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69165‎ | r69166 | r69167 >
Date:23:33, 7 July 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Tag for version 0.3.4.
Modified paths:
  • /tags/extensions/Validator/REL_0_3_4 (added) (history)
  • /tags/extensions/Validator/REL_0_3_4/COPYING (added) (history)
  • /tags/extensions/Validator/REL_0_3_4/INSTALL (added) (history)
  • /tags/extensions/Validator/REL_0_3_4/README (added) (history)
  • /tags/extensions/Validator/REL_0_3_4/RELEASE-NOTES (added) (history)
  • /tags/extensions/Validator/REL_0_3_4/TopologicalSort.php (added) (history)
  • /tags/extensions/Validator/REL_0_3_4/Validator.class.php (added) (history)
  • /tags/extensions/Validator/REL_0_3_4/Validator.i18n.php (added) (history)
  • /tags/extensions/Validator/REL_0_3_4/Validator.php (added) (history)
  • /tags/extensions/Validator/REL_0_3_4/Validator_Formats.php (added) (history)
  • /tags/extensions/Validator/REL_0_3_4/Validator_Functions.php (added) (history)
  • /tags/extensions/Validator/REL_0_3_4/Validator_Manager.php (added) (history)
  • /tags/extensions/Validator/REL_0_3_4/Validator_Settings.php (added) (history)

Diff [purge]

Index: tags/extensions/Validator/REL_0_3_4/Validator.class.php
@@ -0,0 +1,730 @@
 2+<?php
 3+
 4+/**
 5+ * File holding the Validator class.
 6+ *
 7+ * @file Validator.class.php
 8+ * @ingroup Validator
 9+ *
 10+ * @author Jeroen De Dauw
 11+ */
 12+
 13+if ( !defined( 'MEDIAWIKI' ) ) {
 14+ die( 'Not an entry point.' );
 15+}
 16+
 17+/**
 18+ * Class for parameter validation.
 19+ *
 20+ * @ingroup Validator
 21+ *
 22+ * @author Jeroen De Dauw
 23+ *
 24+ * TODO: break on fatal errors, such as missing required parameters that are dependencies
 25+ * TODO: correct invalid parameters in the main loop, as to have correct dependency handling
 26+ * TODO: settings of defaults should happen as a default behaviour that can be overiden by the output format,
 27+ * as it is not wished for all output formats in every case, and now a hacky approach is required there.
 28+ */
 29+final class Validator {
 30+
 31+ /**
 32+ * @var boolean Indicates whether parameters not found in the criteria list
 33+ * should be stored in case they are not accepted. The default is false.
 34+ */
 35+ public static $storeUnknownParameters = false;
 36+
 37+ /**
 38+ * @var boolean Indicates whether parameters not found in the criteria list
 39+ * should be stored in case they are not accepted. The default is false.
 40+ */
 41+ public static $accumulateParameterErrors = false;
 42+
 43+ /**
 44+ * @var boolean Indicates whether parameters that are provided more then once
 45+ * should be accepted, and use the first provided value, or not, and generate an error.
 46+ */
 47+ public static $acceptOverriding = false;
 48+
 49+ /**
 50+ * @var boolean Indicates if errors in list items should cause the item to be omitted,
 51+ * versus having the whole list be set to it's default.
 52+ */
 53+ public static $perItemValidation = true;
 54+
 55+ /**
 56+ * @var mixed The default value for parameters the user did not set and do not have their own
 57+ * default specified.
 58+ */
 59+ public static $defaultDefaultValue = '';
 60+
 61+ /**
 62+ * @var string The default delimiter for lists, used when the parameter definition does not
 63+ * specify one.
 64+ */
 65+ public static $defaultListDelimeter = ',';
 66+
 67+ /**
 68+ * @var array Holder for the validation functions.
 69+ */
 70+ private static $mValidationFunctions = array(
 71+ 'in_array' => array( 'ValidatorFunctions', 'in_array' ),
 72+ 'in_range' => array( 'ValidatorFunctions', 'in_range' ),
 73+ 'is_numeric' => array( 'ValidatorFunctions', 'is_numeric' ),
 74+ 'is_float' => array( 'ValidatorFunctions', 'is_float' ),
 75+ 'is_integer' => array( 'ValidatorFunctions', 'is_integer' ),
 76+ 'not_empty' => array( 'ValidatorFunctions', 'not_empty' ),
 77+ 'has_length' => array( 'ValidatorFunctions', 'has_length' ),
 78+ 'regex' => array( 'ValidatorFunctions', 'regex' ),
 79+ );
 80+
 81+ /**
 82+ * @var array Holder for the list validation functions.
 83+ */
 84+ private static $mListValidationFunctions = array(
 85+ 'item_count' => array( 'ValidatorFunctions', 'has_item_count' ),
 86+ 'unique_items' => array( 'ValidatorFunctions', 'has_unique_items' ),
 87+ );
 88+
 89+ /**
 90+ * @var array Holder for the formatting functions.
 91+ */
 92+ private static $mOutputFormats = array(
 93+ 'array' => array( 'ValidatorFormats', 'format_array' ),
 94+ 'list' => array( 'ValidatorFormats', 'format_list' ),
 95+ 'boolean' => array( 'ValidatorFormats', 'format_boolean' ),
 96+ 'boolstr' => array( 'ValidatorFormats', 'format_boolean_string' ),
 97+ 'string' => array( 'ValidatorFormats', 'format_string' ),
 98+ 'unique_items' => array( 'ValidatorFormats', 'format_unique_items' ),
 99+ 'filtered_array' => array( 'ValidatorFormats', 'format_filtered_array' ),
 100+ );
 101+
 102+ /**
 103+ * An array containing the parameter definitions. The keys are main parameter names,
 104+ * and the values are associative arrays themselves, consisting out of elements that
 105+ * can be seen as properties of the parameter as they would be in the case of objects.
 106+ *
 107+ * @var associative array
 108+ */
 109+ private $mParameterInfo;
 110+
 111+ /**
 112+ * An array initially containing the user provided values. Adittional data about
 113+ * the validation and formatting processes gets added later on, and so stays
 114+ * available for validation and formatting of other parameters.
 115+ *
 116+ * original-value
 117+ * default
 118+ * position
 119+ * original-name
 120+ * formatted-value
 121+ *
 122+ * @var associative array
 123+ */
 124+ private $mParameters = array();
 125+
 126+ /**
 127+ * Arrays for holding the (main) names of valid, invalid and unknown parameters.
 128+ */
 129+ private $mValidParams = array();
 130+ private $mInvalidParams = array();
 131+ private $mUnknownParams = array();
 132+
 133+ /**
 134+ * Holds all errors and their meta data.
 135+ *
 136+ * @var associative array
 137+ */
 138+ private $mErrors = array();
 139+
 140+ /**
 141+ * Determines the names and values of all parameters. Also takes care of default parameters.
 142+ * After that the resulting parameter list is passed to Validator::setParameters
 143+ *
 144+ * @param array $rawParams
 145+ * @param array $parameterInfo
 146+ * @param array $defaultParams
 147+ * @param boolean $toLower Indicates if the parameter values should be put to lower case. Defaults to true.
 148+ */
 149+ public function parseAndSetParams( array $rawParams, array $parameterInfo, array $defaultParams = array(), $toLower = true ) {
 150+ $parameters = array();
 151+
 152+ $nr = 0;
 153+ $defaultNr = 0;
 154+
 155+ foreach ( $rawParams as $arg ) {
 156+ // Only take into account strings. If the value is not a string,
 157+ // it is not a raw parameter, and can not be parsed correctly in all cases.
 158+ if ( is_string( $arg ) ) {
 159+ $parts = explode( '=', $arg, 2 );
 160+
 161+ // If there is only one part, no parameter name is provided, so try default parameter assignment.
 162+ if ( count( $parts ) == 1 ) {
 163+ // Default parameter assignment is only possible when there are default parameters!
 164+ if ( count( $defaultParams ) > 0 ) {
 165+ $defaultParam = array_shift( $defaultParams );
 166+ $parameters[strtolower( $defaultParam )] = array(
 167+ 'original-value' => trim( $toLower ? strtolower( $parts[0] ) : $parts[0] ),
 168+ 'default' => $defaultNr,
 169+ 'position' => $nr
 170+ );
 171+ $defaultNr++;
 172+ }
 173+ else {
 174+ // It might be nice to have some sort of warning or error here, as the value is simply ignored.
 175+ }
 176+ } else {
 177+ $paramName = trim( strtolower( $parts[0] ) );
 178+
 179+ $parameters[$paramName] = array(
 180+ 'original-value' => trim( $toLower ? strtolower( $parts[1] ) : $parts[1] ),
 181+ 'default' => false,
 182+ 'position' => $nr
 183+ );
 184+
 185+ // Let's not be evil, and remove the used parameter name from the default parameter list.
 186+ // This code is basically a remove array element by value algorithm.
 187+ $newDefaults = array();
 188+
 189+ foreach( $defaultParams as $defaultParam ) {
 190+ if ( $defaultParam != $paramName ) $newDefaults[] = $defaultParam;
 191+ }
 192+
 193+ $defaultParams = $newDefaults;
 194+ }
 195+ }
 196+ $nr++;
 197+ }
 198+
 199+ $this->setParameters( $parameters, $parameterInfo, false );
 200+ }
 201+
 202+ /**
 203+ * Loops through a list of provided parameters, resolves aliasing and stores errors
 204+ * for unknown parameters and optionally for parameter overriding.
 205+ *
 206+ * @param array $parameters Parameter name as key, parameter value as value
 207+ * @param array $parameterInfo Main parameter name as key, parameter meta data as valu
 208+ * @param boolean $toLower Indicates if the parameter values should be put to lower case. Defaults to true.
 209+ */
 210+ public function setParameters( array $parameters, array $parameterInfo, $toLower = true ) {
 211+ $this->mParameterInfo = $parameterInfo;
 212+
 213+ // Loop through all the user provided parameters, and destinguise between those that are allowed and those that are not.
 214+ foreach ( $parameters as $paramName => $paramData ) {
 215+ $paramName = trim( strtolower( $paramName ) );
 216+
 217+ // Attempt to get the main parameter name (takes care of aliases).
 218+ $mainName = self::getMainParamName( $paramName );
 219+
 220+ // If the parameter is found in the list of allowed ones, add it to the $mParameters array.
 221+ if ( $mainName ) {
 222+ // Check for parameter overriding. In most cases, this has already largely been taken care off,
 223+ // in the form of later parameters overriding earlier ones. This is not true for different aliases though.
 224+ if ( !array_key_exists( $mainName, $this->mParameters ) || self::$acceptOverriding ) {
 225+ // If the valueis an array, this means it has been procesed in parseAndSetParams already.
 226+ // If it is not, setParameters was called directly with an array of string parameter values.
 227+ if ( is_array( $paramData ) && array_key_exists( 'original-value', $paramData ) ) {
 228+ $paramData['original-name'] = $paramName;
 229+ $this->mParameters[$mainName] = $paramData;
 230+ }
 231+ else {
 232+ if ( is_string( $paramData ) ) {
 233+ $paramData = trim( $paramData );
 234+ if ( $toLower ) $paramData = strtolower( $paramData );
 235+ }
 236+ $this->mParameters[$mainName] = array(
 237+ 'original-value' => $paramData,
 238+ 'original-name' => $paramName,
 239+ );
 240+ }
 241+ }
 242+ else {
 243+ $this->mErrors[] = array( 'type' => 'override', 'name' => $mainName );
 244+ }
 245+ }
 246+ else { // If the parameter is not found in the list of allowed ones, add an item to the $this->mErrors array.
 247+ if ( self::$storeUnknownParameters ) $this->mUnknownParams[] = $paramName;
 248+ $this->mErrors[] = array( 'type' => 'unknown', 'name' => $paramName );
 249+ }
 250+ }
 251+ }
 252+
 253+ /**
 254+ * Returns the main parameter name for a given parameter or alias, or false
 255+ * when it is not recognized as main parameter or alias.
 256+ *
 257+ * @param string $paramName
 258+ *
 259+ * @return string or false
 260+ */
 261+ private function getMainParamName( $paramName ) {
 262+ $result = false;
 263+
 264+ if ( array_key_exists( $paramName, $this->mParameterInfo ) ) {
 265+ $result = $paramName;
 266+ }
 267+ else {
 268+ foreach ( $this->mParameterInfo as $name => $data ) {
 269+ if ( array_key_exists( 'aliases', $data ) && in_array( $paramName, $data['aliases'] ) ) {
 270+ $result = $name;
 271+ break;
 272+ }
 273+ }
 274+ }
 275+
 276+ return $result;
 277+ }
 278+
 279+ /**
 280+ * First determines the order of parameter handling based on the dependency definitons,
 281+ * and then goes through the parameters one by one, first validating and then formatting,
 282+ * storing any encountered errors along the way.
 283+ *
 284+ * The 'value' element is set here, either by the cleaned 'original-value' or default.
 285+ */
 286+ public function validateAndFormatParameters() {
 287+ $dependencyList = array();
 288+
 289+ foreach ( $this->mParameterInfo as $paramName => $paramInfo ) {
 290+ $dependencyList[$paramName] =
 291+ array_key_exists( 'dependencies', $paramInfo ) ? (array)$paramInfo['dependencies'] : array();
 292+ }
 293+
 294+ $sorter = new TopologicalSort( $dependencyList, true );
 295+ $orderedParameters = $sorter->doSort();
 296+
 297+ foreach ( $orderedParameters as $paramName ) {
 298+ $paramInfo = $this->mParameterInfo[$paramName];
 299+
 300+ // If the user provided a value for this parameter, validate and handle it.
 301+ if ( array_key_exists( $paramName, $this->mParameters ) ) {
 302+
 303+ $this->cleanParameter( $paramName );
 304+
 305+ if ( $this->validateParameter( $paramName ) ) {
 306+ // If the validation succeeded, add the parameter to the list of valid ones.
 307+ $this->mValidParams[] = $paramName;
 308+ $this->setOutputTypes( $paramName );
 309+ }
 310+ else {
 311+ // If the validation failed, add the parameter to the list of invalid ones.
 312+ $this->mInvalidParams[] = $paramName;
 313+ }
 314+ }
 315+ else {
 316+ // If the parameter is required, add a new error of type 'missing'.
 317+ // TODO: break when has dependencies
 318+ if ( array_key_exists( 'required', $paramInfo ) && $paramInfo['required'] ) {
 319+ $this->mErrors[] = array( 'type' => 'missing', 'name' => $paramName );
 320+ }
 321+ else {
 322+ // Set the default value (or default 'default value' if none is provided), and ensure the type is correct.
 323+ $this->mParameters[$paramName]['value'] = array_key_exists( 'default', $paramInfo ) ? $paramInfo['default'] : self::$defaultDefaultValue;
 324+ $this->mValidParams[] = $paramName;
 325+ $this->setOutputTypes( $paramName );
 326+ }
 327+ }
 328+ }
 329+ }
 330+
 331+ /**
 332+ * Ensures the parameter info is valid and parses list types.
 333+ *
 334+ * @param string $name
 335+ */
 336+ private function cleanParameter( $name ) {
 337+ // Ensure there is a criteria array.
 338+ if ( ! array_key_exists( 'criteria', $this->mParameterInfo[$name] ) ) {
 339+ $this->mParameterInfo[$name]['criteria'] = array();
 340+ }
 341+
 342+ // Ensure the type is set in array form.
 343+ if ( ! array_key_exists( 'type', $this->mParameterInfo[$name] ) ) {
 344+ $this->mParameterInfo[$name]['type'] = array( 'string' );
 345+ }
 346+ elseif ( ! is_array( $this->mParameterInfo[$name]['type'] ) ) {
 347+ $this->mParameterInfo[$name]['type'] = array( $this->mParameterInfo[$name]['type'] );
 348+ }
 349+
 350+ if ( array_key_exists( 'type', $this->mParameterInfo[$name] ) ) {
 351+ // Add type specific criteria.
 352+ switch( strtolower( $this->mParameterInfo[$name]['type'][0] ) ) {
 353+ case 'integer':
 354+ $this->addTypeCriteria( $name, 'is_integer' );
 355+ break;
 356+ case 'float':
 357+ $this->addTypeCriteria( $name, 'is_float' );
 358+ break;
 359+ case 'number': // Note: This accepts non-decimal notations!
 360+ $this->addTypeCriteria( $name, 'is_numeric' );
 361+ break;
 362+ case 'boolean':
 363+ // TODO: work with list of true and false values.
 364+ // TODO: i18n
 365+ $this->addTypeCriteria( $name, 'in_array', array( 'yes', 'no', 'on', 'off' ) );
 366+ break;
 367+ case 'char':
 368+ $this->addTypeCriteria( $name, 'has_length', array( 1, 1 ) );
 369+ break;
 370+ }
 371+ }
 372+
 373+ // If the original-value element is set, clean it, and store as value.
 374+ if ( array_key_exists( 'original-value', $this->mParameters[$name] ) ) {
 375+ $value = $this->mParameters[$name]['original-value'];
 376+
 377+ if ( count( $this->mParameterInfo[$name]['type'] ) > 1 && $this->mParameterInfo[$name]['type'][1] == 'list' ) {
 378+ // Trimming and splitting of list values.
 379+ $delimiter = count( $this->mParameterInfo[$name]['type'] ) > 2 ? $this->mParameterInfo[$name]['type'][2] : self::$defaultListDelimeter;
 380+ $value = preg_replace( '/((\s)*' . $delimiter . '(\s)*)/', $delimiter, $value );
 381+ $value = explode( $delimiter, $value );
 382+ }
 383+ elseif ( count( $this->mParameterInfo[$name]['type'] ) > 1 && $this->mParameterInfo[$name]['type'][1] == 'array' && is_array( $value ) ) {
 384+ // Trimming of array values.
 385+ for ( $i = count( $value ); $i > 0; $i-- ) $value[$i] = trim( $value[$i] );
 386+ }
 387+
 388+ $this->mParameters[$name]['value'] = $value;
 389+ }
 390+ }
 391+
 392+ private function addTypeCriteria( $paramName, $criteriaName, $criteriaArgs = array() ) {
 393+ $this->mParameterInfo[$paramName]['criteria'] = array_merge(
 394+ array( $criteriaName => $criteriaArgs ),
 395+ $this->mParameterInfo[$paramName]['criteria']
 396+ );
 397+ }
 398+
 399+ /**
 400+ * Valides the provided parameter.
 401+ *
 402+ * This method itself validates the list criteria, if any. After this the regular criteria
 403+ * are validated by calling the doItemValidation method.
 404+ *
 405+ * @param string $name
 406+ *
 407+ * @return boolean Indicates whether there the parameter value(s) is/are valid.
 408+ */
 409+ private function validateParameter( $name ) {
 410+ $hasNoErrors = $this->doListValidation( $name );
 411+
 412+ if ( $hasNoErrors || self::$accumulateParameterErrors ) {
 413+ $hasNoErrors = $hasNoErrors && $this->doItemValidation( $name );
 414+ }
 415+
 416+ return $hasNoErrors;
 417+ }
 418+
 419+ /**
 420+ * Validates the list criteria for a parameter, if there are any.
 421+ *
 422+ * @param string $name
 423+ */
 424+ private function doListValidation( $name ) {
 425+ $hasNoErrors = true;
 426+
 427+ if ( array_key_exists( 'list-criteria', $this->mParameterInfo[$name] ) ) {
 428+ foreach ( $this->mParameterInfo[$name]['list-criteria'] as $criteriaName => $criteriaArgs ) {
 429+ // Get the validation function. If there is no matching function, throw an exception.
 430+ if ( array_key_exists( $criteriaName, self::$mListValidationFunctions ) ) {
 431+ $validationFunction = self::$mListValidationFunctions[$criteriaName];
 432+ $isValid = $this->doCriteriaValidation( $validationFunction, $this->mParameters['value'], $name, $criteriaArgs );
 433+
 434+ // Add a new error when the validation failed, and break the loop if errors for one parameter should not be accumulated.
 435+ if ( ! $isValid ) {
 436+ $hasNoErrors = false;
 437+
 438+ $this->mErrors[] = array( 'type' => $criteriaName, 'args' => $criteriaArgs, 'name' => $name, 'list' => true, 'value' => $this->mParameters['original-value'] );
 439+
 440+ if ( !self::$accumulateParameterErrors ) {
 441+ break;
 442+ }
 443+ }
 444+ }
 445+ else {
 446+ $hasNoErrors = false;
 447+ throw new Exception( 'There is no validation function for list criteria type ' . $criteriaName );
 448+ }
 449+ }
 450+ }
 451+
 452+ return $hasNoErrors;
 453+ }
 454+
 455+ /**
 456+ * Valides the provided parameter by matching the value against the item criteria for the name.
 457+ *
 458+ * @param string $name
 459+ *
 460+ * @return boolean Indicates whether there the parameter value(s) is/are valid.
 461+ */
 462+ private function doItemValidation( $name ) {
 463+ $hasNoErrors = true;
 464+
 465+ $value = &$this->mParameters[$name]['value'];
 466+
 467+ // Go through all item criteria.
 468+ foreach ( $this->mParameterInfo[$name]['criteria'] as $criteriaName => $criteriaArgs ) {
 469+ // Get the validation function. If there is no matching function, throw an exception.
 470+ if ( array_key_exists( $criteriaName, self::$mValidationFunctions ) ) {
 471+ $validationFunction = self::$mValidationFunctions[$criteriaName];
 472+
 473+ if ( is_array( $value ) ) {
 474+ // Handling of list parameters
 475+ $invalidItems = array();
 476+ $validItems = array();
 477+
 478+ // Loop through all the items in the parameter value, and validate them.
 479+ foreach ( $value as $item ) {
 480+ $isValid = $this->doCriteriaValidation( $validationFunction, $item, $name, $criteriaArgs );
 481+ if ( $isValid ) {
 482+ // If per item validation is on, store the valid items, so only these can be returned by Validator.
 483+ if ( self::$perItemValidation ) $validItems[] = $item;
 484+ }
 485+ else {
 486+ // If per item validation is on, store the invalid items, so a fitting error message can be created.
 487+ if ( self::$perItemValidation ) {
 488+ $invalidItems[] = $item;
 489+ }
 490+ else {
 491+ // If per item validation is not on, an error to one item means the complete value is invalid.
 492+ // Therefore it's not required to validate the remaining items.
 493+ break;
 494+ }
 495+ }
 496+ }
 497+
 498+ if ( self::$perItemValidation ) {
 499+ // If per item validation is on, the parameter value is valid as long as there is at least one valid item.
 500+ $isValid = count( $validItems ) > 0;
 501+
 502+ // If the value is valid, but there are invalid items, add an error with a list of these items.
 503+ if ( $isValid && count( $invalidItems ) > 0 ) {
 504+ $value = $validItems;
 505+ $this->mErrors[] = array( 'type' => $criteriaName, 'args' => $criteriaArgs, 'name' => $name, 'list' => true, 'invalid-items' => $invalidItems );
 506+ }
 507+ }
 508+ }
 509+ else {
 510+ // Determine if the value is valid for single valued parameters.
 511+ $isValid = $this->doCriteriaValidation( $validationFunction, $value, $name, $criteriaArgs );
 512+ }
 513+
 514+ // Add a new error when the validation failed, and break the loop if errors for one parameter should not be accumulated.
 515+ if ( !$isValid ) {
 516+ $isList = is_array( $value );
 517+ if ( $isList ) $value = $this->mParameters[$name]['original-value'];
 518+ $this->mErrors[] = array( 'type' => $criteriaName, 'args' => $criteriaArgs, 'name' => $name, 'list' => $isList, 'value' => $value );
 519+ $hasNoErrors = false;
 520+ if ( !self::$accumulateParameterErrors ) break;
 521+ }
 522+ }
 523+ else {
 524+ $hasNoErrors = false;
 525+ throw new Exception( 'There is no validation function for criteria type ' . $criteriaName );
 526+ }
 527+ }
 528+
 529+ return $hasNoErrors;
 530+ }
 531+
 532+ /**
 533+ * Calls the validation function for the provided list or single value and returns it's result.
 534+ * The call is made with these parameters:
 535+ * - value: The value that is the complete list, or a single item.
 536+ * - parameter name: For lookups in the param info array.
 537+ * - parameter array: All data about the parameters gathered so far (this includes dependencies!).
 538+ * - output type info: Type info as provided by the parameter definition. This can be zero or more parameters.
 539+ *
 540+ * @param $validationFunction
 541+ * @param mixed $value
 542+ * @param string $name
 543+ * @param array $criteriaArgs
 544+ *
 545+ * @return boolean
 546+ */
 547+ private function doCriteriaValidation( $validationFunction, $value, $name, array $criteriaArgs ) {
 548+ // Call the validation function and store the result.
 549+ $parameters = array( &$value, $name, $this->mParameters );
 550+ $parameters = array_merge( $parameters, $criteriaArgs );
 551+ return call_user_func_array( $validationFunction, $parameters );
 552+ }
 553+
 554+ /**
 555+ * Changes the invalid parameters to their default values, and changes their state to valid.
 556+ */
 557+ public function correctInvalidParams() {
 558+ while ( $paramName = array_shift( $this->mInvalidParams ) ) {
 559+ if ( array_key_exists( 'default', $this->mParameterInfo[$paramName] ) ) {
 560+ $this->mParameters[$paramName]['value'] = $this->mParameterInfo[$paramName]['default'];
 561+ }
 562+ else {
 563+ $this->mParameters[$paramName]['value'] = self::$defaultDefaultValue;
 564+ }
 565+ $this->setOutputTypes( $paramName );
 566+ $this->mValidParams[] = $paramName;
 567+ }
 568+ }
 569+
 570+ /**
 571+ * Ensures the output type values are arrays, and then calls setOutputType.
 572+ *
 573+ * @param string $name
 574+ */
 575+ private function setOutputTypes( $name ) {
 576+ $info = $this->mParameterInfo[$name];
 577+
 578+ if ( array_key_exists( 'output-types', $info ) ) {
 579+ for ( $i = 0, $c = count( $info['output-types'] ); $i < $c; $i++ ) {
 580+ if ( ! is_array( $info['output-types'][$i] ) ) $info['output-types'][$i] = array( $info['output-types'][$i] );
 581+ $this->setOutputType( $name, $info['output-types'][$i] );
 582+ }
 583+ }
 584+ elseif ( array_key_exists( 'output-type', $info ) ) {
 585+ if ( ! is_array( $info['output-type'] ) ) $info['output-type'] = array( $info['output-type'] );
 586+ $this->setOutputType( $name, $info['output-type'] );
 587+ }
 588+
 589+ }
 590+
 591+ /**
 592+ * Calls the formatting function for the provided output format with these parameters:
 593+ * - parameter value: ByRef for easy manipulation.
 594+ * - parameter name: For lookups in the param info array.
 595+ * - parameter array: All data about the parameters gathered so far (this includes dependencies!).
 596+ * - output type info: Type info as provided by the parameter definition. This can be zero or more parameters.
 597+ *
 598+ * @param string $name
 599+ * @param array $typeInfo
 600+ */
 601+ private function setOutputType( $name, array $typeInfo ) {
 602+ // The output type is the first value in the type info array.
 603+ // The remaining ones will be any extra arguments.
 604+ $outputType = strtolower( array_shift( $typeInfo ) );
 605+
 606+ if ( !array_key_exists( 'formatted-value', $this->mParameters[$name] ) ) {
 607+ $this->mParameters[$name]['formatted-value'] = $this->mParameters[$name]['value'];
 608+ }
 609+
 610+ if ( array_key_exists( $outputType, self::$mOutputFormats ) ) {
 611+ $parameters = array( &$this->mParameters[$name]['formatted-value'], $name, $this->mParameters );
 612+ $parameters = array_merge( $parameters, $typeInfo );
 613+ call_user_func_array( self::$mOutputFormats[$outputType], $parameters );
 614+ }
 615+ else {
 616+ throw new Exception( 'There is no formatting function for output format ' . $outputType );
 617+ }
 618+ }
 619+
 620+ /**
 621+ * Returns the valid parameters.
 622+ *
 623+ * @param boolean $includeMetaData
 624+ *
 625+ * @return array
 626+ */
 627+ public function getValidParams( $includeMetaData ) {
 628+ if ( $includeMetaData ) {
 629+ return $this->mValidParams;
 630+ }
 631+ else {
 632+ $validParams = array();
 633+
 634+ foreach( $this->mValidParams as $name ) {
 635+ $key = array_key_exists( 'formatted-value', $this->mParameters[$name] ) ? 'formatted-value' : 'value';
 636+ $validParams[$name] = $this->mParameters[$name][$key];
 637+ }
 638+
 639+ return $validParams;
 640+ }
 641+ }
 642+
 643+ /**
 644+ * Returns the unknown parameters.
 645+ *
 646+ * @return array
 647+ */
 648+ public static function getUnknownParams() {
 649+ $unknownParams = array();
 650+
 651+ foreach( $this->mUnknownParams as $name ) {
 652+ $unknownParams[$name] = $this->mParameters[$name];
 653+ }
 654+
 655+ return $unknownParams;
 656+ }
 657+
 658+ /**
 659+ * Returns the errors.
 660+ *
 661+ * @return array
 662+ */
 663+ public function getErrors() {
 664+ return $this->mErrors;
 665+ }
 666+
 667+ /**
 668+ * @return boolean
 669+ */
 670+ public function hasErrors() {
 671+ return count( $this->mErrors ) > 0;
 672+ }
 673+
 674+ /**
 675+ * Returns wether there are any fatal errors. Fatal errors are either missing or invalid required parameters,
 676+ * or simply any sort of error when the validation level is equal to (or bigger then) Validator_ERRORS_STRICT.
 677+ *
 678+ * @return boolean
 679+ */
 680+ public function hasFatalError() {
 681+ global $egValidatorErrorLevel;
 682+ $has = $this->hasErrors() && $egValidatorErrorLevel >= Validator_ERRORS_STRICT;
 683+
 684+ if ( !$has ) {
 685+ foreach ( $this->mErrors as $error ) {
 686+ if ( $error['type'] == 'missing' ) {
 687+ $has = true;
 688+ break;
 689+ }
 690+ }
 691+ }
 692+
 693+ return $has;
 694+ }
 695+
 696+ /**
 697+ * Adds a new criteria type and the validation function that should validate values of this type.
 698+ * You can use this function to override existing criteria type handlers.
 699+ *
 700+ * @param string $criteriaName The name of the cirteria.
 701+ * @param array $functionName The functions location. If it's a global function, only the name,
 702+ * if it's in a class, first the class name, then the method name.
 703+ */
 704+ public static function addValidationFunction( $criteriaName, array $functionName ) {
 705+ self::$mValidationFunctions[$criteriaName] = $functionName;
 706+ }
 707+
 708+ /**
 709+ * Adds a new list criteria type and the validation function that should validate values of this type.
 710+ * You can use this function to override existing criteria type handlers.
 711+ *
 712+ * @param string $criteriaName The name of the list cirteria.
 713+ * @param array $functionName The functions location. If it's a global function, only the name,
 714+ * if it's in a class, first the class name, then the method name.
 715+ */
 716+ public static function addListValidationFunction( $criteriaName, array $functionName ) {
 717+ self::$mListValidationFunctions[strtolower( $criteriaName )] = $functionName;
 718+ }
 719+
 720+ /**
 721+ * Adds a new output format and the formatting function that should validate values of this type.
 722+ * You can use this function to override existing criteria type handlers.
 723+ *
 724+ * @param string $formatName The name of the format.
 725+ * @param array $functionName The functions location. If it's a global function, only the name,
 726+ * if it's in a class, first the class name, then the method name.
 727+ */
 728+ public static function addOutputFormat( $formatName, array $functionName ) {
 729+ self::$mOutputFormats[strtolower( $formatName )] = $functionName;
 730+ }
 731+}
\ No newline at end of file
Property changes on: tags/extensions/Validator/REL_0_3_4/Validator.class.php
___________________________________________________________________
Added: svn:eol-style
1732 + native
Index: tags/extensions/Validator/REL_0_3_4/Validator_Functions.php
@@ -0,0 +1,159 @@
 2+<?php
 3+/**
 4+ * File holding the ValidatorFunctions class.
 5+ *
 6+ * @file ValidatorFunctions.php
 7+ * @ingroup Validator
 8+ *
 9+ * @author Jeroen De Dauw
 10+ */
 11+
 12+if ( !defined( 'MEDIAWIKI' ) ) {
 13+ die( 'Not an entry point.' );
 14+}
 15+
 16+/**
 17+ * Class holding variouse static methods for the validation of parameters that have to comply to cetrain criteria.
 18+ * Functions are called by Validator with the parameters $value, $arguments, where $arguments is optional.
 19+ *
 20+ * @ingroup Validator
 21+ *
 22+ * @author Jeroen De Dauw
 23+ */
 24+final class ValidatorFunctions {
 25+
 26+ /**
 27+ * Returns whether the provided value, which must be a number, is within a certain range. Upper bound included.
 28+ *
 29+ * @param $value
 30+ * @param array $metaData
 31+ * @param mixed $lower
 32+ * @param mixed $upper
 33+ *
 34+ * @return boolean
 35+ */
 36+ public static function in_range( $value, $name, array $parameters, $lower = false, $upper = false ) {
 37+ if ( ! is_numeric( $value ) ) return false;
 38+ $value = (int)$value;
 39+ if ( $lower !== false && $value < $lower ) return false;
 40+ if ( $upper !== false && $value > $upper ) return false;
 41+ return true;
 42+ }
 43+
 44+ /**
 45+ * Returns whether the string value is not empty. Not empty is defined as having at least one character after trimming.
 46+ *
 47+ * @param $value
 48+ * @param array $metaData
 49+ *
 50+ * @return boolean
 51+ */
 52+ public static function not_empty( $value, $name, array $parameters ) {
 53+ return strlen( trim( $value ) ) > 0;
 54+ }
 55+
 56+ /**
 57+ * Returns whether the string value is not empty. Not empty is defined as having at least one character after trimming.
 58+ *
 59+ * @param $value
 60+ * @param array $metaData
 61+ *
 62+ * @return boolean
 63+ */
 64+ public static function in_array( $value, $name, array $parameters ) {
 65+ // TODO: It's possible the way the allowed values are passed here is quite inneficient...
 66+ $params = func_get_args();
 67+ array_shift( $params ); // Ommit the value
 68+ return in_array( $value, $params );
 69+ }
 70+
 71+ /**
 72+ * Returns whether a variable is an integer or an integer string. Uses the native PHP function.
 73+ *
 74+ * @param $value
 75+ * @param array $metaData
 76+ *
 77+ * @return boolean
 78+ */
 79+ public static function is_integer( $value, $name, array $parameters ) {
 80+ return ctype_digit( (string)$value );
 81+ }
 82+
 83+ /**
 84+ * Returns whether the length of the value is within a certain range. Upper bound included.
 85+ *
 86+ * @param string $value
 87+ * @param array $metaData
 88+ * @param mixed $lower
 89+ * @param mixed $upper
 90+ *
 91+ * @return boolean
 92+ */
 93+ public static function has_length( $value, $name, array $parameters, $lower = false, $upper = false ) {
 94+ return self::in_range( strlen( $value ), $lower, $upper );
 95+ }
 96+
 97+ /**
 98+ * Returns whether the amount of items in the list is within a certain range. Upper bound included.
 99+ *
 100+ * @param array $values
 101+ * @param array $metaData
 102+ * @param mixed $lower
 103+ * @param mixed $upper
 104+ *
 105+ * @return boolean
 106+ */
 107+ public static function has_item_count( array $values, $name, array $parameters, $lower = false, $upper = false ) {
 108+ return self::in_range( count( $values ), $lower, $upper );
 109+ }
 110+
 111+ /**
 112+ * Returns whether the list of values does not have any duplicates.
 113+ *
 114+ * @param array $values
 115+ * @param array $metaData
 116+ *
 117+ * @return boolean
 118+ */
 119+ public static function has_unique_items( array $values, $name, array $parameters ) {
 120+ return count( $values ) == count( array_unique( $values ) );
 121+ }
 122+
 123+ /**
 124+ * Returns the result of preg_match.
 125+ *
 126+ * @param string $value
 127+ * @param array $metaData
 128+ * @param string $pattern
 129+ *
 130+ * @return boolean
 131+ */
 132+ public static function regex( $value, $name, array $parameters, $pattern ) {
 133+ return (bool)preg_match( $pattern, $value );
 134+ }
 135+
 136+ /**
 137+ * Wrapper for the native is_numeric function.
 138+ *
 139+ * @param $value
 140+ * @param array $metaData
 141+ *
 142+ * @return boolean
 143+ */
 144+ public static function is_numeric( $value, $name, array $parameters ) {
 145+ return is_numeric( $value );
 146+ }
 147+
 148+ /**
 149+ * Returns if the value is a floating point number.
 150+ * Does NOT check the type of the variable like the native is_float function.
 151+ *
 152+ * @param $value
 153+ * @param array $metaData
 154+ *
 155+ * @return boolean
 156+ */
 157+ public static function is_float( $value, $name, array $parameters ) {
 158+ return preg_match( '/^\d+(\.\d+)?$/', $value );
 159+ }
 160+}
\ No newline at end of file
Property changes on: tags/extensions/Validator/REL_0_3_4/Validator_Functions.php
___________________________________________________________________
Added: svn:eol-style
1161 + native
Index: tags/extensions/Validator/REL_0_3_4/Validator_Manager.php
@@ -0,0 +1,176 @@
 2+<?php
 3+
 4+/**
 5+ * File holding the ValidatorManager class.
 6+ *
 7+ * @file ValidatorManager.php
 8+ * @ingroup Validator
 9+ *
 10+ * @author Jeroen De Dauw
 11+ */
 12+
 13+if ( !defined( 'MEDIAWIKI' ) ) {
 14+ die( 'Not an entry point.' );
 15+}
 16+
 17+/**
 18+ * Class for parameter handling.
 19+ *
 20+ * @ingroup Validator
 21+ *
 22+ * @author Jeroen De Dauw
 23+ *
 24+ * FIXME: missing required params should result in a no-go, no matter of the error level, as they can/are not defaulted.
 25+ * TODO: make a distinction between fatal errors and regular errors by using 2 seperate error levels.
 26+ */
 27+final class ValidatorManager {
 28+
 29+ private $validator;
 30+
 31+ /**
 32+ * Validates the provided parameters, and corrects them depending on the error level.
 33+ *
 34+ * @param array $rawParameters The raw parameters, as provided by the user.
 35+ * @param array $parameterInfo Array containing the parameter definitions, which are needed for validation and defaulting.
 36+ * @param array $defaultParams
 37+ *
 38+ * @return array or false The valid parameters or false when the output should not be shown.
 39+ */
 40+ public function manageParameters( array $rawParameters, array $parameterInfo, array $defaultParams = array() ) {
 41+ global $egValidatorErrorLevel;
 42+
 43+ $this->validator = new Validator();
 44+
 45+ $this->validator->parseAndSetParams( $rawParameters, $parameterInfo, $defaultParams );
 46+ $this->validator->validateAndFormatParameters();
 47+
 48+ if ( $this->validator->hasErrors() && $egValidatorErrorLevel < Validator_ERRORS_STRICT ) {
 49+ $this->validator->correctInvalidParams();
 50+ }
 51+
 52+ return !$this->validator->hasFatalError();
 53+ }
 54+
 55+ public function manageParsedParameters( array $parameters, array $parameterInfo ) {
 56+ global $egValidatorErrorLevel;
 57+
 58+ $this->validator = new Validator();
 59+
 60+ $this->validator->setParameters( $parameters, $parameterInfo );
 61+ $this->validator->validateAndFormatParameters();
 62+
 63+ if ( $this->validator->hasErrors() && $egValidatorErrorLevel < Validator_ERRORS_STRICT ) {
 64+ $this->validator->correctInvalidParams();
 65+ }
 66+
 67+ return !$this->validator->hasFatalError();
 68+ }
 69+
 70+ /**
 71+ * Returns an array with the valid parameters.
 72+ *
 73+ * @param boolean $includeMetaData
 74+ *
 75+ * @return array
 76+ */
 77+ public function getParameters( $includeMetaData = true ) {
 78+ return $this->validator->getValidParams( $includeMetaData );
 79+ }
 80+
 81+ /**
 82+ * Returns a string containing an HTML error list, or an empty string when there are no errors.
 83+ *
 84+ * @return string
 85+ */
 86+ public function getErrorList() {
 87+ global $wgLang, $egValidatorErrorLevel;
 88+
 89+ // This function has been deprecated in 1.16, but needed for earlier versions.
 90+ // It's present in 1.16 as a stub, but lets check if it exists in case it gets removed at some point.
 91+ if ( function_exists( 'wfLoadExtensionMessages' ) ) {
 92+ wfLoadExtensionMessages( 'Validator' );
 93+ }
 94+
 95+ if ( $egValidatorErrorLevel >= Validator_ERRORS_SHOW && $this->validator->hasErrors() ) {
 96+ $rawErrors = $this->validator->getErrors();
 97+
 98+ $errorList = '<b>' . wfMsgExt( 'validator_error_parameters', 'parsemag', count( $rawErrors ) ) . '</b><br /><i>';
 99+
 100+ $errors = array();
 101+
 102+ foreach ( $rawErrors as $error ) {
 103+ $error['name'] = '<b>' . Sanitizer::escapeId( $error['name'] ) . '</b>';
 104+
 105+ if ( $error['type'] == 'unknown' ) {
 106+ $errors[] = wfMsgExt( 'validator_error_unknown_argument', array( 'parsemag' ), $error['name'] );
 107+ }
 108+ elseif ( $error['type'] == 'missing' ) {
 109+ $errors[] = wfMsgExt( 'validator_error_required_missing', array( 'parsemag' ), $error['name'] );
 110+ }
 111+ elseif ( array_key_exists( 'list', $error ) && $error['list'] ) {
 112+ switch( $error['type'] ) {
 113+ case 'not_empty' :
 114+ $msg = wfMsgExt( 'validator_list_error_empty_argument', array( 'parsemag' ), $error['name'] );
 115+ break;
 116+ case 'in_range' :
 117+ $msg = wfMsgExt( 'validator_list_error_invalid_range', array( 'parsemag' ), $error['name'], '<b>' . $error['args'][0] . '</b>', '<b>' . $error['args'][1] . '</b>' );
 118+ break;
 119+ case 'is_numeric' :
 120+ $msg = wfMsgExt( 'validator_list_error_must_be_number', array( 'parsemag' ), $error['name'] );
 121+ break;
 122+ case 'is_integer' :
 123+ $msg = wfMsgExt( 'validator_list_error_must_be_integer', array( 'parsemag' ), $error['name'] );
 124+ break;
 125+ case 'in_array' :
 126+ $itemsText = $wgLang->listToText( $error['args'] );
 127+ $msg = wfMsgExt( 'validator_error_accepts_only', array( 'parsemag' ), $error['name'], $itemsText, count( $error['args'] ) );
 128+ break;
 129+ case 'invalid' : default :
 130+ $msg = wfMsgExt( 'validator_list_error_invalid_argument', array( 'parsemag' ), $error['name'] );
 131+ break;
 132+ }
 133+
 134+ if ( array_key_exists( 'invalid-items', $error ) ) {
 135+ $omitted = array();
 136+ foreach ( $error['invalid-items'] as $item ) $omitted[] = Sanitizer::escapeId( $item );
 137+ $msg .= ' ' . wfMsgExt( 'validator_list_omitted', array( 'parsemag' ),
 138+ $wgLang->listToText( $omitted ), count( $omitted ) );
 139+ }
 140+
 141+ $errors[] = $msg;
 142+ }
 143+ else {
 144+ switch( $error['type'] ) {
 145+ case 'not_empty' :
 146+ $errors[] = wfMsgExt( 'validator_error_empty_argument', array( 'parsemag' ), $error['name'] );
 147+ break;
 148+ case 'in_range' :
 149+ $errors[] = wfMsgExt( 'validator_error_invalid_range', array( 'parsemag' ), $error['name'], '<b>' . $error['args'][0] . '</b>', '<b>' . $error['args'][1] . '</b>' );
 150+ break;
 151+ case 'is_numeric' :
 152+ $errors[] = wfMsgExt( 'validator_error_must_be_number', array( 'parsemag' ), $error['name'] );
 153+ break;
 154+ case 'is_integer' :
 155+ $errors[] = wfMsgExt( 'validator_error_must_be_integer', array( 'parsemag' ), $error['name'] );
 156+ break;
 157+ case 'in_array' :
 158+ $itemsText = $wgLang->listToText( $error['args'] );
 159+ $errors[] = wfMsgExt( 'validator_error_accepts_only', array( 'parsemag' ), $error['name'], $itemsText, count( $error['args'] ) );
 160+ break;
 161+ case 'invalid' : default :
 162+ $errors[] = wfMsgExt( 'validator_error_invalid_argument', array( 'parsemag' ), '<b>' . htmlspecialchars( $error['value'] ) . '</b>', $error['name'] );
 163+ break;
 164+ }
 165+ }
 166+ }
 167+
 168+ return $errorList . implode( $errors, '<br />' ) . '</i><br />';
 169+ }
 170+ elseif ( $egValidatorErrorLevel == Validator_ERRORS_WARN && $this->validator->hasErrors() ) {
 171+ return '<b>' . wfMsgExt( 'validator_warning_parameters', array( 'parsemag' ), count( $this->validator->getErrors() ) ) . '</b>';
 172+ }
 173+ else {
 174+ return '';
 175+ }
 176+ }
 177+}
\ No newline at end of file
Property changes on: tags/extensions/Validator/REL_0_3_4/Validator_Manager.php
___________________________________________________________________
Added: svn:eol-style
1178 + native
Index: tags/extensions/Validator/REL_0_3_4/INSTALL
@@ -0,0 +1,11 @@
 2+[[Validator 0.3.4]]
 3+
 4+Once you have downloaded the code, place the 'Validator' directory within
 5+your MediaWiki 'extensions' directory. Then add the following code to your
 6+LocalSettings.php file BEFORE the inclusion of any extensions using Validator:
 7+
 8+# Validator
 9+require_once( "$IP/extensions/Validator/Validator.php" );
 10+
 11+
 12+More information can be found at http://www.mediawiki.org/wiki/Extension:Validator#Setup
\ No newline at end of file
Index: tags/extensions/Validator/REL_0_3_4/RELEASE-NOTES
@@ -0,0 +1,82 @@
 2+For a documentation of all features, see http://www.mediawiki.org/wiki/Extension:Validator
 3+
 4+== Validator change log ==
 5+This change log contains a list of completed to-do's (new features, bug fixes, refactoring) for every version of Validator.
 6+
 7+
 8+== Validator change log ==
 9+
 10+=== Validator 0.3.4 ===
 11+(2010-07-07)
 12+
 13+* Fixed issue with parameter reference that occured in php 5.3 and later.
 14+
 15+* Fixed escaping issue that caused parameter names in error messages to be shown incorrectly.
 16+
 17+* Fixed small issue with parameter value trimming that caused problems when objects where passed.
 18+
 19+=== Validator 0.3.3 ===
 20+(2010-06-20)
 21+
 22+* Fixed bug that caused notices when using the ValidatorManager::manageParsedParameters method in some cases.
 23+
 24+=== Validator 0.3.2 ===
 25+(2010-06-07)
 26+
 27+* Added lower casing to parameter names, and optionally, but default on, lower-casing for parameter values.
 28+
 29+* Added removal of default parameters from the default parameter queue when used as a named parameter.
 30+
 31+=== Validator 0.3.1 ===
 32+(2010-06-04)
 33+
 34+* Added ValidatorManager::manageParsedParameters and Validator::setParameters.
 35+
 36+=== Validator 0.3 ===
 37+(2010-05-31)
 38+
 39+* Added generic default parameter support.
 40+
 41+* Added parameter dependency support.
 42+
 43+* Added full meta data support for validation and formatting functions, enabling more advanced handling of parameters.
 44+
 45+* Major refactoring to conform to MediaWiki convention.
 46+
 47+=== Validator 0.2.2 ===
 48+(2010-03-01)
 49+
 50+* Fixed potential xss vectors.
 51+
 52+* Minor code improvements.
 53+
 54+=== Validator 0.2.1 ===
 55+(2010-02-01)
 56+
 57+* Changed the inclusion of the upper bound for range validation functions.
 58+
 59+* Small language fixes.
 60+
 61+=== Validator 0.2 ===
 62+(2009-12-25)
 63+
 64+* Added handling for lists of a type, instead of having list as a type. This includes per-item-validation and per-item-defaulting.
 65+
 66+* Added list validation functions: item_count and unique_items
 67+
 68+* Added boolean, number and char types.
 69+
 70+* Added support for output types. The build in output types are lists, arrays, booleans and strings. Via a hook you can add your own output types.
 71+
 72+* Added Validator_ERRORS_MINIMAL value for $egValidatorErrorLevel.
 73+
 74+* Added warning message to ValidatorManager that will be shown for errors when egValidatorErrorLevel is Validator_ERRORS_WARN.
 75+
 76+* Added criteria support for is_boolean, has_length and regex.
 77+
 78+=== Validator 0.1 ===
 79+(2009-12-17)
 80+
 81+* Initial release, featuring parameter validation, defaulting and error generation.
 82+
 83+{{Validator see also}}
\ No newline at end of file
Index: tags/extensions/Validator/REL_0_3_4/Validator_Formats.php
@@ -0,0 +1,134 @@
 2+<?php
 3+/**
 4+ * File holding the ValidatorFormats class.
 5+ *
 6+ * @file ValidatorFormats.php
 7+ * @ingroup Validator
 8+ *
 9+ * @author Jeroen De Dauw
 10+ */
 11+
 12+if ( !defined( 'MEDIAWIKI' ) ) {
 13+ die( 'Not an entry point.' );
 14+}
 15+
 16+/**
 17+ * Class holding variouse static methods for the appliance of output formats.
 18+ *
 19+ * @ingroup Validator
 20+ *
 21+ * @author Jeroen De Dauw
 22+ */
 23+final class ValidatorFormats {
 24+
 25+ /**
 26+ * Ensures the value is an array.
 27+ *
 28+ * @param $value
 29+ * @param string name The name of the parameter.
 30+ * @param array $parameters Array containing data about the so far handled parameters.
 31+ */
 32+ public static function format_array( &$value, $name, array $parameters ) {
 33+ if ( ! is_array( $value ) ) $value = array( $value );
 34+ }
 35+
 36+ /**
 37+ * Returns an array containing only the specified values.
 38+ *
 39+ * @param $value
 40+ * @param string name The name of the parameter.
 41+ * @param array $parameters Array containing data about the so far handled parameters.
 42+ */
 43+ public static function format_filtered_array( &$value, $name, array $parameters ) {
 44+ // TODO: It's possible the way the allowed values are passed here is quite inneficient...
 45+ $params = func_get_args();
 46+ array_shift( $params ); // Ommit the value
 47+
 48+ self::format_array( $value, $name, $parameters );
 49+ $filtered = array();
 50+ foreach ( $value as $item ) if ( in_array( $item, $params ) ) $filtered[] = $item;
 51+
 52+ return $filtered;
 53+ }
 54+
 55+ /**
 56+ * Changes the value to list notation, by separating items with a delimiter,
 57+ * and/or adding wrappers before and after the items. Intended for lists, but
 58+ * will also work for single values.
 59+ *
 60+ * @param $value
 61+ * @param string name The name of the parameter.
 62+ * @param array $parameters Array containing data about the so far handled parameters.
 63+ * @param $delimiter
 64+ * @param $wrapper
 65+ */
 66+ public static function format_list( &$value, $name, array $parameters, $delimiter = ',', $wrapper = '' ) {
 67+ self::format_array( $value, $name, $parameters );
 68+ $value = $wrapper . implode( $wrapper . $delimiter . $wrapper, $value ) . $wrapper;
 69+ }
 70+
 71+ /**
 72+ * Changes every value into a boolean.
 73+ *
 74+ * TODO: work with a list of true-values.
 75+ *
 76+ * @param $value
 77+ * @param string name The name of the parameter.
 78+ * @param array $parameters Array containing data about the so far handled parameters.
 79+ */
 80+ public static function format_boolean( &$value, $name, array $parameters ) {
 81+ if ( is_array( $value ) ) {
 82+ $boolArray = array();
 83+ foreach ( $value as $item ) $boolArray[] = in_array( $item, array( 'yes', 'on' ) );
 84+ $value = $boolArray;
 85+ }
 86+ else {
 87+ $value = in_array( $value, array( 'yes', 'on' ) );
 88+ }
 89+ }
 90+
 91+ /**
 92+ * Changes every value into a boolean, represented by a 'false' or 'true' string.
 93+ *
 94+ * @param $value
 95+ * @param string name The name of the parameter.
 96+ * @param array $parameters Array containing data about the so far handled parameters.
 97+ */
 98+ public static function format_boolean_string( &$value, $name, array $parameters ) {
 99+ self::format_boolean( $value, $name, $parameters );
 100+ if ( is_array( $value ) ) {
 101+ $boolArray = array();
 102+ foreach ( $value as $item ) $boolArray[] = $item ? 'true' : 'false';
 103+ $value = $boolArray;
 104+ }
 105+ else {
 106+ $value = $value ? 'true' : 'false';
 107+ }
 108+ }
 109+
 110+ /**
 111+ * Changes lists into strings, by enumerating the items using $wgLang->listToText.
 112+ *
 113+ * @param $value
 114+ * @param string name The name of the parameter.
 115+ * @param array $parameters Array containing data about the so far handled parameters.
 116+ */
 117+ public static function format_string( &$value, $name, array $parameters ) {
 118+ if ( is_array( $value ) ) {
 119+ global $wgLang;
 120+ $value = $wgLang->listToText( $value );
 121+ }
 122+ }
 123+
 124+ /**
 125+ * Removes duplicate items from lists.
 126+ *
 127+ * @param $value
 128+ * @param string name The name of the parameter.
 129+ * @param array $parameters Array containing data about the so far handled parameters.
 130+ */
 131+ public static function format_unique_items( &$value, $name, array $parameters ) {
 132+ if ( is_array( $value ) ) $value = array_unique( $value );
 133+ }
 134+
 135+}
\ No newline at end of file
Property changes on: tags/extensions/Validator/REL_0_3_4/Validator_Formats.php
___________________________________________________________________
Added: svn:eol-style
1136 + native
Index: tags/extensions/Validator/REL_0_3_4/COPYING
@@ -0,0 +1,348 @@
 2+The license text below "----" applies to all files within this distribution, other
 3+than those that are in a directory which contains files named "LICENSE" or
 4+"COPYING", or a subdirectory thereof. For those files, the license text contained in
 5+said file overrides any license information contained in directories of smaller depth.
 6+Alternative licenses are typically used for software that is provided by external
 7+parties, and merely packaged with the Semantic MediaWiki release for convenience.
 8+----
 9+
 10+ GNU GENERAL PUBLIC LICENSE
 11+ Version 2, June 1991
 12+
 13+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
 14+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 15+ Everyone is permitted to copy and distribute verbatim copies
 16+ of this license document, but changing it is not allowed.
 17+
 18+ Preamble
 19+
 20+ The licenses for most software are designed to take away your
 21+freedom to share and change it. By contrast, the GNU General Public
 22+License is intended to guarantee your freedom to share and change free
 23+software--to make sure the software is free for all its users. This
 24+General Public License applies to most of the Free Software
 25+Foundation's software and to any other program whose authors commit to
 26+using it. (Some other Free Software Foundation software is covered by
 27+the GNU Library General Public License instead.) You can apply it to
 28+your programs, too.
 29+
 30+ When we speak of free software, we are referring to freedom, not
 31+price. Our General Public Licenses are designed to make sure that you
 32+have the freedom to distribute copies of free software (and charge for
 33+this service if you wish), that you receive source code or can get it
 34+if you want it, that you can change the software or use pieces of it
 35+in new free programs; and that you know you can do these things.
 36+
 37+ To protect your rights, we need to make restrictions that forbid
 38+anyone to deny you these rights or to ask you to surrender the rights.
 39+These restrictions translate to certain responsibilities for you if you
 40+distribute copies of the software, or if you modify it.
 41+
 42+ For example, if you distribute copies of such a program, whether
 43+gratis or for a fee, you must give the recipients all the rights that
 44+you have. You must make sure that they, too, receive or can get the
 45+source code. And you must show them these terms so they know their
 46+rights.
 47+
 48+ We protect your rights with two steps: (1) copyright the software, and
 49+(2) offer you this license which gives you legal permission to copy,
 50+distribute and/or modify the software.
 51+
 52+ Also, for each author's protection and ours, we want to make certain
 53+that everyone understands that there is no warranty for this free
 54+software. If the software is modified by someone else and passed on, we
 55+want its recipients to know that what they have is not the original, so
 56+that any problems introduced by others will not reflect on the original
 57+authors' reputations.
 58+
 59+ Finally, any free program is threatened constantly by software
 60+patents. We wish to avoid the danger that redistributors of a free
 61+program will individually obtain patent licenses, in effect making the
 62+program proprietary. To prevent this, we have made it clear that any
 63+patent must be licensed for everyone's free use or not licensed at all.
 64+
 65+ The precise terms and conditions for copying, distribution and
 66+modification follow.
 67+
 68+ GNU GENERAL PUBLIC LICENSE
 69+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 70+
 71+ 0. This License applies to any program or other work which contains
 72+a notice placed by the copyright holder saying it may be distributed
 73+under the terms of this General Public License. The "Program", below,
 74+refers to any such program or work, and a "work based on the Program"
 75+means either the Program or any derivative work under copyright law:
 76+that is to say, a work containing the Program or a portion of it,
 77+either verbatim or with modifications and/or translated into another
 78+language. (Hereinafter, translation is included without limitation in
 79+the term "modification".) Each licensee is addressed as "you".
 80+
 81+Activities other than copying, distribution and modification are not
 82+covered by this License; they are outside its scope. The act of
 83+running the Program is not restricted, and the output from the Program
 84+is covered only if its contents constitute a work based on the
 85+Program (independent of having been made by running the Program).
 86+Whether that is true depends on what the Program does.
 87+
 88+ 1. You may copy and distribute verbatim copies of the Program's
 89+source code as you receive it, in any medium, provided that you
 90+conspicuously and appropriately publish on each copy an appropriate
 91+copyright notice and disclaimer of warranty; keep intact all the
 92+notices that refer to this License and to the absence of any warranty;
 93+and give any other recipients of the Program a copy of this License
 94+along with the Program.
 95+
 96+You may charge a fee for the physical act of transferring a copy, and
 97+you may at your option offer warranty protection in exchange for a fee.
 98+
 99+ 2. You may modify your copy or copies of the Program or any portion
 100+of it, thus forming a work based on the Program, and copy and
 101+distribute such modifications or work under the terms of Section 1
 102+above, provided that you also meet all of these conditions:
 103+
 104+ a) You must cause the modified files to carry prominent notices
 105+ stating that you changed the files and the date of any change.
 106+
 107+ b) You must cause any work that you distribute or publish, that in
 108+ whole or in part contains or is derived from the Program or any
 109+ part thereof, to be licensed as a whole at no charge to all third
 110+ parties under the terms of this License.
 111+
 112+ c) If the modified program normally reads commands interactively
 113+ when run, you must cause it, when started running for such
 114+ interactive use in the most ordinary way, to print or display an
 115+ announcement including an appropriate copyright notice and a
 116+ notice that there is no warranty (or else, saying that you provide
 117+ a warranty) and that users may redistribute the program under
 118+ these conditions, and telling the user how to view a copy of this
 119+ License. (Exception: if the Program itself is interactive but
 120+ does not normally print such an announcement, your work based on
 121+ the Program is not required to print an announcement.)
 122+
 123+These requirements apply to the modified work as a whole. If
 124+identifiable sections of that work are not derived from the Program,
 125+and can be reasonably considered independent and separate works in
 126+themselves, then this License, and its terms, do not apply to those
 127+sections when you distribute them as separate works. But when you
 128+distribute the same sections as part of a whole which is a work based
 129+on the Program, the distribution of the whole must be on the terms of
 130+this License, whose permissions for other licensees extend to the
 131+entire whole, and thus to each and every part regardless of who wrote it.
 132+
 133+Thus, it is not the intent of this section to claim rights or contest
 134+your rights to work written entirely by you; rather, the intent is to
 135+exercise the right to control the distribution of derivative or
 136+collective works based on the Program.
 137+
 138+In addition, mere aggregation of another work not based on the Program
 139+with the Program (or with a work based on the Program) on a volume of
 140+a storage or distribution medium does not bring the other work under
 141+the scope of this License.
 142+
 143+ 3. You may copy and distribute the Program (or a work based on it,
 144+under Section 2) in object code or executable form under the terms of
 145+Sections 1 and 2 above provided that you also do one of the following:
 146+
 147+ a) Accompany it with the complete corresponding machine-readable
 148+ source code, which must be distributed under the terms of Sections
 149+ 1 and 2 above on a medium customarily used for software interchange; or,
 150+
 151+ b) Accompany it with a written offer, valid for at least three
 152+ years, to give any third party, for a charge no more than your
 153+ cost of physically performing source distribution, a complete
 154+ machine-readable copy of the corresponding source code, to be
 155+ distributed under the terms of Sections 1 and 2 above on a medium
 156+ customarily used for software interchange; or,
 157+
 158+ c) Accompany it with the information you received as to the offer
 159+ to distribute corresponding source code. (This alternative is
 160+ allowed only for noncommercial distribution and only if you
 161+ received the program in object code or executable form with such
 162+ an offer, in accord with Subsection b above.)
 163+
 164+The source code for a work means the preferred form of the work for
 165+making modifications to it. For an executable work, complete source
 166+code means all the source code for all modules it contains, plus any
 167+associated interface definition files, plus the scripts used to
 168+control compilation and installation of the executable. However, as a
 169+special exception, the source code distributed need not include
 170+anything that is normally distributed (in either source or binary
 171+form) with the major components (compiler, kernel, and so on) of the
 172+operating system on which the executable runs, unless that component
 173+itself accompanies the executable.
 174+
 175+If distribution of executable or object code is made by offering
 176+access to copy from a designated place, then offering equivalent
 177+access to copy the source code from the same place counts as
 178+distribution of the source code, even though third parties are not
 179+compelled to copy the source along with the object code.
 180+
 181+ 4. You may not copy, modify, sublicense, or distribute the Program
 182+except as expressly provided under this License. Any attempt
 183+otherwise to copy, modify, sublicense or distribute the Program is
 184+void, and will automatically terminate your rights under this License.
 185+However, parties who have received copies, or rights, from you under
 186+this License will not have their licenses terminated so long as such
 187+parties remain in full compliance.
 188+
 189+ 5. You are not required to accept this License, since you have not
 190+signed it. However, nothing else grants you permission to modify or
 191+distribute the Program or its derivative works. These actions are
 192+prohibited by law if you do not accept this License. Therefore, by
 193+modifying or distributing the Program (or any work based on the
 194+Program), you indicate your acceptance of this License to do so, and
 195+all its terms and conditions for copying, distributing or modifying
 196+the Program or works based on it.
 197+
 198+ 6. Each time you redistribute the Program (or any work based on the
 199+Program), the recipient automatically receives a license from the
 200+original licensor to copy, distribute or modify the Program subject to
 201+these terms and conditions. You may not impose any further
 202+restrictions on the recipients' exercise of the rights granted herein.
 203+You are not responsible for enforcing compliance by third parties to
 204+this License.
 205+
 206+ 7. If, as a consequence of a court judgment or allegation of patent
 207+infringement or for any other reason (not limited to patent issues),
 208+conditions are imposed on you (whether by court order, agreement or
 209+otherwise) that contradict the conditions of this License, they do not
 210+excuse you from the conditions of this License. If you cannot
 211+distribute so as to satisfy simultaneously your obligations under this
 212+License and any other pertinent obligations, then as a consequence you
 213+may not distribute the Program at all. For example, if a patent
 214+license would not permit royalty-free redistribution of the Program by
 215+all those who receive copies directly or indirectly through you, then
 216+the only way you could satisfy both it and this License would be to
 217+refrain entirely from distribution of the Program.
 218+
 219+If any portion of this section is held invalid or unenforceable under
 220+any particular circumstance, the balance of the section is intended to
 221+apply and the section as a whole is intended to apply in other
 222+circumstances.
 223+
 224+It is not the purpose of this section to induce you to infringe any
 225+patents or other property right claims or to contest validity of any
 226+such claims; this section has the sole purpose of protecting the
 227+integrity of the free software distribution system, which is
 228+implemented by public license practices. Many people have made
 229+generous contributions to the wide range of software distributed
 230+through that system in reliance on consistent application of that
 231+system; it is up to the author/donor to decide if he or she is willing
 232+to distribute software through any other system and a licensee cannot
 233+impose that choice.
 234+
 235+This section is intended to make thoroughly clear what is believed to
 236+be a consequence of the rest of this License.
 237+
 238+ 8. If the distribution and/or use of the Program is restricted in
 239+certain countries either by patents or by copyrighted interfaces, the
 240+original copyright holder who places the Program under this License
 241+may add an explicit geographical distribution limitation excluding
 242+those countries, so that distribution is permitted only in or among
 243+countries not thus excluded. In such case, this License incorporates
 244+the limitation as if written in the body of this License.
 245+
 246+ 9. The Free Software Foundation may publish revised and/or new versions
 247+of the General Public License from time to time. Such new versions will
 248+be similar in spirit to the present version, but may differ in detail to
 249+address new problems or concerns.
 250+
 251+Each version is given a distinguishing version number. If the Program
 252+specifies a version number of this License which applies to it and "any
 253+later version", you have the option of following the terms and conditions
 254+either of that version or of any later version published by the Free
 255+Software Foundation. If the Program does not specify a version number of
 256+this License, you may choose any version ever published by the Free Software
 257+Foundation.
 258+
 259+ 10. If you wish to incorporate parts of the Program into other free
 260+programs whose distribution conditions are different, write to the author
 261+to ask for permission. For software which is copyrighted by the Free
 262+Software Foundation, write to the Free Software Foundation; we sometimes
 263+make exceptions for this. Our decision will be guided by the two goals
 264+of preserving the free status of all derivatives of our free software and
 265+of promoting the sharing and reuse of software generally.
 266+
 267+ NO WARRANTY
 268+
 269+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
 270+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
 271+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
 272+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
 273+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 274+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
 275+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
 276+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
 277+REPAIR OR CORRECTION.
 278+
 279+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
 280+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
 281+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
 282+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
 283+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
 284+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
 285+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
 286+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
 287+POSSIBILITY OF SUCH DAMAGES.
 288+
 289+ END OF TERMS AND CONDITIONS
 290+
 291+ How to Apply These Terms to Your New Programs
 292+
 293+ If you develop a new program, and you want it to be of the greatest
 294+possible use to the public, the best way to achieve this is to make it
 295+free software which everyone can redistribute and change under these terms.
 296+
 297+ To do so, attach the following notices to the program. It is safest
 298+to attach them to the start of each source file to most effectively
 299+convey the exclusion of warranty; and each file should have at least
 300+the "copyright" line and a pointer to where the full notice is found.
 301+
 302+ <one line to give the program's name and a brief idea of what it does.>
 303+ Copyright (C) <year> <name of author>
 304+
 305+ This program is free software; you can redistribute it and/or modify
 306+ it under the terms of the GNU General Public License as published by
 307+ the Free Software Foundation; either version 2 of the License, or
 308+ (at your option) any later version.
 309+
 310+ This program is distributed in the hope that it will be useful,
 311+ but WITHOUT ANY WARRANTY; without even the implied warranty of
 312+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 313+ GNU General Public License for more details.
 314+
 315+ You should have received a copy of the GNU General Public License
 316+ along with this program; if not, write to the Free Software
 317+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 318+
 319+
 320+Also add information on how to contact you by electronic and paper mail.
 321+
 322+If the program is interactive, make it output a short notice like this
 323+when it starts in an interactive mode:
 324+
 325+ Gnomovision version 69, Copyright (C) year name of author
 326+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
 327+ This is free software, and you are welcome to redistribute it
 328+ under certain conditions; type `show c' for details.
 329+
 330+The hypothetical commands `show w' and `show c' should show the appropriate
 331+parts of the General Public License. Of course, the commands you use may
 332+be called something other than `show w' and `show c'; they could even be
 333+mouse-clicks or menu items--whatever suits your program.
 334+
 335+You should also get your employer (if you work as a programmer) or your
 336+school, if any, to sign a "copyright disclaimer" for the program, if
 337+necessary. Here is a sample; alter the names:
 338+
 339+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
 340+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
 341+
 342+ <signature of Ty Coon>, 1 April 1989
 343+ Ty Coon, President of Vice
 344+
 345+This General Public License does not permit incorporating your program into
 346+proprietary programs. If your program is a subroutine library, you may
 347+consider it more useful to permit linking proprietary applications with the
 348+library. If this is what you want to do, use the GNU Library General
 349+Public License instead of this License.
Index: tags/extensions/Validator/REL_0_3_4/Validator.i18n.php
@@ -0,0 +1,930 @@
 2+<?php
 3+
 4+/**
 5+ * Internationalization file for the Validator extension
 6+ *
 7+ * @file Validator.i18n.php
 8+ * @ingroup Validator
 9+ *
 10+ * @author Jeroen De Dauw
 11+*/
 12+
 13+$messages = array();
 14+
 15+/** English
 16+ * @author Jeroen De Dauw
 17+ */
 18+$messages['en'] = array(
 19+ 'validator-desc' => 'Provides generic parameter handling support to other extensions',
 20+
 21+ 'validator_error_parameters' => 'The following {{PLURAL:$1|error has|errors have}} been detected in your syntax:',
 22+ 'validator_warning_parameters' => 'There {{PLURAL:$1|is an error|are errors}} in your syntax.',
 23+
 24+ // General errors
 25+ 'validator_error_unknown_argument' => '$1 is not a valid parameter.',
 26+ 'validator_error_required_missing' => 'The required parameter $1 is not provided.',
 27+
 28+ // Criteria errors for single values
 29+ 'validator_error_empty_argument' => 'Parameter $1 can not have an empty value.',
 30+ 'validator_error_must_be_number' => 'Parameter $1 can only be a number.',
 31+ 'validator_error_must_be_integer' => 'Parameter $1 can only be an integer.',
 32+ 'validator_error_invalid_range' => 'Parameter $1 must be between $2 and $3.',
 33+ 'validator_error_invalid_argument' => 'The value $1 is not valid for parameter $2.',
 34+
 35+ // Criteria errors for lists
 36+ 'validator_list_error_empty_argument' => 'Parameter $1 does not accept empty values.',
 37+ 'validator_list_error_must_be_number' => 'Parameter $1 can only contain numbers.',
 38+ 'validator_list_error_must_be_integer' => 'Parameter $1 can only contain integers.',
 39+ 'validator_list_error_invalid_range' => 'All values of parameter $1 must be between $2 and $3.',
 40+ 'validator_list_error_invalid_argument' => 'One or more values for parameter $1 are invalid.',
 41+
 42+ 'validator_list_omitted' => 'The {{PLURAL:$2|value|values}} $1 {{PLURAL:$2|has|have}} been omitted.',
 43+
 44+ // Criteria errors for single values & lists
 45+ 'validator_error_accepts_only' => 'Parameter $1 only accepts {{PLURAL:$3|this value|these values}}: $2.',
 46+);
 47+
 48+/** Message documentation (Message documentation)
 49+ * @author Fryed-peach
 50+ * @author Purodha
 51+ */
 52+$messages['qqq'] = array(
 53+ 'validator-desc' => '{{desc}}',
 54+ 'validator_error_parameters' => 'Parameters:
 55+* $1 is the number of syntax errors, for PLURAL support (optional)',
 56+);
 57+
 58+/** Afrikaans (Afrikaans)
 59+ * @author Naudefj
 60+ */
 61+$messages['af'] = array(
 62+ 'validator-desc' => 'Die valideerder gee ander uitbreidings die vermoë om parameters van ontlederfunksies en etiket-uitbreidings te valideer, op hulle verstekwaardes in te stel en om foutboodskappe te genereer',
 63+ 'validator_error_parameters' => 'Die volgende {{PLURAL:$1|fout|foute}} is in u sintaks waargeneem:',
 64+ 'validator_error_unknown_argument' => "$1 is nie 'n geldige parameter nie.",
 65+ 'validator_error_required_missing' => 'Die verpligte parameter $1 is nie verskaf nie.',
 66+ 'validator_error_empty_argument' => 'Die parameter $1 mag nie leeg wees nie.',
 67+ 'validator_error_must_be_number' => "Die parameter $1 mag net 'n getal wees.",
 68+ 'validator_error_must_be_integer' => "Die parameter $1 kan slegs 'n heelgetal wees.",
 69+ 'validator_error_invalid_range' => 'Die parameter $1 moet tussen $2 en $3 lê.',
 70+ 'validator_error_invalid_argument' => 'Die waarde $1 is nie geldig vir parameter $2 nie.',
 71+ 'validator_error_accepts_only' => 'Die parameter $1 kan slegs die volgende {{PLURAL:$3|waarde|waardes}} hê: $2.',
 72+);
 73+
 74+/** Gheg Albanian (Gegë)
 75+ * @author Mdupont
 76+ */
 77+$messages['aln'] = array(
 78+ 'validator-desc' => 'Validator është një zgjerim MediaWiki që ofron parametër përgjithshme trajtimin mbështetje të shtesave të tjera',
 79+ 'validator_error_parameters' => 'Më poshtë {{PLURAL:$1|gabim ka gabime|kanë}} është zbuluar në sintaksën e juaj:',
 80+ 'validator_warning_parameters' => 'Ka {{PLURAL:$1|është|janë gabime gabim}} në sintaksë tuaj.',
 81+ 'validator_error_unknown_argument' => '$1 nuk është një parametër i vlefshëm.',
 82+ 'validator_error_required_missing' => 'Parametrat e nevojshëm $1 nuk jepet.',
 83+ 'validator_error_empty_argument' => 'Parametër $1 nuk mund të ketë një vlerë bosh.',
 84+ 'validator_error_must_be_number' => 'Parametër $1 mund të jetë vetëm një numër.',
 85+ 'validator_error_must_be_integer' => 'Parametër $1 mund të jetë vetëm një numër i plotë.',
 86+ 'validator_error_invalid_range' => 'Parametër $1 duhet të jetë në mes të $2 dhe $3.',
 87+ 'validator_error_invalid_argument' => 'Vlera $1 nuk është i vlefshëm për parametër $2.',
 88+ 'validator_list_error_empty_argument' => 'Parametër $1 nuk e pranon vlerat bosh.',
 89+ 'validator_list_error_must_be_number' => 'Parametër $1 mund të përmbajë vetëm numrat.',
 90+ 'validator_list_error_must_be_integer' => 'Parametër $1 mund të përmbajë vetëm numra të plotë.',
 91+ 'validator_list_error_invalid_range' => 'Të gjitha vlerat e parametrit $1 duhet të jetë në mes të $2 dhe $3.',
 92+ 'validator_list_error_invalid_argument' => 'Një ose më shumë vlera për parametër $1 janë të pavlefshme.',
 93+ 'validator_list_omitted' => '{{PLURAL:$2 |vlerë|vlerat}} $1 {{PLURAL:$2|ka|kanë}} janë lënë jashtë.',
 94+ 'validator_error_accepts_only' => 'Parametër $1 vetëm pranon {{PLURAL:$3|kjo vlerë|këtyre vlerave}}: $2.',
 95+);
 96+
 97+/** Arabic (العربية)
 98+ * @author Meno25
 99+ */
 100+$messages['ar'] = array(
 101+ 'validator-desc' => 'المحقق يوفر طريقة سهلة للامتدادات الأخرى للتحقق من محددات دوال المحلل وامتدادات الوسوم، وضبط القيم الافتراضية وتوليد رسائل الخطأ',
 102+ 'validator_error_parameters' => '{{PLURAL:$1|الخطأ التالي|الاخطاء التالية}} تم كشفها في صياغتك:',
 103+ 'validator_warning_parameters' => 'هناك {{PLURAL:$1|خطأ|أخطاء}} في صياغتك.',
 104+ 'validator_error_unknown_argument' => '$1 ليس محددا صحيحا.',
 105+ 'validator_error_required_missing' => 'المحدد المطلوب $1 ليس متوفرا.',
 106+ 'validator_error_empty_argument' => 'المحدد $1 لا يمكن أن تكون قيمته فارغة.',
 107+ 'validator_error_must_be_number' => 'المحدد $1 يمكن أن يكون فقط عددا.',
 108+ 'validator_error_must_be_integer' => 'المحدد $1 يمكن أن يكون عددا صحيحا فقط.',
 109+ 'validator_error_invalid_range' => 'المحدد $1 يجب أن يكون بين $2 و $3.',
 110+ 'validator_error_invalid_argument' => 'القيمة $1 ليست صحيحة للمحدد $2.',
 111+ 'validator_list_error_empty_argument' => 'المحدد $1 لا يقبل القيم الفارغة.',
 112+ 'validator_list_error_must_be_number' => 'المحدد $1 يمكن أن يحتوي فقط على أرقام.',
 113+ 'validator_list_error_must_be_integer' => 'المحدد $1 يمكن أن يحتوي فقط على أرقام صحيحة.',
 114+ 'validator_list_error_invalid_range' => 'كل قيم المحدد $1 يجب أن تكون بين $2 و$3.',
 115+ 'validator_list_error_invalid_argument' => 'قيمة واحدة أو أكثر للمحدد $1 غير صحيحة.',
 116+ 'validator_list_omitted' => '{{PLURAL:$2|القيمة|القيم}} $1 {{PLURAL:$2|تم|تم}} مسحها.',
 117+ 'validator_error_accepts_only' => 'المحدد $1 يقبل فقط {{PLURAL:$3|هذه القيمة|هذه القيم}}: $2.',
 118+);
 119+
 120+/** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца))
 121+ * @author EugeneZelenko
 122+ * @author Jim-by
 123+ */
 124+$messages['be-tarask'] = array(
 125+ 'validator-desc' => 'Правяраючы палягчае іншым пашырэньням працу па праверцы парамэтраў функцыяў парсэру і тэгаў пашырэньняў, устанаўлівае значэньні па змоўчваньні і стварае паведамленьні пра памылкі',
 126+ 'validator_error_parameters' => 'У сынтаксісе {{PLURAL:$1|выяўленая наступная памылка|выяўленыя наступныя памылкі}}:',
 127+ 'validator_warning_parameters' => 'У Вашы сынтаксісе {{PLURAL:$1|маецца памылка|маюцца памылкі}}.',
 128+ 'validator_error_unknown_argument' => 'Няслушны парамэтар $1.',
 129+ 'validator_error_required_missing' => 'Не пададзены абавязковы парамэтар $1.',
 130+ 'validator_error_empty_argument' => 'Парамэтар $1 ня можа мець пустое значэньне.',
 131+ 'validator_error_must_be_number' => 'Парамэтар $1 можа быць толькі лікам.',
 132+ 'validator_error_must_be_integer' => 'Парамэтар $1 можа быць толькі цэлым лікам.',
 133+ 'validator_error_invalid_range' => 'Парамэтар $1 павінен быць паміж $2 і $3.',
 134+ 'validator_error_invalid_argument' => 'Значэньне $1 не зьяўляецца слушным для парамэтру $2.',
 135+ 'validator_list_error_empty_argument' => 'Парамэтар $1 ня можа прымаць пустыя значэньні.',
 136+ 'validator_list_error_must_be_number' => 'Парамэтар $1 можа ўтрымліваць толькі лікі.',
 137+ 'validator_list_error_must_be_integer' => 'Парамэтар $1 можа ўтрымліваць толькі цэлыя лікі.',
 138+ 'validator_list_error_invalid_range' => 'Усе значэньні парамэтру $1 павінны знаходзіцца паміж $2 і $3.',
 139+ 'validator_list_error_invalid_argument' => 'Адно ці болей значэньняў парамэтру $1 зьяўляюцца няслушнымі.',
 140+ 'validator_list_omitted' => '{{PLURAL:$2|Значэньне|Значэньні}} $1 {{PLURAL:$2|было прапушчанае|былі прапушчаныя}}.',
 141+ 'validator_error_accepts_only' => 'Парамэтар $1 можа мець толькі {{PLURAL:$3|гэтае значэньне|гэтыя значэньні}}: $2.',
 142+);
 143+
 144+/** Bulgarian (Български)
 145+ * @author DCLXVI
 146+ * @author Reedy
 147+ */
 148+$messages['bg'] = array(
 149+ 'validator_error_empty_argument' => 'Параметърът $1 не може да има празна стойност.',
 150+);
 151+
 152+/** Breton (Brezhoneg)
 153+ * @author Fohanno
 154+ * @author Fulup
 155+ * @author Y-M D
 156+ */
 157+$messages['br'] = array(
 158+ 'validator-desc' => 'Un doare aes eo kadarnataer evit an astennoù all da gadarnaat arventennoù ar fonksionoù parser hag astennoù ar balizennoù, evit termeniñ talvoudennoù dre ziouer ha sevel kemennoù fazioù',
 159+ 'validator_error_parameters' => "Kavet eo bet ar {{PLURAL:$1|fazi|fazioù}} da-heul en hoc'h ereadur :",
 160+ 'validator_warning_parameters' => "{{PLURAL:$1|Ur fazi|Fazioù}} zo en hoc'h ereadur.",
 161+ 'validator_error_unknown_argument' => "$1 n'eo ket un arventenn reizh.",
 162+ 'validator_error_required_missing' => "N'eo ket bet pourchaset an arventenn rekis $1",
 163+ 'validator_error_empty_argument' => "N'hall ket an arventenn $1 bezañ goullo he zalvoudenn",
 164+ 'validator_error_must_be_number' => 'Un niver e rank an arventenn $1 bezañ hepken.',
 165+ 'validator_error_must_be_integer' => 'Rankout a ra an arventenn $1 bezañ un niver anterin.',
 166+ 'validator_error_invalid_range' => 'Rankout a ra an arventenn $1 bezañ etre $2 hag $3.',
 167+ 'validator_error_invalid_argument' => "N'eo ket reizh an dalvoudenn $1 evit an arventenn $2.",
 168+ 'validator_list_error_empty_argument' => 'Ne zegemer ket an arventenn $1 an talvoudennoù goullo.',
 169+ 'validator_list_error_must_be_number' => "N'hall bezañ nemet niveroù en arventenn $1.",
 170+ 'validator_list_error_must_be_integer' => "N'hall bezañ nemet niveroù anterin en arventenn $1.",
 171+ 'validator_list_error_invalid_range' => 'An holl talvoudennoù eus an arventenn $1 a rank bezañ etre $2 ha $3.',
 172+ 'validator_list_error_invalid_argument' => 'Faziek eo unan pe meur a dalvoudenn eus an arventenn $1.',
 173+ 'validator_list_omitted' => 'Disoñjet eo bet an {{PLURAL:$2|talvoudenn|talvoudennoù}} $1.',
 174+ 'validator_error_accepts_only' => 'An arventenn $1 ne zegemer nemet {{PLURAL:$3|an dalvoudenn|an talvoudennoù}}-mañ : $2.',
 175+);
 176+
 177+/** Bosnian (Bosanski)
 178+ * @author CERminator
 179+ */
 180+$messages['bs'] = array(
 181+ 'validator-desc' => 'Validator pruža jednostavni način za druga proširenja u svrhu validacije parametara parserskih funkcija i proširenja oznaka, postavlja pretpostavljene vrijednosti i generira poruke pogrešaka.',
 182+ 'validator_error_parameters' => 'U Vašoj sintaksi {{PLURAL:$1|je|su}} {{PLURAL:$1|otkivena slijedeća greška|otkrivene slijedeće greške}}:',
 183+ 'validator_warning_parameters' => '{{PLURAL:$1|Postoji greška|Postoje greške}} u Vašoj sintaksi.',
 184+ 'validator_error_unknown_argument' => '$1 nije valjan parametar.',
 185+ 'validator_error_required_missing' => 'Obavezni parametar $1 nije naveden.',
 186+ 'validator_error_empty_argument' => 'Parametar $1 ne može imati praznu vrijednost.',
 187+ 'validator_error_must_be_number' => 'Parametar $1 može biti samo broj.',
 188+ 'validator_error_must_be_integer' => 'Parametar $1 može biti samo cijeli broj.',
 189+ 'validator_error_invalid_range' => 'Parametar $1 mora biti između $2 i $3.',
 190+ 'validator_error_invalid_argument' => 'Vrijednost $1 nije valjana za parametar $2.',
 191+ 'validator_list_error_empty_argument' => 'Parametar $1 ne prima prazne vrijednosti.',
 192+ 'validator_list_error_must_be_number' => 'Parametar $1 može sadržavati samo brojeve.',
 193+ 'validator_error_accepts_only' => 'Parametar $1 se može koristiti samo sa {{PLURAL:$3|ovom vrijednosti|ovim vrijednostima}}: $2.',
 194+);
 195+
 196+/** Czech (Česky)
 197+ * @author Matěj Grabovský
 198+ * @author Mormegil
 199+ * @author Reaperman
 200+ */
 201+$messages['cs'] = array(
 202+ 'validator-desc' => 'Validátor poskytuje ostatním rozšířením snadnější způsob ověřování parametrů funkcí parseru a značek, nastavování výchozích hodnot a vytváření chybových zpráv.',
 203+ 'validator_error_parameters' => 'Ve vaší syntaxi {{PLURAL:$1|byla nalezena následující chyba|byly nalezeny následující chyby}}:',
 204+ 'validator_warning_parameters' => 'Ve vaší syntaxi {{PLURAL:$1|je chyba|jsou chyby}}.',
 205+ 'validator_error_unknown_argument' => '$1 není platný parametr.',
 206+ 'validator_error_required_missing' => 'Povinný parameter $1 nebyl specifikován.',
 207+ 'validator_error_empty_argument' => 'Parametr $1 nemůže být prázdný.',
 208+ 'validator_error_must_be_number' => 'Parametr $1 může být pouze číslo.',
 209+ 'validator_error_must_be_integer' => 'Parametr $1 může být pouze celé číslo.',
 210+ 'validator_error_invalid_range' => 'Parametr $1 musí být v rozmezí $2 až $3.',
 211+ 'validator_error_invalid_argument' => '$1 není platná hodnota pro parametr $2.',
 212+ 'validator_list_error_empty_argument' => 'Parametr $1 npeřijímá prázdné hoodnoty.',
 213+ 'validator_list_error_must_be_number' => 'Parametr $1 může obsahovat pouze čísla.',
 214+ 'validator_list_error_must_be_integer' => 'Paramter $1 může obsahovat pouze celá čísla.',
 215+ 'validator_list_error_invalid_range' => 'Všechny hodnoty parametru $1 musí být v rozmezí $2 až $3.',
 216+ 'validator_list_error_invalid_argument' => 'Jedna nebo více hodnot parametru $1 jsou neplatné.',
 217+ 'validator_list_omitted' => '{{PLURAL:$2|Hodnota $1 byla vynechána|Hodnoty $1 byly vynechány}}.',
 218+ 'validator_error_accepts_only' => 'Parametr $1 přijímá pouze {{PLURAL:$3|tuto hodnotu|tyto hodnoty}}: $2.',
 219+);
 220+
 221+/** German (Deutsch)
 222+ * @author DaSch
 223+ * @author Imre
 224+ * @author Kghbln
 225+ * @author LWChris
 226+ */
 227+$messages['de'] = array(
 228+ 'validator-desc' => 'Validierer stellt anderen Erweiterungen die Funktion bereit, auf einfache Weise Parameter von Parserfunktionen und Tag-Erweiterungen zu verifizieren, Standardwerte festzulegen sowie Fehlermeldungen zu erstellen.',
 229+ 'validator_error_parameters' => '{{PLURAL:$1|Der folgende Fehler wurde|Die folgenden Fehler wurden}} in deiner Syntax gefunden:',
 230+ 'validator_warning_parameters' => '{{PLURAL:$1|Es ist ein Fehler|Es sind Fehler}} in deiner Syntax.',
 231+ 'validator_error_unknown_argument' => '$1 ist kein gültiger Parameter.',
 232+ 'validator_error_required_missing' => 'Der notwendige Parameter $1 wurde nicht angegeben.',
 233+ 'validator_error_empty_argument' => 'Parameter $1 kann keinen leeren Wert haben.',
 234+ 'validator_error_must_be_number' => 'Parameter $1 kann nur eine Nummer sein.',
 235+ 'validator_error_must_be_integer' => 'Parameter $1 kann nur eine ganze Zahl sein.',
 236+ 'validator_error_invalid_range' => 'Parameter $1 muss zwischen $2 und $3 liegen.',
 237+ 'validator_error_invalid_argument' => 'Der Wert $1 ist nicht gültig für Parameter $2.',
 238+ 'validator_list_error_empty_argument' => 'Parameter $1 akzeptiert keine leeren Werte.',
 239+ 'validator_list_error_must_be_number' => 'Parameter $1 kann nur Nummern enthalten.',
 240+ 'validator_list_error_must_be_integer' => 'Parameter $1 kann nur ganze Zahlen enthalten.',
 241+ 'validator_list_error_invalid_range' => 'Alle Werte von Parameter $1 müssen zwischen $2 und $3 liegen.',
 242+ 'validator_list_error_invalid_argument' => 'Einer oder mehrere Werte für Parameter $1 sind ungültig.',
 243+ 'validator_list_omitted' => '{{PLURAL:$2|Der Wert|Die Werte}} $1 {{PLURAL:$2|wurde|wurden}} ausgelassen.',
 244+ 'validator_error_accepts_only' => 'Parameter $1 akzeptiert nur {{PLURAL:$3|folgenden Wert|folgende Werte}}: $2.',
 245+);
 246+
 247+/** German (formal address) (Deutsch (Sie-Form))
 248+ * @author Imre
 249+ */
 250+$messages['de-formal'] = array(
 251+ 'validator_error_parameters' => '{{PLURAL:$1|Der folgende Fehler wurde|Die folgenden Fehler wurden}} in Ihrer Syntax gefunden:',
 252+ 'validator_warning_parameters' => '{{PLURAL:$1|Es ist ein Fehler|Es sind Fehler}} in Ihrer Syntax.',
 253+);
 254+
 255+/** Lower Sorbian (Dolnoserbski)
 256+ * @author Michawiki
 257+ */
 258+$messages['dsb'] = array(
 259+ 'validator-desc' => 'Validator stoj lažki nałog za druge rozšyrjenja k dispoziciji, aby se pśekontrolěrowali parametry parserowych funkcijow a toflickich rozšyrjenjow, nastajili standardne gódnoty a napórali zmólkowe powěsći',
 260+ 'validator_error_parameters' => '{{PLURAL:$1|Slědujuca zmólka jo se namakała|Slědujucej zmólce stej se namakałej|Slědujuce zmólki su se namakali|Slědujuce zmólki su se namakali}} w twójej syntaksy:',
 261+ 'validator_warning_parameters' => '{{PLURAL:$1|Jo zmólka|Stej zmólce|Su zmólki|Su zmólki}} w twójej syntaksy.',
 262+ 'validator_error_unknown_argument' => '$1 njejo płaśiwy parameter.',
 263+ 'validator_error_required_missing' => 'Trěbny parameter $1 njejo pódany.',
 264+ 'validator_error_empty_argument' => 'Parameter $1 njamóžo proznu gódnotu měś.',
 265+ 'validator_error_must_be_number' => 'Parameter $1 móžo jano licba byś.',
 266+ 'validator_error_must_be_integer' => 'Parameter $1 móžo jano ceła licba byś.',
 267+ 'validator_error_invalid_range' => 'Parameter $1 musy mjazy $2 a $3 byś.',
 268+ 'validator_error_invalid_argument' => 'Gódnota $1 njejo płaśiwa za parameter $2.',
 269+ 'validator_list_error_empty_argument' => 'Parameter $1 njeakceptěrujo prozne gódnoty.',
 270+ 'validator_list_error_must_be_number' => 'Parameter $1 móžo jano licby wopśimjeś.',
 271+ 'validator_list_error_must_be_integer' => 'Parameter $1 móžo jano cełe licby wopśimjeś.',
 272+ 'validator_list_error_invalid_range' => 'Wšykne gódnoty parametra $1 muse mjazy $2 a $3 byś.',
 273+ 'validator_list_error_invalid_argument' => 'Jadna gódnota abo wěcej gódnotow za parameter $1 su njepłaśiwe.',
 274+ 'validator_list_omitted' => '{{PLURAL:$2|Gódnota|Gódnośe|Gódnoty|Gódnoty}} $1 {{PLURAL:$2|jo se wuwóstajiła|stej se wuwóstajiłej|su se wuwóstajili|su se wuwostajili}}.',
 275+ 'validator_error_accepts_only' => 'Parameter $1 akceptěrujo jano {{PLURAL:$3|toś tu gódnotu|toś tej gódnośe|toś te gódnoty|toś te gódnoty}}: $2.',
 276+);
 277+
 278+/** Greek (Ελληνικά)
 279+ * @author Dada
 280+ * @author Lou
 281+ * @author ZaDiak
 282+ * @author Απεργός
 283+ */
 284+$messages['el'] = array(
 285+ 'validator_error_unknown_argument' => '$1 δεν είναι μια έγκυρη παράμετρος.',
 286+ 'validator_error_required_missing' => 'Λείπει η απαιτούμενη παράμετρος $1.',
 287+ 'validator_error_must_be_number' => 'Η παράμετρος $1 μπορεί να είναι μόνο αριθμός.',
 288+ 'validator_error_must_be_integer' => 'Η παράμετρος $1 μπορεί να είναι μόνο ακέραιος αριθμός.',
 289+ 'validator_list_error_must_be_number' => 'Η παράμετρος $1 μπορεί να περιέχει μόνο αριθμούς.',
 290+ 'validator_list_error_must_be_integer' => 'Η παράμετρος $1 μπορεί να περιέχει μόνο ακέραιους αριθμούς.',
 291+ 'validator_list_error_invalid_range' => 'Όλες οι τιμές της παραμέτρου $1 πρέπει να είναι μεταξύ $2 και $3.',
 292+);
 293+
 294+/** Esperanto (Esperanto)
 295+ * @author Yekrats
 296+ */
 297+$messages['eo'] = array(
 298+ 'validator_error_unknown_argument' => '$1 ne estas valida parametro.',
 299+ 'validator_error_required_missing' => 'La nepra parametro $1 mankas.',
 300+ 'validator_error_empty_argument' => 'Parametro $1 ne povas esti nula valoro.',
 301+ 'validator_error_must_be_number' => 'Parametro $1 nur povas esti numero.',
 302+ 'validator_error_must_be_integer' => 'Parametro $1 nur povas esti entjero.',
 303+ 'validator_error_invalid_range' => 'Parametro $1 estu inter $2 kaj $3.',
 304+ 'validator_list_error_invalid_argument' => 'Unu aŭ pliaj valoroj por parametro $1 estas malvalida.',
 305+);
 306+
 307+/** Spanish (Español)
 308+ * @author Crazymadlover
 309+ * @author Imre
 310+ * @author Translationista
 311+ */
 312+$messages['es'] = array(
 313+ 'validator-desc' => 'FUZZY!!! El validador es una herramienta para que otras funciones validen fácilmente parámetros de funciones de análisis y extensiones de etiquetas, establecer valores predeterminados y generar mensajes de error',
 314+ 'validator_error_parameters' => 'Se detectó {{PLURAL:$1|el siguiente error|los siguientes errores}} en la sintaxis empleada:',
 315+ 'validator_warning_parameters' => 'Hay {{PLURAL:$1|un error|errores}} en tu sintaxis.',
 316+ 'validator_error_unknown_argument' => '$1 no es un parámetro válido.',
 317+ 'validator_error_required_missing' => 'No se ha provisto el parámetro requerido $1.',
 318+ 'validator_error_empty_argument' => 'El parámetro $1 no puede tener un valor vacío.',
 319+ 'validator_error_must_be_number' => 'El parámetro $1 sólo puede ser un número.',
 320+ 'validator_error_must_be_integer' => 'El parámetro $1 sólo puede ser un número entero.',
 321+ 'validator_error_invalid_range' => 'El parámetro $1 debe ser entre $2 y $3.',
 322+ 'validator_error_invalid_argument' => 'El valor $1 no es válido para el parámetro $2.',
 323+ 'validator_list_error_empty_argument' => 'El parámetro $1 no acepta valores vacíos.',
 324+ 'validator_list_error_must_be_number' => 'El parámetro $1 sólo puede contener números.',
 325+ 'validator_list_error_must_be_integer' => 'El parámetro $1 sólo puede contener números enteros.',
 326+ 'validator_list_error_invalid_range' => 'Todos los valores del parámetro $1 deben ser entre $2 y $3.',
 327+ 'validator_list_error_invalid_argument' => 'Uno o más valores del parámetros $1 son inválidos.',
 328+ 'validator_list_omitted' => '{{PLURAL:$2|El valor|Los valores}} $1 {{PLURAL:$2|ha sido omitido|han sido omitidos}}.',
 329+ 'validator_error_accepts_only' => 'El parámetro $1 sólo acepta {{PLURAL:$3|este valor|estos valores}}: $2.',
 330+);
 331+
 332+/** Finnish (Suomi)
 333+ * @author Crt
 334+ * @author Silvonen
 335+ * @author Str4nd
 336+ */
 337+$messages['fi'] = array(
 338+ 'validator-desc' => 'Tarkastaja tarjoaa helpon tavan muille laajennuksille jäsenninfunktioiden ja tagilaajennusten parametrien tarkastukseen, oletusarvojen asettamiseen ja virheilmoitusten luomiseen.',
 339+ 'validator_error_must_be_number' => 'Parametrin $1 on oltava luku.',
 340+ 'validator_error_must_be_integer' => 'Parametrin $1 on oltava kokonaisluku.',
 341+);
 342+
 343+/** French (Français)
 344+ * @author Cedric31
 345+ * @author Crochet.david
 346+ * @author IAlex
 347+ * @author Jean-Frédéric
 348+ * @author McDutchie
 349+ * @author Peter17
 350+ * @author PieRRoMaN
 351+ * @author Urhixidur
 352+ * @author Verdy p
 353+ */
 354+$messages['fr'] = array(
 355+ 'validator-desc' => 'Le validateur fournit aux autres extensions un moyen simple de valider les paramètres des fonctions parseur et des extensions de balises, de définir des valeurs par défaut et de générer des messages d’erreur',
 356+ 'validator_error_parameters' => '{{PLURAL:$1|L’erreur suivante a été détectée|Les erreurs suivantes ont été détectées}} dans votre syntaxe :',
 357+ 'validator_warning_parameters' => 'Il y a {{PLURAL:$1|une erreur|des erreurs}} dans votre syntaxe.',
 358+ 'validator_error_unknown_argument' => '$1 n’est pas un paramètre valide.',
 359+ 'validator_error_required_missing' => 'Le paramètre requis $1 n’est pas fourni.',
 360+ 'validator_error_empty_argument' => 'Le paramètre $1 ne peut pas avoir une valeur vide.',
 361+ 'validator_error_must_be_number' => 'Le paramètre $1 peut être uniquement un nombre.',
 362+ 'validator_error_must_be_integer' => 'Le paramètre $1 peut seulement être un entier.',
 363+ 'validator_error_invalid_range' => 'Le paramètre $1 doit être entre $2 et $3.',
 364+ 'validator_error_invalid_argument' => 'La valeur $1 n’est pas valide pour le paramètre $2.',
 365+ 'validator_list_error_empty_argument' => 'Le paramètre $1 n’accepte pas les valeurs vides.',
 366+ 'validator_list_error_must_be_number' => 'Le paramètre $1 ne peut contenir que des nombres.',
 367+ 'validator_list_error_must_be_integer' => 'Le paramètre $1 ne peut contenir que des entiers.',
 368+ 'validator_list_error_invalid_range' => 'Toutes les valeurs du paramètre $1 doivent être comprises entre $2 et $3.',
 369+ 'validator_list_error_invalid_argument' => 'Une ou plusieurs valeurs du paramètre $1 sont invalides.',
 370+ 'validator_list_omitted' => '{{PLURAL:$2|La valeur|Les valeurs}} $1 {{PLURAL:$2|a été oubliée|ont été oubliées}}.',
 371+ 'validator_error_accepts_only' => 'Le paramètre $1 accepte uniquement {{PLURAL:$3|cette valeur|ces valeurs}} : $2.',
 372+);
 373+
 374+/** Galician (Galego)
 375+ * @author Toliño
 376+ */
 377+$messages['gl'] = array(
 378+ 'validator-desc' => 'O servizo de validación ofrece un medio sinxelo a outras extensións para validar os parámetros de funcións analíticas e etiquetas de extensións, para establecer os valores por defecto e para xerar mensaxes de erro',
 379+ 'validator_error_parameters' => '{{PLURAL:$1|Detectouse o seguinte erro|Detectáronse os seguintes erros}} na sintaxe empregada:',
 380+ 'validator_warning_parameters' => 'Hai {{PLURAL:$1|un erro|erros}} na súa sintaxe.',
 381+ 'validator_error_unknown_argument' => '"$1" non é un parámetro válido.',
 382+ 'validator_error_required_missing' => 'Non se proporcionou o parámetro $1 necesario.',
 383+ 'validator_error_empty_argument' => 'O parámetro $1 non pode ter un valor baleiro.',
 384+ 'validator_error_must_be_number' => 'O parámetro $1 só pode ser un número.',
 385+ 'validator_error_must_be_integer' => 'O parámetro $1 só pode ser un número enteiro.',
 386+ 'validator_error_invalid_range' => 'O parámetro $1 debe estar entre $2 e $3.',
 387+ 'validator_error_invalid_argument' => 'O valor $1 non é válido para o parámetro $2.',
 388+ 'validator_list_error_empty_argument' => 'O parámetro $1 non acepta valores en branco.',
 389+ 'validator_list_error_must_be_number' => 'O parámetro $1 só pode conter números.',
 390+ 'validator_list_error_must_be_integer' => 'O parámetro $1 só pode conter números enteiros.',
 391+ 'validator_list_error_invalid_range' => 'Todos os valores do parámetro $1 deben estar comprendidos entre $2 e $3.',
 392+ 'validator_list_error_invalid_argument' => 'Un ou varios valores do parámetro $1 non son válidos.',
 393+ 'validator_list_omitted' => '{{PLURAL:$2|O valor|Os valores}} $1 {{PLURAL:$2|foi omitido|foron omitidos}}.',
 394+ 'validator_error_accepts_only' => 'O parámetro "$1" só acepta {{PLURAL:$3|este valor|estes valores}}: $2.',
 395+);
 396+
 397+/** Swiss German (Alemannisch)
 398+ * @author Als-Holder
 399+ */
 400+$messages['gsw'] = array(
 401+ 'validator-desc' => 'Validator stellt e eifachi Form z Verfiegig fir anderi Erwyterige go Parameter validiere vu Parser- un Tag-Funktione, go Standardwärt definiere un Fählermäldige generiere',
 402+ 'validator_error_parameters' => '{{PLURAL:$1|Dää Fähler isch|Die Fähler sin}} in Dyyre Syntax gfunde wore:',
 403+ 'validator_warning_parameters' => 'S het {{PLURAL:$1|e Fähler|Fähler}} in dyyre Syntax.',
 404+ 'validator_error_unknown_argument' => '$1 isch kei giltige Parameter.',
 405+ 'validator_error_required_missing' => 'Dr Paramter $1, wu aagforderet woren isch, wird nit z Verfiegig gstellt.',
 406+ 'validator_error_empty_argument' => 'Dr Parameter $1 cha kei lääre Wärt haa.',
 407+ 'validator_error_must_be_number' => 'Dr Parameter $1 cha nume ne Zahl syy.',
 408+ 'validator_error_must_be_integer' => 'Parameter $1 cha nume ne giltigi Zahl syy.',
 409+ 'validator_error_invalid_range' => 'Dr Parameter $1 muess zwische $2 un $3 syy.',
 410+ 'validator_error_invalid_argument' => 'Dr Wärt $1 isch nit giltig fir dr Parameter $2.',
 411+ 'validator_list_error_empty_argument' => 'Bim Parameter $1 sin keini lääre Wärt zuegloo.',
 412+ 'validator_list_error_must_be_number' => 'Fir dr Parameter $1 si nume Zahle zuegloo.',
 413+ 'validator_list_error_must_be_integer' => 'Fir dr Parameter $1 sin nume ganzi Zahle zuegloo.',
 414+ 'validator_list_error_invalid_range' => 'Alli Wärt fir dr Parameter $1 mien zwische $2 un $3 lige.',
 415+ 'validator_list_error_invalid_argument' => 'Ein oder mehreri Wärt fir dr Parameter $1 sin nit giltig.',
 416+ 'validator_list_omitted' => '{{PLURAL:$2|Dr Wärt|D Wärt}} $1 {{PLURAL:$2|isch|sin}} uusgloo wore.',
 417+ 'validator_error_accepts_only' => 'Dr Parameter $1 cha nume {{PLURAL:$3|dää Wärt|die Wärt}} haa: $2.',
 418+);
 419+
 420+/** Hebrew (עברית)
 421+ * @author YaronSh
 422+ */
 423+$messages['he'] = array(
 424+ 'validator_warning_parameters' => 'ישנ{PLURAL:$1|ה שגיאה|ן שגיאות}} בתחביר שלכם.',
 425+ 'validator_error_unknown_argument' => '$1 אינו פרמטר תקני.',
 426+ 'validator_error_required_missing' => 'הפרמטר הדרוש $1 לא צוין.',
 427+ 'validator_error_empty_argument' => 'הפרמטר $1 לא יכול להיות ערך ריק.',
 428+ 'validator_error_must_be_number' => 'הפרמטר $1 יכול להיות מספר בלבד.',
 429+ 'validator_error_must_be_integer' => 'הפרמטר $1 יכול להיות מספר שלם בלבד.',
 430+ 'validator_error_invalid_range' => 'הפרמטר $1 חייב להיות בין $2 ל־$3.',
 431+ 'validator_error_invalid_argument' => 'הערך $1 אינו תקני עבור הפרמטר $2.',
 432+);
 433+
 434+/** Upper Sorbian (Hornjoserbsce)
 435+ * @author Michawiki
 436+ */
 437+$messages['hsb'] = array(
 438+ 'validator-desc' => 'Validator skići lochke wašnje za druhe rozšěrjenja, zo bychu so parametry parserowych funkcijow a tafličkowych rozšěrjenjow přepruwowali, standardne hódnoty nastajili a zmylkowe powěsće wutworili',
 439+ 'validator_error_parameters' => '{{PLURAL:$1|Slědowacy zmylk bu|Slědowacej zmylkaj buštej|Slědowace zmylki buchu|Slědowace zmylki buchu}} w twojej syntaksy {{PLURAL:$1|wotkryty|wotkrytej|wotkryte|wotkryte}}:',
 440+ 'validator_warning_parameters' => '{{PLURAL:$1|Je zmylk|Stej zmylkaj|Su zmylki|Su zmylki}} w twojej syntaksy.',
 441+ 'validator_error_unknown_argument' => '$1 płaćiwy parameter njeje.',
 442+ 'validator_error_required_missing' => 'Trěbny parameter $1 njeje podaty.',
 443+ 'validator_error_empty_argument' => 'Parameter $1 njemóže prózdnu hódnotu měć.',
 444+ 'validator_error_must_be_number' => 'Parameter $1 móže jenož ličba być.',
 445+ 'validator_error_must_be_integer' => 'Parameter $1 móže jenož cyła ličba być.',
 446+ 'validator_error_invalid_range' => 'Parameter $1 dyrbi mjez $2 a $3 być.',
 447+ 'validator_error_invalid_argument' => 'Hódnota $1 njeje płaćiwa za parameter $2.',
 448+ 'validator_list_error_empty_argument' => 'Parameter $1 njeakceptuje prózdne hódnoty.',
 449+ 'validator_list_error_must_be_number' => 'Parameter $1 móže jenož ličby wobsahować.',
 450+ 'validator_list_error_must_be_integer' => 'Parameter $1 móže jenož cyłe ličby wobsahować.',
 451+ 'validator_list_error_invalid_range' => 'Wšě hódnoty parametra $1 dyrbja mjez $2 a $3 być.',
 452+ 'validator_list_error_invalid_argument' => 'Jedna hódnota abo wjace hódnotow za parameter $1 su njepłaćiwe.',
 453+ 'validator_list_omitted' => '{{PLURAL:$2|Hódnota|Hódnoće|Hódnoty|Hódnoty}} $1 {{PLURAL:$2|je so wuwostajiła|stej so wuwostajiłoj|su so wuwostajili|su so wuwostajili}}.',
 454+ 'validator_error_accepts_only' => 'Parameter $1 akceptuje jenož {{PLURAL:$3|tutu hódnotu|tutej hódnoće|tute hódnoty|tute hódnoty}}: $2.',
 455+);
 456+
 457+/** Hungarian (Magyar)
 458+ * @author Dani
 459+ * @author Glanthor Reviol
 460+ */
 461+$messages['hu'] = array(
 462+ 'validator-desc' => 'Az érvényesség-ellenőrző egyszerű lehetőséget nyújt más kiterjesztéseknek az elemzőfüggvények és tagek paramétereinek ellenőrzésére, alapértelmezett értékek beállítására, valamint hibaüzenetek generálására.',
 463+ 'validator_error_parameters' => 'A következő {{PLURAL:$1|hiba található|hibák találhatóak}} a szintaxisban:',
 464+ 'validator_warning_parameters' => '{{PLURAL:$1|Hiba van|Hibák vannak}} a szintaxisodban.',
 465+ 'validator_error_unknown_argument' => 'A(z) $1 nem érvényes paraméter.',
 466+ 'validator_error_required_missing' => 'A(z) $1 kötelező paraméter nem lett megadva.',
 467+ 'validator_error_empty_argument' => 'A(z) $1 paraméter értéke nem lehet üres.',
 468+ 'validator_error_must_be_number' => 'A(z) $1 paraméter csak szám lehet.',
 469+ 'validator_error_must_be_integer' => 'A(z) $1 paraméter csak egész szám lehet.',
 470+ 'validator_error_invalid_range' => 'A(z) $1 paraméter értékének $2 és $3 között kell lennie.',
 471+ 'validator_error_invalid_argument' => 'A(z) $1 érték nem érvényes a(z) $2 paraméterhez.',
 472+ 'validator_list_error_empty_argument' => 'A(z) $1 paraméter nem fogad el üres értékeket.',
 473+ 'validator_list_error_must_be_number' => 'A(z) $1 paraméter csak számokat tartalmazhat.',
 474+ 'validator_list_error_must_be_integer' => 'A(z) $1 paraméter csak egész számokat tartalmazhat.',
 475+ 'validator_list_error_invalid_range' => 'A(z) $1 paraméter összes értékének $2 és $3 közöttinek kell lennie.',
 476+ 'validator_list_error_invalid_argument' => 'A(z) $1 paraméter egy vagy több értéke érvénytelen.',
 477+ 'validator_list_omitted' => 'A(z) $1 {{PLURAL:$2|érték mellőzve lett.|értékek mellőzve lettek.}}',
 478+ 'validator_error_accepts_only' => 'A(z) $1 paraméter csak a következő {{PLURAL:$3|értéket|értékeket}} fogadja el: $2',
 479+);
 480+
 481+/** Interlingua (Interlingua)
 482+ * @author McDutchie
 483+ */
 484+$messages['ia'] = array(
 485+ 'validator-desc' => 'Validator provide un modo facile a altere extensiones de validar parametros de functiones del analysator syntactic e extensiones de etiquettas, predefinir valores e generar messages de error',
 486+ 'validator_error_parameters' => 'Le sequente {{PLURAL:$1|error|errores}} ha essite detegite in tu syntaxe:',
 487+ 'validator_warning_parameters' => 'Il ha {{PLURAL:$1|un error|errores}} in tu syntaxe.',
 488+ 'validator_error_unknown_argument' => '$1 non es un parametro valide.',
 489+ 'validator_error_required_missing' => 'Le parametro requisite $1 non ha essite fornite.',
 490+ 'validator_error_empty_argument' => 'Le parametro $1 non pote haber un valor vacue.',
 491+ 'validator_error_must_be_number' => 'Le parametro $1 pote solmente esser un numero.',
 492+ 'validator_error_must_be_integer' => 'Le parametro $1 pote solmente esser un numero integre.',
 493+ 'validator_error_invalid_range' => 'Le parametro $1 debe esser inter $2 e $3.',
 494+ 'validator_error_invalid_argument' => 'Le valor $1 non es valide pro le parametro $2.',
 495+ 'validator_list_error_empty_argument' => 'Le parametro $1 non accepta valores vacue.',
 496+ 'validator_list_error_must_be_number' => 'Le parametro $1 pote solmente continer numeros.',
 497+ 'validator_list_error_must_be_integer' => 'Le parametro $1 pote solmente continer numeros integre.',
 498+ 'validator_list_error_invalid_range' => 'Tote le valores del parametro $1 debe esser inter $2 e $3.',
 499+ 'validator_list_error_invalid_argument' => 'Un o plus valores pro le parametro $1 es invalide.',
 500+ 'validator_list_omitted' => 'Le {{PLURAL:$2|valor|valores}} $1 ha essite omittite.',
 501+ 'validator_error_accepts_only' => 'Le parametro $1 accepta solmente iste {{PLURAL:$3|valor|valores}}: $2.',
 502+);
 503+
 504+/** Indonesian (Bahasa Indonesia)
 505+ * @author Bennylin
 506+ * @author Farras
 507+ * @author Irwangatot
 508+ * @author IvanLanin
 509+ */
 510+$messages['id'] = array(
 511+ 'validator-desc' => 'Validator memberikan cara mudah untuk ekstensi lain untuk memvalidasi parameter ParserFunction dan ekstensi tag, mengatur nilai biasa dan membuat pesan kesalahan',
 512+ 'validator_error_parameters' => '{{PLURAL:$1|Kesalahan|Kesalahan}} berikut telah terdeteksi pada sintaksis Anda:',
 513+ 'validator_warning_parameters' => '{{PLURAL:$1|kesalahan|kesalahan}} ini pada sintaks anda.',
 514+ 'validator_error_unknown_argument' => '$1 bukan parameter yang benar.',
 515+ 'validator_error_required_missing' => 'Parameter $1 yang diperlukan tidak diberikan.',
 516+ 'validator_error_empty_argument' => 'Parameter $1 tidak dapat bernilai kosong.',
 517+ 'validator_error_must_be_number' => 'Parameter $1 hanya dapat berupa angka.',
 518+ 'validator_error_must_be_integer' => 'Parameter $1 hanya dapat berupa integer.',
 519+ 'validator_error_invalid_range' => 'Parameter $1 harus antara $2 dan $3.',
 520+ 'validator_error_invalid_argument' => 'Nilai $1 tidak valid untuk parameter $2.',
 521+ 'validator_error_accepts_only' => 'Parameter $1 hanya menerima {{PLURAL:$3|nilai ini|nilai ini}}: $2.',
 522+);
 523+
 524+/** Italian (Italiano)
 525+ * @author Civvì
 526+ * @author HalphaZ
 527+ */
 528+$messages['it'] = array(
 529+ 'validator-desc' => 'Validator fornisce ad altre estensiono un modo semplice per la convalida dei parametri delle funzioni parser e dei tag introdotti, per impostare i valori di default e per generare messaggi di errore.',
 530+ 'validator_error_parameters' => 'Nella tua sintassi {{PLURAL:$1|è stato individuato il seguente errore|sono stati individuati i seguenti errori}}:',
 531+ 'validator_warning_parameters' => "Nella tua sintassi {{PLURAL:$1|c'è un errore|ci sono errori}}.",
 532+ 'validator_error_unknown_argument' => '$1 non è un parametro valido.',
 533+ 'validator_error_required_missing' => 'Il parametro richiesto $1 non è stato fornito.',
 534+ 'validator_error_empty_argument' => 'Il parametro $1 non può avere un valore vuoto.',
 535+ 'validator_error_must_be_number' => 'Il parametro $1 può essere solo un numero.',
 536+ 'validator_error_must_be_integer' => 'Il parametro $1 può essere solo un intero.',
 537+ 'validator_error_invalid_range' => 'Il parametro $1 deve essere compreso tra $2 e $3.',
 538+ 'validator_error_invalid_argument' => 'Il valore $1 non è valido per il parametro $2.',
 539+ 'validator_list_error_empty_argument' => 'Il parametro $1 non accetta valori vuoti.',
 540+ 'validator_list_error_must_be_number' => 'Il parametro $1 può contenere solo numeri.',
 541+ 'validator_list_error_must_be_integer' => 'Il parametro $1 può contenere solo numeri interi.',
 542+ 'validator_list_error_invalid_range' => 'Tutti i valori del parametro $1 devono essere compresi tra $2 e $3.',
 543+ 'validator_list_error_invalid_argument' => 'Uno o più valori del parametro $1 non sono validi.',
 544+ 'validator_list_omitted' => '{{PLURAL:$2|Il valore|I valori}} $1 {{PLURAL:$2|è stato omesso|sono stati omessi}}.',
 545+ 'validator_error_accepts_only' => 'Il parametro $1 accetta solo {{PLURAL:$3|questo valore|questi valori}}: $2.',
 546+);
 547+
 548+/** Japanese (日本語)
 549+ * @author Aotake
 550+ * @author Fryed-peach
 551+ * @author Whym
 552+ */
 553+$messages['ja'] = array(
 554+ 'validator-desc' => '妥当性評価器は他の拡張機能にパーサー関数やタグ拡張の引数の妥当性を確認したり、規定値を設定したり、エラーメッセージを生成する手段を提供する',
 555+ 'validator_error_parameters' => 'あなたの入力から以下の{{PLURAL:$1|エラー|エラー}}が検出されました:',
 556+ 'validator_warning_parameters' => 'あなたの入力した構文には{{PLURAL:$1|エラー}}があります。',
 557+ 'validator_error_unknown_argument' => '$1 は有効な引数ではありません。',
 558+ 'validator_error_required_missing' => '必須の引数「$1」が入力されていません。',
 559+ 'validator_error_empty_argument' => '引数「$1」は空の値をとることができません。',
 560+ 'validator_error_must_be_number' => '引数「$1」は数値でなければなりません。',
 561+ 'validator_error_must_be_integer' => '引数「$1」は整数でなければなりません。',
 562+ 'validator_error_invalid_range' => '引数「$1」は $2 と $3 の間の値でなければなりません。',
 563+ 'validator_error_invalid_argument' => '値「$1」は引数「$2」として妥当ではありません。',
 564+ 'validator_list_error_empty_argument' => '引数「$1」は空の値をとりません。',
 565+ 'validator_list_error_must_be_number' => '引数「$1」は数値しかとることができません。',
 566+ 'validator_list_error_must_be_integer' => '引数「$1」は整数値しかとることができません。',
 567+ 'validator_list_error_invalid_range' => '引数「$1」の値はすべて $2 と $3 の間のものでなくてはなりません。',
 568+ 'validator_list_error_invalid_argument' => '引数「$1」の値に不正なものが1つ以上あります。',
 569+ 'validator_list_omitted' => '{{PLURAL:$2|値}} $1 は省かれました。',
 570+ 'validator_error_accepts_only' => '引数 $1 は次の{{PLURAL:$3|値}}以外を取ることはできません: $2',
 571+);
 572+
 573+/** Colognian (Ripoarisch)
 574+ * @author Purodha
 575+ */
 576+$messages['ksh'] = array(
 577+ 'validator-desc' => '{{int:validator_name}} brängk eine eijfache Wääsch, der Parrammeetere fun Paaser-Fungkßjohne un Zohsatzprojramme ze prööve, Schtandatt-Wääte enzefööje, un Fähler ze mällde.',
 578+ 'validator_error_parameters' => '{{PLURAL:$1|Heh dä|Heh di|Keine}} Fähler {{PLURAL:$1|es|sin|es}} en Dinge Syntax opjevalle:',
 579+ 'validator_error_unknown_argument' => '„$1“ es keine jöltijje Parameeter.',
 580+ 'validator_error_required_missing' => 'Dä Parameeter $1 moß aanjejovve sin, un fählt.',
 581+ 'validator_error_empty_argument' => 'Dä Parameeter $1 kann keine Wäät met nix dren hann.',
 582+ 'validator_error_must_be_number' => 'Dä Parameeter $1 kann blohß en Zahl sin.',
 583+ 'validator_error_must_be_integer' => 'Dä Parrameeter $1 kann bloß en jannze Zahl sin.',
 584+ 'validator_error_invalid_range' => 'Dä Parameeter $1 moß zwesche $2 un $3 sin.',
 585+ 'validator_error_invalid_argument' => 'Däm Parameeter $2 singe Wäät es $1, dat es ävver doför nit jöltesch.',
 586+ 'validator_error_accepts_only' => 'Dä Parameeter $1 kann {{PLURAL:$3|bloß dä eine Wäät|bloß eine vun dä Wääte|keine Wäät}} han: $2',
 587+);
 588+
 589+/** Luxembourgish (Lëtzebuergesch)
 590+ * @author Les Meloures
 591+ * @author Robby
 592+ */
 593+$messages['lb'] = array(
 594+ 'validator-desc' => 'Validator erlaabt et op eng einfach Manéier fir Parametere vu Parser-Fonctiounen an Tag-Erweiderungen ze validéieren, fir Standard-Wäerter festzeleeën a fir Feeler-Messagen ze generéieren',
 595+ 'validator_error_parameters' => '{{PLURAL:$1|Dëse Feeler gouf|Dës Feeler goufen}} an Ärer Syntax fonnt:',
 596+ 'validator_warning_parameters' => 'Et {{PLURAL:$1|ass ee|si}} Feeler an Ärer Syntax.',
 597+ 'validator_error_unknown_argument' => '$1 ass kee valbele Parameter.',
 598+ 'validator_error_required_missing' => 'Den obligatoresche Parameter $1 war net derbäi.',
 599+ 'validator_error_empty_argument' => 'De Parameter $1 ka keen eidele Wert hunn.',
 600+ 'validator_error_must_be_number' => 'De Parameter $1 ka just eng Zuel sinn',
 601+ 'validator_error_must_be_integer' => 'De Parameter $1 ka just eng ganz Zuel sinn.',
 602+ 'validator_error_invalid_range' => 'De Parameter $1 muss tëschent $2 an $3 leien.',
 603+ 'validator_error_invalid_argument' => 'De Wert $1 ass net valabel fir de Parameter $2.',
 604+ 'validator_list_error_empty_argument' => 'De Parameter $1 hëlt keng eidel Wäerter un.',
 605+ 'validator_list_error_must_be_number' => 'Am Parameter $1 kënnen nëmmen Zuelen dra sinn.',
 606+ 'validator_list_error_must_be_integer' => 'Am Parameter $1 kënnen nëmme ganz Zuele sinn.',
 607+ 'validator_list_error_invalid_range' => 'All Wäerter vum Parameter $1 mussen tëschent $2 an $3 leien.',
 608+ 'validator_list_error_invalid_argument' => 'Een oder méi Wäerter fir de Parameter $1 sinn net valabel.',
 609+ 'validator_list_omitted' => "{{PLURAL:$2|De Wäert|D'Wäerter}} $1 {{PLURAL:$2|gouf|goufe}} vergiess.",
 610+ 'validator_error_accepts_only' => 'De Parameter $1 akzeptéiert just {{PLURAL:$3|dëse Wäert|dës Wäerter}}: $2',
 611+);
 612+
 613+/** Macedonian (Македонски)
 614+ * @author Bjankuloski06
 615+ * @author McDutchie
 616+ */
 617+$messages['mk'] = array(
 618+ 'validator-desc' => 'Потврдувачот овозможува лесен начин другите додатоци да ги потврдат параметрите на парсерските функции и додатоците со ознаки, да поставаат основно зададени вредности и да создаваат пораки за грешки',
 619+ 'validator_error_parameters' => 'Во вашата синтакса {{PLURAL:$1|е откриена следнава грешка|се откриени следниве грешки}}:',
 620+ 'validator_warning_parameters' => 'Имате {{PLURAL:$1|грешка|грешки}} во синтаксата.',
 621+ 'validator_error_unknown_argument' => '$1 не е важечки параметар.',
 622+ 'validator_error_required_missing' => 'Бараниот параметар $1 не е наведен.',
 623+ 'validator_error_empty_argument' => 'Параметарот $1 не може да има празна вредност.',
 624+ 'validator_error_must_be_number' => 'Параметарот $1 може да биде само број.',
 625+ 'validator_error_must_be_integer' => 'Параметарот $1 може да биде само цел број.',
 626+ 'validator_error_invalid_range' => 'Параметарот $1 мора да изнесува помеѓу $2 и $3.',
 627+ 'validator_error_invalid_argument' => 'Вредноста $1 е неважечка за параметарот $2.',
 628+ 'validator_list_error_empty_argument' => 'Параметарот $1 не прифаќа празни вредности.',
 629+ 'validator_list_error_must_be_number' => 'Параметарот $1 може да содржи само бројки.',
 630+ 'validator_list_error_must_be_integer' => 'Параметарот $1 може да содржи само цели броеви.',
 631+ 'validator_list_error_invalid_range' => 'Сите вредности на параметарот $1 мора да бидат помеѓу $2 и $3.',
 632+ 'validator_list_error_invalid_argument' => 'Една или повеќе вредности на параметарот $1 се неважечки.',
 633+ 'validator_list_omitted' => '{{PLURAL:$2|Вредноста|Вредностите}} $1 {{PLURAL:$2|беше испуштена|беа испуштени}}.',
 634+ 'validator_error_accepts_only' => 'Параметарот $1 {{PLURAL:$3|ја прифаќа само оваа вредност|ги прифаќа само овие вредности}}: $2.',
 635+);
 636+
 637+/** Dutch (Nederlands)
 638+ * @author Jeroen De Dauw
 639+ * @author Siebrand
 640+ */
 641+$messages['nl'] = array(
 642+ 'validator-desc' => 'Validator geeft andere uitbreidingen de mogelijkheid om parameters van parserfuncties en taguitbreidingen te valideren, in te stellen op hun standaardwaarden en foutberichten te genereren',
 643+ 'validator_error_parameters' => 'In uw syntaxis {{PLURAL:$1|is de volgende fout|zijn de volgende fouten}} gedetecteerd:',
 644+ 'validator_warning_parameters' => 'Er {{PLURAL:$1|zit een fout|zitten $1 fouten}} in uw syntaxis.',
 645+ 'validator_error_unknown_argument' => '$1 is geen geldige parameter.',
 646+ 'validator_error_required_missing' => 'De verplichte parameter $1 is niet opgegeven.',
 647+ 'validator_error_empty_argument' => 'De parameter $1 mag niet leeg zijn.',
 648+ 'validator_error_must_be_number' => 'De parameter $1 mag alleen een getal zijn.',
 649+ 'validator_error_must_be_integer' => 'De parameter $1 kan alleen een heel getal zijn.',
 650+ 'validator_error_invalid_range' => 'De parameter $1 moet tussen $2 en $3 liggen.',
 651+ 'validator_error_invalid_argument' => 'De waarde $1 is niet geldig voor de parameter $2.',
 652+ 'validator_list_error_empty_argument' => 'Voor de parameter $1 zijn lege waarden niet toegestaan.',
 653+ 'validator_list_error_must_be_number' => 'Voor de parameter $1 zijn alleen getallen toegestaan.',
 654+ 'validator_list_error_must_be_integer' => 'Voor de parameter $1 zijn alleen hele getallen toegestaan.',
 655+ 'validator_list_error_invalid_range' => 'Alle waarden voor de parameter $1 moeten tussen $2 en $3 liggen.',
 656+ 'validator_list_error_invalid_argument' => 'Een of meerdere waarden voor de parameter $1 zijn ongeldig.',
 657+ 'validator_list_omitted' => 'De {{PLURAL:$2|waarde|waarden}} $1 {{PLURAL:$2|mist|missen}}.',
 658+ 'validator_error_accepts_only' => 'De parameter $1 kan alleen de volgende {{PLURAL:$3|waarde|waarden}} hebben: $2.',
 659+);
 660+
 661+/** Norwegian (bokmål)‬ (‪Norsk (bokmål)‬)
 662+ * @author Jon Harald Søby
 663+ * @author Nghtwlkr
 664+ */
 665+$messages['no'] = array(
 666+ 'validator-desc' => 'Validering gir en enkel måte for utvidelser å validere parametere av parserfunksjoner og taggutvidelser, sette standardverdier og generere feilbeskjeder.',
 667+ 'validator_error_parameters' => 'Følgende {{PLURAL:$1|feil|feil}} har blitt oppdaget i syntaksen din:',
 668+ 'validator_warning_parameters' => 'Det er {{PLURAL:$1|én feil|flere feil}} i syntaksen din.',
 669+ 'validator_error_unknown_argument' => '$1 er ikke en gyldig parameter.',
 670+ 'validator_error_required_missing' => 'Den nødvendige parameteren $1 er ikke angitt.',
 671+ 'validator_error_empty_argument' => 'Parameteren $1 kan ikke ha en tom verdi.',
 672+ 'validator_error_must_be_number' => 'Parameter $1 må være et tall.',
 673+ 'validator_error_must_be_integer' => 'Parameteren $1 må være et heltall.',
 674+ 'validator_error_invalid_range' => 'Parameter $1 må være mellom $2 og $3.',
 675+ 'validator_error_invalid_argument' => 'Verdien $1 er ikke en gyldig parameter for $2.',
 676+ 'validator_list_error_empty_argument' => 'Parameteren $1 godtar ikke tomme verdier.',
 677+ 'validator_list_error_must_be_number' => 'Parameteren $1 kan bare inneholde tall.',
 678+ 'validator_list_error_must_be_integer' => 'Parameteren $1 kan bare inneholder heltall.',
 679+ 'validator_list_error_invalid_range' => 'Alle verdier av parameteren $1 må være mellom $2 og $3.',
 680+ 'validator_list_error_invalid_argument' => 'Parameteren $1 har en eller flere ugyldige verdier.',
 681+ 'validator_list_omitted' => '{{PLURAL:$2|Verdien|Verdiene}} $1 har blitt utelatt.',
 682+ 'validator_error_accepts_only' => 'Parameteren $1 kan kun ha {{PLURAL:$3|denne verdien|disse verdiene}}: $2',
 683+);
 684+
 685+/** Occitan (Occitan)
 686+ * @author Cedric31
 687+ * @author Jfblanc
 688+ */
 689+$messages['oc'] = array(
 690+ 'validator-desc' => "Validator porgís a d'autras extensions un biais per validar aisidament los paramètres de foncions d'analisi e las extensions de mercas, definir de valors per manca e crear de messatges d'error",
 691+ 'validator_error_parameters' => '{{PLURAL:$1|Aquela error es estada detectada|Aquelas errors son estadas detectadas}} dins la sintaxi',
 692+ 'validator_error_unknown_argument' => '$1 es pas un paramètre valedor.',
 693+ 'validator_error_required_missing' => "Manca lo paramètre $1 qu'es obligatòri.",
 694+ 'validator_error_empty_argument' => 'Lo paramètre $1 pòt pas estar voide.',
 695+ 'validator_error_must_be_number' => 'Lo paramètre $1 deu èsser un nombre.',
 696+ 'validator_error_must_be_integer' => 'Lo paramètre $1 deu èsser un nombre entièr.',
 697+ 'validator_error_invalid_range' => 'Lo paramètre $1 deu èsser entre $2 e $3.',
 698+ 'validator_error_invalid_argument' => '$1 es pas valedor pel paramètre $2.',
 699+ 'validator_error_accepts_only' => 'Sonque {{PLURAL:$3|aquela valor es valedora|aquelas valors son valedoras}}pel paramètre $1 : $2.',
 700+);
 701+
 702+/** Polish (Polski)
 703+ * @author Fizykaa
 704+ */
 705+$messages['pl'] = array(
 706+ 'validator_error_parameters' => 'W Twoim kodzie {{PLURAL:$1|został wykryty następujący błąd|zostały wykryte następujące błędy}}:',
 707+ 'validator_warning_parameters' => 'W Twoim kodzie {{PLURAL:$1|wystąpił błąd|wystąpiły błędy}}.',
 708+ 'validator_error_unknown_argument' => '$1 jest niepoprawnym parametrem.',
 709+ 'validator_error_required_missing' => 'Obowiązkowy parametr $1 nie został zadeklarowany.',
 710+ 'validator_error_empty_argument' => 'Parametr $1 nie może być pusty.',
 711+ 'validator_error_must_be_number' => 'Parametr $1 musi być liczbą.',
 712+ 'validator_error_must_be_integer' => 'Parametr $1 musi być liczbą całkowitą.',
 713+ 'validator_error_invalid_range' => 'Parametr $1 musi zawierać się w przedziale <$2, $3>.',
 714+ 'validator_error_invalid_argument' => 'Wartość $1 jest nieprawidłowa dla parametru $2.',
 715+ 'validator_list_error_empty_argument' => 'Parametr $1 nie może być pusty.',
 716+ 'validator_list_error_must_be_number' => 'Parametr $1 może zawierać tylko liczby.',
 717+ 'validator_list_error_must_be_integer' => 'Parametr $1 może zawierać tylko liczby całkowite.',
 718+ 'validator_list_error_invalid_range' => 'Wartości parametru $1 muszą zawierać się w przedziale <$2, $3>.',
 719+ 'validator_list_error_invalid_argument' => 'Przynajmniej jedna wartość parametru $1 jest nieprawidłowa.',
 720+ 'validator_list_omitted' => '{{PLURAL:$2|Parametr|Parametry}} $1 {PLURAL:$2|został opuszczony|zostały opuszczone}}.',
 721+ 'validator_error_accepts_only' => 'Parametr $1 może przyjmować tylko {{PLURAL:$3|następującą wartość|następujące wartości}}: $2.',
 722+);
 723+
 724+/** Piedmontese (Piemontèis)
 725+ * @author Borichèt
 726+ * @author Dragonòt
 727+ * @author McDutchie
 728+ */
 729+$messages['pms'] = array(
 730+ 'validator-desc' => "Validator a dà na manera bel fé për àutre estension ëd validé ij paràmetr ëd le funsion dël parser e j'estension dij tag, d'amposté ij valor ëd default e generé mëssagi d'eror",
 731+ 'validator_error_parameters' => "{{PLURAL:$1|L'eror sì-sota a l'é stàit|J'eror sì-sota a son ëstàit}} trovà an soa sintassi:",
 732+ 'validator_warning_parameters' => "{{PLURAL:$1|A-i é n'|A-i son dj'}}eror ant soa sintassi.",
 733+ 'validator_error_unknown_argument' => "$1 a l'é un paràmetr pa bon.",
 734+ 'validator_error_required_missing' => "Ël paràmetr obligatòri $1 a l'é pa dàit.",
 735+ 'validator_error_empty_argument' => 'Ël paràmetr $1 a peul pa avèj un valor veuid.',
 736+ 'validator_error_must_be_number' => 'Ël paràmetr $1 a peul mach esse un nùmer.',
 737+ 'validator_error_must_be_integer' => "Ël paràmetr $1 a peul mach esse n'antregh.",
 738+ 'validator_error_invalid_range' => 'Ël paràmetr $1 a deuv esse an tra $2 e $3.',
 739+ 'validator_error_invalid_argument' => "Ël valor $1 a l'é pa bon për ël paràmetr $2.",
 740+ 'validator_list_error_empty_argument' => 'Ël paràmetr $1 a aceta pa dij valor veuid.',
 741+ 'validator_list_error_must_be_number' => 'Ël paràmetr $1 a peul mach conten-e dij nùmer.',
 742+ 'validator_list_error_must_be_integer' => "Ël paràmetr $1 a peul mach conten-e dj'antegr.",
 743+ 'validator_list_error_invalid_range' => 'Tùit ij valor dël paràmetr $1 a deuvo esse tra $2 e $3.',
 744+ 'validator_list_error_invalid_argument' => 'Un o pi valor dël paràmetr $1 a son pa bon.',
 745+ 'validator_list_omitted' => "{{PLURAL:$2|Ël valor|Ij valor}} $1 {{PLURAL:$2|a l'é|a son}} pa stàit butà.",
 746+ 'validator_error_accepts_only' => 'Ël paràmetr $1 a aceta mach {{PLURAL:$3|sto valor-sì|sti valor-sì}}: $2.',
 747+);
 748+
 749+/** Portuguese (Português)
 750+ * @author Hamilton Abreu
 751+ */
 752+$messages['pt'] = array(
 753+ 'validator-desc' => 'O Serviço de Validação permite que, de forma simples, as outras extensões possam validar parâmetros das funções do analisador sintáctico e das extensões dos elementos HTML, definir valores por omissão e gerar mensagens de erro',
 754+ 'validator_error_parameters' => '{{PLURAL:$1|Foi detectado o seguinte erro sintáctico|Foram detectados os seguintes erros sintácticos}}:',
 755+ 'validator_warning_parameters' => '{{PLURAL:$1|Existe um erro sintáctico|Existem erros sintácticos}}.',
 756+ 'validator_error_unknown_argument' => '$1 não é um parâmetro válido.',
 757+ 'validator_error_required_missing' => 'O parâmetro obrigatório $1 não foi fornecido.',
 758+ 'validator_error_empty_argument' => 'O parâmetro $1 não pode estar vazio.',
 759+ 'validator_error_must_be_number' => 'O parâmetro $1 só pode ser numérico.',
 760+ 'validator_error_must_be_integer' => 'O parâmetro $1 só pode ser um número inteiro.',
 761+ 'validator_error_invalid_range' => 'O parâmetro $1 tem de ser entre $2 e $3.',
 762+ 'validator_error_invalid_argument' => 'O valor $1 não é válido para o parâmetro $2.',
 763+ 'validator_list_error_empty_argument' => 'O parâmetro $1 não pode estar vazio.',
 764+ 'validator_list_error_must_be_number' => 'O parâmetro $1 só pode ser numérico.',
 765+ 'validator_list_error_must_be_integer' => 'O parâmetro $1 só pode ser um número inteiro.',
 766+ 'validator_list_error_invalid_range' => 'Todos os valores do parâmetro $1 têm de ser entre $2 e $3.',
 767+ 'validator_list_error_invalid_argument' => 'Um ou mais valores do parâmetro $1 são inválidos.',
 768+ 'validator_list_omitted' => '{{PLURAL:$2|O valor $1 foi omitido|Os valores $1 foram omitidos}}.',
 769+ 'validator_error_accepts_only' => 'O parâmetro $1 só aceita {{PLURAL:$3|este valor|estes valores}}: $2.',
 770+);
 771+
 772+/** Brazilian Portuguese (Português do Brasil)
 773+ * @author Giro720
 774+ * @author Luckas Blade
 775+ */
 776+$messages['pt-br'] = array(
 777+ 'validator_error_unknown_argument' => '$1 não é um parâmetro válido.',
 778+ 'validator_error_invalid_range' => 'O parâmetro $1 tem de ser entre $2 e $3.',
 779+ 'validator_error_invalid_argument' => 'O valor $1 não é válido para o parâmetro $2.',
 780+ 'validator_list_omitted' => '{{PLURAL:$2|O valor $1 foi omitido|Os valores $1 foram omitidos}}.',
 781+ 'validator_error_accepts_only' => 'O parâmetro $1 só aceita {{PLURAL:$3|este valor|estes valores}}: $2.',
 782+);
 783+
 784+/** Russian (Русский)
 785+ * @author Aleksandrit
 786+ * @author Lockal
 787+ * @author McDutchie
 788+ * @author Александр Сигачёв
 789+ */
 790+$messages['ru'] = array(
 791+ 'validator-desc' => 'Валидатор предоставляет другим расширениям возможности проверки параметров функций парсера и тегов, установки значения по умолчанию и создания сообщения об ошибках',
 792+ 'validator_error_parameters' => 'В вашем синтаксисе {{PLURAL:$1|обнаружена следующая ошибка|обнаружены следующие ошибки}}:',
 793+ 'validator_warning_parameters' => 'В вашем синтаксисе {{PLURAL:$1|имеется ошибка|имеются ошибки}}.',
 794+ 'validator_error_unknown_argument' => '$1 не является допустимым параметром.',
 795+ 'validator_error_required_missing' => 'Не указан обязательный параметр $1.',
 796+ 'validator_error_empty_argument' => 'Параметр $1 не может принимать пустое значение.',
 797+ 'validator_error_must_be_number' => 'Значением параметра $1 могут быть только числа.',
 798+ 'validator_error_must_be_integer' => 'Параметр $1 может быть только целым числом.',
 799+ 'validator_error_invalid_range' => 'Параметр $1 должен быть от $2 до $3.',
 800+ 'validator_error_invalid_argument' => 'Значение $1 не является допустимым параметром $2',
 801+ 'validator_list_error_empty_argument' => 'Параметр $1 не может принимать пустые значения.',
 802+ 'validator_list_error_must_be_number' => 'Параметр $1 может содержать только цифры.',
 803+ 'validator_list_error_must_be_integer' => 'Параметр $1 может содержать только целые числа.',
 804+ 'validator_list_error_invalid_range' => 'Все значения параметра $1 должна находиться в диапазоне от $2 до $3.',
 805+ 'validator_list_error_invalid_argument' => 'Одно или несколько значений параметра $1 ошибочны.',
 806+ 'validator_list_omitted' => '{{PLURAL:$2|Значение $1 было пропущено|Значения $1 были пропущены}}.',
 807+ 'validator_error_accepts_only' => 'Параметр $1 может принимать только {{PLURAL:$3|следующее значение|следующие значения}}: $2.',
 808+);
 809+
 810+/** Sinhala (සිංහල)
 811+ * @author Calcey
 812+ */
 813+$messages['si'] = array(
 814+ 'validator-desc' => 'තහවුරු කරන්නා ටැග් දිඟුවන් හා parser ශ්‍රිතවල පරාමිතීන් තහවුරු කිරීමට අනෙක් දිඟුවන් සඳහා පහසු ක්‍රමයක් සපයයි,පෙරනිමි අගයන් පිහිටුවීම හා දෝෂ පණිවුඩ ජනනය කිරීම ද සිදු කරයි',
 815+ 'validator_error_parameters' => 'ඔබේ වාග් රීතිය මඟින් පහත {{PLURAL:$1|දෝෂය|දෝෂයන්}} අනාවරණය කරනු ලැබ ඇත',
 816+ 'validator_error_unknown_argument' => '$1 වලංගු පරාමිතියක් නොවේ.',
 817+ 'validator_error_required_missing' => 'අවශ්‍ය වන $1 පරාමිතිය සපයා නොමැත.',
 818+ 'validator_error_empty_argument' => '$1 පරාමිතියට හිස් අගයක් තිබිය නොහැක.',
 819+ 'validator_error_must_be_number' => '$1 පරාමිතිය විය හැක්කේ ඉලක්කමක් පමණි.',
 820+ 'validator_error_invalid_range' => '$1 පරාමිතිය $2 හා $3 අතර විය යුතුය.',
 821+ 'validator_error_invalid_argument' => '$2 පරාමිතිය සඳහා $1 අගය වලංගු නොවේ.',
 822+ 'validator_error_accepts_only' => '$1 පරාමිතිය විසින් පිළිගනු ලබන්නේ {{PLURAL:$3|මෙම අගය|මෙම අගයන්}}: $2 පමණි.',
 823+);
 824+
 825+/** Swedish (Svenska)
 826+ * @author Fluff
 827+ * @author Ozp
 828+ * @author Per
 829+ * @author Sertion
 830+ */
 831+$messages['sv'] = array(
 832+ 'validator-desc' => 'Valideraren skapar ett smidigt sätt för andra tillägg att validera olika parserfunktioners parametrar och taggar, sätta standardvärden för tilläggen samt att generera felmeddelanden',
 833+ 'validator_error_parameters' => 'Följande {{PLURAL:$1|fel|fel}} har upptäckts i din syntax:',
 834+ 'validator_warning_parameters' => 'Det finns {{PLURAL:$1|ett|flera}} fel i din syntax.',
 835+ 'validator_error_unknown_argument' => '$1 är inte en giltig paramter.',
 836+ 'validator_error_required_missing' => 'Den nödvändiga parametern $1 har inte angivits.',
 837+ 'validator_error_empty_argument' => 'Parametern $1 kan inte lämnas tom.',
 838+ 'validator_error_must_be_number' => 'Parameter $1 måste bestå av ett tal.',
 839+ 'validator_error_must_be_integer' => 'Parametern $1 måste vara ett heltal.',
 840+ 'validator_error_invalid_range' => 'Parameter $1 måste vara i mellan $2 och $3.',
 841+ 'validator_error_invalid_argument' => 'Värdet $1 är inte giltigt som parameter $2.',
 842+ 'validator_list_error_empty_argument' => 'Parameter $1 accepterar inte tomma värden.',
 843+ 'validator_list_error_must_be_number' => 'Parameter $1 får endast innehålla siffror.',
 844+ 'validator_list_error_must_be_integer' => 'Parameter $1 får endast innehålla heltal.',
 845+ 'validator_list_error_invalid_range' => 'Alla värden av parameter $1 måste vara mellan $2 och $3.',
 846+ 'validator_list_error_invalid_argument' => 'Ett eller flera värden av parameter $1 är ogiltiga.',
 847+ 'validator_list_omitted' => '{{PLURAL:$2|Värdet|Värdena}} $1 har blivit {{PLURAL:$2|utelämnat|utelämnade}}.',
 848+ 'validator_error_accepts_only' => 'Parametern $1 måste ha {{PLURAL:$3|detta värde|ett av dessa värden}}: $2.',
 849+);
 850+
 851+/** Telugu (తెలుగు)
 852+ * @author Ravichandra
 853+ */
 854+$messages['te'] = array(
 855+ 'validator_error_unknown_argument' => '$1 అనేది సరైన పరామితి కాదు.',
 856+ 'validator_error_required_missing' => 'తప్పకుండా కావాల్సిన $1 పరామితిని ఇవ్వలేదు.',
 857+ 'validator_error_empty_argument' => '$1 పరామితి ఖాళీగా ఉండకూడదు',
 858+ 'validator_error_must_be_number' => '$1 పరామితి ఖచ్చితంగా ఓ సంఖ్య అయిఉండాలి',
 859+ 'validator_error_must_be_integer' => '$1 పరామితి ఒక పూర్ణసంఖ్య అయిఉండాలి',
 860+ 'validator_error_invalid_range' => '$1 పరామితి $2, $3 మద్యలో ఉండాలి.',
 861+ 'validator_error_invalid_argument' => '$2 పరామితి కోసం $1 విలువ సరైంది కాదు',
 862+);
 863+
 864+/** Tagalog (Tagalog)
 865+ * @author AnakngAraw
 866+ */
 867+$messages['tl'] = array(
 868+ 'validator-desc' => 'Nagbibigay ng panlahatang magtangkilik na paghawak sa ibang mga dugtong',
 869+ 'validator_error_parameters' => 'Ang sumusunod na {{PLURAL:$1|kamalian|mga kamalian}} ay napansin sa iyong sintaks:',
 870+ 'validator_warning_parameters' => 'May {{PLURAL:$1|mali|mga mali}} sa sintaks mo.',
 871+ 'validator_error_unknown_argument' => 'Ang $1 ay isang hindi tanggap na parametro.',
 872+ 'validator_error_required_missing' => 'Hindi ibinigay ang kailangang parametro na $1.',
 873+ 'validator_error_empty_argument' => 'Hindi dapat na isang halagang walang laman ang parametrong $1.',
 874+ 'validator_error_must_be_number' => 'Dapat na bilang lang ang parametrong $1.',
 875+ 'validator_error_must_be_integer' => 'Dapat na tambilang lang ang parametrong $1.',
 876+ 'validator_error_invalid_range' => 'Dapat na nasa pagitan ng $2 at $3 ang parametrong $1.',
 877+ 'validator_error_invalid_argument' => 'Ang halagang $1 ay hindi tanggap para sa parametrong $2.',
 878+ 'validator_list_error_empty_argument' => 'Hindi tumatanggap ng halagang walang laman ang parametrong $1.',
 879+ 'validator_list_error_must_be_number' => 'Dapat na naglalaman lang ng mga bilang ang parametrong $1.',
 880+ 'validator_list_error_must_be_integer' => 'Dapat na naglalaman lang ng mga tambilang ang parametrong $1.',
 881+ 'validator_list_error_invalid_range' => 'Dapat na nasa pagitan ng $2 at $3 ang lahat ng mga halaga ng parametrong $1.',
 882+ 'validator_list_error_invalid_argument' => 'Hindi tanggap ang isa o higit pang mga halaga para sa parametrong $1.',
 883+ 'validator_list_omitted' => 'Tinanggal {{PLURAL:$2|na ang|na ang mga}} {{PLURAL:$2|halaga|halaga}} ng $1.',
 884+ 'validator_error_accepts_only' => 'Tumatanggap lang ang parametrong $1 ng {{PLURAL:$3|ganitong halaga|ganitong mga halaga}}: $2.',
 885+);
 886+
 887+/** Turkish (Türkçe)
 888+ * @author Vito Genovese
 889+ */
 890+$messages['tr'] = array(
 891+ 'validator_error_unknown_argument' => '$1, geçerli bir parametre değildir.',
 892+ 'validator_error_empty_argument' => '$1 parametresi boş bir değere sahip olamaz.',
 893+ 'validator_error_must_be_number' => '$1 parametresi sadece sayı olabilir.',
 894+ 'validator_error_must_be_integer' => '$1 parametresi sadece bir tamsayı olabilir',
 895+ 'validator_list_error_empty_argument' => '$1 parametresi boş değerleri kabul etmemektedir.',
 896+ 'validator_list_error_must_be_number' => '$1 parametresi sadece sayı içerebilir.',
 897+);
 898+
 899+/** Ukrainian (Українська)
 900+ * @author NickK
 901+ * @author Prima klasy4na
 902+ */
 903+$messages['uk'] = array(
 904+ 'validator-desc' => 'Валідатор забезпечує іншим розширенням можливості перевірки параметрів функцій парсера і тегів, встановлення значень за умовчанням та створення повідомлень про помилки',
 905+ 'validator_error_parameters' => 'У вашому синтаксисі {{PLURAL:$1|виявлена така помилка|виявлені такі помилки}}:',
 906+);
 907+
 908+/** Vietnamese (Tiếng Việt)
 909+ * @author Minh Nguyen
 910+ * @author Vinhtantran
 911+ */
 912+$messages['vi'] = array(
 913+ 'validator-desc' => 'Bộ phê chuẩn cho phép các phần mở rộng khác phê chuẩn tham số của hàm cú pháp và thẻ mở rộng, đặt giá trị mặc định, và báo cáo lỗi.',
 914+ 'validator_error_parameters' => '{{PLURAL:$1|Lỗi|Các lỗi}} cú pháp sau được nhận ra trong mã của bạn:',
 915+ 'validator_warning_parameters' => 'Có {{PLURAL:$1|lỗi|lỗi}} cú pháp trong mã của bạn.',
 916+ 'validator_error_unknown_argument' => '$1 không phải là tham số hợp lệ.',
 917+ 'validator_error_required_missing' => 'Không định rõ tham số bắt buộc “$1”.',
 918+ 'validator_error_empty_argument' => 'Tham số “$1” không được để trống.',
 919+ 'validator_error_must_be_number' => 'Tham số “$1” phải là con số.',
 920+ 'validator_error_must_be_integer' => 'Tham số “$1” phải là số nguyên.',
 921+ 'validator_error_invalid_range' => 'Tham số “$1” phải nằm giữa $2 và $3.',
 922+ 'validator_error_invalid_argument' => 'Giá trị “$1” không hợp tham số “$2”.',
 923+ 'validator_list_error_empty_argument' => 'Không được để trống tham số “$1”.',
 924+ 'validator_list_error_must_be_number' => 'Tham số “$1” chỉ được phép bao gồm con số.',
 925+ 'validator_list_error_must_be_integer' => 'Tham số “$1” chỉ được phép bao gồm số nguyên.',
 926+ 'validator_list_error_invalid_range' => 'Tất cả các giá trị của tham số “$1” phải nằm giữa $2 và $3.',
 927+ 'validator_list_error_invalid_argument' => 'Ít nhất một giá trị của tham số “$1” không hợp lệ.',
 928+ 'validator_list_omitted' => '{{PLURAL:$2|Giá trị|Các giá trị}} “$1” bị bỏ qua.',
 929+ 'validator_error_accepts_only' => 'Tham số $1 chỉ nhận được {{PLURAL:$3|giá trị|các giá trị}} này: $2.',
 930+);
 931+
Property changes on: tags/extensions/Validator/REL_0_3_4/Validator.i18n.php
___________________________________________________________________
Added: svn:eol-style
1932 + native
Index: tags/extensions/Validator/REL_0_3_4/TopologicalSort.php
@@ -0,0 +1,163 @@
 2+<?php
 3+
 4+/**
 5+ * Sorts a series of dependency pairs in linear order.
 6+ *
 7+ * Based on http://blog.metafoundry.com/2007/09/topological-sort-in-php.html
 8+ *
 9+ * usage:
 10+ * $t = new TopologicalSort($dependency_pairs);
 11+ * $load_order = $t->doSort();
 12+ *
 13+ * where dependency_pairs is in the form:
 14+ * $name => (depends on) $value
 15+ *
 16+ * @author Eddie Haber
 17+ * @author Jeroen De Dauw
 18+ *
 19+ * TODO: fix conventions further
 20+ * TODO: include/load class
 21+ * TODO: Use in revised version of Validator class
 22+ */
 23+class TopologicalSort {
 24+
 25+ private $mNodes = array();
 26+ private $mNodeNames = array();
 27+
 28+ /**
 29+ * Dependency pairs are a list of arrays in the form
 30+ * $name => $val where $key must come before $val in load order.
 31+ */
 32+ function TopologicalSort( $dependencies = array(), $parse = true ) {
 33+ $this->mNodeNames = array_keys( $dependencies );
 34+
 35+ if ( $parse ) {
 36+ $dependencies = $this->parseDependencyList( $dependencies );
 37+ }
 38+
 39+ // turn pairs into double-linked node tree
 40+ foreach ( $dependencies as $key => $dpair ) {
 41+ list ( $module, $dependency ) = each ( $dpair );
 42+ if ( !isset( $this->mNodes[$module] ) ) $this->mNodes[$module] = new TSNode( $module );
 43+ if ( !isset( $this->mNodes[$dependency] ) ) $this->mNodes[$dependency] = new TSNode( $dependency );
 44+ if ( !in_array( $dependency, $this->mNodes[$module]->children ) ) $this->mNodes[$module]->children[] = $dependency;
 45+ if ( !in_array( $module, $this->mNodes[$dependency]->parents ) ) $this->mNodes[$dependency]->parents[] = $module;
 46+ }
 47+ }
 48+
 49+ /**
 50+ * Perform Topological Sort.
 51+ *
 52+ * @return sorted array
 53+ */
 54+ public function doSort() {
 55+ $nodes = $this->mNodes;
 56+
 57+ // get nodes without parents
 58+ $root_nodes = array_values( $this->getRootNodes( $nodes ) );
 59+
 60+ // begin algorithm
 61+ $sorted = array();
 62+ while ( count( $nodes ) > 0 ) {
 63+ // check for circular reference
 64+ if ( count( $root_nodes ) == 0 ) return false;
 65+
 66+
 67+ // remove this node from root_nodes
 68+ // and add it to the output
 69+ $n = array_pop( $root_nodes );
 70+ $sorted[] = $n->name;
 71+
 72+ // for each of its children
 73+ // queue the new node finally remove the original
 74+ for ( $i = count( $n->children ) - 1; $i >= 0; $i -- ) {
 75+ $childnode = $n->children[$i];
 76+ // remove the link from this node to its
 77+ // children ($nodes[$n->name]->children[$i]) AND
 78+ // remove the link from each child to this
 79+ // parent ($nodes[$childnode]->parents[?]) THEN
 80+ // remove this child from this node
 81+ unset( $nodes[$n->name]->children[$i] );
 82+ $parent_position = array_search ( $n->name, $nodes[$childnode]->parents );
 83+ unset( $nodes[$childnode]->parents[$parent_position] );
 84+ // check if this child has other parents
 85+ // if not, add it to the root nodes list
 86+ if ( !count( $nodes[$childnode]->parents ) ) {
 87+ array_push( $root_nodes, $nodes [$childnode] );
 88+ }
 89+ }
 90+
 91+ // nodes.Remove(n);
 92+ unset( $nodes[$n->name] );
 93+ }
 94+
 95+ $looseNodes = array();
 96+
 97+ // Return the result with the loose nodes (items with no dependencies) appended.
 98+ foreach( $this->mNodeNames as $name ) {
 99+ if ( !in_array( $name, $sorted ) ) {
 100+ $looseNodes[] = $name;
 101+ }
 102+ }
 103+
 104+ return array_merge( $sorted, $looseNodes );
 105+ }
 106+
 107+ /**
 108+ * Returns a list of node objects that do not have parents
 109+ *
 110+ * @param array $nodes array of node objects
 111+ *
 112+ * @return array of node objects
 113+ */
 114+ private function getRootNodes( array $nodes ) {
 115+ $output = array ();
 116+
 117+ foreach ( $nodes as $name => $node ) {
 118+ if ( !count ( $node->parents ) ) {
 119+ $output[$name] = $node;
 120+ }
 121+ }
 122+
 123+ return $output;
 124+ }
 125+
 126+ /**
 127+ * Parses an array of dependencies into an array of dependency pairs
 128+ *
 129+ * The array of dependencies would be in the form:
 130+ * $dependency_list = array(
 131+ * "name" => array("dependency1","dependency2","dependency3"),
 132+ * "name2" => array("dependencyA","dependencyB","dependencyC"),
 133+ * ...etc
 134+ * );
 135+ *
 136+ * @param array $dlist Array of dependency pairs for use as parameter in doSort method
 137+ *
 138+ * @return array
 139+ */
 140+ private function parseDependencyList( array $dlist = array() ) {
 141+ $output = array();
 142+
 143+ foreach ( $dlist as $name => $dependencies ) {
 144+ foreach ( $dependencies as $d ) {
 145+ array_push ( $output, array ( $d => $name ) );
 146+ }
 147+ }
 148+
 149+ return $output;
 150+ }
 151+}
 152+
 153+/**
 154+ * Node class for Topological Sort Class
 155+ */
 156+class TSNode {
 157+ public $name;
 158+ public $children = array();
 159+ public $parents = array();
 160+
 161+ public function TSNode( $name = '' ) {
 162+ $this->name = $name;
 163+ }
 164+}
\ No newline at end of file
Property changes on: tags/extensions/Validator/REL_0_3_4/TopologicalSort.php
___________________________________________________________________
Added: svn:eol-style
1165 + native
Index: tags/extensions/Validator/REL_0_3_4/Validator.php
@@ -0,0 +1,57 @@
 2+<?php
 3+
 4+/**
 5+ * Initialization file for the Validator extension.
 6+ * Extension documentation: http://www.mediawiki.org/wiki/Extension:Validator
 7+ *
 8+ * You will be validated. Resistance is futile.
 9+ *
 10+ * @file Validator.php
 11+ * @ingroup Validator
 12+ *
 13+ * @author Jeroen De Dauw
 14+ */
 15+
 16+/**
 17+ * This documenation group collects source code files belonging to Validator.
 18+ *
 19+ * Please do not use this group name for other code.
 20+ *
 21+ * @defgroup Validator Validator
 22+ */
 23+
 24+if ( !defined( 'MEDIAWIKI' ) ) {
 25+ die( 'Not an entry point.' );
 26+}
 27+
 28+define( 'Validator_VERSION', '0.3.4' );
 29+
 30+// Constants indicating the strictness of the parameter validation.
 31+define( 'Validator_ERRORS_NONE', 0 );
 32+define( 'Validator_ERRORS_WARN', 2 );
 33+define( 'Validator_ERRORS_SHOW', 3 );
 34+define( 'Validator_ERRORS_STRICT', 4 );
 35+
 36+$egValidatorDir = dirname( __FILE__ ) . '/';
 37+
 38+// Include the settings file.
 39+require_once( $egValidatorDir . 'Validator_Settings.php' );
 40+
 41+// Register the internationalization file.
 42+$wgExtensionMessagesFiles['Validator'] = $egValidatorDir . 'Validator.i18n.php';
 43+
 44+$wgExtensionCredits['other'][] = array(
 45+ 'path' => __FILE__,
 46+ 'name' => 'Validator',
 47+ 'version' => Validator_VERSION,
 48+ 'author' => array( '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]' ),
 49+ 'url' => 'http://www.mediawiki.org/wiki/Extension:Validator',
 50+ 'descriptionmsg' => 'validator-desc',
 51+);
 52+
 53+// Autoload the general classes.
 54+$wgAutoloadClasses['Validator'] = $egValidatorDir . 'Validator.class.php';
 55+$wgAutoloadClasses['ValidatorFunctions'] = $egValidatorDir . 'Validator_Functions.php';
 56+$wgAutoloadClasses['ValidatorFormats'] = $egValidatorDir . 'Validator_Formats.php';
 57+$wgAutoloadClasses['ValidatorManager'] = $egValidatorDir . 'Validator_Manager.php';
 58+$wgAutoloadClasses['TopologicalSort'] = $egValidatorDir . 'TopologicalSort.php';
\ No newline at end of file
Property changes on: tags/extensions/Validator/REL_0_3_4/Validator.php
___________________________________________________________________
Added: svn:eol-style
159 + native
Index: tags/extensions/Validator/REL_0_3_4/Validator_Settings.php
@@ -0,0 +1,33 @@
 2+<?php
 3+
 4+/**
 5+ * File defining the settings for the Validator extension
 6+ *
 7+ * NOTICE:
 8+ * Changing one of these settings can be done by copieng or cutting it,
 9+ * and placing it in LocalSettings.php, AFTER the inclusion of Validator.
 10+ *
 11+ * @file Validator_Settings.php
 12+ * @ingroup Validator
 13+ *
 14+ * @author Jeroen De Dauw
 15+ */
 16+
 17+if ( !defined( 'MEDIAWIKI' ) ) {
 18+ die( 'Not an entry point.' );
 19+}
 20+
 21+# Integer. The strictness of the parameter validation and resulting error report when using the ValidatorManager class.
 22+# This value also affects the error messages native to extensions that integrate Validator correctly.
 23+# Validator_ERRORS_NONE : Validator will not show any errors, and make the best of the input it got.
 24+# Validator_ERRORS_WARN : Validator will make the best of the input it got, but will show a warning that there are errors.
 25+# Validator_ERRORS_SHOW : Validator will make the best of the input it got, but will show a list of all errors.
 26+# Validator_ERRORS_STRICT : Validator will only show regular output when there are no errors, if there are, a list of them will be shown.
 27+$egValidatorErrorLevel = Validator_ERRORS_SHOW;
 28+
 29+# Integer. The strictness of the parameter validation and resulting error report when using the ValidatorManager class.
 30+# This value also affects the error messages native to extensions that integrate Validator correctly.
 31+# Validator_ERRORS_NONE : Validator will not show any errors, and make the best of the input it got, if possible.
 32+# Validator_ERRORS_WARN : Validator will make the best of the input it got, but will show a warning that there are errors.
 33+# Validator_ERRORS_SHOW : Validator will make the best of the input it got, but will show a list of all errors.
 34+$egValidatorFatalLevel = Validator_ERRORS_SHOW;
\ No newline at end of file
Property changes on: tags/extensions/Validator/REL_0_3_4/Validator_Settings.php
___________________________________________________________________
Added: svn:eol-style
135 + native
Index: tags/extensions/Validator/REL_0_3_4/README
@@ -0,0 +1,12 @@
 2+== About ==
 3+
 4+Validator is an extension that makes parameter validation functionality available
 5+to other extensions. This enables other extensions to validate parameters, set them
 6+to their defaults, and generate error messages, while only defining the parameters
 7+and their criteria.
 8+
 9+Notes on installing Validator are found in the file INSTALL.
 10+
 11+== Contributors ==
 12+
 13+http://www.mediawiki.org/wiki/Extension:Validator#Contributing_to_the_project

Status & tagging log