r69962 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69961‎ | r69962 | r69963 >
Date:20:02, 26 July 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Tag for 0.3.5.
Modified paths:
  • /tags/extensions/Validator/REL_0_3_5 (added) (history)
  • /tags/extensions/Validator/REL_0_3_5/COPYING (added) (history)
  • /tags/extensions/Validator/REL_0_3_5/INSTALL (added) (history)
  • /tags/extensions/Validator/REL_0_3_5/README (added) (history)
  • /tags/extensions/Validator/REL_0_3_5/RELEASE-NOTES (added) (history)
  • /tags/extensions/Validator/REL_0_3_5/TopologicalSort.php (added) (history)
  • /tags/extensions/Validator/REL_0_3_5/Validator.class.php (added) (history)
  • /tags/extensions/Validator/REL_0_3_5/Validator.i18n.php (added) (history)
  • /tags/extensions/Validator/REL_0_3_5/Validator.php (added) (history)
  • /tags/extensions/Validator/REL_0_3_5/Validator_Formats.php (added) (history)
  • /tags/extensions/Validator/REL_0_3_5/Validator_Functions.php (added) (history)
  • /tags/extensions/Validator/REL_0_3_5/Validator_Manager.php (added) (history)
  • /tags/extensions/Validator/REL_0_3_5/Validator_Settings.php (added) (history)

Diff [purge]

