Index: tags/extensions/Validator/REL_0_4_2/INSTALL |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +[[Validator 0.4.2]] |
| 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_4_2/RELEASE-NOTES |
— | — | @@ -0,0 +1,130 @@ |
| 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.4.2 === |
| 11 | +(2010-10-28) |
| 12 | + |
| 13 | +* Fixed compatibility with MediaWiki 1.15.x. |
| 14 | + |
| 15 | +* Removed the lowerCaseValue field in the Parameter class and replaced it's functionality with a ParameterManipulation. |
| 16 | + |
| 17 | +=== Validator 0.4.1 === |
| 18 | +(2010-10-20) |
| 19 | + |
| 20 | +* Various small fixes and improvements |
| 21 | + |
| 22 | +=== Validator 0.4 === |
| 23 | +(2010-10-15) |
| 24 | + |
| 25 | +==== New features ==== |
| 26 | + |
| 27 | +* Added ParserHook class that allows for out-of-the-box parser function and tag extension creation |
| 28 | +: with full Validator support. |
| 29 | + |
| 30 | +* Added listerrors parser hook that allows you to list all validation errors that occurred at the point it's rendered. |
| 31 | + |
| 32 | +* Added support for conditional parameter adding. |
| 33 | + |
| 34 | +==== Refactoring ==== |
| 35 | + |
| 36 | +Basically everything got rewritten... |
| 37 | + |
| 38 | +* Added Parameter and ListParameter classes to replace parameter definitions in array form. |
| 39 | + |
| 40 | +* Added ParameterCriterion and ListParameterCriterion classes for better handling of parameter criteria. |
| 41 | + |
| 42 | +* Added ParameterManipulation and ListParameterManipulation classes for more structured formatting of parameters. |
| 43 | + |
| 44 | +* Added ValidationError class to better describe errors. |
| 45 | + |
| 46 | +* Replaced the error level enum by ValidationError::SEVERITY_ and ValidationError::ACTION_, which are linked in $egErrorActions. |
| 47 | + |
| 48 | +=== Validator 0.3.6 === |
| 49 | +(2010-08-26) |
| 50 | + |
| 51 | +* Added support for 'tolower' argument in parameter info definitions. |
| 52 | + |
| 53 | +=== Validator 0.3.5 === |
| 54 | +(2010-07-26) |
| 55 | + |
| 56 | +* Fixed issue with the original parameter name (and in some cases also value) in error messages. |
| 57 | + |
| 58 | +=== Validator 0.3.4 === |
| 59 | +(2010-07-07) |
| 60 | + |
| 61 | +* Fixed issue with parameter reference that occurred in php 5.3 and later. |
| 62 | + |
| 63 | +* Fixed escaping issue that caused parameter names in error messages to be shown incorrectly. |
| 64 | + |
| 65 | +* Fixed small issue with parameter value trimming that caused problems when objects where passed. |
| 66 | + |
| 67 | +=== Validator 0.3.3 === |
| 68 | +(2010-06-20) |
| 69 | + |
| 70 | +* Fixed bug that caused notices when using the ValidatorManager::manageParsedParameters method in some cases. |
| 71 | + |
| 72 | +=== Validator 0.3.2 === |
| 73 | +(2010-06-07) |
| 74 | + |
| 75 | +* Added lower casing to parameter names, and optionally, but default on, lower-casing for parameter values. |
| 76 | + |
| 77 | +* Added removal of default parameters from the default parameter queue when used as a named parameter. |
| 78 | + |
| 79 | +=== Validator 0.3.1 === |
| 80 | +(2010-06-04) |
| 81 | + |
| 82 | +* Added ValidatorManager::manageParsedParameters and Validator::setParameters. |
| 83 | + |
| 84 | +=== Validator 0.3 === |
| 85 | +(2010-05-31) |
| 86 | + |
| 87 | +* Added generic default parameter support. |
| 88 | + |
| 89 | +* Added parameter dependency support. |
| 90 | + |
| 91 | +* Added full meta data support for validation and formatting functions, enabling more advanced handling of parameters. |
| 92 | + |
| 93 | +* Major refactoring to conform to MediaWiki convention. |
| 94 | + |
| 95 | +=== Validator 0.2.2 === |
| 96 | +(2010-03-01) |
| 97 | + |
| 98 | +* Fixed potential xss vectors. |
| 99 | + |
| 100 | +* Minor code improvements. |
| 101 | + |
| 102 | +=== Validator 0.2.1 === |
| 103 | +(2010-02-01) |
| 104 | + |
| 105 | +* Changed the inclusion of the upper bound for range validation functions. |
| 106 | + |
| 107 | +* Small language fixes. |
| 108 | + |
| 109 | +=== Validator 0.2 === |
| 110 | +(2009-12-25) |
| 111 | + |
| 112 | +* Added handling for lists of a type, instead of having list as a type. This includes per-item-validation and per-item-defaulting. |
| 113 | + |
| 114 | +* Added list validation functions: item_count and unique_items |
| 115 | + |
| 116 | +* Added boolean, number and char types. |
| 117 | + |
| 118 | +* 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. |
| 119 | + |
| 120 | +* Added Validator_ERRORS_MINIMAL value for $egValidatorErrorLevel. |
| 121 | + |
| 122 | +* Added warning message to ValidatorManager that will be shown for errors when egValidatorErrorLevel is Validator_ERRORS_WARN. |
| 123 | + |
| 124 | +* Added criteria support for is_boolean, has_length and regex. |
| 125 | + |
| 126 | +=== Validator 0.1 === |
| 127 | +(2009-12-17) |
| 128 | + |
| 129 | +* Initial release, featuring parameter validation, defaulting and error generation. |
| 130 | + |
| 131 | +{{Validator see also}} |
\ No newline at end of file |
Index: tags/extensions/Validator/REL_0_4_2/includes/ListParameterCriterion.php |
— | — | @@ -0,0 +1,36 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * List parameter criterion definition class. This is for criteria |
| 6 | + * that apply to list parameters as a whole instead of to their |
| 7 | + * individual items. |
| 8 | + * |
| 9 | + * TODO: error message support |
| 10 | + * |
| 11 | + * @since 0.4 |
| 12 | + * |
| 13 | + * @file ListParameterCriterion.php |
| 14 | + * @ingroup Validator |
| 15 | + * @ingroup Criteria |
| 16 | + * |
| 17 | + * @author Jeroen De Dauw |
| 18 | + */ |
| 19 | +abstract class ListParameterCriterion extends ParameterCriterion { |
| 20 | + |
| 21 | + /** |
| 22 | + * Constructor. |
| 23 | + * |
| 24 | + * @since 0.4 |
| 25 | + */ |
| 26 | + public function __construct() { |
| 27 | + parent::__construct(); |
| 28 | + } |
| 29 | + |
| 30 | + /** |
| 31 | + * @see ParameterCriterion::isForLists |
| 32 | + */ |
| 33 | + public function isForLists() { |
| 34 | + return true; |
| 35 | + } |
| 36 | + |
| 37 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/ListParameterCriterion.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 38 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/ListParameterManipulation.php |
— | — | @@ -0,0 +1,34 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * List parameter manipulation base class. This is for manipulations |
| 6 | + * that apply to list parameters as a whole instead of to their |
| 7 | + * individual items. |
| 8 | + * |
| 9 | + * @since 0.4 |
| 10 | + * |
| 11 | + * @file ListParameterManipulation.php |
| 12 | + * @ingroup Validator |
| 13 | + * @ingroup ParameterManipulations |
| 14 | + * |
| 15 | + * @author Jeroen De Dauw |
| 16 | + */ |
| 17 | +abstract class ListParameterManipulation extends ParameterManipulation { |
| 18 | + |
| 19 | + /** |
| 20 | + * Constructor. |
| 21 | + * |
| 22 | + * @since 0.4 |
| 23 | + */ |
| 24 | + public function __construct() { |
| 25 | + parent::__construct(); |
| 26 | + } |
| 27 | + |
| 28 | + /** |
| 29 | + * @see ParameterManipulation::isForLists |
| 30 | + */ |
| 31 | + public function isForLists() { |
| 32 | + return true; |
| 33 | + } |
| 34 | + |
| 35 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/ListParameterManipulation.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 36 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/manipulations/ParamManipulationFunctions.php |
— | — | @@ -0,0 +1,54 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter manipulation for assigning the value to the result of one |
| 6 | + * or more functions with as only argument the value itself. |
| 7 | + * |
| 8 | + * @since 0.4.2 |
| 9 | + * |
| 10 | + * @file ParamManipulationFunctions.php |
| 11 | + * @ingroup Validator |
| 12 | + * @ingroup ParameterManipulations |
| 13 | + * |
| 14 | + * @author Jeroen De Dauw |
| 15 | + */ |
| 16 | +class ParamManipulationFunctions extends ItemParameterManipulation { |
| 17 | + |
| 18 | + /** |
| 19 | + * The names of functions to apply. |
| 20 | + * |
| 21 | + * @since 0.4.2 |
| 22 | + * |
| 23 | + * @var array of callbacks |
| 24 | + */ |
| 25 | + protected $functions = array(); |
| 26 | + |
| 27 | + /** |
| 28 | + * Constructor. |
| 29 | + * |
| 30 | + * @since 0.4.2 |
| 31 | + * |
| 32 | + * You can provide an array with function names or pass each function name as a seperate argument. |
| 33 | + */ |
| 34 | + public function __construct() { |
| 35 | + parent::__construct(); |
| 36 | + |
| 37 | + $args = func_get_args(); |
| 38 | + |
| 39 | + if ( count( $args ) > 0 ) { |
| 40 | + $this->functions = is_array( $args[0] ) ? $args[0] : $args; |
| 41 | + } |
| 42 | + } |
| 43 | + |
| 44 | + /** |
| 45 | + * @see ItemParameterManipulation::doManipulation |
| 46 | + * |
| 47 | + * @since 0.4.2 |
| 48 | + */ |
| 49 | + public function doManipulation( &$value, Parameter $parameter, array &$parameters ) { |
| 50 | + foreach ( $this->functions as $function ) { |
| 51 | + $value = call_user_func( $function, $value ); |
| 52 | + } |
| 53 | + } |
| 54 | + |
| 55 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/manipulations/ParamManipulationFunctions.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 56 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/manipulations/ParamManipulationImplode.php |
— | — | @@ -0,0 +1,55 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter manipulation converting the value into a list by joining the items together. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file ParamManipulationImplode.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup ParameterManipulations |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class ParamManipulationImplode extends ListParameterManipulation { |
| 16 | + |
| 17 | + /** |
| 18 | + * The delimiter to join the items together with. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + * |
| 22 | + * @var string |
| 23 | + */ |
| 24 | + protected $delimiter; |
| 25 | + |
| 26 | + /** |
| 27 | + * A wrapper to encapsulate each item in. |
| 28 | + * |
| 29 | + * @since 0.4 |
| 30 | + * |
| 31 | + * @var string |
| 32 | + */ |
| 33 | + protected $wrapper; |
| 34 | + |
| 35 | + /** |
| 36 | + * Constructor. |
| 37 | + * |
| 38 | + * @since 0.4 |
| 39 | + */ |
| 40 | + public function __construct( $delimiter = ',', $wrapper = '' ) { |
| 41 | + parent::__construct(); |
| 42 | + |
| 43 | + $this->delimiter = $delimiter; |
| 44 | + $this->wrapper = $wrapper; |
| 45 | + } |
| 46 | + |
| 47 | + /** |
| 48 | + * @see ParameterManipulation::manipulate |
| 49 | + * |
| 50 | + * @since 0.4 |
| 51 | + */ |
| 52 | + public function manipulate( Parameter &$parameter, array &$parameters ) { |
| 53 | + $parameter->setValue( $this->wrapper . implode( $this->wrapper . $this->delimiter . $this->wrapper, $parameter->getValue() ) . $this->wrapper ); |
| 54 | + } |
| 55 | + |
| 56 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/manipulations/ParamManipulationImplode.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 57 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/manipulations/ParamManipulationInteger.php |
— | — | @@ -0,0 +1,34 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter manipulation converting the value to a integer. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file ParamManipulationInteger.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup ParameterManipulations |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class ParamManipulationInteger extends ItemParameterManipulation { |
| 16 | + |
| 17 | + /** |
| 18 | + * Constructor. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + */ |
| 22 | + public function __construct() { |
| 23 | + parent::__construct(); |
| 24 | + } |
| 25 | + |
| 26 | + /** |
| 27 | + * @see ItemParameterManipulation::doManipulation |
| 28 | + * |
| 29 | + * @since 0.4 |
| 30 | + */ |
| 31 | + public function doManipulation( &$value, Parameter $parameter, array &$parameters ) { |
| 32 | + $value = (int)$value; |
| 33 | + } |
| 34 | + |
| 35 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/manipulations/ParamManipulationInteger.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 36 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/manipulations/ParamManipulationBoolean.php |
— | — | @@ -0,0 +1,34 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter manipulation converting the value to a boolean. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file ParamManipulationBoolean.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup ParameterManipulations |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class ParamManipulationBoolean extends ItemParameterManipulation { |
| 16 | + |
| 17 | + /** |
| 18 | + * Constructor. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + */ |
| 22 | + public function __construct() { |
| 23 | + parent::__construct(); |
| 24 | + } |
| 25 | + |
| 26 | + /** |
| 27 | + * @see ItemParameterManipulation::doManipulation |
| 28 | + * |
| 29 | + * @since 0.4 |
| 30 | + */ |
| 31 | + public function doManipulation( &$value, Parameter $parameter, array &$parameters ) { |
| 32 | + $value = in_array( $value, array( 'yes', 'on' ) ); |
| 33 | + } |
| 34 | + |
| 35 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/manipulations/ParamManipulationBoolean.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 36 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/manipulations/ParamManipulationBoolstr.php |
— | — | @@ -0,0 +1,34 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter manipulation converting the value to a boolean value as string. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file ParamManipulationBoolstr.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup ParameterManipulations |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class ParamManipulationBoolstr extends ItemParameterManipulation { |
| 16 | + |
| 17 | + /** |
| 18 | + * Constructor. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + */ |
| 22 | + public function __construct() { |
| 23 | + parent::__construct(); |
| 24 | + } |
| 25 | + |
| 26 | + /** |
| 27 | + * @see ItemParameterManipulation::doManipulation |
| 28 | + * |
| 29 | + * @since 0.4 |
| 30 | + */ |
| 31 | + public function doManipulation( &$value, Parameter $parameter, array &$parameters ) { |
| 32 | + $value = $value ? 'true' : 'false'; |
| 33 | + } |
| 34 | + |
| 35 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/manipulations/ParamManipulationBoolstr.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 36 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/manipulations/ParamManipulationFloat.php |
— | — | @@ -0,0 +1,34 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter manipulation converting the value to a float. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file ParamManipulationFloat.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup ParameterManipulations |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class ParamManipulationFloat extends ItemParameterManipulation { |
| 16 | + |
| 17 | + /** |
| 18 | + * Constructor. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + */ |
| 22 | + public function __construct() { |
| 23 | + parent::__construct(); |
| 24 | + } |
| 25 | + |
| 26 | + /** |
| 27 | + * @see ItemParameterManipulation::doManipulation |
| 28 | + * |
| 29 | + * @since 0.4 |
| 30 | + */ |
| 31 | + public function doManipulation( &$value, Parameter $parameter, array &$parameters ) { |
| 32 | + $value = (float)$value; |
| 33 | + } |
| 34 | + |
| 35 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/manipulations/ParamManipulationFloat.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 36 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/ParameterCriterion.php |
— | — | @@ -0,0 +1,46 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter criterion base class. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file ParameterCriterion.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup Criteria |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +abstract class ParameterCriterion { |
| 16 | + |
| 17 | + /** |
| 18 | + * Validate a parameter against the criterion. |
| 19 | + * |
| 20 | + * @param Parameter $parameter |
| 21 | + * @param array $parameters |
| 22 | + * |
| 23 | + * @since 0.4 |
| 24 | + * |
| 25 | + * @return CriterionValidationResult |
| 26 | + */ |
| 27 | + public abstract function validate( Parameter $parameter, array $parameters ); |
| 28 | + |
| 29 | + /** |
| 30 | + * Returns if the criterion applies to lists as a whole. |
| 31 | + * |
| 32 | + * @since 0.4 |
| 33 | + * |
| 34 | + * @return boolean |
| 35 | + */ |
| 36 | + public abstract function isForLists(); |
| 37 | + |
| 38 | + /** |
| 39 | + * Constructor. |
| 40 | + * |
| 41 | + * @since 0.4 |
| 42 | + */ |
| 43 | + public function __construct() { |
| 44 | + |
| 45 | + } |
| 46 | + |
| 47 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/ParameterCriterion.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 48 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/ParameterManipulation.php |
— | — | @@ -0,0 +1,44 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter manipulation base class. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file ParameterManipulation.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup ParameterManipulations |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +abstract class ParameterManipulation { |
| 16 | + |
| 17 | + /** |
| 18 | + * Validate a parameter against the criterion. |
| 19 | + * |
| 20 | + * @param Parameter $parameter |
| 21 | + * @param array $parameters |
| 22 | + * |
| 23 | + * @since 0.4 |
| 24 | + */ |
| 25 | + public abstract function manipulate( Parameter &$parameter, array &$parameters ); |
| 26 | + |
| 27 | + /** |
| 28 | + * Returns if the manipulation applies to lists as a whole. |
| 29 | + * |
| 30 | + * @since 0.4 |
| 31 | + * |
| 32 | + * @return boolean |
| 33 | + */ |
| 34 | + public abstract function isForLists(); |
| 35 | + |
| 36 | + /** |
| 37 | + * Constructor. |
| 38 | + * |
| 39 | + * @since 0.4 |
| 40 | + */ |
| 41 | + public function __construct() { |
| 42 | + |
| 43 | + } |
| 44 | + |
| 45 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/ParameterManipulation.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 46 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/ValidationErrorHandler.php |
— | — | @@ -0,0 +1,58 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Static class for error handling. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file Validator_ErrorHandler.php |
| 10 | + * @ingroup Validator |
| 11 | + * |
| 12 | + * @author Jeroen De Dauw |
| 13 | + */ |
| 14 | +final class ValidationErrorHandler { |
| 15 | + |
| 16 | + /** |
| 17 | + * @since 0.4 |
| 18 | + * |
| 19 | + * @var array of ValidationError |
| 20 | + */ |
| 21 | + protected static $errors = array(); |
| 22 | + |
| 23 | + /** |
| 24 | + * Adds a single ValidationError. |
| 25 | + * |
| 26 | + * @since 0.4 |
| 27 | + * |
| 28 | + * @param string $errorMessage |
| 29 | + * @param integer $severity |
| 30 | + */ |
| 31 | + public static function addError( ValidationError $error ) { |
| 32 | + self::$errors[$error->getElement()][] = $error; |
| 33 | + } |
| 34 | + |
| 35 | + /** |
| 36 | + * Adds a list of ValidationError. |
| 37 | + * |
| 38 | + * @since 0.4 |
| 39 | + * |
| 40 | + * @param array $errors |
| 41 | + */ |
| 42 | + public static function addErrors( array $errors ) { |
| 43 | + foreach ( $errors as $error ) { |
| 44 | + self::addError( $error ); |
| 45 | + } |
| 46 | + } |
| 47 | + |
| 48 | + /** |
| 49 | + * Returns a list of all registered errors. |
| 50 | + * |
| 51 | + * @since 0.4 |
| 52 | + * |
| 53 | + * @return array of ValidationError |
| 54 | + */ |
| 55 | + public static function getErrors() { |
| 56 | + return self::$errors; |
| 57 | + } |
| 58 | + |
| 59 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/ValidationErrorHandler.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 60 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/ValidationError.php |
— | — | @@ -0,0 +1,233 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Error class. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file Validator_Error.php |
| 10 | + * @ingroup Validator |
| 11 | + * |
| 12 | + * @author Jeroen De Dauw |
| 13 | + */ |
| 14 | +class ValidationError { |
| 15 | + |
| 16 | + const SEVERITY_MINOR = 0; // Minor error. ie a decapriation notice |
| 17 | + const SEVERITY_LOW = 1; // Lower-then-normal severity. ie an unknown parameter |
| 18 | + const SEVERITY_NORMAL = 2; // Normal severiry. ie an invalid value provided |
| 19 | + const SEVERITY_HIGH = 3; // Higher-then-normal severity. ie an invalid value for a significant parameter |
| 20 | + const SEVERITY_FATAL = 4; // Fatal error. Either a missing or an invalid required parameter |
| 21 | + |
| 22 | + const ACTION_IGNORE = 0; // Ignore the error |
| 23 | + const ACTION_LOG = 1; // Log the error |
| 24 | + const ACTION_WARN = 2; // Warn that there is an error |
| 25 | + const ACTION_SHOW = 3; // Show the error |
| 26 | + const ACTION_DEMAND = 4; // Show the error and don't render output |
| 27 | + |
| 28 | + public $message; |
| 29 | + public $severity; |
| 30 | + |
| 31 | + /** |
| 32 | + * List of 'tags' for the error. This is mainly ment for indicating an error |
| 33 | + * type, such as 'missing parameter' or 'invalid value', but allows for multiple |
| 34 | + * such indications. |
| 35 | + * |
| 36 | + * @since 0.4 |
| 37 | + * |
| 38 | + * @var array |
| 39 | + */ |
| 40 | + protected $tags; |
| 41 | + |
| 42 | + /** |
| 43 | + * Where the error occured. |
| 44 | + * |
| 45 | + * @since 0.4 |
| 46 | + * |
| 47 | + * @var mixed: string or false |
| 48 | + */ |
| 49 | + public $element; |
| 50 | + |
| 51 | + /** |
| 52 | + * @since 0.4 |
| 53 | + * |
| 54 | + * @param string $message |
| 55 | + * @param integer $severity |
| 56 | + */ |
| 57 | + public function __construct( $message, $severity = self::SEVERITY_NORMAL, $element = false, array $tags = array() ) { |
| 58 | + $this->message = $message; |
| 59 | + $this->severity = $severity; |
| 60 | + $this->element = $element; |
| 61 | + $this->tags = $tags; |
| 62 | + } |
| 63 | + |
| 64 | + /** |
| 65 | + * Adds one or more tags. |
| 66 | + * |
| 67 | + * @since 0.4.1 |
| 68 | + * |
| 69 | + * @param mixed $criteria string or array of string |
| 70 | + */ |
| 71 | + public function addTags() { |
| 72 | + $args = func_get_args(); |
| 73 | + $this->tags = array_merge( $this->tags, is_array( $args[0] ) ? $args[0] : $args ); |
| 74 | + } |
| 75 | + |
| 76 | + /** |
| 77 | + * Returns the error message describing the error. |
| 78 | + * |
| 79 | + * @since 0.4 |
| 80 | + * |
| 81 | + * @return string |
| 82 | + */ |
| 83 | + public function getMessage() { |
| 84 | + return $this->message; |
| 85 | + } |
| 86 | + |
| 87 | + /** |
| 88 | + * Returns the element this error occured at, or 'unknown' when i's unknown. |
| 89 | + * |
| 90 | + * @since 0.4 |
| 91 | + * |
| 92 | + * @return string |
| 93 | + */ |
| 94 | + public function getElement() { |
| 95 | + return $this->element === false ? 'unknown' : $this->element; |
| 96 | + } |
| 97 | + |
| 98 | + /** |
| 99 | + * Returns the severity of the error. |
| 100 | + * |
| 101 | + * @since 0.4 |
| 102 | + * |
| 103 | + * @return integer Element of the ValidationError::SEVERITY_ enum |
| 104 | + */ |
| 105 | + public function getSeverity() { |
| 106 | + return $this->severity; |
| 107 | + } |
| 108 | + |
| 109 | + /** |
| 110 | + * Returns if the severity is equal to or bigger then the provided one. |
| 111 | + * |
| 112 | + * @since 0.4 |
| 113 | + * |
| 114 | + * @param integer $severity |
| 115 | + * |
| 116 | + * @return boolean |
| 117 | + */ |
| 118 | + public function hasSeverity( $severity ) { |
| 119 | + return $this->severity >= $severity; |
| 120 | + } |
| 121 | + |
| 122 | + /** |
| 123 | + * Returns if the error has a certain tag. |
| 124 | + * |
| 125 | + * @since 0.4.1 |
| 126 | + * |
| 127 | + * @param string $tag |
| 128 | + * |
| 129 | + * @return boolean |
| 130 | + */ |
| 131 | + public function hasTag( $tag ) { |
| 132 | + return in_array( $tag, $this->tags ); |
| 133 | + } |
| 134 | + |
| 135 | + /** |
| 136 | + * Returns the tags. |
| 137 | + * |
| 138 | + * @since 0.4.1 |
| 139 | + * |
| 140 | + * @return array |
| 141 | + */ |
| 142 | + public function getTags() { |
| 143 | + return $this->tags; |
| 144 | + } |
| 145 | + |
| 146 | + /** |
| 147 | + * Returns the action associated with the errors severity. |
| 148 | + * |
| 149 | + * @since 0.4 |
| 150 | + * |
| 151 | + * @return integer Element of the ValidationError::ACTION_ enum |
| 152 | + */ |
| 153 | + public function getAction() { |
| 154 | + global $egErrorActions; |
| 155 | + |
| 156 | + if ( $this->severity === self::SEVERITY_FATAL ) { |
| 157 | + // This action should not be configurable, as lowering it would break in the Validator class. |
| 158 | + return self::ACTION_DEMAND; |
| 159 | + } |
| 160 | + else if ( array_key_exists( $this->severity, $egErrorActions ) ) { |
| 161 | + return $egErrorActions[$this->severity]; |
| 162 | + } |
| 163 | + else { |
| 164 | + throw new Exception( "No action associated with error severity '$this->severity'" ); |
| 165 | + } |
| 166 | + } |
| 167 | + |
| 168 | + /** |
| 169 | + * Returns if the action associated with the severity is equal to or bigger then the provided one. |
| 170 | + * |
| 171 | + * @since 0.4 |
| 172 | + * |
| 173 | + * @return boolean |
| 174 | + */ |
| 175 | + public function hasAction( $action ) { |
| 176 | + return $this->getAction() >= $action; |
| 177 | + } |
| 178 | + |
| 179 | + /** |
| 180 | + * Returns if the error is fatal. |
| 181 | + * |
| 182 | + * @since 0.4 |
| 183 | + * |
| 184 | + * @return boolean |
| 185 | + */ |
| 186 | + public function isFatal() { |
| 187 | + return $this->hasSeverity( self::SEVERITY_FATAL ); |
| 188 | + } |
| 189 | + |
| 190 | + /** |
| 191 | + * Returns if the error should be logged. |
| 192 | + * |
| 193 | + * @since 0.4 |
| 194 | + * |
| 195 | + * @return boolean |
| 196 | + */ |
| 197 | + public function shouldLog() { |
| 198 | + return $this->hasAction( self::ACTION_LOG ); |
| 199 | + } |
| 200 | + |
| 201 | + /** |
| 202 | + * Returns if there should be a warning that errors are present. |
| 203 | + * |
| 204 | + * @since 0.4 |
| 205 | + * |
| 206 | + * @return boolean |
| 207 | + */ |
| 208 | + public function shouldWarn() { |
| 209 | + return $this->hasAction( self::ACTION_WARN ); |
| 210 | + } |
| 211 | + |
| 212 | + /** |
| 213 | + * Returns if the error message should be shown. |
| 214 | + * |
| 215 | + * @since 0.4 |
| 216 | + * |
| 217 | + * @return boolean |
| 218 | + */ |
| 219 | + public function shouldShow() { |
| 220 | + return $this->hasAction( self::ACTION_SHOW ); |
| 221 | + } |
| 222 | + |
| 223 | + /** |
| 224 | + * Returns if the error message should be shown, and the output not be rendered. |
| 225 | + * |
| 226 | + * @since 0.4 |
| 227 | + * |
| 228 | + * @return boolean |
| 229 | + */ |
| 230 | + public function shouldDemand() { |
| 231 | + return $this->hasAction( self::ACTION_DEMAND ); |
| 232 | + } |
| 233 | + |
| 234 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/ValidationError.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 235 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/CriterionValidationResult.php |
— | — | @@ -0,0 +1,104 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Class to hold parameter validation result info. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file CriterionValidationResult.php |
| 10 | + * @ingroup Validator |
| 11 | + * |
| 12 | + * @author Jeroen De Dauw |
| 13 | + */ |
| 14 | +class CriterionValidationResult { |
| 15 | + |
| 16 | + /** |
| 17 | + * @since 0.4 |
| 18 | + * |
| 19 | + * @var array of ValidationError |
| 20 | + */ |
| 21 | + protected $errors = array(); |
| 22 | + |
| 23 | + /** |
| 24 | + * @since 0.4 |
| 25 | + * |
| 26 | + * @var array of string |
| 27 | + */ |
| 28 | + protected $invalidItems = array(); |
| 29 | + |
| 30 | + /** |
| 31 | + * Constructor. |
| 32 | + * |
| 33 | + * @since 0.4 |
| 34 | + */ |
| 35 | + public function __construct() { |
| 36 | + |
| 37 | + } |
| 38 | + |
| 39 | + /** |
| 40 | + * Adds a single error object. |
| 41 | + * |
| 42 | + * @since 0.4 |
| 43 | + * |
| 44 | + * @param ValidationError $error |
| 45 | + */ |
| 46 | + public function addError( ValidationError $error ) { |
| 47 | + $this->errors[] = $error; |
| 48 | + } |
| 49 | + |
| 50 | + /** |
| 51 | + * Adds a single invalid item. |
| 52 | + * |
| 53 | + * @since 0.4 |
| 54 | + * |
| 55 | + * @param string $item |
| 56 | + */ |
| 57 | + public function addInvalidItem( $item ) { |
| 58 | + $this->invalidItems[] = $item; |
| 59 | + } |
| 60 | + |
| 61 | + /** |
| 62 | + * Gets the errors. |
| 63 | + * |
| 64 | + * @since 0.4 |
| 65 | + * |
| 66 | + * @return array of ValidationError |
| 67 | + */ |
| 68 | + public function getErrors() { |
| 69 | + return $this->errors; |
| 70 | + } |
| 71 | + |
| 72 | + /** |
| 73 | + * Gets the invalid items. |
| 74 | + * |
| 75 | + * @since 0.4 |
| 76 | + * |
| 77 | + * @return array of string |
| 78 | + */ |
| 79 | + public function getInvalidItems() { |
| 80 | + return $this->invalidItems; |
| 81 | + } |
| 82 | + |
| 83 | + /** |
| 84 | + * Returns whether no errors occured. |
| 85 | + * |
| 86 | + * @since 0.4 |
| 87 | + * |
| 88 | + * @return boolean |
| 89 | + */ |
| 90 | + public function isValid() { |
| 91 | + return count( $this->errors ) == 0 && !$this->hasInvalidItems(); |
| 92 | + } |
| 93 | + |
| 94 | + /** |
| 95 | + * Returns there are any invalid items. |
| 96 | + * |
| 97 | + * @since 0.4 |
| 98 | + * |
| 99 | + * @return boolean |
| 100 | + */ |
| 101 | + public function hasInvalidItems() { |
| 102 | + return count( $this->invalidItems ) != 0; |
| 103 | + } |
| 104 | + |
| 105 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/CriterionValidationResult.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 106 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/parserHooks/Validator_ListErrors.php |
— | — | @@ -0,0 +1,212 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Class for the 'listerrors' parser hooks. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file Validator_ListErrors.php |
| 10 | + * @ingroup Validator |
| 11 | + * |
| 12 | + * @author Jeroen De Dauw |
| 13 | + */ |
| 14 | +class ValidatorListErrors extends ParserHook { |
| 15 | + |
| 16 | + /** |
| 17 | + * Array to map the possible values for the 'minseverity' parameter |
| 18 | + * to their equivalent in the ValidationError::SEVERITY_ enum. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + * |
| 22 | + * @var array |
| 23 | + */ |
| 24 | + protected static $severityMap = array( |
| 25 | + 'minor' => ValidationError::SEVERITY_MINOR, |
| 26 | + 'low' => ValidationError::SEVERITY_LOW, |
| 27 | + 'normal' => ValidationError::SEVERITY_NORMAL, |
| 28 | + 'high' => ValidationError::SEVERITY_HIGH, |
| 29 | + 'fatal' => ValidationError::SEVERITY_FATAL |
| 30 | + ); |
| 31 | + |
| 32 | + /** |
| 33 | + * No LST in pre-5.3 PHP *sigh*. |
| 34 | + * This is to be refactored as soon as php >=5.3 becomes acceptable. |
| 35 | + */ |
| 36 | + public static function staticMagic( array &$magicWords, $langCode ) { |
| 37 | + $className = __CLASS__; |
| 38 | + $instance = new $className(); |
| 39 | + return $instance->magic( $magicWords, $langCode ); |
| 40 | + } |
| 41 | + |
| 42 | + /** |
| 43 | + * No LST in pre-5.3 PHP *sigh*. |
| 44 | + * This is to be refactored as soon as php >=5.3 becomes acceptable. |
| 45 | + */ |
| 46 | + public static function staticInit( Parser &$wgParser ) { |
| 47 | + $className = __CLASS__; |
| 48 | + $instance = new $className(); |
| 49 | + return $instance->init( $wgParser ); |
| 50 | + } |
| 51 | + |
| 52 | + /** |
| 53 | + * Gets the name of the parser hook. |
| 54 | + * @see ParserHook::getName |
| 55 | + * |
| 56 | + * @since 0.4 |
| 57 | + * |
| 58 | + * @return string |
| 59 | + */ |
| 60 | + protected function getName() { |
| 61 | + return 'listerrors'; |
| 62 | + } |
| 63 | + |
| 64 | + /** |
| 65 | + * Returns an array containing the parameter info. |
| 66 | + * @see ParserHook::getParameterInfo |
| 67 | + * |
| 68 | + * @since 0.4 |
| 69 | + * |
| 70 | + * @return array of Parameter |
| 71 | + */ |
| 72 | + protected function getParameterInfo( $type ) { |
| 73 | + global $egValidatorErrListMin; |
| 74 | + |
| 75 | + $params = array(); |
| 76 | + |
| 77 | + $params['minseverity'] = new Parameter( 'minseverity' ); |
| 78 | + $params['minseverity']->setDefault( $egValidatorErrListMin ); |
| 79 | + $params['minseverity']->addCriteria( new CriterionInArray( array_keys( self::$severityMap ) ) ); |
| 80 | + |
| 81 | + return $params; |
| 82 | + } |
| 83 | + |
| 84 | + /** |
| 85 | + * Returns the list of default parameters. |
| 86 | + * @see ParserHook::getDefaultParameters |
| 87 | + * |
| 88 | + * @since 0.4 |
| 89 | + * |
| 90 | + * @return array |
| 91 | + */ |
| 92 | + protected function getDefaultParameters( $type ) { |
| 93 | + return array( 'minseverity' ); |
| 94 | + } |
| 95 | + |
| 96 | + /** |
| 97 | + * Renders and returns the output. |
| 98 | + * @see ParserHook::render |
| 99 | + * |
| 100 | + * @since 0.4 |
| 101 | + * |
| 102 | + * @param array $parameters |
| 103 | + * |
| 104 | + * @return string |
| 105 | + */ |
| 106 | + public function render( array $parameters ) { |
| 107 | + $errorList = $this->getErrorList( |
| 108 | + ValidationErrorHandler::getErrors(), |
| 109 | + self::$severityMap[$parameters['minseverity']] |
| 110 | + ); |
| 111 | + |
| 112 | + return $errorList; |
| 113 | + } |
| 114 | + |
| 115 | + /** |
| 116 | + * Returns a list of errors in wikitext. |
| 117 | + * |
| 118 | + * @since 0.4 |
| 119 | + * |
| 120 | + * @param array $errors |
| 121 | + * @param integer $minSeverity |
| 122 | + * |
| 123 | + * @return string |
| 124 | + */ |
| 125 | + public function getErrorList( array $errors, $minSeverity = ValidationError::SEVERITY_MINOR ) { |
| 126 | + $elementHtml = array(); |
| 127 | + |
| 128 | + if ( count( $errors ) == 0 ) { |
| 129 | + return ''; |
| 130 | + } |
| 131 | + |
| 132 | + $elements = array_keys( $errors ); |
| 133 | + natcasesort( $elements ); |
| 134 | + |
| 135 | + foreach ( $elements as $element ) { |
| 136 | + $elementErrors = $this->getErrorListForElement( $errors[$element], $element, $minSeverity ); |
| 137 | + |
| 138 | + if ( $elementErrors ) { |
| 139 | + $elementHtml[] = $elementErrors; |
| 140 | + } |
| 141 | + } |
| 142 | + |
| 143 | + if ( count( $elementHtml ) == 0 ) { |
| 144 | + return ''; |
| 145 | + } |
| 146 | + |
| 147 | + return Html::element( |
| 148 | + 'h2', |
| 149 | + array(), |
| 150 | + wfMsg( 'validator-listerrors-errors' ) |
| 151 | + ) . implode( "\n\n", $elementHtml ); |
| 152 | + } |
| 153 | + |
| 154 | + /** |
| 155 | + * Returns wikitext listing the errors for a single element. |
| 156 | + * |
| 157 | + * @since 0.4 |
| 158 | + * |
| 159 | + * @param array $allErrors |
| 160 | + * @param string $element |
| 161 | + * @param integer $minSeverity |
| 162 | + * |
| 163 | + * @return mixed String or false |
| 164 | + */ |
| 165 | + public function getErrorListForElement( array $allErrors, $element, $minSeverity = ValidationError::SEVERITY_MINOR ) { |
| 166 | + $errors = array(); |
| 167 | + |
| 168 | + foreach ( $allErrors as $error ) { |
| 169 | + if ( $error->hasSeverity( $minSeverity ) ) { |
| 170 | + $errors[] = $error; |
| 171 | + } |
| 172 | + } |
| 173 | + |
| 174 | + if ( count( $errors ) > 0 ) { |
| 175 | + $lines = array(); |
| 176 | + |
| 177 | + foreach ( $errors as $error ) { |
| 178 | + // TODO: switch on severity |
| 179 | + $lines[] = '* ' . wfMsgExt( |
| 180 | + 'validator-listerrors-severity-message', |
| 181 | + 'parsemag', |
| 182 | + $this->getSeverityMessage( $error->getSeverity() ), |
| 183 | + $error->message |
| 184 | + ); |
| 185 | + } |
| 186 | + |
| 187 | + return '<h3>' . htmlspecialchars( $element ) . "</h3>\n\n" . implode( "\n", $lines ); |
| 188 | + } |
| 189 | + else { |
| 190 | + return false; |
| 191 | + } |
| 192 | + } |
| 193 | + |
| 194 | + /** |
| 195 | + * Returns a message for a severity. |
| 196 | + * |
| 197 | + * @since 0.4 |
| 198 | + * |
| 199 | + * @param integer $severity |
| 200 | + * |
| 201 | + * @return string |
| 202 | + */ |
| 203 | + protected function getSeverityMessage( $severity ) { |
| 204 | + static $reverseMap = false; |
| 205 | + |
| 206 | + if ( $reverseMap === false ) { |
| 207 | + $reverseMap = array_flip( self::$severityMap ); |
| 208 | + } |
| 209 | + |
| 210 | + return wfMsg( 'validator-listerrors-' . $reverseMap[$severity] ); |
| 211 | + } |
| 212 | + |
| 213 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/parserHooks/Validator_ListErrors.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 214 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/ListParameter.php |
— | — | @@ -0,0 +1,228 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Class for list parameters. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file ListParameter.php |
| 10 | + * @ingroup Validator |
| 11 | + * |
| 12 | + * @author Jeroen De Dauw |
| 13 | + */ |
| 14 | +class ListParameter extends Parameter { |
| 15 | + |
| 16 | + /** |
| 17 | + * Indicates if errors in list items should cause the item to be omitted, |
| 18 | + * versus having the whole list be set to it's default. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + * |
| 22 | + * @var boolean |
| 23 | + */ |
| 24 | + public static $perItemValidation = true; |
| 25 | + |
| 26 | + /** |
| 27 | + * The default delimiter for lists, used when the parameter definition does not specify one. |
| 28 | + * |
| 29 | + * @since 0.4 |
| 30 | + * |
| 31 | + * @var string |
| 32 | + */ |
| 33 | + const DEFAULT_DELIMITER = ','; |
| 34 | + |
| 35 | + /** |
| 36 | + * The list delimiter. |
| 37 | + * |
| 38 | + * @since 0.4 |
| 39 | + * |
| 40 | + * @var string |
| 41 | + */ |
| 42 | + protected $delimiter; |
| 43 | + |
| 44 | + /** |
| 45 | + * List of criteria the parameter value as a whole needs to hold against. |
| 46 | + * |
| 47 | + * @since 0.4 |
| 48 | + * |
| 49 | + * @var array of ListParameterCriterion |
| 50 | + */ |
| 51 | + protected $listCriteria; |
| 52 | + |
| 53 | + /** |
| 54 | + * Holder for temporary information needed in the itemIsValid callback. |
| 55 | + * |
| 56 | + * @since 0.4 |
| 57 | + * |
| 58 | + * @var array |
| 59 | + */ |
| 60 | + protected $tempInvalidList; |
| 61 | + |
| 62 | + /** |
| 63 | + * Constructor. |
| 64 | + * |
| 65 | + * @since 0.4 |
| 66 | + * |
| 67 | + * @param string $name |
| 68 | + * @param string $delimiter |
| 69 | + * @param mixed $type |
| 70 | + * @param mixed $default Use null for no default (which makes the parameter required) |
| 71 | + * @param array $aliases |
| 72 | + * @param array $criteria |
| 73 | + */ |
| 74 | + public function __construct( $name, $delimiter = ListParameter::DEFAULT_DELIMITER, $type = Parameter::TYPE_STRING, |
| 75 | + $default = null, array $aliases = array(), array $criteria = array() ) { |
| 76 | + $itemCriteria = array(); |
| 77 | + $listCriteria = array(); |
| 78 | + |
| 79 | + $this->cleanCriteria( $criteria ); |
| 80 | + |
| 81 | + foreach ( $criteria as $criterion ) { |
| 82 | + if ( $criterion->isForLists() ) { |
| 83 | + $listCriteria[] = $criterion; |
| 84 | + } |
| 85 | + else { |
| 86 | + $itemCriteria[] = $criterion; |
| 87 | + } |
| 88 | + } |
| 89 | + |
| 90 | + $this->listCriteria = $listCriteria; |
| 91 | + |
| 92 | + parent::__construct( $name, $type, $default, $aliases, $itemCriteria ); |
| 93 | + |
| 94 | + $this->delimiter = $delimiter; |
| 95 | + |
| 96 | + } |
| 97 | + |
| 98 | + /** |
| 99 | + * Returns if the parameter is a list or not. |
| 100 | + * |
| 101 | + * @since 0.4 |
| 102 | + * |
| 103 | + * @return boolean |
| 104 | + */ |
| 105 | + public function isList() { |
| 106 | + return true; |
| 107 | + } |
| 108 | + |
| 109 | + /** |
| 110 | + * Sets the $value to a cleaned value of $originalValue. |
| 111 | + * |
| 112 | + * @since 0.4 |
| 113 | + */ |
| 114 | + protected function cleanValue() { |
| 115 | + $this->value = explode( $this->delimiter, $this->originalValue ); |
| 116 | + |
| 117 | + if ( $this->trimValue ) { |
| 118 | + foreach ( $this->value as &$item ) { |
| 119 | + $item = trim( $item ); |
| 120 | + } |
| 121 | + } |
| 122 | + } |
| 123 | + |
| 124 | + /** |
| 125 | + * @see Parameter::validate |
| 126 | + */ |
| 127 | + public function validate( array $parameters ) { |
| 128 | + $listSuccess = $this->validateListCriteria( $parameters ); |
| 129 | + |
| 130 | + if ( $listSuccess ) { |
| 131 | + $this->doValidation( $parameters ); |
| 132 | + } |
| 133 | + // TODO |
| 134 | + |
| 135 | + // FIXME: it's possible the list criteria are not satisfied here anymore due to filtering of invalid items. |
| 136 | + } |
| 137 | + |
| 138 | + /** |
| 139 | + * @see Parameter::setToDefaultIfNeeded |
| 140 | + * |
| 141 | + * @since 0.4 |
| 142 | + */ |
| 143 | + protected function setToDefaultIfNeeded() { |
| 144 | + if ( count( $this->errors ) > 0 && count( $this->value ) == 0 && !$this->hasFatalError() ) { |
| 145 | + $this->setToDefault(); |
| 146 | + } |
| 147 | + } |
| 148 | + |
| 149 | + /** |
| 150 | + * @see Parameter::setToDefault |
| 151 | + * |
| 152 | + * @since 0.4 |
| 153 | + */ |
| 154 | + protected function setToDefault() { |
| 155 | + $this->defaulted = true; |
| 156 | + $this->value = is_array( $this->default ) ? $this->default : array( $this->default ); |
| 157 | + } |
| 158 | + |
| 159 | + /** |
| 160 | + * |
| 161 | + * |
| 162 | + * @since 0.4 |
| 163 | + * |
| 164 | + * @param array $parameters |
| 165 | + */ |
| 166 | + protected function validateListCriteria( array $parameters ) { |
| 167 | + foreach ( $this->getListCriteria() as $listCriterion ) { |
| 168 | + if ( !$listCriterion->validate( $this, $parameters ) ) { |
| 169 | + $hasError = true; |
| 170 | + |
| 171 | + if ( !self::$accumulateParameterErrors ) { |
| 172 | + break; |
| 173 | + } |
| 174 | + } |
| 175 | + } |
| 176 | + |
| 177 | + // TODO |
| 178 | + return true; |
| 179 | + } |
| 180 | + |
| 181 | + /** |
| 182 | + * Returns the parameter list criteria. |
| 183 | + * |
| 184 | + * @since 0.4 |
| 185 | + * |
| 186 | + * @return array of ListParameterCriterion |
| 187 | + */ |
| 188 | + public function getListCriteria() { |
| 189 | + return $this->listCriteria; |
| 190 | + } |
| 191 | + |
| 192 | + /** |
| 193 | + * Handles any validation errors that occured for a single criterion. |
| 194 | + * |
| 195 | + * @since 0.4 |
| 196 | + * |
| 197 | + * @param CriterionValidationResult $validationResult |
| 198 | + */ |
| 199 | + protected function handleValidationError( CriterionValidationResult $validationResult ) { |
| 200 | + parent::handleValidationError( $validationResult ); |
| 201 | + |
| 202 | + // Filter out the items that have already been found to be invalid. |
| 203 | + if ( $validationResult->hasInvalidItems() ) { |
| 204 | + $this->tempInvalidList = $validationResult->getInvalidItems(); |
| 205 | + $this->value = array_filter( $this->value, array( $this, 'itemIsValid' ) ); |
| 206 | + } |
| 207 | + } |
| 208 | + |
| 209 | + /** |
| 210 | + * Returns if an item is valid or not. |
| 211 | + * |
| 212 | + * @since 0.4 |
| 213 | + * |
| 214 | + * @return boolean |
| 215 | + */ |
| 216 | + protected function itemIsValid( $item ) { |
| 217 | + return !in_array( $item, $this->tempInvalidList ); |
| 218 | + } |
| 219 | + |
| 220 | + /** |
| 221 | + * @see Parameter::setDefault |
| 222 | + * |
| 223 | + * @since 0.4 |
| 224 | + */ |
| 225 | + public function setDefault( $default ) { |
| 226 | + $this->default = is_array( $default ) ? $default : array( $default ); |
| 227 | + } |
| 228 | + |
| 229 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/ListParameter.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 230 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/criteria/CriterionHasLength.php |
— | — | @@ -0,0 +1,62 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter criterion stating that the value must have a certain length. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file CriterionHasLength.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup Criteria |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class CriterionHasLength extends ItemParameterCriterion { |
| 16 | + |
| 17 | + protected $lowerBound; |
| 18 | + protected $upperBound; |
| 19 | + |
| 20 | + /** |
| 21 | + * Constructor. |
| 22 | + * |
| 23 | + * @param integer $lowerBound |
| 24 | + * @param mixed $upperBound |
| 25 | + * |
| 26 | + * @since 0.4 |
| 27 | + */ |
| 28 | + public function __construct( $lowerBound, $upperBound = false ) { |
| 29 | + parent::__construct(); |
| 30 | + |
| 31 | + $this->lowerBound = $lowerBound; |
| 32 | + $this->upperBound = $upperBound === false ? $lowerBound : $upperBound; |
| 33 | + } |
| 34 | + |
| 35 | + /** |
| 36 | + * @see ItemParameterCriterion::validate |
| 37 | + */ |
| 38 | + protected function doValidation( $value, Parameter $parameter, array $parameters ) { |
| 39 | + $strlen = strlen( $value ); |
| 40 | + return $strlen <= $this->upperBound && $strlen >= $this->lowerBound; |
| 41 | + } |
| 42 | + |
| 43 | + /** |
| 44 | + * @see ItemParameterCriterion::getItemErrorMessage |
| 45 | + */ |
| 46 | + protected function getItemErrorMessage( Parameter $parameter ) { |
| 47 | + global $wgLang; |
| 48 | + |
| 49 | + if ( $this->lowerBound == $this->upperBound ) { |
| 50 | + return wfMsgExt( 'validator-error-invalid-length', 'parsemag', $parameter->getOriginalName(), $wgLang->formatNum( $this->lowerBound ) ); |
| 51 | + } |
| 52 | + else { |
| 53 | + return wfMsgExt( |
| 54 | + 'validator-error-invalid-length-range', |
| 55 | + 'parsemag', |
| 56 | + $parameter->getOriginalName(), |
| 57 | + $wgLang->formatNum( $this->lowerBound ), |
| 58 | + $wgLang->formatNum( $this->upperBound ) |
| 59 | + ); |
| 60 | + } |
| 61 | + } |
| 62 | + |
| 63 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/criteria/CriterionHasLength.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 64 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/criteria/CriterionIsNumeric.php |
— | — | @@ -0,0 +1,46 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter criterion stating that the value must be a number. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file CriterionIsNumeric.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup Criteria |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class CriterionIsNumeric extends ItemParameterCriterion { |
| 16 | + |
| 17 | + /** |
| 18 | + * Constructor. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + */ |
| 22 | + public function __construct( ) { |
| 23 | + parent::__construct(); |
| 24 | + } |
| 25 | + |
| 26 | + /** |
| 27 | + * @see ItemParameterCriterion::validate |
| 28 | + */ |
| 29 | + protected function doValidation( $value, Parameter $parameter, array $parameters ) { |
| 30 | + return is_numeric( $value ); |
| 31 | + } |
| 32 | + |
| 33 | + /** |
| 34 | + * @see ItemParameterCriterion::getItemErrorMessage |
| 35 | + */ |
| 36 | + protected function getItemErrorMessage( Parameter $parameter ) { |
| 37 | + return wfMsgExt( 'validator_error_must_be_number', 'parsemag', $parameter->getOriginalName() ); |
| 38 | + } |
| 39 | + |
| 40 | + /** |
| 41 | + * @see ItemParameterCriterion::getFullListErrorMessage |
| 42 | + */ |
| 43 | + protected function getFullListErrorMessage( Parameter $parameter ) { |
| 44 | + return wfMsgExt( 'validator_list_error_must_be_number', 'parsemag', $parameter->getOriginalName() ); |
| 45 | + } |
| 46 | + |
| 47 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/criteria/CriterionIsNumeric.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 48 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/criteria/CriterionMatchesRegex.php |
— | — | @@ -0,0 +1,59 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter criterion stating that the value must match a regex. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file CriterionMatchesRegex.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup Criteria |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class CriterionMatchesRegex extends ItemParameterCriterion { |
| 16 | + |
| 17 | + /** |
| 18 | + * The pattern to match against. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + * |
| 22 | + * @var string |
| 23 | + */ |
| 24 | + protected $pattern; |
| 25 | + |
| 26 | + /** |
| 27 | + * Constructor. |
| 28 | + * |
| 29 | + * @param string $pattern |
| 30 | + * |
| 31 | + * @since 0.4 |
| 32 | + */ |
| 33 | + public function __construct( $pattern ) { |
| 34 | + parent::__construct(); |
| 35 | + |
| 36 | + $this->pattern = $pattern; |
| 37 | + } |
| 38 | + |
| 39 | + /** |
| 40 | + * @see ItemParameterCriterion::validate |
| 41 | + */ |
| 42 | + protected function doValidation( $value, Parameter $parameter, array $parameters ) { |
| 43 | + return (bool)preg_match( $this->pattern, $value ); |
| 44 | + } |
| 45 | + |
| 46 | + /** |
| 47 | + * @see ItemParameterCriterion::getItemErrorMessage |
| 48 | + */ |
| 49 | + protected function getItemErrorMessage( Parameter $parameter ) { |
| 50 | + return wfMsgExt( 'validator-error-invalid-regex', 'parsemag', $parameter->getOriginalName(), $this->pattern ); |
| 51 | + } |
| 52 | + |
| 53 | + /** |
| 54 | + * @see ItemParameterCriterion::getFullListErrorMessage |
| 55 | + */ |
| 56 | + protected function getFullListErrorMessage( Parameter $parameter ) { |
| 57 | + return wfMsgExt( 'validator-list-error-invalid-regex', 'parsemag', $parameter->getOriginalName(), $this->pattern ); |
| 58 | + } |
| 59 | + |
| 60 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/criteria/CriterionMatchesRegex.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 61 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/criteria/CriterionNotEmpty.php |
— | — | @@ -0,0 +1,46 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter criterion stating that the value must not be empty (empty being a string with 0 lentgh). |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file CriterionNotEmpty.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup Criteria |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class CriterionNotEmpty extends ItemParameterCriterion { |
| 16 | + |
| 17 | + /** |
| 18 | + * Constructor. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + */ |
| 22 | + public function __construct() { |
| 23 | + parent::__construct(); |
| 24 | + } |
| 25 | + |
| 26 | + /** |
| 27 | + * @see ItemParameterCriterion::validate |
| 28 | + */ |
| 29 | + protected function doValidation( $value, Parameter $parameter, array $parameters ) { |
| 30 | + return trim( $value ) != ''; |
| 31 | + } |
| 32 | + |
| 33 | + /** |
| 34 | + * @see ItemParameterCriterion::getItemErrorMessage |
| 35 | + */ |
| 36 | + protected function getItemErrorMessage( Parameter $parameter ) { |
| 37 | + return wfMsgExt( 'validator_error_empty_argument', 'parsemag', $parameter->getOriginalName() ); |
| 38 | + } |
| 39 | + |
| 40 | + /** |
| 41 | + * @see ItemParameterCriterion::getFullListErrorMessage |
| 42 | + */ |
| 43 | + protected function getFullListErrorMessage( Parameter $parameter ) { |
| 44 | + return wfMsgExt( 'validator_list_error_empty_argument', 'parsemag', $parameter->getOriginalName() ); |
| 45 | + } |
| 46 | + |
| 47 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/criteria/CriterionNotEmpty.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 48 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/criteria/CriterionTrue.php |
— | — | @@ -0,0 +1,46 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter criterion that is always true. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file CriterionTrue.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup Criteria |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class CriterionTrue extends ItemParameterCriterion { |
| 16 | + |
| 17 | + /** |
| 18 | + * Constructor. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + */ |
| 22 | + public function __construct() { |
| 23 | + parent::__construct(); |
| 24 | + } |
| 25 | + |
| 26 | + /** |
| 27 | + * @see ItemParameterCriterion::validate |
| 28 | + */ |
| 29 | + protected function doValidation( $value, Parameter $parameter, array $parameters ) { |
| 30 | + return true; |
| 31 | + } |
| 32 | + |
| 33 | + /** |
| 34 | + * @see ItemParameterCriterion::getItemErrorMessage |
| 35 | + */ |
| 36 | + protected function getItemErrorMessage( Parameter $parameter ) { |
| 37 | + return ''; |
| 38 | + } |
| 39 | + |
| 40 | + /** |
| 41 | + * @see ItemParameterCriterion::getListErrorMessage |
| 42 | + */ |
| 43 | + protected function getListErrorMessage( Parameter $parameter, array $invalidItems, $allInvalid ) { |
| 44 | + return ''; |
| 45 | + } |
| 46 | + |
| 47 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/criteria/CriterionTrue.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 48 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/criteria/CriterionIsFloat.php |
— | — | @@ -0,0 +1,46 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter criterion stating that the value must be a float. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file CriterionIsFloat.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup Criteria |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class CriterionIsFloat extends ItemParameterCriterion { |
| 16 | + |
| 17 | + /** |
| 18 | + * Constructor. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + */ |
| 22 | + public function __construct() { |
| 23 | + parent::__construct(); |
| 24 | + } |
| 25 | + |
| 26 | + /** |
| 27 | + * @see ItemParameterCriterion::validate |
| 28 | + */ |
| 29 | + protected function doValidation( $value, Parameter $parameter, array $parameters ) { |
| 30 | + return preg_match( '/^(-)?\d+((\.|,)\d+)?$/', $value ); |
| 31 | + } |
| 32 | + |
| 33 | + /** |
| 34 | + * @see ItemParameterCriterion::getItemErrorMessage |
| 35 | + */ |
| 36 | + protected function getItemErrorMessage( Parameter $parameter ) { |
| 37 | + return wfMsgExt( 'validator-error-must-be-float', 'parsemag', $parameter->getOriginalName() ); |
| 38 | + } |
| 39 | + |
| 40 | + /** |
| 41 | + * @see ItemParameterCriterion::getFullListErrorMessage |
| 42 | + */ |
| 43 | + protected function getFullListErrorMessage( Parameter $parameter ) { |
| 44 | + return wfMsgExt( 'validator-list-error-must-be-float', 'parsemag', $parameter->getOriginalName() ); |
| 45 | + } |
| 46 | + |
| 47 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/criteria/CriterionIsFloat.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 48 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/criteria/CriterionInRange.php |
— | — | @@ -0,0 +1,93 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter criterion stating that the value must be in a certain range. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file CriterionInRange.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup Criteria |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class CriterionInRange extends ItemParameterCriterion { |
| 16 | + |
| 17 | + /** |
| 18 | + * Lower bound of the range. Either a number or false, for no lower limit. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + * |
| 22 | + * @var mixed |
| 23 | + */ |
| 24 | + protected $lowerBound; |
| 25 | + |
| 26 | + /** |
| 27 | + * Upper bound of the range. Either a number or false, for no upper limit. |
| 28 | + * |
| 29 | + * @since 0.4 |
| 30 | + * |
| 31 | + * @var mixed |
| 32 | + */ |
| 33 | + protected $upperBound; |
| 34 | + |
| 35 | + /** |
| 36 | + * Constructor. |
| 37 | + * |
| 38 | + * @param mixed $lowerBound |
| 39 | + * @param mixed $upperBound |
| 40 | + * |
| 41 | + * @since 0.4 |
| 42 | + */ |
| 43 | + public function __construct( $lowerBound, $upperBound ) { |
| 44 | + parent::__construct(); |
| 45 | + |
| 46 | + $this->lowerBound = $lowerBound; |
| 47 | + $this->upperBound = $upperBound; |
| 48 | + } |
| 49 | + |
| 50 | + /** |
| 51 | + * @see ItemParameterCriterion::validate |
| 52 | + */ |
| 53 | + protected function doValidation( $value, Parameter $parameter, array $parameters ) { |
| 54 | + if ( !is_numeric( $value ) ) { |
| 55 | + return false; |
| 56 | + } |
| 57 | + |
| 58 | + $value = (int)$value; |
| 59 | + |
| 60 | + return ( $this->upperBound === false || $value <= $this->upperBound ) |
| 61 | + && ( $this->lowerBound === false || $value >= $this->lowerBound ); |
| 62 | + } |
| 63 | + |
| 64 | + /** |
| 65 | + * @see ItemParameterCriterion::getItemErrorMessage |
| 66 | + */ |
| 67 | + protected function getItemErrorMessage( Parameter $parameter ) { |
| 68 | + global $wgLang; |
| 69 | + |
| 70 | + return wfMsgExt( |
| 71 | + 'validator_error_invalid_range', |
| 72 | + 'parsemag', |
| 73 | + $parameter->getOriginalName(), |
| 74 | + $wgLang->formatNum( $this->lowerBound ), |
| 75 | + $wgLang->formatNum( $this->upperBound ) |
| 76 | + ); |
| 77 | + } |
| 78 | + |
| 79 | + /** |
| 80 | + * @see ItemParameterCriterion::getFullListErrorMessage |
| 81 | + */ |
| 82 | + protected function getFullListErrorMessage( Parameter $parameter ) { |
| 83 | + global $wgLang; |
| 84 | + |
| 85 | + return wfMsgExt( |
| 86 | + 'validator_list_error_invalid_range', |
| 87 | + 'parsemag', |
| 88 | + $parameter->getOriginalName(), |
| 89 | + $wgLang->formatNum( $this->lowerBound ), |
| 90 | + $wgLang->formatNum( $this->upperBound ) |
| 91 | + ); |
| 92 | + } |
| 93 | + |
| 94 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/criteria/CriterionInRange.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 95 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/criteria/CriterionInArray.php |
— | — | @@ -0,0 +1,155 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter criterion stating that the value must be in an array. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file CriterionInArray.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup Criteria |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class CriterionInArray extends ItemParameterCriterion { |
| 16 | + |
| 17 | + /** |
| 18 | + * List of allowed values. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + * |
| 22 | + * @var array |
| 23 | + */ |
| 24 | + protected $allowedValues; |
| 25 | + |
| 26 | + /** |
| 27 | + * If the values should match case. |
| 28 | + * |
| 29 | + * @since 0.4.2 |
| 30 | + * |
| 31 | + * @var boolean |
| 32 | + */ |
| 33 | + protected $careAboutCapitalization = false; |
| 34 | + |
| 35 | + /** |
| 36 | + * Constructor. |
| 37 | + * |
| 38 | + * You can specify the allowed values either by passing an array, |
| 39 | + * or by passing each value as an argument. You can also specify |
| 40 | + * if the criterion should care about capitalization or not by |
| 41 | + * adding a boolean as last argument. This value default to false. |
| 42 | + * |
| 43 | + * @since 0.4 |
| 44 | + */ |
| 45 | + public function __construct() { |
| 46 | + parent::__construct(); |
| 47 | + |
| 48 | + $args = func_get_args(); |
| 49 | + |
| 50 | + $lastElement = array_pop( $args ); |
| 51 | + |
| 52 | + if ( is_bool( $lastElement ) ) { |
| 53 | + // The element is a boolean, so it's the capitalization parameter. |
| 54 | + $this->careAboutCapitalization = $lastElement; |
| 55 | + } |
| 56 | + else { |
| 57 | + // Add the element back to the array. |
| 58 | + $args[] = $lastElement; |
| 59 | + } |
| 60 | + |
| 61 | + if ( count( $args ) > 1 ) { |
| 62 | + $this->allowedValues = $args; |
| 63 | + } |
| 64 | + elseif ( count( $args ) == 1 ) { |
| 65 | + $this->allowedValues = (array)$args[0]; |
| 66 | + } |
| 67 | + else { |
| 68 | + // Not a lot that will pass validation in this case :D |
| 69 | + $this->allowedValues = array(); |
| 70 | + } |
| 71 | + |
| 72 | + if ( !$this->careAboutCapitalization ) { |
| 73 | + // If case doesn't matter, lowercase everything and later on compare a lowercased value. |
| 74 | + $this->allowedValues = array_map( 'strtolower', $this->allowedValues ); |
| 75 | + } |
| 76 | + } |
| 77 | + |
| 78 | + /** |
| 79 | + * @see ItemParameterCriterion::validate |
| 80 | + */ |
| 81 | + protected function doValidation( $value, Parameter $parameter, array $parameters ) { |
| 82 | + return in_array( |
| 83 | + $this->careAboutCapitalization ? $value : strtolower( $value ), |
| 84 | + $this->allowedValues |
| 85 | + ); |
| 86 | + } |
| 87 | + |
| 88 | + /** |
| 89 | + * @see ItemParameterCriterion::getItemErrorMessage |
| 90 | + */ |
| 91 | + protected function getItemErrorMessage( Parameter $parameter ) { |
| 92 | + global $wgLang; |
| 93 | + |
| 94 | + $values = $parameter->getValue(); |
| 95 | + $originalCount = count( $this->allowedValues ); |
| 96 | + |
| 97 | + if ( $originalCount > 15 ) { |
| 98 | + $allowedValues = array_slice( $this->allowedValues, 0, 13 ); |
| 99 | + $omitCount = $originalCount - count( $allowedValues ); |
| 100 | + |
| 101 | + return wfMsgExt( |
| 102 | + 'validator-error-accepts-only-omitted', |
| 103 | + 'parsemag', |
| 104 | + $parameter->getOriginalName(), |
| 105 | + $parameter->getValue(), |
| 106 | + $wgLang->listToText( $allowedValues ), |
| 107 | + $wgLang->formatNum( $omitCount ) |
| 108 | + ); |
| 109 | + } |
| 110 | + else { |
| 111 | + return wfMsgExt( |
| 112 | + 'validator_error_accepts_only', |
| 113 | + 'parsemag', |
| 114 | + $parameter->getOriginalName(), |
| 115 | + $wgLang->listToText( $this->allowedValues ), |
| 116 | + count( $this->allowedValues ), |
| 117 | + $parameter->getValue() |
| 118 | + ); |
| 119 | + } |
| 120 | + } |
| 121 | + |
| 122 | + /** |
| 123 | + * @see ItemParameterCriterion::getFullListErrorMessage |
| 124 | + */ |
| 125 | + protected function getFullListErrorMessage( Parameter $parameter ) { |
| 126 | + global $wgLang; |
| 127 | + |
| 128 | + $values = $parameter->getValue(); |
| 129 | + $originalCount = count( $this->allowedValues ); |
| 130 | + |
| 131 | + if ( $originalCount > 15 ) { |
| 132 | + $allowedValues = array_slice( $this->allowedValues, 0, 13 ); |
| 133 | + $omitCount = $originalCount - count( $allowedValues ); |
| 134 | + |
| 135 | + return wfMsgExt( |
| 136 | + 'validator-list-error-accepts-only-omitted', |
| 137 | + 'parsemag', |
| 138 | + $parameter->getOriginalName(), |
| 139 | + $parameter->getValue(), |
| 140 | + $wgLang->listToText( $allowedValues ), |
| 141 | + $wgLang->formatNum( $omitCount ) |
| 142 | + ); |
| 143 | + } |
| 144 | + else { |
| 145 | + return wfMsgExt( |
| 146 | + 'validator-list-error-accepts-only', |
| 147 | + 'parsemag', |
| 148 | + $parameter->getOriginalName(), |
| 149 | + $wgLang->listToText( $this->allowedValues ), |
| 150 | + count( $this->allowedValues ), |
| 151 | + $parameter->getValue() |
| 152 | + ); |
| 153 | + } |
| 154 | + } |
| 155 | + |
| 156 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/criteria/CriterionInArray.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 157 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/criteria/CriterionItemCount.php |
— | — | @@ -0,0 +1,42 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter criterion stating that the value must have a certain length. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file CriterionHasLength.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup Criteria |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class CriterionItemCount extends ListParameterCriterion { |
| 16 | + |
| 17 | + protected $lowerBound; |
| 18 | + protected $upperBound; |
| 19 | + |
| 20 | + /** |
| 21 | + * Constructor. |
| 22 | + * |
| 23 | + * @param integer $lowerBound |
| 24 | + * @param mixed $upperBound |
| 25 | + * |
| 26 | + * @since 0.4 |
| 27 | + */ |
| 28 | + public function __construct( $lowerBound, $upperBound = false ) { |
| 29 | + parent::__construct(); |
| 30 | + |
| 31 | + $this->lowerBound = $lowerBound; |
| 32 | + $this->upperBound = $upperBound === false ? $lowerBound : $upperBound; |
| 33 | + } |
| 34 | + |
| 35 | + /** |
| 36 | + * @see ParameterCriterion::validate |
| 37 | + */ |
| 38 | + public function validate( Parameter $parameter, array $parameters) { |
| 39 | + $count = count( $parameter->getValue() ); |
| 40 | + return $count <= $this->upperBound && $count >= $this->lowerBound; |
| 41 | + } |
| 42 | + |
| 43 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/criteria/CriterionItemCount.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 44 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/criteria/CriterionUniqueItems.php |
— | — | @@ -0,0 +1,46 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter criterion stating that the value must have a certain length. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file CriterionHasLength.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup Criteria |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class CriterionUniqueItems extends ListParameterCriterion { |
| 16 | + |
| 17 | + /** |
| 18 | + * If the values should match case. |
| 19 | + * |
| 20 | + * @since 0.4.2 |
| 21 | + * |
| 22 | + * @var boolean |
| 23 | + */ |
| 24 | + protected $careAboutCapitalization; |
| 25 | + |
| 26 | + /** |
| 27 | + * Constructor. |
| 28 | + * |
| 29 | + * @since 0.4 |
| 30 | + */ |
| 31 | + public function __construct( $careAboutCapitalization = false ) { |
| 32 | + parent::__construct(); |
| 33 | + |
| 34 | + $this->careAboutCapitalization = $careAboutCapitalization; |
| 35 | + } |
| 36 | + |
| 37 | + /** |
| 38 | + * @see ParameterCriterion::validate |
| 39 | + */ |
| 40 | + public function validate( Parameter $parameter, array $parameters ) { |
| 41 | + return count( $parameter->getValue() ) |
| 42 | + == count( array_unique( |
| 43 | + $this->careAboutCapitalization ? $parameter->getValue() : array_map( 'strtolower', $parameter->getValue() ) |
| 44 | + ) ); |
| 45 | + } |
| 46 | + |
| 47 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/criteria/CriterionUniqueItems.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 48 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/criteria/CriterionIsInteger.php |
— | — | @@ -0,0 +1,46 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter criterion stating that the value must be an integer. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file CriterionIsInteger.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup Criteria |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class CriterionIsInteger extends ItemParameterCriterion { |
| 16 | + |
| 17 | + /** |
| 18 | + * Constructor. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + */ |
| 22 | + public function __construct( ) { |
| 23 | + parent::__construct(); |
| 24 | + } |
| 25 | + |
| 26 | + /** |
| 27 | + * @see ItemParameterCriterion::validate |
| 28 | + */ |
| 29 | + protected function doValidation( $value, Parameter $parameter, array $parameters ) { |
| 30 | + return ctype_digit( (string)$value ); |
| 31 | + } |
| 32 | + |
| 33 | + /** |
| 34 | + * @see ItemParameterCriterion::getItemErrorMessage |
| 35 | + */ |
| 36 | + protected function getItemErrorMessage( Parameter $parameter ) { |
| 37 | + return wfMsgExt( 'validator_error_must_be_integer', 'parsemag', $parameter->getOriginalName() ); |
| 38 | + } |
| 39 | + |
| 40 | + /** |
| 41 | + * @see ItemParameterCriterion::getFullListErrorMessage |
| 42 | + */ |
| 43 | + protected function getFullListErrorMessage( Parameter $parameter ) { |
| 44 | + return wfMsgExt( 'validator_list_error_must_be_integer', 'parsemag', $parameter->getOriginalName() ); |
| 45 | + } |
| 46 | + |
| 47 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/criteria/CriterionIsInteger.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 48 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/ParserHook.php |
— | — | @@ -0,0 +1,393 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Class for out of the box parser hook functionality inetgrated with the validation |
| 6 | + * provided by Validator. |
| 7 | + * |
| 8 | + * @since 0.4 |
| 9 | + * |
| 10 | + * @file ParserHook.php |
| 11 | + * @ingroup Validator |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +abstract class ParserHook { |
| 16 | + |
| 17 | + const TYPE_TAG = 0; |
| 18 | + const TYPE_FUNCTION = 1; |
| 19 | + |
| 20 | + /** |
| 21 | + * @since 0.4 |
| 22 | + * |
| 23 | + * @var Validator |
| 24 | + */ |
| 25 | + protected $validator; |
| 26 | + |
| 27 | + /** |
| 28 | + * @since 0.4 |
| 29 | + * |
| 30 | + * @var Parser |
| 31 | + */ |
| 32 | + protected $parser; |
| 33 | + |
| 34 | + /** |
| 35 | + * @since 0.4 |
| 36 | + * |
| 37 | + * @var boolean |
| 38 | + */ |
| 39 | + protected $forTagExtensions; |
| 40 | + |
| 41 | + /** |
| 42 | + * @since 0.4 |
| 43 | + * |
| 44 | + * @var boolean |
| 45 | + */ |
| 46 | + protected $forParserFunctions; |
| 47 | + |
| 48 | + /** |
| 49 | + * Gets the name of the parser hook. |
| 50 | + * |
| 51 | + * @since 0.4 |
| 52 | + * |
| 53 | + * @return string or array of string |
| 54 | + */ |
| 55 | + protected abstract function getName(); |
| 56 | + |
| 57 | + /** |
| 58 | + * Renders and returns the output. |
| 59 | + * |
| 60 | + * @since 0.4 |
| 61 | + * |
| 62 | + * @param array $parameters |
| 63 | + * |
| 64 | + * @return string |
| 65 | + */ |
| 66 | + protected abstract function render( array $parameters ); |
| 67 | + |
| 68 | + /** |
| 69 | + * Constructor. |
| 70 | + * |
| 71 | + * @since 0.4 |
| 72 | + * |
| 73 | + * @param boolean $forTagExtensions |
| 74 | + * @param boolean $forParserFunctions |
| 75 | + */ |
| 76 | + public function __construct( $forTagExtensions = true, $forParserFunctions = true ) { |
| 77 | + $this->forTagExtensions = $forTagExtensions; |
| 78 | + $this->forParserFunctions = $forParserFunctions; |
| 79 | + } |
| 80 | + |
| 81 | + /** |
| 82 | + * Function to hook up the coordinate rendering functions to the parser. |
| 83 | + * |
| 84 | + * @since 0.4 |
| 85 | + * |
| 86 | + * @param Parser $wgParser |
| 87 | + * |
| 88 | + * @return true |
| 89 | + */ |
| 90 | + public function init( Parser &$wgParser ) { |
| 91 | + $className = get_class( $this ); |
| 92 | + |
| 93 | + foreach ( $this->getNames() as $name ) { |
| 94 | + if ( $this->forTagExtensions ) { |
| 95 | + $wgParser->setHook( |
| 96 | + $this->getTagName( $name ), |
| 97 | + array( new ParserHookCaller( $className, 'renderTag' ), 'runHook' ) |
| 98 | + ); |
| 99 | + } |
| 100 | + |
| 101 | + if ( $this->forParserFunctions ) { |
| 102 | + $wgParser->setFunctionHook( |
| 103 | + $this->getFunctionName( $name ), |
| 104 | + array( new ParserHookCaller( $className, 'renderFunction' ), 'runHook' ) |
| 105 | + ); |
| 106 | + } |
| 107 | + } |
| 108 | + |
| 109 | + return true; |
| 110 | + } |
| 111 | + |
| 112 | + /** |
| 113 | + * returns an array with the names for the parser hook. |
| 114 | + * |
| 115 | + * @since 0.4 |
| 116 | + * |
| 117 | + * @return array |
| 118 | + */ |
| 119 | + protected function getNames() { |
| 120 | + $names = $this->getName(); |
| 121 | + |
| 122 | + if ( !is_array( $names ) ) { |
| 123 | + $names = array( $names ); |
| 124 | + } |
| 125 | + |
| 126 | + return $names; |
| 127 | + } |
| 128 | + |
| 129 | + /** |
| 130 | + * Returns the tag extension version of the name. |
| 131 | + * |
| 132 | + * @since 0.4 |
| 133 | + * |
| 134 | + * @param string $rawName |
| 135 | + * |
| 136 | + * @return string |
| 137 | + */ |
| 138 | + protected function getTagName( $rawName ) { |
| 139 | + return str_replace( '_', ' ', $rawName ); |
| 140 | + } |
| 141 | + |
| 142 | + /** |
| 143 | + * Returns the parser function version of the name. |
| 144 | + * |
| 145 | + * @since 0.4 |
| 146 | + * |
| 147 | + * @param string $rawName |
| 148 | + * |
| 149 | + * @return string |
| 150 | + */ |
| 151 | + protected function getFunctionName( $rawName ) { |
| 152 | + return str_replace( ' ', '_', $rawName ); |
| 153 | + } |
| 154 | + |
| 155 | + /** |
| 156 | + * Function to add the magic word in pre MW 1.16. |
| 157 | + * |
| 158 | + * @since 0.4 |
| 159 | + * |
| 160 | + * @param array $magicWords |
| 161 | + * @param string $langCode |
| 162 | + * |
| 163 | + * @return true |
| 164 | + */ |
| 165 | + public function magic( array &$magicWords, $langCode ) { |
| 166 | + foreach ( $this->getNames() as $name ) { |
| 167 | + $name = $this->getFunctionName( $name ); |
| 168 | + $magicWords[$name] = array( 0, $name ); |
| 169 | + } |
| 170 | + |
| 171 | + return true; |
| 172 | + } |
| 173 | + |
| 174 | + /** |
| 175 | + * Handler for rendering the tag hook. |
| 176 | + * |
| 177 | + * @since 0.4 |
| 178 | + * |
| 179 | + * @param minxed $input string or null |
| 180 | + * @param array $args |
| 181 | + * @param Parser $parser |
| 182 | + * @param PPFrame $frame Available from 1.16 - commented out for bc for now |
| 183 | + * |
| 184 | + * @return string |
| 185 | + */ |
| 186 | + public function renderTag( $input, array $args, Parser $parser /*, PPFrame $frame*/ ) { |
| 187 | + $this->parser = $parser; |
| 188 | + |
| 189 | + $defaultParam = array_shift( $this->getDefaultParameters( self::TYPE_TAG ) ); |
| 190 | + |
| 191 | + // If there is a first default parameter, set the tag contents as it's value. |
| 192 | + if ( !is_null( $defaultParam ) && !is_null( $input ) ) { |
| 193 | + $args[$defaultParam] = $input; |
| 194 | + } |
| 195 | + |
| 196 | + return $this->validateAndRender( $args, self::TYPE_TAG ); |
| 197 | + } |
| 198 | + |
| 199 | + /** |
| 200 | + * Handler for rendering the function hook. |
| 201 | + * |
| 202 | + * @since 0.4 |
| 203 | + * |
| 204 | + * @param Parser $parser |
| 205 | + * ... further arguments ... |
| 206 | + * |
| 207 | + * @return array |
| 208 | + */ |
| 209 | + public function renderFunction() { |
| 210 | + $args = func_get_args(); |
| 211 | + |
| 212 | + $this->parser = array_shift( $args ); |
| 213 | + |
| 214 | + return array_merge( |
| 215 | + array( $this->validateAndRender( $args, self::TYPE_FUNCTION ) ), |
| 216 | + $this->getFunctionOptions() |
| 217 | + ); |
| 218 | + } |
| 219 | + |
| 220 | + /** |
| 221 | + * Returns the parser function otpions. |
| 222 | + * |
| 223 | + * @since 0.4 |
| 224 | + * |
| 225 | + * @return array |
| 226 | + */ |
| 227 | + protected function getFunctionOptions() { |
| 228 | + return array(); |
| 229 | + } |
| 230 | + |
| 231 | + /** |
| 232 | + * Takes care of validation and rendering, and returns the output. |
| 233 | + * |
| 234 | + * @since 0.4 |
| 235 | + * |
| 236 | + * @param array $arguments |
| 237 | + * @param integer $type Item of the ParserHook::TYPE_ enum |
| 238 | + * |
| 239 | + * @return string |
| 240 | + */ |
| 241 | + public function validateAndRender( array $arguments, $type ) { |
| 242 | + global $egValidatorErrorLevel; |
| 243 | + |
| 244 | + $names = $this->getNames(); |
| 245 | + $this->validator = new Validator( $names[0] ); |
| 246 | + |
| 247 | + if ( $type === self::TYPE_FUNCTION ) { |
| 248 | + $this->validator->setFunctionParams( $arguments, $this->getParameterInfo( $type ), $this->getDefaultParameters( $type ) ); |
| 249 | + } |
| 250 | + else { |
| 251 | + $this->validator->setParameters( $arguments, $this->getParameterInfo( $type ) ); |
| 252 | + } |
| 253 | + |
| 254 | + $this->validator->validateParameters(); |
| 255 | + |
| 256 | + $fatalError = $this->validator->hasFatalError(); |
| 257 | + |
| 258 | + if ( $fatalError === false ) { |
| 259 | + $output = $this->render( $this->validator->getParameterValues() ); |
| 260 | + $output = $this->renderErrors( $output ); |
| 261 | + } |
| 262 | + else { |
| 263 | + $output = $this->renderFatalError( $fatalError ); |
| 264 | + } |
| 265 | + |
| 266 | + return $output; |
| 267 | + } |
| 268 | + |
| 269 | + /** |
| 270 | + * Returns the ValidationError objects for the errors and warnings that should be displayed. |
| 271 | + * |
| 272 | + * @since 0.4 |
| 273 | + * |
| 274 | + * @return array of array of ValidationError |
| 275 | + */ |
| 276 | + protected function getErrorsToDisplay() { |
| 277 | + $errors = array(); |
| 278 | + $warnings = array(); |
| 279 | + |
| 280 | + foreach ( $this->validator->getErrors() as $error ) { |
| 281 | + // Check if the severity of the error is high enough to display it. |
| 282 | + if ( $error->shouldShow() ) { |
| 283 | + $errors[] = $error; |
| 284 | + } |
| 285 | + else if ( $error->shouldWarn() ) { |
| 286 | + $warnings[] = $error; |
| 287 | + } |
| 288 | + } |
| 289 | + |
| 290 | + return array( 'errors' => $errors, 'warnings' => $warnings ); |
| 291 | + } |
| 292 | + |
| 293 | + /** |
| 294 | + * Creates and returns the output when a fatal error prevent regular rendering. |
| 295 | + * |
| 296 | + * @since 0.4 |
| 297 | + * |
| 298 | + * @param ValidationError $error |
| 299 | + * |
| 300 | + * @return string |
| 301 | + */ |
| 302 | + protected function renderFatalError( ValidationError $error ) { |
| 303 | + return '<div><span class="errorbox">' . |
| 304 | + htmlspecialchars( wfMsgExt( 'validator-fatal-error', 'parsemag', $error->getMessage() ) ) . |
| 305 | + '</span></div><br /><br />'; |
| 306 | + } |
| 307 | + |
| 308 | + /** |
| 309 | + * @since 0.4 |
| 310 | + * |
| 311 | + * @param string $output |
| 312 | + * |
| 313 | + * @return string |
| 314 | + */ |
| 315 | + protected function renderErrors( $output ) { |
| 316 | + $displayStuff = $this->getErrorsToDisplay(); |
| 317 | + |
| 318 | + if ( count( $displayStuff['errors'] ) > 0 ) { |
| 319 | + $output .= wfMsgExt( 'validator_error_parameters', 'parsemag', count( $displayStuff['errors'] ) ); |
| 320 | + |
| 321 | + foreach( $displayStuff['errors'] as $error ) { |
| 322 | + $output .= '<br />* ' . $error->getMessage(); |
| 323 | + } |
| 324 | + |
| 325 | + if ( count( $displayStuff['warnings'] ) > 0 ) { |
| 326 | + $output .= '<br />* ' . wfMsgExt( 'validator-warning-adittional-errors', 'parsemag', count( $displayStuff['warnings'] ) ); |
| 327 | + } |
| 328 | + } |
| 329 | + else if ( count( $displayStuff['warnings'] ) > 0 ) { |
| 330 | + $output .= wfMsgExt( |
| 331 | + 'validator-warning', |
| 332 | + 'parsemag', |
| 333 | + wfMsgExt( 'validator_warning_parameters', 'parsemag', count( $displayStuff['warnings'] ) ) |
| 334 | + ); |
| 335 | + } |
| 336 | + |
| 337 | + return $output; |
| 338 | + } |
| 339 | + |
| 340 | + /** |
| 341 | + * Returns an array containing the parameter info. |
| 342 | + * Override in deriving classes to add parameter info. |
| 343 | + * |
| 344 | + * @since 0.4 |
| 345 | + * |
| 346 | + * @param integer $type Item of the ParserHook::TYPE_ enum |
| 347 | + * |
| 348 | + * @return array |
| 349 | + */ |
| 350 | + protected function getParameterInfo( $type ) { |
| 351 | + return array(); |
| 352 | + } |
| 353 | + |
| 354 | + /** |
| 355 | + * Returns the list of default parameters. |
| 356 | + * Override in deriving classes to add default parameters. |
| 357 | + * |
| 358 | + * @since 0.4 |
| 359 | + * |
| 360 | + * @param integer $type Item of the ParserHook::TYPE_ enum |
| 361 | + * |
| 362 | + * @return array |
| 363 | + */ |
| 364 | + protected function getDefaultParameters( $type ) { |
| 365 | + return array(); |
| 366 | + } |
| 367 | + |
| 368 | +} |
| 369 | + |
| 370 | +/** |
| 371 | + * Completely evil class to create a new instance of the handling ParserHook when the actual hook gets called. |
| 372 | + * |
| 373 | + * @evillness >9000 - to be replaced when a better solution (LSB?) is possible. |
| 374 | + * |
| 375 | + * @since 0.4 |
| 376 | + * |
| 377 | + * @author Jeroen De Dauw |
| 378 | + */ |
| 379 | +class ParserHookCaller { |
| 380 | + |
| 381 | + protected $class; |
| 382 | + protected $method; |
| 383 | + |
| 384 | + function __construct( $class, $method ) { |
| 385 | + $this->class = $class; |
| 386 | + $this->method = $method; |
| 387 | + } |
| 388 | + |
| 389 | + public function runHook() { |
| 390 | + $args = func_get_args(); |
| 391 | + return call_user_func_array( array( new $this->class(), $this->method ), $args ); |
| 392 | + } |
| 393 | + |
| 394 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/ParserHook.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 395 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/ItemParameterCriterion.php |
— | — | @@ -0,0 +1,171 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Item parameter criterion definition class. This is for criteria |
| 6 | + * that apply to individial values, which can either be the whole value |
| 7 | + * of a non-list parameter, or a single item of a list parameter. |
| 8 | + * |
| 9 | + * @since 0.4 |
| 10 | + * |
| 11 | + * @file ItemParameterCriterion.php |
| 12 | + * @ingroup Validator |
| 13 | + * @ingroup Criteria |
| 14 | + * |
| 15 | + * @author Jeroen De Dauw |
| 16 | + */ |
| 17 | +abstract class ItemParameterCriterion extends ParameterCriterion { |
| 18 | + |
| 19 | + /** |
| 20 | + * Validate a value against the criterion. |
| 21 | + * |
| 22 | + * @param string $value |
| 23 | + * @param Parameter $parameter |
| 24 | + * @param array $parameters |
| 25 | + * |
| 26 | + * @since 0.4 |
| 27 | + * |
| 28 | + * @return boolean |
| 29 | + */ |
| 30 | + protected abstract function doValidation( $value, Parameter $parameter, array $parameters ); |
| 31 | + |
| 32 | + /** |
| 33 | + * Gets an internationalized error message to construct a ValidationError with |
| 34 | + * when the criterions validation failed. (for non-list values) |
| 35 | + * |
| 36 | + * @param Parameter $parameter |
| 37 | + * |
| 38 | + * @since 0.4 |
| 39 | + * |
| 40 | + * @return string |
| 41 | + */ |
| 42 | + protected abstract function getItemErrorMessage( Parameter $parameter ); |
| 43 | + |
| 44 | + /** |
| 45 | + * Constructor. |
| 46 | + * |
| 47 | + * @since 0.4 |
| 48 | + */ |
| 49 | + public function __construct() { |
| 50 | + parent::__construct(); |
| 51 | + } |
| 52 | + |
| 53 | + /** |
| 54 | + * @see ParameterCriterion::isForLists |
| 55 | + */ |
| 56 | + public function isForLists() { |
| 57 | + return false; |
| 58 | + } |
| 59 | + |
| 60 | + /** |
| 61 | + * Validate the provided value or list of values against the criterion. |
| 62 | + * |
| 63 | + * @since 0.4 |
| 64 | + * |
| 65 | + * @param Parameter $parameter |
| 66 | + * @param array $parameters |
| 67 | + * |
| 68 | + * @return CriterionValidationResult |
| 69 | + */ |
| 70 | + public function validate( Parameter $parameter, array $parameters ) { |
| 71 | + $result = new CriterionValidationResult(); |
| 72 | + |
| 73 | + if ( is_array( $parameter->getValue() ) ) { |
| 74 | + foreach ( $parameter->getValue() as $item ) { |
| 75 | + if ( !$this->doValidation( $item, $parameter, $parameters ) ) { |
| 76 | + $result->addInvalidItem( $item ); |
| 77 | + } |
| 78 | + } |
| 79 | + |
| 80 | + if ( $result->hasInvalidItems() ) { |
| 81 | + $allInvalid = count( $result->getInvalidItems() ) == count( $parameter->getValue() ); |
| 82 | + |
| 83 | + // If the parameter is required and all items are invalid, it's fatal. |
| 84 | + // Else it's high for required, and normal for non-required parameters. |
| 85 | + if ( $parameter->isRequired() ) { |
| 86 | + $severity = $allInvalid ? ValidationError::SEVERITY_FATAL : ValidationError::SEVERITY_HIGH; |
| 87 | + } |
| 88 | + else { |
| 89 | + $severity = $allInvalid ? ValidationError::SEVERITY_NORMAL : ValidationError::SEVERITY_LOW; |
| 90 | + } |
| 91 | + |
| 92 | + $result->addError( |
| 93 | + new ValidationError( |
| 94 | + $this->getListErrorMessage( $parameter, $result->getInvalidItems(), $allInvalid ), |
| 95 | + $severity |
| 96 | + ) |
| 97 | + ); |
| 98 | + } |
| 99 | + } |
| 100 | + else { |
| 101 | + if ( !$this->doValidation( $parameter->getValue(), $parameter, $parameters ) ) { |
| 102 | + $result->addError( |
| 103 | + new ValidationError( |
| 104 | + $this->getItemErrorMessage( $parameter ), |
| 105 | + $parameter->isRequired() ? ValidationError::SEVERITY_FATAL : ValidationError::SEVERITY_NORMAL |
| 106 | + ) |
| 107 | + ); |
| 108 | + } |
| 109 | + } |
| 110 | + |
| 111 | + return $result; |
| 112 | + } |
| 113 | + |
| 114 | + /** |
| 115 | + * Gets an internationalized error message to construct a ValidationError with |
| 116 | + * when the criterions validation failed. (for list values) |
| 117 | + * |
| 118 | + * @param Parameter $parameter |
| 119 | + * @param array $invalidItems |
| 120 | + * @param boolean $allInvalid |
| 121 | + * |
| 122 | + * @since 0.4 |
| 123 | + * |
| 124 | + * @return string |
| 125 | + */ |
| 126 | + protected function getListErrorMessage( Parameter $parameter, array $invalidItems, $allInvalid ) { |
| 127 | + if ( $allInvalid ) { |
| 128 | + return $this->getFullListErrorMessage( $parameter ); |
| 129 | + } |
| 130 | + else { |
| 131 | + return $this->getPartialListErrorMessage( $parameter, $invalidItems, $allInvalid ); |
| 132 | + } |
| 133 | + } |
| 134 | + |
| 135 | + /** |
| 136 | + * Gets an internationalized error message to construct a ValidationError with |
| 137 | + * when the criterions validation failed. (for list values when all values are invalid) |
| 138 | + * |
| 139 | + * @param Parameter $parameter |
| 140 | + * |
| 141 | + * @since 0.4 |
| 142 | + * |
| 143 | + * @return string |
| 144 | + */ |
| 145 | + protected function getFullListErrorMessage( Parameter $parameter ) { |
| 146 | + return wfMsgExt( 'validator-error-problem', 'parsemag', $parameter->getOriginalName() ); |
| 147 | + } |
| 148 | + |
| 149 | + /** |
| 150 | + * Gets an internationalized error message to construct a ValidationError with |
| 151 | + * when the criterions validation failed. (for list values when only some values are invalid) |
| 152 | + * |
| 153 | + * @param Parameter $parameter |
| 154 | + * @param array $invalidItems |
| 155 | + * @param boolean $allInvalid |
| 156 | + * |
| 157 | + * @since 0.4 |
| 158 | + * |
| 159 | + * @return string |
| 160 | + */ |
| 161 | + protected function getPartialListErrorMessage( Parameter $parameter, array $invalidItems, $allInvalid ) { |
| 162 | + global $wgLang; |
| 163 | + return $this->getFullListErrorMessage( $parameter ) . |
| 164 | + wfMsgExt( |
| 165 | + 'validator-error-omitted', |
| 166 | + 'parsemag', |
| 167 | + $wgLang->listToText( $invalidItems ), |
| 168 | + count( $invalidItems ) |
| 169 | + ); |
| 170 | + } |
| 171 | + |
| 172 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/ItemParameterCriterion.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 173 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/ItemParameterManipulation.php |
— | — | @@ -0,0 +1,67 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Item parameter manipulation base class. This is for manipulations |
| 6 | + * that apply to individial values, which can either be the whole value |
| 7 | + * of a non-list parameter, or a single item of a list parameter. |
| 8 | + * |
| 9 | + * @since 0.4 |
| 10 | + * |
| 11 | + * @file ItemParameterManipulation.php |
| 12 | + * @ingroup Validator |
| 13 | + * @ingroup ParameterManipulations |
| 14 | + * |
| 15 | + * @author Jeroen De Dauw |
| 16 | + */ |
| 17 | +abstract class ItemParameterManipulation extends ParameterManipulation { |
| 18 | + |
| 19 | + /** |
| 20 | + * Manipulate an actual value. |
| 21 | + * |
| 22 | + * @param string $value |
| 23 | + * @param Parameter $parameter |
| 24 | + * @param array $parameters |
| 25 | + * |
| 26 | + * @since 0.4 |
| 27 | + * |
| 28 | + * @return mixed |
| 29 | + */ |
| 30 | + protected abstract function doManipulation( &$value, Parameter $parameter, array &$parameters ); |
| 31 | + |
| 32 | + /** |
| 33 | + * Constructor. |
| 34 | + * |
| 35 | + * @since 0.4 |
| 36 | + */ |
| 37 | + public function __construct() { |
| 38 | + parent::__construct(); |
| 39 | + } |
| 40 | + |
| 41 | + /** |
| 42 | + * @see ParameterManipulation::isForLists |
| 43 | + */ |
| 44 | + public function isForLists() { |
| 45 | + return false; |
| 46 | + } |
| 47 | + |
| 48 | + /** |
| 49 | + * Validate a parameter against the criterion. |
| 50 | + * |
| 51 | + * @param Parameter $parameter |
| 52 | + * @param array $parameters |
| 53 | + * |
| 54 | + * @since 0.4 |
| 55 | + */ |
| 56 | + public function manipulate( Parameter &$parameter, array &$parameters ) { |
| 57 | + if ( is_array( $parameter->getValue() ) ) { |
| 58 | + $value = &$parameter->getValue(); |
| 59 | + foreach ( $value as &$item ) { |
| 60 | + $this->doManipulation( $item, $parameter, $parameters ); |
| 61 | + } |
| 62 | + } |
| 63 | + else { |
| 64 | + $this->doManipulation( $parameter->getValue(), $parameter, $parameters ); |
| 65 | + } |
| 66 | + } |
| 67 | + |
| 68 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/ItemParameterManipulation.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 69 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/Parameter.php |
— | — | @@ -0,0 +1,716 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter definition class. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file Parameter.php |
| 10 | + * @ingroup Validator |
| 11 | + * |
| 12 | + * @author Jeroen De Dauw |
| 13 | + */ |
| 14 | +class Parameter { |
| 15 | + |
| 16 | + const TYPE_STRING = 'string'; |
| 17 | + const TYPE_NUMBER = 'number'; |
| 18 | + const TYPE_INTEGER = 'integer'; |
| 19 | + const TYPE_FLOAT = 'float'; |
| 20 | + const TYPE_BOOLEAN = 'boolean'; |
| 21 | + const TYPE_CHAR = 'char'; |
| 22 | + |
| 23 | + /** |
| 24 | + * Indicates whether parameters that are provided more then once should be accepted, |
| 25 | + * and use the first provided value, or not, and generate an error. |
| 26 | + * |
| 27 | + * @since 0.4 |
| 28 | + * |
| 29 | + * @var boolean |
| 30 | + */ |
| 31 | + public static $acceptOverriding = false; |
| 32 | + |
| 33 | + /** |
| 34 | + * Indicates whether parameters not found in the criteria list |
| 35 | + * should be stored in case they are not accepted. The default is false. |
| 36 | + * |
| 37 | + * @since 0.4 |
| 38 | + * |
| 39 | + * @var boolean |
| 40 | + */ |
| 41 | + public static $accumulateParameterErrors = false; |
| 42 | + |
| 43 | + /** |
| 44 | + * Indicates if the parameter value should trimmed. |
| 45 | + * |
| 46 | + * @since 0.4 |
| 47 | + * |
| 48 | + * @var boolean |
| 49 | + */ |
| 50 | + public $trimValue = true; |
| 51 | + |
| 52 | + /** |
| 53 | + * Dependency list containing parameters that need to be handled before this one. |
| 54 | + * |
| 55 | + * @since 0.4 |
| 56 | + * |
| 57 | + * @var array |
| 58 | + */ |
| 59 | + protected $dependencies = array(); |
| 60 | + |
| 61 | + /** |
| 62 | + * The default value for the parameter, or null when the parameter is required. |
| 63 | + * |
| 64 | + * @since 0.4 |
| 65 | + * |
| 66 | + * @var mixed |
| 67 | + */ |
| 68 | + protected $default; |
| 69 | + |
| 70 | + /** |
| 71 | + * The main name of the parameter. |
| 72 | + * |
| 73 | + * @since 0.4 |
| 74 | + * |
| 75 | + * @var string |
| 76 | + */ |
| 77 | + protected $name; |
| 78 | + |
| 79 | + /** |
| 80 | + * The type of the parameter, element of the Parameter::TYPE_ enum. |
| 81 | + * |
| 82 | + * @since 0.4 |
| 83 | + * |
| 84 | + * @var string |
| 85 | + */ |
| 86 | + protected $type; |
| 87 | + |
| 88 | + /** |
| 89 | + * List of aliases for the parameter name. |
| 90 | + * |
| 91 | + * @since 0.4 |
| 92 | + * |
| 93 | + * @var array |
| 94 | + */ |
| 95 | + protected $aliases = array(); |
| 96 | + |
| 97 | + /** |
| 98 | + * List of criteria the parameter value needs to hold against. |
| 99 | + * |
| 100 | + * @since 0.4 |
| 101 | + * |
| 102 | + * @var array of ParameterCriterion |
| 103 | + */ |
| 104 | + protected $criteria = array(); |
| 105 | + |
| 106 | + /** |
| 107 | + * List of manipulations the parameter value needs to undergo. |
| 108 | + * |
| 109 | + * @since 0.4 |
| 110 | + * |
| 111 | + * @var array of ParameterManipulation |
| 112 | + */ |
| 113 | + protected $manipulations = array(); |
| 114 | + |
| 115 | + /** |
| 116 | + * The original parameter name as provided by the user. This can be the |
| 117 | + * main name or an alias. |
| 118 | + * |
| 119 | + * @since 0.4 |
| 120 | + * |
| 121 | + * @var string |
| 122 | + */ |
| 123 | + protected $originalName; |
| 124 | + |
| 125 | + /** |
| 126 | + * The original value as provided by the user. This is mainly retained for |
| 127 | + * usage in error messages when the parameter turns out to be invalid. |
| 128 | + * |
| 129 | + * @since 0.4 |
| 130 | + * |
| 131 | + * @var string |
| 132 | + */ |
| 133 | + protected $originalValue; |
| 134 | + |
| 135 | + /** |
| 136 | + * The value of the parameter. |
| 137 | + * |
| 138 | + * @since 0.4 |
| 139 | + * |
| 140 | + * @var mixed |
| 141 | + */ |
| 142 | + protected $value; |
| 143 | + |
| 144 | + /** |
| 145 | + * Keeps track of how many times the parameter has been set by the user. |
| 146 | + * This is used to detect overrides and for figuring out a parameter is missing. |
| 147 | + * |
| 148 | + * @since 0.4 |
| 149 | + * |
| 150 | + * @var integer |
| 151 | + */ |
| 152 | + protected $setCount = 0; |
| 153 | + |
| 154 | + /** |
| 155 | + * List of validation errors for this parameter. |
| 156 | + * |
| 157 | + * @since 0.4 |
| 158 | + * |
| 159 | + * @var array of ValidationError |
| 160 | + */ |
| 161 | + protected $errors = array(); |
| 162 | + |
| 163 | + /** |
| 164 | + * Indicates if the parameter manipualations should be applied to the default value. |
| 165 | + * |
| 166 | + * @since 0.4 |
| 167 | + * |
| 168 | + * @var boolean |
| 169 | + */ |
| 170 | + protected $applyManipulationsToDefault = true; |
| 171 | + |
| 172 | + /** |
| 173 | + * Indicates if the parameter was set to it's default. |
| 174 | + * |
| 175 | + * @since 0.4 |
| 176 | + * |
| 177 | + * @var boolean |
| 178 | + */ |
| 179 | + protected $defaulted = false; |
| 180 | + |
| 181 | + /** |
| 182 | + * Constructor. |
| 183 | + * |
| 184 | + * @since 0.4 |
| 185 | + * |
| 186 | + * @param string $name |
| 187 | + * @param string $type |
| 188 | + * @param mixed $default Use null for no default (which makes the parameter required) |
| 189 | + * @param array $aliases |
| 190 | + * @param array $criteria |
| 191 | + * @param array $dependencies |
| 192 | + */ |
| 193 | + public function __construct( $name, $type = Parameter::TYPE_STRING, |
| 194 | + $default = null, array $aliases = array(), array $criteria = array(), array $dependencies = array() ) { |
| 195 | + |
| 196 | + $this->name = $name; |
| 197 | + $this->type = $type; |
| 198 | + $this->default = $default; |
| 199 | + $this->aliases = $aliases; |
| 200 | + |
| 201 | + $this->cleanCriteria( $criteria ); |
| 202 | + $this->criteria = $criteria; |
| 203 | + |
| 204 | + $this->dependencies = $dependencies; |
| 205 | + } |
| 206 | + |
| 207 | + /** |
| 208 | + * Ensures all Validator 3.x-style criteria definitions are converted into ParameterCriterion instances. |
| 209 | + * |
| 210 | + * @since 0.4 |
| 211 | + * |
| 212 | + * @param array $criteria |
| 213 | + */ |
| 214 | + protected function cleanCriteria( array &$criteria ) { |
| 215 | + foreach ( $criteria as $key => &$criterion ) { |
| 216 | + if ( !$criterion instanceof ParameterCriterion ) { |
| 217 | + throw new Exception( "$key is not a valid ParameterCriterion." ); |
| 218 | + } |
| 219 | + } |
| 220 | + } |
| 221 | + |
| 222 | + /** |
| 223 | + * Adds one or more aliases for the parameter name. |
| 224 | + * |
| 225 | + * @since 0.4 |
| 226 | + * |
| 227 | + * @param mixed $aliases string or array of string |
| 228 | + */ |
| 229 | + public function addAliases() { |
| 230 | + $args = func_get_args(); |
| 231 | + $this->aliases = array_merge( $this->aliases, is_array( $args[0] ) ? $args[0] : $args ); |
| 232 | + } |
| 233 | + |
| 234 | + /** |
| 235 | + * Adds one or more ParameterCriterion. |
| 236 | + * |
| 237 | + * @since 0.4 |
| 238 | + * |
| 239 | + * @param mixed $criteria ParameterCriterion or array of ParameterCriterion |
| 240 | + */ |
| 241 | + public function addCriteria() { |
| 242 | + $args = func_get_args(); |
| 243 | + $this->criteria = array_merge( $this->criteria, is_array( $args[0] ) ? $args[0] : $args ); |
| 244 | + } |
| 245 | + |
| 246 | + /** |
| 247 | + * Adds one or more dependencies. There are the names of parameters |
| 248 | + * that need to be validated and formatted before this one. |
| 249 | + * |
| 250 | + * @since 0.4 |
| 251 | + * |
| 252 | + * @return array |
| 253 | + */ |
| 254 | + public function addDependencies() { |
| 255 | + $args = func_get_args(); |
| 256 | + $this->dependencies = array_merge( $this->dependencies, is_array( $args[0] ) ? $args[0] : $args ); |
| 257 | + } |
| 258 | + |
| 259 | + /** |
| 260 | + * Adds one or more ParameterManipulation. |
| 261 | + * |
| 262 | + * @since 0.4 |
| 263 | + * |
| 264 | + * @param mixed $manipulations ParameterManipulation or array of ParameterManipulation |
| 265 | + */ |
| 266 | + public function addManipulations( $manipulations ) { |
| 267 | + $args = func_get_args(); |
| 268 | + $this->manipulations = array_merge( $this->manipulations, is_array( $args[0] ) ? $args[0] : $args ); |
| 269 | + } |
| 270 | + |
| 271 | + /** |
| 272 | + * Sets and cleans the original value and name. |
| 273 | + * |
| 274 | + * @since 0.4 |
| 275 | + * |
| 276 | + * @param string $paramName |
| 277 | + * @param string $paramValue |
| 278 | + * |
| 279 | + * @return boolean |
| 280 | + */ |
| 281 | + public function setUserValue( $paramName, $paramValue ) { |
| 282 | + if ( $this->setCount > 0 && !self::$acceptOverriding ) { |
| 283 | + // TODO: fatal error |
| 284 | + /* |
| 285 | + $this->registerError( |
| 286 | + wfMsgExt( |
| 287 | + 'validator-error-override-argument', |
| 288 | + 'parsemag', |
| 289 | + $paramName, |
| 290 | + $this->mParameters[$mainName]['original-value'], |
| 291 | + is_array( $paramData ) ? $paramData['original-value'] : $paramData |
| 292 | + ), |
| 293 | + 'override' |
| 294 | + ); |
| 295 | + */ |
| 296 | + return false; |
| 297 | + } |
| 298 | + else { |
| 299 | + $this->originalName = $paramName; |
| 300 | + $this->originalValue = $paramValue; |
| 301 | + |
| 302 | + $this->cleanValue(); |
| 303 | + |
| 304 | + $this->setCount++; |
| 305 | + |
| 306 | + return true; |
| 307 | + } |
| 308 | + } |
| 309 | + |
| 310 | + /** |
| 311 | + * Sets the value. |
| 312 | + * |
| 313 | + * @since 0.4 |
| 314 | + * |
| 315 | + * @param mixed $value |
| 316 | + */ |
| 317 | + public function setValue( $value ) { |
| 318 | + $this->value = $value; |
| 319 | + } |
| 320 | + |
| 321 | + /** |
| 322 | + * Sets the $value to a cleaned value of $originalValue. |
| 323 | + * |
| 324 | + * @since 0.4 |
| 325 | + */ |
| 326 | + protected function cleanValue() { |
| 327 | + $this->value = $this->originalValue; |
| 328 | + |
| 329 | + if ( $this->trimValue ) { |
| 330 | + $this->value = trim( $this->value ); |
| 331 | + } |
| 332 | + } |
| 333 | + |
| 334 | + /** |
| 335 | + * Validates the parameter value and sets the value to it's default when errors occur. |
| 336 | + * |
| 337 | + * @since 0.4 |
| 338 | + * |
| 339 | + * @param array $parameters |
| 340 | + */ |
| 341 | + public function validate( array $parameters ) { |
| 342 | + $this->doValidation( $parameters ); |
| 343 | + } |
| 344 | + |
| 345 | + /** |
| 346 | + * Applies the parameter manipulations. |
| 347 | + * |
| 348 | + * @since 0.4 |
| 349 | + * |
| 350 | + * @param array $parameters |
| 351 | + */ |
| 352 | + public function format( array &$parameters ) { |
| 353 | + if ( $this->applyManipulationsToDefault || !$this->wasSetToDefault() ) { |
| 354 | + foreach ( $this->getManipulations() as $manipulation ) { |
| 355 | + $manipulation->manipulate( $this, $parameters ); |
| 356 | + } |
| 357 | + } |
| 358 | + } |
| 359 | + |
| 360 | + /** |
| 361 | + * Validates the parameter value. |
| 362 | + * Also sets the value to the default when it's not set or invalid, assuming there is a default. |
| 363 | + * |
| 364 | + * @since 0.4 |
| 365 | + * |
| 366 | + * @param array $parameters |
| 367 | + */ |
| 368 | + protected function doValidation( array $parameters ) { |
| 369 | + if ( $this->setCount == 0 ) { |
| 370 | + if ( $this->isRequired() ) { |
| 371 | + // This should not occur, so thorw an exception. |
| 372 | + throw new Exception( 'Attempted to validate a required parameter without first setting a value.' ); |
| 373 | + } |
| 374 | + else { |
| 375 | + $this->setToDefault(); |
| 376 | + } |
| 377 | + } |
| 378 | + else { |
| 379 | + $this->validateCriteria( $parameters ); |
| 380 | + $this->setToDefaultIfNeeded(); |
| 381 | + } |
| 382 | + } |
| 383 | + |
| 384 | + /** |
| 385 | + * Sets the parameter value to the default if needed. |
| 386 | + * |
| 387 | + * @since 0.4 |
| 388 | + */ |
| 389 | + protected function setToDefaultIfNeeded() { |
| 390 | + if ( count( $this->errors ) > 0 && !$this->hasFatalError() ) { |
| 391 | + $this->setToDefault(); |
| 392 | + } |
| 393 | + } |
| 394 | + |
| 395 | + /** |
| 396 | + * Validates the provided value against all criteria. |
| 397 | + * |
| 398 | + * @since 0.4 |
| 399 | + * |
| 400 | + * @param array $parameters |
| 401 | + */ |
| 402 | + protected function validateCriteria( array $parameters ) { |
| 403 | + foreach ( $this->getCriteria() as $criterion ) { |
| 404 | + $validationResult = $criterion->validate( $this, $parameters ); |
| 405 | + |
| 406 | + if ( !$validationResult->isValid() ) { |
| 407 | + $this->handleValidationError( $validationResult ); |
| 408 | + |
| 409 | + if ( !self::$accumulateParameterErrors || $this->hasFatalError() ) { |
| 410 | + break; |
| 411 | + } |
| 412 | + } |
| 413 | + } |
| 414 | + } |
| 415 | + |
| 416 | + /** |
| 417 | + * Handles any validation errors that occured for a single criterion. |
| 418 | + * |
| 419 | + * @since 0.4 |
| 420 | + * |
| 421 | + * @param CriterionValidationResult $validationResult |
| 422 | + */ |
| 423 | + protected function handleValidationError( CriterionValidationResult $validationResult ) { |
| 424 | + foreach ( $validationResult->getErrors() as $error ) { |
| 425 | + $error->addTags( $this->getName() ); |
| 426 | + $this->errors[] = $error; |
| 427 | + } |
| 428 | + } |
| 429 | + |
| 430 | + /** |
| 431 | + * Returns the parameters main name. |
| 432 | + * |
| 433 | + * @since 0.4 |
| 434 | + * |
| 435 | + * @return string |
| 436 | + */ |
| 437 | + public function getName() { |
| 438 | + return $this->name; |
| 439 | + } |
| 440 | + |
| 441 | + /** |
| 442 | + * Returns the parameters value. |
| 443 | + * |
| 444 | + * @since 0.4 |
| 445 | + * |
| 446 | + * @return string |
| 447 | + */ |
| 448 | + public function &getValue() { |
| 449 | + return $this->value; |
| 450 | + } |
| 451 | + |
| 452 | + /** |
| 453 | + * Returns a list of dependencies the parameter has, in the form of |
| 454 | + * other parameter names. |
| 455 | + * |
| 456 | + * @since 0.4 |
| 457 | + * |
| 458 | + * @return array |
| 459 | + */ |
| 460 | + public function getDependencies() { |
| 461 | + return $this->dependencies; |
| 462 | + } |
| 463 | + |
| 464 | + /** |
| 465 | + * Returns the original use-provided name. |
| 466 | + * |
| 467 | + * @since 0.4 |
| 468 | + * |
| 469 | + * @return string |
| 470 | + */ |
| 471 | + public function getOriginalName() { |
| 472 | + if ( $this->setCount == 0 ) { |
| 473 | + throw new Exception( 'No user imput set to the parameter yet, so the original name does not exist' ); |
| 474 | + } |
| 475 | + return $this->originalName; |
| 476 | + } |
| 477 | + |
| 478 | + /** |
| 479 | + * Returns the original use-provided value. |
| 480 | + * |
| 481 | + * @since 0.4 |
| 482 | + * |
| 483 | + * @return string |
| 484 | + */ |
| 485 | + public function getOriginalValue() { |
| 486 | + if ( $this->setCount == 0 ) { |
| 487 | + throw new Exception( 'No user imput set to the parameter yet, so the original value does not exist' ); |
| 488 | + } |
| 489 | + return $this->originalValue; |
| 490 | + } |
| 491 | + |
| 492 | + /** |
| 493 | + * Returns all validation errors that occured so far. |
| 494 | + * |
| 495 | + * @since 0.4 |
| 496 | + * |
| 497 | + * @return array of ValidationError |
| 498 | + */ |
| 499 | + public function getErrors() { |
| 500 | + return $this->errors; |
| 501 | + } |
| 502 | + |
| 503 | + /** |
| 504 | + * Returns if the parameter is a required one or not. |
| 505 | + * |
| 506 | + * @since 0.4 |
| 507 | + * |
| 508 | + * @return boolean |
| 509 | + */ |
| 510 | + public function isRequired() { |
| 511 | + return is_null( $this->default ); |
| 512 | + } |
| 513 | + |
| 514 | + /** |
| 515 | + * Returns if the parameter is a list or not. |
| 516 | + * |
| 517 | + * @since 0.4 |
| 518 | + * |
| 519 | + * @return boolean |
| 520 | + */ |
| 521 | + public function isList() { |
| 522 | + return false; |
| 523 | + } |
| 524 | + |
| 525 | + /** |
| 526 | + * Returns the parameter criteria. |
| 527 | + * |
| 528 | + * @since 0.4 |
| 529 | + * |
| 530 | + * @return array of ParameterCriterion |
| 531 | + */ |
| 532 | + public function getCriteria() { |
| 533 | + return array_merge( $this->getCriteriaForType(), $this->criteria ); |
| 534 | + } |
| 535 | + |
| 536 | + /** |
| 537 | + * Returns the parameter manipulations. |
| 538 | + * |
| 539 | + * @since 0.4 |
| 540 | + * |
| 541 | + * @return array of ParameterManipulation |
| 542 | + */ |
| 543 | + public function getManipulations() { |
| 544 | + return array_merge( $this->getManipulationsForType(), $this->manipulations ); |
| 545 | + } |
| 546 | + |
| 547 | + /** |
| 548 | + * Gets the criteria for the type of the parameter. |
| 549 | + * |
| 550 | + * @since 0.4 |
| 551 | + * |
| 552 | + * @return array |
| 553 | + */ |
| 554 | + protected function getCriteriaForType() { |
| 555 | + $criteria = array(); |
| 556 | + |
| 557 | + switch( $this->type ) { |
| 558 | + case self::TYPE_INTEGER: |
| 559 | + $criteria[] = new CriterionIsInteger(); |
| 560 | + break; |
| 561 | + case self::TYPE_FLOAT: |
| 562 | + $criteria[] = new CriterionIsFloat(); |
| 563 | + break; |
| 564 | + case self::TYPE_NUMBER: // Note: This accepts non-decimal notations! |
| 565 | + $criteria[] = new CriterionIsNumeric(); |
| 566 | + break; |
| 567 | + case self::TYPE_BOOLEAN: |
| 568 | + // TODO: work with list of true and false values and i18n. |
| 569 | + $criteria[] = new CriterionInArray( 'yes', 'no', 'on', 'off' ); |
| 570 | + break; |
| 571 | + case self::TYPE_CHAR: |
| 572 | + $criteria[] = new CriterionHasLength( 1, 1 ); |
| 573 | + break; |
| 574 | + case self::TYPE_STRING: default: |
| 575 | + // No extra criteria for strings. |
| 576 | + break; |
| 577 | + } |
| 578 | + |
| 579 | + return $criteria; |
| 580 | + } |
| 581 | + |
| 582 | + /** |
| 583 | + * Gets the manipulation for the type of the parameter. |
| 584 | + * |
| 585 | + * @since 0.4 |
| 586 | + * |
| 587 | + * @return array |
| 588 | + */ |
| 589 | + protected function getManipulationsForType() { |
| 590 | + $manipulations = array(); |
| 591 | + |
| 592 | + switch( $this->type ) { |
| 593 | + case self::TYPE_INTEGER: |
| 594 | + $manipulations[] = new ParamManipulationInteger(); |
| 595 | + break; |
| 596 | + case self::TYPE_FLOAT: case self::TYPE_NUMBER: |
| 597 | + $manipulations[] = new ParamManipulationFloat(); |
| 598 | + break; |
| 599 | + case self::TYPE_BOOLEAN: |
| 600 | + $manipulations[] = new ParamManipulationBoolean(); |
| 601 | + break; |
| 602 | + case self::TYPE_CHAR: case self::TYPE_STRING: default: |
| 603 | + // No extra manipulations for these types |
| 604 | + break; |
| 605 | + } |
| 606 | + |
| 607 | + return $manipulations; |
| 608 | + } |
| 609 | + |
| 610 | + /** |
| 611 | + * Sets the parameter value to the default. |
| 612 | + * |
| 613 | + * @since 0.4 |
| 614 | + */ |
| 615 | + protected function setToDefault() { |
| 616 | + $this->defaulted = true; |
| 617 | + $this->value = $this->default; |
| 618 | + } |
| 619 | + |
| 620 | + /** |
| 621 | + * Gets if the parameter was set to it's default. |
| 622 | + * |
| 623 | + * @since 0.4 |
| 624 | + * |
| 625 | + * @return boolean |
| 626 | + */ |
| 627 | + public function wasSetToDefault() { |
| 628 | + return $this->defaulted; |
| 629 | + } |
| 630 | + |
| 631 | + /** |
| 632 | + * Returns the criteria that apply to the list as a whole. |
| 633 | + * |
| 634 | + * @since 0.4 |
| 635 | + * |
| 636 | + * @return array |
| 637 | + */ |
| 638 | + public function getListCriteria() { |
| 639 | + return array(); |
| 640 | + } |
| 641 | + |
| 642 | + /** |
| 643 | + * Returns the parameter name aliases. |
| 644 | + * |
| 645 | + * @since 0.4 |
| 646 | + * |
| 647 | + * @return array |
| 648 | + */ |
| 649 | + public function getAliases() { |
| 650 | + return $this->aliases; |
| 651 | + } |
| 652 | + |
| 653 | + /** |
| 654 | + * Returns if the parameter has a certain alias. |
| 655 | + * |
| 656 | + * @since 0.4 |
| 657 | + * |
| 658 | + * @param string $alias |
| 659 | + * |
| 660 | + * @return boolean |
| 661 | + */ |
| 662 | + public function hasAlias( $alias ) { |
| 663 | + return in_array( $alias, $this->getAliases() ); |
| 664 | + } |
| 665 | + |
| 666 | + /** |
| 667 | + * Returns if the parameter has a certain dependency. |
| 668 | + * |
| 669 | + * @since 0.4 |
| 670 | + * |
| 671 | + * @param string $dependency |
| 672 | + * |
| 673 | + * @return boolean |
| 674 | + */ |
| 675 | + public function hasDependency( $dependency ) { |
| 676 | + return in_array( $dependency, $this->getDependencies() ); |
| 677 | + } |
| 678 | + |
| 679 | + /** |
| 680 | + * Sets the default parameter value. Null indicates no default, |
| 681 | + * and therefore makes the parameter required. |
| 682 | + * |
| 683 | + * @since 0.4 |
| 684 | + * |
| 685 | + * @param mixed $default |
| 686 | + */ |
| 687 | + public function setDefault( $default ) { |
| 688 | + $this->default = $default; |
| 689 | + } |
| 690 | + |
| 691 | + /** |
| 692 | + * Set if the parameter manipualations should be applied to the default value. |
| 693 | + * |
| 694 | + * @since 0.4 |
| 695 | + * |
| 696 | + * @param boolean $doOrDoNot |
| 697 | + */ |
| 698 | + public function setDoManipulationOfDefault( $doOrDoNot ) { |
| 699 | + $this->applyManipulationsToDefault = $doOrDoNot; |
| 700 | + } |
| 701 | + |
| 702 | + /** |
| 703 | + * Returns false when there are no fatal errors or an ValidationError when one is found. |
| 704 | + * |
| 705 | + * @return mixed false or ValidationError |
| 706 | + */ |
| 707 | + public function hasFatalError() { |
| 708 | + foreach ( $this->errors as $error ) { |
| 709 | + if ( $error->isFatal() ) { |
| 710 | + return true; |
| 711 | + } |
| 712 | + } |
| 713 | + |
| 714 | + return false; |
| 715 | + } |
| 716 | + |
| 717 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/Parameter.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 718 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/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 __construct( $dependencies = array(), $parse = true ) { |
| 33 | + $this->mNodeNames = array_keys( $dependencies ); |
| 34 | + |
| 35 | + if ( $parse ) { |
| 36 | + $dependencies = $this->parseDependencyList( $dependencies ); |
| 37 | + } |
| 38 | + |
| 39 | + // turn pairs into double-linked node tree |
| 40 | + foreach ( $dependencies as $key => $dpair ) { |
| 41 | + list ( $module, $dependency ) = each ( $dpair ); |
| 42 | + if ( !isset( $this->mNodes[$module] ) ) $this->mNodes[$module] = new TSNode( $module ); |
| 43 | + if ( !isset( $this->mNodes[$dependency] ) ) $this->mNodes[$dependency] = new TSNode( $dependency ); |
| 44 | + if ( !in_array( $dependency, $this->mNodes[$module]->children ) ) $this->mNodes[$module]->children[] = $dependency; |
| 45 | + if ( !in_array( $module, $this->mNodes[$dependency]->parents ) ) $this->mNodes[$dependency]->parents[] = $module; |
| 46 | + } |
| 47 | + } |
| 48 | + |
| 49 | + /** |
| 50 | + * Perform Topological Sort. |
| 51 | + * |
| 52 | + * @return sorted array |
| 53 | + */ |
| 54 | + public function doSort() { |
| 55 | + $nodes = $this->mNodes; |
| 56 | + |
| 57 | + // get nodes without parents |
| 58 | + $root_nodes = array_values( $this->getRootNodes( $nodes ) ); |
| 59 | + |
| 60 | + // begin algorithm |
| 61 | + $sorted = array(); |
| 62 | + while ( count( $nodes ) > 0 ) { |
| 63 | + // check for circular reference |
| 64 | + if ( count( $root_nodes ) == 0 ) return false; |
| 65 | + |
| 66 | + |
| 67 | + // remove this node from root_nodes |
| 68 | + // and add it to the output |
| 69 | + $n = array_pop( $root_nodes ); |
| 70 | + $sorted[] = $n->name; |
| 71 | + |
| 72 | + // for each of its children |
| 73 | + // queue the new node finally remove the original |
| 74 | + for ( $i = count( $n->children ) - 1; $i >= 0; $i -- ) { |
| 75 | + $childnode = $n->children[$i]; |
| 76 | + // remove the link from this node to its |
| 77 | + // children ($nodes[$n->name]->children[$i]) AND |
| 78 | + // remove the link from each child to this |
| 79 | + // parent ($nodes[$childnode]->parents[?]) THEN |
| 80 | + // remove this child from this node |
| 81 | + unset( $nodes[$n->name]->children[$i] ); |
| 82 | + $parent_position = array_search ( $n->name, $nodes[$childnode]->parents ); |
| 83 | + unset( $nodes[$childnode]->parents[$parent_position] ); |
| 84 | + // check if this child has other parents |
| 85 | + // if not, add it to the root nodes list |
| 86 | + if ( !count( $nodes[$childnode]->parents ) ) { |
| 87 | + array_push( $root_nodes, $nodes [$childnode] ); |
| 88 | + } |
| 89 | + } |
| 90 | + |
| 91 | + // nodes.Remove(n); |
| 92 | + unset( $nodes[$n->name] ); |
| 93 | + } |
| 94 | + |
| 95 | + $looseNodes = array(); |
| 96 | + |
| 97 | + // Return the result with the loose nodes (items with no dependencies) appended. |
| 98 | + foreach( $this->mNodeNames as $name ) { |
| 99 | + if ( !in_array( $name, $sorted ) ) { |
| 100 | + $looseNodes[] = $name; |
| 101 | + } |
| 102 | + } |
| 103 | + |
| 104 | + return array_merge( $sorted, $looseNodes ); |
| 105 | + } |
| 106 | + |
| 107 | + /** |
| 108 | + * Returns a list of node objects that do not have parents |
| 109 | + * |
| 110 | + * @param array $nodes array of node objects |
| 111 | + * |
| 112 | + * @return array of node objects |
| 113 | + */ |
| 114 | + private function getRootNodes( array $nodes ) { |
| 115 | + $output = array (); |
| 116 | + |
| 117 | + foreach ( $nodes as $name => $node ) { |
| 118 | + if ( !count ( $node->parents ) ) { |
| 119 | + $output[$name] = $node; |
| 120 | + } |
| 121 | + } |
| 122 | + |
| 123 | + return $output; |
| 124 | + } |
| 125 | + |
| 126 | + /** |
| 127 | + * Parses an array of dependencies into an array of dependency pairs |
| 128 | + * |
| 129 | + * The array of dependencies would be in the form: |
| 130 | + * $dependency_list = array( |
| 131 | + * "name" => array("dependency1","dependency2","dependency3"), |
| 132 | + * "name2" => array("dependencyA","dependencyB","dependencyC"), |
| 133 | + * ...etc |
| 134 | + * ); |
| 135 | + * |
| 136 | + * @param array $dlist Array of dependency pairs for use as parameter in doSort method |
| 137 | + * |
| 138 | + * @return array |
| 139 | + */ |
| 140 | + private function parseDependencyList( array $dlist = array() ) { |
| 141 | + $output = array(); |
| 142 | + |
| 143 | + foreach ( $dlist as $name => $dependencies ) { |
| 144 | + foreach ( $dependencies as $d ) { |
| 145 | + array_push ( $output, array ( $d => $name ) ); |
| 146 | + } |
| 147 | + } |
| 148 | + |
| 149 | + return $output; |
| 150 | + } |
| 151 | +} |
| 152 | + |
| 153 | +/** |
| 154 | + * Node class for Topological Sort Class |
| 155 | + */ |
| 156 | +class TSNode { |
| 157 | + public $name; |
| 158 | + public $children = array(); |
| 159 | + public $parents = array(); |
| 160 | + |
| 161 | + public function TSNode( $name = '' ) { |
| 162 | + $this->name = $name; |
| 163 | + } |
| 164 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/TopologicalSort.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 165 | + native |
Index: tags/extensions/Validator/REL_0_4_2/includes/Validator.php |
— | — | @@ -0,0 +1,430 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Class for parameter validation of a single parser hook or other parameterized construct. |
| 6 | + * |
| 7 | + * @since 0.1 |
| 8 | + * |
| 9 | + * @file Validator.php |
| 10 | + * @ingroup Validator |
| 11 | + * |
| 12 | + * @author Jeroen De Dauw |
| 13 | + * |
| 14 | + * TODO: break on fatal errors, such as missing required parameters that are dependencies |
| 15 | + */ |
| 16 | +class Validator { |
| 17 | + |
| 18 | + /** |
| 19 | + * Array containing the parameters. |
| 20 | + * |
| 21 | + * @since 0.4 |
| 22 | + * |
| 23 | + * @var array of Parameter |
| 24 | + */ |
| 25 | + protected $parameters; |
| 26 | + |
| 27 | + /** |
| 28 | + * Asscoaitive array containing parameter names (keys) and their user-provided data (values). |
| 29 | + * This list is needed because adittional parameter definitions can be added to the $parameters |
| 30 | + * feild during validation, so we can't determine in advance if a parameter is unknown. |
| 31 | + * |
| 32 | + * @since 0.4 |
| 33 | + * |
| 34 | + * @var array of string |
| 35 | + */ |
| 36 | + protected $rawParameters = array(); |
| 37 | + |
| 38 | + /** |
| 39 | + * Array containing the names of the parameters to handle, ordered by priority. |
| 40 | + * |
| 41 | + * @since 0.4 |
| 42 | + * |
| 43 | + * @var array |
| 44 | + */ |
| 45 | + protected $paramsToHandle = array(); |
| 46 | + |
| 47 | + /** |
| 48 | + * List of ValidationError. |
| 49 | + * |
| 50 | + * @since 0.4 |
| 51 | + * |
| 52 | + * @var array |
| 53 | + */ |
| 54 | + protected $errors = array(); |
| 55 | + |
| 56 | + /** |
| 57 | + * Name of the element that's being validated. |
| 58 | + * |
| 59 | + * @since 0.4 |
| 60 | + * |
| 61 | + * @var string |
| 62 | + */ |
| 63 | + protected $element; |
| 64 | + |
| 65 | + /** |
| 66 | + * Constructor. |
| 67 | + * |
| 68 | + * @param srting $element |
| 69 | + * |
| 70 | + * @since 0.4 |
| 71 | + */ |
| 72 | + public function __construct( $element = '' ) { |
| 73 | + $this->element = $element; |
| 74 | + } |
| 75 | + |
| 76 | + /** |
| 77 | + * Determines the names and values of all parameters. Also takes care of default parameters. |
| 78 | + * After that the resulting parameter list is passed to Validator::setParameters |
| 79 | + * |
| 80 | + * @since 0.4 |
| 81 | + * |
| 82 | + * @param array $rawParams |
| 83 | + * @param array $parameterInfo |
| 84 | + * @param array $defaultParams |
| 85 | + * @param boolean $toLower Indicates if the parameter values should be put to lower case. Defaults to true. |
| 86 | + */ |
| 87 | + public function setFunctionParams( array $rawParams, array $parameterInfo, array $defaultParams = array(), $toLower = true ) { |
| 88 | + $parameters = array(); |
| 89 | + |
| 90 | + $nr = 0; |
| 91 | + $defaultNr = 0; |
| 92 | + |
| 93 | + foreach ( $rawParams as $arg ) { |
| 94 | + // Only take into account strings. If the value is not a string, |
| 95 | + // it is not a raw parameter, and can not be parsed correctly in all cases. |
| 96 | + if ( is_string( $arg ) ) { |
| 97 | + $parts = explode( '=', $arg, 2 ); |
| 98 | + |
| 99 | + // If there is only one part, no parameter name is provided, so try default parameter assignment. |
| 100 | + if ( count( $parts ) == 1 ) { |
| 101 | + // Default parameter assignment is only possible when there are default parameters! |
| 102 | + if ( count( $defaultParams ) > 0 ) { |
| 103 | + $defaultParam = strtolower( array_shift( $defaultParams ) ); |
| 104 | + |
| 105 | + $parameters[$defaultParam] = array( |
| 106 | + 'original-value' => trim( $parts[0] ), |
| 107 | + 'default' => $defaultNr, |
| 108 | + 'position' => $nr |
| 109 | + ); |
| 110 | + $defaultNr++; |
| 111 | + } |
| 112 | + else { |
| 113 | + // It might be nice to have some sort of warning or error here, as the value is simply ignored. |
| 114 | + } |
| 115 | + } else { |
| 116 | + $paramName = trim( strtolower( $parts[0] ) ); |
| 117 | + |
| 118 | + $parameters[$paramName] = array( |
| 119 | + 'original-value' => trim( $parts[1] ), |
| 120 | + 'default' => false, |
| 121 | + 'position' => $nr |
| 122 | + ); |
| 123 | + |
| 124 | + // Let's not be evil, and remove the used parameter name from the default parameter list. |
| 125 | + // This code is basically a remove array element by value algorithm. |
| 126 | + $newDefaults = array(); |
| 127 | + |
| 128 | + foreach( $defaultParams as $defaultParam ) { |
| 129 | + if ( $defaultParam != $paramName ) $newDefaults[] = $defaultParam; |
| 130 | + } |
| 131 | + |
| 132 | + $defaultParams = $newDefaults; |
| 133 | + } |
| 134 | + } |
| 135 | + |
| 136 | + $nr++; |
| 137 | + } |
| 138 | + |
| 139 | + $this->setParameters( $parameters, $parameterInfo, false ); |
| 140 | + } |
| 141 | + |
| 142 | + /** |
| 143 | + * Loops through a list of provided parameters, resolves aliasing and stores errors |
| 144 | + * for unknown parameters and optionally for parameter overriding. |
| 145 | + * |
| 146 | + * @param array $parameters Parameter name as key, parameter value as value |
| 147 | + * @param array $parameterInfo Main parameter name as key, parameter meta data as valu |
| 148 | + * @param boolean $toLower Indicates if the parameter values should be put to lower case. Defaults to true. |
| 149 | + */ |
| 150 | + public function setParameters( array $parameters, array $parameterInfo, $toLower = true ) { |
| 151 | + $this->cleanParameterInfo( $parameterInfo ); |
| 152 | + |
| 153 | + $this->parameters = $parameterInfo; |
| 154 | + |
| 155 | + // Loop through all the user provided parameters, and destinguise between those that are allowed and those that are not. |
| 156 | + foreach ( $parameters as $paramName => $paramData ) { |
| 157 | + $paramName = trim( strtolower( $paramName ) ); |
| 158 | + $paramValue = is_array( $paramData ) ? $paramData['original-value'] : trim( $paramData ); |
| 159 | + |
| 160 | + $this->rawParameters[$paramName] = $paramValue; |
| 161 | + } |
| 162 | + } |
| 163 | + |
| 164 | + /** |
| 165 | + * Registers an error. |
| 166 | + * |
| 167 | + * @since 0.4 |
| 168 | + * |
| 169 | + * @param string $message |
| 170 | + * @param mixed $tags string or array |
| 171 | + * @param integer $severity |
| 172 | + */ |
| 173 | + protected function registerNewError( $message, $tags = array(), $severity = ValidationError::SEVERITY_NORMAL ) { |
| 174 | + $this->registerError( |
| 175 | + new ValidationError( |
| 176 | + $message, |
| 177 | + $severity, |
| 178 | + $this->element, |
| 179 | + (array)$tags |
| 180 | + ) |
| 181 | + ); |
| 182 | + } |
| 183 | + |
| 184 | + /** |
| 185 | + * Registers an error. |
| 186 | + * |
| 187 | + * @since 0.4 |
| 188 | + * |
| 189 | + * @param ValidationError $error |
| 190 | + */ |
| 191 | + protected function registerError( ValidationError $error ) { |
| 192 | + $error->element = $this->element; |
| 193 | + $this->errors[] = $error; |
| 194 | + ValidationErrorHandler::addError( $error ); |
| 195 | + } |
| 196 | + |
| 197 | + /** |
| 198 | + * Ensures all elements of the array are Parameter objects, |
| 199 | + * and that the array keys match the main parameter name. |
| 200 | + * |
| 201 | + * @since 0.4 |
| 202 | + * |
| 203 | + * @param array $paramInfo |
| 204 | + */ |
| 205 | + protected function cleanParameterInfo( array &$paramInfo ) { |
| 206 | + $cleanedList = array(); |
| 207 | + |
| 208 | + foreach ( $paramInfo as $key => $parameter ) { |
| 209 | + if ( $parameter instanceof Parameter ) { |
| 210 | + $cleanedList[$parameter->getName()] = $parameter; |
| 211 | + } |
| 212 | + else { |
| 213 | + throw new Exception( "$key is not a valid Parameter." ); |
| 214 | + } |
| 215 | + } |
| 216 | + |
| 217 | + $paramInfo = $cleanedList; |
| 218 | + } |
| 219 | + |
| 220 | + /** |
| 221 | + * Validates and formats all the parameters (but aborts when a fatal error occurs). |
| 222 | + * |
| 223 | + * @since 0.4 |
| 224 | + */ |
| 225 | + public function validateParameters() { |
| 226 | + $this->doParamProcessing(); |
| 227 | + |
| 228 | + if ( !$this->hasfatalError() ) { |
| 229 | + // Loop over the remaining raw parameters. |
| 230 | + // These are unrecognized parameters, as they where not used by any parameter definition. |
| 231 | + foreach ( $this->rawParameters as $paramName => $paramValue ) { |
| 232 | + $this->registerNewError( |
| 233 | + wfMsgExt( 'validator_error_unknown_argument', 'parsemag', $paramName ), |
| 234 | + $paramName |
| 235 | + ); |
| 236 | + } |
| 237 | + } |
| 238 | + } |
| 239 | + |
| 240 | + /** |
| 241 | + * Does the actual parameter processing. |
| 242 | + * |
| 243 | + * @since 0.4 |
| 244 | + */ |
| 245 | + protected function doParamProcessing() { |
| 246 | + $this->getParamsToProcess( array(), $this->parameters ); |
| 247 | + |
| 248 | + while ( $paramName = array_shift( $this->paramsTohandle ) ) { |
| 249 | + $parameter = $this->parameters[$paramName]; |
| 250 | + |
| 251 | + $setUservalue = $this->attemptToSetUserValue( $parameter ); |
| 252 | + |
| 253 | + // If the parameter is required but not provided, register a fatal error and stop processing. |
| 254 | + if ( !$setUservalue && $parameter->isRequired() ) { |
| 255 | + $this->registerNewError( |
| 256 | + wfMsgExt( 'validator_error_required_missing', 'parsemag', $paramName ), |
| 257 | + array( $paramName, 'missing' ), |
| 258 | + ValidationError::SEVERITY_FATAL |
| 259 | + ); |
| 260 | + break; |
| 261 | + } |
| 262 | + else { |
| 263 | + $parameter->validate( $this->parameters ); |
| 264 | + |
| 265 | + foreach ( $parameter->getErrors() as $error ) { |
| 266 | + $this->registerError( $error ); |
| 267 | + } |
| 268 | + |
| 269 | + if ( $parameter->hasFatalError() ) { |
| 270 | + // If there was a fatal error, and the parameter is required, stop processing. |
| 271 | + break; |
| 272 | + } |
| 273 | + |
| 274 | + $initialSet = $this->parameters; |
| 275 | + |
| 276 | + $parameter->format( $this->parameters ); |
| 277 | + |
| 278 | + $this->getParamsToProcess( $initialSet, $this->parameters ); |
| 279 | + } |
| 280 | + } |
| 281 | + } |
| 282 | + |
| 283 | + /** |
| 284 | + * Gets an ordered list of parameters to process. |
| 285 | + * |
| 286 | + * @since 0.4 |
| 287 | + * |
| 288 | + * @param array $initialParamSet |
| 289 | + * @param array $resultingParamSet |
| 290 | + */ |
| 291 | + protected function getParamsToProcess( array $initialParamSet, array $resultingParamSet ) { |
| 292 | + if ( count( $initialParamSet ) == 0 ) { |
| 293 | + $this->paramsTohandle = array_keys( $resultingParamSet ); |
| 294 | + } |
| 295 | + else { |
| 296 | + if ( !is_array( $this->paramsTohandle ) ) { |
| 297 | + $this->paramsTohandle = array(); |
| 298 | + } |
| 299 | + |
| 300 | + foreach ( $resultingParamSet as $paramName => $parameter ) { |
| 301 | + if ( !array_key_exists( $paramName, $initialParamSet ) ) { |
| 302 | + $this->paramsTohandle[] = $paramName; |
| 303 | + } |
| 304 | + } |
| 305 | + } |
| 306 | + |
| 307 | + $dependencyList = array(); |
| 308 | + |
| 309 | + // Loop over the parameters to handle to create a dependency list. |
| 310 | + foreach ( $this->paramsTohandle as $paramName ) { |
| 311 | + $dependencies = array(); |
| 312 | + |
| 313 | + // Only include dependencies that are in the list of parameters to handle. |
| 314 | + foreach ( $this->parameters[$paramName]->getDependencies() as $dependency ) { |
| 315 | + if ( in_array( $dependency, $this->paramsTohandle ) ) { |
| 316 | + $dependencies[] = $dependency; |
| 317 | + } |
| 318 | + } |
| 319 | + |
| 320 | + $dependencyList[$paramName] = $dependencies; |
| 321 | + } |
| 322 | + |
| 323 | + $sorter = new TopologicalSort( $dependencyList, true ); |
| 324 | + |
| 325 | + $this->paramsTohandle = $sorter->doSort(); |
| 326 | + } |
| 327 | + |
| 328 | + /** |
| 329 | + * Tries to find a matching user provided value and, when found, assingns it |
| 330 | + * to the parameter, and removes it from the raw values. Returns a boolean |
| 331 | + * indicating if there was any user value set or not. |
| 332 | + * |
| 333 | + * @since 0.4 |
| 334 | + * |
| 335 | + * @return boolean |
| 336 | + */ |
| 337 | + protected function attemptToSetUserValue( Parameter $parameter ) { |
| 338 | + if ( array_key_exists( $parameter->getName(), $this->rawParameters ) ) { |
| 339 | + $parameter->setUserValue( $parameter->getName(), $this->rawParameters[$parameter->getName()] ); |
| 340 | + unset( $this->rawParameters[$parameter->getName()] ); |
| 341 | + return true; |
| 342 | + } |
| 343 | + else { |
| 344 | + foreach ( $parameter->getAliases() as $alias ) { |
| 345 | + if ( array_key_exists( $alias, $this->rawParameters ) ) { |
| 346 | + $parameter->setUserValue( $alias, $this->rawParameters[$alias] ); |
| 347 | + unset( $this->rawParameters[$alias] ); |
| 348 | + return true; |
| 349 | + } |
| 350 | + } |
| 351 | + } |
| 352 | + |
| 353 | + return false; |
| 354 | + } |
| 355 | + |
| 356 | + /** |
| 357 | + * Returns the parameters. |
| 358 | + * |
| 359 | + * @since 0.4 |
| 360 | + * |
| 361 | + * @return array |
| 362 | + */ |
| 363 | + public function getParameters() { |
| 364 | + return $this->parameters; |
| 365 | + } |
| 366 | + |
| 367 | + /** |
| 368 | + * Returns a single parameter. |
| 369 | + * |
| 370 | + * @since 0.4 |
| 371 | + * |
| 372 | + * @param string $parameterName The name of the parameter to return |
| 373 | + * |
| 374 | + * @return Parameter |
| 375 | + */ |
| 376 | + public function getParameter( $parameterName ) { |
| 377 | + return $this->parameters[$parameterName]; |
| 378 | + } |
| 379 | + |
| 380 | + /** |
| 381 | + * Returns an associative array with the parameter names as key and their |
| 382 | + * correspinding values as value. |
| 383 | + * |
| 384 | + * @since 0.4 |
| 385 | + * |
| 386 | + * @return array |
| 387 | + */ |
| 388 | + public function getParameterValues() { |
| 389 | + $parameters = array(); |
| 390 | + |
| 391 | + foreach ( $this->parameters as $parameter ) { |
| 392 | + $parameters[$parameter->getName()] = $parameter->getValue(); |
| 393 | + } |
| 394 | + |
| 395 | + return $parameters; |
| 396 | + } |
| 397 | + |
| 398 | + /** |
| 399 | + * Returns the errors. |
| 400 | + * |
| 401 | + * @return array of ValidationError |
| 402 | + */ |
| 403 | + public function getErrors() { |
| 404 | + return $this->errors; |
| 405 | + } |
| 406 | + |
| 407 | + /** |
| 408 | + * Returns if there where any errors during validation. |
| 409 | + * |
| 410 | + * @return boolean |
| 411 | + */ |
| 412 | + public function hasErrors() { |
| 413 | + return count( $this->errors ) > 0; |
| 414 | + } |
| 415 | + |
| 416 | + /** |
| 417 | + * Returns false when there are no fatal errors or an ValidationError when one is found. |
| 418 | + * |
| 419 | + * @return mixed false or ValidationError |
| 420 | + */ |
| 421 | + public function hasFatalError() { |
| 422 | + foreach ( $this->errors as $error ) { |
| 423 | + if ( $error->isFatal() ) { |
| 424 | + return $error; |
| 425 | + } |
| 426 | + } |
| 427 | + |
| 428 | + return false; |
| 429 | + } |
| 430 | + |
| 431 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/includes/Validator.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 432 | + native |
Index: tags/extensions/Validator/REL_0_4_2/COPYING |
— | — | @@ -0,0 +1,682 @@ |
| 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 this software for convenience. |
| 8 | +---- |
| 9 | + |
| 10 | + GNU GENERAL PUBLIC LICENSE |
| 11 | + Version 3, 29 June 2007 |
| 12 | + |
| 13 | + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> |
| 14 | + Everyone is permitted to copy and distribute verbatim copies |
| 15 | + of this license document, but changing it is not allowed. |
| 16 | + |
| 17 | + Preamble |
| 18 | + |
| 19 | + The GNU General Public License is a free, copyleft license for |
| 20 | +software and other kinds of works. |
| 21 | + |
| 22 | + The licenses for most software and other practical works are designed |
| 23 | +to take away your freedom to share and change the works. By contrast, |
| 24 | +the GNU General Public License is intended to guarantee your freedom to |
| 25 | +share and change all versions of a program--to make sure it remains free |
| 26 | +software for all its users. We, the Free Software Foundation, use the |
| 27 | +GNU General Public License for most of our software; it applies also to |
| 28 | +any other work released this way by its authors. You can apply it to |
| 29 | +your programs, too. |
| 30 | + |
| 31 | + When we speak of free software, we are referring to freedom, not |
| 32 | +price. Our General Public Licenses are designed to make sure that you |
| 33 | +have the freedom to distribute copies of free software (and charge for |
| 34 | +them if you wish), that you receive source code or can get it if you |
| 35 | +want it, that you can change the software or use pieces of it in new |
| 36 | +free programs, and that you know you can do these things. |
| 37 | + |
| 38 | + To protect your rights, we need to prevent others from denying you |
| 39 | +these rights or asking you to surrender the rights. Therefore, you have |
| 40 | +certain responsibilities if you distribute copies of the software, or if |
| 41 | +you modify it: responsibilities to respect the freedom of others. |
| 42 | + |
| 43 | + For example, if you distribute copies of such a program, whether |
| 44 | +gratis or for a fee, you must pass on to the recipients the same |
| 45 | +freedoms that you received. You must make sure that they, too, receive |
| 46 | +or can get the source code. And you must show them these terms so they |
| 47 | +know their rights. |
| 48 | + |
| 49 | + Developers that use the GNU GPL protect your rights with two steps: |
| 50 | +(1) assert copyright on the software, and (2) offer you this License |
| 51 | +giving you legal permission to copy, distribute and/or modify it. |
| 52 | + |
| 53 | + For the developers' and authors' protection, the GPL clearly explains |
| 54 | +that there is no warranty for this free software. For both users' and |
| 55 | +authors' sake, the GPL requires that modified versions be marked as |
| 56 | +changed, so that their problems will not be attributed erroneously to |
| 57 | +authors of previous versions. |
| 58 | + |
| 59 | + Some devices are designed to deny users access to install or run |
| 60 | +modified versions of the software inside them, although the manufacturer |
| 61 | +can do so. This is fundamentally incompatible with the aim of |
| 62 | +protecting users' freedom to change the software. The systematic |
| 63 | +pattern of such abuse occurs in the area of products for individuals to |
| 64 | +use, which is precisely where it is most unacceptable. Therefore, we |
| 65 | +have designed this version of the GPL to prohibit the practice for those |
| 66 | +products. If such problems arise substantially in other domains, we |
| 67 | +stand ready to extend this provision to those domains in future versions |
| 68 | +of the GPL, as needed to protect the freedom of users. |
| 69 | + |
| 70 | + Finally, every program is threatened constantly by software patents. |
| 71 | +States should not allow patents to restrict development and use of |
| 72 | +software on general-purpose computers, but in those that do, we wish to |
| 73 | +avoid the special danger that patents applied to a free program could |
| 74 | +make it effectively proprietary. To prevent this, the GPL assures that |
| 75 | +patents cannot be used to render the program non-free. |
| 76 | + |
| 77 | + The precise terms and conditions for copying, distribution and |
| 78 | +modification follow. |
| 79 | + |
| 80 | + TERMS AND CONDITIONS |
| 81 | + |
| 82 | + 0. Definitions. |
| 83 | + |
| 84 | + "This License" refers to version 3 of the GNU General Public License. |
| 85 | + |
| 86 | + "Copyright" also means copyright-like laws that apply to other kinds of |
| 87 | +works, such as semiconductor masks. |
| 88 | + |
| 89 | + "The Program" refers to any copyrightable work licensed under this |
| 90 | +License. Each licensee is addressed as "you". "Licensees" and |
| 91 | +"recipients" may be individuals or organizations. |
| 92 | + |
| 93 | + To "modify" a work means to copy from or adapt all or part of the work |
| 94 | +in a fashion requiring copyright permission, other than the making of an |
| 95 | +exact copy. The resulting work is called a "modified version" of the |
| 96 | +earlier work or a work "based on" the earlier work. |
| 97 | + |
| 98 | + A "covered work" means either the unmodified Program or a work based |
| 99 | +on the Program. |
| 100 | + |
| 101 | + To "propagate" a work means to do anything with it that, without |
| 102 | +permission, would make you directly or secondarily liable for |
| 103 | +infringement under applicable copyright law, except executing it on a |
| 104 | +computer or modifying a private copy. Propagation includes copying, |
| 105 | +distribution (with or without modification), making available to the |
| 106 | +public, and in some countries other activities as well. |
| 107 | + |
| 108 | + To "convey" a work means any kind of propagation that enables other |
| 109 | +parties to make or receive copies. Mere interaction with a user through |
| 110 | +a computer network, with no transfer of a copy, is not conveying. |
| 111 | + |
| 112 | + An interactive user interface displays "Appropriate Legal Notices" |
| 113 | +to the extent that it includes a convenient and prominently visible |
| 114 | +feature that (1) displays an appropriate copyright notice, and (2) |
| 115 | +tells the user that there is no warranty for the work (except to the |
| 116 | +extent that warranties are provided), that licensees may convey the |
| 117 | +work under this License, and how to view a copy of this License. If |
| 118 | +the interface presents a list of user commands or options, such as a |
| 119 | +menu, a prominent item in the list meets this criterion. |
| 120 | + |
| 121 | + 1. Source Code. |
| 122 | + |
| 123 | + The "source code" for a work means the preferred form of the work |
| 124 | +for making modifications to it. "Object code" means any non-source |
| 125 | +form of a work. |
| 126 | + |
| 127 | + A "Standard Interface" means an interface that either is an official |
| 128 | +standard defined by a recognized standards body, or, in the case of |
| 129 | +interfaces specified for a particular programming language, one that |
| 130 | +is widely used among developers working in that language. |
| 131 | + |
| 132 | + The "System Libraries" of an executable work include anything, other |
| 133 | +than the work as a whole, that (a) is included in the normal form of |
| 134 | +packaging a Major Component, but which is not part of that Major |
| 135 | +Component, and (b) serves only to enable use of the work with that |
| 136 | +Major Component, or to implement a Standard Interface for which an |
| 137 | +implementation is available to the public in source code form. A |
| 138 | +"Major Component", in this context, means a major essential component |
| 139 | +(kernel, window system, and so on) of the specific operating system |
| 140 | +(if any) on which the executable work runs, or a compiler used to |
| 141 | +produce the work, or an object code interpreter used to run it. |
| 142 | + |
| 143 | + The "Corresponding Source" for a work in object code form means all |
| 144 | +the source code needed to generate, install, and (for an executable |
| 145 | +work) run the object code and to modify the work, including scripts to |
| 146 | +control those activities. However, it does not include the work's |
| 147 | +System Libraries, or general-purpose tools or generally available free |
| 148 | +programs which are used unmodified in performing those activities but |
| 149 | +which are not part of the work. For example, Corresponding Source |
| 150 | +includes interface definition files associated with source files for |
| 151 | +the work, and the source code for shared libraries and dynamically |
| 152 | +linked subprograms that the work is specifically designed to require, |
| 153 | +such as by intimate data communication or control flow between those |
| 154 | +subprograms and other parts of the work. |
| 155 | + |
| 156 | + The Corresponding Source need not include anything that users |
| 157 | +can regenerate automatically from other parts of the Corresponding |
| 158 | +Source. |
| 159 | + |
| 160 | + The Corresponding Source for a work in source code form is that |
| 161 | +same work. |
| 162 | + |
| 163 | + 2. Basic Permissions. |
| 164 | + |
| 165 | + All rights granted under this License are granted for the term of |
| 166 | +copyright on the Program, and are irrevocable provided the stated |
| 167 | +conditions are met. This License explicitly affirms your unlimited |
| 168 | +permission to run the unmodified Program. The output from running a |
| 169 | +covered work is covered by this License only if the output, given its |
| 170 | +content, constitutes a covered work. This License acknowledges your |
| 171 | +rights of fair use or other equivalent, as provided by copyright law. |
| 172 | + |
| 173 | + You may make, run and propagate covered works that you do not |
| 174 | +convey, without conditions so long as your license otherwise remains |
| 175 | +in force. You may convey covered works to others for the sole purpose |
| 176 | +of having them make modifications exclusively for you, or provide you |
| 177 | +with facilities for running those works, provided that you comply with |
| 178 | +the terms of this License in conveying all material for which you do |
| 179 | +not control copyright. Those thus making or running the covered works |
| 180 | +for you must do so exclusively on your behalf, under your direction |
| 181 | +and control, on terms that prohibit them from making any copies of |
| 182 | +your copyrighted material outside their relationship with you. |
| 183 | + |
| 184 | + Conveying under any other circumstances is permitted solely under |
| 185 | +the conditions stated below. Sublicensing is not allowed; section 10 |
| 186 | +makes it unnecessary. |
| 187 | + |
| 188 | + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. |
| 189 | + |
| 190 | + No covered work shall be deemed part of an effective technological |
| 191 | +measure under any applicable law fulfilling obligations under article |
| 192 | +11 of the WIPO copyright treaty adopted on 20 December 1996, or |
| 193 | +similar laws prohibiting or restricting circumvention of such |
| 194 | +measures. |
| 195 | + |
| 196 | + When you convey a covered work, you waive any legal power to forbid |
| 197 | +circumvention of technological measures to the extent such circumvention |
| 198 | +is effected by exercising rights under this License with respect to |
| 199 | +the covered work, and you disclaim any intention to limit operation or |
| 200 | +modification of the work as a means of enforcing, against the work's |
| 201 | +users, your or third parties' legal rights to forbid circumvention of |
| 202 | +technological measures. |
| 203 | + |
| 204 | + 4. Conveying Verbatim Copies. |
| 205 | + |
| 206 | + You may convey verbatim copies of the Program's source code as you |
| 207 | +receive it, in any medium, provided that you conspicuously and |
| 208 | +appropriately publish on each copy an appropriate copyright notice; |
| 209 | +keep intact all notices stating that this License and any |
| 210 | +non-permissive terms added in accord with section 7 apply to the code; |
| 211 | +keep intact all notices of the absence of any warranty; and give all |
| 212 | +recipients a copy of this License along with the Program. |
| 213 | + |
| 214 | + You may charge any price or no price for each copy that you convey, |
| 215 | +and you may offer support or warranty protection for a fee. |
| 216 | + |
| 217 | + 5. Conveying Modified Source Versions. |
| 218 | + |
| 219 | + You may convey a work based on the Program, or the modifications to |
| 220 | +produce it from the Program, in the form of source code under the |
| 221 | +terms of section 4, provided that you also meet all of these conditions: |
| 222 | + |
| 223 | + a) The work must carry prominent notices stating that you modified |
| 224 | + it, and giving a relevant date. |
| 225 | + |
| 226 | + b) The work must carry prominent notices stating that it is |
| 227 | + released under this License and any conditions added under section |
| 228 | + 7. This requirement modifies the requirement in section 4 to |
| 229 | + "keep intact all notices". |
| 230 | + |
| 231 | + c) You must license the entire work, as a whole, under this |
| 232 | + License to anyone who comes into possession of a copy. This |
| 233 | + License will therefore apply, along with any applicable section 7 |
| 234 | + additional terms, to the whole of the work, and all its parts, |
| 235 | + regardless of how they are packaged. This License gives no |
| 236 | + permission to license the work in any other way, but it does not |
| 237 | + invalidate such permission if you have separately received it. |
| 238 | + |
| 239 | + d) If the work has interactive user interfaces, each must display |
| 240 | + Appropriate Legal Notices; however, if the Program has interactive |
| 241 | + interfaces that do not display Appropriate Legal Notices, your |
| 242 | + work need not make them do so. |
| 243 | + |
| 244 | + A compilation of a covered work with other separate and independent |
| 245 | +works, which are not by their nature extensions of the covered work, |
| 246 | +and which are not combined with it such as to form a larger program, |
| 247 | +in or on a volume of a storage or distribution medium, is called an |
| 248 | +"aggregate" if the compilation and its resulting copyright are not |
| 249 | +used to limit the access or legal rights of the compilation's users |
| 250 | +beyond what the individual works permit. Inclusion of a covered work |
| 251 | +in an aggregate does not cause this License to apply to the other |
| 252 | +parts of the aggregate. |
| 253 | + |
| 254 | + 6. Conveying Non-Source Forms. |
| 255 | + |
| 256 | + You may convey a covered work in object code form under the terms |
| 257 | +of sections 4 and 5, provided that you also convey the |
| 258 | +machine-readable Corresponding Source under the terms of this License, |
| 259 | +in one of these ways: |
| 260 | + |
| 261 | + a) Convey the object code in, or embodied in, a physical product |
| 262 | + (including a physical distribution medium), accompanied by the |
| 263 | + Corresponding Source fixed on a durable physical medium |
| 264 | + customarily used for software interchange. |
| 265 | + |
| 266 | + b) Convey the object code in, or embodied in, a physical product |
| 267 | + (including a physical distribution medium), accompanied by a |
| 268 | + written offer, valid for at least three years and valid for as |
| 269 | + long as you offer spare parts or customer support for that product |
| 270 | + model, to give anyone who possesses the object code either (1) a |
| 271 | + copy of the Corresponding Source for all the software in the |
| 272 | + product that is covered by this License, on a durable physical |
| 273 | + medium customarily used for software interchange, for a price no |
| 274 | + more than your reasonable cost of physically performing this |
| 275 | + conveying of source, or (2) access to copy the |
| 276 | + Corresponding Source from a network server at no charge. |
| 277 | + |
| 278 | + c) Convey individual copies of the object code with a copy of the |
| 279 | + written offer to provide the Corresponding Source. This |
| 280 | + alternative is allowed only occasionally and noncommercially, and |
| 281 | + only if you received the object code with such an offer, in accord |
| 282 | + with subsection 6b. |
| 283 | + |
| 284 | + d) Convey the object code by offering access from a designated |
| 285 | + place (gratis or for a charge), and offer equivalent access to the |
| 286 | + Corresponding Source in the same way through the same place at no |
| 287 | + further charge. You need not require recipients to copy the |
| 288 | + Corresponding Source along with the object code. If the place to |
| 289 | + copy the object code is a network server, the Corresponding Source |
| 290 | + may be on a different server (operated by you or a third party) |
| 291 | + that supports equivalent copying facilities, provided you maintain |
| 292 | + clear directions next to the object code saying where to find the |
| 293 | + Corresponding Source. Regardless of what server hosts the |
| 294 | + Corresponding Source, you remain obligated to ensure that it is |
| 295 | + available for as long as needed to satisfy these requirements. |
| 296 | + |
| 297 | + e) Convey the object code using peer-to-peer transmission, provided |
| 298 | + you inform other peers where the object code and Corresponding |
| 299 | + Source of the work are being offered to the general public at no |
| 300 | + charge under subsection 6d. |
| 301 | + |
| 302 | + A separable portion of the object code, whose source code is excluded |
| 303 | +from the Corresponding Source as a System Library, need not be |
| 304 | +included in conveying the object code work. |
| 305 | + |
| 306 | + A "User Product" is either (1) a "consumer product", which means any |
| 307 | +tangible personal property which is normally used for personal, family, |
| 308 | +or household purposes, or (2) anything designed or sold for incorporation |
| 309 | +into a dwelling. In determining whether a product is a consumer product, |
| 310 | +doubtful cases shall be resolved in favor of coverage. For a particular |
| 311 | +product received by a particular user, "normally used" refers to a |
| 312 | +typical or common use of that class of product, regardless of the status |
| 313 | +of the particular user or of the way in which the particular user |
| 314 | +actually uses, or expects or is expected to use, the product. A product |
| 315 | +is a consumer product regardless of whether the product has substantial |
| 316 | +commercial, industrial or non-consumer uses, unless such uses represent |
| 317 | +the only significant mode of use of the product. |
| 318 | + |
| 319 | + "Installation Information" for a User Product means any methods, |
| 320 | +procedures, authorization keys, or other information required to install |
| 321 | +and execute modified versions of a covered work in that User Product from |
| 322 | +a modified version of its Corresponding Source. The information must |
| 323 | +suffice to ensure that the continued functioning of the modified object |
| 324 | +code is in no case prevented or interfered with solely because |
| 325 | +modification has been made. |
| 326 | + |
| 327 | + If you convey an object code work under this section in, or with, or |
| 328 | +specifically for use in, a User Product, and the conveying occurs as |
| 329 | +part of a transaction in which the right of possession and use of the |
| 330 | +User Product is transferred to the recipient in perpetuity or for a |
| 331 | +fixed term (regardless of how the transaction is characterized), the |
| 332 | +Corresponding Source conveyed under this section must be accompanied |
| 333 | +by the Installation Information. But this requirement does not apply |
| 334 | +if neither you nor any third party retains the ability to install |
| 335 | +modified object code on the User Product (for example, the work has |
| 336 | +been installed in ROM). |
| 337 | + |
| 338 | + The requirement to provide Installation Information does not include a |
| 339 | +requirement to continue to provide support service, warranty, or updates |
| 340 | +for a work that has been modified or installed by the recipient, or for |
| 341 | +the User Product in which it has been modified or installed. Access to a |
| 342 | +network may be denied when the modification itself materially and |
| 343 | +adversely affects the operation of the network or violates the rules and |
| 344 | +protocols for communication across the network. |
| 345 | + |
| 346 | + Corresponding Source conveyed, and Installation Information provided, |
| 347 | +in accord with this section must be in a format that is publicly |
| 348 | +documented (and with an implementation available to the public in |
| 349 | +source code form), and must require no special password or key for |
| 350 | +unpacking, reading or copying. |
| 351 | + |
| 352 | + 7. Additional Terms. |
| 353 | + |
| 354 | + "Additional permissions" are terms that supplement the terms of this |
| 355 | +License by making exceptions from one or more of its conditions. |
| 356 | +Additional permissions that are applicable to the entire Program shall |
| 357 | +be treated as though they were included in this License, to the extent |
| 358 | +that they are valid under applicable law. If additional permissions |
| 359 | +apply only to part of the Program, that part may be used separately |
| 360 | +under those permissions, but the entire Program remains governed by |
| 361 | +this License without regard to the additional permissions. |
| 362 | + |
| 363 | + When you convey a copy of a covered work, you may at your option |
| 364 | +remove any additional permissions from that copy, or from any part of |
| 365 | +it. (Additional permissions may be written to require their own |
| 366 | +removal in certain cases when you modify the work.) You may place |
| 367 | +additional permissions on material, added by you to a covered work, |
| 368 | +for which you have or can give appropriate copyright permission. |
| 369 | + |
| 370 | + Notwithstanding any other provision of this License, for material you |
| 371 | +add to a covered work, you may (if authorized by the copyright holders of |
| 372 | +that material) supplement the terms of this License with terms: |
| 373 | + |
| 374 | + a) Disclaiming warranty or limiting liability differently from the |
| 375 | + terms of sections 15 and 16 of this License; or |
| 376 | + |
| 377 | + b) Requiring preservation of specified reasonable legal notices or |
| 378 | + author attributions in that material or in the Appropriate Legal |
| 379 | + Notices displayed by works containing it; or |
| 380 | + |
| 381 | + c) Prohibiting misrepresentation of the origin of that material, or |
| 382 | + requiring that modified versions of such material be marked in |
| 383 | + reasonable ways as different from the original version; or |
| 384 | + |
| 385 | + d) Limiting the use for publicity purposes of names of licensors or |
| 386 | + authors of the material; or |
| 387 | + |
| 388 | + e) Declining to grant rights under trademark law for use of some |
| 389 | + trade names, trademarks, or service marks; or |
| 390 | + |
| 391 | + f) Requiring indemnification of licensors and authors of that |
| 392 | + material by anyone who conveys the material (or modified versions of |
| 393 | + it) with contractual assumptions of liability to the recipient, for |
| 394 | + any liability that these contractual assumptions directly impose on |
| 395 | + those licensors and authors. |
| 396 | + |
| 397 | + All other non-permissive additional terms are considered "further |
| 398 | +restrictions" within the meaning of section 10. If the Program as you |
| 399 | +received it, or any part of it, contains a notice stating that it is |
| 400 | +governed by this License along with a term that is a further |
| 401 | +restriction, you may remove that term. If a license document contains |
| 402 | +a further restriction but permits relicensing or conveying under this |
| 403 | +License, you may add to a covered work material governed by the terms |
| 404 | +of that license document, provided that the further restriction does |
| 405 | +not survive such relicensing or conveying. |
| 406 | + |
| 407 | + If you add terms to a covered work in accord with this section, you |
| 408 | +must place, in the relevant source files, a statement of the |
| 409 | +additional terms that apply to those files, or a notice indicating |
| 410 | +where to find the applicable terms. |
| 411 | + |
| 412 | + Additional terms, permissive or non-permissive, may be stated in the |
| 413 | +form of a separately written license, or stated as exceptions; |
| 414 | +the above requirements apply either way. |
| 415 | + |
| 416 | + 8. Termination. |
| 417 | + |
| 418 | + You may not propagate or modify a covered work except as expressly |
| 419 | +provided under this License. Any attempt otherwise to propagate or |
| 420 | +modify it is void, and will automatically terminate your rights under |
| 421 | +this License (including any patent licenses granted under the third |
| 422 | +paragraph of section 11). |
| 423 | + |
| 424 | + However, if you cease all violation of this License, then your |
| 425 | +license from a particular copyright holder is reinstated (a) |
| 426 | +provisionally, unless and until the copyright holder explicitly and |
| 427 | +finally terminates your license, and (b) permanently, if the copyright |
| 428 | +holder fails to notify you of the violation by some reasonable means |
| 429 | +prior to 60 days after the cessation. |
| 430 | + |
| 431 | + Moreover, your license from a particular copyright holder is |
| 432 | +reinstated permanently if the copyright holder notifies you of the |
| 433 | +violation by some reasonable means, this is the first time you have |
| 434 | +received notice of violation of this License (for any work) from that |
| 435 | +copyright holder, and you cure the violation prior to 30 days after |
| 436 | +your receipt of the notice. |
| 437 | + |
| 438 | + Termination of your rights under this section does not terminate the |
| 439 | +licenses of parties who have received copies or rights from you under |
| 440 | +this License. If your rights have been terminated and not permanently |
| 441 | +reinstated, you do not qualify to receive new licenses for the same |
| 442 | +material under section 10. |
| 443 | + |
| 444 | + 9. Acceptance Not Required for Having Copies. |
| 445 | + |
| 446 | + You are not required to accept this License in order to receive or |
| 447 | +run a copy of the Program. Ancillary propagation of a covered work |
| 448 | +occurring solely as a consequence of using peer-to-peer transmission |
| 449 | +to receive a copy likewise does not require acceptance. However, |
| 450 | +nothing other than this License grants you permission to propagate or |
| 451 | +modify any covered work. These actions infringe copyright if you do |
| 452 | +not accept this License. Therefore, by modifying or propagating a |
| 453 | +covered work, you indicate your acceptance of this License to do so. |
| 454 | + |
| 455 | + 10. Automatic Licensing of Downstream Recipients. |
| 456 | + |
| 457 | + Each time you convey a covered work, the recipient automatically |
| 458 | +receives a license from the original licensors, to run, modify and |
| 459 | +propagate that work, subject to this License. You are not responsible |
| 460 | +for enforcing compliance by third parties with this License. |
| 461 | + |
| 462 | + An "entity transaction" is a transaction transferring control of an |
| 463 | +organization, or substantially all assets of one, or subdividing an |
| 464 | +organization, or merging organizations. If propagation of a covered |
| 465 | +work results from an entity transaction, each party to that |
| 466 | +transaction who receives a copy of the work also receives whatever |
| 467 | +licenses to the work the party's predecessor in interest had or could |
| 468 | +give under the previous paragraph, plus a right to possession of the |
| 469 | +Corresponding Source of the work from the predecessor in interest, if |
| 470 | +the predecessor has it or can get it with reasonable efforts. |
| 471 | + |
| 472 | + You may not impose any further restrictions on the exercise of the |
| 473 | +rights granted or affirmed under this License. For example, you may |
| 474 | +not impose a license fee, royalty, or other charge for exercise of |
| 475 | +rights granted under this License, and you may not initiate litigation |
| 476 | +(including a cross-claim or counterclaim in a lawsuit) alleging that |
| 477 | +any patent claim is infringed by making, using, selling, offering for |
| 478 | +sale, or importing the Program or any portion of it. |
| 479 | + |
| 480 | + 11. Patents. |
| 481 | + |
| 482 | + A "contributor" is a copyright holder who authorizes use under this |
| 483 | +License of the Program or a work on which the Program is based. The |
| 484 | +work thus licensed is called the contributor's "contributor version". |
| 485 | + |
| 486 | + A contributor's "essential patent claims" are all patent claims |
| 487 | +owned or controlled by the contributor, whether already acquired or |
| 488 | +hereafter acquired, that would be infringed by some manner, permitted |
| 489 | +by this License, of making, using, or selling its contributor version, |
| 490 | +but do not include claims that would be infringed only as a |
| 491 | +consequence of further modification of the contributor version. For |
| 492 | +purposes of this definition, "control" includes the right to grant |
| 493 | +patent sublicenses in a manner consistent with the requirements of |
| 494 | +this License. |
| 495 | + |
| 496 | + Each contributor grants you a non-exclusive, worldwide, royalty-free |
| 497 | +patent license under the contributor's essential patent claims, to |
| 498 | +make, use, sell, offer for sale, import and otherwise run, modify and |
| 499 | +propagate the contents of its contributor version. |
| 500 | + |
| 501 | + In the following three paragraphs, a "patent license" is any express |
| 502 | +agreement or commitment, however denominated, not to enforce a patent |
| 503 | +(such as an express permission to practice a patent or covenant not to |
| 504 | +sue for patent infringement). To "grant" such a patent license to a |
| 505 | +party means to make such an agreement or commitment not to enforce a |
| 506 | +patent against the party. |
| 507 | + |
| 508 | + If you convey a covered work, knowingly relying on a patent license, |
| 509 | +and the Corresponding Source of the work is not available for anyone |
| 510 | +to copy, free of charge and under the terms of this License, through a |
| 511 | +publicly available network server or other readily accessible means, |
| 512 | +then you must either (1) cause the Corresponding Source to be so |
| 513 | +available, or (2) arrange to deprive yourself of the benefit of the |
| 514 | +patent license for this particular work, or (3) arrange, in a manner |
| 515 | +consistent with the requirements of this License, to extend the patent |
| 516 | +license to downstream recipients. "Knowingly relying" means you have |
| 517 | +actual knowledge that, but for the patent license, your conveying the |
| 518 | +covered work in a country, or your recipient's use of the covered work |
| 519 | +in a country, would infringe one or more identifiable patents in that |
| 520 | +country that you have reason to believe are valid. |
| 521 | + |
| 522 | + If, pursuant to or in connection with a single transaction or |
| 523 | +arrangement, you convey, or propagate by procuring conveyance of, a |
| 524 | +covered work, and grant a patent license to some of the parties |
| 525 | +receiving the covered work authorizing them to use, propagate, modify |
| 526 | +or convey a specific copy of the covered work, then the patent license |
| 527 | +you grant is automatically extended to all recipients of the covered |
| 528 | +work and works based on it. |
| 529 | + |
| 530 | + A patent license is "discriminatory" if it does not include within |
| 531 | +the scope of its coverage, prohibits the exercise of, or is |
| 532 | +conditioned on the non-exercise of one or more of the rights that are |
| 533 | +specifically granted under this License. You may not convey a covered |
| 534 | +work if you are a party to an arrangement with a third party that is |
| 535 | +in the business of distributing software, under which you make payment |
| 536 | +to the third party based on the extent of your activity of conveying |
| 537 | +the work, and under which the third party grants, to any of the |
| 538 | +parties who would receive the covered work from you, a discriminatory |
| 539 | +patent license (a) in connection with copies of the covered work |
| 540 | +conveyed by you (or copies made from those copies), or (b) primarily |
| 541 | +for and in connection with specific products or compilations that |
| 542 | +contain the covered work, unless you entered into that arrangement, |
| 543 | +or that patent license was granted, prior to 28 March 2007. |
| 544 | + |
| 545 | + Nothing in this License shall be construed as excluding or limiting |
| 546 | +any implied license or other defenses to infringement that may |
| 547 | +otherwise be available to you under applicable patent law. |
| 548 | + |
| 549 | + 12. No Surrender of Others' Freedom. |
| 550 | + |
| 551 | + If conditions are imposed on you (whether by court order, agreement or |
| 552 | +otherwise) that contradict the conditions of this License, they do not |
| 553 | +excuse you from the conditions of this License. If you cannot convey a |
| 554 | +covered work so as to satisfy simultaneously your obligations under this |
| 555 | +License and any other pertinent obligations, then as a consequence you may |
| 556 | +not convey it at all. For example, if you agree to terms that obligate you |
| 557 | +to collect a royalty for further conveying from those to whom you convey |
| 558 | +the Program, the only way you could satisfy both those terms and this |
| 559 | +License would be to refrain entirely from conveying the Program. |
| 560 | + |
| 561 | + 13. Use with the GNU Affero General Public License. |
| 562 | + |
| 563 | + Notwithstanding any other provision of this License, you have |
| 564 | +permission to link or combine any covered work with a work licensed |
| 565 | +under version 3 of the GNU Affero General Public License into a single |
| 566 | +combined work, and to convey the resulting work. The terms of this |
| 567 | +License will continue to apply to the part which is the covered work, |
| 568 | +but the special requirements of the GNU Affero General Public License, |
| 569 | +section 13, concerning interaction through a network will apply to the |
| 570 | +combination as such. |
| 571 | + |
| 572 | + 14. Revised Versions of this License. |
| 573 | + |
| 574 | + The Free Software Foundation may publish revised and/or new versions of |
| 575 | +the GNU General Public License from time to time. Such new versions will |
| 576 | +be similar in spirit to the present version, but may differ in detail to |
| 577 | +address new problems or concerns. |
| 578 | + |
| 579 | + Each version is given a distinguishing version number. If the |
| 580 | +Program specifies that a certain numbered version of the GNU General |
| 581 | +Public License "or any later version" applies to it, you have the |
| 582 | +option of following the terms and conditions either of that numbered |
| 583 | +version or of any later version published by the Free Software |
| 584 | +Foundation. If the Program does not specify a version number of the |
| 585 | +GNU General Public License, you may choose any version ever published |
| 586 | +by the Free Software Foundation. |
| 587 | + |
| 588 | + If the Program specifies that a proxy can decide which future |
| 589 | +versions of the GNU General Public License can be used, that proxy's |
| 590 | +public statement of acceptance of a version permanently authorizes you |
| 591 | +to choose that version for the Program. |
| 592 | + |
| 593 | + Later license versions may give you additional or different |
| 594 | +permissions. However, no additional obligations are imposed on any |
| 595 | +author or copyright holder as a result of your choosing to follow a |
| 596 | +later version. |
| 597 | + |
| 598 | + 15. Disclaimer of Warranty. |
| 599 | + |
| 600 | + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY |
| 601 | +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT |
| 602 | +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY |
| 603 | +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, |
| 604 | +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 605 | +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM |
| 606 | +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF |
| 607 | +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. |
| 608 | + |
| 609 | + 16. Limitation of Liability. |
| 610 | + |
| 611 | + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING |
| 612 | +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS |
| 613 | +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY |
| 614 | +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE |
| 615 | +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF |
| 616 | +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD |
| 617 | +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), |
| 618 | +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF |
| 619 | +SUCH DAMAGES. |
| 620 | + |
| 621 | + 17. Interpretation of Sections 15 and 16. |
| 622 | + |
| 623 | + If the disclaimer of warranty and limitation of liability provided |
| 624 | +above cannot be given local legal effect according to their terms, |
| 625 | +reviewing courts shall apply local law that most closely approximates |
| 626 | +an absolute waiver of all civil liability in connection with the |
| 627 | +Program, unless a warranty or assumption of liability accompanies a |
| 628 | +copy of the Program in return for a fee. |
| 629 | + |
| 630 | + END OF TERMS AND CONDITIONS |
| 631 | + |
| 632 | + How to Apply These Terms to Your New Programs |
| 633 | + |
| 634 | + If you develop a new program, and you want it to be of the greatest |
| 635 | +possible use to the public, the best way to achieve this is to make it |
| 636 | +free software which everyone can redistribute and change under these terms. |
| 637 | + |
| 638 | + To do so, attach the following notices to the program. It is safest |
| 639 | +to attach them to the start of each source file to most effectively |
| 640 | +state the exclusion of warranty; and each file should have at least |
| 641 | +the "copyright" line and a pointer to where the full notice is found. |
| 642 | + |
| 643 | + <one line to give the program's name and a brief idea of what it does.> |
| 644 | + Copyright (C) <year> <name of author> |
| 645 | + |
| 646 | + This program is free software: you can redistribute it and/or modify |
| 647 | + it under the terms of the GNU General Public License as published by |
| 648 | + the Free Software Foundation, either version 3 of the License, or |
| 649 | + (at your option) any later version. |
| 650 | + |
| 651 | + This program is distributed in the hope that it will be useful, |
| 652 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 653 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 654 | + GNU General Public License for more details. |
| 655 | + |
| 656 | + You should have received a copy of the GNU General Public License |
| 657 | + along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 658 | + |
| 659 | +Also add information on how to contact you by electronic and paper mail. |
| 660 | + |
| 661 | + If the program does terminal interaction, make it output a short |
| 662 | +notice like this when it starts in an interactive mode: |
| 663 | + |
| 664 | + <program> Copyright (C) <year> <name of author> |
| 665 | + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. |
| 666 | + This is free software, and you are welcome to redistribute it |
| 667 | + under certain conditions; type `show c' for details. |
| 668 | + |
| 669 | +The hypothetical commands `show w' and `show c' should show the appropriate |
| 670 | +parts of the General Public License. Of course, your program's commands |
| 671 | +might be different; for a GUI interface, you would use an "about box". |
| 672 | + |
| 673 | + You should also get your employer (if you work as a programmer) or school, |
| 674 | +if any, to sign a "copyright disclaimer" for the program, if necessary. |
| 675 | +For more information on this, and how to apply and follow the GNU GPL, see |
| 676 | +<http://www.gnu.org/licenses/>. |
| 677 | + |
| 678 | + The GNU General Public License does not permit incorporating your program |
| 679 | +into proprietary programs. If your program is a subroutine library, you |
| 680 | +may consider it more useful to permit linking proprietary applications with |
| 681 | +the library. If this is what you want to do, use the GNU Lesser General |
| 682 | +Public License instead of this License. But first, please read |
| 683 | +<http://www.gnu.org/philosophy/why-not-lgpl.html>. |
\ No newline at end of file |
Index: tags/extensions/Validator/REL_0_4_2/Validator.i18n.php |
— | — | @@ -0,0 +1,1541 @@ |
| 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 for other extensions', |
| 20 | + |
| 21 | + // General |
| 22 | + 'validator-warning' => 'Warning: $1', |
| 23 | + 'validator-error' => 'Error: $1', |
| 24 | + 'validator-fatal-error' => 'Fatal error: $1', |
| 25 | + 'validator_error_parameters' => 'The following {{PLURAL:$1|error has|errors have}} been detected in your syntax:', |
| 26 | + 'validator_warning_parameters' => 'There {{PLURAL:$1|is an error|are errors}} in your syntax.', |
| 27 | + 'validator-warning-adittional-errors' => '... and {{PLURAL:$1|one more issue|multiple more issues}}.', |
| 28 | + 'validator-error-omitted' => 'The {{PLURAL:$2|value "$1" has|values "$1" have}} been omitted.', |
| 29 | + 'validator-error-problem' => 'There was a problem with parameter $1.', |
| 30 | + |
| 31 | + // General errors |
| 32 | + 'validator_error_unknown_argument' => '$1 is not a valid parameter.', |
| 33 | + 'validator_error_required_missing' => 'The required parameter "$1" is not provided.', |
| 34 | + 'validator-error-override-argument' => 'Tried to override parameter $1 (value: $2) with value "$3"', |
| 35 | + |
| 36 | + // Listerrors |
| 37 | + 'validator-listerrors-errors' => 'Errors', |
| 38 | + 'validator-listerrors-severity-message' => '($1) $2', // $1 = severity; $2 = message |
| 39 | + 'validator-listerrors-minor' => 'Minor', |
| 40 | + 'validator-listerrors-low' => 'Low', |
| 41 | + 'validator-listerrors-normal' => 'Normal', |
| 42 | + 'validator-listerrors-high' => 'High', |
| 43 | + 'validator-listerrors-fatal' => 'Fatal', |
| 44 | + |
| 45 | + // Criteria errors for single values |
| 46 | + 'validator_error_empty_argument' => 'Parameter $1 can not have an empty value.', |
| 47 | + 'validator_error_must_be_number' => 'Parameter $1 can only be a number.', |
| 48 | + 'validator_error_must_be_integer' => 'Parameter $1 can only be an integer.', |
| 49 | + 'validator-error-must-be-float' => 'Parameter $1 can only be a floating point number.', |
| 50 | + 'validator_error_invalid_range' => 'Parameter $1 must be between $2 and $3.', |
| 51 | + 'validator-error-invalid-regex' => 'Parameter $1 must match this regular expression: $2.', |
| 52 | + 'validator-error-invalid-length' => 'Parameter $1 must have a length of $2.', |
| 53 | + 'validator-error-invalid-length-range' => 'Parameter $1 must have a length between $2 and $3.', |
| 54 | + 'validator_error_invalid_argument' => 'The value $1 is not valid for parameter $2.', |
| 55 | + |
| 56 | + // Criteria errors for lists |
| 57 | + 'validator_list_error_empty_argument' => 'Parameter $1 does not accept empty values.', |
| 58 | + 'validator_list_error_must_be_number' => 'Parameter $1 can only contain numbers.', |
| 59 | + 'validator_list_error_must_be_integer' => 'Parameter $1 can only contain integers.', |
| 60 | + 'validator-list-error-must-be-float' => 'Parameter $1 can only contain floats.', |
| 61 | + 'validator_list_error_invalid_range' => 'All values of parameter $1 must be between $2 and $3.', |
| 62 | + 'validator-list-error-invalid-regex' => 'All values of parameter $1 must match this regular expression: $2.', |
| 63 | + 'validator_list_error_invalid_argument' => 'One or more values for parameter $1 are invalid.', |
| 64 | + 'validator-list-error-accepts-only' => 'One or more values for parameter $1 are invalid. |
| 65 | +It only accepts {{PLURAL:$3|this value|these values}}: $2.', |
| 66 | + 'validator-list-error-accepts-only-omitted' => 'One or more values for parameter $1 are invalid. |
| 67 | +It only accepts {{PLURAL:$3|this value|these values}}: $2 (and $4 omitted {{PLURAL:$4|value|values}}).', |
| 68 | + |
| 69 | + // Criteria errors for single values & lists |
| 70 | + 'validator_error_accepts_only' => 'The value "$4" is not valid for parameter $1. |
| 71 | +It only accepts {{PLURAL:$3|this value|these values}}: $2.', |
| 72 | + 'validator-error-accepts-only-omitted' => 'The value "$2" is not valid for parameter $1. |
| 73 | +It only accepts {{PLURAL:$5|this value|these values}}: $3 (and $4 omitted {{PLURAL:$4|value|values}}).', |
| 74 | + |
| 75 | + 'validator_list_omitted' => 'The {{PLURAL:$2|value|values}} $1 {{PLURAL:$2|has|have}} been omitted.', |
| 76 | +); |
| 77 | + |
| 78 | +/** Message documentation (Message documentation) |
| 79 | + * @author EugeneZelenko |
| 80 | + * @author Fryed-peach |
| 81 | + * @author Purodha |
| 82 | + * @author Raymond |
| 83 | + */ |
| 84 | +$messages['qqq'] = array( |
| 85 | + 'validator-desc' => '{{desc}}', |
| 86 | + 'validator-warning' => '{{Identical|Warning}}', |
| 87 | + 'validator-error' => '{{Identical|Error}}', |
| 88 | + 'validator_error_parameters' => 'Parameters: |
| 89 | +* $1 is the number of syntax errors, for PLURAL support (optional)', |
| 90 | + 'validator-listerrors-errors' => '{{Identical|Error}}', |
| 91 | + 'validator-listerrors-severity-message' => '{{Optional}} |
| 92 | +* $1 = severit |
| 93 | +* $2 = message', |
| 94 | + 'validator-listerrors-normal' => '{{Identical|Normal}}', |
| 95 | +); |
| 96 | + |
| 97 | +/** Afrikaans (Afrikaans) |
| 98 | + * @author Naudefj |
| 99 | + */ |
| 100 | +$messages['af'] = array( |
| 101 | + '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', |
| 102 | + 'validator-warning' => 'Waarskuwing: $ 1', |
| 103 | + 'validator-error' => 'Fout: $1', |
| 104 | + 'validator-fatal-error' => 'Onherstelbare fout: $1', |
| 105 | + 'validator_error_parameters' => 'Die volgende {{PLURAL:$1|fout|foute}} is in u sintaks waargeneem:', |
| 106 | + 'validator_error_unknown_argument' => "$1 is nie 'n geldige parameter nie.", |
| 107 | + 'validator_error_required_missing' => 'Die verpligte parameter $1 is nie verskaf nie.', |
| 108 | + 'validator-listerrors-errors' => 'Foute', |
| 109 | + 'validator-listerrors-minor' => 'Oorkomelik', |
| 110 | + 'validator-listerrors-low' => 'Laag', |
| 111 | + 'validator-listerrors-normal' => 'Gemiddeld', |
| 112 | + 'validator-listerrors-high' => 'Groot', |
| 113 | + 'validator-listerrors-fatal' => 'Fataal', |
| 114 | + 'validator_error_empty_argument' => 'Die parameter $1 mag nie leeg wees nie.', |
| 115 | + 'validator_error_must_be_number' => "Die parameter $1 mag net 'n getal wees.", |
| 116 | + 'validator_error_must_be_integer' => "Die parameter $1 kan slegs 'n heelgetal wees.", |
| 117 | + 'validator_error_invalid_range' => 'Die parameter $1 moet tussen $2 en $3 lê.', |
| 118 | + 'validator_error_invalid_argument' => 'Die waarde $1 is nie geldig vir parameter $2 nie.', |
| 119 | + 'validator_error_accepts_only' => 'Die parameter $1 kan slegs die volgende {{PLURAL:$3|waarde|waardes}} hê: $2.', |
| 120 | +); |
| 121 | + |
| 122 | +/** Gheg Albanian (Gegë) |
| 123 | + * @author Mdupont |
| 124 | + */ |
| 125 | +$messages['aln'] = array( |
| 126 | + 'validator-desc' => 'Validator është një zgjerim MediaWiki që ofron parametër përgjithshme trajtimin mbështetje të shtesave të tjera', |
| 127 | + 'validator_error_parameters' => 'Më poshtë {{PLURAL:$1|gabim ka gabime|kanë}} është zbuluar në sintaksën e juaj:', |
| 128 | + 'validator_warning_parameters' => 'Ka {{PLURAL:$1|është|janë gabime gabim}} në sintaksë tuaj.', |
| 129 | + 'validator_error_unknown_argument' => '$1 nuk është një parametër i vlefshëm.', |
| 130 | + 'validator_error_required_missing' => 'Parametrat e nevojshëm $1 nuk jepet.', |
| 131 | + 'validator_error_empty_argument' => 'Parametër $1 nuk mund të ketë një vlerë bosh.', |
| 132 | + 'validator_error_must_be_number' => 'Parametër $1 mund të jetë vetëm një numër.', |
| 133 | + 'validator_error_must_be_integer' => 'Parametër $1 mund të jetë vetëm një numër i plotë.', |
| 134 | + 'validator_error_invalid_range' => 'Parametër $1 duhet të jetë në mes të $2 dhe $3.', |
| 135 | + 'validator_error_invalid_argument' => 'Vlera $1 nuk është i vlefshëm për parametër $2.', |
| 136 | + 'validator_list_error_empty_argument' => 'Parametër $1 nuk e pranon vlerat bosh.', |
| 137 | + 'validator_list_error_must_be_number' => 'Parametër $1 mund të përmbajë vetëm numrat.', |
| 138 | + 'validator_list_error_must_be_integer' => 'Parametër $1 mund të përmbajë vetëm numra të plotë.', |
| 139 | + 'validator_list_error_invalid_range' => 'Të gjitha vlerat e parametrit $1 duhet të jetë në mes të $2 dhe $3.', |
| 140 | + 'validator_list_error_invalid_argument' => 'Një ose më shumë vlera për parametër $1 janë të pavlefshme.', |
| 141 | + 'validator_list_omitted' => '{{PLURAL:$2 |vlerë|vlerat}} $1 {{PLURAL:$2|ka|kanë}} janë lënë jashtë.', |
| 142 | + 'validator_error_accepts_only' => 'Parametër $1 vetëm pranon {{PLURAL:$3|kjo vlerë|këtyre vlerave}}: $2.', |
| 143 | +); |
| 144 | + |
| 145 | +/** Arabic (العربية) |
| 146 | + * @author Meno25 |
| 147 | + */ |
| 148 | +$messages['ar'] = array( |
| 149 | + 'validator-desc' => 'المحقق يوفر طريقة سهلة للامتدادات الأخرى للتحقق من محددات دوال المحلل وامتدادات الوسوم، وضبط القيم الافتراضية وتوليد رسائل الخطأ', |
| 150 | + 'validator_error_parameters' => '{{PLURAL:$1|الخطأ التالي|الاخطاء التالية}} تم كشفها في صياغتك:', |
| 151 | + 'validator_warning_parameters' => 'هناك {{PLURAL:$1|خطأ|أخطاء}} في صياغتك.', |
| 152 | + 'validator_error_unknown_argument' => '$1 ليس محددا صحيحا.', |
| 153 | + 'validator_error_required_missing' => 'المحدد المطلوب $1 ليس متوفرا.', |
| 154 | + 'validator_error_empty_argument' => 'المحدد $1 لا يمكن أن تكون قيمته فارغة.', |
| 155 | + 'validator_error_must_be_number' => 'المحدد $1 يمكن أن يكون فقط عددا.', |
| 156 | + 'validator_error_must_be_integer' => 'المحدد $1 يمكن أن يكون عددا صحيحا فقط.', |
| 157 | + 'validator_error_invalid_range' => 'المحدد $1 يجب أن يكون بين $2 و $3.', |
| 158 | + 'validator_error_invalid_argument' => 'القيمة $1 ليست صحيحة للمحدد $2.', |
| 159 | + 'validator_list_error_empty_argument' => 'المحدد $1 لا يقبل القيم الفارغة.', |
| 160 | + 'validator_list_error_must_be_number' => 'المحدد $1 يمكن أن يحتوي فقط على أرقام.', |
| 161 | + 'validator_list_error_must_be_integer' => 'المحدد $1 يمكن أن يحتوي فقط على أرقام صحيحة.', |
| 162 | + 'validator_list_error_invalid_range' => 'كل قيم المحدد $1 يجب أن تكون بين $2 و$3.', |
| 163 | + 'validator_list_error_invalid_argument' => 'قيمة واحدة أو أكثر للمحدد $1 غير صحيحة.', |
| 164 | + 'validator_list_omitted' => '{{PLURAL:$2|القيمة|القيم}} $1 {{PLURAL:$2|تم|تم}} مسحها.', |
| 165 | + 'validator_error_accepts_only' => 'المحدد $1 يقبل فقط {{PLURAL:$3|هذه القيمة|هذه القيم}}: $2.', |
| 166 | +); |
| 167 | + |
| 168 | +/** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) |
| 169 | + * @author EugeneZelenko |
| 170 | + * @author Jim-by |
| 171 | + */ |
| 172 | +$messages['be-tarask'] = array( |
| 173 | + 'validator-desc' => 'Правяраючы палягчае іншым пашырэньням працу па праверцы парамэтраў функцыяў парсэру і тэгаў пашырэньняў, устанаўлівае значэньні па змоўчваньні і стварае паведамленьні пра памылкі', |
| 174 | + 'validator-warning' => 'Папярэджаньне: $1', |
| 175 | + 'validator-error' => 'Памылка: $1', |
| 176 | + 'validator-fatal-error' => 'Крытычная памылка: $1', |
| 177 | + 'validator_error_parameters' => 'У сынтаксісе {{PLURAL:$1|выяўленая наступная памылка|выяўленыя наступныя памылкі}}:', |
| 178 | + 'validator_warning_parameters' => 'У Вашы сынтаксісе {{PLURAL:$1|маецца памылка|маюцца памылкі}}.', |
| 179 | + 'validator-warning-adittional-errors' => '... і {{PLURAL:$1|яшчэ адна праблема|яшчэ некалькі праблемаў}}.', |
| 180 | + 'validator-error-omitted' => '{{PLURAL:$2|Значэньне «$1» было прапушчанае|Значэньні «$1» былі прапушчаныя}}.', |
| 181 | + 'validator-error-problem' => 'Узьнікла праблема з парамэтрам $1.', |
| 182 | + 'validator_error_unknown_argument' => 'Няслушны парамэтар $1.', |
| 183 | + 'validator_error_required_missing' => 'Не пададзены абавязковы парамэтар $1.', |
| 184 | + 'validator-error-override-argument' => 'Спрабаваў памяняць значэньне парамэтру $1 з «$2» на «$3»', |
| 185 | + 'validator-listerrors-errors' => 'Памылкі', |
| 186 | + 'validator-listerrors-minor' => 'Дробная', |
| 187 | + 'validator-listerrors-low' => 'Малая', |
| 188 | + 'validator-listerrors-normal' => 'Звычайная', |
| 189 | + 'validator-listerrors-high' => 'Значная', |
| 190 | + 'validator-listerrors-fatal' => 'Фатальная', |
| 191 | + 'validator_error_empty_argument' => 'Парамэтар $1 ня можа мець пустое значэньне.', |
| 192 | + 'validator_error_must_be_number' => 'Парамэтар $1 можа быць толькі лікам.', |
| 193 | + 'validator_error_must_be_integer' => 'Парамэтар $1 можа быць толькі цэлым лікам.', |
| 194 | + 'validator-error-must-be-float' => 'Парамэтар $1 можа быць толькі лікам з плаваючай коскай.', |
| 195 | + 'validator_error_invalid_range' => 'Парамэтар $1 павінен быць паміж $2 і $3.', |
| 196 | + 'validator-error-invalid-regex' => 'парамэтар $1 мусіць адпавядаць гэтаму рэгулярнаму выразу: $2.', |
| 197 | + 'validator-error-invalid-length' => 'Парамэтар $1 павінен мець даўжыню $2.', |
| 198 | + 'validator-error-invalid-length-range' => 'Парамэтар $1 павінен мець даўжыню паміж $2 і $3.', |
| 199 | + 'validator_error_invalid_argument' => 'Значэньне $1 не зьяўляецца слушным для парамэтру $2.', |
| 200 | + 'validator_list_error_empty_argument' => 'Парамэтар $1 ня можа прымаць пустыя значэньні.', |
| 201 | + 'validator_list_error_must_be_number' => 'Парамэтар $1 можа ўтрымліваць толькі лікі.', |
| 202 | + 'validator_list_error_must_be_integer' => 'Парамэтар $1 можа ўтрымліваць толькі цэлыя лікі.', |
| 203 | + 'validator-list-error-must-be-float' => 'Парамэтар $1 можа ўтрымліваць толькі лікі з плаваючай кропкай.', |
| 204 | + 'validator_list_error_invalid_range' => 'Усе значэньні парамэтру $1 павінны знаходзіцца паміж $2 і $3.', |
| 205 | + 'validator-list-error-invalid-regex' => 'Усе значэньні парамэтру $1 мусяць адпавядаць гэтаму рэгулярнаму выразу: $2.', |
| 206 | + 'validator_list_error_invalid_argument' => 'Адно ці болей значэньняў парамэтру $1 зьяўляюцца няслушнымі.', |
| 207 | + 'validator-list-error-accepts-only' => 'Адзін ці некалькі значэньняў парамэтру $1 зьяўляюцца няслушнымі. |
| 208 | +{{PLURAL:$3|Ён мусіць мець наступнае значэньне|Яны мусяць мець наступныя значэньні}}: $2.', |
| 209 | + 'validator-list-error-accepts-only-omitted' => 'Адзін ці некалькі значэньняў парамэтру $1 зьяўляюцца няслушнымі. |
| 210 | +{{PLURAL:$3|Ён мусіць мець наступнае значэньне|Яны мусяць мець наступныя значэньні}}: $2. (і $4 {{PLURAL:$4|прапушчанае значэньне|прапушчаныя значэньні|прапушчаных значэньняў}}).', |
| 211 | + 'validator_error_accepts_only' => 'Значэньне «$4» зьяўляецца няслушным для парамэтру $1. Ён можа прымаць толькі {{PLURAL:$3|гэтае значэньне|гэтыя значэньні}}: $2.', |
| 212 | + 'validator-error-accepts-only-omitted' => 'Значэньне «$2» зьяўляецца няслушным для парамэтру $1. |
| 213 | +{{PLURAL:$5|Ён мусіць мець наступнае значэньне|Яны мусяць мець наступныя значэньні}}: $3. (і $4 {{PLURAL:$4|прапушчанае значэньне|прапушчаныя значэньні|прапушчаных значэньняў}}).', |
| 214 | + 'validator_list_omitted' => '{{PLURAL:$2|Значэньне|Значэньні}} $1 {{PLURAL:$2|было прапушчанае|былі прапушчаныя}}.', |
| 215 | +); |
| 216 | + |
| 217 | +/** Bulgarian (Български) |
| 218 | + * @author DCLXVI |
| 219 | + * @author Reedy |
| 220 | + */ |
| 221 | +$messages['bg'] = array( |
| 222 | + 'validator_error_empty_argument' => 'Параметърът $1 не може да има празна стойност.', |
| 223 | +); |
| 224 | + |
| 225 | +/** Breton (Brezhoneg) |
| 226 | + * @author Fohanno |
| 227 | + * @author Fulup |
| 228 | + * @author Gwendal |
| 229 | + * @author Y-M D |
| 230 | + */ |
| 231 | +$messages['br'] = array( |
| 232 | + '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ù', |
| 233 | + 'validator-warning' => 'Diwallit : $1', |
| 234 | + 'validator-error' => 'Fazi : $1', |
| 235 | + 'validator-fatal-error' => 'Fazi diremed: $1', |
| 236 | + 'validator_error_parameters' => "Kavet eo bet ar {{PLURAL:$1|fazi|fazioù}} da-heul en hoc'h ereadur :", |
| 237 | + 'validator_warning_parameters' => "{{PLURAL:$1|Ur fazi|Fazioù}} zo en hoc'h ereadur.", |
| 238 | + 'validator-warning-adittional-errors' => '... {{PLURAL:$1|hag ur gudenn bennak all|ha meur a gudenn all}}.', |
| 239 | + 'validator-error-omitted' => 'N\'eo ket bet merket ar {{PLURAL:$2|roadenn "$1"|roadennoù "$1"}}.', |
| 240 | + 'validator-error-problem' => 'Ur gudenn zo bet gant an arventenn $1.', |
| 241 | + 'validator_error_unknown_argument' => "$1 n'eo ket un arventenn reizh.", |
| 242 | + 'validator_error_required_missing' => "N'eo ket bet pourchaset an arventenn rekis $1", |
| 243 | + 'validator-error-override-argument' => 'Klasket en deus ar meziant erlec\'hiañ an arventenn $1 (talvoud : $2) gant an talvoud "$3"', |
| 244 | + 'validator-listerrors-errors' => 'Fazioù', |
| 245 | + 'validator-listerrors-minor' => 'Minor', |
| 246 | + 'validator-listerrors-low' => 'Gwan', |
| 247 | + 'validator-listerrors-normal' => 'Reizh', |
| 248 | + 'validator-listerrors-high' => 'Uhel', |
| 249 | + 'validator-listerrors-fatal' => 'Diremed', |
| 250 | + 'validator_error_empty_argument' => "N'hall ket an arventenn $1 bezañ goullo he zalvoudenn", |
| 251 | + 'validator_error_must_be_number' => 'Un niver e rank an arventenn $1 bezañ hepken.', |
| 252 | + 'validator_error_must_be_integer' => 'Rankout a ra an arventenn $1 bezañ un niver anterin.', |
| 253 | + 'validator_error_invalid_range' => 'Rankout a ra an arventenn $1 bezañ etre $2 hag $3.', |
| 254 | + 'validator-error-invalid-length' => "Ret eo d'an arventenn $1 bezañ par he hed da $2.", |
| 255 | + 'validator-error-invalid-length-range' => 'Rankout a ra an arventenn $1 bezañ he hed etre $2 hag $3.', |
| 256 | + 'validator_error_invalid_argument' => "N'eo ket reizh an dalvoudenn $1 evit an arventenn $2.", |
| 257 | + 'validator_list_error_empty_argument' => 'Ne zegemer ket an arventenn $1 an talvoudennoù goullo.', |
| 258 | + 'validator_list_error_must_be_number' => "N'hall bezañ nemet niveroù en arventenn $1.", |
| 259 | + 'validator_list_error_must_be_integer' => "N'hall bezañ nemet niveroù anterin en arventenn $1.", |
| 260 | + 'validator-list-error-must-be-float' => "N'hall bezañ nemet niveroù gant skej en arventenn $1.", |
| 261 | + 'validator_list_error_invalid_range' => 'An holl talvoudennoù eus an arventenn $1 a rank bezañ etre $2 ha $3.', |
| 262 | + 'validator_list_error_invalid_argument' => 'Faziek eo unan pe meur a dalvoudenn eus an arventenn $1.', |
| 263 | + 'validator-list-error-accepts-only' => 'Direizh eo unan pe meur a hini eus an talvoudoù evit an arventenn $1. |
| 264 | +Ne zegemer nemet an {{PLURAL:$3|talvoud|talvoudoù}}-mañ : $2.', |
| 265 | + 'validator-list-error-accepts-only-omitted' => 'Direizh eo unan pe meur a hini eus an talvoudoù evit an arventenn $1. |
| 266 | +Ne zegemer nemet an {{PLURAL:$3|talvoud|talvoudoù}}-mañ : $2 (ha $4 {{PLURAL:$4|talvoud anroet|talvoud anroet}}).', |
| 267 | + 'validator_error_accepts_only' => 'Ne zegemer ket an arventenn $1 an talvoud "$4". Ne zegemer nemet {{PLURAL:$3|an talvoud|an talvoudoù}}-mañ : $2.', |
| 268 | + 'validator-error-accepts-only-omitted' => 'Direizh eo an talvoud "$2" evit an arventenn $1. |
| 269 | +Ne zegemer nemet an {{PLURAL:$5|talvoud|talvoudoù}}-mañ : $3 (ha $4 {{PLURAL:$4|talvoud anroet|talvoud anroet}}).', |
| 270 | + 'validator_list_omitted' => 'Disoñjet eo bet an {{PLURAL:$2|talvoudenn|talvoudennoù}} $1.', |
| 271 | +); |
| 272 | + |
| 273 | +/** Bosnian (Bosanski) |
| 274 | + * @author CERminator |
| 275 | + */ |
| 276 | +$messages['bs'] = array( |
| 277 | + '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.', |
| 278 | + 'validator-warning' => 'Upozorenje: $1', |
| 279 | + 'validator-error' => 'Greška: $1', |
| 280 | + 'validator-fatal-error' => 'Fatalna greška: $1', |
| 281 | + 'validator_error_parameters' => 'U Vašoj sintaksi {{PLURAL:$1|je|su}} {{PLURAL:$1|otkivena slijedeća greška|otkrivene slijedeće greške}}:', |
| 282 | + 'validator_warning_parameters' => '{{PLURAL:$1|Postoji greška|Postoje greške}} u Vašoj sintaksi.', |
| 283 | + 'validator-warning-adittional-errors' => '... i {{PLURAL:$1|još jedan problem|još nekoliko problema}}.', |
| 284 | + 'validator_error_unknown_argument' => '$1 nije valjan parametar.', |
| 285 | + 'validator_error_required_missing' => 'Obavezni parametar $1 nije naveden.', |
| 286 | + 'validator-error-override-argument' => 'Pokušano da se preskoči parametar $1 (vrijednost: $2) vrijednošću "$3"', |
| 287 | + 'validator-listerrors-normal' => 'Normalno', |
| 288 | + 'validator_error_empty_argument' => 'Parametar $1 ne može imati praznu vrijednost.', |
| 289 | + 'validator_error_must_be_number' => 'Parametar $1 može biti samo broj.', |
| 290 | + 'validator_error_must_be_integer' => 'Parametar $1 može biti samo cijeli broj.', |
| 291 | + 'validator-error-must-be-float' => 'Parametar $1 može biti samo broj sa plutajućim zarezom.', |
| 292 | + 'validator_error_invalid_range' => 'Parametar $1 mora biti između $2 i $3.', |
| 293 | + 'validator-error-invalid-length' => 'Parametar $1 mora imati dužinu $2.', |
| 294 | + 'validator-error-invalid-length-range' => 'Parametar $1 mora imati dužinu između $2 i $3.', |
| 295 | + 'validator_error_invalid_argument' => 'Vrijednost $1 nije valjana za parametar $2.', |
| 296 | + 'validator_list_error_empty_argument' => 'Parametar $1 ne prima prazne vrijednosti.', |
| 297 | + 'validator_list_error_must_be_number' => 'Parametar $1 može sadržavati samo brojeve.', |
| 298 | + 'validator_list_error_must_be_integer' => 'Parametar $1 može sadržavati samo cijele brojeve.', |
| 299 | + 'validator_list_error_invalid_range' => 'Sve vrijednosti parametra $1 moraju biti između $2 i $3.', |
| 300 | + 'validator_list_error_invalid_argument' => 'Jedna ili više vrijednosti za parametar $1 nisu valjane.', |
| 301 | + 'validator_error_accepts_only' => 'Vrijednost "$4" nije valjana za parametar $1. On prihvata samo {{PLURAL:$3|ovu vrijednost|ove vrijednosti}}: $2.', |
| 302 | + 'validator_list_omitted' => '{{PLURAL:$2|Vrijednost|Vrijednosti}} $1 {{PLURAL:$2|je ispuštena|su ispuštene}}.', |
| 303 | +); |
| 304 | + |
| 305 | +/** Czech (Česky) |
| 306 | + * @author Matěj Grabovský |
| 307 | + * @author Mormegil |
| 308 | + * @author Reaperman |
| 309 | + */ |
| 310 | +$messages['cs'] = array( |
| 311 | + '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.', |
| 312 | + 'validator_error_parameters' => 'Ve vaší syntaxi {{PLURAL:$1|byla nalezena následující chyba|byly nalezeny následující chyby}}:', |
| 313 | + 'validator_warning_parameters' => 'Ve vaší syntaxi {{PLURAL:$1|je chyba|jsou chyby}}.', |
| 314 | + 'validator_error_unknown_argument' => '$1 není platný parametr.', |
| 315 | + 'validator_error_required_missing' => 'Povinný parameter $1 nebyl specifikován.', |
| 316 | + 'validator_error_empty_argument' => 'Parametr $1 nemůže být prázdný.', |
| 317 | + 'validator_error_must_be_number' => 'Parametr $1 může být pouze číslo.', |
| 318 | + 'validator_error_must_be_integer' => 'Parametr $1 může být pouze celé číslo.', |
| 319 | + 'validator_error_invalid_range' => 'Parametr $1 musí být v rozmezí $2 až $3.', |
| 320 | + 'validator_error_invalid_argument' => '$1 není platná hodnota pro parametr $2.', |
| 321 | + 'validator_list_error_empty_argument' => 'Parametr $1 npeřijímá prázdné hoodnoty.', |
| 322 | + 'validator_list_error_must_be_number' => 'Parametr $1 může obsahovat pouze čísla.', |
| 323 | + 'validator_list_error_must_be_integer' => 'Paramter $1 může obsahovat pouze celá čísla.', |
| 324 | + 'validator_list_error_invalid_range' => 'Všechny hodnoty parametru $1 musí být v rozmezí $2 až $3.', |
| 325 | + 'validator_list_error_invalid_argument' => 'Jedna nebo více hodnot parametru $1 jsou neplatné.', |
| 326 | + 'validator_list_omitted' => '{{PLURAL:$2|Hodnota $1 byla vynechána|Hodnoty $1 byly vynechány}}.', |
| 327 | + 'validator_error_accepts_only' => 'Parametr $1 nemůže mít hodnotu „$4“; přijímá pouze {{PLURAL:$3|tuto hodnotu|tyto hodnoty}}: $2.', |
| 328 | +); |
| 329 | + |
| 330 | +/** German (Deutsch) |
| 331 | + * @author DaSch |
| 332 | + * @author Imre |
| 333 | + * @author Kghbln |
| 334 | + * @author LWChris |
| 335 | + */ |
| 336 | +$messages['de'] = array( |
| 337 | + 'validator-desc' => 'Ermöglicht es anderen Softwareerweiterungen Parameter verarbeiten zu können', |
| 338 | + 'validator-warning' => 'Warnung: $1', |
| 339 | + 'validator-error' => 'Fehler: $1', |
| 340 | + 'validator-fatal-error' => "'''Schwerwiegender Fehler:''' $1", |
| 341 | + 'validator_error_parameters' => '{{PLURAL:$1|Der folgende Fehler wurde|Die folgenden Fehler wurden}} in der Syntax gefunden:', |
| 342 | + 'validator_warning_parameters' => '{{PLURAL:$1|Es ist ein Fehler|Es sind Fehler}} in der Syntax.', |
| 343 | + 'validator-warning-adittional-errors' => '… und {{PLURAL:$1|ein weiteres Problem|weitere Probleme}}.', |
| 344 | + 'validator-error-omitted' => '{{PLURAL:$2|Der Wert|Die Werte}} „$1“ {{PLURAL:$2|wurde|wurden}} ausgelassen.', |
| 345 | + 'validator-error-problem' => 'Es gab ein Problem mit Parameter $1.', |
| 346 | + 'validator_error_unknown_argument' => '$1 ist kein gültiger Parameter.', |
| 347 | + 'validator_error_required_missing' => 'Der notwendige Parameter $1 wurde nicht angegeben.', |
| 348 | + 'validator-error-override-argument' => 'Es wurde versucht Parameter $1 ($2) mit dem Wert „$3“ zu überschreiben.', |
| 349 | + 'validator-listerrors-errors' => 'Fehler', |
| 350 | + 'validator-listerrors-minor' => 'Marginal', |
| 351 | + 'validator-listerrors-low' => 'Klein', |
| 352 | + 'validator-listerrors-normal' => 'Normal', |
| 353 | + 'validator-listerrors-high' => 'Groß', |
| 354 | + 'validator-listerrors-fatal' => 'Schwerwiegend', |
| 355 | + 'validator_error_empty_argument' => 'Parameter $1 kann keinen leeren Wert haben.', |
| 356 | + 'validator_error_must_be_number' => 'Parameter $1 kann nur eine Nummer sein.', |
| 357 | + 'validator_error_must_be_integer' => 'Parameter $1 kann nur eine ganze Zahl sein.', |
| 358 | + 'validator-error-must-be-float' => 'Parameter $1 kann nur eine Gleitkommazahl sein.', |
| 359 | + 'validator_error_invalid_range' => 'Parameter $1 muss zwischen $2 und $3 liegen.', |
| 360 | + 'validator-error-invalid-regex' => 'Parameter $1 muss diesem regulären Ausdruck entsprechen: $2.', |
| 361 | + 'validator-error-invalid-length' => 'Parameter $1 muss eine Länge von $2 haben.', |
| 362 | + 'validator-error-invalid-length-range' => 'Parameter $1 muss eine Länge zwischen $2 und $3 haben.', |
| 363 | + 'validator_error_invalid_argument' => 'Der Wert „$1“ ist nicht gültig für Parameter $2.', |
| 364 | + 'validator_list_error_empty_argument' => 'Parameter $1 akzeptiert keine leeren Werte.', |
| 365 | + 'validator_list_error_must_be_number' => 'Parameter $1 kann nur Ziffern enthalten.', |
| 366 | + 'validator_list_error_must_be_integer' => 'Parameter $1 kann nur ganze Zahlen enthalten.', |
| 367 | + 'validator-list-error-must-be-float' => 'Parameter $1 kann nur Gleitkommazahlen enthalten.', |
| 368 | + 'validator_list_error_invalid_range' => 'Alle Werte des Parameters $1 müssen zwischen „$2“ und „$3“ liegen.', |
| 369 | + 'validator-list-error-invalid-regex' => 'Alle Werte des Parameters $1 müssen diesem regulären Ausdruck entsprechen: $2.', |
| 370 | + 'validator_list_error_invalid_argument' => 'Einer oder mehrere Werte für Parameter $1 sind ungültig.', |
| 371 | + 'validator-list-error-accepts-only' => 'Einer oder mehrere Werte für Parameter $1 sind ungültig. |
| 372 | +Nur {{PLURAL:$3|der folgende Wert wird|die folgenden Werte werden}} akzeptiert: $2.', |
| 373 | + 'validator-list-error-accepts-only-omitted' => 'Einer oder mehrere Werte für Parameter $1 sind ungültig. |
| 374 | +Nur {{PLURAL:$3|der folgende Wert wird|die folgenden Werte werden}} akzeptiert: $2 (sowie $4 ausgelassene {{PLURAL:$4|Wert|Werte}}).', |
| 375 | + 'validator_error_accepts_only' => 'Der Wert „$4“ ist nicht gültig für Parameter $1. |
| 376 | +Nur {{PLURAL:$3|der folgende Wert wird|die folgenden Werte werden}} akzeptiert: $2.', |
| 377 | + 'validator-error-accepts-only-omitted' => 'Der Wert „$2“ ist nicht gültig für Parameter $1. |
| 378 | +Nur {{PLURAL:$5|der folgende Wert wird|die folgenden Werte werden}} akzeptiert: $3 (sowie $4 ausgelassene {{PLURAL:$4|Wert|Werte}}).', |
| 379 | + 'validator_list_omitted' => '{{PLURAL:$2|Der Wert|Die Werte}} $1 {{PLURAL:$2|wurde|wurden}} ausgelassen.', |
| 380 | +); |
| 381 | + |
| 382 | +/** Lower Sorbian (Dolnoserbski) |
| 383 | + * @author Michawiki |
| 384 | + */ |
| 385 | +$messages['dsb'] = array( |
| 386 | + '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', |
| 387 | + '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:', |
| 388 | + 'validator_warning_parameters' => '{{PLURAL:$1|Jo zmólka|Stej zmólce|Su zmólki|Su zmólki}} w twójej syntaksy.', |
| 389 | + 'validator_error_unknown_argument' => '$1 njejo płaśiwy parameter.', |
| 390 | + 'validator_error_required_missing' => 'Trěbny parameter $1 njejo pódany.', |
| 391 | + 'validator_error_empty_argument' => 'Parameter $1 njamóžo proznu gódnotu měś.', |
| 392 | + 'validator_error_must_be_number' => 'Parameter $1 móžo jano licba byś.', |
| 393 | + 'validator_error_must_be_integer' => 'Parameter $1 móžo jano ceła licba byś.', |
| 394 | + 'validator_error_invalid_range' => 'Parameter $1 musy mjazy $2 a $3 byś.', |
| 395 | + 'validator_error_invalid_argument' => 'Gódnota $1 njejo płaśiwa za parameter $2.', |
| 396 | + 'validator_list_error_empty_argument' => 'Parameter $1 njeakceptěrujo prozne gódnoty.', |
| 397 | + 'validator_list_error_must_be_number' => 'Parameter $1 móžo jano licby wopśimjeś.', |
| 398 | + 'validator_list_error_must_be_integer' => 'Parameter $1 móžo jano cełe licby wopśimjeś.', |
| 399 | + 'validator_list_error_invalid_range' => 'Wšykne gódnoty parametra $1 muse mjazy $2 a $3 byś.', |
| 400 | + 'validator_list_error_invalid_argument' => 'Jadna gódnota abo wěcej gódnotow za parameter $1 su njepłaśiwe.', |
| 401 | + '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}}.', |
| 402 | + '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.', |
| 403 | +); |
| 404 | + |
| 405 | +/** Greek (Ελληνικά) |
| 406 | + * @author Dada |
| 407 | + * @author Lou |
| 408 | + * @author ZaDiak |
| 409 | + * @author Απεργός |
| 410 | + */ |
| 411 | +$messages['el'] = array( |
| 412 | + 'validator_error_unknown_argument' => '$1 δεν είναι μια έγκυρη παράμετρος.', |
| 413 | + 'validator_error_required_missing' => 'Λείπει η απαιτούμενη παράμετρος $1.', |
| 414 | + 'validator_error_must_be_number' => 'Η παράμετρος $1 μπορεί να είναι μόνο αριθμός.', |
| 415 | + 'validator_error_must_be_integer' => 'Η παράμετρος $1 μπορεί να είναι μόνο ακέραιος αριθμός.', |
| 416 | + 'validator_list_error_must_be_number' => 'Η παράμετρος $1 μπορεί να περιέχει μόνο αριθμούς.', |
| 417 | + 'validator_list_error_must_be_integer' => 'Η παράμετρος $1 μπορεί να περιέχει μόνο ακέραιους αριθμούς.', |
| 418 | + 'validator_list_error_invalid_range' => 'Όλες οι τιμές της παραμέτρου $1 πρέπει να είναι μεταξύ $2 και $3.', |
| 419 | +); |
| 420 | + |
| 421 | +/** Esperanto (Esperanto) |
| 422 | + * @author Yekrats |
| 423 | + */ |
| 424 | +$messages['eo'] = array( |
| 425 | + 'validator_error_unknown_argument' => '$1 ne estas valida parametro.', |
| 426 | + 'validator_error_required_missing' => 'La nepra parametro $1 mankas.', |
| 427 | + 'validator_error_empty_argument' => 'Parametro $1 ne povas esti nula valoro.', |
| 428 | + 'validator_error_must_be_number' => 'Parametro $1 nur povas esti numero.', |
| 429 | + 'validator_error_must_be_integer' => 'Parametro $1 nur povas esti entjero.', |
| 430 | + 'validator_error_invalid_range' => 'Parametro $1 estu inter $2 kaj $3.', |
| 431 | + 'validator_list_error_invalid_argument' => 'Unu aŭ pliaj valoroj por parametro $1 estas malvalida.', |
| 432 | +); |
| 433 | + |
| 434 | +/** Spanish (Español) |
| 435 | + * @author Crazymadlover |
| 436 | + * @author Imre |
| 437 | + * @author Translationista |
| 438 | + */ |
| 439 | +$messages['es'] = array( |
| 440 | + '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', |
| 441 | + 'validator-warning' => 'Advertencia: $1', |
| 442 | + 'validator-error' => 'Error: $1', |
| 443 | + 'validator-fatal-error' => 'Error fatal: $1', |
| 444 | + 'validator_error_parameters' => 'Se detectó {{PLURAL:$1|el siguiente error|los siguientes errores}} en la sintaxis empleada:', |
| 445 | + 'validator_warning_parameters' => 'Hay {{PLURAL:$1|un error|errores}} en tu sintaxis.', |
| 446 | + 'validator-warning-adittional-errors' => '...y {{PLURAL:$1|otro problema|muchos otros problemas}}.', |
| 447 | + 'validator-error-omitted' => '{{PLURAL:$2|el valor "$1" ha sido omitido|los valores "$1" han sido omitidos}}.', |
| 448 | + 'validator-error-problem' => 'Ha habido un problema con el parámetro $1.', |
| 449 | + 'validator_error_unknown_argument' => '$1 no es un parámetro válido.', |
| 450 | + 'validator_error_required_missing' => 'No se ha provisto el parámetro requerido $1.', |
| 451 | + 'validator-error-override-argument' => 'Se ha intentado sobreescribir el parámetro $1 (valor: $2) con el valor "$3"', |
| 452 | + 'validator-listerrors-errors' => 'Errores', |
| 453 | + 'validator-listerrors-minor' => 'Menor', |
| 454 | + 'validator-listerrors-low' => 'Bajo', |
| 455 | + 'validator-listerrors-normal' => 'Normal', |
| 456 | + 'validator-listerrors-high' => 'Alto', |
| 457 | + 'validator-listerrors-fatal' => 'Fatal', |
| 458 | + 'validator_error_empty_argument' => 'El parámetro $1 no puede tener un valor vacío.', |
| 459 | + 'validator_error_must_be_number' => 'El parámetro $1 sólo puede ser un número.', |
| 460 | + 'validator_error_must_be_integer' => 'El parámetro $1 sólo puede ser un número entero.', |
| 461 | + 'validator-error-must-be-float' => 'El parámetro $1 tiene que ser un número de punto flotante.', |
| 462 | + 'validator_error_invalid_range' => 'El parámetro $1 debe ser entre $2 y $3.', |
| 463 | + 'validator-error-invalid-regex' => 'El parámetro $1 tiene que coincidir con esta expresión racional : $2.', |
| 464 | + 'validator-error-invalid-length' => 'El parámetro $1 tiene que tener una longitud de $2.', |
| 465 | + 'validator-error-invalid-length-range' => 'El parámetro $1 tiene que tener una longitud comprendida entre $2 y $3.', |
| 466 | + 'validator_error_invalid_argument' => 'El valor $1 no es válido para el parámetro $2.', |
| 467 | + 'validator_list_error_empty_argument' => 'El parámetro $1 no acepta valores vacíos.', |
| 468 | + 'validator_list_error_must_be_number' => 'El parámetro $1 sólo puede contener números.', |
| 469 | + 'validator_list_error_must_be_integer' => 'El parámetro $1 sólo puede contener números enteros.', |
| 470 | + 'validator-list-error-must-be-float' => 'El parámetro $1 sólo puede contener floats.', |
| 471 | + 'validator_list_error_invalid_range' => 'Todos los valores del parámetro $1 deben ser entre $2 y $3.', |
| 472 | + 'validator-list-error-invalid-regex' => 'El parámetro $1 tiene que coincidir con esta expresión regular: $2.', |
| 473 | + 'validator_list_error_invalid_argument' => 'Uno o más valores del parámetros $1 son inválidos.', |
| 474 | + 'validator-list-error-accepts-only' => 'Uno o más valores para el parámetro $1 son inválidos. |
| 475 | +Sólo acepta{{PLURAL:$3|este valor| estos valores}}: $2.', |
| 476 | + 'validator-list-error-accepts-only-omitted' => 'Uno o más valores para el parámetro $1 son inválidos. |
| 477 | +Sólo acepta {{PLURAL:$3|este valor|estos valores}}: $2 (y $4 {{PLURAL:$4|valor omitido|valores omitidos}}).', |
| 478 | + 'validator_error_accepts_only' => 'El valor "$4" no es válido para el parámetro $1. El parámetro sólo acepta {{PLURAL:$3|este valor|estos valores}}: $2.', |
| 479 | + 'validator-error-accepts-only-omitted' => 'El valor $2 no es válido para el parámetro $1. |
| 480 | +Sólo acepta {{PLURAL:$5|este valor|estos valores}}: $3 (y $4 {{PLURAL:$4|valor omitido|valores omitidos}}).', |
| 481 | + 'validator_list_omitted' => '{{PLURAL:$2|El valor|Los valores}} $1 {{PLURAL:$2|ha sido omitido|han sido omitidos}}.', |
| 482 | +); |
| 483 | + |
| 484 | +/** Finnish (Suomi) |
| 485 | + * @author Crt |
| 486 | + * @author Silvonen |
| 487 | + * @author Str4nd |
| 488 | + */ |
| 489 | +$messages['fi'] = array( |
| 490 | + 'validator-desc' => 'Tarkastaja tarjoaa helpon tavan muille laajennuksille jäsenninfunktioiden ja tagilaajennusten parametrien tarkastukseen, oletusarvojen asettamiseen ja virheilmoitusten luomiseen.', |
| 491 | + 'validator_error_must_be_number' => 'Parametrin $1 on oltava luku.', |
| 492 | + 'validator_error_must_be_integer' => 'Parametrin $1 on oltava kokonaisluku.', |
| 493 | +); |
| 494 | + |
| 495 | +/** French (Français) |
| 496 | + * @author Cedric31 |
| 497 | + * @author Crochet.david |
| 498 | + * @author IAlex |
| 499 | + * @author Jean-Frédéric |
| 500 | + * @author McDutchie |
| 501 | + * @author Peter17 |
| 502 | + * @author PieRRoMaN |
| 503 | + * @author Sherbrooke |
| 504 | + * @author Urhixidur |
| 505 | + * @author Verdy p |
| 506 | + */ |
| 507 | +$messages['fr'] = array( |
| 508 | + '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', |
| 509 | + 'validator-warning' => 'Attention : $1', |
| 510 | + 'validator-error' => 'Erreur : $1', |
| 511 | + 'validator-fatal-error' => 'Erreur fatale : $1', |
| 512 | + 'validator_error_parameters' => '{{PLURAL:$1|L’erreur suivante a été détectée|Les erreurs suivantes ont été détectées}} dans votre syntaxe :', |
| 513 | + 'validator_warning_parameters' => 'Il y a {{PLURAL:$1|une erreur|des erreurs}} dans votre syntaxe.', |
| 514 | + 'validator-warning-adittional-errors' => '... et {{PLURAL:$1|un problème supplémentaire|plusieurs autres problèmes}}.', |
| 515 | + 'validator-error-omitted' => '{{PLURAL:$2|La valeur « $1 » a été oubliée|Les valeurs « $1 » ont été oubliées}}.', |
| 516 | + 'validator-error-problem' => 'Il y avait un problème avec le paramètre $1.', |
| 517 | + 'validator_error_unknown_argument' => '$1 n’est pas un paramètre valide.', |
| 518 | + 'validator_error_required_missing' => 'Le paramètre requis $1 n’est pas fourni.', |
| 519 | + 'validator-error-override-argument' => 'Le logiciel a essayé de remplacer le paramètre $1 (valeur : $2) avec la valeur « $3 »', |
| 520 | + 'validator-listerrors-errors' => 'Erreurs', |
| 521 | + 'validator-listerrors-minor' => 'Mineur', |
| 522 | + 'validator-listerrors-low' => 'Faible', |
| 523 | + 'validator-listerrors-normal' => 'Normal', |
| 524 | + 'validator-listerrors-high' => 'Élevé', |
| 525 | + 'validator-listerrors-fatal' => 'Fatal', |
| 526 | + 'validator_error_empty_argument' => 'Le paramètre $1 ne peut pas avoir une valeur vide.', |
| 527 | + 'validator_error_must_be_number' => 'Le paramètre $1 peut être uniquement un nombre.', |
| 528 | + 'validator_error_must_be_integer' => 'Le paramètre $1 peut seulement être un entier.', |
| 529 | + 'validator-error-must-be-float' => 'Le paramètre $1 doit être un nombre à virgule flottante.', |
| 530 | + 'validator_error_invalid_range' => 'Le paramètre $1 doit être entre $2 et $3.', |
| 531 | + 'validator-error-invalid-regex' => 'Le paramètre $1 doit vérifier cette expression rationnelle : « $2 ».', |
| 532 | + 'validator-error-invalid-length' => 'Le paramètre $1 doit avoir une longueur de $2.', |
| 533 | + 'validator-error-invalid-length-range' => 'Le paramètre $1 doit avoir une longueur comprise entre $2 et $3.', |
| 534 | + 'validator_error_invalid_argument' => 'La valeur $1 n’est pas valide pour le paramètre $2.', |
| 535 | + 'validator_list_error_empty_argument' => 'Le paramètre $1 n’accepte pas les valeurs vides.', |
| 536 | + 'validator_list_error_must_be_number' => 'Le paramètre $1 ne peut contenir que des nombres.', |
| 537 | + 'validator_list_error_must_be_integer' => 'Le paramètre $1 ne peut contenir que des entiers.', |
| 538 | + 'validator-list-error-must-be-float' => 'Le paramètre $1 ne peut contenir que des nombres à virgule.', |
| 539 | + 'validator_list_error_invalid_range' => 'Toutes les valeurs du paramètre $1 doivent être comprises entre $2 et $3.', |
| 540 | + 'validator-list-error-invalid-regex' => 'Toutes les valeurs du paramètre $1 doivent vérifier cette expression rationnelle : « $2 ».', |
| 541 | + 'validator_list_error_invalid_argument' => 'Une ou plusieurs valeurs du paramètre $1 sont invalides.', |
| 542 | + 'validator-list-error-accepts-only' => 'Une ou plusieurs valeur(s) du paramètre $1 est(sont) invalide(s). |
| 543 | +Il n’accepte que {{PLURAL:$3|cette valeur|ces valeurs}} : $2.', |
| 544 | + 'validator-list-error-accepts-only-omitted' => 'Une ou plusieurs valeur(s) du paramètre $1 est(sont) invalide(s). |
| 545 | +Celui-ci n’accepte que {{PLURAL:$3|cette valeur|ces valeurs}} : $2 (et $4 {{PLURAL:$4|valeur omise|valeurs omises}}).', |
| 546 | + 'validator_error_accepts_only' => "La valeur « $4 » n'est pas valable pour le paramètre $1. Il accepte uniquement {{PLURAL:$3|cette valeur|ces valeurs}} : $2.", |
| 547 | + 'validator-error-accepts-only-omitted' => 'La valeur « $2 » n’est pas valable pour le paramètre $1. |
| 548 | +Celui-ci n’accepte que {{PLURAL:$5|cette valeur|ces valeurs}} : $3 (et $4 {{PLURAL:$4|valeur omise|valeurs omises}}).', |
| 549 | + 'validator_list_omitted' => '{{PLURAL:$2|La valeur|Les valeurs}} $1 {{PLURAL:$2|a été oubliée|ont été oubliées}}.', |
| 550 | +); |
| 551 | + |
| 552 | +/** Franco-Provençal (Arpetan) |
| 553 | + * @author ChrisPtDe |
| 554 | + */ |
| 555 | +$messages['frp'] = array( |
| 556 | + 'validator_error_parameters' => '{{PLURAL:$1|Ceta èrror at étâ dècelâ|Cetes èrrors ont étâ dècelâs}} dens voutra sintaxa :', |
| 557 | + 'validator_warning_parameters' => 'Y at {{PLURAL:$1|una èrror|des èrrors}} dens voutra sintaxa.', |
| 558 | + 'validator_error_unknown_argument' => '$1 est pas un paramètre valido.', |
| 559 | + 'validator_error_required_missing' => 'Lo paramètre nècèssèro $1 est pas balyê.', |
| 560 | + 'validator_error_empty_argument' => 'Lo paramètre $1 pôt pas avêr una valor voueda.', |
| 561 | + 'validator_error_must_be_number' => 'Lo paramètre $1 pôt étre ren qu’un nombro.', |
| 562 | + 'validator_error_must_be_integer' => 'Lo paramètre $1 pôt étre ren qu’un entiér.', |
| 563 | + 'validator_error_invalid_range' => 'Lo paramètre $1 dêt étre entre-mié $2 et $3.', |
| 564 | + 'validator_error_invalid_argument' => 'La valor $1 est pas valida por lo paramètre $2.', |
| 565 | + 'validator_list_error_empty_argument' => 'Lo paramètre $1 accèpte pas les valors vouedes.', |
| 566 | + 'validator_list_error_must_be_number' => 'Lo paramètre $1 pôt contegnir ren que des nombros.', |
| 567 | + 'validator_list_error_must_be_integer' => 'Lo paramètre $1 pôt contegnir ren que des entiérs.', |
| 568 | + 'validator_list_error_invalid_range' => 'Totes les valors du paramètre $1 dêvont étre entre-mié $2 et $3.', |
| 569 | + 'validator_list_error_invalid_argument' => 'Yona ou ben un mouél de valors du paramètre $1 sont envalides.', |
| 570 | + 'validator_list_omitted' => '{{PLURAL:$2|La valor|Les valors}} $1 {{PLURAL:$2|at étâ oubliâ|ont étâ oubliâs}}.', |
| 571 | + 'validator_error_accepts_only' => 'La valor « $4 » est pas valida por lo paramètre $1. Accèpte ren que {{PLURAL:$3|ceta valor|cetes valors}} : $2.', |
| 572 | +); |
| 573 | + |
| 574 | +/** Galician (Galego) |
| 575 | + * @author Toliño |
| 576 | + */ |
| 577 | +$messages['gl'] = array( |
| 578 | + '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', |
| 579 | + 'validator-warning' => 'Atención: $1', |
| 580 | + 'validator-error' => 'Erro: $1', |
| 581 | + 'validator-fatal-error' => 'Erro fatal: $1', |
| 582 | + 'validator_error_parameters' => '{{PLURAL:$1|Detectouse o seguinte erro|Detectáronse os seguintes erros}} na sintaxe empregada:', |
| 583 | + 'validator_warning_parameters' => 'Hai {{PLURAL:$1|un erro|erros}} na súa sintaxe.', |
| 584 | + 'validator-warning-adittional-errors' => '... e {{PLURAL:$1|un problema máis|moitos máis problemas}}.', |
| 585 | + 'validator-error-omitted' => '{{PLURAL:$2|Omitiuse o valor "$1"|Omitíronse os valores "$1"}}.', |
| 586 | + 'validator-error-problem' => 'Houbo un problema co parámetro $1.', |
| 587 | + 'validator_error_unknown_argument' => '"$1" non é un parámetro válido.', |
| 588 | + 'validator_error_required_missing' => 'Non se proporcionou o parámetro $1 necesario.', |
| 589 | + 'validator-error-override-argument' => 'Intentouse sobrescribir o parámetro $1 (valor: $2) co valor "$3"', |
| 590 | + 'validator-listerrors-errors' => 'Erros', |
| 591 | + 'validator-listerrors-minor' => 'Menor', |
| 592 | + 'validator-listerrors-low' => 'Baixo', |
| 593 | + 'validator-listerrors-normal' => 'Normal', |
| 594 | + 'validator-listerrors-high' => 'Alto', |
| 595 | + 'validator-listerrors-fatal' => 'Fatal', |
| 596 | + 'validator_error_empty_argument' => 'O parámetro $1 non pode ter un valor baleiro.', |
| 597 | + 'validator_error_must_be_number' => 'O parámetro $1 só pode ser un número.', |
| 598 | + 'validator_error_must_be_integer' => 'O parámetro $1 só pode ser un número enteiro.', |
| 599 | + 'validator-error-must-be-float' => 'O parámetro $1 só pode ser un número de coma flotante.', |
| 600 | + 'validator_error_invalid_range' => 'O parámetro $1 debe estar entre $2 e $3.', |
| 601 | + 'validator-error-invalid-regex' => 'O parámetro $1 debe coincidir con esta expresión regular: $2.', |
| 602 | + 'validator-error-invalid-length' => 'O parámetro $1 debe ter unha lonxitude de $2.', |
| 603 | + 'validator-error-invalid-length-range' => 'O parámetro $1 ter unha lonxitude de entre $2 e $3.', |
| 604 | + 'validator_error_invalid_argument' => 'O valor $1 non é válido para o parámetro $2.', |
| 605 | + 'validator_list_error_empty_argument' => 'O parámetro $1 non acepta valores en branco.', |
| 606 | + 'validator_list_error_must_be_number' => 'O parámetro $1 só pode conter números.', |
| 607 | + 'validator_list_error_must_be_integer' => 'O parámetro $1 só pode conter números enteiros.', |
| 608 | + 'validator-list-error-must-be-float' => 'O parámetro $1 só pode conter comas flotantes.', |
| 609 | + 'validator_list_error_invalid_range' => 'Todos os valores do parámetro $1 deben estar comprendidos entre $2 e $3.', |
| 610 | + 'validator-list-error-invalid-regex' => 'Todos os valores do parámetro $1 deben coincidir con esta expresión regular: $2.', |
| 611 | + 'validator_list_error_invalid_argument' => 'Un ou varios valores do parámetro $1 non son válidos.', |
| 612 | + 'validator-list-error-accepts-only' => 'Un ou varios valores do parámetro $1 non son válidos. |
| 613 | +Só acepta {{PLURAL:$3|este valor|estes valores}}: $2.', |
| 614 | + 'validator-list-error-accepts-only-omitted' => 'Un ou varios valores do parámetro $1 non son válidos. |
| 615 | +Só acepta {{PLURAL:$3|este valor|estes valores}}: $2 (e $4 {{PLURAL:$4|valor omitido|valores omitidos}}).', |
| 616 | + 'validator_error_accepts_only' => 'O valor "$4" non é válido para o parámetro "$1". Só acepta {{PLURAL:$3|este valor|estes valores}}: $2.', |
| 617 | + 'validator-error-accepts-only-omitted' => 'O valor "$2" non é válido para o parámetro $1. |
| 618 | +Só acepta {{PLURAL:$5|este valor|estes valores}}: $3 (e $4 {{PLURAL:$4|valor omitido|valores omitidos}}).', |
| 619 | + 'validator_list_omitted' => '{{PLURAL:$2|O valor|Os valores}} $1 {{PLURAL:$2|foi omitido|foron omitidos}}.', |
| 620 | +); |
| 621 | + |
| 622 | +/** Swiss German (Alemannisch) |
| 623 | + * @author Als-Holder |
| 624 | + */ |
| 625 | +$messages['gsw'] = array( |
| 626 | + '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', |
| 627 | + 'validator-warning' => 'Warnig: $1', |
| 628 | + 'validator-error' => 'Fähler: $1', |
| 629 | + 'validator-fatal-error' => 'Fähler, wu nit cha behobe wäre: $1', |
| 630 | + 'validator_error_parameters' => '{{PLURAL:$1|Dää Fähler isch|Die Fähler sin}} in Dyyre Syntax gfunde wore:', |
| 631 | + 'validator_warning_parameters' => 'S het {{PLURAL:$1|e Fähler|Fähler}} in dyyre Syntax.', |
| 632 | + 'validator-warning-adittional-errors' => '... un {{PLURAL:$1|e ander Probläm|$1 anderi Probläm}}.', |
| 633 | + 'validator-error-omitted' => '{{PLURAL:$2|Dr Wärt|D Wärt}} „$1“ {{PLURAL:$2|isch|sin}} uusgloo wore.', |
| 634 | + 'validator-error-problem' => 'S het e Probläm gee mit em Parameter $1.', |
| 635 | + 'validator_error_unknown_argument' => '$1 isch kei giltige Parameter.', |
| 636 | + 'validator_error_required_missing' => 'Dr Paramter $1, wu aagforderet woren isch, wird nit z Verfiegig gstellt.', |
| 637 | + 'validator-error-override-argument' => 'S isch versuecht wore, dr Parameter $1 (Wärt: $2) mit em Wärt „$3“ z iberschryybe', |
| 638 | + 'validator-listerrors-errors' => 'Fähler', |
| 639 | + 'validator-listerrors-minor' => 'Gring', |
| 640 | + 'validator-listerrors-low' => 'Chlei', |
| 641 | + 'validator-listerrors-normal' => 'Normal', |
| 642 | + 'validator-listerrors-high' => 'Groß', |
| 643 | + 'validator-listerrors-fatal' => 'Schwär', |
| 644 | + 'validator_error_empty_argument' => 'Dr Parameter $1 cha kei lääre Wärt haa.', |
| 645 | + 'validator_error_must_be_number' => 'Dr Parameter $1 cha nume ne Zahl syy.', |
| 646 | + 'validator_error_must_be_integer' => 'Parameter $1 cha nume ne giltigi Zahl syy.', |
| 647 | + 'validator-error-must-be-float' => 'Parameter $1 cha nume ne Gleitkommazahl syy.', |
| 648 | + 'validator_error_invalid_range' => 'Dr Parameter $1 muess zwische $2 un $3 syy.', |
| 649 | + 'validator-error-invalid-regex' => 'Parameter $1 mueß däm reguläre Uusdruck entspräche: $2.', |
| 650 | + 'validator-error-invalid-length' => 'Parameter $1 mueß e Lengi haa vu $2.', |
| 651 | + 'validator-error-invalid-length-range' => 'Parameter $1 mueß e Lengi haa zwische $2 un $3.', |
| 652 | + 'validator_error_invalid_argument' => 'Dr Wärt $1 isch nit giltig fir dr Parameter $2.', |
| 653 | + 'validator_list_error_empty_argument' => 'Bim Parameter $1 sin keini lääre Wärt zuegloo.', |
| 654 | + 'validator_list_error_must_be_number' => 'Fir dr Parameter $1 si nume Zahle zuegloo.', |
| 655 | + 'validator_list_error_must_be_integer' => 'Fir dr Parameter $1 sin nume ganzi Zahle zuegloo.', |
| 656 | + 'validator-list-error-must-be-float' => 'Im Parameter $1 cha s nume Gleitkommazahle haa.', |
| 657 | + 'validator_list_error_invalid_range' => 'Alli Wärt fir dr Parameter $1 mien zwische $2 un $3 lige.', |
| 658 | + 'validator-list-error-invalid-regex' => 'Alli Wärt vum Parameter $1 mien däm reguläre Uusdruck entspräche: $2.', |
| 659 | + 'validator_list_error_invalid_argument' => 'Ein oder mehreri Wärt fir dr Parameter $1 sin nit giltig.', |
| 660 | + 'validator-list-error-accepts-only' => 'Ein oder meh Wärt fir dr Parameter $1 sin nit giltig. |
| 661 | +Nume {{PLURAL:$3|dää Wärt wird|die Wärt wäre}} akzeptiert: $2.', |
| 662 | + 'validator-list-error-accepts-only-omitted' => 'Ein oder meh Wärt fir dr Parameter $1 sin nit giltig. |
| 663 | +Nume {{PLURAL:$3|dää Wärt wird|die Wärt wäre}} akzeptiert: $2 (un $4 uusglosseni {{PLURAL:$4|Wärt|Wärt}}).', |
| 664 | + 'validator_error_accepts_only' => 'Dr Wärt „$4“ isch nit giltig fir dr Parameter $1. Nume {{PLURAL:$3|dää Wärt wird|die Wärt wäre}} akzeptiert: „$2“.', |
| 665 | + 'validator-error-accepts-only-omitted' => 'Dr Wärt „$2“ isch nit giltig fir dr Parameter $1. |
| 666 | +Nume {{PLURAL:$5|dää Wärt wird|die Wärt wäre}} akzeptiert: $3 (un $4 uusglosseni {{PLURAL:$4|Wärt|Wärt}}).', |
| 667 | + 'validator_list_omitted' => '{{PLURAL:$2|Dr Wärt|D Wärt}} $1 {{PLURAL:$2|isch|sin}} uusgloo wore.', |
| 668 | +); |
| 669 | + |
| 670 | +/** Hebrew (עברית) |
| 671 | + * @author Amire80 |
| 672 | + * @author Rotemliss |
| 673 | + * @author YaronSh |
| 674 | + */ |
| 675 | +$messages['he'] = array( |
| 676 | + 'validator-fatal-error' => 'שגיאה חמורה: $1', |
| 677 | + 'validator_warning_parameters' => '{{PLURAL:$1|ישנה שגיאה|ישנן שגיאות}} בתחביר שלכם.', |
| 678 | + 'validator_error_unknown_argument' => '$1 אינו פרמטר תקני.', |
| 679 | + 'validator_error_required_missing' => 'הפרמטר הדרוש $1 לא צוין.', |
| 680 | + 'validator-listerrors-errors' => 'שגיאות', |
| 681 | + 'validator_error_empty_argument' => 'הפרמטר $1 לא יכול להיות ערך ריק.', |
| 682 | + 'validator_error_must_be_number' => 'הפרמטר $1 יכול להיות מספר בלבד.', |
| 683 | + 'validator_error_must_be_integer' => 'הפרמטר $1 יכול להיות מספר שלם בלבד.', |
| 684 | + 'validator_error_invalid_range' => 'הפרמטר $1 חייב להיות בין $2 ל־$3.', |
| 685 | + 'validator_error_invalid_argument' => 'הערך $1 אינו תקני עבור הפרמטר $2.', |
| 686 | +); |
| 687 | + |
| 688 | +/** Upper Sorbian (Hornjoserbsce) |
| 689 | + * @author Michawiki |
| 690 | + */ |
| 691 | +$messages['hsb'] = array( |
| 692 | + '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', |
| 693 | + '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}}:', |
| 694 | + 'validator_warning_parameters' => '{{PLURAL:$1|Je zmylk|Stej zmylkaj|Su zmylki|Su zmylki}} w twojej syntaksy.', |
| 695 | + 'validator_error_unknown_argument' => '$1 płaćiwy parameter njeje.', |
| 696 | + 'validator_error_required_missing' => 'Trěbny parameter $1 njeje podaty.', |
| 697 | + 'validator_error_empty_argument' => 'Parameter $1 njemóže prózdnu hódnotu měć.', |
| 698 | + 'validator_error_must_be_number' => 'Parameter $1 móže jenož ličba być.', |
| 699 | + 'validator_error_must_be_integer' => 'Parameter $1 móže jenož cyła ličba być.', |
| 700 | + 'validator_error_invalid_range' => 'Parameter $1 dyrbi mjez $2 a $3 być.', |
| 701 | + 'validator_error_invalid_argument' => 'Hódnota $1 njeje płaćiwa za parameter $2.', |
| 702 | + 'validator_list_error_empty_argument' => 'Parameter $1 njeakceptuje prózdne hódnoty.', |
| 703 | + 'validator_list_error_must_be_number' => 'Parameter $1 móže jenož ličby wobsahować.', |
| 704 | + 'validator_list_error_must_be_integer' => 'Parameter $1 móže jenož cyłe ličby wobsahować.', |
| 705 | + 'validator_list_error_invalid_range' => 'Wšě hódnoty parametra $1 dyrbja mjez $2 a $3 być.', |
| 706 | + 'validator_list_error_invalid_argument' => 'Jedna hódnota abo wjace hódnotow za parameter $1 su njepłaćiwe.', |
| 707 | + '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}}.', |
| 708 | + 'validator_error_accepts_only' => 'Parameter $1 akceptuje jenož {{PLURAL:$3|tutu hódnotu|tutej hódnoće|tute hódnoty|tute hódnoty}}: $2.', |
| 709 | +); |
| 710 | + |
| 711 | +/** Hungarian (Magyar) |
| 712 | + * @author Dani |
| 713 | + * @author Glanthor Reviol |
| 714 | + */ |
| 715 | +$messages['hu'] = array( |
| 716 | + '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.', |
| 717 | + 'validator-warning' => 'Figyelmeztetés: $1', |
| 718 | + 'validator-error' => 'Hiba: $1', |
| 719 | + 'validator-fatal-error' => 'Végzetes hiba: $1', |
| 720 | + 'validator_error_parameters' => 'A következő {{PLURAL:$1|hiba található|hibák találhatóak}} a szintaxisban:', |
| 721 | + 'validator_warning_parameters' => '{{PLURAL:$1|Hiba van|Hibák vannak}} a szintaxisodban.', |
| 722 | + 'validator_error_unknown_argument' => 'A(z) $1 nem érvényes paraméter.', |
| 723 | + 'validator_error_required_missing' => 'A(z) $1 kötelező paraméter nem lett megadva.', |
| 724 | + 'validator-listerrors-errors' => 'Hibák', |
| 725 | + 'validator-listerrors-minor' => 'Apró', |
| 726 | + 'validator-listerrors-low' => 'Alacsony', |
| 727 | + 'validator-listerrors-normal' => 'Normális', |
| 728 | + 'validator-listerrors-high' => 'Komoly', |
| 729 | + 'validator-listerrors-fatal' => 'Végzetes', |
| 730 | + 'validator_error_empty_argument' => 'A(z) $1 paraméter értéke nem lehet üres.', |
| 731 | + 'validator_error_must_be_number' => 'A(z) $1 paraméter csak szám lehet.', |
| 732 | + 'validator_error_must_be_integer' => 'A(z) $1 paraméter csak egész szám lehet.', |
| 733 | + 'validator-error-must-be-float' => 'A(z) $1 paraméter csak lebegőpontos szám lehet.', |
| 734 | + 'validator_error_invalid_range' => 'A(z) $1 paraméter értékének $2 és $3 között kell lennie.', |
| 735 | + 'validator-error-invalid-regex' => 'A(z) $1 paraméternek illeszkednie kell a következő reguláris kifejezésre: $2.', |
| 736 | + 'validator-error-invalid-length' => 'A(z) $1 paraméternek legalább $2 karakter hosszúnak kell lennie.', |
| 737 | + 'validator-error-invalid-length-range' => 'A(z) $1 paraméternek $2 és $3 karakter közötti hosszúnak kell lennie.', |
| 738 | + 'validator_error_invalid_argument' => 'A(z) $1 érték nem érvényes a(z) $2 paraméterhez.', |
| 739 | + 'validator_list_error_empty_argument' => 'A(z) $1 paraméter nem fogad el üres értékeket.', |
| 740 | + 'validator_list_error_must_be_number' => 'A(z) $1 paraméter csak számokat tartalmazhat.', |
| 741 | + 'validator_list_error_must_be_integer' => 'A(z) $1 paraméter csak egész számokat tartalmazhat.', |
| 742 | + 'validator-list-error-must-be-float' => 'A(z) $1 paraméter csak lebegőpontos számokat tartalmazhat.', |
| 743 | + 'validator_list_error_invalid_range' => 'A(z) $1 paraméter összes értékének $2 és $3 közöttinek kell lennie.', |
| 744 | + 'validator_list_error_invalid_argument' => 'A(z) $1 paraméter egy vagy több értéke érvénytelen.', |
| 745 | + 'validator_error_accepts_only' => 'A(z) $1 paraméter csak a következő {{PLURAL:$3|értéket|értékeket}} fogadja el: $2', |
| 746 | + 'validator_list_omitted' => 'A(z) $1 {{PLURAL:$2|érték mellőzve lett.|értékek mellőzve lettek.}}', |
| 747 | +); |
| 748 | + |
| 749 | +/** Interlingua (Interlingua) |
| 750 | + * @author McDutchie |
| 751 | + */ |
| 752 | +$messages['ia'] = array( |
| 753 | + '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', |
| 754 | + 'validator-warning' => 'Aviso: $1', |
| 755 | + 'validator-error' => 'Error: $1', |
| 756 | + 'validator-fatal-error' => 'Error fatal: $1', |
| 757 | + 'validator_error_parameters' => 'Le sequente {{PLURAL:$1|error|errores}} ha essite detegite in tu syntaxe:', |
| 758 | + 'validator_warning_parameters' => 'Il ha {{PLURAL:$1|un error|errores}} in tu syntaxe.', |
| 759 | + 'validator-warning-adittional-errors' => '... e {{PLURAL:$1|un altere problema|plure altere problemas}}.', |
| 760 | + 'validator-error-omitted' => 'Le {{PLURAL:$2|valor|valores}} "$1" ha essite omittite.', |
| 761 | + 'validator-error-problem' => 'Il habeva un problema con le parametro $1.', |
| 762 | + 'validator_error_unknown_argument' => '$1 non es un parametro valide.', |
| 763 | + 'validator_error_required_missing' => 'Le parametro requisite $1 non ha essite fornite.', |
| 764 | + 'validator-error-override-argument' => 'Tentava supplantar le parametro $1 (valor: $2) con le valor "$3"', |
| 765 | + 'validator-listerrors-errors' => 'Errores', |
| 766 | + 'validator-listerrors-minor' => 'Minor', |
| 767 | + 'validator-listerrors-low' => 'Basse', |
| 768 | + 'validator-listerrors-normal' => 'Normal', |
| 769 | + 'validator-listerrors-high' => 'Alte', |
| 770 | + 'validator-listerrors-fatal' => 'Fatal', |
| 771 | + 'validator_error_empty_argument' => 'Le parametro $1 non pote haber un valor vacue.', |
| 772 | + 'validator_error_must_be_number' => 'Le parametro $1 pote solmente esser un numero.', |
| 773 | + 'validator_error_must_be_integer' => 'Le parametro $1 pote solmente esser un numero integre.', |
| 774 | + 'validator-error-must-be-float' => 'Le parametro $1 pote solmente esser un numero con fraction decimal.', |
| 775 | + 'validator_error_invalid_range' => 'Le parametro $1 debe esser inter $2 e $3.', |
| 776 | + 'validator-error-invalid-regex' => 'Le parametro $1 debe corresponder a iste expression regular: $2.', |
| 777 | + 'validator-error-invalid-length' => 'Le parametro $1 debe haber un longitude de $2.', |
| 778 | + 'validator-error-invalid-length-range' => 'Le parametro $1 debe haber un longitude inter $2 e $3.', |
| 779 | + 'validator_error_invalid_argument' => 'Le valor $1 non es valide pro le parametro $2.', |
| 780 | + 'validator_list_error_empty_argument' => 'Le parametro $1 non accepta valores vacue.', |
| 781 | + 'validator_list_error_must_be_number' => 'Le parametro $1 pote solmente continer numeros.', |
| 782 | + 'validator_list_error_must_be_integer' => 'Le parametro $1 pote solmente continer numeros integre.', |
| 783 | + 'validator-list-error-must-be-float' => 'Le parametro $1 pote solmente continer numeros a comma flottante.', |
| 784 | + 'validator_list_error_invalid_range' => 'Tote le valores del parametro $1 debe esser inter $2 e $3.', |
| 785 | + 'validator-list-error-invalid-regex' => 'Tote le valores del parametro $1 debe corresponder a iste expression regular: $2.', |
| 786 | + 'validator_list_error_invalid_argument' => 'Un o plus valores pro le parametro $1 es invalide.', |
| 787 | + 'validator-list-error-accepts-only' => 'Un o plus valores del parametro $1 es invalide. |
| 788 | +Illo accepta solmente iste {{PLURAL:$3|valor|valores}}: $2.', |
| 789 | + 'validator-list-error-accepts-only-omitted' => 'Un o plus valores del parametro $1 es invalide. |
| 790 | +Illo accepta solmente iste {{PLURAL:$3|valor|valores}}: $2. (e $4 {{PLURAL:$4|valor|valores}} omittite).', |
| 791 | + 'validator_error_accepts_only' => 'Le valor "$4" non es valide pro le parametro $1. Illo accepta solmente iste {{PLURAL:$3|valor|valores}}: $2.', |
| 792 | + 'validator-error-accepts-only-omitted' => 'Le valor "$2" non es valide pro le parametro $1. |
| 793 | +Illo accepta solmente iste {{PLURAL:$5|valor|valores}}: $3 (e $4 {{PLURAL:$4|valor|valores}} omittite).', |
| 794 | + 'validator_list_omitted' => 'Le {{PLURAL:$2|valor|valores}} $1 ha essite omittite.', |
| 795 | +); |
| 796 | + |
| 797 | +/** Indonesian (Bahasa Indonesia) |
| 798 | + * @author Bennylin |
| 799 | + * @author Farras |
| 800 | + * @author Irwangatot |
| 801 | + * @author IvanLanin |
| 802 | + */ |
| 803 | +$messages['id'] = array( |
| 804 | + 'validator-desc' => 'Validator memberikan cara mudah untuk ekstensi lain untuk memvalidasi parameter ParserFunction dan ekstensi tag, mengatur nilai biasa dan membuat pesan kesalahan', |
| 805 | + 'validator_error_parameters' => '{{PLURAL:$1|Kesalahan|Kesalahan}} berikut telah terdeteksi pada sintaksis Anda:', |
| 806 | + 'validator_warning_parameters' => '{{PLURAL:$1|kesalahan|kesalahan}} ini pada sintaks anda.', |
| 807 | + 'validator_error_unknown_argument' => '$1 bukan parameter yang benar.', |
| 808 | + 'validator_error_required_missing' => 'Parameter $1 yang diperlukan tidak diberikan.', |
| 809 | + 'validator_error_empty_argument' => 'Parameter $1 tidak dapat bernilai kosong.', |
| 810 | + 'validator_error_must_be_number' => 'Parameter $1 hanya dapat berupa angka.', |
| 811 | + 'validator_error_must_be_integer' => 'Parameter $1 hanya dapat berupa integer.', |
| 812 | + 'validator_error_invalid_range' => 'Parameter $1 harus antara $2 dan $3.', |
| 813 | + 'validator_error_invalid_argument' => 'Nilai $1 tidak valid untuk parameter $2.', |
| 814 | + 'validator_list_error_empty_argument' => 'Parameter $1 tidak menerima nilai kosong.', |
| 815 | + 'validator_list_error_must_be_number' => 'Parameter $1 hanya dapat berisi angka.', |
| 816 | + 'validator_list_error_must_be_integer' => 'Parameter $1 hanya dapat berisi bilangan bulat.', |
| 817 | + 'validator_list_error_invalid_range' => 'Semua nilai parameter $1 harus antara $2 dan $3.', |
| 818 | + 'validator_list_error_invalid_argument' => 'Satu nilai atau lebih untuk parameter $1 tidak sah.', |
| 819 | + 'validator_list_omitted' => '{{PLURAL:$2|Nilai|Nilai}} $1 {{PLURAL:$2|telah|telah}} dihapus.', |
| 820 | + 'validator_error_accepts_only' => 'Parameter $1 hanya menerima {{PLURAL:$3|nilai ini|nilai ini}}: $2.', |
| 821 | +); |
| 822 | + |
| 823 | +/** Italian (Italiano) |
| 824 | + * @author Civvì |
| 825 | + * @author HalphaZ |
| 826 | + */ |
| 827 | +$messages['it'] = array( |
| 828 | + '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.', |
| 829 | + 'validator_error_parameters' => 'Nella tua sintassi {{PLURAL:$1|è stato individuato il seguente errore|sono stati individuati i seguenti errori}}:', |
| 830 | + 'validator_warning_parameters' => "Nella tua sintassi {{PLURAL:$1|c'è un errore|ci sono errori}}.", |
| 831 | + 'validator_error_unknown_argument' => '$1 non è un parametro valido.', |
| 832 | + 'validator_error_required_missing' => 'Il parametro richiesto $1 non è stato fornito.', |
| 833 | + 'validator_error_empty_argument' => 'Il parametro $1 non può avere un valore vuoto.', |
| 834 | + 'validator_error_must_be_number' => 'Il parametro $1 può essere solo un numero.', |
| 835 | + 'validator_error_must_be_integer' => 'Il parametro $1 può essere solo un intero.', |
| 836 | + 'validator_error_invalid_range' => 'Il parametro $1 deve essere compreso tra $2 e $3.', |
| 837 | + 'validator_error_invalid_argument' => 'Il valore $1 non è valido per il parametro $2.', |
| 838 | + 'validator_list_error_empty_argument' => 'Il parametro $1 non accetta valori vuoti.', |
| 839 | + 'validator_list_error_must_be_number' => 'Il parametro $1 può contenere solo numeri.', |
| 840 | + 'validator_list_error_must_be_integer' => 'Il parametro $1 può contenere solo numeri interi.', |
| 841 | + 'validator_list_error_invalid_range' => 'Tutti i valori del parametro $1 devono essere compresi tra $2 e $3.', |
| 842 | + 'validator_list_error_invalid_argument' => 'Uno o più valori del parametro $1 non sono validi.', |
| 843 | + 'validator_list_omitted' => '{{PLURAL:$2|Il valore|I valori}} $1 {{PLURAL:$2|è stato omesso|sono stati omessi}}.', |
| 844 | + 'validator_error_accepts_only' => 'Il parametro $1 accetta solo {{PLURAL:$3|questo valore|questi valori}}: $2.', |
| 845 | +); |
| 846 | + |
| 847 | +/** Japanese (日本語) |
| 848 | + * @author Aotake |
| 849 | + * @author Fryed-peach |
| 850 | + * @author Marine-Blue |
| 851 | + * @author Whym |
| 852 | + * @author Yanajin66 |
| 853 | + */ |
| 854 | +$messages['ja'] = array( |
| 855 | + 'validator-desc' => '妥当性評価器は他の拡張機能にパーサー関数やタグ拡張の引数の妥当性を確認したり、規定値を設定したり、エラーメッセージを生成する手段を提供する', |
| 856 | + 'validator-warning' => '警告: $1', |
| 857 | + 'validator-error' => 'エラー: $1', |
| 858 | + 'validator-fatal-error' => '致命的なエラー: $1', |
| 859 | + 'validator_error_parameters' => 'あなたの入力から以下の{{PLURAL:$1|エラー|エラー}}が検出されました:', |
| 860 | + 'validator_warning_parameters' => 'あなたの入力した構文には{{PLURAL:$1|エラー}}があります。', |
| 861 | + 'validator-warning-adittional-errors' => '...と{{PLURAL:$1|他の問題}}。', |
| 862 | + 'validator-error-omitted' => '{{PLURAL:$2|$1 個の値}}が省略されました。', |
| 863 | + 'validator-error-problem' => 'パラメータ $1 に問題が見つかりました。', |
| 864 | + 'validator_error_unknown_argument' => '$1 は有効な引数ではありません。', |
| 865 | + 'validator_error_required_missing' => '必須の引数「$1」が入力されていません。', |
| 866 | + 'validator-error-override-argument' => '値"$3"とともにパラメータ$1 (値: $2)を無視してみてください', |
| 867 | + 'validator-listerrors-errors' => 'エラー', |
| 868 | + 'validator-listerrors-minor' => '非常に軽度', |
| 869 | + 'validator-listerrors-low' => '軽度', |
| 870 | + 'validator-listerrors-normal' => '普通', |
| 871 | + 'validator-listerrors-high' => '重大', |
| 872 | + 'validator-listerrors-fatal' => '非常に重大', |
| 873 | + 'validator_error_empty_argument' => '引数「$1」は空の値をとることができません。', |
| 874 | + 'validator_error_must_be_number' => '引数「$1」は数値でなければなりません。', |
| 875 | + 'validator_error_must_be_integer' => '引数「$1」は整数でなければなりません。', |
| 876 | + 'validator-error-must-be-float' => 'パラメータ$1は浮動小数点数になることだけができます。', |
| 877 | + 'validator_error_invalid_range' => '引数「$1」は $2 と $3 の間の値でなければなりません。', |
| 878 | + 'validator-error-invalid-regex' => 'パラメータ $1 は次の正規表現と一致する必要があります: $2', |
| 879 | + 'validator-error-invalid-length' => 'パラメータ$1は$2の長さを保持していなければならない。', |
| 880 | + 'validator-error-invalid-length-range' => 'パラメータ$1は$2と$3間の長さを保持していなければならない。', |
| 881 | + 'validator_error_invalid_argument' => '値「$1」は引数「$2」として妥当ではありません。', |
| 882 | + 'validator_list_error_empty_argument' => '引数「$1」は空の値をとりません。', |
| 883 | + 'validator_list_error_must_be_number' => '引数「$1」は数値しかとることができません。', |
| 884 | + 'validator_list_error_must_be_integer' => '引数「$1」は整数値しかとることができません。', |
| 885 | + 'validator-list-error-must-be-float' => 'パラメータ $1 は整数値しか利用できません。', |
| 886 | + 'validator_list_error_invalid_range' => '引数「$1」の値はすべて $2 と $3 の間のものでなくてはなりません。', |
| 887 | + 'validator-list-error-invalid-regex' => 'パラメータ $1 の値は次の正規表現と一致する必要があります: $2', |
| 888 | + 'validator_list_error_invalid_argument' => '引数「$1」の値に不正なものが1つ以上あります。', |
| 889 | + 'validator-list-error-accepts-only' => 'パラメータ $1 に無効な値が含まれています。 |
| 890 | +このパラメータは{{PLURAL:$3|次の値}}しか利用できません: $2', |
| 891 | + 'validator-list-error-accepts-only-omitted' => 'パラメータ $1 に無効な値が含まれています。 |
| 892 | +このパラメータは{{PLURAL:$3|次の値}}しか利用できません: $2 (と省略された $4 の値)', |
| 893 | + 'validator_error_accepts_only' => '値"$4"はパラメーター$1にとって有効ではありません。{{PLURAL:$3|この値|これらの値}}のみ受け入れられます。: $2。', |
| 894 | + 'validator-error-accepts-only-omitted' => 'パラメータ $1 の値 "$2" は有効ではありません。 |
| 895 | +このパラメータは{{PLURAL:$5|次の値}}しか利用できません: $3 (と省略された $4 の値)', |
| 896 | + 'validator_list_omitted' => '{{PLURAL:$2|値}} $1 は省かれました。', |
| 897 | +); |
| 898 | + |
| 899 | +/** Colognian (Ripoarisch) |
| 900 | + * @author Purodha |
| 901 | + */ |
| 902 | +$messages['ksh'] = array( |
| 903 | + '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.', |
| 904 | + 'validator_error_parameters' => '{{PLURAL:$1|Heh dä|Heh di|Keine}} Fähler {{PLURAL:$1|es|sin|es}} en Dinge Syntax opjevalle:', |
| 905 | + 'validator_error_unknown_argument' => '„$1“ es keine jöltijje Parameeter.', |
| 906 | + 'validator_error_required_missing' => 'Dä Parameeter $1 moß aanjejovve sin, un fählt.', |
| 907 | + 'validator_error_empty_argument' => 'Dä Parameeter $1 kann keine Wäät met nix dren hann.', |
| 908 | + 'validator_error_must_be_number' => 'Dä Parameeter $1 kann blohß en Zahl sin.', |
| 909 | + 'validator_error_must_be_integer' => 'Dä Parrameeter $1 kann bloß en jannze Zahl sin.', |
| 910 | + 'validator_error_invalid_range' => 'Dä Parameeter $1 moß zwesche $2 un $3 sin.', |
| 911 | + 'validator_error_invalid_argument' => 'Däm Parameeter $2 singe Wäät es $1, dat es ävver doför nit jöltesch.', |
| 912 | + 'validator_error_accepts_only' => '„$4“ es nit ze Bruche, weil dä Parameeter $1 {{PLURAL:$3|bloß eine Wäät|bloß eine vun heh dä Wääte|keine Wäät}} han kann: $2', |
| 913 | +); |
| 914 | + |
| 915 | +/** Luxembourgish (Lëtzebuergesch) |
| 916 | + * @author Les Meloures |
| 917 | + * @author Robby |
| 918 | + */ |
| 919 | +$messages['lb'] = array( |
| 920 | + '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', |
| 921 | + 'validator-warning' => 'Opgepasst: $1', |
| 922 | + 'validator-error' => 'Feeler: $1', |
| 923 | + 'validator-fatal-error' => 'Fatale Feeler: $1', |
| 924 | + 'validator_error_parameters' => '{{PLURAL:$1|Dëse Feeler gouf|Dës Feeler goufen}} an Ärer Syntax fonnt:', |
| 925 | + 'validator_warning_parameters' => 'Et {{PLURAL:$1|ass ee|si}} Feeler an Ärer Syntax.', |
| 926 | + 'validator-error-omitted' => '{{PLURAL:$2|De Wäert|D\'Wäerter}} "$1" {{PLURAL:$2|gouf|goufe}} vergiess.', |
| 927 | + 'validator-error-problem' => 'Et gouf e Problem mam Parameter $1.', |
| 928 | + 'validator_error_unknown_argument' => '$1 ass kee valbele Parameter.', |
| 929 | + 'validator_error_required_missing' => 'Den obligatoresche Parameter $1 war net derbäi.', |
| 930 | + 'validator-error-override-argument' => 'huet versicht de Parameter $1 (Wäert: $2) mam Wäert "$3" z\'iwwerschreiwen', |
| 931 | + 'validator-listerrors-errors' => 'Feeler', |
| 932 | + 'validator-listerrors-minor' => 'Marginal', |
| 933 | + 'validator-listerrors-low' => 'Niddreg', |
| 934 | + 'validator-listerrors-normal' => 'Normal', |
| 935 | + 'validator-listerrors-high' => 'Héich', |
| 936 | + 'validator-listerrors-fatal' => 'Fatal', |
| 937 | + 'validator_error_empty_argument' => 'De Parameter $1 ka keen eidele Wäert hunn.', |
| 938 | + 'validator_error_must_be_number' => 'De Parameter $1 ka just eng Zuel sinn', |
| 939 | + 'validator_error_must_be_integer' => 'De Parameter $1 ka just eng ganz Zuel sinn.', |
| 940 | + 'validator-error-must-be-float' => 'Parameter $1 kann nëmmen eng Féisskommazuel sinn.', |
| 941 | + 'validator_error_invalid_range' => 'De Parameter $1 muss tëschent $2 an $3 leien.', |
| 942 | + 'validator-error-invalid-length' => 'Parameter $1 muss eng Längt vu(n) $2 hunn.', |
| 943 | + 'validator-error-invalid-length-range' => 'De Parameter $1 muss eng Längt tëschent $2 an $3 hunn.', |
| 944 | + 'validator_error_invalid_argument' => 'De Wäert $1 ass net valabel fir de Parameter $2.', |
| 945 | + 'validator_list_error_empty_argument' => 'De Parameter $1 hëlt keng eidel Wäerter un.', |
| 946 | + 'validator_list_error_must_be_number' => 'Am Parameter $1 kënnen nëmmen Zuelen dra sinn.', |
| 947 | + 'validator_list_error_must_be_integer' => 'Am Parameter $1 kënnen nëmme ganz Zuele sinn.', |
| 948 | + 'validator-list-error-must-be-float' => 'Am Parameter $1 kënnen nëmme Kommazuelen dra sinn.', |
| 949 | + 'validator_list_error_invalid_range' => 'All Wäerter vum Parameter $1 mussen tëschent $2 an $3 leien.', |
| 950 | + 'validator_list_error_invalid_argument' => 'Een oder méi Wäerter fir de Parameter $1 sinn net valabel.', |
| 951 | + 'validator-list-error-accepts-only' => 'Een oder méi Wäerter vum Parameter $1 sinn net valabel. |
| 952 | +En akzeptéiert nëmmen {{PLURAL:$3|dëse Wäert|dës Wäerter}}: $2.', |
| 953 | + 'validator_error_accepts_only' => 'De Wäert $4 ass net valabel fir de Parameter $1. En akzeptéiert just {{PLURAL:$3|dëse Wäert|dës Wäerter}}: $2', |
| 954 | + 'validator-error-accepts-only-omitted' => 'De Wäert "$2" ass net valabel fir de Parameter $1. |
| 955 | +En akzeptéiert nëmmen {{PLURAL:$5|dëse Wäert|dës Wäerter}}: $3 (an {{PLURAL:$4|een ausgeloossene Wäert|$4 ausgeloosse Wäerter}}).', |
| 956 | + 'validator_list_omitted' => "{{PLURAL:$2|De Wäert|D'Wäerter}} $1 {{PLURAL:$2|gouf|goufe}} vergiess.", |
| 957 | +); |
| 958 | + |
| 959 | +/** Macedonian (Македонски) |
| 960 | + * @author Bjankuloski06 |
| 961 | + * @author McDutchie |
| 962 | + */ |
| 963 | +$messages['mk'] = array( |
| 964 | + 'validator-desc' => 'Потврдувачот овозможува лесен начин другите додатоци да ги потврдат параметрите на парсерските функции и додатоците со ознаки, да поставаат основно зададени вредности и да создаваат пораки за грешки', |
| 965 | + 'validator-warning' => 'Предупредување: $1', |
| 966 | + 'validator-error' => 'Грешка: $1', |
| 967 | + 'validator-fatal-error' => 'Фатална грешка: $1', |
| 968 | + 'validator_error_parameters' => 'Во вашата синтакса {{PLURAL:$1|е откриена следнава грешка|се откриени следниве грешки}}:', |
| 969 | + 'validator_warning_parameters' => 'Имате {{PLURAL:$1|грешка|грешки}} во синтаксата.', |
| 970 | + 'validator-warning-adittional-errors' => '... и {{PLURAL:$1|уште еден проблем|повеќе други проблеми}}.', |
| 971 | + 'validator-error-omitted' => '{{PLURAL:$2|Изоставена е вредноста „$1“|Изоставени се вредностите „$1“}}.', |
| 972 | + 'validator-error-problem' => 'Се појави проблем со параметарот $1.', |
| 973 | + 'validator_error_unknown_argument' => '$1 не е важечки параметар.', |
| 974 | + 'validator_error_required_missing' => 'Бараниот параметар $1 не е наведен.', |
| 975 | + 'validator-error-override-argument' => 'Се обидовте да презапишете врз параметарот $1 (вредност: $2) со вредност „$3“', |
| 976 | + 'validator-listerrors-errors' => 'Грешки', |
| 977 | + 'validator-listerrors-minor' => 'Ситни', |
| 978 | + 'validator-listerrors-low' => 'Малку', |
| 979 | + 'validator-listerrors-normal' => 'Нормално', |
| 980 | + 'validator-listerrors-high' => 'Многу', |
| 981 | + 'validator-listerrors-fatal' => 'Фатални', |
| 982 | + 'validator_error_empty_argument' => 'Параметарот $1 не може да има празна вредност.', |
| 983 | + 'validator_error_must_be_number' => 'Параметарот $1 може да биде само број.', |
| 984 | + 'validator_error_must_be_integer' => 'Параметарот $1 може да биде само цел број.', |
| 985 | + 'validator-error-must-be-float' => 'Параметарот $1 може да биде само број со подвижна точка.', |
| 986 | + 'validator_error_invalid_range' => 'Параметарот $1 мора да изнесува помеѓу $2 и $3.', |
| 987 | + 'validator-error-invalid-regex' => 'Параметарот $1 мора да се совпаѓа со следниов регуларен израз: $2.', |
| 988 | + 'validator-error-invalid-length' => 'Параметарот $1 мора да има должина од $2.', |
| 989 | + 'validator-error-invalid-length-range' => 'Должината на параметарот параметарот $1 мора да изнесува помеѓу $2 и $3.', |
| 990 | + 'validator_error_invalid_argument' => 'Вредноста $1 е неважечка за параметарот $2.', |
| 991 | + 'validator_list_error_empty_argument' => 'Параметарот $1 не прифаќа празни вредности.', |
| 992 | + 'validator_list_error_must_be_number' => 'Параметарот $1 може да содржи само бројки.', |
| 993 | + 'validator_list_error_must_be_integer' => 'Параметарот $1 може да содржи само цели броеви.', |
| 994 | + 'validator-list-error-must-be-float' => 'Параметарот $1 може да содржи само подвижни бинарни точки.', |
| 995 | + 'validator_list_error_invalid_range' => 'Сите вредности на параметарот $1 мора да бидат помеѓу $2 и $3.', |
| 996 | + 'validator-list-error-invalid-regex' => 'Сите вредности на параметарот $1 мора да се совпаднат со следниов регуларен израз: $2.', |
| 997 | + 'validator_list_error_invalid_argument' => 'Една или повеќе вредности на параметарот $1 се неважечки.', |
| 998 | + 'validator-list-error-accepts-only' => 'Параметарот $1 има една или повеќе неважечки вредности. |
| 999 | +Се {{PLURAL:$3|прифаќа само следнава вредност|прифаќаат само следниве вредности}}: $2.', |
| 1000 | + 'validator-list-error-accepts-only-omitted' => 'Параметарот $1 има една или повеќе неважечки вредности. |
| 1001 | +Се {{PLURAL:$3|прифаќа само следнава вредност|прифаќаат само следниве вредности}}: $2 (и $4 {{PLURAL:$4|изоставена вредност|изоставени вредности}}).', |
| 1002 | + 'validator_error_accepts_only' => 'Вредноста „$4“ е неважечка за параметарот $1. Се {{PLURAL:$3|прифаќа само следнава вредност|прифаќаат само следниве вредности}}: $2.', |
| 1003 | + 'validator-error-accepts-only-omitted' => 'Вредноста „$2“ не е важечка за параметарот $1. Се прифаќаат само следниве вредности: $3 (и $4 изоставени вредности).', |
| 1004 | + 'validator_list_omitted' => '{{PLURAL:$2|Вредноста|Вредностите}} $1 {{PLURAL:$2|беше испуштена|беа испуштени}}.', |
| 1005 | +); |
| 1006 | + |
| 1007 | +/** Dutch (Nederlands) |
| 1008 | + * @author Jeroen De Dauw |
| 1009 | + * @author Siebrand |
| 1010 | + */ |
| 1011 | +$messages['nl'] = array( |
| 1012 | + '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', |
| 1013 | + 'validator-warning' => 'Waarschuwing: $1', |
| 1014 | + 'validator-error' => 'Fout: $1', |
| 1015 | + 'validator-fatal-error' => 'Onherstelbare fout: $1', |
| 1016 | + 'validator_error_parameters' => 'In uw syntaxis {{PLURAL:$1|is de volgende fout|zijn de volgende fouten}} gedetecteerd:', |
| 1017 | + 'validator_warning_parameters' => 'Er {{PLURAL:$1|zit een fout|zitten $1 fouten}} in uw syntaxis.', |
| 1018 | + 'validator-warning-adittional-errors' => '... en nog {{PLURAL:$1|een ander probleem|$1 andere problemen}}.', |
| 1019 | + 'validator-error-omitted' => 'De {{PLURAL:$2|waarde "$1" mist|waarden "$1" missen}}.', |
| 1020 | + 'validator-error-problem' => 'Er was een probleem met de parameter $1.', |
| 1021 | + 'validator_error_unknown_argument' => '$1 is geen geldige parameter.', |
| 1022 | + 'validator_error_required_missing' => 'De verplichte parameter $1 is niet opgegeven.', |
| 1023 | + 'validator-error-override-argument' => 'Geprobeerd de parameter $1 (waarde: $2) te overschrijven met waarde "$3".', |
| 1024 | + 'validator-listerrors-errors' => 'Fouten', |
| 1025 | + 'validator-listerrors-minor' => 'Overkomelijk', |
| 1026 | + 'validator-listerrors-low' => 'Laag', |
| 1027 | + 'validator-listerrors-normal' => 'Gemiddeld', |
| 1028 | + 'validator-listerrors-high' => 'Groot', |
| 1029 | + 'validator-listerrors-fatal' => 'Fataal', |
| 1030 | + 'validator_error_empty_argument' => 'De parameter $1 mag niet leeg zijn.', |
| 1031 | + 'validator_error_must_be_number' => 'De parameter $1 mag alleen een getal zijn.', |
| 1032 | + 'validator_error_must_be_integer' => 'De parameter $1 kan alleen een heel getal zijn.', |
| 1033 | + 'validator-error-must-be-float' => 'Parameter $1 kan alleen een getal met decimalen zijn.', |
| 1034 | + 'validator_error_invalid_range' => 'De parameter $1 moet tussen $2 en $3 liggen.', |
| 1035 | + 'validator-error-invalid-regex' => 'De parameter $1 moet voldoen aan deze reguliere expressie: $2.', |
| 1036 | + 'validator-error-invalid-length' => 'Parameter $1 moet een lengte hebben van $2.', |
| 1037 | + 'validator-error-invalid-length-range' => 'Parameter $1 moet een lengte hebben tussen $2 en $3.', |
| 1038 | + 'validator_error_invalid_argument' => 'De waarde $1 is niet geldig voor de parameter $2.', |
| 1039 | + 'validator_list_error_empty_argument' => 'Voor de parameter $1 zijn lege waarden niet toegestaan.', |
| 1040 | + 'validator_list_error_must_be_number' => 'Voor de parameter $1 zijn alleen getallen toegestaan.', |
| 1041 | + 'validator_list_error_must_be_integer' => 'Voor de parameter $1 zijn alleen hele getallen toegestaan.', |
| 1042 | + 'validator-list-error-must-be-float' => 'Voor de parameter $1 zijn alleen getallen met drijvende komma toegestaan.', |
| 1043 | + 'validator_list_error_invalid_range' => 'Alle waarden voor de parameter $1 moeten tussen $2 en $3 liggen.', |
| 1044 | + 'validator-list-error-invalid-regex' => 'Alle waarden voor de parameter $1 moeten voldoen aan deze reguliere expressie: $2.', |
| 1045 | + 'validator_list_error_invalid_argument' => 'Een of meerdere waarden voor de parameter $1 zijn ongeldig.', |
| 1046 | + 'validator-list-error-accepts-only' => 'Een of meer waarden voor de parameter $1 zijn ongeldig. |
| 1047 | +Alleen deze {{PLURAL:$3|waarde is|waarden zijn}} toegestaan: $2.', |
| 1048 | + 'validator-list-error-accepts-only-omitted' => 'Een of meer waarden voor de parameter $1 zijn ongeldig. |
| 1049 | +Alleen deze {{PLURAL:$3|waarde is|waarden zijn}} toegestaan: $2. |
| 1050 | +Als ook $4 weggelaten {{PLURAL:$4|waarde|waarden}}.', |
| 1051 | + 'validator_error_accepts_only' => 'De waarde "$4" is ongeldig voor parameter $1. Deze kan alleen de volgende {{PLURAL:$3|waarde|waarden}} hebben: $2.', |
| 1052 | + 'validator-error-accepts-only-omitted' => 'De waarde "$2" is niet geldig voor de parameter $1. |
| 1053 | +Alleen deze {{PLURAL:$5|waarde is|waarden zijn}} toegestaan: $3. |
| 1054 | +Als ook $4 weggelaten {{PLURAL:$4|waarde|waarden}}.', |
| 1055 | + 'validator_list_omitted' => 'De {{PLURAL:$2|waarde|waarden}} $1 {{PLURAL:$2|mist|missen}}.', |
| 1056 | +); |
| 1057 | + |
| 1058 | +/** Norwegian (bokmål) (Norsk (bokmål)) |
| 1059 | + * @author Jon Harald Søby |
| 1060 | + * @author Nghtwlkr |
| 1061 | + */ |
| 1062 | +$messages['no'] = array( |
| 1063 | + 'validator-desc' => 'Gir generisk støtte for parameterhåndtering for andre utvidelser', |
| 1064 | + 'validator-warning' => 'Advarsel: $1', |
| 1065 | + 'validator-error' => 'Feil: $1', |
| 1066 | + 'validator-fatal-error' => 'Kritisk feil: $1', |
| 1067 | + 'validator_error_parameters' => 'Følgende {{PLURAL:$1|feil|feil}} har blitt oppdaget i syntaksen din:', |
| 1068 | + 'validator_warning_parameters' => 'Det er {{PLURAL:$1|én feil|flere feil}} i syntaksen din.', |
| 1069 | + 'validator-warning-adittional-errors' => '... og {{PLURAL:$1|ett problem til|flere problem}}.', |
| 1070 | + 'validator-error-omitted' => '{{PLURAL:$2|Verdien|Verdiene}} «$1» har blitt utelatt.', |
| 1071 | + 'validator-error-problem' => 'Det var et problem med parameteren $1.', |
| 1072 | + 'validator_error_unknown_argument' => '$1 er ikke en gyldig parameter.', |
| 1073 | + 'validator_error_required_missing' => 'Den nødvendige parameteren «$1» er ikke angitt.', |
| 1074 | + 'validator-error-override-argument' => 'Prøvde å overkjøre parameter $1 (verdi: $2) med verdien «$3»', |
| 1075 | + 'validator-listerrors-errors' => 'Feil', |
| 1076 | + 'validator-listerrors-minor' => 'Mindre', |
| 1077 | + 'validator-listerrors-low' => 'Lav', |
| 1078 | + 'validator-listerrors-normal' => 'Normal', |
| 1079 | + 'validator-listerrors-high' => 'Høy', |
| 1080 | + 'validator-listerrors-fatal' => 'Kritisk', |
| 1081 | + 'validator_error_empty_argument' => 'Parameteren $1 kan ikke ha en tom verdi.', |
| 1082 | + 'validator_error_must_be_number' => 'Parameteren $1 må være et tall.', |
| 1083 | + 'validator_error_must_be_integer' => 'Parameteren $1 må være et heltall.', |
| 1084 | + 'validator-error-must-be-float' => 'Parameter $1 må være et flyttall.', |
| 1085 | + 'validator_error_invalid_range' => 'Parameter $1 må være mellom $2 og $3.', |
| 1086 | + 'validator-error-invalid-regex' => 'Parameteren $1 må samsvare med dette regulære uttrykket: $2.', |
| 1087 | + 'validator-error-invalid-length' => 'Parameter $1 må ha en lengde på $2.', |
| 1088 | + 'validator-error-invalid-length-range' => 'Parameter $1 må ha en lengde mellom $2 og $3.', |
| 1089 | + 'validator_error_invalid_argument' => 'Verdien $1 er ikke gyldig for parameter $2.', |
| 1090 | + 'validator_list_error_empty_argument' => 'Parameteren $1 godtar ikke tomme verdier.', |
| 1091 | + 'validator_list_error_must_be_number' => 'Parameteren $1 kan bare inneholde tall.', |
| 1092 | + 'validator_list_error_must_be_integer' => 'Parameteren $1 kan bare inneholde heltall.', |
| 1093 | + 'validator-list-error-must-be-float' => 'Parameteren $1 kan bare innholde flyttall.', |
| 1094 | + 'validator_list_error_invalid_range' => 'Alle verdier av parameteren $1 må være mellom $2 og $3.', |
| 1095 | + 'validator-list-error-invalid-regex' => 'Alle verdier av parameteren $1 må samsvare med dette regulære uttrykket: $2.', |
| 1096 | + 'validator_list_error_invalid_argument' => 'Parameteren $1 har en eller flere ugyldige verdier.', |
| 1097 | + 'validator-list-error-accepts-only' => 'En eller flere verdier for parameteren $1 er ugyldige. |
| 1098 | +Den godtar bare {{PLURAL:$3|denne verdien|disse verdiene}}: $2.', |
| 1099 | + 'validator-list-error-accepts-only-omitted' => 'En eller flere verdier for parameteren $1 er ugyldige. |
| 1100 | +Den godtar bare {{PLURAL:$3|denne verdien|disse verdiene}}: $2 (og $4 {{PLURAL:$4|utelatt verdi|utelatte verdier}}).', |
| 1101 | + 'validator_error_accepts_only' => 'Verdien «$4» er ikke gyldig for parameteren $1. Den aksepterer kun {{PLURAL:$3|denne verdien|disse verdiene}}: $2.', |
| 1102 | + 'validator-error-accepts-only-omitted' => 'Verdien «$2» er ikke gyldig for parameteren $1. |
| 1103 | +Den godtar bare {{PLURAL:$5|denne verdien|disse verdiene}}: $3 (og $4 {{PLURAL:$4|utelatt verdi|utelatte verdier}}).', |
| 1104 | + 'validator_list_omitted' => '{{PLURAL:$2|Verdien|Verdiene}} $1 har blitt utelatt.', |
| 1105 | +); |
| 1106 | + |
| 1107 | +/** Occitan (Occitan) |
| 1108 | + * @author Cedric31 |
| 1109 | + * @author Jfblanc |
| 1110 | + */ |
| 1111 | +$messages['oc'] = array( |
| 1112 | + '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", |
| 1113 | + 'validator_error_parameters' => '{{PLURAL:$1|Aquela error es estada detectada|Aquelas errors son estadas detectadas}} dins la sintaxi', |
| 1114 | + 'validator_error_unknown_argument' => '$1 es pas un paramètre valedor.', |
| 1115 | + 'validator_error_required_missing' => "Manca lo paramètre $1 qu'es obligatòri.", |
| 1116 | + 'validator_error_empty_argument' => 'Lo paramètre $1 pòt pas estar voide.', |
| 1117 | + 'validator_error_must_be_number' => 'Lo paramètre $1 deu èsser un nombre.', |
| 1118 | + 'validator_error_must_be_integer' => 'Lo paramètre $1 deu èsser un nombre entièr.', |
| 1119 | + 'validator_error_invalid_range' => 'Lo paramètre $1 deu èsser entre $2 e $3.', |
| 1120 | + 'validator_error_invalid_argument' => '$1 es pas valedor pel paramètre $2.', |
| 1121 | + 'validator_error_accepts_only' => 'Sonque {{PLURAL:$3|aquela valor es valedora|aquelas valors son valedoras}}pel paramètre $1 : $2.', |
| 1122 | +); |
| 1123 | + |
| 1124 | +/** Polish (Polski) |
| 1125 | + * @author Fizykaa |
| 1126 | + * @author Sp5uhe |
| 1127 | + */ |
| 1128 | +$messages['pl'] = array( |
| 1129 | + 'validator-desc' => 'Dostarcza innym rozszerzeniom ogólną obsługę parametrów', |
| 1130 | + 'validator-warning' => 'Uwaga – $1', |
| 1131 | + 'validator-error' => 'Błąd – $1', |
| 1132 | + 'validator-fatal-error' => 'Błąd krytyczny – $1', |
| 1133 | + '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:', |
| 1134 | + 'validator_warning_parameters' => 'W Twoim kodzie {{PLURAL:$1|wystąpił błąd|wystąpiły błędy}} składni.', |
| 1135 | + 'validator-warning-adittional-errors' => '... i {{PLURAL:$1|jeszcze jeden problem|wiele więcej problemów}}.', |
| 1136 | + 'validator-error-omitted' => '{{PLURAL:$2|Wartość „$1” została pominięta|Wartości „$1” zostały pominięte}}.', |
| 1137 | + 'validator-error-problem' => 'Wystąpił problem z parametrem $1.', |
| 1138 | + 'validator_error_unknown_argument' => '$1 jest niepoprawnym parametrem.', |
| 1139 | + 'validator_error_required_missing' => 'Obowiązkowy parametr $1 nie został przekazany.', |
| 1140 | + 'validator-error-override-argument' => 'Próba nadpisania parametru $1 o wartości „$2” nową wartością „$3”', |
| 1141 | + 'validator-listerrors-errors' => 'Błędy', |
| 1142 | + 'validator-listerrors-minor' => 'Nieistotny', |
| 1143 | + 'validator-listerrors-low' => 'Mało istotny', |
| 1144 | + 'validator-listerrors-normal' => 'Typowy', |
| 1145 | + 'validator-listerrors-high' => 'Istotny', |
| 1146 | + 'validator-listerrors-fatal' => 'Krytyczny', |
| 1147 | + 'validator_error_empty_argument' => 'Parametr $1 nie może być pusty.', |
| 1148 | + 'validator_error_must_be_number' => 'Parametr $1 musi być liczbą.', |
| 1149 | + 'validator_error_must_be_integer' => 'Parametr $1 musi być liczbą całkowitą.', |
| 1150 | + 'validator-error-must-be-float' => 'Parametr $1 musi być liczbą rzeczywistą.', |
| 1151 | + 'validator_error_invalid_range' => 'Parametr $1 musi zawierać się w przedziale od $2 do $3.', |
| 1152 | + 'validator-error-invalid-regex' => 'Parametr $1 musi pasować do wyrażenia regularnego $2.', |
| 1153 | + 'validator-error-invalid-length' => 'Parametr $1 musi mieć długość $2.', |
| 1154 | + 'validator-error-invalid-length-range' => 'Długość parametru $1 musi zawierać się w przedziale od $2 do $3.', |
| 1155 | + 'validator_error_invalid_argument' => 'Nieprawidłowa wartość $1 parametru $2.', |
| 1156 | + 'validator_list_error_empty_argument' => 'Parametr $1 nie może być pusty.', |
| 1157 | + 'validator_list_error_must_be_number' => 'Parametrem $1 mogą być wyłącznie liczby.', |
| 1158 | + 'validator_list_error_must_be_integer' => 'Parametrem $1 mogą być wyłącznie liczby całkowite.', |
| 1159 | + 'validator-list-error-must-be-float' => 'Parametrem $1 mogą być wyłącznie liczby rzeczywiste.', |
| 1160 | + 'validator_list_error_invalid_range' => 'Wartości parametru $1 muszą zawierać się w przedziale od $2 do $3.', |
| 1161 | + 'validator-list-error-invalid-regex' => 'Wszystkie wartości parametru $1 muszą pasować do wyrażenia regularnego $2.', |
| 1162 | + 'validator_list_error_invalid_argument' => 'Przynajmniej jedna wartość parametru $1 jest nieprawidłowa.', |
| 1163 | + 'validator-list-error-accepts-only' => 'Jedna lub więcej wartości parametru $1 są nieprawidłowe. |
| 1164 | +Może przyjmować wyłącznie {{PLURAL:$3|wartość|wartości:}} $2.', |
| 1165 | + 'validator-list-error-accepts-only-omitted' => 'Jedna lub więcej wartości parametru $1 są nieprawidłowe. |
| 1166 | +Może przyjmować wyłącznie {{PLURAL:$3|wartość|wartości:}} $2 (oraz $4 {{PLURAL:$4|pominiętą wartość|pominięte wartości|pominiętych wartości}}).', |
| 1167 | + 'validator_error_accepts_only' => 'Wartość „$4” jest nieprawidłowa dla parametru $1. {{PLURAL:$3|Dopuszczalna jest wyłącznie wartość|Dopuszczalne są wyłącznie wartości:}} $2.', |
| 1168 | + 'validator-error-accepts-only-omitted' => 'Wartość „$2” parametru $1 jest nieprawidłowa. |
| 1169 | +Parametr może przyjmować wyłącznie {{PLURAL:$5|wartość|wartości:}} $3 (oraz $4 {{PLURAL:$4|pominiętą wartość|pominięte wartości|pominiętych wartości}}).', |
| 1170 | + 'validator_list_omitted' => '{{PLURAL:$2|Parametr|Parametry}} $1 {{PLURAL:$2|został opuszczony|zostały opuszczone}}.', |
| 1171 | +); |
| 1172 | + |
| 1173 | +/** Piedmontese (Piemontèis) |
| 1174 | + * @author Borichèt |
| 1175 | + * @author Dragonòt |
| 1176 | + * @author McDutchie |
| 1177 | + */ |
| 1178 | +$messages['pms'] = array( |
| 1179 | + '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", |
| 1180 | + 'validator-warning' => 'Avis: $1', |
| 1181 | + 'validator-error' => 'Eror: $1', |
| 1182 | + 'validator-fatal-error' => 'Eror Fatal: $1', |
| 1183 | + '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:", |
| 1184 | + 'validator_warning_parameters' => "{{PLURAL:$1|A-i é n'|A-i son dj'}}eror ant soa sintassi.", |
| 1185 | + 'validator-warning-adittional-errors' => "... e {{PLURAL:$1|ëdcò n'àutr problema|vàire àutri problema}}.", |
| 1186 | + 'validator-error-omitted' => '{{PLURAL:$2|Ël valor "$1" a l\'é|Ij valor "$1" a son}} stàit sautà.', |
| 1187 | + 'validator-error-problem' => 'A-i é staje un problema con ël paràmetr $1.', |
| 1188 | + 'validator_error_unknown_argument' => "$1 a l'é un paràmetr pa bon.", |
| 1189 | + 'validator_error_required_missing' => "Ël paràmetr obligatòri $1 a l'é pa dàit.", |
| 1190 | + 'validator-error-override-argument' => 'Provà a coaté ël paràmetr $1 (valor: $2) con ël valor "$3"', |
| 1191 | + 'validator-listerrors-errors' => 'Eror', |
| 1192 | + 'validator-listerrors-minor' => 'Pi cit', |
| 1193 | + 'validator-listerrors-low' => 'Bass', |
| 1194 | + 'validator-listerrors-normal' => 'Normal', |
| 1195 | + 'validator-listerrors-high' => 'Àut', |
| 1196 | + 'validator-listerrors-fatal' => 'Fatal', |
| 1197 | + 'validator_error_empty_argument' => 'Ël paràmetr $1 a peul pa avèj un valor veuid.', |
| 1198 | + 'validator_error_must_be_number' => 'Ël paràmetr $1 a peul mach esse un nùmer.', |
| 1199 | + 'validator_error_must_be_integer' => "Ël paràmetr $1 a peul mach esse n'antregh.", |
| 1200 | + 'validator-error-must-be-float' => 'Ël paràmetr $1 a peul mach esse un nùmer an vìrgola mòbil.', |
| 1201 | + 'validator_error_invalid_range' => 'Ël paràmetr $1 a deuv esse an tra $2 e $3.', |
| 1202 | + 'validator-error-invalid-regex' => 'Ël paràmetr $1 a dev cobiesse con sta espression regolar: $2.', |
| 1203 | + 'validator-error-invalid-length' => 'Ël paràmetr $1 a dev avèj na longheur ëd $2.', |
| 1204 | + 'validator-error-invalid-length-range' => 'Ël paràmetr $1 a dev avèj na longheur antra $2 e $3.', |
| 1205 | + 'validator_error_invalid_argument' => "Ël valor $1 a l'é pa bon për ël paràmetr $2.", |
| 1206 | + 'validator_list_error_empty_argument' => 'Ël paràmetr $1 a aceta pa dij valor veuid.', |
| 1207 | + 'validator_list_error_must_be_number' => 'Ël paràmetr $1 a peul mach conten-e dij nùmer.', |
| 1208 | + 'validator_list_error_must_be_integer' => "Ël paràmetr $1 a peul mach conten-e dj'antegr.", |
| 1209 | + 'validator-list-error-must-be-float' => 'Ël paràmetr $1 a peul mach conten-e dij nùmer con vìrgola.', |
| 1210 | + 'validator_list_error_invalid_range' => 'Tùit ij valor dël paràmetr $1 a deuvo esse tra $2 e $3.', |
| 1211 | + 'validator-list-error-invalid-regex' => 'Tùit ij valor dël paràmetr $1 a devo cobiesse con sta espression regolar: $2.', |
| 1212 | + 'validator_list_error_invalid_argument' => 'Un o pi valor dël paràmetr $1 a son pa bon.', |
| 1213 | + 'validator-list-error-accepts-only' => 'Un o pi valor për ël paràmetr $1 a son pa bon. |
| 1214 | +A aceta mach {{PLURAL:$3|sto valor|sti valor}}: $2.', |
| 1215 | + 'validator-list-error-accepts-only-omitted' => 'Un o pi valor për ël paràmetr $1 a son pa bon. |
| 1216 | +A aceta mach {{PLURAL:$3|sto valor|sti valor}}: $2 (e $4 {{PLURAL:$4|valor|valor}} sautà).', |
| 1217 | + 'validator_error_accepts_only' => 'Ël valor "$4" a l\'é pa bon për ël paràmetr $1. A aceta mach {{PLURAL:$3|sto valor-sì|sti valor-sì}}: $2.', |
| 1218 | + 'validator-error-accepts-only-omitted' => 'Ël valor "$2" a l\'é pa bon për ël paràmetr $1. A aceta mach sti valor: $3 (e ij valor pa butà $4).', |
| 1219 | + 'validator_list_omitted' => "{{PLURAL:$2|Ël valor|Ij valor}} $1 {{PLURAL:$2|a l'é|a son}} pa stàit butà.", |
| 1220 | +); |
| 1221 | + |
| 1222 | +/** Portuguese (Português) |
| 1223 | + * @author Giro720 |
| 1224 | + * @author Hamilton Abreu |
| 1225 | + * @author Waldir |
| 1226 | + */ |
| 1227 | +$messages['pt'] = array( |
| 1228 | + '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', |
| 1229 | + 'validator-warning' => 'Aviso: $1', |
| 1230 | + 'validator-error' => 'Erro: $1', |
| 1231 | + 'validator-fatal-error' => 'Erro fatal: $1', |
| 1232 | + 'validator_error_parameters' => '{{PLURAL:$1|Foi detectado o seguinte erro sintáctico|Foram detectados os seguintes erros sintácticos}}:', |
| 1233 | + 'validator_warning_parameters' => '{{PLURAL:$1|Existe um erro sintáctico|Existem erros sintácticos}}.', |
| 1234 | + 'validator-warning-adittional-errors' => '... e {{PLURAL:$1|mais um problema|vários outros problemas}}.', |
| 1235 | + 'validator-error-omitted' => '{{PLURAL:$2|O valor "$1" foi omitido|Os valores "$1" foram omitidos}}.', |
| 1236 | + 'validator-error-problem' => 'Houve um problema com o parâmetro $1.', |
| 1237 | + 'validator_error_unknown_argument' => '$1 não é um parâmetro válido.', |
| 1238 | + 'validator_error_required_missing' => 'O parâmetro obrigatório $1 não foi fornecido.', |
| 1239 | + 'validator-error-override-argument' => 'Tentativa de sobrepor o parâmetro $1 (valor: $2) com o valor "$3"', |
| 1240 | + 'validator-listerrors-errors' => 'Erros', |
| 1241 | + 'validator-listerrors-minor' => 'Menor', |
| 1242 | + 'validator-listerrors-low' => 'Baixo', |
| 1243 | + 'validator-listerrors-normal' => 'Normal', |
| 1244 | + 'validator-listerrors-high' => 'Alto', |
| 1245 | + 'validator-listerrors-fatal' => 'Fatal', |
| 1246 | + 'validator_error_empty_argument' => 'O parâmetro $1 não pode estar vazio.', |
| 1247 | + 'validator_error_must_be_number' => 'O parâmetro $1 só pode ser numérico.', |
| 1248 | + 'validator_error_must_be_integer' => 'O parâmetro $1 só pode ser um número inteiro.', |
| 1249 | + 'validator-error-must-be-float' => 'O parâmetro $1 só pode ser um número de vírgula flutuante.', |
| 1250 | + 'validator_error_invalid_range' => 'O parâmetro $1 tem de ser entre $2 e $3.', |
| 1251 | + 'validator-error-invalid-regex' => 'O parâmetro $1 deve corresponder à expressão regular: $2.', |
| 1252 | + 'validator-error-invalid-length' => 'O parâmetro $1 tem de ter um comprimento de $2.', |
| 1253 | + 'validator-error-invalid-length-range' => 'O parâmetro $1 tem de ter um comprimento entre $2 e $3.', |
| 1254 | + 'validator_error_invalid_argument' => 'O valor $1 não é válido para o parâmetro $2.', |
| 1255 | + 'validator_list_error_empty_argument' => 'O parâmetro $1 não pode estar vazio.', |
| 1256 | + 'validator_list_error_must_be_number' => 'O parâmetro $1 só pode ser numérico.', |
| 1257 | + 'validator_list_error_must_be_integer' => 'O parâmetro $1 só pode ser um número inteiro.', |
| 1258 | + 'validator-list-error-must-be-float' => 'O parâmetro $1 só pode conter valores de vírgula flutuante.', |
| 1259 | + 'validator_list_error_invalid_range' => 'Todos os valores do parâmetro $1 têm de ser entre $2 e $3.', |
| 1260 | + 'validator-list-error-invalid-regex' => 'Todos os valores do parâmetro $1 devem corresponder à expressão regular: $2.', |
| 1261 | + 'validator_list_error_invalid_argument' => 'Um ou mais valores do parâmetro $1 são inválidos.', |
| 1262 | + 'validator-list-error-accepts-only' => 'Um ou mais valores para o parâmetro $1 são inválidos. |
| 1263 | +Só {{PLURAL:$3|é aceite este valor|são aceites estes valores}}: $2.', |
| 1264 | + 'validator-list-error-accepts-only-omitted' => 'Um ou mais valores para o parâmetro $1 são inválidos. |
| 1265 | +Só {{PLURAL:$3|é aceite este valor|são aceites estes valores}}: $2 (e $4 {{PLURAL:$4|valor omitido|valores omitidos}}).', |
| 1266 | + 'validator_error_accepts_only' => 'O valor "$4" não é válido para o parâmetro $1. O parâmetro só aceita {{PLURAL:$3|este valor|estes valores}}: $2.', |
| 1267 | + 'validator-error-accepts-only-omitted' => 'O valor $2 não é válido para o parâmetro $1. |
| 1268 | +Só {{PLURAL:$5|é aceite este valor|são aceites estes valores}}: $3 (e $4 {{PLURAL:$4|valor omitido|valores omitidos}}).', |
| 1269 | + 'validator_list_omitted' => '{{PLURAL:$2|O valor $1 foi omitido|Os valores $1 foram omitidos}}.', |
| 1270 | +); |
| 1271 | + |
| 1272 | +/** Brazilian Portuguese (Português do Brasil) |
| 1273 | + * @author Giro720 |
| 1274 | + * @author Luckas Blade |
| 1275 | + */ |
| 1276 | +$messages['pt-br'] = array( |
| 1277 | + 'validator-desc' => 'Fornece suporte a manipulação de parâmetros genéricos para outras extensões', |
| 1278 | + 'validator-warning' => 'Atenção: $1', |
| 1279 | + 'validator-error' => 'Erro: $1', |
| 1280 | + 'validator-fatal-error' => 'Erro crítico: $1', |
| 1281 | + 'validator_error_parameters' => '{{PLURAL:$1|Foi detectado o seguinte erro sintáctico|Foram detectados os seguintes erros sintácticos}}:', |
| 1282 | + 'validator_warning_parameters' => '{{PLURAL:$1|Existe um erro|Existem erros}} em sua sintaxe.', |
| 1283 | + 'validator-warning-adittional-errors' => '... e {{PLURAL:$1|mais um problema|vários outros problemas}}.', |
| 1284 | + 'validator-error-omitted' => '{{PLURAL:$2|O valor "$1" foi omitido|Os valores "$1" foram omitidos}}.', |
| 1285 | + 'validator-error-problem' => 'Houve um problema com o parâmetro $1.', |
| 1286 | + 'validator_error_unknown_argument' => '$1 não é um parâmetro válido.', |
| 1287 | + 'validator_error_required_missing' => 'O parâmetro obrigatório $1 não foi fornecido.', |
| 1288 | + 'validator-error-override-argument' => 'Tentativa de sobrepor o parâmetro $1 (valor: $2) com o valor "$3"', |
| 1289 | + 'validator-listerrors-errors' => 'Erros', |
| 1290 | + 'validator-listerrors-minor' => 'Menor', |
| 1291 | + 'validator-listerrors-low' => 'Baixo', |
| 1292 | + 'validator-listerrors-normal' => 'Normal', |
| 1293 | + 'validator-listerrors-high' => 'Alto', |
| 1294 | + 'validator-listerrors-fatal' => 'Fatal', |
| 1295 | + 'validator_error_empty_argument' => 'O parâmetro $1 não pode estar vazio.', |
| 1296 | + 'validator_error_must_be_number' => 'O parâmetro $1 só pode ser numérico.', |
| 1297 | + 'validator_error_must_be_integer' => 'O parâmetro $1 só pode ser um número inteiro.', |
| 1298 | + 'validator-error-must-be-float' => 'O parâmetro $1 deve ser um número de ponto flutuante.', |
| 1299 | + 'validator_error_invalid_range' => 'O parâmetro $1 tem de ser entre $2 e $3.', |
| 1300 | + 'validator-error-invalid-regex' => 'O parâmetro $1 deve corresponder à expressão regular: $2.', |
| 1301 | + 'validator-error-invalid-length' => 'O parâmetro $1 deve ter um comprimento de $2.', |
| 1302 | + 'validator-error-invalid-length-range' => 'O parâmetro $1 deve ter um comprimento entre $2 e $3.', |
| 1303 | + 'validator_error_invalid_argument' => 'O valor $1 não é válido para o parâmetro $2.', |
| 1304 | + 'validator_list_error_empty_argument' => 'O parâmetro $1 não pode estar vazio.', |
| 1305 | + 'validator_list_error_must_be_number' => 'O parâmetro $1 só pode ser numérico.', |
| 1306 | + 'validator_list_error_must_be_integer' => 'O parâmetro $1 só pode ser um número inteiro.', |
| 1307 | + 'validator-list-error-must-be-float' => 'O parâmetro $1 só pode conter valores de ponto flutuante.', |
| 1308 | + 'validator_list_error_invalid_range' => 'Todos os valores do parâmetro $1 têm de ser entre $2 e $3.', |
| 1309 | + 'validator-list-error-invalid-regex' => 'Todos os valores do parâmetro $1 devem corresponder à expressão regular: $2.', |
| 1310 | + 'validator_list_error_invalid_argument' => 'Um ou mais valores do parâmetro $1 são inválidos.', |
| 1311 | + 'validator-list-error-accepts-only' => 'Um ou mais valores para o parâmetro $1 são inválidos. |
| 1312 | +Só {{PLURAL:$3|é aceite este valor|são aceites estes valores}}: $2.', |
| 1313 | + 'validator-list-error-accepts-only-omitted' => 'Um ou mais valores para o parâmetro $1 são inválidos. |
| 1314 | +Só {{PLURAL:$3|é aceite este valor|são aceites estes valores}}: $2 (e $4 {{PLURAL:$4|valor omitido|valores omitidos}}).', |
| 1315 | + 'validator_error_accepts_only' => 'O valor $4 não é válido para o parâmetro $1. Esse parâmetro só aceita {{PLURAL:$3|este valor|estes valores}}: $2.', |
| 1316 | + 'validator-error-accepts-only-omitted' => 'O valor $2 não é válido para o parâmetro $1. |
| 1317 | +Só {{PLURAL:$5|é aceite este valor|são aceites estes valores}}: $3 (e $4 {{PLURAL:$4|valor omitido|valores omitidos}}).', |
| 1318 | + 'validator_list_omitted' => '{{PLURAL:$2|O valor $1 foi omitido|Os valores $1 foram omitidos}}.', |
| 1319 | +); |
| 1320 | + |
| 1321 | +/** Romanian (Română) |
| 1322 | + * @author Stelistcristi |
| 1323 | + */ |
| 1324 | +$messages['ro'] = array( |
| 1325 | + 'validator-warning' => 'Avertisment: $1', |
| 1326 | + 'validator-fatal-error' => 'Eroare fatală: $1', |
| 1327 | + 'validator_error_unknown_argument' => '$1 nu este un parametru valid.', |
| 1328 | + 'validator_error_required_missing' => 'Parametrul solicitat „$1” nu este furnizat.', |
| 1329 | + 'validator-listerrors-errors' => 'Erori', |
| 1330 | + 'validator_error_empty_argument' => 'Parametrul $1 nu poate avea o valoare goală.', |
| 1331 | + 'validator_error_must_be_number' => 'Parametrul $1 poate fi doar un număr.', |
| 1332 | + 'validator_error_must_be_integer' => 'Parametrul $1 poate fi doar un număr întreg.', |
| 1333 | +); |
| 1334 | + |
| 1335 | +/** Russian (Русский) |
| 1336 | + * @author Aleksandrit |
| 1337 | + * @author Eleferen |
| 1338 | + * @author Lockal |
| 1339 | + * @author MaxSem |
| 1340 | + * @author McDutchie |
| 1341 | + * @author Александр Сигачёв |
| 1342 | + */ |
| 1343 | +$messages['ru'] = array( |
| 1344 | + 'validator-desc' => 'Валидатор предоставляет другим расширениям возможности проверки параметров функций парсера и тегов, установки значения по умолчанию и создания сообщения об ошибках', |
| 1345 | + 'validator-warning' => 'Внимание: $1', |
| 1346 | + 'validator-error' => 'Ошибка: $1', |
| 1347 | + 'validator-fatal-error' => 'Критическая ошибка: $1', |
| 1348 | + 'validator_error_parameters' => 'В вашем синтаксисе {{PLURAL:$1|обнаружена следующая ошибка|обнаружены следующие ошибки}}:', |
| 1349 | + 'validator_warning_parameters' => 'В вашем синтаксисе {{PLURAL:$1|имеется ошибка|имеются ошибки}}.', |
| 1350 | + 'validator-warning-adittional-errors' => '… и {{PLURAL:$1|ещё одна проблема|ещё несколько проблем}}.', |
| 1351 | + 'validator-error-omitted' => '{{PLURAL:$2|Значение «$1» пропущено|Значения «$1» пропущены}}.', |
| 1352 | + 'validator-error-problem' => 'Обнаружена проблема с параметром «$1».', |
| 1353 | + 'validator_error_unknown_argument' => '$1 не является допустимым параметром.', |
| 1354 | + 'validator_error_required_missing' => 'Не указан обязательный параметр $1.', |
| 1355 | + 'validator-error-override-argument' => 'Попытка переопределения параметра $1 (значение: $2) значением «$3»', |
| 1356 | + 'validator-listerrors-errors' => 'Ошибки', |
| 1357 | + 'validator-listerrors-minor' => 'Незначительная', |
| 1358 | + 'validator-listerrors-low' => 'Низкая', |
| 1359 | + 'validator-listerrors-normal' => 'Обычная', |
| 1360 | + 'validator-listerrors-high' => 'Высокая', |
| 1361 | + 'validator-listerrors-fatal' => 'Фатальная', |
| 1362 | + 'validator_error_empty_argument' => 'Параметр $1 не может принимать пустое значение.', |
| 1363 | + 'validator_error_must_be_number' => 'Значением параметра $1 могут быть только числа.', |
| 1364 | + 'validator_error_must_be_integer' => 'Параметр $1 может быть только целым числом.', |
| 1365 | + 'validator-error-must-be-float' => 'Параметр $1 может быть числом с плавающей точкой.', |
| 1366 | + 'validator_error_invalid_range' => 'Параметр $1 должен быть от $2 до $3.', |
| 1367 | + 'validator-error-invalid-regex' => 'Параметр «$1» должен соответствовать регулярному выражению «$2».', |
| 1368 | + 'validator-error-invalid-length' => 'Параметр $1 должен иметь длину $2.', |
| 1369 | + 'validator-error-invalid-length-range' => 'Параметр $1 должен иметь длину от $2 до $3.', |
| 1370 | + 'validator_error_invalid_argument' => 'Значение $1 не является допустимым параметром $2', |
| 1371 | + 'validator_list_error_empty_argument' => 'Параметр $1 не может принимать пустые значения.', |
| 1372 | + 'validator_list_error_must_be_number' => 'Параметр $1 может содержать только цифры.', |
| 1373 | + 'validator_list_error_must_be_integer' => 'Параметр $1 может содержать только целые числа.', |
| 1374 | + 'validator-list-error-must-be-float' => 'Параметр «$1» может содержать только числа с плавающей точкой.', |
| 1375 | + 'validator_list_error_invalid_range' => 'Все значения параметра $1 должна находиться в диапазоне от $2 до $3.', |
| 1376 | + 'validator-list-error-invalid-regex' => 'Все значения параметра «$1» должны соответствовать регулярноve выражению «$2».', |
| 1377 | + 'validator_list_error_invalid_argument' => 'Одно или несколько значений параметра $1 ошибочны.', |
| 1378 | + 'validator-list-error-accepts-only' => 'Ошибочны один или несколько значений параметра $1. |
| 1379 | +{{PLURAL:$3|Допустимо только следующее значение|Допустимы только следующие значения}}: $2.', |
| 1380 | + 'validator-list-error-accepts-only-omitted' => 'Ошибочны один или несколько значений параметра $1. |
| 1381 | +{{PLURAL:$3|Допустимо только следующее значение|Допустимы только следующие значения}}: $2 (и $4 {{PLURAL:$4|опущенное значение|опущенных значения|опущенных значений}}).', |
| 1382 | + 'validator_error_accepts_only' => 'Значение «$4» не подходит для параметра $1. Оно может принимать только {{PLURAL:$3|следующее значение|следующие значения}}: $2.', |
| 1383 | + 'validator-error-accepts-only-omitted' => 'Значение «$2» не подходит для параметра $1. |
| 1384 | +{{PLURAL:$5|Допускается только значение|Допускаются только значения}}: $3 (и $4 {{PLURAL:$4|пропущенное значение|пропущенных значения|пропущенных значений}}).', |
| 1385 | + 'validator_list_omitted' => '{{PLURAL:$2|Значение $1 было пропущено|Значения $1 были пропущены}}.', |
| 1386 | +); |
| 1387 | + |
| 1388 | +/** Sinhala (සිංහල) |
| 1389 | + * @author Calcey |
| 1390 | + */ |
| 1391 | +$messages['si'] = array( |
| 1392 | + 'validator-desc' => 'තහවුරු කරන්නා ටැග් දිඟුවන් හා parser ශ්රිතවල පරාමිතීන් තහවුරු කිරීමට අනෙක් දිඟුවන් සඳහා පහසු ක්රමයක් සපයයි,පෙරනිමි අගයන් පිහිටුවීම හා දෝෂ පණිවුඩ ජනනය කිරීම ද සිදු කරයි', |
| 1393 | + 'validator_error_parameters' => 'ඔබේ වාග් රීතිය මඟින් පහත {{PLURAL:$1|දෝෂය|දෝෂයන්}} අනාවරණය කරනු ලැබ ඇත', |
| 1394 | + 'validator_error_unknown_argument' => '$1 වලංගු පරාමිතියක් නොවේ.', |
| 1395 | + 'validator_error_required_missing' => 'අවශ්ය වන $1 පරාමිතිය සපයා නොමැත.', |
| 1396 | + 'validator_error_empty_argument' => '$1 පරාමිතියට හිස් අගයක් තිබිය නොහැක.', |
| 1397 | + 'validator_error_must_be_number' => '$1 පරාමිතිය විය හැක්කේ ඉලක්කමක් පමණි.', |
| 1398 | + 'validator_error_invalid_range' => '$1 පරාමිතිය $2 හා $3 අතර විය යුතුය.', |
| 1399 | + 'validator_error_invalid_argument' => '$2 පරාමිතිය සඳහා $1 අගය වලංගු නොවේ.', |
| 1400 | + 'validator_error_accepts_only' => '$1 පරාමිතිය විසින් පිළිගනු ලබන්නේ {{PLURAL:$3|මෙම අගය|මෙම අගයන්}}: $2 පමණි.', |
| 1401 | +); |
| 1402 | + |
| 1403 | +/** Swedish (Svenska) |
| 1404 | + * @author Fluff |
| 1405 | + * @author Ozp |
| 1406 | + * @author Per |
| 1407 | + * @author Sertion |
| 1408 | + */ |
| 1409 | +$messages['sv'] = array( |
| 1410 | + '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', |
| 1411 | + 'validator_error_parameters' => 'Följande {{PLURAL:$1|fel|fel}} har upptäckts i din syntax:', |
| 1412 | + 'validator_warning_parameters' => 'Det finns {{PLURAL:$1|ett|flera}} fel i din syntax.', |
| 1413 | + 'validator_error_unknown_argument' => '$1 är inte en giltig paramter.', |
| 1414 | + 'validator_error_required_missing' => 'Den nödvändiga parametern $1 har inte angivits.', |
| 1415 | + 'validator_error_empty_argument' => 'Parametern $1 kan inte lämnas tom.', |
| 1416 | + 'validator_error_must_be_number' => 'Parameter $1 måste bestå av ett tal.', |
| 1417 | + 'validator_error_must_be_integer' => 'Parametern $1 måste vara ett heltal.', |
| 1418 | + 'validator_error_invalid_range' => 'Parameter $1 måste vara i mellan $2 och $3.', |
| 1419 | + 'validator_error_invalid_argument' => 'Värdet $1 är inte giltigt som parameter $2.', |
| 1420 | + 'validator_list_error_empty_argument' => 'Parameter $1 accepterar inte tomma värden.', |
| 1421 | + 'validator_list_error_must_be_number' => 'Parameter $1 får endast innehålla siffror.', |
| 1422 | + 'validator_list_error_must_be_integer' => 'Parameter $1 får endast innehålla heltal.', |
| 1423 | + 'validator_list_error_invalid_range' => 'Alla värden av parameter $1 måste vara mellan $2 och $3.', |
| 1424 | + 'validator_list_error_invalid_argument' => 'Ett eller flera värden av parameter $1 är ogiltiga.', |
| 1425 | + 'validator_list_omitted' => '{{PLURAL:$2|Värdet|Värdena}} $1 har blivit {{PLURAL:$2|utelämnat|utelämnade}}.', |
| 1426 | + 'validator_error_accepts_only' => 'Parametern $1 måste ha {{PLURAL:$3|detta värde|ett av dessa värden}}: $2.', |
| 1427 | +); |
| 1428 | + |
| 1429 | +/** Telugu (తెలుగు) |
| 1430 | + * @author Ravichandra |
| 1431 | + * @author Veeven |
| 1432 | + */ |
| 1433 | +$messages['te'] = array( |
| 1434 | + 'validator-warning' => 'హెచ్చరిక: $1', |
| 1435 | + 'validator-error' => 'పొరపాటు: $1', |
| 1436 | + 'validator_error_unknown_argument' => '$1 అనేది సరైన పరామితి కాదు.', |
| 1437 | + 'validator_error_required_missing' => 'తప్పకుండా కావాల్సిన $1 పరామితిని ఇవ్వలేదు.', |
| 1438 | + 'validator-listerrors-errors' => 'పొరపాట్లు', |
| 1439 | + 'validator_error_empty_argument' => '$1 పరామితి ఖాళీగా ఉండకూడదు', |
| 1440 | + 'validator_error_must_be_number' => '$1 పరామితి ఖచ్చితంగా ఓ సంఖ్య అయిఉండాలి', |
| 1441 | + 'validator_error_must_be_integer' => '$1 పరామితి ఒక పూర్ణసంఖ్య అయిఉండాలి', |
| 1442 | + 'validator_error_invalid_range' => '$1 పరామితి $2, $3 మద్యలో ఉండాలి.', |
| 1443 | + 'validator_error_invalid_argument' => '$2 పరామితి కోసం $1 విలువ సరైంది కాదు', |
| 1444 | + 'validator_list_error_must_be_number' => '$1 పరామితి ఖచ్చితంగా సంఖ్యలను మాత్రమే కలిగివుండాలి.', |
| 1445 | + 'validator_list_error_must_be_integer' => '$1 పరామితి పూర్ణసంఖ్యలను మాత్రమే కలిగివుండాలి.', |
| 1446 | +); |
| 1447 | + |
| 1448 | +/** Tagalog (Tagalog) |
| 1449 | + * @author AnakngAraw |
| 1450 | + */ |
| 1451 | +$messages['tl'] = array( |
| 1452 | + 'validator-desc' => 'Nagbibigay ng panlahatang magtangkilik na paghawak sa ibang mga dugtong', |
| 1453 | + 'validator-warning' => 'Babala: $1', |
| 1454 | + 'validator-error' => 'Kamalian: $1', |
| 1455 | + 'validator-fatal-error' => 'Masidhing kamalian: $1', |
| 1456 | + 'validator_error_parameters' => 'Ang sumusunod na {{PLURAL:$1|kamalian|mga kamalian}} ay napansin sa iyong sintaks:', |
| 1457 | + 'validator_warning_parameters' => 'May {{PLURAL:$1|mali|mga mali}} sa sintaks mo.', |
| 1458 | + 'validator-warning-adittional-errors' => '... at {{PLURAL:$1|isa pang paksa|maramihan pang mga paksa}}.', |
| 1459 | + 'validator_error_unknown_argument' => 'Ang $1 ay isang hindi tanggap na parametro.', |
| 1460 | + 'validator_error_required_missing' => 'Hindi ibinigay ang kailangang parametro na $1.', |
| 1461 | + 'validator-error-override-argument' => 'Sinubukang pangingibabawan ang parametrong $1 (halaga: $2) ng halagang "$3"', |
| 1462 | + 'validator_error_empty_argument' => 'Hindi dapat na isang halagang walang laman ang parametrong $1.', |
| 1463 | + 'validator_error_must_be_number' => 'Dapat na bilang lang ang parametrong $1.', |
| 1464 | + 'validator_error_must_be_integer' => 'Dapat na tambilang lang ang parametrong $1.', |
| 1465 | + 'validator-error-must-be-float' => 'Ang parametrong $1 ay maaaring isang lumulutang na bilang ng punto lamang.', |
| 1466 | + 'validator_error_invalid_range' => 'Dapat na nasa pagitan ng $2 at $3 ang parametrong $1.', |
| 1467 | + 'validator-error-invalid-length' => 'Ang parametrong $1 ay dapat na may isang haba na $2.', |
| 1468 | + 'validator-error-invalid-length-range' => 'Ang parametrong $1 ay dapat na may isang haba na nasa pagitan ng $2 at $3.', |
| 1469 | + 'validator_error_invalid_argument' => 'Ang halagang $1 ay hindi tanggap para sa parametrong $2.', |
| 1470 | + 'validator_list_error_empty_argument' => 'Hindi tumatanggap ng halagang walang laman ang parametrong $1.', |
| 1471 | + 'validator_list_error_must_be_number' => 'Dapat na naglalaman lang ng mga bilang ang parametrong $1.', |
| 1472 | + 'validator_list_error_must_be_integer' => 'Dapat na naglalaman lang ng mga tambilang ang parametrong $1.', |
| 1473 | + 'validator_list_error_invalid_range' => 'Dapat na nasa pagitan ng $2 at $3 ang lahat ng mga halaga ng parametrong $1.', |
| 1474 | + 'validator_list_error_invalid_argument' => 'Hindi tanggap ang isa o higit pang mga halaga para sa parametrong $1.', |
| 1475 | + 'validator_error_accepts_only' => 'Ang halagang "$4" ay hindi tanggap para sa parametrong $1. Tumatanggap lamang ito ng |
| 1476 | +{{PLURAL:$3|ganitong halaga|ganitong mga halaga}}: $2.', |
| 1477 | + 'validator_list_omitted' => 'Tinanggal {{PLURAL:$2|na ang|na ang mga}} {{PLURAL:$2|halaga|halaga}} ng $1.', |
| 1478 | +); |
| 1479 | + |
| 1480 | +/** Turkish (Türkçe) |
| 1481 | + * @author Vito Genovese |
| 1482 | + */ |
| 1483 | +$messages['tr'] = array( |
| 1484 | + 'validator_error_unknown_argument' => '$1, geçerli bir parametre değildir.', |
| 1485 | + 'validator_error_empty_argument' => '$1 parametresi boş bir değere sahip olamaz.', |
| 1486 | + 'validator_error_must_be_number' => '$1 parametresi sadece sayı olabilir.', |
| 1487 | + 'validator_error_must_be_integer' => '$1 parametresi sadece bir tamsayı olabilir', |
| 1488 | + 'validator_list_error_empty_argument' => '$1 parametresi boş değerleri kabul etmemektedir.', |
| 1489 | + 'validator_list_error_must_be_number' => '$1 parametresi sadece sayı içerebilir.', |
| 1490 | +); |
| 1491 | + |
| 1492 | +/** Ukrainian (Українська) |
| 1493 | + * @author NickK |
| 1494 | + * @author Prima klasy4na |
| 1495 | + */ |
| 1496 | +$messages['uk'] = array( |
| 1497 | + 'validator-desc' => 'Валідатор забезпечує іншим розширенням можливості перевірки параметрів функцій парсера і тегів, встановлення значень за умовчанням та створення повідомлень про помилки', |
| 1498 | + 'validator_error_parameters' => 'У вашому синтаксисі {{PLURAL:$1|виявлена така помилка|виявлені такі помилки}}:', |
| 1499 | +); |
| 1500 | + |
| 1501 | +/** Vietnamese (Tiếng Việt) |
| 1502 | + * @author Minh Nguyen |
| 1503 | + * @author Vinhtantran |
| 1504 | + */ |
| 1505 | +$messages['vi'] = array( |
| 1506 | + '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.', |
| 1507 | + '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:', |
| 1508 | + 'validator_warning_parameters' => 'Có {{PLURAL:$1|lỗi|lỗi}} cú pháp trong mã của bạn.', |
| 1509 | + 'validator_error_unknown_argument' => '$1 không phải là tham số hợp lệ.', |
| 1510 | + 'validator_error_required_missing' => 'Không định rõ tham số bắt buộc “$1”.', |
| 1511 | + 'validator_error_empty_argument' => 'Tham số “$1” không được để trống.', |
| 1512 | + 'validator_error_must_be_number' => 'Tham số “$1” phải là con số.', |
| 1513 | + 'validator_error_must_be_integer' => 'Tham số “$1” phải là số nguyên.', |
| 1514 | + 'validator_error_invalid_range' => 'Tham số “$1” phải nằm giữa $2 và $3.', |
| 1515 | + 'validator_error_invalid_argument' => 'Giá trị “$1” không hợp tham số “$2”.', |
| 1516 | + 'validator_list_error_empty_argument' => 'Không được để trống tham số “$1”.', |
| 1517 | + 'validator_list_error_must_be_number' => 'Tham số “$1” chỉ được phép bao gồm con số.', |
| 1518 | + 'validator_list_error_must_be_integer' => 'Tham số “$1” chỉ được phép bao gồm số nguyên.', |
| 1519 | + '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.', |
| 1520 | + 'validator_list_error_invalid_argument' => 'Ít nhất một giá trị của tham số “$1” không hợp lệ.', |
| 1521 | + 'validator_list_omitted' => '{{PLURAL:$2|Giá trị|Các giá trị}} “$1” bị bỏ qua.', |
| 1522 | + 'validator_error_accepts_only' => 'Tham số $1 chỉ nhận được {{PLURAL:$3|giá trị|các giá trị}} này: $2.', |
| 1523 | +); |
| 1524 | + |
| 1525 | +/** Simplified Chinese (中文(简体)) |
| 1526 | + * @author Wilsonmess |
| 1527 | + */ |
| 1528 | +$messages['zh-hans'] = array( |
| 1529 | + 'validator_error_unknown_argument' => '$1 不是合法参数。', |
| 1530 | + 'validator_error_required_missing' => '未能提供所需要的参数 $1 。', |
| 1531 | + 'validator_error_empty_argument' => '参数 $1 不能为空。', |
| 1532 | + 'validator_error_must_be_number' => '参数 $1 只能为数字。', |
| 1533 | + 'validator_error_must_be_integer' => '参数 $1 只能为整数。', |
| 1534 | + 'validator_error_invalid_range' => '参数 $1 的范围必须介于 $2 与 $3 之间。', |
| 1535 | + 'validator_error_invalid_argument' => '值 $1 对于参数 $2 不合法。', |
| 1536 | + 'validator_list_error_empty_argument' => '参数 $1 不接受空值。', |
| 1537 | + 'validator_list_error_must_be_number' => '参数 $1 只能包含数字。', |
| 1538 | + 'validator_list_error_must_be_integer' => '参数 $1 只能包含整数。', |
| 1539 | + 'validator_list_error_invalid_range' => '参数 $1 所有合法的值都必须介于 $2 与 $3 之间。', |
| 1540 | + 'validator_list_error_invalid_argument' => '参数 $1 的一个或多个值不合法。', |
| 1541 | +); |
| 1542 | + |
Property changes on: tags/extensions/Validator/REL_0_4_2/Validator.i18n.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 1543 | + native |
Index: tags/extensions/Validator/REL_0_4_2/Validator.php |
— | — | @@ -0,0 +1,102 @@ |
| 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.4.2 rc1' ); |
| 29 | + |
| 30 | +// Register the internationalization file. |
| 31 | +$wgExtensionMessagesFiles['Validator'] = dirname( __FILE__ ) . '/Validator.i18n.php'; |
| 32 | + |
| 33 | +$wgExtensionCredits['other'][] = array( |
| 34 | + 'path' => __FILE__, |
| 35 | + 'name' => 'Validator', |
| 36 | + 'version' => Validator_VERSION, |
| 37 | + 'author' => array( '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]' ), |
| 38 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:Validator', |
| 39 | + 'descriptionmsg' => 'validator-desc', |
| 40 | +); |
| 41 | + |
| 42 | +// Autoload the classes. |
| 43 | +$incDir = dirname( __FILE__ ) . '/includes/'; |
| 44 | +$wgAutoloadClasses['CriterionValidationResult'] = $incDir . 'CriterionValidationResult.php'; |
| 45 | +$wgAutoloadClasses['ItemParameterCriterion'] = $incDir . 'ItemParameterCriterion.php'; |
| 46 | +$wgAutoloadClasses['ItemParameterManipulation'] = $incDir . 'ItemParameterManipulation.php'; |
| 47 | +$wgAutoloadClasses['ListParameter'] = $incDir . 'ListParameter.php'; |
| 48 | +$wgAutoloadClasses['ListParameterCriterion'] = $incDir . 'ListParameterCriterion.php'; |
| 49 | +$wgAutoloadClasses['ListParameterManipulation'] = $incDir . 'ListParameterManipulation.php'; |
| 50 | +$wgAutoloadClasses['Parameter'] = $incDir . 'Parameter.php'; |
| 51 | +$wgAutoloadClasses['ParameterCriterion'] = $incDir . 'ParameterCriterion.php'; |
| 52 | +$wgAutoloadClasses['ParameterManipulation'] = $incDir . 'ParameterManipulation.php'; |
| 53 | +$wgAutoloadClasses['ParserHook'] = $incDir . 'ParserHook.php'; |
| 54 | +$wgAutoloadClasses['Validator'] = $incDir . 'Validator.php'; |
| 55 | +$wgAutoloadClasses['TopologicalSort'] = $incDir . 'TopologicalSort.php'; |
| 56 | +// No need to autoload this one, since it's directly included below. |
| 57 | +//$wgAutoloadClasses['ValidationError'] = $incDir . 'ValidationError.php'; |
| 58 | +$wgAutoloadClasses['ValidationErrorHandler'] = $incDir . 'ValidationErrorHandler.php'; |
| 59 | + |
| 60 | +$wgAutoloadClasses['CriterionHasLength'] = $incDir . 'criteria/CriterionHasLength.php'; |
| 61 | +$wgAutoloadClasses['CriterionInArray'] = $incDir . 'criteria/CriterionInArray.php'; |
| 62 | +$wgAutoloadClasses['CriterionInRange'] = $incDir . 'criteria/CriterionInRange.php'; |
| 63 | +$wgAutoloadClasses['CriterionIsFloat'] = $incDir . 'criteria/CriterionIsFloat.php'; |
| 64 | +$wgAutoloadClasses['CriterionIsInteger'] = $incDir . 'criteria/CriterionIsInteger.php'; |
| 65 | +$wgAutoloadClasses['CriterionIsNumeric'] = $incDir . 'criteria/CriterionIsNumeric.php'; |
| 66 | +$wgAutoloadClasses['CriterionItemCount'] = $incDir . 'criteria/CriterionItemCount.php'; |
| 67 | +$wgAutoloadClasses['CriterionMatchesRegex'] = $incDir . 'criteria/CriterionMatchesRegex.php'; |
| 68 | +$wgAutoloadClasses['CriterionNotEmpty'] = $incDir . 'criteria/CriterionNotEmpty.php'; |
| 69 | +$wgAutoloadClasses['CriterionTrue'] = $incDir . 'criteria/CriterionTrue.php'; |
| 70 | +$wgAutoloadClasses['CriterionUniqueItems'] = $incDir . 'criteria/CriterionUniqueItems.php'; |
| 71 | + |
| 72 | +$wgAutoloadClasses['ParamManipulationBoolean'] = $incDir . 'manipulations/ParamManipulationBoolean.php'; |
| 73 | +$wgAutoloadClasses['ParamManipulationBoolstr'] = $incDir . 'manipulations/ParamManipulationBoolstr.php'; |
| 74 | +$wgAutoloadClasses['ParamManipulationFloat'] = $incDir . 'manipulations/ParamManipulationFloat.php'; |
| 75 | +$wgAutoloadClasses['ParamManipulationFunctions']= $incDir . 'manipulations/ParamManipulationFunctions.php'; |
| 76 | +$wgAutoloadClasses['ParamManipulationImplode'] = $incDir . 'manipulations/ParamManipulationImplode.php'; |
| 77 | +$wgAutoloadClasses['ParamManipulationInteger'] = $incDir . 'manipulations/ParamManipulationInteger.php'; |
| 78 | + |
| 79 | +$wgAutoloadClasses['ValidatorListErrors'] = $incDir . 'parserHooks/Validator_ListErrors.php'; |
| 80 | +unset( $incDir ); |
| 81 | + |
| 82 | +$wgExtensionFunctions[] = 'efValidatorSetup'; |
| 83 | + |
| 84 | +/** |
| 85 | + * Function for backwards compatibility with MW 1.15.x. |
| 86 | + * |
| 87 | + * @since 0.4.2 |
| 88 | + */ |
| 89 | +function efValidatorSetup() { |
| 90 | + // This function has been deprecated in 1.16, but needed for earlier versions. |
| 91 | + // It's present in 1.16 as a stub, but lets check if it exists in case it gets removed at some point. |
| 92 | + if ( function_exists( 'wfLoadExtensionMessages' ) ) { |
| 93 | + wfLoadExtensionMessages( 'Validator' ); |
| 94 | + } |
| 95 | + |
| 96 | + return true; |
| 97 | +} |
| 98 | + |
| 99 | +// This file needs to be included directly, since Validator_Settings.php |
| 100 | +// uses it, in some rare cases before autoloading is defined. |
| 101 | +require_once 'includes/ValidationError.php' ; |
| 102 | +// Include the settings file. |
| 103 | +require_once 'Validator_Settings.php'; |
Property changes on: tags/extensions/Validator/REL_0_4_2/Validator.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 104 | + native |
Index: tags/extensions/Validator/REL_0_4_2/Validator_Settings.php |
— | — | @@ -0,0 +1,36 @@ |
| 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 | +# Registration of the listerrors parser hooks. |
| 22 | +$wgHooks['ParserFirstCallInit'][] = 'ValidatorListErrors::staticInit'; |
| 23 | +$wgHooks['LanguageGetMagic'][] = 'ValidatorListErrors::staticMagic'; |
| 24 | + |
| 25 | +# Maps actions to error severity. |
| 26 | +# ACTION_LOG will cause the error to be logged |
| 27 | +# ACTION_WARN will cause a notice that there is an error to be shown inline |
| 28 | +# ACTION_SHOW will cause an error message to be shown inline |
| 29 | +# ACTION_DEMAND will cause an error message to be shown inline and prevent rendering of the regular output |
| 30 | +$egErrorActions = array( |
| 31 | + ValidationError::SEVERITY_MINOR => ValidationError::ACTION_LOG, |
| 32 | + ValidationError::SEVERITY_LOW => ValidationError::ACTION_WARN, |
| 33 | + ValidationError::SEVERITY_NORMAL => ValidationError::ACTION_SHOW, |
| 34 | + ValidationError::SEVERITY_HIGH => ValidationError::ACTION_DEMAND, |
| 35 | +); |
| 36 | + |
| 37 | +$egValidatorErrListMin = 'minor'; |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_2/Validator_Settings.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 38 | + native |
Index: tags/extensions/Validator/REL_0_4_2/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 |