Index: tags/extensions/Validator/REL_0_2_2/Validator.class.php |
— | — | @@ -0,0 +1,508 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * File holding the Validator class. |
| 6 | + * |
| 7 | + * @file Validator.class.php |
| 8 | + * @ingroup Validator |
| 9 | + * |
| 10 | + * @author Jeroen De Dauw |
| 11 | + */ |
| 12 | + |
| 13 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 14 | + die( 'Not an entry point.' ); |
| 15 | +} |
| 16 | + |
| 17 | +/** |
| 18 | + * Class for parameter validation. |
| 19 | + * |
| 20 | + * @ingroup Validator |
| 21 | + * |
| 22 | + * @author Jeroen De Dauw |
| 23 | + */ |
| 24 | +final class Validator { |
| 25 | + |
| 26 | + /** |
| 27 | + * @var boolean Indicates whether parameters not found in the criteria list |
| 28 | + * should be stored in case they are not accepted. The default is false. |
| 29 | + */ |
| 30 | + public static $storeUnknownParameters = false; |
| 31 | + |
| 32 | + /** |
| 33 | + * @var boolean Indicates whether parameters not found in the criteria list |
| 34 | + * should be stored in case they are not accepted. The default is false. |
| 35 | + */ |
| 36 | + public static $accumulateParameterErrors = false; |
| 37 | + |
| 38 | + /** |
| 39 | + * @var boolean Indicates whether parameters that are provided more then once |
| 40 | + * should be accepted, and use the first provided value, or not, and generate an error. |
| 41 | + */ |
| 42 | + public static $acceptOverriding = false; |
| 43 | + |
| 44 | + /** |
| 45 | + * @var boolean Indicates if errors in list items should cause the item to be omitted, |
| 46 | + * versus having the whole list be set to it's default. |
| 47 | + */ |
| 48 | + public static $perItemValidation = true; |
| 49 | + |
| 50 | + /** |
| 51 | + * @var array Holder for the validation functions. |
| 52 | + */ |
| 53 | + private static $validationFunctions = array( |
| 54 | + 'in_array' => array( 'ValidatorFunctions', 'in_array' ), |
| 55 | + 'in_range' => array( 'ValidatorFunctions', 'in_range' ), |
| 56 | + 'is_numeric' => 'is_numeric', |
| 57 | + 'is_integer' => array( 'ValidatorFunctions', 'is_integer' ), |
| 58 | + 'not_empty' => array( 'ValidatorFunctions', 'not_empty' ), |
| 59 | + 'has_length' => array( 'ValidatorFunctions', 'has_length' ), |
| 60 | + 'regex' => array( 'ValidatorFunctions', 'regex' ), |
| 61 | + ); |
| 62 | + |
| 63 | + /** |
| 64 | + * @var array Holder for the list validation functions. |
| 65 | + */ |
| 66 | + private static $listValidationFunctions = array( |
| 67 | + 'item_count' => array( 'ValidatorFunctions', 'has_item_count' ), |
| 68 | + 'unique_items' => array( 'ValidatorFunctions', 'has_unique_items' ), |
| 69 | + ); |
| 70 | + |
| 71 | + /** |
| 72 | + * @var array Holder for the formatting functions. |
| 73 | + */ |
| 74 | + private static $outputFormats = array( |
| 75 | + 'array' => array( 'ValidatorFormats', 'format_array' ), |
| 76 | + 'list' => array( 'ValidatorFormats', 'format_list' ), |
| 77 | + 'boolean' => array( 'ValidatorFormats', 'format_boolean' ), |
| 78 | + 'boolstr' => array( 'ValidatorFormats', 'format_boolean_string' ), |
| 79 | + 'string' => array( 'ValidatorFormats', 'format_string' ), |
| 80 | + 'unique_items' => array( 'ValidatorFormats', 'format_unique_items' ), |
| 81 | + 'filtered_array' => array( 'ValidatorFormats', 'format_filtered_array' ), |
| 82 | + ); |
| 83 | + |
| 84 | + private $parameterInfo; |
| 85 | + private $rawParameters = array(); |
| 86 | + |
| 87 | + private $parameters= array(); |
| 88 | + private $valid = array(); |
| 89 | + private $invalid = array(); |
| 90 | + private $unknown = array(); |
| 91 | + |
| 92 | + private $errors = array(); |
| 93 | + |
| 94 | + /** |
| 95 | + * Sets the parameter criteria, used to valiate the parameters. |
| 96 | + * |
| 97 | + * @param array $parameterInfo |
| 98 | + */ |
| 99 | + public function setParameterInfo( array $parameterInfo ) { |
| 100 | + $this->parameterInfo = $parameterInfo; |
| 101 | + } |
| 102 | + |
| 103 | + /** |
| 104 | + * Sets the raw parameters that will be validated when validateParameters is called. |
| 105 | + * |
| 106 | + * @param array $parameters |
| 107 | + */ |
| 108 | + public function setParameters( array $parameters ) { |
| 109 | + $this->rawParameters = $parameters; |
| 110 | + } |
| 111 | + |
| 112 | + /** |
| 113 | + * Valides the raw parameters, and allocates them as valid, invalid or unknown. |
| 114 | + * Errors are collected, and can be retrieved via getErrors. |
| 115 | + * |
| 116 | + * @return boolean Indicates whether there where no errors. |
| 117 | + */ |
| 118 | + public function validateParameters() { |
| 119 | + // Loop through all the user provided parameters, and destinguise between those that are allowed and those that are not. |
| 120 | + foreach ( $this->rawParameters as $paramName => $paramValue ) { |
| 121 | + // Attempt to get the main parameter name (takes care of aliases). |
| 122 | + $mainName = self::getMainParamName( $paramName, $this->parameterInfo ); |
| 123 | + // If the parameter is found in the list of allowed ones, add it to the $parameters array. |
| 124 | + if ( $mainName ) { |
| 125 | + // Check for parameter overriding. In most cases, this has already largely been taken care off, |
| 126 | + // in the form of later parameters overriding earlier ones. This is not true for different aliases though. |
| 127 | + if (! array_key_exists($mainName, $this->parameters) || self::$acceptOverriding ) { |
| 128 | + $this->parameters[$mainName] = $paramValue; |
| 129 | + } |
| 130 | + else { |
| 131 | + $this->errors[] = array( 'type' => 'unknown', 'name' => $mainName ); |
| 132 | + } |
| 133 | + } |
| 134 | + else { // If the parameter is not found in the list of allowed ones, add an item to the $this->errors array. |
| 135 | + if ( self::$storeUnknownParameters ) $this->unknown[$paramName] = $paramValue; |
| 136 | + $this->errors[] = array( 'type' => 'unknown', 'name' => $paramName); |
| 137 | + } |
| 138 | + } |
| 139 | + |
| 140 | + // Loop through the list of allowed parameters. |
| 141 | + foreach ( $this->parameterInfo as $paramName => $paramInfo ) { |
| 142 | + // If the user provided a value for this parameter, validate and handle it. |
| 143 | + if ( array_key_exists( $paramName, $this->parameters ) ) { |
| 144 | + |
| 145 | + $paramValue = $this->parameters[$paramName]; |
| 146 | + $this->cleanParameter( $paramName, $paramValue ); |
| 147 | + |
| 148 | + if ( $this->validateParameter( $paramName, $paramValue ) ) { |
| 149 | + // If the validation succeeded, add the parameter to the list of valid ones. |
| 150 | + $this->valid[$paramName] = $paramValue; |
| 151 | + $this->setOutputTypes($this->valid[$paramName], $paramInfo); |
| 152 | + } |
| 153 | + else { |
| 154 | + // If the validation failed, add the parameter to the list of invalid ones. |
| 155 | + $this->invalid[$paramName] = $paramValue; |
| 156 | + } |
| 157 | + } |
| 158 | + else { |
| 159 | + // If the parameter is required, add a new error of type 'missing'. |
| 160 | + if ( array_key_exists( 'required', $paramInfo ) && $paramInfo['required'] ) { |
| 161 | + $this->errors[] = array( 'type' => 'missing', 'name' => $paramName ); |
| 162 | + } |
| 163 | + else { |
| 164 | + // Set the default value (or default 'default value' if none is provided), and ensure the type is correct. |
| 165 | + $this->valid[$paramName] = array_key_exists( 'default', $paramInfo ) ? $paramInfo['default'] : ''; |
| 166 | + $this->setOutputTypes($this->valid[$paramName], $paramInfo); |
| 167 | + } |
| 168 | + } |
| 169 | + } |
| 170 | + |
| 171 | + return count( $this->errors ) == 0; |
| 172 | + } |
| 173 | + |
| 174 | + /** |
| 175 | + * Returns the main parameter name for a given parameter or alias, or false |
| 176 | + * when it is not recognized as main parameter or alias. |
| 177 | + * |
| 178 | + * @param string $paramName |
| 179 | + * @param array $allowedParms |
| 180 | + * |
| 181 | + * @return string |
| 182 | + */ |
| 183 | + private function getMainParamName( $paramName, array $allowedParms ) { |
| 184 | + $result = false; |
| 185 | + |
| 186 | + if ( array_key_exists( $paramName, $allowedParms ) ) { |
| 187 | + $result = $paramName; |
| 188 | + } |
| 189 | + else { |
| 190 | + foreach ( $allowedParms as $name => $data ) { |
| 191 | + if ( array_key_exists( 'aliases', $data ) ) { |
| 192 | + if ( in_array( $paramName, $data['aliases'] ) ) { |
| 193 | + $result = $name; |
| 194 | + break; |
| 195 | + } |
| 196 | + } |
| 197 | + } |
| 198 | + } |
| 199 | + |
| 200 | + return $result; |
| 201 | + } |
| 202 | + |
| 203 | + /** |
| 204 | + * Ensures the parameter info is valid, trims the value, and splits lists. |
| 205 | + * |
| 206 | + * @param string $name |
| 207 | + * @param $value |
| 208 | + */ |
| 209 | + private function cleanParameter( $name, &$value ) { |
| 210 | + // Ensure there is a criteria array. |
| 211 | + if (! array_key_exists('criteria', $this->parameterInfo[$name] )) { |
| 212 | + $this->parameterInfo[$name]['criteria'] = array(); |
| 213 | + } |
| 214 | + |
| 215 | + // Ensure the type is set in array form. |
| 216 | + if (! array_key_exists('type', $this->parameterInfo[$name] )) { |
| 217 | + $this->parameterInfo[$name]['type'] = array('string'); |
| 218 | + } |
| 219 | + elseif(! is_array($this->parameterInfo[$name]['type'])) { |
| 220 | + $this->parameterInfo[$name]['type'] = array($this->parameterInfo[$name]['type']); |
| 221 | + } |
| 222 | + |
| 223 | + if ( array_key_exists( 'type', $this->parameterInfo[$name] ) ) { |
| 224 | + // Add type specific criteria. |
| 225 | + switch(strtolower($this->parameterInfo[$name]['type'][0])) { |
| 226 | + case 'integer': |
| 227 | + $this->addTypeCriteria($name, 'is_integer'); |
| 228 | + break; |
| 229 | + case 'number': |
| 230 | + $this->addTypeCriteria($name, 'is_numeric'); |
| 231 | + break; |
| 232 | + case 'boolean': |
| 233 | + // TODO: work with list of true and false values. |
| 234 | + $this->addTypeCriteria($name, 'in_array', array('yes', 'no', 'on', 'off')); |
| 235 | + break; |
| 236 | + case 'char': |
| 237 | + $this->addTypeCriteria($name, 'has_length', array(1, 1)); |
| 238 | + break; |
| 239 | + } |
| 240 | + } |
| 241 | + |
| 242 | + if (count($this->parameterInfo[$name]['type']) > 1 && $this->parameterInfo[$name]['type'][1] == 'list') { |
| 243 | + // Trimming and splitting of list values. |
| 244 | + $delimiter = count($this->parameterInfo[$name]['type']) > 2 ? $this->parameterInfo[$name]['type'][2] : ','; |
| 245 | + $value = preg_replace('/((\s)*' . $delimiter . '(\s)*)/', $delimiter, $value); |
| 246 | + $value = explode($delimiter, $value); |
| 247 | + } |
| 248 | + elseif (count($this->parameterInfo[$name]['type']) > 1 && $this->parameterInfo[$name]['type'][1] == 'array' && is_array($value)) { |
| 249 | + // Trimming of array values. |
| 250 | + for($i = count($value); $i > 0; $i--) $value[$i] = trim ($value[$i]); |
| 251 | + } |
| 252 | + else { |
| 253 | + // Trimming of non-list values. |
| 254 | + $value = trim ($value); |
| 255 | + } |
| 256 | + } |
| 257 | + |
| 258 | + private function addTypeCriteria($paramName, $criteriaName, $criteriaArgs = array()) { |
| 259 | + $this->parameterInfo[$paramName]['criteria'] = array_merge(array($criteriaName => $criteriaArgs), $this->parameterInfo[$paramName]['criteria']); |
| 260 | + } |
| 261 | + |
| 262 | + /** |
| 263 | + * Valides the provided parameter by matching the value against the list and item criteria for the name. |
| 264 | + * |
| 265 | + * @param string $name |
| 266 | + * @param string $value |
| 267 | + * |
| 268 | + * @return boolean Indicates whether there the parameter value(s) is/are valid. |
| 269 | + */ |
| 270 | + private function validateParameter( $name, &$value ) { |
| 271 | + $hasNoErrors = true; |
| 272 | + $checkItemCriteria = true; |
| 273 | + |
| 274 | + if (array_key_exists('list-criteria', $this->parameterInfo[$name])) { |
| 275 | + foreach ( $this->parameterInfo[$name]['list-criteria'] as $criteriaName => $criteriaArgs ) { |
| 276 | + // Get the validation function. If there is no matching function, throw an exception. |
| 277 | + if (array_key_exists($criteriaName, self::$listValidationFunctions)) { |
| 278 | + $validationFunction = self::$listValidationFunctions[$criteriaName]; |
| 279 | + $isValid = $this->doCriteriaValidation($validationFunction, $value, $criteriaArgs); |
| 280 | + |
| 281 | + // Add a new error when the validation failed, and break the loop if errors for one parameter should not be accumulated. |
| 282 | + if ( ! $isValid ) { |
| 283 | + $hasNoErrors = false; |
| 284 | + |
| 285 | + $this->errors[] = array( 'type' => $criteriaName, 'args' => $criteriaArgs, 'name' => $name, 'list' => true, 'value' => $this->rawParameters[$name] ); |
| 286 | + |
| 287 | + if ( ! self::$accumulateParameterErrors ) { |
| 288 | + $checkItemCriteria = false; |
| 289 | + break; |
| 290 | + } |
| 291 | + } |
| 292 | + } |
| 293 | + else { |
| 294 | + $hasNoErrors = false; |
| 295 | + throw new Exception( 'There is no validation function for list criteria type ' . $criteriaName ); |
| 296 | + } |
| 297 | + } |
| 298 | + } |
| 299 | + |
| 300 | + if ($checkItemCriteria) $hasNoErrors = $hasNoErrors && $this->doItemValidation($name, $value); |
| 301 | + |
| 302 | + return $hasNoErrors; |
| 303 | + } |
| 304 | + |
| 305 | + /** |
| 306 | + * Valides the provided parameter by matching the value against the item criteria for the name. |
| 307 | + * |
| 308 | + * @param $name |
| 309 | + * @param $value |
| 310 | + * |
| 311 | + * @return boolean Indicates whether there the parameter value(s) is/are valid. |
| 312 | + */ |
| 313 | + private function doItemValidation( $name, &$value ) { |
| 314 | + $hasNoErrors = true; |
| 315 | + |
| 316 | + // Go through all item criteria. |
| 317 | + foreach ( $this->parameterInfo[$name]['criteria'] as $criteriaName => $criteriaArgs ) { |
| 318 | + // Get the validation function. If there is no matching function, throw an exception. |
| 319 | + if (array_key_exists($criteriaName, self::$validationFunctions)) { |
| 320 | + $validationFunction = self::$validationFunctions[$criteriaName]; |
| 321 | + |
| 322 | + if (is_array($value)) { |
| 323 | + // Handling of list parameters |
| 324 | + $invalidItems = array(); |
| 325 | + $validItems = array(); |
| 326 | + |
| 327 | + // Loop through all the items in the parameter value, and validate them. |
| 328 | + foreach($value as $item) { |
| 329 | + $isValid = $this->doCriteriaValidation($validationFunction, $item, $criteriaArgs); |
| 330 | + if ($isValid) { |
| 331 | + // If per item validation is on, store the valid items, so only these can be returned by Validator. |
| 332 | + if (self::$perItemValidation) $validItems[] = $item; |
| 333 | + } |
| 334 | + else { |
| 335 | + // If per item validation is on, store the invalid items, so a fitting error message can be created. |
| 336 | + if (self::$perItemValidation) { |
| 337 | + $invalidItems[] = $item; |
| 338 | + } |
| 339 | + else { |
| 340 | + // If per item validation is not on, an error to one item means the complete value is invalid. |
| 341 | + // Therefore it's not required to validate the remaining items. |
| 342 | + break; |
| 343 | + } |
| 344 | + } |
| 345 | + } |
| 346 | + |
| 347 | + if (self::$perItemValidation) { |
| 348 | + // If per item validation is on, the parameter value is valid as long as there is at least one valid item. |
| 349 | + $isValid = count($validItems) > 0; |
| 350 | + |
| 351 | + // If the value is valid, but there are invalid items, add an error with a list of these items. |
| 352 | + if ($isValid && count($invalidItems) > 0) { |
| 353 | + $value = $validItems; |
| 354 | + $this->errors[] = array( 'type' => $criteriaName, 'args' => $criteriaArgs, 'name' => $name, 'list' => true, 'invalid-items' => $invalidItems ); |
| 355 | + } |
| 356 | + } |
| 357 | + } |
| 358 | + else { |
| 359 | + // Determine if the value is valid for single valued parameters. |
| 360 | + $isValid = $this->doCriteriaValidation($validationFunction, $value, $criteriaArgs); |
| 361 | + } |
| 362 | + |
| 363 | + // Add a new error when the validation failed, and break the loop if errors for one parameter should not be accumulated. |
| 364 | + if ( ! $isValid ) { |
| 365 | + $isList = is_array($value); |
| 366 | + if ($isList) $value = $this->rawParameters[$name]; |
| 367 | + $this->errors[] = array( 'type' => $criteriaName, 'args' => $criteriaArgs, 'name' => $name, 'list' => $isList, 'value' => $value ); |
| 368 | + $hasNoErrors = false; |
| 369 | + if ( ! self::$accumulateParameterErrors ) break; |
| 370 | + } |
| 371 | + } |
| 372 | + else { |
| 373 | + $hasNoErrors = false; |
| 374 | + throw new Exception( 'There is no validation function for criteria type ' . $criteriaName ); |
| 375 | + } |
| 376 | + } |
| 377 | + |
| 378 | + return $hasNoErrors; |
| 379 | + } |
| 380 | + |
| 381 | + /** |
| 382 | + * Validates the value of an item, and returns the validation result. |
| 383 | + * |
| 384 | + * @param $validationFunction |
| 385 | + * @param $value |
| 386 | + * @param $criteriaArgs |
| 387 | + * |
| 388 | + * @return unknown_type |
| 389 | + */ |
| 390 | + private function doCriteriaValidation($validationFunction, $value, $criteriaArgs) { |
| 391 | + // Call the validation function and store the result. |
| 392 | + return call_user_func_array( $validationFunction, array_merge(array($value), $criteriaArgs) ); |
| 393 | + } |
| 394 | + |
| 395 | + /** |
| 396 | + * Changes the invalid parameters to their default values, and changes their state to valid. |
| 397 | + */ |
| 398 | + public function correctInvalidParams() { |
| 399 | + foreach ( $this->invalid as $paramName => $paramValue ) { |
| 400 | + unset( $this->invalid[$paramName] ); |
| 401 | + $this->valid[$paramName] = array_key_exists( 'default', $this->parameterInfo[$paramName] ) ? $this->parameterInfo[$paramName]['default'] : ''; |
| 402 | + $this->setOutputTypes($this->valid[$paramName], $this->parameterInfo[$paramName]); |
| 403 | + } |
| 404 | + } |
| 405 | + |
| 406 | + /** |
| 407 | + * Ensures the output type values are arrays, and then calls setOutputType. |
| 408 | + * |
| 409 | + * @param array $value |
| 410 | + * @param $info |
| 411 | + * @return unknown_type |
| 412 | + */ |
| 413 | + private function setOutputTypes(&$value, array $info) { |
| 414 | + if (array_key_exists('output-types', $info)) { |
| 415 | + for($i = 0, $c = count($info['output-types']); $i < $c; $i++) { |
| 416 | + if (! is_array($info['output-types'][$i])) $info['output-types'][$i] = array($info['output-types'][$i]); |
| 417 | + $this->setOutputType($value, $info['output-types'][$i]); |
| 418 | + } |
| 419 | + } |
| 420 | + elseif (array_key_exists('output-type', $info)) { |
| 421 | + if (! is_array($info['output-type'])) $info['output-type'] = array($info['output-type']); |
| 422 | + $this->setOutputType($value, $info['output-type']); |
| 423 | + } |
| 424 | + |
| 425 | + } |
| 426 | + |
| 427 | + /** |
| 428 | + * Calls the formatting function for the provided output format with the provided value. |
| 429 | + * |
| 430 | + * @param $value |
| 431 | + * @param array $typeInfo |
| 432 | + */ |
| 433 | + private function setOutputType(&$value, array $typeInfo) { |
| 434 | + // The output type is the first value in the type info array. |
| 435 | + // The remaining ones will be any extra arguments. |
| 436 | + $outputType = strtolower(array_shift($typeInfo)); |
| 437 | + |
| 438 | + if (array_key_exists($outputType, self::$outputFormats)) { |
| 439 | + // Call the formatting function with as first parameter the value, followed by the extra arguments. |
| 440 | + call_user_func_array( self::$outputFormats[$outputType], array_merge(array(&$value), $typeInfo) ); |
| 441 | + } |
| 442 | + else { |
| 443 | + throw new Exception( 'There is no formatting function for output format ' . $outputType ); |
| 444 | + } |
| 445 | + } |
| 446 | + |
| 447 | + /** |
| 448 | + * Returns the valid parameters. |
| 449 | + * |
| 450 | + * @return array |
| 451 | + */ |
| 452 | + public function getValidParams() { |
| 453 | + return $this->valid; |
| 454 | + } |
| 455 | + |
| 456 | + /** |
| 457 | + * Returns the unknown parameters. |
| 458 | + * |
| 459 | + * @return array |
| 460 | + */ |
| 461 | + public static function getUnknownParams() { |
| 462 | + return $this->unknown; |
| 463 | + } |
| 464 | + |
| 465 | + /** |
| 466 | + * Returns the errors. |
| 467 | + * |
| 468 | + * @return array |
| 469 | + */ |
| 470 | + public function getErrors() { |
| 471 | + return $this->errors; |
| 472 | + } |
| 473 | + |
| 474 | + /** |
| 475 | + * Adds a new criteria type and the validation function that should validate values of this type. |
| 476 | + * You can use this function to override existing criteria type handlers. |
| 477 | + * |
| 478 | + * @param string $criteriaName The name of the cirteria. |
| 479 | + * @param array $functionName The functions location. If it's a global function, only the name, |
| 480 | + * if it's in a class, first the class name, then the method name. |
| 481 | + */ |
| 482 | + public static function addValidationFunction( $criteriaName, array $functionName ) { |
| 483 | + self::$validationFunctions[$criteriaName] = $functionName; |
| 484 | + } |
| 485 | + |
| 486 | + /** |
| 487 | + * Adds a new list criteria type and the validation function that should validate values of this type. |
| 488 | + * You can use this function to override existing criteria type handlers. |
| 489 | + * |
| 490 | + * @param string $criteriaName The name of the list cirteria. |
| 491 | + * @param array $functionName The functions location. If it's a global function, only the name, |
| 492 | + * if it's in a class, first the class name, then the method name. |
| 493 | + */ |
| 494 | + public static function addListValidationFunction( $criteriaName, array $functionName ) { |
| 495 | + self::$listValidationFunctions[$criteriaName] = $functionName; |
| 496 | + } |
| 497 | + |
| 498 | + /** |
| 499 | + * Adds a new output format and the formatting function that should validate values of this type. |
| 500 | + * You can use this function to override existing criteria type handlers. |
| 501 | + * |
| 502 | + * @param string $formatName The name of the format. |
| 503 | + * @param array $functionName The functions location. If it's a global function, only the name, |
| 504 | + * if it's in a class, first the class name, then the method name. |
| 505 | + */ |
| 506 | + public static function addOutputFormat( $formatName, array $functionName ) { |
| 507 | + self::$outputFormats[$formatName] = $functionName; |
| 508 | + } |
| 509 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_2_2/Validator.class.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 510 | + native |
Index: tags/extensions/Validator/REL_0_2_2/Validator_Functions.php |
— | — | @@ -0,0 +1,126 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * File holding the ValidatorFunctions class. |
| 5 | + * |
| 6 | + * @file ValidatorFunctions.php |
| 7 | + * @ingroup Validator |
| 8 | + * |
| 9 | + * @author Jeroen De Dauw |
| 10 | + */ |
| 11 | + |
| 12 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 13 | + die( 'Not an entry point.' ); |
| 14 | +} |
| 15 | + |
| 16 | +/** |
| 17 | + * Class holding variouse static methods for the validation of parameters that have to comply to cetrain criteria. |
| 18 | + * Functions are called by Validator with the parameters $value, $arguments, where $arguments is optional. |
| 19 | + * |
| 20 | + * @ingroup Validator |
| 21 | + * |
| 22 | + * @author Jeroen De Dauw |
| 23 | + */ |
| 24 | +final class ValidatorFunctions { |
| 25 | + |
| 26 | + /** |
| 27 | + * Returns whether the provided value, which must be a number, is within a certain range. Upper bound included. |
| 28 | + * |
| 29 | + * @param $value |
| 30 | + * @param $lower |
| 31 | + * @param $upper |
| 32 | + * |
| 33 | + * @return boolean |
| 34 | + */ |
| 35 | + public static function in_range( $value, $lower = false, $upper = false ) { |
| 36 | + if ( ! is_numeric( $value ) ) return false; |
| 37 | + $value = (int)$value; |
| 38 | + if ($lower !== false && $value < $lower) return false; |
| 39 | + if ($upper !== false && $value > $upper) return false; |
| 40 | + return true; |
| 41 | + } |
| 42 | + |
| 43 | + /** |
| 44 | + * Returns whether the string value is not empty. Not empty is defined as having at least one character after trimming. |
| 45 | + * |
| 46 | + * @param $value |
| 47 | + * |
| 48 | + * @return boolean |
| 49 | + */ |
| 50 | + public static function not_empty( $value ) { |
| 51 | + return strlen( trim( $value ) ) > 0; |
| 52 | + } |
| 53 | + |
| 54 | + /** |
| 55 | + * Returns whether the string value is not empty. Not empty is defined as having at least one character after trimming. |
| 56 | + * |
| 57 | + * @param $value |
| 58 | + * |
| 59 | + * @return boolean |
| 60 | + */ |
| 61 | + public static function in_array( $value ) { |
| 62 | + // TODO: It's possible the way the allowed values are passed here is quite inneficient... |
| 63 | + $params = func_get_args(); |
| 64 | + array_shift( $params ); // Ommit the value |
| 65 | + return in_array($value, $params); |
| 66 | + } |
| 67 | + |
| 68 | + /** |
| 69 | + * Returns whether a variable is an integer or an integer string. Uses the native PHP function. |
| 70 | + * |
| 71 | + * @param $value |
| 72 | + * |
| 73 | + * @return boolean |
| 74 | + */ |
| 75 | + public static function is_integer( $value ) { |
| 76 | + return ctype_digit( (string)$value ); |
| 77 | + } |
| 78 | + |
| 79 | + /** |
| 80 | + * Returns whether the length of the value is within a certain range. Upper bound included. |
| 81 | + * |
| 82 | + * @param string $value |
| 83 | + * @param $lower |
| 84 | + * @param $upper |
| 85 | + * |
| 86 | + * @return boolean |
| 87 | + */ |
| 88 | + public static function has_length( $value, $lower = false, $upper = false ) { |
| 89 | + return self::in_range(strlen($value), $lower, $upper); |
| 90 | + } |
| 91 | + |
| 92 | + /** |
| 93 | + * Returns whether the amount of items in the list is within a certain range. Upper bound included. |
| 94 | + * |
| 95 | + * @param array $values |
| 96 | + * @param $lower |
| 97 | + * @param $upper |
| 98 | + * |
| 99 | + * @return boolean |
| 100 | + */ |
| 101 | + public static function has_item_count( array $values, $lower = false, $upper = false ) { |
| 102 | + return self::in_range(count($values), $lower, $upper); |
| 103 | + } |
| 104 | + |
| 105 | + /** |
| 106 | + * Returns whether the list of values does not have any duplicates. |
| 107 | + * |
| 108 | + * @param array $values |
| 109 | + * |
| 110 | + * @return boolean |
| 111 | + */ |
| 112 | + public static function has_unique_items( array $values ) { |
| 113 | + return count($values) == count(array_unique($values)); |
| 114 | + } |
| 115 | + |
| 116 | + /** |
| 117 | + * Returns the result of preg_match. |
| 118 | + * |
| 119 | + * @param string $value |
| 120 | + * @param string $pattern |
| 121 | + * |
| 122 | + * @return boolean |
| 123 | + */ |
| 124 | + public static function regex( $value, $pattern ) { |
| 125 | + return (bool)preg_match($pattern, $value); |
| 126 | + } |
| 127 | +} |
Property changes on: tags/extensions/Validator/REL_0_2_2/Validator_Functions.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 128 | + native |
Index: tags/extensions/Validator/REL_0_2_2/Validator_Manager.php |
— | — | @@ -0,0 +1,144 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * File holding the ValidatorManager class. |
| 6 | + * |
| 7 | + * @file ValidatorManager.php |
| 8 | + * @ingroup Validator |
| 9 | + * |
| 10 | + * @author Jeroen De Dauw |
| 11 | + */ |
| 12 | + |
| 13 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 14 | + die( 'Not an entry point.' ); |
| 15 | +} |
| 16 | + |
| 17 | +/** |
| 18 | + * Class for parameter handling. |
| 19 | + * |
| 20 | + * @ingroup Validator |
| 21 | + * |
| 22 | + * @author Jeroen De Dauw |
| 23 | + */ |
| 24 | +final class ValidatorManager { |
| 25 | + |
| 26 | + private $errors = array(); |
| 27 | + |
| 28 | + /** |
| 29 | + * Validates the provided parameters, and corrects them depending on the error level. |
| 30 | + * |
| 31 | + * @param array $rawParameters The raw parameters, as provided by the user. |
| 32 | + * @param array $parameterInfo Array containing the parameter definitions, which are needed for validation and defaulting. |
| 33 | + * |
| 34 | + * @return array or false The valid parameters or false when the output should not be shown. |
| 35 | + */ |
| 36 | + public function manageMapparameters( array $rawParameters, array $parameterInfo ) { |
| 37 | + global $egValidatorErrorLevel; |
| 38 | + |
| 39 | + $validator = new Validator(); |
| 40 | + |
| 41 | + $validator->setParameterInfo( $parameterInfo ); |
| 42 | + $validator->setParameters( $rawParameters ); |
| 43 | + |
| 44 | + if ( ! $validator->validateParameters() ) { |
| 45 | + if ( $egValidatorErrorLevel != Validator_ERRORS_STRICT ) $validator->correctInvalidParams(); |
| 46 | + if ( $egValidatorErrorLevel >= Validator_ERRORS_WARN ) $this->errors = $validator->getErrors(); |
| 47 | + } |
| 48 | + |
| 49 | + $showOutput = ! ( $egValidatorErrorLevel == Validator_ERRORS_STRICT && count( $this->errors ) > 0 ); |
| 50 | + |
| 51 | + return $showOutput ? $validator->getValidParams() : false; |
| 52 | + } |
| 53 | + |
| 54 | + /** |
| 55 | + * Returns a string containing an HTML error list, or an empty string when there are no errors. |
| 56 | + * |
| 57 | + * @return string |
| 58 | + */ |
| 59 | + public function getErrorList() { |
| 60 | + global $wgLang; |
| 61 | + global $egValidatorErrorLevel; |
| 62 | + |
| 63 | + $error_count = count( $this->errors ) ; |
| 64 | + |
| 65 | + if ( $egValidatorErrorLevel >= Validator_ERRORS_SHOW && $error_count > 0 ) { |
| 66 | + $errorList = '<b>' . wfMsgExt( 'validator_error_parameters', 'parsemag', $error_count ) . '</b><br /><i>'; |
| 67 | + |
| 68 | + $errors = array(); |
| 69 | + |
| 70 | + foreach ( $this->errors as $error ) { |
| 71 | + $error['name'] = '<b>' . Sanitizer::escapeId($error['name']) . '</b>'; |
| 72 | + |
| 73 | + if ($error['type'] == 'unknown') { |
| 74 | + $errors[] = wfMsgExt( 'validator_error_unknown_argument', array( 'parsemag' ), $error['name'] ); |
| 75 | + } |
| 76 | + elseif ($error['type'] == 'missing') { |
| 77 | + $errors[] = wfMsgExt( 'validator_error_required_missing', array( 'parsemag' ), $error['name'] ); |
| 78 | + } |
| 79 | + elseif (array_key_exists('list', $error) && $error['list']) { |
| 80 | + switch( $error['type'] ) { |
| 81 | + case 'not_empty' : |
| 82 | + $msg = wfMsgExt( 'validator_list_error_empty_argument', array( 'parsemag' ), $error['name'] ); |
| 83 | + break; |
| 84 | + case 'in_range' : |
| 85 | + $msg = wfMsgExt( 'validator_list_error_invalid_range', array( 'parsemag' ), $error['name'], '<b>' . $error['args'][0]. '</b>', '<b>' .$error['args'][1]. '</b>' ); |
| 86 | + break; |
| 87 | + case 'is_numeric' : |
| 88 | + $msg = wfMsgExt( 'validator_list_error_must_be_number', array( 'parsemag' ), $error['name'] ); |
| 89 | + break; |
| 90 | + case 'is_integer' : |
| 91 | + $msg = wfMsgExt( 'validator_list_error_must_be_integer', array( 'parsemag' ), $error['name'] ); |
| 92 | + break; |
| 93 | + case 'in_array' : |
| 94 | + $itemsText = $wgLang->listToText( $error['args'] ); |
| 95 | + $msg = wfMsgExt( 'validator_error_accepts_only', array( 'parsemag' ), $error['name'], $itemsText, count( $error['args'] ) ); |
| 96 | + break; |
| 97 | + case 'invalid' : default : |
| 98 | + $msg = wfMsgExt( 'validator_list_error_invalid_argument', array( 'parsemag' ), $error['name'] ); |
| 99 | + break; |
| 100 | + } |
| 101 | + |
| 102 | + if (array_key_exists('invalid-items', $error)) { |
| 103 | + $omitted = array(); |
| 104 | + foreach($error['invalid-items'] as $item) $omitted[] = Sanitizer::escapeId($item); |
| 105 | + $msg .= ' ' . wfMsgExt( 'validator_list_omitted', array( 'parsemag' ), |
| 106 | + $wgLang->listToText($omitted), count($omitted) ); |
| 107 | + } |
| 108 | + |
| 109 | + $errors[] = $msg; |
| 110 | + } |
| 111 | + else { |
| 112 | + switch( $error['type'] ) { |
| 113 | + case 'not_empty' : |
| 114 | + $errors[] = wfMsgExt( 'validator_error_empty_argument', array( 'parsemag' ), $error['name'] ); |
| 115 | + break; |
| 116 | + case 'in_range' : |
| 117 | + $errors[] = wfMsgExt( 'validator_error_invalid_range', array( 'parsemag' ), $error['name'], '<b>' . $error['args'][0]. '</b>', '<b>' .$error['args'][1]. '</b>' ); |
| 118 | + break; |
| 119 | + case 'is_numeric' : |
| 120 | + $errors[] = wfMsgExt( 'validator_error_must_be_number', array( 'parsemag' ), $error['name'] ); |
| 121 | + break; |
| 122 | + case 'is_integer' : |
| 123 | + $errors[] = wfMsgExt( 'validator_error_must_be_integer', array( 'parsemag' ), $error['name'] ); |
| 124 | + break; |
| 125 | + case 'in_array' : |
| 126 | + $itemsText = $wgLang->listToText( $error['args'] ); |
| 127 | + $errors[] = wfMsgExt( 'validator_error_accepts_only', array( 'parsemag' ), $error['name'], $itemsText, count( $error['args'] ) ); |
| 128 | + break; |
| 129 | + case 'invalid' : default : |
| 130 | + $errors[] = wfMsgExt( 'validator_error_invalid_argument', array( 'parsemag' ), '<b>' . Sanitizer::escapeId( $error['value'] ) . '</b>', $error['name'] ); |
| 131 | + break; |
| 132 | + } |
| 133 | + } |
| 134 | + } |
| 135 | + |
| 136 | + return $errorList . implode( $errors, '<br />' ) . '</i><br />'; |
| 137 | + } |
| 138 | + elseif ( $egValidatorErrorLevel == Validator_ERRORS_WARN && $error_count > 0 ) { |
| 139 | + return '<b>' . wfMsgExt( 'validator_warning_parameters', array( 'parsemag' ), $error_count ) . '</b>'; |
| 140 | + } |
| 141 | + else { |
| 142 | + return ''; |
| 143 | + } |
| 144 | + } |
| 145 | +} |
Property changes on: tags/extensions/Validator/REL_0_2_2/Validator_Manager.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 146 | + native |
Index: tags/extensions/Validator/REL_0_2_2/INSTALL |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +[[Validator 0.2.2]]
|
| 3 | +
|
| 4 | +Once you have downloaded the code, place the 'SemanticMaps' 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_2_2/RELEASE-NOTES |
— | — | @@ -0,0 +1,41 @@ |
| 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 0.2.2 ===
|
| 9 | +(2010-03-01)
|
| 10 | +
|
| 11 | +* Fixed potential xss vectors.
|
| 12 | +
|
| 13 | +* Minor code improvements.
|
| 14 | +
|
| 15 | +=== Validator 0.2.1 ===
|
| 16 | +(2010-02-01)
|
| 17 | +
|
| 18 | +* Changed the inclusion of the upper bound for range validation functions.
|
| 19 | +
|
| 20 | +* Small language fixes.
|
| 21 | +
|
| 22 | +=== Validator 0.2 ===
|
| 23 | +(2009-12-25)
|
| 24 | +
|
| 25 | +* Added handling for lists of a type, instead of having list as a type. This includes per-item-validation and per-item-defaulting.
|
| 26 | +
|
| 27 | +* Added list validation functions: item_count and unique_items
|
| 28 | +
|
| 29 | +* Added boolean, number and char types.
|
| 30 | +
|
| 31 | +* 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.
|
| 32 | +
|
| 33 | +* Added Validator_ERRORS_MINIMAL value for $egValidatorErrorLevel.
|
| 34 | +
|
| 35 | +* Added warning message to ValidatorManager that will be shown for errors when egValidatorErrorLevel is Validator_ERRORS_WARN.
|
| 36 | +
|
| 37 | +* Added criteria support for is_boolean, has_length and regex.
|
| 38 | +
|
| 39 | +=== Validator 0.1 ===
|
| 40 | +(2009-12-17)
|
| 41 | +
|
| 42 | +* Initial release, featuring parameter validation, defaulting and error generation.
|
Index: tags/extensions/Validator/REL_0_2_2/Validator_Formats.php |
— | — | @@ -0,0 +1,120 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * File holding the ValidatorFormats class. |
| 5 | + * |
| 6 | + * @file ValidatorFormats.php |
| 7 | + * @ingroup Validator |
| 8 | + * |
| 9 | + * @author Jeroen De Dauw |
| 10 | + */ |
| 11 | + |
| 12 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 13 | + die( 'Not an entry point.' ); |
| 14 | +} |
| 15 | + |
| 16 | +/** |
| 17 | + * Class holding variouse static methods for the appliance of output formats. |
| 18 | + * |
| 19 | + * @ingroup Validator |
| 20 | + * |
| 21 | + * @author Jeroen De Dauw |
| 22 | + */ |
| 23 | +final class ValidatorFormats { |
| 24 | + |
| 25 | + /** |
| 26 | + * Ensures the value is an array. |
| 27 | + * |
| 28 | + * @param $value |
| 29 | + */ |
| 30 | + public static function format_array( &$value ) { |
| 31 | + if (! is_array($value)) $value = array($value); |
| 32 | + } |
| 33 | + |
| 34 | + /** |
| 35 | + * Ensures the value is an array. |
| 36 | + * |
| 37 | + * @param $value |
| 38 | + */ |
| 39 | + public static function format_filtered_array( &$value ) { |
| 40 | + // TODO: It's possible the way the allowed values are passed here is quite inneficient... |
| 41 | + $params = func_get_args(); |
| 42 | + array_shift( $params ); // Ommit the value |
| 43 | + |
| 44 | + self::format_array($value); |
| 45 | + $filtered = array(); |
| 46 | + foreach($value as $item) if (in_array($item, $params)) $filtered[] = $item; |
| 47 | + |
| 48 | + return $filtered; |
| 49 | + } |
| 50 | + |
| 51 | + /** |
| 52 | + * Changes the value to list notation, by separating items with a delimiter, |
| 53 | + * and/or adding wrappers before and after the items. Intended for lists, but |
| 54 | + * will also work for single values. |
| 55 | + * |
| 56 | + * @param $value |
| 57 | + * @param $delimiter |
| 58 | + * @param $wrapper |
| 59 | + */ |
| 60 | + public static function format_list( &$value, $delimiter = ',', $wrapper = '' ) { |
| 61 | + self::format_array($value); |
| 62 | + $value = $wrapper . implode($wrapper . $delimiter . $wrapper, $value) . $wrapper; |
| 63 | + } |
| 64 | + |
| 65 | + /** |
| 66 | + * Changes every value into a boolean. |
| 67 | + * |
| 68 | + * TODO: work with a list of true-values. |
| 69 | + * |
| 70 | + * @param $value |
| 71 | + */ |
| 72 | + public static function format_boolean( &$value ) { |
| 73 | + if (is_array($value)) { |
| 74 | + $boolArray = array(); |
| 75 | + foreach ($value as $item) $boolArray[] = in_array($item, array('yes', 'on')); |
| 76 | + $value = $boolArray; |
| 77 | + } |
| 78 | + else { |
| 79 | + $value = in_array($value, array('yes', 'on')); |
| 80 | + } |
| 81 | + } |
| 82 | + |
| 83 | + /** |
| 84 | + * Changes every value into a boolean, represented by a 'false' or 'true' string. |
| 85 | + * |
| 86 | + * @param $value |
| 87 | + */ |
| 88 | + public static function format_boolean_string( &$value ) { |
| 89 | + self::format_boolean($value); |
| 90 | + if (is_array($value)) { |
| 91 | + $boolArray = array(); |
| 92 | + foreach ($value as $item) $boolArray[] = $item ? 'true' : 'false'; |
| 93 | + $value = $boolArray; |
| 94 | + } |
| 95 | + else { |
| 96 | + $value = $value ? 'true' : 'false'; |
| 97 | + } |
| 98 | + } |
| 99 | + |
| 100 | + /** |
| 101 | + * Changes lists into strings, by enumerating the items using $wgLang->listToText. |
| 102 | + * |
| 103 | + * @param $value |
| 104 | + */ |
| 105 | + public static function format_string( &$value ) { |
| 106 | + if (is_array($value)) { |
| 107 | + global $wgLang; |
| 108 | + $value = $wgLang->listToText($value); |
| 109 | + } |
| 110 | + } |
| 111 | + |
| 112 | + /** |
| 113 | + * Removes duplicate items from lists. |
| 114 | + * |
| 115 | + * @param $value |
| 116 | + */ |
| 117 | + public static function format_unique_items( &$value ) { |
| 118 | + if (is_array($value)) $value = array_unique($value); |
| 119 | + } |
| 120 | + |
| 121 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_2_2/Validator_Formats.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 122 | + native |
Index: tags/extensions/Validator/REL_0_2_2/COPYING |
— | — | @@ -0,0 +1,348 @@ |
| 2 | +The license text below "----" applies to all files within this distribution, other
|
| 3 | +than those that are in a directory which contains files named "LICENSE" or
|
| 4 | +"COPYING", or a subdirectory thereof. For those files, the license text contained in
|
| 5 | +said file overrides any license information contained in directories of smaller depth.
|
| 6 | +Alternative licenses are typically used for software that is provided by external
|
| 7 | +parties, and merely packaged with the Semantic MediaWiki release for convenience.
|
| 8 | +----
|
| 9 | +
|
| 10 | + GNU GENERAL PUBLIC LICENSE
|
| 11 | + Version 2, June 1991
|
| 12 | +
|
| 13 | + Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
| 14 | + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
| 15 | + Everyone is permitted to copy and distribute verbatim copies
|
| 16 | + of this license document, but changing it is not allowed.
|
| 17 | +
|
| 18 | + Preamble
|
| 19 | +
|
| 20 | + The licenses for most software are designed to take away your
|
| 21 | +freedom to share and change it. By contrast, the GNU General Public
|
| 22 | +License is intended to guarantee your freedom to share and change free
|
| 23 | +software--to make sure the software is free for all its users. This
|
| 24 | +General Public License applies to most of the Free Software
|
| 25 | +Foundation's software and to any other program whose authors commit to
|
| 26 | +using it. (Some other Free Software Foundation software is covered by
|
| 27 | +the GNU Library General Public License instead.) You can apply it to
|
| 28 | +your programs, too.
|
| 29 | +
|
| 30 | + When we speak of free software, we are referring to freedom, not
|
| 31 | +price. Our General Public Licenses are designed to make sure that you
|
| 32 | +have the freedom to distribute copies of free software (and charge for
|
| 33 | +this service if you wish), that you receive source code or can get it
|
| 34 | +if you want it, that you can change the software or use pieces of it
|
| 35 | +in new free programs; and that you know you can do these things.
|
| 36 | +
|
| 37 | + To protect your rights, we need to make restrictions that forbid
|
| 38 | +anyone to deny you these rights or to ask you to surrender the rights.
|
| 39 | +These restrictions translate to certain responsibilities for you if you
|
| 40 | +distribute copies of the software, or if you modify it.
|
| 41 | +
|
| 42 | + For example, if you distribute copies of such a program, whether
|
| 43 | +gratis or for a fee, you must give the recipients all the rights that
|
| 44 | +you have. You must make sure that they, too, receive or can get the
|
| 45 | +source code. And you must show them these terms so they know their
|
| 46 | +rights.
|
| 47 | +
|
| 48 | + We protect your rights with two steps: (1) copyright the software, and
|
| 49 | +(2) offer you this license which gives you legal permission to copy,
|
| 50 | +distribute and/or modify the software.
|
| 51 | +
|
| 52 | + Also, for each author's protection and ours, we want to make certain
|
| 53 | +that everyone understands that there is no warranty for this free
|
| 54 | +software. If the software is modified by someone else and passed on, we
|
| 55 | +want its recipients to know that what they have is not the original, so
|
| 56 | +that any problems introduced by others will not reflect on the original
|
| 57 | +authors' reputations.
|
| 58 | +
|
| 59 | + Finally, any free program is threatened constantly by software
|
| 60 | +patents. We wish to avoid the danger that redistributors of a free
|
| 61 | +program will individually obtain patent licenses, in effect making the
|
| 62 | +program proprietary. To prevent this, we have made it clear that any
|
| 63 | +patent must be licensed for everyone's free use or not licensed at all.
|
| 64 | +
|
| 65 | + The precise terms and conditions for copying, distribution and
|
| 66 | +modification follow.
|
| 67 | +
|
| 68 | + GNU GENERAL PUBLIC LICENSE
|
| 69 | + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
| 70 | +
|
| 71 | + 0. This License applies to any program or other work which contains
|
| 72 | +a notice placed by the copyright holder saying it may be distributed
|
| 73 | +under the terms of this General Public License. The "Program", below,
|
| 74 | +refers to any such program or work, and a "work based on the Program"
|
| 75 | +means either the Program or any derivative work under copyright law:
|
| 76 | +that is to say, a work containing the Program or a portion of it,
|
| 77 | +either verbatim or with modifications and/or translated into another
|
| 78 | +language. (Hereinafter, translation is included without limitation in
|
| 79 | +the term "modification".) Each licensee is addressed as "you".
|
| 80 | +
|
| 81 | +Activities other than copying, distribution and modification are not
|
| 82 | +covered by this License; they are outside its scope. The act of
|
| 83 | +running the Program is not restricted, and the output from the Program
|
| 84 | +is covered only if its contents constitute a work based on the
|
| 85 | +Program (independent of having been made by running the Program).
|
| 86 | +Whether that is true depends on what the Program does.
|
| 87 | +
|
| 88 | + 1. You may copy and distribute verbatim copies of the Program's
|
| 89 | +source code as you receive it, in any medium, provided that you
|
| 90 | +conspicuously and appropriately publish on each copy an appropriate
|
| 91 | +copyright notice and disclaimer of warranty; keep intact all the
|
| 92 | +notices that refer to this License and to the absence of any warranty;
|
| 93 | +and give any other recipients of the Program a copy of this License
|
| 94 | +along with the Program.
|
| 95 | +
|
| 96 | +You may charge a fee for the physical act of transferring a copy, and
|
| 97 | +you may at your option offer warranty protection in exchange for a fee.
|
| 98 | +
|
| 99 | + 2. You may modify your copy or copies of the Program or any portion
|
| 100 | +of it, thus forming a work based on the Program, and copy and
|
| 101 | +distribute such modifications or work under the terms of Section 1
|
| 102 | +above, provided that you also meet all of these conditions:
|
| 103 | +
|
| 104 | + a) You must cause the modified files to carry prominent notices
|
| 105 | + stating that you changed the files and the date of any change.
|
| 106 | +
|
| 107 | + b) You must cause any work that you distribute or publish, that in
|
| 108 | + whole or in part contains or is derived from the Program or any
|
| 109 | + part thereof, to be licensed as a whole at no charge to all third
|
| 110 | + parties under the terms of this License.
|
| 111 | +
|
| 112 | + c) If the modified program normally reads commands interactively
|
| 113 | + when run, you must cause it, when started running for such
|
| 114 | + interactive use in the most ordinary way, to print or display an
|
| 115 | + announcement including an appropriate copyright notice and a
|
| 116 | + notice that there is no warranty (or else, saying that you provide
|
| 117 | + a warranty) and that users may redistribute the program under
|
| 118 | + these conditions, and telling the user how to view a copy of this
|
| 119 | + License. (Exception: if the Program itself is interactive but
|
| 120 | + does not normally print such an announcement, your work based on
|
| 121 | + the Program is not required to print an announcement.)
|
| 122 | +
|
| 123 | +These requirements apply to the modified work as a whole. If
|
| 124 | +identifiable sections of that work are not derived from the Program,
|
| 125 | +and can be reasonably considered independent and separate works in
|
| 126 | +themselves, then this License, and its terms, do not apply to those
|
| 127 | +sections when you distribute them as separate works. But when you
|
| 128 | +distribute the same sections as part of a whole which is a work based
|
| 129 | +on the Program, the distribution of the whole must be on the terms of
|
| 130 | +this License, whose permissions for other licensees extend to the
|
| 131 | +entire whole, and thus to each and every part regardless of who wrote it.
|
| 132 | +
|
| 133 | +Thus, it is not the intent of this section to claim rights or contest
|
| 134 | +your rights to work written entirely by you; rather, the intent is to
|
| 135 | +exercise the right to control the distribution of derivative or
|
| 136 | +collective works based on the Program.
|
| 137 | +
|
| 138 | +In addition, mere aggregation of another work not based on the Program
|
| 139 | +with the Program (or with a work based on the Program) on a volume of
|
| 140 | +a storage or distribution medium does not bring the other work under
|
| 141 | +the scope of this License.
|
| 142 | +
|
| 143 | + 3. You may copy and distribute the Program (or a work based on it,
|
| 144 | +under Section 2) in object code or executable form under the terms of
|
| 145 | +Sections 1 and 2 above provided that you also do one of the following:
|
| 146 | +
|
| 147 | + a) Accompany it with the complete corresponding machine-readable
|
| 148 | + source code, which must be distributed under the terms of Sections
|
| 149 | + 1 and 2 above on a medium customarily used for software interchange; or,
|
| 150 | +
|
| 151 | + b) Accompany it with a written offer, valid for at least three
|
| 152 | + years, to give any third party, for a charge no more than your
|
| 153 | + cost of physically performing source distribution, a complete
|
| 154 | + machine-readable copy of the corresponding source code, to be
|
| 155 | + distributed under the terms of Sections 1 and 2 above on a medium
|
| 156 | + customarily used for software interchange; or,
|
| 157 | +
|
| 158 | + c) Accompany it with the information you received as to the offer
|
| 159 | + to distribute corresponding source code. (This alternative is
|
| 160 | + allowed only for noncommercial distribution and only if you
|
| 161 | + received the program in object code or executable form with such
|
| 162 | + an offer, in accord with Subsection b above.)
|
| 163 | +
|
| 164 | +The source code for a work means the preferred form of the work for
|
| 165 | +making modifications to it. For an executable work, complete source
|
| 166 | +code means all the source code for all modules it contains, plus any
|
| 167 | +associated interface definition files, plus the scripts used to
|
| 168 | +control compilation and installation of the executable. However, as a
|
| 169 | +special exception, the source code distributed need not include
|
| 170 | +anything that is normally distributed (in either source or binary
|
| 171 | +form) with the major components (compiler, kernel, and so on) of the
|
| 172 | +operating system on which the executable runs, unless that component
|
| 173 | +itself accompanies the executable.
|
| 174 | +
|
| 175 | +If distribution of executable or object code is made by offering
|
| 176 | +access to copy from a designated place, then offering equivalent
|
| 177 | +access to copy the source code from the same place counts as
|
| 178 | +distribution of the source code, even though third parties are not
|
| 179 | +compelled to copy the source along with the object code.
|
| 180 | +
|
| 181 | + 4. You may not copy, modify, sublicense, or distribute the Program
|
| 182 | +except as expressly provided under this License. Any attempt
|
| 183 | +otherwise to copy, modify, sublicense or distribute the Program is
|
| 184 | +void, and will automatically terminate your rights under this License.
|
| 185 | +However, parties who have received copies, or rights, from you under
|
| 186 | +this License will not have their licenses terminated so long as such
|
| 187 | +parties remain in full compliance.
|
| 188 | +
|
| 189 | + 5. You are not required to accept this License, since you have not
|
| 190 | +signed it. However, nothing else grants you permission to modify or
|
| 191 | +distribute the Program or its derivative works. These actions are
|
| 192 | +prohibited by law if you do not accept this License. Therefore, by
|
| 193 | +modifying or distributing the Program (or any work based on the
|
| 194 | +Program), you indicate your acceptance of this License to do so, and
|
| 195 | +all its terms and conditions for copying, distributing or modifying
|
| 196 | +the Program or works based on it.
|
| 197 | +
|
| 198 | + 6. Each time you redistribute the Program (or any work based on the
|
| 199 | +Program), the recipient automatically receives a license from the
|
| 200 | +original licensor to copy, distribute or modify the Program subject to
|
| 201 | +these terms and conditions. You may not impose any further
|
| 202 | +restrictions on the recipients' exercise of the rights granted herein.
|
| 203 | +You are not responsible for enforcing compliance by third parties to
|
| 204 | +this License.
|
| 205 | +
|
| 206 | + 7. If, as a consequence of a court judgment or allegation of patent
|
| 207 | +infringement or for any other reason (not limited to patent issues),
|
| 208 | +conditions are imposed on you (whether by court order, agreement or
|
| 209 | +otherwise) that contradict the conditions of this License, they do not
|
| 210 | +excuse you from the conditions of this License. If you cannot
|
| 211 | +distribute so as to satisfy simultaneously your obligations under this
|
| 212 | +License and any other pertinent obligations, then as a consequence you
|
| 213 | +may not distribute the Program at all. For example, if a patent
|
| 214 | +license would not permit royalty-free redistribution of the Program by
|
| 215 | +all those who receive copies directly or indirectly through you, then
|
| 216 | +the only way you could satisfy both it and this License would be to
|
| 217 | +refrain entirely from distribution of the Program.
|
| 218 | +
|
| 219 | +If any portion of this section is held invalid or unenforceable under
|
| 220 | +any particular circumstance, the balance of the section is intended to
|
| 221 | +apply and the section as a whole is intended to apply in other
|
| 222 | +circumstances.
|
| 223 | +
|
| 224 | +It is not the purpose of this section to induce you to infringe any
|
| 225 | +patents or other property right claims or to contest validity of any
|
| 226 | +such claims; this section has the sole purpose of protecting the
|
| 227 | +integrity of the free software distribution system, which is
|
| 228 | +implemented by public license practices. Many people have made
|
| 229 | +generous contributions to the wide range of software distributed
|
| 230 | +through that system in reliance on consistent application of that
|
| 231 | +system; it is up to the author/donor to decide if he or she is willing
|
| 232 | +to distribute software through any other system and a licensee cannot
|
| 233 | +impose that choice.
|
| 234 | +
|
| 235 | +This section is intended to make thoroughly clear what is believed to
|
| 236 | +be a consequence of the rest of this License.
|
| 237 | +
|
| 238 | + 8. If the distribution and/or use of the Program is restricted in
|
| 239 | +certain countries either by patents or by copyrighted interfaces, the
|
| 240 | +original copyright holder who places the Program under this License
|
| 241 | +may add an explicit geographical distribution limitation excluding
|
| 242 | +those countries, so that distribution is permitted only in or among
|
| 243 | +countries not thus excluded. In such case, this License incorporates
|
| 244 | +the limitation as if written in the body of this License.
|
| 245 | +
|
| 246 | + 9. The Free Software Foundation may publish revised and/or new versions
|
| 247 | +of the General Public License from time to time. Such new versions will
|
| 248 | +be similar in spirit to the present version, but may differ in detail to
|
| 249 | +address new problems or concerns.
|
| 250 | +
|
| 251 | +Each version is given a distinguishing version number. If the Program
|
| 252 | +specifies a version number of this License which applies to it and "any
|
| 253 | +later version", you have the option of following the terms and conditions
|
| 254 | +either of that version or of any later version published by the Free
|
| 255 | +Software Foundation. If the Program does not specify a version number of
|
| 256 | +this License, you may choose any version ever published by the Free Software
|
| 257 | +Foundation.
|
| 258 | +
|
| 259 | + 10. If you wish to incorporate parts of the Program into other free
|
| 260 | +programs whose distribution conditions are different, write to the author
|
| 261 | +to ask for permission. For software which is copyrighted by the Free
|
| 262 | +Software Foundation, write to the Free Software Foundation; we sometimes
|
| 263 | +make exceptions for this. Our decision will be guided by the two goals
|
| 264 | +of preserving the free status of all derivatives of our free software and
|
| 265 | +of promoting the sharing and reuse of software generally.
|
| 266 | +
|
| 267 | + NO WARRANTY
|
| 268 | +
|
| 269 | + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
| 270 | +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
| 271 | +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
| 272 | +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
| 273 | +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
| 274 | +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
| 275 | +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
| 276 | +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
| 277 | +REPAIR OR CORRECTION.
|
| 278 | +
|
| 279 | + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
| 280 | +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
| 281 | +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
| 282 | +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
| 283 | +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
| 284 | +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
| 285 | +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
| 286 | +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
| 287 | +POSSIBILITY OF SUCH DAMAGES.
|
| 288 | +
|
| 289 | + END OF TERMS AND CONDITIONS
|
| 290 | +
|
| 291 | + How to Apply These Terms to Your New Programs
|
| 292 | +
|
| 293 | + If you develop a new program, and you want it to be of the greatest
|
| 294 | +possible use to the public, the best way to achieve this is to make it
|
| 295 | +free software which everyone can redistribute and change under these terms.
|
| 296 | +
|
| 297 | + To do so, attach the following notices to the program. It is safest
|
| 298 | +to attach them to the start of each source file to most effectively
|
| 299 | +convey the exclusion of warranty; and each file should have at least
|
| 300 | +the "copyright" line and a pointer to where the full notice is found.
|
| 301 | +
|
| 302 | + <one line to give the program's name and a brief idea of what it does.>
|
| 303 | + Copyright (C) <year> <name of author>
|
| 304 | +
|
| 305 | + This program is free software; you can redistribute it and/or modify
|
| 306 | + it under the terms of the GNU General Public License as published by
|
| 307 | + the Free Software Foundation; either version 2 of the License, or
|
| 308 | + (at your option) any later version.
|
| 309 | +
|
| 310 | + This program is distributed in the hope that it will be useful,
|
| 311 | + but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 312 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 313 | + GNU General Public License for more details.
|
| 314 | +
|
| 315 | + You should have received a copy of the GNU General Public License
|
| 316 | + along with this program; if not, write to the Free Software
|
| 317 | + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
| 318 | +
|
| 319 | +
|
| 320 | +Also add information on how to contact you by electronic and paper mail.
|
| 321 | +
|
| 322 | +If the program is interactive, make it output a short notice like this
|
| 323 | +when it starts in an interactive mode:
|
| 324 | +
|
| 325 | + Gnomovision version 69, Copyright (C) year name of author
|
| 326 | + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
| 327 | + This is free software, and you are welcome to redistribute it
|
| 328 | + under certain conditions; type `show c' for details.
|
| 329 | +
|
| 330 | +The hypothetical commands `show w' and `show c' should show the appropriate
|
| 331 | +parts of the General Public License. Of course, the commands you use may
|
| 332 | +be called something other than `show w' and `show c'; they could even be
|
| 333 | +mouse-clicks or menu items--whatever suits your program.
|
| 334 | +
|
| 335 | +You should also get your employer (if you work as a programmer) or your
|
| 336 | +school, if any, to sign a "copyright disclaimer" for the program, if
|
| 337 | +necessary. Here is a sample; alter the names:
|
| 338 | +
|
| 339 | + Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
| 340 | + `Gnomovision' (which makes passes at compilers) written by James Hacker.
|
| 341 | +
|
| 342 | + <signature of Ty Coon>, 1 April 1989
|
| 343 | + Ty Coon, President of Vice
|
| 344 | +
|
| 345 | +This General Public License does not permit incorporating your program into
|
| 346 | +proprietary programs. If your program is a subroutine library, you may
|
| 347 | +consider it more useful to permit linking proprietary applications with the
|
| 348 | +library. If this is what you want to do, use the GNU Library General
|
| 349 | +Public License instead of this License.
|
Index: tags/extensions/Validator/REL_0_2_2/Validator.i18n.php |
— | — | @@ -0,0 +1,837 @@ |
| 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_name' => 'Validator', |
| 20 | + 'validator-desc' => 'Validator provides an easy way for other extensions to validate parameters of parser functions and tag extensions, set default values and generate error messages', |
| 21 | + |
| 22 | + 'validator_error_parameters' => 'The following {{PLURAL:$1|error has|errors have}} been detected in your syntax:', |
| 23 | + 'validator_warning_parameters' => 'There {{PLURAL:$1|is an error|are errors}} in your syntax.', |
| 24 | + |
| 25 | + // General errors |
| 26 | + 'validator_error_unknown_argument' => '$1 is not a valid parameter.', |
| 27 | + 'validator_error_required_missing' => 'The required parameter $1 is not provided.', |
| 28 | + |
| 29 | + // Criteria errors for single values |
| 30 | + 'validator_error_empty_argument' => 'Parameter $1 can not have an empty value.', |
| 31 | + 'validator_error_must_be_number' => 'Parameter $1 can only be a number.', |
| 32 | + 'validator_error_must_be_integer' => 'Parameter $1 can only be an integer.', |
| 33 | + 'validator_error_invalid_range' => 'Parameter $1 must be between $2 and $3.', |
| 34 | + 'validator_error_invalid_argument' => 'The value $1 is not valid for parameter $2.', |
| 35 | + |
| 36 | + // Criteria errors for lists |
| 37 | + 'validator_list_error_empty_argument' => 'Parameter $1 does not accept empty values.', |
| 38 | + 'validator_list_error_must_be_number' => 'Parameter $1 can only contain numbers.', |
| 39 | + 'validator_list_error_must_be_integer' => 'Parameter $1 can only contain integers.', |
| 40 | + 'validator_list_error_invalid_range' => 'All values of parameter $1 must be between $2 and $3.', |
| 41 | + 'validator_list_error_invalid_argument' => 'One or more values for parameter $1 are invalid.', |
| 42 | + |
| 43 | + 'validator_list_omitted' => 'The {{PLURAL:$2|value|values}} $1 {{PLURAL:$2|has|have}} been omitted.', |
| 44 | + |
| 45 | + // Crtiteria errors for single values & lists |
| 46 | + 'validator_error_accepts_only' => 'Parameter $1 only accepts {{PLURAL:$3|this value|these values}}: $2.', |
| 47 | +); |
| 48 | + |
| 49 | +/** Message documentation (Message documentation) |
| 50 | + * @author Fryed-peach |
| 51 | + * @author Purodha |
| 52 | + */ |
| 53 | +$messages['qqq'] = array( |
| 54 | + 'validator-desc' => '{{desc}}', |
| 55 | + 'validator_error_parameters' => 'Parameters: |
| 56 | +* $1 is the number of syntax errors, for PLURAL support (optional)', |
| 57 | +); |
| 58 | + |
| 59 | +/** Afrikaans (Afrikaans) |
| 60 | + * @author Naudefj |
| 61 | + */ |
| 62 | +$messages['af'] = array( |
| 63 | + 'validator_name' => 'Valideerder', |
| 64 | + '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', |
| 65 | + 'validator_error_parameters' => 'Die volgende {{PLURAL:$1|fout|foute}} is in u sintaks waargeneem:', |
| 66 | + 'validator_error_unknown_argument' => "$1 is nie 'n geldige parameter nie.", |
| 67 | + 'validator_error_required_missing' => 'Die verpligte parameter $1 is nie verskaf nie.', |
| 68 | + 'validator_error_empty_argument' => 'Die parameter $1 mag nie leeg wees nie.', |
| 69 | + 'validator_error_must_be_number' => "Die parameter $1 mag net 'n getal wees.", |
| 70 | + 'validator_error_must_be_integer' => "Die parameter $1 kan slegs 'n heelgetal wees.", |
| 71 | + 'validator_error_invalid_range' => 'Die parameter $1 moet tussen $2 en $3 lê.', |
| 72 | + 'validator_error_invalid_argument' => 'Die waarde $1 is nie geldig vir parameter $2 nie.', |
| 73 | + 'validator_error_accepts_only' => 'Die parameter $1 kan slegs die volgende {{PLURAL:$3|waarde|waardes}} hê: $2.', |
| 74 | +); |
| 75 | + |
| 76 | +/** Arabic (العربية) |
| 77 | + * @author Meno25 |
| 78 | + */ |
| 79 | +$messages['ar'] = array( |
| 80 | + 'validator_name' => 'محقق', |
| 81 | + 'validator-desc' => 'المحقق يوفر طريقة سهلة للامتدادات الأخرى للتحقق من محددات دوال المحلل وامتدادات الوسوم، وضبط القيم الافتراضية وتوليد رسائل الخطأ', |
| 82 | + 'validator_error_parameters' => '{{PLURAL:$1|الخطأ التالي|الاخطاء التالية}} تم كشفها في صياغتك:', |
| 83 | + 'validator_warning_parameters' => 'هناك {{PLURAL:$1|خطأ|أخطاء}} في صياغتك.', |
| 84 | + 'validator_error_unknown_argument' => '$1 ليس محددا صحيحا.', |
| 85 | + 'validator_error_required_missing' => 'المحدد المطلوب $1 ليس متوفرا.', |
| 86 | + 'validator_error_empty_argument' => 'المحدد $1 لا يمكن أن تكون قيمته فارغة.', |
| 87 | + 'validator_error_must_be_number' => 'المحدد $1 يمكن أن يكون فقط عددا.', |
| 88 | + 'validator_error_must_be_integer' => 'المحدد $1 يمكن أن يكون عددا صحيحا فقط.', |
| 89 | + 'validator_error_invalid_range' => 'المحدد $1 يجب أن يكون بين $2 و $3.', |
| 90 | + 'validator_error_invalid_argument' => 'القيمة $1 ليست صحيحة للمحدد $2.', |
| 91 | + 'validator_list_error_empty_argument' => 'المحدد $1 لا يقبل القيم الفارغة.', |
| 92 | + 'validator_list_error_must_be_number' => 'المحدد $1 يمكن أن يحتوي فقط على أرقام.', |
| 93 | + 'validator_list_error_must_be_integer' => 'المحدد $1 يمكن أن يحتوي فقط على أرقام صحيحة.', |
| 94 | + 'validator_list_error_invalid_range' => 'كل قيم المحدد $1 يجب أن تكون بين $2 و$3.', |
| 95 | + 'validator_list_error_invalid_argument' => 'قيمة واحدة أو أكثر للمحدد $1 غير صحيحة.', |
| 96 | + 'validator_list_omitted' => '{{PLURAL:$2|القيمة|القيم}} $1 {{PLURAL:$2|تم|تم}} مسحها.', |
| 97 | + 'validator_error_accepts_only' => 'المحدد $1 يقبل فقط {{PLURAL:$3|هذه القيمة|هذه القيم}}: $2.', |
| 98 | +); |
| 99 | + |
| 100 | +/** Egyptian Spoken Arabic (مصرى) |
| 101 | + * @author Meno25 |
| 102 | + */ |
| 103 | +$messages['arz'] = array( |
| 104 | + 'validator_name' => 'محقق', |
| 105 | +); |
| 106 | + |
| 107 | +/** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) |
| 108 | + * @author EugeneZelenko |
| 109 | + * @author Jim-by |
| 110 | + */ |
| 111 | +$messages['be-tarask'] = array( |
| 112 | + 'validator_name' => 'Правяраючы', |
| 113 | + 'validator-desc' => 'Правяраючы палягчае іншым пашырэньням працу па праверцы парамэтраў функцыяў парсэру і тэгаў пашырэньняў, устанаўлівае значэньні па змоўчваньні і стварае паведамленьні пра памылкі', |
| 114 | + 'validator_error_parameters' => 'У сынтаксісе {{PLURAL:$1|выяўленая наступная памылка|выяўленыя наступныя памылкі}}:', |
| 115 | + 'validator_warning_parameters' => 'У Вашы сынтаксісе {{PLURAL:$1|маецца памылка|маюцца памылкі}}.', |
| 116 | + 'validator_error_unknown_argument' => 'Няслушны парамэтар $1.', |
| 117 | + 'validator_error_required_missing' => 'Не пададзены абавязковы парамэтар $1.', |
| 118 | + 'validator_error_empty_argument' => 'Парамэтар $1 ня можа мець пустое значэньне.', |
| 119 | + 'validator_error_must_be_number' => 'Парамэтар $1 можа быць толькі лікам.', |
| 120 | + 'validator_error_must_be_integer' => 'Парамэтар $1 можа быць толькі цэлым лікам.', |
| 121 | + 'validator_error_invalid_range' => 'Парамэтар $1 павінен быць паміж $2 і $3.', |
| 122 | + 'validator_error_invalid_argument' => 'Значэньне $1 не зьяўляецца слушным для парамэтру $2.', |
| 123 | + 'validator_list_error_empty_argument' => 'Парамэтар $1 ня можа прымаць пустыя значэньні.', |
| 124 | + 'validator_list_error_must_be_number' => 'Парамэтар $1 можа ўтрымліваць толькі лікі.', |
| 125 | + 'validator_list_error_must_be_integer' => 'Парамэтар $1 можа ўтрымліваць толькі цэлыя лікі.', |
| 126 | + 'validator_list_error_invalid_range' => 'Усе значэньні парамэтру $1 павінны знаходзіцца паміж $2 і $3.', |
| 127 | + 'validator_list_error_invalid_argument' => 'Адно ці болей значэньняў парамэтру $1 зьяўляюцца няслушнымі.', |
| 128 | + 'validator_list_omitted' => '{{PLURAL:$2|Значэньне|Значэньні}} $1 {{PLURAL:$2|было прапушчанае|былі прапушчаныя}}.', |
| 129 | + 'validator_error_accepts_only' => 'Парамэтар $1 можа мець толькі {{PLURAL:$3|гэтае значэньне|гэтыя значэньні}}: $2.', |
| 130 | +); |
| 131 | + |
| 132 | +/** Bulgarian (Български) |
| 133 | + * @author DCLXVI |
| 134 | + * @author Reedy |
| 135 | + */ |
| 136 | +$messages['bg'] = array( |
| 137 | + 'validator_error_empty_argument' => 'Параметърът $1 не може да има празна стойност.', |
| 138 | +); |
| 139 | + |
| 140 | +/** Breton (Brezhoneg) |
| 141 | + * @author Fohanno |
| 142 | + * @author Fulup |
| 143 | + * @author Y-M D |
| 144 | + */ |
| 145 | +$messages['br'] = array( |
| 146 | + 'validator_name' => 'Kadarnataer', |
| 147 | + 'validator-desc' => 'Kadarnataer a zo un doare simpl evit gwiriañ arventennoù fonksionoù parser an astennoù all hag an astennoù balizennoù, evit termeniñ talvoudennoù dre ziouer ha merañ kemenadennoù fazioù', |
| 148 | + 'validator_error_parameters' => "Kavet eo bet ar {{PLURAL:$1|fazi|fazioù}} da-heul en hoc'h ereadur :", |
| 149 | + 'validator_warning_parameters' => "{{PLURAL:$1|Ur fazi|Fazioù}} zo en hoc'h ereadur.", |
| 150 | + 'validator_error_unknown_argument' => "$1 n'eo ket un arventenn reizh.", |
| 151 | + 'validator_error_required_missing' => "N'eo ket bet pourchaset an arventenn rekis $1", |
| 152 | + 'validator_error_empty_argument' => "N'hall ket an arventenn $1 bezañ goullo he zalvoudenn", |
| 153 | + 'validator_error_must_be_number' => 'Un niver e rank an arventenn $1 bezañ hepken.', |
| 154 | + 'validator_error_must_be_integer' => 'Rankout a ra an arventenn $1 bezañ un niver anterin.', |
| 155 | + 'validator_error_invalid_range' => 'Rankout a ra an arventenn $1 bezañ etre $2 hag $3.', |
| 156 | + 'validator_error_invalid_argument' => "N'eo ket reizh an dalvoudenn $1 evit an arventenn $2.", |
| 157 | + 'validator_list_error_empty_argument' => 'Ne tegemer ket an arventenn $1 an talvoudennoù goullo.', |
| 158 | + 'validator_list_error_must_be_number' => "Ne c'hell bezañ nemet niveroù an arventenn $1.", |
| 159 | + 'validator_list_error_must_be_integer' => "Ne c'hell bezañ nemet anterinoù an arventenn $1.", |
| 160 | + 'validator_list_error_invalid_range' => 'An holl talvoudennoù eus an arventenn $1 a rank bezañ etre $2 ha $3.', |
| 161 | + 'validator_list_error_invalid_argument' => "N'eo ket mat unan pe meur a dalvoudennoù eus an arventenn $1.", |
| 162 | + 'validator_list_omitted' => 'Disoñjet eo bet an {{PLURAL:$2|talvoudenn|talvoudennoù}} $1.', |
| 163 | + 'validator_error_accepts_only' => 'An arventenn $1 a zegemer hepken {{PLURAL:$3|an talvoudenn|an talvoudennoù}}-mañ : $2.', |
| 164 | +); |
| 165 | + |
| 166 | +/** Bosnian (Bosanski) |
| 167 | + * @author CERminator |
| 168 | + */ |
| 169 | +$messages['bs'] = array( |
| 170 | + 'validator_name' => 'Validator', |
| 171 | + '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.', |
| 172 | + 'validator_error_parameters' => 'U Vašoj sintaksi {{PLURAL:$1|je|su}} {{PLURAL:$1|otkivena slijedeća greška|otkrivene slijedeće greške}}:', |
| 173 | + 'validator_warning_parameters' => '{{PLURAL:$1|Postoji greška|Postoje greške}} u Vašoj sintaksi.', |
| 174 | + 'validator_error_unknown_argument' => '$1 nije valjan parametar.', |
| 175 | + 'validator_error_required_missing' => 'Obavezni parametar $1 nije naveden.', |
| 176 | + 'validator_error_empty_argument' => 'Parametar $1 ne može imati praznu vrijednost.', |
| 177 | + 'validator_error_must_be_number' => 'Parametar $1 može biti samo broj.', |
| 178 | + 'validator_error_must_be_integer' => 'Parametar $1 može biti samo cijeli broj.', |
| 179 | + 'validator_error_invalid_range' => 'Parametar $1 mora biti između $2 i $3.', |
| 180 | + 'validator_error_invalid_argument' => 'Vrijednost $1 nije valjana za parametar $2.', |
| 181 | + 'validator_list_error_empty_argument' => 'Parametar $1 ne prima prazne vrijednosti.', |
| 182 | + 'validator_list_error_must_be_number' => 'Parametar $1 može sadržavati samo brojeve.', |
| 183 | + 'validator_error_accepts_only' => 'Parametar $1 se može koristiti samo sa {{PLURAL:$3|ovom vrijednosti|ovim vrijednostima}}: $2.', |
| 184 | +); |
| 185 | + |
| 186 | +/** Czech (Česky) |
| 187 | + * @author Matěj Grabovský |
| 188 | + * @author Mormegil |
| 189 | + */ |
| 190 | +$messages['cs'] = array( |
| 191 | + 'validator_name' => 'Validátor', |
| 192 | + '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.', |
| 193 | + 'validator_error_parameters' => 'Ve vaší syntaxi {{PLURAL:$1|byla nalezena následující chyba|byly nalezeny následující chyby}}', |
| 194 | + 'validator_warning_parameters' => 'Ve vaší syntaxi {{PLURAL:$1|je chyba|jsou chyby}}.', |
| 195 | + 'validator_error_unknown_argument' => '$1 není platný parametr.', |
| 196 | + 'validator_error_required_missing' => 'Povinný parameter $1 nebyl specifikován.', |
| 197 | + 'validator_error_empty_argument' => 'Parametr $1 nemůže být prázdný.', |
| 198 | + 'validator_error_must_be_number' => 'Parametr $1 může být pouze číslo.', |
| 199 | + 'validator_error_must_be_integer' => 'Parametr $1 může být pouze celé číslo.', |
| 200 | + 'validator_error_invalid_range' => 'Parametr $1 musí být v rozmezí $2 až $3.', |
| 201 | + 'validator_error_invalid_argument' => '$1 není platná hodnota pro parametr $2.', |
| 202 | + 'validator_list_error_empty_argument' => 'Parametr $1 npeřijímá prázdné hoodnoty.', |
| 203 | + 'validator_list_error_must_be_number' => 'Parametr $1 může obsahovat pouze čísla.', |
| 204 | + 'validator_list_error_must_be_integer' => 'Paramter $1 může obsahovat pouze celá čísla.', |
| 205 | + 'validator_list_error_invalid_range' => 'Všechny hodnoty parametru $1 musí být v rozmezí $2 až $3.', |
| 206 | + 'validator_list_error_invalid_argument' => 'Jedna nebo více hodnot parametru $1 jsou neplatné.', |
| 207 | + 'validator_list_omitted' => '{{PLURAL:$2|Hodnota $1 byla vynechána|Hodnoty $1 byly vynechány}}.', |
| 208 | + 'validator_error_accepts_only' => 'Parametr $1 přijímá pouze {{PLURAL:$3|tuto hodnotu|tyto hodnoty}}: $2.', |
| 209 | +); |
| 210 | + |
| 211 | +/** German (Deutsch) |
| 212 | + * @author DaSch |
| 213 | + * @author Imre |
| 214 | + */ |
| 215 | +$messages['de'] = array( |
| 216 | + 'validator_name' => 'Validierer', |
| 217 | + 'validator_error_parameters' => '{{PLURAL:$1|Der folgende Fehler wurde|Die folgenden Fehler wurden}} in deiner Syntax gefunden:', |
| 218 | + 'validator_warning_parameters' => '{{PLURAL:$1|Es ist ein Fehler|Es sind Fehler}} in deiner Syntax.', |
| 219 | + 'validator_error_unknown_argument' => '$1 ist kein gültiger Parameter.', |
| 220 | + 'validator_error_required_missing' => 'Der notwendige Parameter $1 wurde nicht angegeben.', |
| 221 | + 'validator_error_empty_argument' => 'Parameter $1 kann keinen leeren Wert haben.', |
| 222 | + 'validator_error_must_be_number' => 'Parameter $1 kann nur eine Nummer sein.', |
| 223 | + 'validator_error_must_be_integer' => 'Parameter $1 kann nur eine ganze Zahl sein.', |
| 224 | + 'validator_error_invalid_range' => 'Parameter $1 muss zwischen $2 und $3 liegen.', |
| 225 | + 'validator_error_invalid_argument' => 'Der Wert $1 ist nicht gültig für Parameter $2.', |
| 226 | + 'validator_list_error_empty_argument' => 'Parameter $1 akzeptiert keine leeren Werte.', |
| 227 | + 'validator_list_error_must_be_number' => 'Parameter $1 kann nur Nummern enthalten.', |
| 228 | + 'validator_list_error_must_be_integer' => 'Parameter $1 kann nur ganze Zahlen enthalten.', |
| 229 | + 'validator_list_error_invalid_range' => 'Alle Werte von Parameter $1 müssen zwischen $2 und $3 liegen.', |
| 230 | + 'validator_list_error_invalid_argument' => 'Einer oder mehrere Werte für Parameter $1 sind ungültig.', |
| 231 | + 'validator_list_omitted' => '{{PLURAL:$2|Der Wert|Die Werte}} $1 {{PLURAL:$2|wurde|wurden}} ausgelassen.', |
| 232 | + 'validator_error_accepts_only' => 'Parameter $1 akzeptiert nur {{PLURAL:$3|folgenden Wert|folgende Werte}}: $2.', |
| 233 | +); |
| 234 | + |
| 235 | +/** German (formal address) (Deutsch (Sie-Form)) |
| 236 | + * @author Imre |
| 237 | + */ |
| 238 | +$messages['de-formal'] = array( |
| 239 | + 'validator_error_parameters' => '{{PLURAL:$1|Der folgende Fehler wurde|Die folgenden Fehler wurden}} in Ihrer Syntax gefunden:', |
| 240 | + 'validator_warning_parameters' => '{{PLURAL:$1|Es ist ein Fehler|Es sind Fehler}} in Ihrer Syntax.', |
| 241 | +); |
| 242 | + |
| 243 | +/** Lower Sorbian (Dolnoserbski) |
| 244 | + * @author Michawiki |
| 245 | + */ |
| 246 | +$messages['dsb'] = array( |
| 247 | + 'validator_name' => 'Validator', |
| 248 | + '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', |
| 249 | + '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:', |
| 250 | + 'validator_warning_parameters' => '{{PLURAL:$1|Jo zmólka|Stej zmólce|Su zmólki|Su zmólki}} w twójej syntaksy.', |
| 251 | + 'validator_error_unknown_argument' => '$1 njejo płaśiwy parameter.', |
| 252 | + 'validator_error_required_missing' => 'Trěbny parameter $1 njejo pódany.', |
| 253 | + 'validator_error_empty_argument' => 'Parameter $1 njamóžo proznu gódnotu měś.', |
| 254 | + 'validator_error_must_be_number' => 'Parameter $1 móžo jano licba byś.', |
| 255 | + 'validator_error_must_be_integer' => 'Parameter $1 móžo jano ceła licba byś.', |
| 256 | + 'validator_error_invalid_range' => 'Parameter $1 musy mjazy $2 a $3 byś.', |
| 257 | + 'validator_error_invalid_argument' => 'Gódnota $1 njejo płaśiwa za parameter $2.', |
| 258 | + 'validator_list_error_empty_argument' => 'Parameter $1 njeakceptěrujo prozne gódnoty.', |
| 259 | + 'validator_list_error_must_be_number' => 'Parameter $1 móžo jano licby wopśimjeś.', |
| 260 | + 'validator_list_error_must_be_integer' => 'Parameter $1 móžo jano cełe licby wopśimjeś.', |
| 261 | + 'validator_list_error_invalid_range' => 'Wšykne gódnoty parametra $1 muse mjazy $2 a $3 byś.', |
| 262 | + 'validator_list_error_invalid_argument' => 'Jadna gódnota abo wěcej gódnotow za parameter $1 su njepłaśiwe.', |
| 263 | + '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}}.', |
| 264 | + '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.', |
| 265 | +); |
| 266 | + |
| 267 | +/** Greek (Ελληνικά) |
| 268 | + * @author ZaDiak |
| 269 | + */ |
| 270 | +$messages['el'] = array( |
| 271 | + 'validator_name' => 'Επικυρωτής', |
| 272 | + 'validator_error_unknown_argument' => '$1 δεν είναι μια έγκυρη παράμετρος.', |
| 273 | +); |
| 274 | + |
| 275 | +/** Esperanto (Esperanto) |
| 276 | + * @author Yekrats |
| 277 | + */ |
| 278 | +$messages['eo'] = array( |
| 279 | + 'validator_name' => 'Validigilo', |
| 280 | + 'validator_error_unknown_argument' => '$1 ne estas valida parametro.', |
| 281 | + 'validator_error_required_missing' => 'La nepra parametro $1 mankas.', |
| 282 | + 'validator_error_empty_argument' => 'Parametro $1 ne povas esti nula valoro.', |
| 283 | + 'validator_error_must_be_number' => 'Parametro $1 nur povas esti numero.', |
| 284 | + 'validator_error_must_be_integer' => 'Parametro $1 nur povas esti entjero.', |
| 285 | + 'validator_error_invalid_range' => 'Parametro $1 estu inter $2 kaj $3.', |
| 286 | + 'validator_list_error_invalid_argument' => 'Unu aŭ pliaj valoroj por parametro $1 estas malvalida.', |
| 287 | +); |
| 288 | + |
| 289 | +/** Spanish (Español) |
| 290 | + * @author Crazymadlover |
| 291 | + * @author Imre |
| 292 | + * @author Translationista |
| 293 | + */ |
| 294 | +$messages['es'] = array( |
| 295 | + 'validator_name' => 'Validador', |
| 296 | + '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', |
| 297 | + 'validator_error_parameters' => 'Se detectó {{PLURAL:$1|el siguiente error|los siguientes errores}} en la sintaxis empleada:', |
| 298 | + 'validator_warning_parameters' => 'Hay {{PLURAL:$1|un error|errores}} en tu sintaxis.', |
| 299 | + 'validator_error_unknown_argument' => '$1 no es un parámetro válido.', |
| 300 | + 'validator_error_required_missing' => 'No se ha provisto el parámetro requerido $1.', |
| 301 | + 'validator_error_empty_argument' => 'El parámetro $1 no puede tener un valor vacío.', |
| 302 | + 'validator_error_must_be_number' => 'El parámetro $1 sólo puede ser un número.', |
| 303 | + 'validator_error_must_be_integer' => 'El parámetro $1 sólo puede ser un número entero.', |
| 304 | + 'validator_error_invalid_range' => 'El parámetro $1 debe ser entre $2 y $3.', |
| 305 | + 'validator_error_invalid_argument' => 'El valor $1 no es válido para el parámetro $2.', |
| 306 | + 'validator_list_error_empty_argument' => 'El parámetro $1 no acepta valores vacíos.', |
| 307 | + 'validator_list_error_must_be_number' => 'El parámetro $1 sólo puede contener números.', |
| 308 | + 'validator_list_error_must_be_integer' => 'El parámetro $1 sólo puede contener números enteros.', |
| 309 | + 'validator_list_error_invalid_range' => 'Todos los valores del parámetro $1 deben ser entre $2 y $3.', |
| 310 | + 'validator_list_error_invalid_argument' => 'Uno o más valores del parámetros $1 son inválidos.', |
| 311 | + 'validator_list_omitted' => '{{PLURAL:$2|El valor|Los valores}} $1 {{PLURAL:$2|ha sido omitido|han sido omitidos}}.', |
| 312 | + 'validator_error_accepts_only' => 'El parámetro $1 sólo acepta {{PLURAL:$3|este valor|estos valores}}: $2.', |
| 313 | +); |
| 314 | + |
| 315 | +/** Estonian (Eesti) |
| 316 | + * @author Avjoska |
| 317 | + */ |
| 318 | +$messages['et'] = array( |
| 319 | + 'validator_name' => 'Kehtestaja', |
| 320 | +); |
| 321 | + |
| 322 | +/** Finnish (Suomi) |
| 323 | + * @author Crt |
| 324 | + * @author Silvonen |
| 325 | + * @author Str4nd |
| 326 | + */ |
| 327 | +$messages['fi'] = array( |
| 328 | + 'validator_name' => 'Tarkastaja', |
| 329 | + 'validator-desc' => 'Tarkastaja tarjoaa helpon tavan muille laajennuksille jäsenninfunktioiden ja tagilaajennusten parametrien tarkastukseen, oletusarvojen asettamiseen ja virheilmoitusten luomiseen.', |
| 330 | + 'validator_error_must_be_number' => 'Parametrin $1 on oltava luku.', |
| 331 | + 'validator_error_must_be_integer' => 'Parametrin $1 on oltava kokonaisluku.', |
| 332 | +); |
| 333 | + |
| 334 | +/** French (Français) |
| 335 | + * @author Cedric31 |
| 336 | + * @author Crochet.david |
| 337 | + * @author IAlex |
| 338 | + * @author Jean-Frédéric |
| 339 | + * @author McDutchie |
| 340 | + * @author Peter17 |
| 341 | + * @author PieRRoMaN |
| 342 | + * @author Verdy p |
| 343 | + */ |
| 344 | +$messages['fr'] = array( |
| 345 | + 'validator_name' => 'Validateur', |
| 346 | + 'validator-desc' => "Le validateur fournit un moyen simple aux autres extensions 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", |
| 347 | + 'validator_error_parameters' => '{{PLURAL:$1|L’erreur suivante a été détectée|Les erreurs suivantes ont été détectées}} dans votre syntaxe :', |
| 348 | + 'validator_warning_parameters' => 'Il y a {{PLURAL:$1|une erreur|des erreurs}} dans votre syntaxe.', |
| 349 | + 'validator_error_unknown_argument' => '$1 n’est pas un paramètre valide.', |
| 350 | + 'validator_error_required_missing' => "Le paramètre requis $1 n'est pas fourni.", |
| 351 | + 'validator_error_empty_argument' => 'Le paramètre $1 ne peut pas avoir une valeur vide.', |
| 352 | + 'validator_error_must_be_number' => 'Le paramètre $1 peut être uniquement un nombre.', |
| 353 | + 'validator_error_must_be_integer' => 'Le paramètre $1 peut seulement être un entier.', |
| 354 | + 'validator_error_invalid_range' => 'Le paramètre $1 doit être entre $2 et $3.', |
| 355 | + 'validator_error_invalid_argument' => "La valeur $1 n'est pas valide pour le paramètre $2.", |
| 356 | + 'validator_list_error_empty_argument' => "Le paramètre $1 n'accepte pas les valeurs vides.", |
| 357 | + 'validator_list_error_must_be_number' => 'Le paramètre $1 ne peut contenir que des nombres.', |
| 358 | + 'validator_list_error_must_be_integer' => 'Le paramètre $1 ne peut contenir que des entiers.', |
| 359 | + 'validator_list_error_invalid_range' => 'Toutes les valeurs du paramètre $1 doivent être comprises entre $2 et $3.', |
| 360 | + 'validator_list_error_invalid_argument' => 'Une ou plusieurs valeurs du paramètre $1 sont invalides.', |
| 361 | + 'validator_list_omitted' => '{{PLURAL:$2|La valeur|Les valeurs}} $1 {{PLURAL:$2|a été oubliée|ont été oubliées}}.', |
| 362 | + 'validator_error_accepts_only' => 'Le paramètre $1 accepte uniquement {{PLURAL:$3|cette valeur|ces valeurs}} : $2.', |
| 363 | +); |
| 364 | + |
| 365 | +/** Galician (Galego) |
| 366 | + * @author Toliño |
| 367 | + */ |
| 368 | +$messages['gl'] = array( |
| 369 | + 'validator_name' => 'Servizo de validación', |
| 370 | + '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', |
| 371 | + 'validator_error_parameters' => '{{PLURAL:$1|Detectouse o seguinte erro|Detectáronse os seguintes erros}} na sintaxe empregada:', |
| 372 | + 'validator_warning_parameters' => 'Hai {{PLURAL:$1|un erro|erros}} na súa sintaxe.', |
| 373 | + 'validator_error_unknown_argument' => '"$1" non é un parámetro válido.', |
| 374 | + 'validator_error_required_missing' => 'Non se proporcionou o parámetro $1 necesario.', |
| 375 | + 'validator_error_empty_argument' => 'O parámetro $1 non pode ter un valor baleiro.', |
| 376 | + 'validator_error_must_be_number' => 'O parámetro $1 só pode ser un número.', |
| 377 | + 'validator_error_must_be_integer' => 'O parámetro $1 só pode ser un número enteiro.', |
| 378 | + 'validator_error_invalid_range' => 'O parámetro $1 debe estar entre $2 e $3.', |
| 379 | + 'validator_error_invalid_argument' => 'O valor $1 non é válido para o parámetro $2.', |
| 380 | + 'validator_list_error_empty_argument' => 'O parámetro $1 non acepta valores en branco.', |
| 381 | + 'validator_list_error_must_be_number' => 'O parámetro $1 só pode conter números.', |
| 382 | + 'validator_list_error_must_be_integer' => 'O parámetro $1 só pode conter números enteiros.', |
| 383 | + 'validator_list_error_invalid_range' => 'Todos os valores do parámetro $1 deben estar comprendidos entre $2 e $3.', |
| 384 | + 'validator_list_error_invalid_argument' => 'Un ou varios valores do parámetro $1 non son válidos.', |
| 385 | + 'validator_list_omitted' => '{{PLURAL:$2|O valor|Os valores}} $1 {{PLURAL:$2|foi omitido|foron omitidos}}.', |
| 386 | + 'validator_error_accepts_only' => 'O parámetro "$1" só acepta {{PLURAL:$3|este valor|estes valores}}: $2.', |
| 387 | +); |
| 388 | + |
| 389 | +/** Swiss German (Alemannisch) |
| 390 | + * @author Als-Holder |
| 391 | + */ |
| 392 | +$messages['gsw'] = array( |
| 393 | + 'validator_name' => 'Validator', |
| 394 | + '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', |
| 395 | + 'validator_error_parameters' => '{{PLURAL:$1|Dää Fähler isch|Die Fähler sin}} in Dyyre Syntax gfunde wore:', |
| 396 | + 'validator_warning_parameters' => 'S het {{PLURAL:$1|e Fähler|Fähler}} in dyyre Syntax.', |
| 397 | + 'validator_error_unknown_argument' => '$1 isch kei giltige Parameter.', |
| 398 | + 'validator_error_required_missing' => 'Dr Paramter $1, wu aagforderet woren isch, wird nit z Verfiegig gstellt.', |
| 399 | + 'validator_error_empty_argument' => 'Dr Parameter $1 cha kei lääre Wärt haa.', |
| 400 | + 'validator_error_must_be_number' => 'Dr Parameter $1 cha nume ne Zahl syy.', |
| 401 | + 'validator_error_must_be_integer' => 'Parameter $1 cha nume ne giltigi Zahl syy.', |
| 402 | + 'validator_error_invalid_range' => 'Dr Parameter $1 muess zwische $2 un $3 syy.', |
| 403 | + 'validator_error_invalid_argument' => 'Dr Wärt $1 isch nit giltig fir dr Parameter $2.', |
| 404 | + 'validator_list_error_empty_argument' => 'Bim Parameter $1 sin keini lääre Wärt zuegloo.', |
| 405 | + 'validator_list_error_must_be_number' => 'Fir dr Parameter $1 si nume Zahle zuegloo.', |
| 406 | + 'validator_list_error_must_be_integer' => 'Fir dr Parameter $1 sin nume ganzi Zahle zuegloo.', |
| 407 | + 'validator_list_error_invalid_range' => 'Alli Wärt fir dr Parameter $1 mien zwische $2 un $3 lige.', |
| 408 | + 'validator_list_error_invalid_argument' => 'Ein oder mehreri Wärt fir dr Parameter $1 sin nit giltig.', |
| 409 | + 'validator_list_omitted' => '{{PLURAL:$2|Dr Wärt|D Wärt}} $1 {{PLURAL:$2|isch|sin}} uusgloo wore.', |
| 410 | + 'validator_error_accepts_only' => 'Dr Parameter $1 cha nume {{PLURAL:$3|dää Wärt|die Wärt}} haa: $2.', |
| 411 | +); |
| 412 | + |
| 413 | +/** Hebrew (עברית) |
| 414 | + * @author YaronSh |
| 415 | + */ |
| 416 | +$messages['he'] = array( |
| 417 | + 'validator_warning_parameters' => 'ישנ{PLURAL:$1|ה שגיאה|ן שגיאות}} בתחביר שלכם.', |
| 418 | + 'validator_error_unknown_argument' => '$1 אינו פרמטר תקני.', |
| 419 | + 'validator_error_required_missing' => 'הפרמטר הדרוש $1 לא צוין.', |
| 420 | + 'validator_error_empty_argument' => 'הפרמטר $1 לא יכול להיות ערך ריק.', |
| 421 | + 'validator_error_must_be_number' => 'הפרמטר $1 יכול להיות מספר בלבד.', |
| 422 | + 'validator_error_must_be_integer' => 'הפרמטר $1 יכול להיות מספר שלם בלבד.', |
| 423 | + 'validator_error_invalid_range' => 'הפרמטר $1 חייב להיות בין $2 ל־$3.', |
| 424 | + 'validator_error_invalid_argument' => 'הערך $1 אינו תקני עבור הפרמטר $2.', |
| 425 | +); |
| 426 | + |
| 427 | +/** Upper Sorbian (Hornjoserbsce) |
| 428 | + * @author Michawiki |
| 429 | + */ |
| 430 | +$messages['hsb'] = array( |
| 431 | + 'validator_name' => 'Validator', |
| 432 | + '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', |
| 433 | + '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}}:', |
| 434 | + 'validator_warning_parameters' => '{{PLURAL:$1|Je zmylk|Stej zmylkaj|Su zmylki|Su zmylki}} w twojej syntaksy.', |
| 435 | + 'validator_error_unknown_argument' => '$1 płaćiwy parameter njeje.', |
| 436 | + 'validator_error_required_missing' => 'Trěbny parameter $1 njeje podaty.', |
| 437 | + 'validator_error_empty_argument' => 'Parameter $1 njemóže prózdnu hódnotu měć.', |
| 438 | + 'validator_error_must_be_number' => 'Parameter $1 móže jenož ličba być.', |
| 439 | + 'validator_error_must_be_integer' => 'Parameter $1 móže jenož cyła ličba być.', |
| 440 | + 'validator_error_invalid_range' => 'Parameter $1 dyrbi mjez $2 a $3 być.', |
| 441 | + 'validator_error_invalid_argument' => 'Hódnota $1 njeje płaćiwa za parameter $2.', |
| 442 | + 'validator_list_error_empty_argument' => 'Parameter $1 njeakceptuje prózdne hódnoty.', |
| 443 | + 'validator_list_error_must_be_number' => 'Parameter $1 móže jenož ličby wobsahować.', |
| 444 | + 'validator_list_error_must_be_integer' => 'Parameter $1 móže jenož cyłe ličby wobsahować.', |
| 445 | + 'validator_list_error_invalid_range' => 'Wšě hódnoty parametra $1 dyrbja mjez $2 a $3 być.', |
| 446 | + 'validator_list_error_invalid_argument' => 'Jedna hódnota abo wjace hódnotow za parameter $1 su njepłaćiwe.', |
| 447 | + '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}}.', |
| 448 | + 'validator_error_accepts_only' => 'Parameter $1 akceptuje jenož {{PLURAL:$3|tutu hódnotu|tutej hódnoće|tute hódnoty|tute hódnoty}}: $2.', |
| 449 | +); |
| 450 | + |
| 451 | +/** Hungarian (Magyar) |
| 452 | + * @author Dani |
| 453 | + * @author Glanthor Reviol |
| 454 | + */ |
| 455 | +$messages['hu'] = array( |
| 456 | + 'validator_name' => 'Érvényesség-ellenőrző', |
| 457 | + '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.', |
| 458 | + 'validator_error_parameters' => 'A következő {{PLURAL:$1|hiba található|hibák találhatóak}} a szintaxisban:', |
| 459 | + 'validator_error_unknown_argument' => 'A(z) $1 nem érvényes paraméter.', |
| 460 | + 'validator_error_required_missing' => 'A(z) $1 kötelező paraméter nem lett megadva.', |
| 461 | + 'validator_error_empty_argument' => 'A(z) $1 paraméter értéke nem lehet üres.', |
| 462 | + 'validator_error_must_be_number' => 'A(z) $1 paraméter csak szám lehet.', |
| 463 | + 'validator_error_invalid_range' => 'A(z) $1 paraméter értékének $2 és $3 között kell lennie.', |
| 464 | + 'validator_error_invalid_argument' => 'A(z) $1 érték nem érvényes a(z) $2 paraméterhez.', |
| 465 | + 'validator_error_accepts_only' => 'A(z) $1 paraméter csak a következő {{PLURAL:$3|értéket|értékeket}} fogadja el: $2', |
| 466 | +); |
| 467 | + |
| 468 | +/** Interlingua (Interlingua) |
| 469 | + * @author McDutchie |
| 470 | + */ |
| 471 | +$messages['ia'] = array( |
| 472 | + 'validator_name' => 'Validator', |
| 473 | + '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', |
| 474 | + 'validator_error_parameters' => 'Le sequente {{PLURAL:$1|error|errores}} ha essite detegite in tu syntaxe:', |
| 475 | + 'validator_warning_parameters' => 'Il ha {{PLURAL:$1|un error|errores}} in tu syntaxe.', |
| 476 | + 'validator_error_unknown_argument' => '$1 non es un parametro valide.', |
| 477 | + 'validator_error_required_missing' => 'Le parametro requisite $1 non ha essite fornite.', |
| 478 | + 'validator_error_empty_argument' => 'Le parametro $1 non pote haber un valor vacue.', |
| 479 | + 'validator_error_must_be_number' => 'Le parametro $1 pote solmente esser un numero.', |
| 480 | + 'validator_error_must_be_integer' => 'Le parametro $1 pote solmente esser un numero integre.', |
| 481 | + 'validator_error_invalid_range' => 'Le parametro $1 debe esser inter $2 e $3.', |
| 482 | + 'validator_error_invalid_argument' => 'Le valor $1 non es valide pro le parametro $2.', |
| 483 | + 'validator_list_error_empty_argument' => 'Le parametro $1 non accepta valores vacue.', |
| 484 | + 'validator_list_error_must_be_number' => 'Le parametro $1 pote solmente continer numeros.', |
| 485 | + 'validator_list_error_must_be_integer' => 'Le parametro $1 pote solmente continer numeros integre.', |
| 486 | + 'validator_list_error_invalid_range' => 'Tote le valores del parametro $1 debe esser inter $2 e $3.', |
| 487 | + 'validator_list_error_invalid_argument' => 'Un o plus valores pro le parametro $1 es invalide.', |
| 488 | + 'validator_list_omitted' => 'Le {{PLURAL:$2|valor|valores}} $1 ha essite omittite.', |
| 489 | + 'validator_error_accepts_only' => 'Le parametro $1 accepta solmente iste {{PLURAL:$3|valor|valores}}: $2.', |
| 490 | +); |
| 491 | + |
| 492 | +/** Indonesian (Bahasa Indonesia) |
| 493 | + * @author Bennylin |
| 494 | + * @author Farras |
| 495 | + * @author Irwangatot |
| 496 | + * @author IvanLanin |
| 497 | + */ |
| 498 | +$messages['id'] = array( |
| 499 | + 'validator_name' => 'Validator', |
| 500 | + 'validator-desc' => 'Validator memberikan cara mudah untuk ekstensi lain untuk memvalidasi parameter ParserFunction dan ekstensi tag, mengatur nilai biasa dan membuat pesan kesalahan', |
| 501 | + 'validator_error_parameters' => '{{PLURAL:$1|Kesalahan|Kesalahan}} berikut telah terdeteksi pada sintaksis Anda', |
| 502 | + 'validator_error_unknown_argument' => '$1 bukan parameter yang benar.', |
| 503 | + 'validator_error_required_missing' => 'Parameter $1 yang diperlukan tidak diberikan.', |
| 504 | + 'validator_error_empty_argument' => 'Parameter $1 tidak dapat bernilai kosong.', |
| 505 | + 'validator_error_must_be_number' => 'Parameter $1 hanya dapat berupa angka.', |
| 506 | + 'validator_error_must_be_integer' => 'Parameter $1 hanya dapat berupa integer.', |
| 507 | + 'validator_error_invalid_range' => 'Parameter $1 harus antara $2 dan $3.', |
| 508 | + 'validator_error_invalid_argument' => 'Nilai $1 tidak valid untuk parameter $2.', |
| 509 | + 'validator_error_accepts_only' => 'Parameter $1 hanya menerima {{PLURAL:$3|nilai ini|nilai ini}}: $2.', |
| 510 | +); |
| 511 | + |
| 512 | +/** Japanese (日本語) |
| 513 | + * @author Aotake |
| 514 | + * @author Fryed-peach |
| 515 | + * @author Whym |
| 516 | + */ |
| 517 | +$messages['ja'] = array( |
| 518 | + 'validator_name' => '妥当性評価器', |
| 519 | + 'validator-desc' => '妥当性評価器は他の拡張機能にパーサー関数やタグ拡張の引数の妥当性を確認したり、規定値を設定したり、エラーメッセージを生成する手段を提供する', |
| 520 | + 'validator_error_parameters' => 'あなたの入力から以下の{{PLURAL:$1|エラー|エラー}}が検出されました:', |
| 521 | + 'validator_warning_parameters' => 'あなたの入力した構文には{{PLURAL:$1|エラー}}があります。', |
| 522 | + 'validator_error_unknown_argument' => '$1 は有効な引数ではありません。', |
| 523 | + 'validator_error_required_missing' => '必須の引数「$1」が入力されていません。', |
| 524 | + 'validator_error_empty_argument' => '引数「$1」は空の値をとることができません。', |
| 525 | + 'validator_error_must_be_number' => '引数「$1」は数値でなければなりません。', |
| 526 | + 'validator_error_must_be_integer' => '引数「$1」は整数でなければなりません。', |
| 527 | + 'validator_error_invalid_range' => '引数「$1」は $2 と $3 の間の値でなければなりません。', |
| 528 | + 'validator_error_invalid_argument' => '値「$1」は引数「$2」として妥当ではありません。', |
| 529 | + 'validator_list_error_empty_argument' => '引数「$1」は空の値をとりません。', |
| 530 | + 'validator_list_error_must_be_number' => '引数「$1」は数値しかとることができません。', |
| 531 | + 'validator_list_error_must_be_integer' => '引数「$1」は整数値しかとることができません。', |
| 532 | + 'validator_list_error_invalid_range' => '引数「$1」の値はすべて $2 と $3 の間のものでなくてはなりません。', |
| 533 | + 'validator_list_error_invalid_argument' => '引数「$1」の値に不正なものが1つ以上あります。', |
| 534 | + 'validator_list_omitted' => '{{PLURAL:$2|値}} $1 は省かれました。', |
| 535 | + 'validator_error_accepts_only' => '引数 $1 は次の{{PLURAL:$3|値}}以外を取ることはできません: $2', |
| 536 | +); |
| 537 | + |
| 538 | +/** Ripoarisch (Ripoarisch) |
| 539 | + * @author Purodha |
| 540 | + */ |
| 541 | +$messages['ksh'] = array( |
| 542 | + 'validator_name' => 'Prööver', |
| 543 | + '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.', |
| 544 | + 'validator_error_parameters' => '{{PLURAL:$1|Heh dä|Heh di|Keine}} Fähler {{PLURAL:$1|es|sin|es}} en Dinge Syntax opjevalle:', |
| 545 | + 'validator_error_unknown_argument' => '„$1“ es keine jöltijje Parameeter.', |
| 546 | + 'validator_error_required_missing' => 'Dä Parameeter $1 moß aanjejovve sin, un fählt.', |
| 547 | + 'validator_error_empty_argument' => 'Dä Parameeter $1 kann keine Wäät met nix dren hann.', |
| 548 | + 'validator_error_must_be_number' => 'Dä Parameeter $1 kann blohß en Zahl sin.', |
| 549 | + 'validator_error_must_be_integer' => 'Dä Parrameeter $1 kann bloß en jannze Zahl sin.', |
| 550 | + 'validator_error_invalid_range' => 'Dä Parameeter $1 moß zwesche $2 un $3 sin.', |
| 551 | + 'validator_error_invalid_argument' => 'Däm Parameeter $2 singe Wäät es $1, dat es ävver doför nit jöltesch.', |
| 552 | + 'validator_error_accepts_only' => 'Dä Parameeter $1 kann {{PLURAL:$3|bloß dä eine Wäät|bloß eine vun dä Wääte|keine Wäät}} han: $2', |
| 553 | +); |
| 554 | + |
| 555 | +/** Luxembourgish (Lëtzebuergesch) |
| 556 | + * @author Robby |
| 557 | + */ |
| 558 | +$messages['lb'] = array( |
| 559 | + 'validator_name' => 'Validator', |
| 560 | + 'validator-desc' => 'Validator erlaabt et op eng einfach Manéier fir Parameter vu Parser-Fonctiounen an Tag-Erweiderungen ze validéieren, fir Standard-Werter festzeleeën a fir Feeler-Messagen ze generéieren', |
| 561 | + 'validator_error_parameters' => '{{PLURAL:$1|Dëse Feeler gouf|Dës Feeler goufen}} an Ärer Syntax fonnt:', |
| 562 | + 'validator_warning_parameters' => 'Et {{PLURAL:$1|ass ee|si}} Feeler an Ärer Syntax.', |
| 563 | + 'validator_error_unknown_argument' => '$1 ass kee valbele Parameter.', |
| 564 | + 'validator_error_required_missing' => 'Den obligatoresche Parameter $1 war net derbäi.', |
| 565 | + 'validator_error_empty_argument' => 'De Parameter $1 ka keen eidele Wert hunn.', |
| 566 | + 'validator_error_must_be_number' => 'De Parameter $1 ka just eng Zuel sinn', |
| 567 | + 'validator_error_must_be_integer' => 'De Parameter $1 ka just eng ganz Zuel sinn.', |
| 568 | + 'validator_error_invalid_range' => 'De Parameter $1 muss tëschent $2 an $3 leien.', |
| 569 | + 'validator_error_invalid_argument' => 'De Wert $1 ass net valabel fir de Parameter $2.', |
| 570 | + 'validator_list_error_empty_argument' => 'De Parameter $1 hëlt keng eidel Wäerter un.', |
| 571 | + 'validator_list_error_must_be_number' => 'Am Parameter $1 kënnen nëmmen Zuelen dra sinn.', |
| 572 | + 'validator_list_error_must_be_integer' => 'Am Parameter $1 kënnen nëmme ganz Zuele sinn.', |
| 573 | + 'validator_list_error_invalid_range' => 'All Wäerter vum Parameter $1 mussen tëschent $2 an $3 leien.', |
| 574 | + 'validator_list_error_invalid_argument' => 'Een oder méi Wäerter fir de Parameter $1 sinn net valabel.', |
| 575 | + 'validator_list_omitted' => "{{PLURAL:$2|De Wäert|D'Wäerter}} $1 {{PLURAL:$2|gouf|goufe}} vergiess.", |
| 576 | + 'validator_error_accepts_only' => 'De Parameter $1 akzeptéiert just {{PLURAL:$3|dëse Wert|dës Werter}}: $2', |
| 577 | +); |
| 578 | + |
| 579 | +/** Macedonian (Македонски) |
| 580 | + * @author Bjankuloski06 |
| 581 | + * @author McDutchie |
| 582 | + */ |
| 583 | +$messages['mk'] = array( |
| 584 | + 'validator_name' => 'Потврдувач', |
| 585 | + 'validator-desc' => 'Потврдувачот овозможува лесен начин другите проширувања да ги потврдат параметрите на парсерските функции и проширувањата со ознаки, да поставаат основно зададени вредности и да создаваат пораки за грешки', |
| 586 | + 'validator_error_parameters' => 'Во вашата синтакса {{PLURAL:$1|е откриена следнава грешка|се откриени следниве грешки}}:', |
| 587 | + 'validator_warning_parameters' => 'Имате {{PLURAL:$1|грешка|грешки}} во синтаксата.', |
| 588 | + 'validator_error_unknown_argument' => '$1 не е важечки параметар.', |
| 589 | + 'validator_error_required_missing' => 'Бараниот параметар $1 не е наведен.', |
| 590 | + 'validator_error_empty_argument' => 'Параметарот $1 не може да има празна вредност.', |
| 591 | + 'validator_error_must_be_number' => 'Параметарот $1 може да биде само број.', |
| 592 | + 'validator_error_must_be_integer' => 'Параметарот $1 може да биде само цел број.', |
| 593 | + 'validator_error_invalid_range' => 'Параметарот $1 мора да изнесува помеѓу $2 и $3.', |
| 594 | + 'validator_error_invalid_argument' => 'Вредноста $1 е неважечка за параметарот $2.', |
| 595 | + 'validator_list_error_empty_argument' => 'Параметарот $1 не прифаќа празни вредности.', |
| 596 | + 'validator_list_error_must_be_number' => 'Параметарот $1 може да содржи само бројки.', |
| 597 | + 'validator_list_error_must_be_integer' => 'Параметарот $1 може да содржи само цели броеви.', |
| 598 | + 'validator_list_error_invalid_range' => 'Сите вредности на параметарот $1 мора да бидат помеѓу $2 и $3.', |
| 599 | + 'validator_list_error_invalid_argument' => 'Една или повеќе вредности на параметарот $1 се неважечки.', |
| 600 | + 'validator_list_omitted' => '{{PLURAL:$2|Вредноста|Вредностите}} $1 {{PLURAL:$2|беше испуштена|беа испуштени}}.', |
| 601 | + 'validator_error_accepts_only' => 'Параметарот $1 {{PLURAL:$3|ја прифаќа само оваа вредност|ги прифаќа само овие вредности}}: $2.', |
| 602 | +); |
| 603 | + |
| 604 | +/** Dutch (Nederlands) |
| 605 | + * @author Jeroen De Dauw |
| 606 | + * @author Siebrand |
| 607 | + */ |
| 608 | +$messages['nl'] = array( |
| 609 | + 'validator_name' => 'Validator', |
| 610 | + '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', |
| 611 | + 'validator_error_parameters' => 'In uw syntaxis {{PLURAL:$1|is de volgende fout|zijn de volgende fouten}} gedetecteerd:', |
| 612 | + 'validator_warning_parameters' => 'Er {{PLURAL:$1|zit een fout|zitten $1 fouten}} in uw syntaxis.', |
| 613 | + 'validator_error_unknown_argument' => '$1 is geen geldige parameter.', |
| 614 | + 'validator_error_required_missing' => 'De verplichte parameter $1 is niet opgegeven.', |
| 615 | + 'validator_error_empty_argument' => 'De parameter $1 mag niet leeg zijn.', |
| 616 | + 'validator_error_must_be_number' => 'De parameter $1 mag alleen een getal zijn.', |
| 617 | + 'validator_error_must_be_integer' => 'De parameter $1 kan alleen een heel getal zijn.', |
| 618 | + 'validator_error_invalid_range' => 'De parameter $1 moet tussen $2 en $3 liggen.', |
| 619 | + 'validator_error_invalid_argument' => 'De waarde $1 is niet geldig voor de parameter $2.', |
| 620 | + 'validator_list_error_empty_argument' => 'Voor de parameter $1 zijn lege waarden niet toegestaan.', |
| 621 | + 'validator_list_error_must_be_number' => 'Voor de parameter $1 zijn alleen getallen toegestaan.', |
| 622 | + 'validator_list_error_must_be_integer' => 'Voor de parameter $1 zijn alleen hele getallen toegestaan.', |
| 623 | + 'validator_list_error_invalid_range' => 'Alle waarden voor de parameter $1 moeten tussen $2 en $3 liggen.', |
| 624 | + 'validator_list_error_invalid_argument' => 'Een of meerdere waarden voor de parameter $1 zijn ongeldig.', |
| 625 | + 'validator_list_omitted' => 'De {{PLURAL:$2|waarde|waarden}} $1 {{PLURAL:$2|mist|missen}}.', |
| 626 | + 'validator_error_accepts_only' => 'De parameter $1 kan alleen de volgende {{PLURAL:$3|waarde|waarden}} hebben: $2.', |
| 627 | +); |
| 628 | + |
| 629 | +/** Norwegian (bokmål) (Norsk (bokmål)) |
| 630 | + * @author Jon Harald Søby |
| 631 | + * @author Nghtwlkr |
| 632 | + */ |
| 633 | +$messages['no'] = array( |
| 634 | + 'validator_name' => 'Validering', |
| 635 | + 'validator-desc' => 'Validering gir en enkel måte for utvidelser å validere parametere av parserfunksjoner og taggutvidelser, sette standardverdier og generere feilbeskjeder.', |
| 636 | + 'validator_error_parameters' => 'Følgende {{PLURAL:$1|feil|feil}} har blitt oppdaget i syntaksen din:', |
| 637 | + 'validator_warning_parameters' => 'Det er {{PLURAL:$1|én feil|flere feil}} i syntaksen din.', |
| 638 | + 'validator_error_unknown_argument' => '$1 er ikke en gyldig parameter.', |
| 639 | + 'validator_error_required_missing' => 'Den nødvendige parameteren $1 er ikke angitt.', |
| 640 | + 'validator_error_empty_argument' => 'Parameteren $1 kan ikke ha en tom verdi.', |
| 641 | + 'validator_error_must_be_number' => 'Parameter $1 må være et tall.', |
| 642 | + 'validator_error_must_be_integer' => 'Parameteren $1 må være et heltall.', |
| 643 | + 'validator_error_invalid_range' => 'Parameter $1 må være mellom $2 og $3.', |
| 644 | + 'validator_error_invalid_argument' => 'Verdien $1 er ikke en gyldig parameter for $2.', |
| 645 | + 'validator_list_error_empty_argument' => 'Parameteren $1 godtar ikke tomme verdier.', |
| 646 | + 'validator_list_error_must_be_number' => 'Parameteren $1 kan bare inneholde tall.', |
| 647 | + 'validator_list_error_must_be_integer' => 'Parameteren $1 kan bare inneholder heltall.', |
| 648 | + 'validator_list_error_invalid_range' => 'Alle verdier av parameteren $1 må være mellom $2 og $3.', |
| 649 | + 'validator_list_error_invalid_argument' => 'Parameteren $1 har en eller flere ugyldige verdier.', |
| 650 | + 'validator_list_omitted' => '{{PLURAL:$2|Verdien|Verdiene}} $1 har blitt utelatt.', |
| 651 | + 'validator_error_accepts_only' => 'Parameteren $1 kan kun ha {{PLURAL:$3|denne verdien|disse verdiene}}: $2', |
| 652 | +); |
| 653 | + |
| 654 | +/** Occitan (Occitan) |
| 655 | + * @author Cedric31 |
| 656 | + * @author Jfblanc |
| 657 | + */ |
| 658 | +$messages['oc'] = array( |
| 659 | + 'validator_name' => 'Validaire', |
| 660 | + '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", |
| 661 | + 'validator_error_parameters' => '{{PLURAL:$1|Aquela error es estada detectada|Aquelas errors son estadas detectadas}} dins la sintaxi', |
| 662 | + 'validator_error_unknown_argument' => '$1 es pas un paramètre valedor.', |
| 663 | + 'validator_error_required_missing' => "Manca lo paramètre $1 qu'es obligatòri.", |
| 664 | + 'validator_error_empty_argument' => 'Lo paramètre $1 pòt pas estar voide.', |
| 665 | + 'validator_error_must_be_number' => 'Lo paramètre $1 deu èsser un nombre.', |
| 666 | + 'validator_error_must_be_integer' => 'Lo paramètre $1 deu èsser un nombre entièr.', |
| 667 | + 'validator_error_invalid_range' => 'Lo paramètre $1 deu èsser entre $2 e $3.', |
| 668 | + 'validator_error_invalid_argument' => '$1 es pas valedor pel paramètre $2.', |
| 669 | + 'validator_error_accepts_only' => 'Sonque {{PLURAL:$3|aquela valor es valedora|aquelas valors son valedoras}}pel paramètre $1 : $2.', |
| 670 | +); |
| 671 | + |
| 672 | +/** Piedmontese (Piemontèis) |
| 673 | + * @author Borichèt |
| 674 | + * @author Dragonòt |
| 675 | + * @author McDutchie |
| 676 | + */ |
| 677 | +$messages['pms'] = array( |
| 678 | + 'validator_name' => 'Validator', |
| 679 | + '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", |
| 680 | + '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:", |
| 681 | + 'validator_warning_parameters' => "{{PLURAL:$1|A-i é n'|A-i son dj'}}eror ant soa sintassi.", |
| 682 | + 'validator_error_unknown_argument' => "$1 a l'é un paràmetr pa bon.", |
| 683 | + 'validator_error_required_missing' => "Ël paràmetr obligatòri $1 a l'é pa dàit.", |
| 684 | + 'validator_error_empty_argument' => 'Ël paràmetr $1 a peul pa avèj un valor veuid.', |
| 685 | + 'validator_error_must_be_number' => 'Ël paràmetr $1 a peul mach esse un nùmer.', |
| 686 | + 'validator_error_must_be_integer' => "Ël paràmetr $1 a peul mach esse n'antregh.", |
| 687 | + 'validator_error_invalid_range' => 'Ël paràmetr $1 a deuv esse an tra $2 e $3.', |
| 688 | + 'validator_error_invalid_argument' => "Ël valor $1 a l'é pa bon për ël paràmetr $2.", |
| 689 | + 'validator_list_error_empty_argument' => 'Ël paràmetr $1 a aceta pa dij valor veuid.', |
| 690 | + 'validator_list_error_must_be_number' => 'Ël paràmetr $1 a peul mach conten-e dij nùmer.', |
| 691 | + 'validator_list_error_must_be_integer' => "Ël paràmetr $1 a peul mach conten-e dj'antegr.", |
| 692 | + 'validator_list_error_invalid_range' => 'Tùit ij valor dël paràmetr $1 a deuvo esse tra $2 e $3.', |
| 693 | + 'validator_list_error_invalid_argument' => 'Un o pi valor dël paràmetr $1 a son pa bon.', |
| 694 | + 'validator_list_omitted' => "{{PLURAL:$2|Ël valor|Ij valor}} $1 {{PLURAL:$2|a l'é|a son}} pa stàit butà.", |
| 695 | + 'validator_error_accepts_only' => 'Ël paràmetr $1 a aceta mach {{PLURAL:$3|sto valor-sì|sti valor-sì}}: $2.', |
| 696 | +); |
| 697 | + |
| 698 | +/** Portuguese (Português) |
| 699 | + * @author Hamilton Abreu |
| 700 | + */ |
| 701 | +$messages['pt'] = array( |
| 702 | + 'validator_name' => 'Serviço de Validação', |
| 703 | + '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', |
| 704 | + 'validator_error_parameters' => '{{PLURAL:$1|Foi detectado o seguinte erro sintáctico|Foram detectados os seguintes erros sintácticos}}:', |
| 705 | + 'validator_warning_parameters' => '{{PLURAL:$1|Existe um erro sintáctico|Existem erros sintácticos}}.', |
| 706 | + 'validator_error_unknown_argument' => '$1 não é um parâmetro válido.', |
| 707 | + 'validator_error_required_missing' => 'O parâmetro obrigatório $1 não foi fornecido.', |
| 708 | + 'validator_error_empty_argument' => 'O parâmetro $1 não pode estar vazio.', |
| 709 | + 'validator_error_must_be_number' => 'O parâmetro $1 só pode ser numérico.', |
| 710 | + 'validator_error_must_be_integer' => 'O parâmetro $1 só pode ser um número inteiro.', |
| 711 | + 'validator_error_invalid_range' => 'O parâmetro $1 tem de ser entre $2 e $3.', |
| 712 | + 'validator_error_invalid_argument' => 'O valor $1 não é válido para o parâmetro $2.', |
| 713 | + 'validator_list_error_empty_argument' => 'O parâmetro $1 não pode estar vazio.', |
| 714 | + 'validator_list_error_must_be_number' => 'O parâmetro $1 só pode ser numérico.', |
| 715 | + 'validator_list_error_must_be_integer' => 'O parâmetro $1 só pode ser um número inteiro.', |
| 716 | + 'validator_list_error_invalid_range' => 'Todos os valores do parâmetro $1 têm de ser entre $2 e $3.', |
| 717 | + 'validator_list_error_invalid_argument' => 'Um ou mais valores do parâmetro $1 são inválidos.', |
| 718 | + 'validator_list_omitted' => '{{PLURAL:$2|O valor $1 foi omitido|Os valores $1 foram omitidos}}.', |
| 719 | + 'validator_error_accepts_only' => 'O parâmetro $1 só aceita {{PLURAL:$3|este valor|estes valores}}: $2.', |
| 720 | +); |
| 721 | + |
| 722 | +/** Brazilian Portuguese (Português do Brasil) |
| 723 | + * @author Luckas Blade |
| 724 | + */ |
| 725 | +$messages['pt-br'] = array( |
| 726 | + 'validator_error_unknown_argument' => '$1 não é um parâmetro válido.', |
| 727 | + 'validator_error_invalid_range' => 'O parâmetro $1 tem de ser entre $2 e $3.', |
| 728 | + 'validator_error_invalid_argument' => 'O valor $1 não é válido para o parâmetro $2.', |
| 729 | + 'validator_error_accepts_only' => 'O parâmetro $1 só aceita {{PLURAL:$3|este valor|estes valores}}: $2.', |
| 730 | +); |
| 731 | + |
| 732 | +/** Russian (Русский) |
| 733 | + * @author Aleksandrit |
| 734 | + * @author Lockal |
| 735 | + * @author McDutchie |
| 736 | + * @author Александр Сигачёв |
| 737 | + */ |
| 738 | +$messages['ru'] = array( |
| 739 | + 'validator_name' => 'Валидатор', |
| 740 | + 'validator-desc' => 'Валидатор предоставляет другим расширениям возможности проверки параметров функций парсера и тегов, установки значения по умолчанию и создания сообщения об ошибках', |
| 741 | + 'validator_error_parameters' => 'В вашем синтаксисе {{PLURAL:$1|обнаружена следующая ошибка|обнаружены следующие ошибки}}:', |
| 742 | + 'validator_warning_parameters' => 'В вашем синтаксисе {{PLURAL:$1|имеется ошибка|имеются ошибки}}.', |
| 743 | + 'validator_error_unknown_argument' => '$1 не является допустимым параметром.', |
| 744 | + 'validator_error_required_missing' => 'Не указан обязательный параметр $1.', |
| 745 | + 'validator_error_empty_argument' => 'Параметр $1 не может принимать пустое значение.', |
| 746 | + 'validator_error_must_be_number' => 'Значением параметра $1 могут быть только числа.', |
| 747 | + 'validator_error_must_be_integer' => 'Параметр $1 может быть только целым числом.', |
| 748 | + 'validator_error_invalid_range' => 'Параметр $1 должен быть от $2 до $3.', |
| 749 | + 'validator_error_invalid_argument' => 'Значение $1 не является допустимым параметром $2', |
| 750 | + 'validator_list_error_empty_argument' => 'Параметр $1 не может принимать пустые значения.', |
| 751 | + 'validator_list_error_must_be_number' => 'Параметр $1 может содержать только цифры.', |
| 752 | + 'validator_list_error_must_be_integer' => 'Параметр $1 может содержать только целые числа.', |
| 753 | + 'validator_list_error_invalid_range' => 'Все значения параметра $1 должна находиться в диапазоне от $2 до $3.', |
| 754 | + 'validator_list_error_invalid_argument' => 'Одно или несколько значений параметра $1 ошибочны.', |
| 755 | + 'validator_list_omitted' => '{{PLURAL:$2|Значение $1 было пропущено|Значения $1 были пропущены}}.', |
| 756 | + 'validator_error_accepts_only' => 'Параметр $1 может принимать только {{PLURAL:$3|следующее значение|следующие значения}}: $2.', |
| 757 | +); |
| 758 | + |
| 759 | +/** Sinhala (සිංහල) |
| 760 | + * @author Calcey |
| 761 | + */ |
| 762 | +$messages['si'] = array( |
| 763 | + 'validator_name' => 'තහවුරු කරන්නා', |
| 764 | + 'validator-desc' => 'තහවුරු කරන්නා ටැග් දිඟුවන් හා parser ශ්රිතවල පරාමිතීන් තහවුරු කිරීමට අනෙක් දිඟුවන් සඳහා පහසු ක්රමයක් සපයයි,පෙරනිමි අගයන් පිහිටුවීම හා දෝෂ පණිවුඩ ජනනය කිරීම ද සිදු කරයි', |
| 765 | + 'validator_error_parameters' => 'ඔබේ වාග් රීතිය මඟින් පහත {{PLURAL:$1|දෝෂය|දෝෂයන්}} අනාවරණය කරනු ලැබ ඇත', |
| 766 | + 'validator_error_unknown_argument' => '$1 වලංගු පරාමිතියක් නොවේ.', |
| 767 | + 'validator_error_required_missing' => 'අවශ්ය වන $1 පරාමිතිය සපයා නොමැත.', |
| 768 | + 'validator_error_empty_argument' => '$1 පරාමිතියට හිස් අගයක් තිබිය නොහැක.', |
| 769 | + 'validator_error_must_be_number' => '$1 පරාමිතිය විය හැක්කේ ඉලක්කමක් පමණි.', |
| 770 | + 'validator_error_invalid_range' => '$1 පරාමිතිය $2 හා $3 අතර විය යුතුය.', |
| 771 | + 'validator_error_invalid_argument' => '$2 පරාමිතිය සඳහා $1 අගය වලංගු නොවේ.', |
| 772 | + 'validator_error_accepts_only' => '$1 පරාමිතිය විසින් පිළිගනු ලබන්නේ {{PLURAL:$3|මෙම අගය|මෙම අගයන්}}: $2 පමණි.', |
| 773 | +); |
| 774 | + |
| 775 | +/** Swedish (Svenska) |
| 776 | + * @author Fluff |
| 777 | + * @author Ozp |
| 778 | + * @author Per |
| 779 | + */ |
| 780 | +$messages['sv'] = array( |
| 781 | + 'validator_error_parameters' => 'Följande {{PLURAL:$1|fel|fel}} har upptäckts i din syntax', |
| 782 | + 'validator_warning_parameters' => 'Det finns {{PLURAL:$1|ett|flera}} fel i din syntax.', |
| 783 | + 'validator_error_unknown_argument' => '$1 är inte en giltig paramter.', |
| 784 | + 'validator_error_required_missing' => 'Den nödvändiga parametern $1 har inte angivits.', |
| 785 | + 'validator_error_empty_argument' => 'Parametern $1 kan inte lämnas tom.', |
| 786 | + 'validator_error_must_be_number' => 'Parameter $1 måste bestå av ett tal.', |
| 787 | + 'validator_error_must_be_integer' => 'Parametern $1 måste vara ett heltal.', |
| 788 | + 'validator_error_invalid_range' => 'Parameter $1 måste vara i mellan $2 och $3.', |
| 789 | + 'validator_error_invalid_argument' => 'Värdet $1 är inte giltigt som parameter $2.', |
| 790 | + 'validator_list_error_empty_argument' => 'Parameter $1 accepterar inte tomma värden.', |
| 791 | + 'validator_list_error_must_be_number' => 'Parameter $1 får endast innehålla siffror.', |
| 792 | + 'validator_list_error_must_be_integer' => 'Parameter $1 får endast innehålla heltal.', |
| 793 | + 'validator_list_error_invalid_range' => 'Alla värden av parameter $1 måste vara mellan $2 och $3.', |
| 794 | + 'validator_list_error_invalid_argument' => 'Ett eller flera värden av parameter $1 är ogiltiga.', |
| 795 | + 'validator_list_omitted' => '{{PLURAL:$2|Värdet|Värdena}} $1 har blivit {{PLURAL:$2|utelämnat|utelämnade}}.', |
| 796 | + 'validator_error_accepts_only' => 'Parametern $1 måste ha {{PLURAL:$3|detta värde|ett av dessa värden}}: $2.', |
| 797 | +); |
| 798 | + |
| 799 | +/** Turkish (Türkçe) |
| 800 | + * @author Vito Genovese |
| 801 | + */ |
| 802 | +$messages['tr'] = array( |
| 803 | + 'validator_name' => 'Doğrulayıcı', |
| 804 | + 'validator_error_unknown_argument' => '$1, geçerli bir parametre değildir.', |
| 805 | + 'validator_error_empty_argument' => '$1 parametresi boş bir değere sahip olamaz.', |
| 806 | + 'validator_error_must_be_number' => '$1 parametresi sadece sayı olabilir.', |
| 807 | + 'validator_error_must_be_integer' => '$1 parametresi sadece bir tamsayı olabilir', |
| 808 | + 'validator_list_error_empty_argument' => '$1 parametresi boş değerleri kabul etmemektedir.', |
| 809 | + 'validator_list_error_must_be_number' => '$1 parametresi sadece sayı içerebilir.', |
| 810 | +); |
| 811 | + |
| 812 | +/** Ukrainian (Українська) |
| 813 | + * @author NickK |
| 814 | + * @author Prima klasy4na |
| 815 | + */ |
| 816 | +$messages['uk'] = array( |
| 817 | + 'validator_name' => 'Валідатор', |
| 818 | + 'validator-desc' => 'Валідатор забезпечує іншим розширенням можливості перевірки параметрів функцій парсеру і тегів, встановлення значень за замовчуванням та створення повідомлень про помилки', |
| 819 | + 'validator_error_parameters' => 'У вашому синтаксисі {{PLURAL:$1|виявлена така помилка|виявлені такі помилки}}:', |
| 820 | +); |
| 821 | + |
| 822 | +/** Vietnamese (Tiếng Việt) |
| 823 | + * @author Minh Nguyen |
| 824 | + * @author Vinhtantran |
| 825 | + */ |
| 826 | +$messages['vi'] = array( |
| 827 | + 'validator_name' => 'Bộ phê chuẩn', |
| 828 | + '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.', |
| 829 | + 'validator_error_parameters' => 'Cú pháp có {{PLURAL:$1|lỗi|các lỗi}} sau', |
| 830 | + 'validator_error_unknown_argument' => '$1 không phải là tham số hợp lệ.', |
| 831 | + 'validator_error_required_missing' => 'Không định rõ tham số bắt buộc “$1”.', |
| 832 | + 'validator_error_empty_argument' => 'Tham số “$1” không được để trống.', |
| 833 | + 'validator_error_must_be_number' => 'Tham số “$1” phải là con số.', |
| 834 | + 'validator_error_invalid_range' => 'Tham số “$1” phải nằm giữa $2 và $3.', |
| 835 | + 'validator_error_invalid_argument' => 'Giá trị “$1” không hợp tham số “$2”.', |
| 836 | + 'validator_error_accepts_only' => 'Tham số $1 chỉ nhận được {{PLURAL:$3|giá trị|các giá trị}} này: $2.', |
| 837 | +); |
| 838 | + |
Property changes on: tags/extensions/Validator/REL_0_2_2/Validator.i18n.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 839 | + native |
Index: tags/extensions/Validator/REL_0_2_2/Validator.php |
— | — | @@ -0,0 +1,69 @@ |
| 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.2.2' ); |
| 29 | + |
| 30 | +// Constants indicating the strictness of the parameter validation. |
| 31 | +define( 'Validator_ERRORS_NONE', 0 ); |
| 32 | +define( 'Validator_ERRORS_MINIMAL', 1 ); |
| 33 | +define( 'Validator_ERRORS_WARN', 2 ); |
| 34 | +define( 'Validator_ERRORS_SHOW', 3 ); |
| 35 | +define( 'Validator_ERRORS_STRICT', 4 ); |
| 36 | + |
| 37 | +$egValidatorDir = dirname( __FILE__ ) . '/'; |
| 38 | + |
| 39 | +// Include the settings file. |
| 40 | +require_once( $egValidatorDir . 'Validator_Settings.php' ); |
| 41 | + |
| 42 | +// Put the initalization function into the MW extension hook. |
| 43 | +$wgExtensionFunctions[] = 'efValidatorSetup'; |
| 44 | + |
| 45 | +// Register the internationalization file. |
| 46 | +$wgExtensionMessagesFiles['Validator'] = $egValidatorDir . 'Validator.i18n.php'; |
| 47 | + |
| 48 | +// Autoload the general classes |
| 49 | +$wgAutoloadClasses['Validator'] = $egValidatorDir . 'Validator.class.php'; |
| 50 | +$wgAutoloadClasses['ValidatorFunctions'] = $egValidatorDir . 'Validator_Functions.php'; |
| 51 | +$wgAutoloadClasses['ValidatorFormats'] = $egValidatorDir . 'Validator_Formats.php'; |
| 52 | +$wgAutoloadClasses['ValidatorManager'] = $egValidatorDir . 'Validator_Manager.php'; |
| 53 | + |
| 54 | +/** |
| 55 | + * Initialization function for the Validator extension. |
| 56 | + */ |
| 57 | +function efValidatorSetup() { |
| 58 | + global $wgExtensionCredits; |
| 59 | + |
| 60 | + wfLoadExtensionMessages( 'Validator' ); |
| 61 | + |
| 62 | + $wgExtensionCredits['other'][] = array( |
| 63 | + 'path' => __FILE__, |
| 64 | + 'name' => wfMsg( 'validator_name' ), |
| 65 | + 'version' => Validator_VERSION, |
| 66 | + 'author' => array( '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]' ), |
| 67 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:Validator', |
| 68 | + 'descriptionmsg' => 'validator-desc', |
| 69 | + ); |
| 70 | +} |
Property changes on: tags/extensions/Validator/REL_0_2_2/Validator.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 71 | + native |
Index: tags/extensions/Validator/REL_0_2_2/Validator_Settings.php |
— | — | @@ -0,0 +1,26 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * File defining the settings for the Validator extension |
| 6 | + * |
| 7 | + * NOTICE: |
| 8 | + * Changing one of these settings can be done by copieng or cutting it, |
| 9 | + * and placing it in LocalSettings.php, AFTER the inclusion of Validator. |
| 10 | + * |
| 11 | + * @file Validator_Settings.php |
| 12 | + * @ingroup Validator |
| 13 | + * |
| 14 | + * @author Jeroen De Dauw |
| 15 | + */ |
| 16 | + |
| 17 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 18 | + die( 'Not an entry point.' ); |
| 19 | +} |
| 20 | + |
| 21 | +# Integer. The strictness of the parameter validation and resulting error report when using the ValidatorManager class. |
| 22 | +# Validator_ERRORS_NONE : Validator will not show any errors, and make the best of the input it got. |
| 23 | +# Validator_ERRORS_MINIMAL : Validator will only show a warning when the output could not be generated. |
| 24 | +# Validator_ERRORS_WARN : Validator will make the best of the input it got, but will show a warning that there are errors. |
| 25 | +# Validator_ERRORS_SHOW : Validator will make the best of the input it got, but will show a list of all errors. |
| 26 | +# Validator_ERRORS_STRICT : Validator will only show regular output when there are no errors, if there are, a list of them will be shown. |
| 27 | +$egValidatorErrorLevel = Validator_ERRORS_SHOW; |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_2_2/Validator_Settings.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 28 | + native |
Index: tags/extensions/Validator/REL_0_2_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
|