Index: tags/extensions/Validator/REL_0_3_5/Validator.class.php
@@ -0,0 +1,749 @@
 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+
 237+ $this->mParameters[$mainName] = array(
 238+ 'original-value' => $paramData,
 239+ 'original-name' => $paramName,
 240+ );
 241+ }
 242+ }
 243+ else {
 244+ $this->mErrors[] = array( 'type' => 'override', 'name' => $mainName );
 245+ }
 246+ }
 247+ else { // If the parameter is not found in the list of allowed ones, add an item to the $this->mErrors array.
 248+ if ( self::$storeUnknownParameters ) $this->mUnknownParams[] = $paramName;
 249+ $this->mErrors[] = array( 'type' => 'unknown', 'name' => $paramName );
 250+ }
 251+ }
 252+ }
 253+
 254+ /**
 255+ * Returns the main parameter name for a given parameter or alias, or false
 256+ * when it is not recognized as main parameter or alias.
 257+ *
 258+ * @param string $paramName
 259+ *
 260+ * @return string or false
 261+ */
 262+ private function getMainParamName( $paramName ) {
 263+ $result = false;
 264+
 265+ if ( array_key_exists( $paramName, $this->mParameterInfo ) ) {
 266+ $result = $paramName;
 267+ }
 268+ else {
 269+ foreach ( $this->mParameterInfo as $name => $data ) {
 270+ if ( array_key_exists( 'aliases', $data ) && in_array( $paramName, $data['aliases'] ) ) {
 271+ $result = $name;
 272+ break;
 273+ }
 274+ }
 275+ }
 276+
 277+ return $result;
 278+ }
 279+
 280+ /**
 281+ * First determines the order of parameter handling based on the dependency definitons,
 282+ * and then goes through the parameters one by one, first validating and then formatting,
 283+ * storing any encountered errors along the way.
 284+ *
 285+ * The 'value' element is set here, either by the cleaned 'original-value' or default.
 286+ */
 287+ public function validateAndFormatParameters() {
 288+ $dependencyList = array();
 289+
 290+ foreach ( $this->mParameterInfo as $paramName => $paramInfo ) {
 291+ $dependencyList[$paramName] =
 292+ array_key_exists( 'dependencies', $paramInfo ) ? (array)$paramInfo['dependencies'] : array();
 293+ }
 294+
 295+ $sorter = new TopologicalSort( $dependencyList, true );
 296+ $orderedParameters = $sorter->doSort();
 297+
 298+ foreach ( $orderedParameters as $paramName ) {
 299+ $paramInfo = $this->mParameterInfo[$paramName];
 300+
 301+ // If the user provided a value for this parameter, validate and handle it.
 302+ if ( array_key_exists( $paramName, $this->mParameters ) ) {
 303+
 304+ $this->cleanParameter( $paramName );
 305+
 306+ if ( $this->validateParameter( $paramName ) ) {
 307+ // If the validation succeeded, add the parameter to the list of valid ones.
 308+ $this->mValidParams[] = $paramName;
 309+ $this->setOutputTypes( $paramName );
 310+ }
 311+ else {
 312+ // If the validation failed, add the parameter to the list of invalid ones.
 313+ $this->mInvalidParams[] = $paramName;
 314+ }
 315+ }
 316+ else {
 317+ // If the parameter is required, add a new error of type 'missing'.
 318+ // TODO: break when has dependencies
 319+ if ( array_key_exists( 'required', $paramInfo ) && $paramInfo['required'] ) {
 320+ $this->mErrors[] = array( 'type' => 'missing', 'name' => $paramName );
 321+ }
 322+ else {
 323+ // Set the default value (or default 'default value' if none is provided), and ensure the type is correct.
 324+ $this->mParameters[$paramName]['value'] = array_key_exists( 'default', $paramInfo ) ? $paramInfo['default'] : self::$defaultDefaultValue;
 325+ $this->mValidParams[] = $paramName;
 326+ $this->setOutputTypes( $paramName );
 327+ }
 328+ }
 329+ }
 330+ }
 331+
 332+ /**
 333+ * Ensures the parameter info is valid and parses list types.
 334+ *
 335+ * @param string $name
 336+ */
 337+ private function cleanParameter( $name ) {
 338+ // Ensure there is a criteria array.
 339+ if ( ! array_key_exists( 'criteria', $this->mParameterInfo[$name] ) ) {
 340+ $this->mParameterInfo[$name]['criteria'] = array();
 341+ }
 342+
 343+ // Ensure the type is set in array form.
 344+ if ( ! array_key_exists( 'type', $this->mParameterInfo[$name] ) ) {
 345+ $this->mParameterInfo[$name]['type'] = array( 'string' );
 346+ }
 347+ elseif ( ! is_array( $this->mParameterInfo[$name]['type'] ) ) {
 348+ $this->mParameterInfo[$name]['type'] = array( $this->mParameterInfo[$name]['type'] );
 349+ }
 350+
 351+ if ( array_key_exists( 'type', $this->mParameterInfo[$name] ) ) {
 352+ // Add type specific criteria.
 353+ switch( strtolower( $this->mParameterInfo[$name]['type'][0] ) ) {
 354+ case 'integer':
 355+ $this->addTypeCriteria( $name, 'is_integer' );
 356+ break;
 357+ case 'float':
 358+ $this->addTypeCriteria( $name, 'is_float' );
 359+ break;
 360+ case 'number': // Note: This accepts non-decimal notations!
 361+ $this->addTypeCriteria( $name, 'is_numeric' );
 362+ break;
 363+ case 'boolean':
 364+ // TODO: work with list of true and false values.
 365+ // TODO: i18n
 366+ $this->addTypeCriteria( $name, 'in_array', array( 'yes', 'no', 'on', 'off' ) );
 367+ break;
 368+ case 'char':
 369+ $this->addTypeCriteria( $name, 'has_length', array( 1, 1 ) );
 370+ break;
 371+ }
 372+ }
 373+
 374+ // If the original-value element is set, clean it, and store as value.
 375+ if ( array_key_exists( 'original-value', $this->mParameters[$name] ) ) {
 376+ $value = $this->mParameters[$name]['original-value'];
 377+
 378+ if ( count( $this->mParameterInfo[$name]['type'] ) > 1 && $this->mParameterInfo[$name]['type'][1] == 'list' ) {
 379+ // Trimming and splitting of list values.
 380+ $delimiter = count( $this->mParameterInfo[$name]['type'] ) > 2 ? $this->mParameterInfo[$name]['type'][2] : self::$defaultListDelimeter;
 381+ $value = preg_replace( '/((\s)*' . $delimiter . '(\s)*)/', $delimiter, $value );
 382+ $value = explode( $delimiter, $value );
 383+ }
 384+ elseif ( count( $this->mParameterInfo[$name]['type'] ) > 1 && $this->mParameterInfo[$name]['type'][1] == 'array' && is_array( $value ) ) {
 385+ // Trimming of array values.
 386+ for ( $i = count( $value ); $i > 0; $i-- ) $value[$i] = trim( $value[$i] );
 387+ }
 388+
 389+ $this->mParameters[$name]['value'] = $value;
 390+ }
 391+ }
 392+
 393+ private function addTypeCriteria( $paramName, $criteriaName, $criteriaArgs = array() ) {
 394+ $this->mParameterInfo[$paramName]['criteria'] = array_merge(
 395+ array( $criteriaName => $criteriaArgs ),
 396+ $this->mParameterInfo[$paramName]['criteria']
 397+ );
 398+ }
 399+
 400+ /**
 401+ * Valides the provided parameter.
 402+ *
 403+ * This method itself validates the list criteria, if any. After this the regular criteria
 404+ * are validated by calling the doItemValidation method.
 405+ *
 406+ * @param string $name
 407+ *
 408+ * @return boolean Indicates whether there the parameter value(s) is/are valid.
 409+ */
 410+ private function validateParameter( $name ) {
 411+ $hasNoErrors = $this->doListValidation( $name );
 412+
 413+ if ( $hasNoErrors || self::$accumulateParameterErrors ) {
 414+ $hasNoErrors = $hasNoErrors && $this->doItemValidation( $name );
 415+ }
 416+
 417+ return $hasNoErrors;
 418+ }
 419+
 420+ /**
 421+ * Validates the list criteria for a parameter, if there are any.
 422+ *
 423+ * @param string $name
 424+ */
 425+ private function doListValidation( $name ) {
 426+ $hasNoErrors = true;
 427+
 428+ if ( array_key_exists( 'list-criteria', $this->mParameterInfo[$name] ) ) {
 429+ foreach ( $this->mParameterInfo[$name]['list-criteria'] as $criteriaName => $criteriaArgs ) {
 430+ // Get the validation function. If there is no matching function, throw an exception.
 431+ if ( array_key_exists( $criteriaName, self::$mListValidationFunctions ) ) {
 432+ $validationFunction = self::$mListValidationFunctions[$criteriaName];
 433+ $isValid = $this->doCriteriaValidation( $validationFunction, $this->mParameters['value'], $name, $criteriaArgs );
 434+
 435+ // Add a new error when the validation failed, and break the loop if errors for one parameter should not be accumulated.
 436+ if ( ! $isValid ) {
 437+ $hasNoErrors = false;
 438+
 439+ $this->mErrors[] = array(
 440+ 'type' => $criteriaName,
 441+ 'args' => $criteriaArgs,
 442+ 'name' => $this->mParameters[$name]['original-name'],
 443+ 'list' => true,
 444+ 'value' => $this->mParameters[$name]['original-value']
 445+ );
 446+
 447+ if ( !self::$accumulateParameterErrors ) {
 448+ break;
 449+ }
 450+ }
 451+ }
 452+ else {
 453+ $hasNoErrors = false;
 454+ throw new Exception( 'There is no validation function for list criteria type ' . $criteriaName );
 455+ }
 456+ }
 457+ }
 458+
 459+ return $hasNoErrors;
 460+ }
 461+
 462+ /**
 463+ * Valides the provided parameter by matching the value against the item criteria for the name.
 464+ *
 465+ * @param string $name
 466+ *
 467+ * @return boolean Indicates whether there the parameter value(s) is/are valid.
 468+ */
 469+ private function doItemValidation( $name ) {
 470+ $hasNoErrors = true;
 471+
 472+ $value = &$this->mParameters[$name]['value'];
 473+
 474+ // Go through all item criteria.
 475+ foreach ( $this->mParameterInfo[$name]['criteria'] as $criteriaName => $criteriaArgs ) {
 476+ // Get the validation function. If there is no matching function, throw an exception.
 477+ if ( array_key_exists( $criteriaName, self::$mValidationFunctions ) ) {
 478+ $validationFunction = self::$mValidationFunctions[$criteriaName];
 479+
 480+ if ( is_array( $value ) ) {
 481+ // Handling of list parameters
 482+ $invalidItems = array();
 483+ $validItems = array();
 484+
 485+ // Loop through all the items in the parameter value, and validate them.
 486+ foreach ( $value as $item ) {
 487+ $isValid = $this->doCriteriaValidation( $validationFunction, $item, $name, $criteriaArgs );
 488+ if ( $isValid ) {
 489+ // If per item validation is on, store the valid items, so only these can be returned by Validator.
 490+ if ( self::$perItemValidation ) $validItems[] = $item;
 491+ }
 492+ else {
 493+ // If per item validation is on, store the invalid items, so a fitting error message can be created.
 494+ if ( self::$perItemValidation ) {
 495+ $invalidItems[] = $item;
 496+ }
 497+ else {
 498+ // If per item validation is not on, an error to one item means the complete value is invalid.
 499+ // Therefore it's not required to validate the remaining items.
 500+ break;
 501+ }
 502+ }
 503+ }
 504+
 505+ if ( self::$perItemValidation ) {
 506+ // If per item validation is on, the parameter value is valid as long as there is at least one valid item.
 507+ $isValid = count( $validItems ) > 0;
 508+
 509+ // If the value is valid, but there are invalid items, add an error with a list of these items.
 510+ if ( $isValid && count( $invalidItems ) > 0 ) {
 511+ $value = $validItems;
 512+ $this->mErrors[] = array(
 513+ 'type' => $criteriaName,
 514+ 'args' => $criteriaArgs,
 515+ 'name' => $this->mParameters[$name]['original-name'],
 516+ 'list' => true,
 517+ 'invalid-items' => $invalidItems
 518+ );
 519+ }
 520+ }
 521+ }
 522+ else {
 523+ // Determine if the value is valid for single valued parameters.
 524+ $isValid = $this->doCriteriaValidation( $validationFunction, $value, $name, $criteriaArgs );
 525+ }
 526+
 527+ // Add a new error when the validation failed, and break the loop if errors for one parameter should not be accumulated.
 528+ if ( !$isValid ) {
 529+ $this->mErrors[] = array(
 530+ 'type' => $criteriaName,
 531+ 'args' => $criteriaArgs,
 532+ 'name' => $this->mParameters[$name]['original-name'],
 533+ 'list' => is_array( $value ),
 534+ 'value' => $this->mParameters[$name]['original-value']
 535+ );
 536+
 537+ $hasNoErrors = false;
 538+ if ( !self::$accumulateParameterErrors ) break;
 539+ }
 540+ }
 541+ else {
 542+ $hasNoErrors = false;
 543+ throw new Exception( 'There is no validation function for criteria type ' . $criteriaName );
 544+ }
 545+ }
 546+
 547+ return $hasNoErrors;
 548+ }
 549+
 550+ /**
 551+ * Calls the validation function for the provided list or single value and returns it's result.
 552+ * The call is made with these parameters:
 553+ * - value: The value that is the complete list, or a single item.
 554+ * - parameter name: For lookups in the param info array.
 555+ * - parameter array: All data about the parameters gathered so far (this includes dependencies!).
 556+ * - output type info: Type info as provided by the parameter definition. This can be zero or more parameters.
 557+ *
 558+ * @param $validationFunction
 559+ * @param mixed $value
 560+ * @param string $name
 561+ * @param array $criteriaArgs
 562+ *
 563+ * @return boolean
 564+ */
 565+ private function doCriteriaValidation( $validationFunction, $value, $name, array $criteriaArgs ) {
 566+ // Call the validation function and store the result.
 567+ $parameters = array( &$value, $name, $this->mParameters );
 568+ $parameters = array_merge( $parameters, $criteriaArgs );
 569+ return call_user_func_array( $validationFunction, $parameters );
 570+ }
 571+
 572+ /**
 573+ * Changes the invalid parameters to their default values, and changes their state to valid.
 574+ */
 575+ public function correctInvalidParams() {
 576+ while ( $paramName = array_shift( $this->mInvalidParams ) ) {
 577+ if ( array_key_exists( 'default', $this->mParameterInfo[$paramName] ) ) {
 578+ $this->mParameters[$paramName]['value'] = $this->mParameterInfo[$paramName]['default'];
 579+ }
 580+ else {
 581+ $this->mParameters[$paramName]['value'] = self::$defaultDefaultValue;
 582+ }
 583+
 584+ $this->setOutputTypes( $paramName );
 585+ $this->mValidParams[] = $paramName;
 586+ }
 587+ }
 588+
 589+ /**
 590+ * Ensures the output type values are arrays, and then calls setOutputType.
 591+ *
 592+ * @param string $name
 593+ */
 594+ private function setOutputTypes( $name ) {
 595+ $info = $this->mParameterInfo[$name];
 596+
 597+ if ( array_key_exists( 'output-types', $info ) ) {
 598+ for ( $i = 0, $c = count( $info['output-types'] ); $i < $c; $i++ ) {
 599+ if ( ! is_array( $info['output-types'][$i] ) ) $info['output-types'][$i] = array( $info['output-types'][$i] );
 600+ $this->setOutputType( $name, $info['output-types'][$i] );
 601+ }
 602+ }
 603+ elseif ( array_key_exists( 'output-type', $info ) ) {
 604+ if ( ! is_array( $info['output-type'] ) ) $info['output-type'] = array( $info['output-type'] );
 605+ $this->setOutputType( $name, $info['output-type'] );
 606+ }
 607+
 608+ }
 609+
 610+ /**
 611+ * Calls the formatting function for the provided output format with these parameters:
 612+ * - parameter value: ByRef for easy manipulation.
 613+ * - parameter name: For lookups in the param info array.
 614+ * - parameter array: All data about the parameters gathered so far (this includes dependencies!).
 615+ * - output type info: Type info as provided by the parameter definition. This can be zero or more parameters.
 616+ *
 617+ * @param string $name
 618+ * @param array $typeInfo
 619+ */
 620+ private function setOutputType( $name, array $typeInfo ) {
 621+ // The output type is the first value in the type info array.
 622+ // The remaining ones will be any extra arguments.
 623+ $outputType = strtolower( array_shift( $typeInfo ) );
 624+
 625+ if ( !array_key_exists( 'formatted-value', $this->mParameters[$name] ) ) {
 626+ $this->mParameters[$name]['formatted-value'] = $this->mParameters[$name]['value'];
 627+ }
 628+
 629+ if ( array_key_exists( $outputType, self::$mOutputFormats ) ) {
 630+ $parameters = array( &$this->mParameters[$name]['formatted-value'], $name, $this->mParameters );
 631+ $parameters = array_merge( $parameters, $typeInfo );
 632+ call_user_func_array( self::$mOutputFormats[$outputType], $parameters );
 633+ }
 634+ else {
 635+ throw new Exception( 'There is no formatting function for output format ' . $outputType );
 636+ }
 637+ }
 638+
 639+ /**
 640+ * Returns the valid parameters.
 641+ *
 642+ * @param boolean $includeMetaData
 643+ *
 644+ * @return array
 645+ */
 646+ public function getValidParams( $includeMetaData ) {
 647+ if ( $includeMetaData ) {
 648+ return $this->mValidParams;
 649+ }
 650+ else {
 651+ $validParams = array();
 652+
 653+ foreach( $this->mValidParams as $name ) {
 654+ $key = array_key_exists( 'formatted-value', $this->mParameters[$name] ) ? 'formatted-value' : 'value';
 655+ $validParams[$name] = $this->mParameters[$name][$key];
 656+ }
 657+
 658+ return $validParams;
 659+ }
 660+ }
 661+
 662+ /**
 663+ * Returns the unknown parameters.
 664+ *
 665+ * @return array
 666+ */
 667+ public static function getUnknownParams() {
 668+ $unknownParams = array();
 669+
 670+ foreach( $this->mUnknownParams as $name ) {
 671+ $unknownParams[$name] = $this->mParameters[$name];
 672+ }
 673+
 674+ return $unknownParams;
 675+ }
 676+
 677+ /**
 678+ * Returns the errors.
 679+ *
 680+ * @return array
 681+ */
 682+ public function getErrors() {
 683+ return $this->mErrors;
 684+ }
 685+
 686+ /**
 687+ * @return boolean
 688+ */
 689+ public function hasErrors() {
 690+ return count( $this->mErrors ) > 0;
 691+ }
 692+
 693+ /**
 694+ * Returns wether there are any fatal errors. Fatal errors are either missing or invalid required parameters,
 695+ * or simply any sort of error when the validation level is equal to (or bigger then) Validator_ERRORS_STRICT.
 696+ *
 697+ * @return boolean
 698+ */
 699+ public function hasFatalError() {
 700+ global $egValidatorErrorLevel;
 701+ $has = $this->hasErrors() && $egValidatorErrorLevel >= Validator_ERRORS_STRICT;
 702+
 703+ if ( !$has ) {
 704+ foreach ( $this->mErrors as $error ) {
 705+ if ( $error['type'] == 'missing' ) {
 706+ $has = true;
 707+ break;
 708+ }
 709+ }
 710+ }
 711+
 712+ return $has;
 713+ }
 714+
 715+ /**
 716+ * Adds a new criteria type and the validation function that should validate values of this type.
 717+ * You can use this function to override existing criteria type handlers.
 718+ *
 719+ * @param string $criteriaName The name of the cirteria.
 720+ * @param array $functionName The functions location. If it's a global function, only the name,
 721+ * if it's in a class, first the class name, then the method name.
 722+ */
 723+ public static function addValidationFunction( $criteriaName, array $functionName ) {
 724+ self::$mValidationFunctions[$criteriaName] = $functionName;
 725+ }
 726+
 727+ /**
 728+ * Adds a new list criteria type and the validation function that should validate values of this type.
 729+ * You can use this function to override existing criteria type handlers.
 730+ *
 731+ * @param string $criteriaName The name of the list cirteria.
 732+ * @param array $functionName The functions location. If it's a global function, only the name,
 733+ * if it's in a class, first the class name, then the method name.
 734+ */
 735+ public static function addListValidationFunction( $criteriaName, array $functionName ) {
 736+ self::$mListValidationFunctions[strtolower( $criteriaName )] = $functionName;
 737+ }
 738+
 739+ /**
 740+ * Adds a new output format and the formatting function that should validate values of this type.
 741+ * You can use this function to override existing criteria type handlers.
 742+ *
 743+ * @param string $formatName The name of the format.
 744+ * @param array $functionName The functions location. If it's a global function, only the name,
 745+ * if it's in a class, first the class name, then the method name.
 746+ */
 747+ public static function addOutputFormat( $formatName, array $functionName ) {
 748+ self::$mOutputFormats[strtolower( $formatName )] = $functionName;
 749+ }
 750+}
\ No newline at end of file
Index: tags/extensions/Validator/REL_0_3_5/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
Index: tags/extensions/Validator/REL_0_3_5/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
Index: tags/extensions/Validator/REL_0_3_5/INSTALL
@@ -0,0 +1,11 @@
 2+[[Validator 0.3.5]]
 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_5/RELEASE-NOTES
@@ -0,0 +1,87 @@
 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.5 ===
 11+(2010-07-26)
 12+
 13+* Fixed issue with the original parameter name (and in some cases also value) in error messages.
 14+
 15+=== Validator 0.3.4 ===
 16+(2010-07-07)
 17+
 18+* Fixed issue with parameter reference that occured in php 5.3 and later.
 19+
 20+* Fixed escaping issue that caused parameter names in error messages to be shown incorrectly.
 21+
 22+* Fixed small issue with parameter value trimming that caused problems when objects where passed.
 23+
 24+=== Validator 0.3.3 ===
 25+(2010-06-20)
 26+
 27+* Fixed bug that caused notices when using the ValidatorManager::manageParsedParameters method in some cases.
 28+
 29+=== Validator 0.3.2 ===
 30+(2010-06-07)
 31+
 32+* Added lower casing to parameter names, and optionally, but default on, lower-casing for parameter values.
 33+
 34+* Added removal of default parameters from the default parameter queue when used as a named parameter.
 35+
 36+=== Validator 0.3.1 ===
 37+(2010-06-04)
 38+
 39+* Added ValidatorManager::manageParsedParameters and Validator::setParameters.
 40+
 41+=== Validator 0.3 ===
 42+(2010-05-31)
 43+
 44+* Added generic default parameter support.
 45+
 46+* Added parameter dependency support.
 47+
 48+* Added full meta data support for validation and formatting functions, enabling more advanced handling of parameters.
 49+
 50+* Major refactoring to conform to MediaWiki convention.
 51+
 52+=== Validator 0.2.2 ===
 53+(2010-03-01)
 54+
 55+* Fixed potential xss vectors.
 56+
 57+* Minor code improvements.
 58+
 59+=== Validator 0.2.1 ===
 60+(2010-02-01)
 61+
 62+* Changed the inclusion of the upper bound for range validation functions.
 63+
 64+* Small language fixes.
 65+
 66+=== Validator 0.2 ===
 67+(2009-12-25)
 68+
 69+* Added handling for lists of a type, instead of having list as a type. This includes per-item-validation and per-item-defaulting.
 70+
 71+* Added list validation functions: item_count and unique_items
 72+
 73+* Added boolean, number and char types.
 74+
 75+* 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.
 76+
 77+* Added Validator_ERRORS_MINIMAL value for $egValidatorErrorLevel.
 78+
 79+* Added warning message to ValidatorManager that will be shown for errors when egValidatorErrorLevel is Validator_ERRORS_WARN.
 80+
 81+* Added criteria support for is_boolean, has_length and regex.
 82+
 83+=== Validator 0.1 ===
 84+(2009-12-17)
 85+
 86+* Initial release, featuring parameter validation, defaulting and error generation.
 87+
 88+{{Validator see also}}
\ No newline at end of file
Index: tags/extensions/Validator/REL_0_3_5/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
Index: tags/extensions/Validator/REL_0_3_5/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_5/Validator.i18n.php
@@ -0,0 +1,950 @@
 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_list_error_empty_argument' => 'Parameter $1 tidak menerima nilai kosong.',
 522+ 'validator_list_error_must_be_number' => 'Parameter $1 hanya dapat berisi angka.',
 523+ 'validator_list_error_must_be_integer' => 'Parameter $1 hanya dapat berisi bilangan bulat.',
 524+ 'validator_list_error_invalid_range' => 'Semua nilai parameter $1 harus antara $2 dan $3.',
 525+ 'validator_list_error_invalid_argument' => 'Satu nilai atau lebih untuk parameter $1 tidak sah.',
 526+ 'validator_list_omitted' => '{{PLURAL:$2|Nilai|Nilai}} $1 {{PLURAL:$2|telah|telah}} dihapus.',
 527+ 'validator_error_accepts_only' => 'Parameter $1 hanya menerima {{PLURAL:$3|nilai ini|nilai ini}}: $2.',
 528+);
 529+
 530+/** Italian (Italiano)
 531+ * @author Civvì
 532+ * @author HalphaZ
 533+ */
 534+$messages['it'] = array(
 535+ '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.',
 536+ 'validator_error_parameters' => 'Nella tua sintassi {{PLURAL:$1|è stato individuato il seguente errore|sono stati individuati i seguenti errori}}:',
 537+ 'validator_warning_parameters' => "Nella tua sintassi {{PLURAL:$1|c'è un errore|ci sono errori}}.",
 538+ 'validator_error_unknown_argument' => '$1 non è un parametro valido.',
 539+ 'validator_error_required_missing' => 'Il parametro richiesto $1 non è stato fornito.',
 540+ 'validator_error_empty_argument' => 'Il parametro $1 non può avere un valore vuoto.',
 541+ 'validator_error_must_be_number' => 'Il parametro $1 può essere solo un numero.',
 542+ 'validator_error_must_be_integer' => 'Il parametro $1 può essere solo un intero.',
 543+ 'validator_error_invalid_range' => 'Il parametro $1 deve essere compreso tra $2 e $3.',
 544+ 'validator_error_invalid_argument' => 'Il valore $1 non è valido per il parametro $2.',
 545+ 'validator_list_error_empty_argument' => 'Il parametro $1 non accetta valori vuoti.',
 546+ 'validator_list_error_must_be_number' => 'Il parametro $1 può contenere solo numeri.',
 547+ 'validator_list_error_must_be_integer' => 'Il parametro $1 può contenere solo numeri interi.',
 548+ 'validator_list_error_invalid_range' => 'Tutti i valori del parametro $1 devono essere compresi tra $2 e $3.',
 549+ 'validator_list_error_invalid_argument' => 'Uno o più valori del parametro $1 non sono validi.',
 550+ 'validator_list_omitted' => '{{PLURAL:$2|Il valore|I valori}} $1 {{PLURAL:$2|è stato omesso|sono stati omessi}}.',
 551+ 'validator_error_accepts_only' => 'Il parametro $1 accetta solo {{PLURAL:$3|questo valore|questi valori}}: $2.',
 552+);
 553+
 554+/** Japanese (日本語)
 555+ * @author Aotake
 556+ * @author Fryed-peach
 557+ * @author Whym
 558+ */
 559+$messages['ja'] = array(
 560+ 'validator-desc' => '妥当性評価器は他の拡張機能にパーサー関数やタグ拡張の引数の妥当性を確認したり、規定値を設定したり、エラーメッセージを生成する手段を提供する',
 561+ 'validator_error_parameters' => 'あなたの入力から以下の{{PLURAL:$1|エラー|エラー}}が検出されました:',
 562+ 'validator_warning_parameters' => 'あなたの入力した構文には{{PLURAL:$1|エラー}}があります。',
 563+ 'validator_error_unknown_argument' => '$1 は有効な引数ではありません。',
 564+ 'validator_error_required_missing' => '必須の引数「$1」が入力されていません。',
 565+ 'validator_error_empty_argument' => '引数「$1」は空の値をとることができません。',
 566+ 'validator_error_must_be_number' => '引数「$1」は数値でなければなりません。',
 567+ 'validator_error_must_be_integer' => '引数「$1」は整数でなければなりません。',
 568+ 'validator_error_invalid_range' => '引数「$1」は $2 と $3 の間の値でなければなりません。',
 569+ 'validator_error_invalid_argument' => '値「$1」は引数「$2」として妥当ではありません。',
 570+ 'validator_list_error_empty_argument' => '引数「$1」は空の値をとりません。',
 571+ 'validator_list_error_must_be_number' => '引数「$1」は数値しかとることができません。',
 572+ 'validator_list_error_must_be_integer' => '引数「$1」は整数値しかとることができません。',
 573+ 'validator_list_error_invalid_range' => '引数「$1」の値はすべて $2 と $3 の間のものでなくてはなりません。',
 574+ 'validator_list_error_invalid_argument' => '引数「$1」の値に不正なものが1つ以上あります。',
 575+ 'validator_list_omitted' => '{{PLURAL:$2|値}} $1 は省かれました。',
 576+ 'validator_error_accepts_only' => '引数 $1 は次の{{PLURAL:$3|値}}以外を取ることはできません: $2',
 577+);
 578+
 579+/** Colognian (Ripoarisch)
 580+ * @author Purodha
 581+ */
 582+$messages['ksh'] = array(
 583+ '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.',
 584+ 'validator_error_parameters' => '{{PLURAL:$1|Heh dä|Heh di|Keine}} Fähler {{PLURAL:$1|es|sin|es}} en Dinge Syntax opjevalle:',
 585+ 'validator_error_unknown_argument' => '„$1“ es keine jöltijje Parameeter.',
 586+ 'validator_error_required_missing' => 'Dä Parameeter $1 moß aanjejovve sin, un fählt.',
 587+ 'validator_error_empty_argument' => 'Dä Parameeter $1 kann keine Wäät met nix dren hann.',
 588+ 'validator_error_must_be_number' => 'Dä Parameeter $1 kann blohß en Zahl sin.',
 589+ 'validator_error_must_be_integer' => 'Dä Parrameeter $1 kann bloß en jannze Zahl sin.',
 590+ 'validator_error_invalid_range' => 'Dä Parameeter $1 moß zwesche $2 un $3 sin.',
 591+ 'validator_error_invalid_argument' => 'Däm Parameeter $2 singe Wäät es $1, dat es ävver doför nit jöltesch.',
 592+ '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',
 593+);
 594+
 595+/** Luxembourgish (Lëtzebuergesch)
 596+ * @author Les Meloures
 597+ * @author Robby
 598+ */
 599+$messages['lb'] = array(
 600+ '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',
 601+ 'validator_error_parameters' => '{{PLURAL:$1|Dëse Feeler gouf|Dës Feeler goufen}} an Ärer Syntax fonnt:',
 602+ 'validator_warning_parameters' => 'Et {{PLURAL:$1|ass ee|si}} Feeler an Ärer Syntax.',
 603+ 'validator_error_unknown_argument' => '$1 ass kee valbele Parameter.',
 604+ 'validator_error_required_missing' => 'Den obligatoresche Parameter $1 war net derbäi.',
 605+ 'validator_error_empty_argument' => 'De Parameter $1 ka keen eidele Wert hunn.',
 606+ 'validator_error_must_be_number' => 'De Parameter $1 ka just eng Zuel sinn',
 607+ 'validator_error_must_be_integer' => 'De Parameter $1 ka just eng ganz Zuel sinn.',
 608+ 'validator_error_invalid_range' => 'De Parameter $1 muss tëschent $2 an $3 leien.',
 609+ 'validator_error_invalid_argument' => 'De Wert $1 ass net valabel fir de Parameter $2.',
 610+ 'validator_list_error_empty_argument' => 'De Parameter $1 hëlt keng eidel Wäerter un.',
 611+ 'validator_list_error_must_be_number' => 'Am Parameter $1 kënnen nëmmen Zuelen dra sinn.',
 612+ 'validator_list_error_must_be_integer' => 'Am Parameter $1 kënnen nëmme ganz Zuele sinn.',
 613+ 'validator_list_error_invalid_range' => 'All Wäerter vum Parameter $1 mussen tëschent $2 an $3 leien.',
 614+ 'validator_list_error_invalid_argument' => 'Een oder méi Wäerter fir de Parameter $1 sinn net valabel.',
 615+ 'validator_list_omitted' => "{{PLURAL:$2|De Wäert|D'Wäerter}} $1 {{PLURAL:$2|gouf|goufe}} vergiess.",
 616+ 'validator_error_accepts_only' => 'De Parameter $1 akzeptéiert just {{PLURAL:$3|dëse Wäert|dës Wäerter}}: $2',
 617+);
 618+
 619+/** Macedonian (Македонски)
 620+ * @author Bjankuloski06
 621+ * @author McDutchie
 622+ */
 623+$messages['mk'] = array(
 624+ 'validator-desc' => 'Потврдувачот овозможува лесен начин другите додатоци да ги потврдат параметрите на парсерските функции и додатоците со ознаки, да поставаат основно зададени вредности и да создаваат пораки за грешки',
 625+ 'validator_error_parameters' => 'Во вашата синтакса {{PLURAL:$1|е откриена следнава грешка|се откриени следниве грешки}}:',
 626+ 'validator_warning_parameters' => 'Имате {{PLURAL:$1|грешка|грешки}} во синтаксата.',
 627+ 'validator_error_unknown_argument' => '$1 не е важечки параметар.',
 628+ 'validator_error_required_missing' => 'Бараниот параметар $1 не е наведен.',
 629+ 'validator_error_empty_argument' => 'Параметарот $1 не може да има празна вредност.',
 630+ 'validator_error_must_be_number' => 'Параметарот $1 може да биде само број.',
 631+ 'validator_error_must_be_integer' => 'Параметарот $1 може да биде само цел број.',
 632+ 'validator_error_invalid_range' => 'Параметарот $1 мора да изнесува помеѓу $2 и $3.',
 633+ 'validator_error_invalid_argument' => 'Вредноста $1 е неважечка за параметарот $2.',
 634+ 'validator_list_error_empty_argument' => 'Параметарот $1 не прифаќа празни вредности.',
 635+ 'validator_list_error_must_be_number' => 'Параметарот $1 може да содржи само бројки.',
 636+ 'validator_list_error_must_be_integer' => 'Параметарот $1 може да содржи само цели броеви.',
 637+ 'validator_list_error_invalid_range' => 'Сите вредности на параметарот $1 мора да бидат помеѓу $2 и $3.',
 638+ 'validator_list_error_invalid_argument' => 'Една или повеќе вредности на параметарот $1 се неважечки.',
 639+ 'validator_list_omitted' => '{{PLURAL:$2|Вредноста|Вредностите}} $1 {{PLURAL:$2|беше испуштена|беа испуштени}}.',
 640+ 'validator_error_accepts_only' => 'Параметарот $1 {{PLURAL:$3|ја прифаќа само оваа вредност|ги прифаќа само овие вредности}}: $2.',
 641+);
 642+
 643+/** Dutch (Nederlands)
 644+ * @author Jeroen De Dauw
 645+ * @author Siebrand
 646+ */
 647+$messages['nl'] = array(
 648+ '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',
 649+ 'validator_error_parameters' => 'In uw syntaxis {{PLURAL:$1|is de volgende fout|zijn de volgende fouten}} gedetecteerd:',
 650+ 'validator_warning_parameters' => 'Er {{PLURAL:$1|zit een fout|zitten $1 fouten}} in uw syntaxis.',
 651+ 'validator_error_unknown_argument' => '$1 is geen geldige parameter.',
 652+ 'validator_error_required_missing' => 'De verplichte parameter $1 is niet opgegeven.',
 653+ 'validator_error_empty_argument' => 'De parameter $1 mag niet leeg zijn.',
 654+ 'validator_error_must_be_number' => 'De parameter $1 mag alleen een getal zijn.',
 655+ 'validator_error_must_be_integer' => 'De parameter $1 kan alleen een heel getal zijn.',
 656+ 'validator_error_invalid_range' => 'De parameter $1 moet tussen $2 en $3 liggen.',
 657+ 'validator_error_invalid_argument' => 'De waarde $1 is niet geldig voor de parameter $2.',
 658+ 'validator_list_error_empty_argument' => 'Voor de parameter $1 zijn lege waarden niet toegestaan.',
 659+ 'validator_list_error_must_be_number' => 'Voor de parameter $1 zijn alleen getallen toegestaan.',
 660+ 'validator_list_error_must_be_integer' => 'Voor de parameter $1 zijn alleen hele getallen toegestaan.',
 661+ 'validator_list_error_invalid_range' => 'Alle waarden voor de parameter $1 moeten tussen $2 en $3 liggen.',
 662+ 'validator_list_error_invalid_argument' => 'Een of meerdere waarden voor de parameter $1 zijn ongeldig.',
 663+ 'validator_list_omitted' => 'De {{PLURAL:$2|waarde|waarden}} $1 {{PLURAL:$2|mist|missen}}.',
 664+ 'validator_error_accepts_only' => 'De parameter $1 kan alleen de volgende {{PLURAL:$3|waarde|waarden}} hebben: $2.',
 665+);
 666+
 667+/** Norwegian (bokmål)‬ (‪Norsk (bokmål)‬)
 668+ * @author Jon Harald Søby
 669+ * @author Nghtwlkr
 670+ */
 671+$messages['no'] = array(
 672+ 'validator-desc' => 'Validering gir en enkel måte for utvidelser å validere parametere av parserfunksjoner og taggutvidelser, sette standardverdier og generere feilbeskjeder.',
 673+ 'validator_error_parameters' => 'Følgende {{PLURAL:$1|feil|feil}} har blitt oppdaget i syntaksen din:',
 674+ 'validator_warning_parameters' => 'Det er {{PLURAL:$1|én feil|flere feil}} i syntaksen din.',
 675+ 'validator_error_unknown_argument' => '$1 er ikke en gyldig parameter.',
 676+ 'validator_error_required_missing' => 'Den nødvendige parameteren $1 er ikke angitt.',
 677+ 'validator_error_empty_argument' => 'Parameteren $1 kan ikke ha en tom verdi.',
 678+ 'validator_error_must_be_number' => 'Parameter $1 må være et tall.',
 679+ 'validator_error_must_be_integer' => 'Parameteren $1 må være et heltall.',
 680+ 'validator_error_invalid_range' => 'Parameter $1 må være mellom $2 og $3.',
 681+ 'validator_error_invalid_argument' => 'Verdien $1 er ikke en gyldig parameter for $2.',
 682+ 'validator_list_error_empty_argument' => 'Parameteren $1 godtar ikke tomme verdier.',
 683+ 'validator_list_error_must_be_number' => 'Parameteren $1 kan bare inneholde tall.',
 684+ 'validator_list_error_must_be_integer' => 'Parameteren $1 kan bare inneholder heltall.',
 685+ 'validator_list_error_invalid_range' => 'Alle verdier av parameteren $1 må være mellom $2 og $3.',
 686+ 'validator_list_error_invalid_argument' => 'Parameteren $1 har en eller flere ugyldige verdier.',
 687+ 'validator_list_omitted' => '{{PLURAL:$2|Verdien|Verdiene}} $1 har blitt utelatt.',
 688+ 'validator_error_accepts_only' => 'Parameteren $1 kan kun ha {{PLURAL:$3|denne verdien|disse verdiene}}: $2',
 689+);
 690+
 691+/** Occitan (Occitan)
 692+ * @author Cedric31
 693+ * @author Jfblanc
 694+ */
 695+$messages['oc'] = array(
 696+ '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",
 697+ 'validator_error_parameters' => '{{PLURAL:$1|Aquela error es estada detectada|Aquelas errors son estadas detectadas}} dins la sintaxi',
 698+ 'validator_error_unknown_argument' => '$1 es pas un paramètre valedor.',
 699+ 'validator_error_required_missing' => "Manca lo paramètre $1 qu'es obligatòri.",
 700+ 'validator_error_empty_argument' => 'Lo paramètre $1 pòt pas estar voide.',
 701+ 'validator_error_must_be_number' => 'Lo paramètre $1 deu èsser un nombre.',
 702+ 'validator_error_must_be_integer' => 'Lo paramètre $1 deu èsser un nombre entièr.',
 703+ 'validator_error_invalid_range' => 'Lo paramètre $1 deu èsser entre $2 e $3.',
 704+ 'validator_error_invalid_argument' => '$1 es pas valedor pel paramètre $2.',
 705+ 'validator_error_accepts_only' => 'Sonque {{PLURAL:$3|aquela valor es valedora|aquelas valors son valedoras}}pel paramètre $1 : $2.',
 706+);
 707+
 708+/** Polish (Polski)
 709+ * @author Fizykaa
 710+ * @author Sp5uhe
 711+ */
 712+$messages['pl'] = array(
 713+ 'validator-desc' => 'Dostarcza innym rozszerzeniom ogólną obsługę parametrów',
 714+ 'validator_error_parameters' => 'W Twoim kodzie {{PLURAL:$1|został wykryty następujący błąd|zostały wykryte następujące błędy}} składni:',
 715+ 'validator_warning_parameters' => 'W Twoim kodzie {{PLURAL:$1|wystąpił błąd|wystąpiły błędy}} składni.',
 716+ 'validator_error_unknown_argument' => '$1 jest niepoprawnym parametrem.',
 717+ 'validator_error_required_missing' => 'Obowiązkowy parametr $1 nie został przekazany.',
 718+ 'validator_error_empty_argument' => 'Parametr $1 nie może być pusty.',
 719+ 'validator_error_must_be_number' => 'Parametr $1 musi być liczbą.',
 720+ 'validator_error_must_be_integer' => 'Parametr $1 musi być liczbą całkowitą.',
 721+ 'validator_error_invalid_range' => 'Parametr $1 musi zawierać się w przedziale od $2 do $3.',
 722+ 'validator_error_invalid_argument' => 'Nieprawidłowa wartość $1 parametru $2.',
 723+ 'validator_list_error_empty_argument' => 'Parametr $1 nie może być pusty.',
 724+ 'validator_list_error_must_be_number' => 'Parametrem $1 mogą być wyłącznie liczby.',
 725+ 'validator_list_error_must_be_integer' => 'Parametrem $1 mogą być wyłącznie liczby całkowite.',
 726+ 'validator_list_error_invalid_range' => 'Wartości parametru $1 muszą zawierać się w przedziale od $2 do $3.',
 727+ 'validator_list_error_invalid_argument' => 'Przynajmniej jedna wartość parametru $1 jest nieprawidłowa.',
 728+ 'validator_list_omitted' => '{{PLURAL:$2|Parametr|Parametry}} $1 {{PLURAL:$2|został opuszczony|zostały opuszczone}}.',
 729+ 'validator_error_accepts_only' => 'Parametr $1 może przyjmować wyłącznie {{PLURAL:$3|wartość|następujące wartości:}} $2.',
 730+);
 731+
 732+/** Piedmontese (Piemontèis)
 733+ * @author Borichèt
 734+ * @author Dragonòt
 735+ * @author McDutchie
 736+ */
 737+$messages['pms'] = array(
 738+ '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",
 739+ '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:",
 740+ 'validator_warning_parameters' => "{{PLURAL:$1|A-i é n'|A-i son dj'}}eror ant soa sintassi.",
 741+ 'validator_error_unknown_argument' => "$1 a l'é un paràmetr pa bon.",
 742+ 'validator_error_required_missing' => "Ël paràmetr obligatòri $1 a l'é pa dàit.",
 743+ 'validator_error_empty_argument' => 'Ël paràmetr $1 a peul pa avèj un valor veuid.',
 744+ 'validator_error_must_be_number' => 'Ël paràmetr $1 a peul mach esse un nùmer.',
 745+ 'validator_error_must_be_integer' => "Ël paràmetr $1 a peul mach esse n'antregh.",
 746+ 'validator_error_invalid_range' => 'Ël paràmetr $1 a deuv esse an tra $2 e $3.',
 747+ 'validator_error_invalid_argument' => "Ël valor $1 a l'é pa bon për ël paràmetr $2.",
 748+ 'validator_list_error_empty_argument' => 'Ël paràmetr $1 a aceta pa dij valor veuid.',
 749+ 'validator_list_error_must_be_number' => 'Ël paràmetr $1 a peul mach conten-e dij nùmer.',
 750+ 'validator_list_error_must_be_integer' => "Ël paràmetr $1 a peul mach conten-e dj'antegr.",
 751+ 'validator_list_error_invalid_range' => 'Tùit ij valor dël paràmetr $1 a deuvo esse tra $2 e $3.',
 752+ 'validator_list_error_invalid_argument' => 'Un o pi valor dël paràmetr $1 a son pa bon.',
 753+ 'validator_list_omitted' => "{{PLURAL:$2|Ël valor|Ij valor}} $1 {{PLURAL:$2|a l'é|a son}} pa stàit butà.",
 754+ 'validator_error_accepts_only' => 'Ël paràmetr $1 a aceta mach {{PLURAL:$3|sto valor-sì|sti valor-sì}}: $2.',
 755+);
 756+
 757+/** Portuguese (Português)
 758+ * @author Hamilton Abreu
 759+ */
 760+$messages['pt'] = array(
 761+ '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',
 762+ 'validator_error_parameters' => '{{PLURAL:$1|Foi detectado o seguinte erro sintáctico|Foram detectados os seguintes erros sintácticos}}:',
 763+ 'validator_warning_parameters' => '{{PLURAL:$1|Existe um erro sintáctico|Existem erros sintácticos}}.',
 764+ 'validator_error_unknown_argument' => '$1 não é um parâmetro válido.',
 765+ 'validator_error_required_missing' => 'O parâmetro obrigatório $1 não foi fornecido.',
 766+ 'validator_error_empty_argument' => 'O parâmetro $1 não pode estar vazio.',
 767+ 'validator_error_must_be_number' => 'O parâmetro $1 só pode ser numérico.',
 768+ 'validator_error_must_be_integer' => 'O parâmetro $1 só pode ser um número inteiro.',
 769+ 'validator_error_invalid_range' => 'O parâmetro $1 tem de ser entre $2 e $3.',
 770+ 'validator_error_invalid_argument' => 'O valor $1 não é válido para o parâmetro $2.',
 771+ 'validator_list_error_empty_argument' => 'O parâmetro $1 não pode estar vazio.',
 772+ 'validator_list_error_must_be_number' => 'O parâmetro $1 só pode ser numérico.',
 773+ 'validator_list_error_must_be_integer' => 'O parâmetro $1 só pode ser um número inteiro.',
 774+ 'validator_list_error_invalid_range' => 'Todos os valores do parâmetro $1 têm de ser entre $2 e $3.',
 775+ 'validator_list_error_invalid_argument' => 'Um ou mais valores do parâmetro $1 são inválidos.',
 776+ 'validator_list_omitted' => '{{PLURAL:$2|O valor $1 foi omitido|Os valores $1 foram omitidos}}.',
 777+ 'validator_error_accepts_only' => 'O parâmetro $1 só aceita {{PLURAL:$3|este valor|estes valores}}: $2.',
 778+);
 779+
 780+/** Brazilian Portuguese (Português do Brasil)
 781+ * @author Giro720
 782+ * @author Luckas Blade
 783+ */
 784+$messages['pt-br'] = array(
 785+ 'validator-desc' => 'Fornece suporte a manipulação de parâmetros genéricos para outras extensões',
 786+ 'validator_error_parameters' => '{{PLURAL:$1|Foi detectado o seguinte erro sintáctico|Foram detectados os seguintes erros sintácticos}}:',
 787+ 'validator_warning_parameters' => '{{PLURAL:$1|Existe um erro|Existem erros}} em sua sintaxe.',
 788+ 'validator_error_unknown_argument' => '$1 não é um parâmetro válido.',
 789+ 'validator_error_required_missing' => 'O parâmetro obrigatório $1 não foi fornecido.',
 790+ 'validator_error_empty_argument' => 'O parâmetro $1 não pode estar vazio.',
 791+ 'validator_error_must_be_number' => 'O parâmetro $1 só pode ser numérico.',
 792+ 'validator_error_must_be_integer' => 'O parâmetro $1 só pode ser um número inteiro.',
 793+ 'validator_error_invalid_range' => 'O parâmetro $1 tem de ser entre $2 e $3.',
 794+ 'validator_error_invalid_argument' => 'O valor $1 não é válido para o parâmetro $2.',
 795+ 'validator_list_error_empty_argument' => 'O parâmetro $1 não pode estar vazio.',
 796+ 'validator_list_error_must_be_number' => 'O parâmetro $1 só pode ser numérico.',
 797+ 'validator_list_error_must_be_integer' => 'O parâmetro $1 só pode ser um número inteiro.',
 798+ 'validator_list_error_invalid_range' => 'Todos os valores do parâmetro $1 têm de ser entre $2 e $3.',
 799+ 'validator_list_error_invalid_argument' => 'Um ou mais valores do parâmetro $1 são inválidos.',
 800+ 'validator_list_omitted' => '{{PLURAL:$2|O valor $1 foi omitido|Os valores $1 foram omitidos}}.',
 801+ 'validator_error_accepts_only' => 'O parâmetro $1 só aceita {{PLURAL:$3|este valor|estes valores}}: $2.',
 802+);
 803+
 804+/** Russian (Русский)
 805+ * @author Aleksandrit
 806+ * @author Lockal
 807+ * @author McDutchie
 808+ * @author Александр Сигачёв
 809+ */
 810+$messages['ru'] = array(
 811+ 'validator-desc' => 'Валидатор предоставляет другим расширениям возможности проверки параметров функций парсера и тегов, установки значения по умолчанию и создания сообщения об ошибках',
 812+ 'validator_error_parameters' => 'В вашем синтаксисе {{PLURAL:$1|обнаружена следующая ошибка|обнаружены следующие ошибки}}:',
 813+ 'validator_warning_parameters' => 'В вашем синтаксисе {{PLURAL:$1|имеется ошибка|имеются ошибки}}.',
 814+ 'validator_error_unknown_argument' => '$1 не является допустимым параметром.',
 815+ 'validator_error_required_missing' => 'Не указан обязательный параметр $1.',
 816+ 'validator_error_empty_argument' => 'Параметр $1 не может принимать пустое значение.',
 817+ 'validator_error_must_be_number' => 'Значением параметра $1 могут быть только числа.',
 818+ 'validator_error_must_be_integer' => 'Параметр $1 может быть только целым числом.',
 819+ 'validator_error_invalid_range' => 'Параметр $1 должен быть от $2 до $3.',
 820+ 'validator_error_invalid_argument' => 'Значение $1 не является допустимым параметром $2',
 821+ 'validator_list_error_empty_argument' => 'Параметр $1 не может принимать пустые значения.',
 822+ 'validator_list_error_must_be_number' => 'Параметр $1 может содержать только цифры.',
 823+ 'validator_list_error_must_be_integer' => 'Параметр $1 может содержать только целые числа.',
 824+ 'validator_list_error_invalid_range' => 'Все значения параметра $1 должна находиться в диапазоне от $2 до $3.',
 825+ 'validator_list_error_invalid_argument' => 'Одно или несколько значений параметра $1 ошибочны.',
 826+ 'validator_list_omitted' => '{{PLURAL:$2|Значение $1 было пропущено|Значения $1 были пропущены}}.',
 827+ 'validator_error_accepts_only' => 'Параметр $1 может принимать только {{PLURAL:$3|следующее значение|следующие значения}}: $2.',
 828+);
 829+
 830+/** Sinhala (සිංහල)
 831+ * @author Calcey
 832+ */
 833+$messages['si'] = array(
 834+ 'validator-desc' => 'තහවුරු කරන්නා ටැග් දිඟුවන් හා parser ශ්‍රිතවල පරාමිතීන් තහවුරු කිරීමට අනෙක් දිඟුවන් සඳහා පහසු ක්‍රමයක් සපයයි,පෙරනිමි අගයන් පිහිටුවීම හා දෝෂ පණිවුඩ ජනනය කිරීම ද සිදු කරයි',
 835+ 'validator_error_parameters' => 'ඔබේ වාග් රීතිය මඟින් පහත {{PLURAL:$1|දෝෂය|දෝෂයන්}} අනාවරණය කරනු ලැබ ඇත',
 836+ 'validator_error_unknown_argument' => '$1 වලංගු පරාමිතියක් නොවේ.',
 837+ 'validator_error_required_missing' => 'අවශ්‍ය වන $1 පරාමිතිය සපයා නොමැත.',
 838+ 'validator_error_empty_argument' => '$1 පරාමිතියට හිස් අගයක් තිබිය නොහැක.',
 839+ 'validator_error_must_be_number' => '$1 පරාමිතිය විය හැක්කේ ඉලක්කමක් පමණි.',
 840+ 'validator_error_invalid_range' => '$1 පරාමිතිය $2 හා $3 අතර විය යුතුය.',
 841+ 'validator_error_invalid_argument' => '$2 පරාමිතිය සඳහා $1 අගය වලංගු නොවේ.',
 842+ 'validator_error_accepts_only' => '$1 පරාමිතිය විසින් පිළිගනු ලබන්නේ {{PLURAL:$3|මෙම අගය|මෙම අගයන්}}: $2 පමණි.',
 843+);
 844+
 845+/** Swedish (Svenska)
 846+ * @author Fluff
 847+ * @author Ozp
 848+ * @author Per
 849+ * @author Sertion
 850+ */
 851+$messages['sv'] = array(
 852+ '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',
 853+ 'validator_error_parameters' => 'Följande {{PLURAL:$1|fel|fel}} har upptäckts i din syntax:',
 854+ 'validator_warning_parameters' => 'Det finns {{PLURAL:$1|ett|flera}} fel i din syntax.',
 855+ 'validator_error_unknown_argument' => '$1 är inte en giltig paramter.',
 856+ 'validator_error_required_missing' => 'Den nödvändiga parametern $1 har inte angivits.',
 857+ 'validator_error_empty_argument' => 'Parametern $1 kan inte lämnas tom.',
 858+ 'validator_error_must_be_number' => 'Parameter $1 måste bestå av ett tal.',
 859+ 'validator_error_must_be_integer' => 'Parametern $1 måste vara ett heltal.',
 860+ 'validator_error_invalid_range' => 'Parameter $1 måste vara i mellan $2 och $3.',
 861+ 'validator_error_invalid_argument' => 'Värdet $1 är inte giltigt som parameter $2.',
 862+ 'validator_list_error_empty_argument' => 'Parameter $1 accepterar inte tomma värden.',
 863+ 'validator_list_error_must_be_number' => 'Parameter $1 får endast innehålla siffror.',
 864+ 'validator_list_error_must_be_integer' => 'Parameter $1 får endast innehålla heltal.',
 865+ 'validator_list_error_invalid_range' => 'Alla värden av parameter $1 måste vara mellan $2 och $3.',
 866+ 'validator_list_error_invalid_argument' => 'Ett eller flera värden av parameter $1 är ogiltiga.',
 867+ 'validator_list_omitted' => '{{PLURAL:$2|Värdet|Värdena}} $1 har blivit {{PLURAL:$2|utelämnat|utelämnade}}.',
 868+ 'validator_error_accepts_only' => 'Parametern $1 måste ha {{PLURAL:$3|detta värde|ett av dessa värden}}: $2.',
 869+);
 870+
 871+/** Telugu (తెలుగు)
 872+ * @author Ravichandra
 873+ */
 874+$messages['te'] = array(
 875+ 'validator_error_unknown_argument' => '$1 అనేది సరైన పరామితి కాదు.',
 876+ 'validator_error_required_missing' => 'తప్పకుండా కావాల్సిన $1 పరామితిని ఇవ్వలేదు.',
 877+ 'validator_error_empty_argument' => '$1 పరామితి ఖాళీగా ఉండకూడదు',
 878+ 'validator_error_must_be_number' => '$1 పరామితి ఖచ్చితంగా ఓ సంఖ్య అయిఉండాలి',
 879+ 'validator_error_must_be_integer' => '$1 పరామితి ఒక పూర్ణసంఖ్య అయిఉండాలి',
 880+ 'validator_error_invalid_range' => '$1 పరామితి $2, $3 మద్యలో ఉండాలి.',
 881+ 'validator_error_invalid_argument' => '$2 పరామితి కోసం $1 విలువ సరైంది కాదు',
 882+);
 883+
 884+/** Tagalog (Tagalog)
 885+ * @author AnakngAraw
 886+ */
 887+$messages['tl'] = array(
 888+ 'validator-desc' => 'Nagbibigay ng panlahatang magtangkilik na paghawak sa ibang mga dugtong',
 889+ 'validator_error_parameters' => 'Ang sumusunod na {{PLURAL:$1|kamalian|mga kamalian}} ay napansin sa iyong sintaks:',
 890+ 'validator_warning_parameters' => 'May {{PLURAL:$1|mali|mga mali}} sa sintaks mo.',
 891+ 'validator_error_unknown_argument' => 'Ang $1 ay isang hindi tanggap na parametro.',
 892+ 'validator_error_required_missing' => 'Hindi ibinigay ang kailangang parametro na $1.',
 893+ 'validator_error_empty_argument' => 'Hindi dapat na isang halagang walang laman ang parametrong $1.',
 894+ 'validator_error_must_be_number' => 'Dapat na bilang lang ang parametrong $1.',
 895+ 'validator_error_must_be_integer' => 'Dapat na tambilang lang ang parametrong $1.',
 896+ 'validator_error_invalid_range' => 'Dapat na nasa pagitan ng $2 at $3 ang parametrong $1.',
 897+ 'validator_error_invalid_argument' => 'Ang halagang $1 ay hindi tanggap para sa parametrong $2.',
 898+ 'validator_list_error_empty_argument' => 'Hindi tumatanggap ng halagang walang laman ang parametrong $1.',
 899+ 'validator_list_error_must_be_number' => 'Dapat na naglalaman lang ng mga bilang ang parametrong $1.',
 900+ 'validator_list_error_must_be_integer' => 'Dapat na naglalaman lang ng mga tambilang ang parametrong $1.',
 901+ 'validator_list_error_invalid_range' => 'Dapat na nasa pagitan ng $2 at $3 ang lahat ng mga halaga ng parametrong $1.',
 902+ 'validator_list_error_invalid_argument' => 'Hindi tanggap ang isa o higit pang mga halaga para sa parametrong $1.',
 903+ 'validator_list_omitted' => 'Tinanggal {{PLURAL:$2|na ang|na ang mga}} {{PLURAL:$2|halaga|halaga}} ng $1.',
 904+ 'validator_error_accepts_only' => 'Tumatanggap lang ang parametrong $1 ng {{PLURAL:$3|ganitong halaga|ganitong mga halaga}}: $2.',
 905+);
 906+
 907+/** Turkish (Türkçe)
 908+ * @author Vito Genovese
 909+ */
 910+$messages['tr'] = array(
 911+ 'validator_error_unknown_argument' => '$1, geçerli bir parametre değildir.',
 912+ 'validator_error_empty_argument' => '$1 parametresi boş bir değere sahip olamaz.',
 913+ 'validator_error_must_be_number' => '$1 parametresi sadece sayı olabilir.',
 914+ 'validator_error_must_be_integer' => '$1 parametresi sadece bir tamsayı olabilir',
 915+ 'validator_list_error_empty_argument' => '$1 parametresi boş değerleri kabul etmemektedir.',
 916+ 'validator_list_error_must_be_number' => '$1 parametresi sadece sayı içerebilir.',
 917+);
 918+
 919+/** Ukrainian (Українська)
 920+ * @author NickK
 921+ * @author Prima klasy4na
 922+ */
 923+$messages['uk'] = array(
 924+ 'validator-desc' => 'Валідатор забезпечує іншим розширенням можливості перевірки параметрів функцій парсера і тегів, встановлення значень за умовчанням та створення повідомлень про помилки',
 925+ 'validator_error_parameters' => 'У вашому синтаксисі {{PLURAL:$1|виявлена така помилка|виявлені такі помилки}}:',
 926+);
 927+
 928+/** Vietnamese (Tiếng Việt)
 929+ * @author Minh Nguyen
 930+ * @author Vinhtantran
 931+ */
 932+$messages['vi'] = array(
 933+ '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.',
 934+ '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:',
 935+ 'validator_warning_parameters' => 'Có {{PLURAL:$1|lỗi|lỗi}} cú pháp trong mã của bạn.',
 936+ 'validator_error_unknown_argument' => '$1 không phải là tham số hợp lệ.',
 937+ 'validator_error_required_missing' => 'Không định rõ tham số bắt buộc “$1”.',
 938+ 'validator_error_empty_argument' => 'Tham số “$1” không được để trống.',
 939+ 'validator_error_must_be_number' => 'Tham số “$1” phải là con số.',
 940+ 'validator_error_must_be_integer' => 'Tham số “$1” phải là số nguyên.',
 941+ 'validator_error_invalid_range' => 'Tham số “$1” phải nằm giữa $2 và $3.',
 942+ 'validator_error_invalid_argument' => 'Giá trị “$1” không hợp tham số “$2”.',
 943+ 'validator_list_error_empty_argument' => 'Không được để trống tham số “$1”.',
 944+ 'validator_list_error_must_be_number' => 'Tham số “$1” chỉ được phép bao gồm con số.',
 945+ 'validator_list_error_must_be_integer' => 'Tham số “$1” chỉ được phép bao gồm số nguyên.',
 946+ '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.',
 947+ 'validator_list_error_invalid_argument' => 'Ít nhất một giá trị của tham số “$1” không hợp lệ.',
 948+ 'validator_list_omitted' => '{{PLURAL:$2|Giá trị|Các giá trị}} “$1” bị bỏ qua.',
 949+ 'validator_error_accepts_only' => 'Tham số $1 chỉ nhận được {{PLURAL:$3|giá trị|các giá trị}} này: $2.',
 950+);
 951+
Index: tags/extensions/Validator/REL_0_3_5/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
Index: tags/extensions/Validator/REL_0_3_5/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.5' );
 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
Index: tags/extensions/Validator/REL_0_3_5/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
Index: tags/extensions/Validator/REL_0_3_5/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