Index: tags/extensions/Validator/REL_0_4_10/test/ValidatorCriteriaTests.php |
— | — | @@ -0,0 +1,245 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Unit tests for Validators criteria. |
| 6 | + * |
| 7 | + * @ingroup Validator |
| 8 | + * @since 0.4.8 |
| 9 | + * |
| 10 | + * @licence GNU GPL v3 |
| 11 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 12 | + */ |
| 13 | +class ValidatorCriteriaTests extends MediaWikiTestCase { |
| 14 | + |
| 15 | + /** |
| 16 | + * Tests CriterionHasLength. |
| 17 | + */ |
| 18 | + public function testCriterionHasLength() { |
| 19 | + $tests = array( |
| 20 | + array( true, 0, 5, 'foo' ), |
| 21 | + array( false, 0, 5, 'foobar' ), |
| 22 | + array( false, 3, false, 'a' ), |
| 23 | + array( true, 3, false, 'aw<dfxdfwdxgtdfgdfhfdgsfdxgtffds' ), |
| 24 | + array( true, false, false, 'aw<dfxdfwdxgtdfgdfhfdgsfdxgtffds' ), |
| 25 | + array( true, false, false, '' ), |
| 26 | + array( false, 2, 3, '' ), |
| 27 | + array( true, 3, null, 'foo' ), |
| 28 | + array( false, 3, null, 'foobar' ), |
| 29 | + ); |
| 30 | + |
| 31 | + foreach ( $tests as $test ) { |
| 32 | + $c = new CriterionHasLength( $test[1], $test[2] ); |
| 33 | + $p = new Parameter( 'test' ); |
| 34 | + $p->setUserValue( 'test', $test[3] ); |
| 35 | + $this->assertEquals( |
| 36 | + $test[0], |
| 37 | + $c->validate( $p, array() )->isValid(), |
| 38 | + 'Lenght of value "'. $test[3] . '" should ' . ( $test[0] ? '' : 'not ' ) . "be between $test[1] and $test[2] ." |
| 39 | + ); |
| 40 | + } |
| 41 | + } |
| 42 | + |
| 43 | + /** |
| 44 | + * Tests CriterionInArray. |
| 45 | + */ |
| 46 | + public function testCriterionInArray() { |
| 47 | + $tests = array( |
| 48 | + array( true, 'foo', false, array( 'foo', 'bar', 'baz' ) ), |
| 49 | + array( true, 'FoO', false, array( 'fOo', 'bar', 'baz' ) ), |
| 50 | + array( false, 'FoO', true, array( 'fOo', 'bar', 'baz' ) ), |
| 51 | + array( false, 'foobar', false, array( 'foo', 'bar', 'baz' ) ), |
| 52 | + array( false, '', false, array( 'foo', 'bar', 'baz' ) ), |
| 53 | + array( false, '', false, array( 'foo', 'bar', 'baz', 0 ) ), |
| 54 | + ); |
| 55 | + |
| 56 | + foreach ( $tests as $test ) { |
| 57 | + $c = new CriterionInArray( $test[3], $test[2] ); |
| 58 | + $p = new Parameter( 'test' ); |
| 59 | + $p->setUserValue( 'test', $test[1] ); |
| 60 | + $this->assertEquals( |
| 61 | + $test[0], |
| 62 | + $c->validate( $p, array() )->isValid(), |
| 63 | + 'Value "'. $test[1] . '" should ' . ( $test[0] ? '' : 'not ' ) . "be in list '" . $GLOBALS['wgLang']->listToText( $test[3] ) . "'." |
| 64 | + ); |
| 65 | + } |
| 66 | + } |
| 67 | + |
| 68 | + /** |
| 69 | + * Tests CriterionInRange. |
| 70 | + */ |
| 71 | + public function testCriterionInRange() { |
| 72 | + $tests = array( |
| 73 | + array( true, '42', Parameter::TYPE_INTEGER, 0, 99 ), |
| 74 | + array( false, '42', Parameter::TYPE_INTEGER, 0, 9 ), |
| 75 | + array( true, '42', Parameter::TYPE_INTEGER, 0, false ), |
| 76 | + array( true, '42', Parameter::TYPE_INTEGER, false, false ), |
| 77 | + array( false, '42', Parameter::TYPE_INTEGER, false, 9 ), |
| 78 | + array( false, '42', Parameter::TYPE_INTEGER, 99, false ), |
| 79 | + array( false, '42', Parameter::TYPE_INTEGER, 99, 100 ), |
| 80 | + array( true, '42', Parameter::TYPE_INTEGER, 42, 42 ), |
| 81 | + array( false, '4.2', Parameter::TYPE_FLOAT, 42, 42 ), |
| 82 | + array( true, '4.2', Parameter::TYPE_FLOAT, 4.2, 4.2 ), |
| 83 | + array( true, '4.2', Parameter::TYPE_FLOAT, 0, 9 ), |
| 84 | + array( true, '42', Parameter::TYPE_FLOAT, 0, 99 ), |
| 85 | + array( false, '42', Parameter::TYPE_FLOAT, 0, 9 ), |
| 86 | + array( true, '-42', Parameter::TYPE_INTEGER, false, 99 ), |
| 87 | + array( true, '-42', Parameter::TYPE_INTEGER, -99, false ), |
| 88 | + array( true, '42', Parameter::TYPE_INTEGER, -99, false ), |
| 89 | + ); |
| 90 | + |
| 91 | + foreach ( $tests as $test ) { |
| 92 | + $c = new CriterionInRange( $test[3], $test[4] ); |
| 93 | + $p = new Parameter( 'test', $test[2] ); |
| 94 | + $p->setUserValue( 'test', $test[1] ); |
| 95 | + $this->assertEquals( |
| 96 | + $test[0], |
| 97 | + $c->validate( $p, array() )->isValid(), |
| 98 | + 'Value "'. $test[1] . '" should ' . ( $test[0] ? '' : 'not ' ) . "be between '$test[3]' and '$test[4]'." |
| 99 | + ); |
| 100 | + } |
| 101 | + } |
| 102 | + |
| 103 | + /** |
| 104 | + * Tests CriterionIsFloat. |
| 105 | + */ |
| 106 | + public function testCriterionIsFloat() { |
| 107 | + $tests = array( |
| 108 | + array( true, '42' ), |
| 109 | + array( true, '4.2' ), |
| 110 | + array( false, '4.2.' ), |
| 111 | + array( false, '42.' ), |
| 112 | + array( false, '4a2' ), |
| 113 | + array( true, '-42' ), |
| 114 | + array( true, '-4.2' ), |
| 115 | + array( false, '' ), |
| 116 | + array( true, '0' ), |
| 117 | + array( true, '0.0' ), |
| 118 | + ); |
| 119 | + |
| 120 | + foreach ( $tests as $test ) { |
| 121 | + $c = new CriterionIsFloat(); |
| 122 | + $p = new Parameter( 'test' ); |
| 123 | + $p->setUserValue( 'test', $test[1] ); |
| 124 | + $this->assertEquals( |
| 125 | + $test[0], |
| 126 | + $c->validate( $p, array() )->isValid(), |
| 127 | + 'Value "'. $test[1] . '" should ' . ( $test[0] ? '' : 'not ' ) . "be a float." |
| 128 | + ); |
| 129 | + } |
| 130 | + } |
| 131 | + |
| 132 | + /** |
| 133 | + * Tests CriterionIsInteger. |
| 134 | + */ |
| 135 | + public function testCriterionIsInteger() { |
| 136 | + $tests = array( |
| 137 | + array( true, '42', true ), |
| 138 | + array( false, '4.2', true ), |
| 139 | + array( false, '4.2.', true ), |
| 140 | + array( false, '42.', true ), |
| 141 | + array( false, '4a2', true ), |
| 142 | + array( true, '-42', true ), |
| 143 | + array( false, '-42', false ), |
| 144 | + array( false, '-4.2', true ), |
| 145 | + array( false, '', true ), |
| 146 | + array( true, '0', true ), |
| 147 | + ); |
| 148 | + |
| 149 | + foreach ( $tests as $test ) { |
| 150 | + $c = new CriterionIsInteger( $test[2] ); |
| 151 | + $p = new Parameter( 'test' ); |
| 152 | + $p->setUserValue( 'test', $test[1] ); |
| 153 | + $this->assertEquals( |
| 154 | + $test[0], |
| 155 | + $c->validate( $p, array() )->isValid(), |
| 156 | + 'Value "'. $test[1] . '" should ' . ( $test[0] ? '' : 'not ' ) . "be an integer." |
| 157 | + ); |
| 158 | + } |
| 159 | + } |
| 160 | + |
| 161 | + /** |
| 162 | + * Tests CriterionUniqueItems. |
| 163 | + */ |
| 164 | + public function testCriterionUniqueItems() { |
| 165 | + $tests = array( |
| 166 | + array( true, array( 'foo', 'bar', 'baz' ), false ), |
| 167 | + array( true, array( 'foo', 'bar', 'baz' ), true ), |
| 168 | + array( false, array( 'foo', 'bar', 'baz', 'foo' ), false ), |
| 169 | + array( false, array( 'foo', 'bar', 'baz', 'foo' ), true ), |
| 170 | + array( false, array( 'foo', 'bar', 'baz', 'FOO' ), false ), |
| 171 | + array( true, array( 'foo', 'bar', 'baz', 'FOO' ), true ), |
| 172 | + array( true, array(), false ), |
| 173 | + ); |
| 174 | + |
| 175 | + foreach ( $tests as $test ) { |
| 176 | + $c = new CriterionUniqueItems( $test[2] ); |
| 177 | + $p = new ListParameter( 'test' ); |
| 178 | + $p->setUserValue( 'test', '' ); |
| 179 | + $p->setValue( $test[1] ); |
| 180 | + |
| 181 | + $this->assertEquals( |
| 182 | + $test[0], |
| 183 | + $c->validate( $p, array() ), |
| 184 | + 'Value "'. $test[1] . '" should ' . ( $test[0] ? '' : 'not ' ) . " have unique items." |
| 185 | + ); |
| 186 | + } |
| 187 | + } |
| 188 | + |
| 189 | + /** |
| 190 | + * Tests CriterionItemCount. |
| 191 | + */ |
| 192 | + public function testCriterionItemCount() { |
| 193 | + $tests = array( |
| 194 | + array( true, array( 'foo', 'bar', 'baz' ), 0, 5 ), |
| 195 | + array( false, array( 'foo', 'bar', 'baz' ), 0, 2 ), |
| 196 | + array( true, array( 'foo', 'bar', 'baz' ), 0, false ), |
| 197 | + array( true, array( 'foo', 'bar', 'baz' ), false, 99 ), |
| 198 | + array( true, array( 'foo', 'bar', 'baz' ), 3, 3 ), |
| 199 | + array( false, array(), 1, 1 ), |
| 200 | + array( true, array( 'foo', 'bar', 'baz' ), false, false ), |
| 201 | + array( true, array( 'foo', 'bar', 'baz' ), 3, null ), |
| 202 | + array( false, array( 'foo', 'bar', 'baz' ), 2, null ), |
| 203 | + ); |
| 204 | + |
| 205 | + foreach ( $tests as $test ) { |
| 206 | + $c = new CriterionItemCount( $test[2], $test[3] ); |
| 207 | + $p = new ListParameter( 'test' ); |
| 208 | + $p->setUserValue( 'test', '' ); |
| 209 | + $p->setValue( $test[1] ); |
| 210 | + |
| 211 | + $this->assertEquals( |
| 212 | + $test[0], |
| 213 | + $c->validate( $p, array() ), |
| 214 | + 'List "'. $GLOBALS['wgLang']->listToText( $test[1] ) . '" should ' . ( $test[0] ? '' : 'not ' ) . " have between and $test[2], $test[3] items." |
| 215 | + ); |
| 216 | + } |
| 217 | + } |
| 218 | + |
| 219 | + /** |
| 220 | + * Tests CriterionNotEmpty. |
| 221 | + */ |
| 222 | + public function testCriterionNotEmpty() { |
| 223 | + $tests = array( |
| 224 | + array( true, 'a' ), |
| 225 | + array( true, ' a ' ), |
| 226 | + array( false, '' ), |
| 227 | + array( false, ' ' ), |
| 228 | + array( false, "\n" ), |
| 229 | + array( false, " \n " ), |
| 230 | + array( true, " \n ." ), |
| 231 | + ); |
| 232 | + |
| 233 | + foreach ( $tests as $test ) { |
| 234 | + $c = new CriterionNotEmpty(); |
| 235 | + $p = new Parameter( 'test' ); |
| 236 | + $p->setUserValue( 'test', $test[1] ); |
| 237 | + |
| 238 | + $this->assertEquals( |
| 239 | + $test[0], |
| 240 | + $c->validate( $p, array() )->isValid(), |
| 241 | + 'Value "'. $test[1]. '" should ' . ( !$test[0] ? '' : 'not ' ) . " be empty." |
| 242 | + ); |
| 243 | + } |
| 244 | + } |
| 245 | + |
| 246 | +} |
Property changes on: tags/extensions/Validator/REL_0_4_10/test/ValidatorCriteriaTests.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 247 | + native |
Index: tags/extensions/Validator/REL_0_4_10/INSTALL |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +[[Validator 0.4.10]] |
| 3 | + |
| 4 | +Once you have downloaded the code, place the 'Validator' directory within |
| 5 | +your MediaWiki 'extensions' directory. Then add the following code to your |
| 6 | +LocalSettings.php file BEFORE the inclusion of any extensions using Validator: |
| 7 | + |
| 8 | +# Validator |
| 9 | +require_once( "$IP/extensions/Validator/Validator.php" ); |
| 10 | + |
| 11 | + |
| 12 | +More information can be found at http://www.mediawiki.org/wiki/Extension:Validator#Setup |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/INSTALL |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Index: tags/extensions/Validator/REL_0_4_10/RELEASE-NOTES |
— | — | @@ -0,0 +1,196 @@ |
| 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.4.10 === |
| 9 | +(2011-08-04) |
| 10 | + |
| 11 | +* Added language parameter to describe that allows setting the lang for the generated docs. |
| 12 | + |
| 13 | +* Added getMessage method to ParserHook class for better i18n. |
| 14 | + |
| 15 | +=== Validator 0.4.9 === |
| 16 | +(2011-07-30) |
| 17 | + |
| 18 | +* Added setMessage and getMessage methods to Parameter class for better i18n. |
| 19 | + |
| 20 | +=== Validator 0.4.8 === |
| 21 | +(2011-07-19) |
| 22 | + |
| 23 | +* Added unit tests for the criteria. |
| 24 | + |
| 25 | +* Fixed issue with handling floats in CriterionInRange. |
| 26 | + |
| 27 | +* Added support for open limits in CriterionHasLength and CriterionItemCount. |
| 28 | + |
| 29 | +=== Validator 0.4.7 === |
| 30 | +(2011-05-15) |
| 31 | + |
| 32 | +* Added ParameterInput class to generate HTML inputs for parameters, based on code from SMWs Special:Ask. |
| 33 | + |
| 34 | +* Added "$manipulate = true" as second parameter for Parameter::setDefault, |
| 35 | + which gets passed to Parameter::setDoManipulationOfDefault. |
| 36 | + |
| 37 | +* Boolean manipulation now ignores values that are already a boolean. |
| 38 | + |
| 39 | +=== Validator 0.4.6 === |
| 40 | +(2011-03-21) |
| 41 | + |
| 42 | +* Removed ParamManipulationBoolstr. |
| 43 | + |
| 44 | +* Added method to get the allowed values to CriterionInArray. |
| 45 | + |
| 46 | +* Added automatic non-using of boolean manipulation when a boolean param was defaulted to a boolean value. |
| 47 | + |
| 48 | +* Parameter fix in ListParameter::setDefault, follow up to change in 0.4.5. |
| 49 | + |
| 50 | +=== Validator 0.4.5 === |
| 51 | +(2011-03-05) |
| 52 | + |
| 53 | +* Escaping fix in the describe parser hook. |
| 54 | + |
| 55 | +* Added string manipulation, applied by default on strings and chars. |
| 56 | + |
| 57 | +=== Validator 0.4.4 === |
| 58 | +(2011-02-16) |
| 59 | + |
| 60 | +* Tweaks to parser usage in the ParserHook class. |
| 61 | + |
| 62 | +* Fixed incorrect output of nested pre-tags in the describe parser hook. |
| 63 | + |
| 64 | +=== Validator 0.4.3.1 === |
| 65 | +(2011-01-20) |
| 66 | + |
| 67 | +* Removed underscore and space switching behaviour for tag extensions and parser functions. |
| 68 | + |
| 69 | +=== Validator 0.4.3 === |
| 70 | +(2011-01-11) |
| 71 | + |
| 72 | +* Added describe parser hook that enables automatic documentation generation of parser hooks defined via Validator. |
| 73 | + |
| 74 | +* Modified the ParserHook and Parameter classes to allow specifying a description message. |
| 75 | + |
| 76 | +=== Validator 0.4.2 === |
| 77 | +(2010-10-28) |
| 78 | + |
| 79 | +* Fixed compatibility with MediaWiki 1.15.x. |
| 80 | + |
| 81 | +* Removed the lowerCaseValue field in the Parameter class and replaced it's functionality with a ParameterManipulation. |
| 82 | + |
| 83 | +=== Validator 0.4.1 === |
| 84 | +(2010-10-20) |
| 85 | + |
| 86 | +* Made several small fixes and improvements. |
| 87 | + |
| 88 | +=== Validator 0.4 === |
| 89 | +(2010-10-15) |
| 90 | + |
| 91 | +==== New features ==== |
| 92 | + |
| 93 | +* Added ParserHook class that allows for out-of-the-box parser function and tag extension creation |
| 94 | +: with full Validator support. |
| 95 | + |
| 96 | +* Added listerrors parser hook that allows you to list all validation errors that occurred at the point it's rendered. |
| 97 | + |
| 98 | +* Added support for conditional parameter adding. |
| 99 | + |
| 100 | +==== Refactoring ==== |
| 101 | + |
| 102 | +Basically everything got rewritten... |
| 103 | + |
| 104 | +* Added Parameter and ListParameter classes to replace parameter definitions in array form. |
| 105 | + |
| 106 | +* Added ParameterCriterion and ListParameterCriterion classes for better handling of parameter criteria. |
| 107 | + |
| 108 | +* Added ParameterManipulation and ListParameterManipulation classes for more structured formatting of parameters. |
| 109 | + |
| 110 | +* Added ValidationError class to better describe errors. |
| 111 | + |
| 112 | +* Replaced the error level enum by ValidationError::SEVERITY_ and ValidationError::ACTION_, which are linked in $egErrorActions. |
| 113 | + |
| 114 | +=== Validator 0.3.6 === |
| 115 | +(2010-08-26) |
| 116 | + |
| 117 | +* Added support for 'tolower' argument in parameter info definitions. |
| 118 | + |
| 119 | +=== Validator 0.3.5 === |
| 120 | +(2010-07-26) |
| 121 | + |
| 122 | +* Fixed issue with the original parameter name (and in some cases also value) in error messages. |
| 123 | + |
| 124 | +=== Validator 0.3.4 === |
| 125 | +(2010-07-07) |
| 126 | + |
| 127 | +* Fixed issue with parameter reference that occurred in php 5.3 and later. |
| 128 | + |
| 129 | +* Fixed escaping issue that caused parameter names in error messages to be shown incorrectly. |
| 130 | + |
| 131 | +* Fixed small issue with parameter value trimming that caused problems when objects where passed. |
| 132 | + |
| 133 | +=== Validator 0.3.3 === |
| 134 | +(2010-06-20) |
| 135 | + |
| 136 | +* Fixed bug that caused notices when using the ValidatorManager::manageParsedParameters method in some cases. |
| 137 | + |
| 138 | +=== Validator 0.3.2 === |
| 139 | +(2010-06-07) |
| 140 | + |
| 141 | +* Added lower casing to parameter names, and optionally, but default on, lower-casing for parameter values. |
| 142 | + |
| 143 | +* Added removal of default parameters from the default parameter queue when used as a named parameter. |
| 144 | + |
| 145 | +=== Validator 0.3.1 === |
| 146 | +(2010-06-04) |
| 147 | + |
| 148 | +* Added ValidatorManager::manageParsedParameters and Validator::setParameters. |
| 149 | + |
| 150 | +=== Validator 0.3 === |
| 151 | +(2010-05-31) |
| 152 | + |
| 153 | +* Added generic default parameter support. |
| 154 | + |
| 155 | +* Added parameter dependency support. |
| 156 | + |
| 157 | +* Added full meta data support for validation and formatting functions, enabling more advanced handling of parameters. |
| 158 | + |
| 159 | +* Major refactoring to conform to MediaWiki convention. |
| 160 | + |
| 161 | +=== Validator 0.2.2 === |
| 162 | +(2010-03-01) |
| 163 | + |
| 164 | +* Fixed potential xss vectors. |
| 165 | + |
| 166 | +* Minor code improvements. |
| 167 | + |
| 168 | +=== Validator 0.2.1 === |
| 169 | +(2010-02-01) |
| 170 | + |
| 171 | +* Changed the inclusion of the upper bound for range validation functions. |
| 172 | + |
| 173 | +* Small language fixes. |
| 174 | + |
| 175 | +=== Validator 0.2 === |
| 176 | +(2009-12-25) |
| 177 | + |
| 178 | +* Added handling for lists of a type, instead of having list as a type. This includes per-item-validation and per-item-defaulting. |
| 179 | + |
| 180 | +* Added list validation functions: item_count and unique_items |
| 181 | + |
| 182 | +* Added boolean, number and char types. |
| 183 | + |
| 184 | +* 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. |
| 185 | + |
| 186 | +* Added Validator_ERRORS_MINIMAL value for $egValidatorErrorLevel. |
| 187 | + |
| 188 | +* Added warning message to ValidatorManager that will be shown for errors when egValidatorErrorLevel is Validator_ERRORS_WARN. |
| 189 | + |
| 190 | +* Added criteria support for is_boolean, has_length and regex. |
| 191 | + |
| 192 | +=== Validator 0.1 === |
| 193 | +(2009-12-17) |
| 194 | + |
| 195 | +* Initial release, featuring parameter validation, defaulting and error generation. |
| 196 | + |
| 197 | +{{Validator see also}} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/RELEASE-NOTES |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 198 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/ListParameterCriterion.php |
— | — | @@ -0,0 +1,37 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * List parameter criterion definition class. This is for criteria |
| 6 | + * that apply to list parameters as a whole instead of to their |
| 7 | + * individual items. |
| 8 | + * |
| 9 | + * TODO: error message support |
| 10 | + * |
| 11 | + * @since 0.4 |
| 12 | + * |
| 13 | + * @file ListParameterCriterion.php |
| 14 | + * @ingroup Validator |
| 15 | + * @ingroup Criteria |
| 16 | + * |
| 17 | + * @licence GNU GPL v3 or later |
| 18 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 19 | + */ |
| 20 | +abstract class ListParameterCriterion extends ParameterCriterion { |
| 21 | + |
| 22 | + /** |
| 23 | + * Constructor. |
| 24 | + * |
| 25 | + * @since 0.4 |
| 26 | + */ |
| 27 | + public function __construct() { |
| 28 | + parent::__construct(); |
| 29 | + } |
| 30 | + |
| 31 | + /** |
| 32 | + * @see ParameterCriterion::isForLists |
| 33 | + */ |
| 34 | + public function isForLists() { |
| 35 | + return true; |
| 36 | + } |
| 37 | + |
| 38 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/ListParameterCriterion.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 39 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/manipulations/ParamManipulationFunctions.php |
— | — | @@ -0,0 +1,54 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter manipulation for assigning the value to the result of one |
| 6 | + * or more functions with as only argument the value itself. |
| 7 | + * |
| 8 | + * @since 0.4.2 |
| 9 | + * |
| 10 | + * @file ParamManipulationFunctions.php |
| 11 | + * @ingroup Validator |
| 12 | + * @ingroup ParameterManipulations |
| 13 | + * |
| 14 | + * @author Jeroen De Dauw |
| 15 | + */ |
| 16 | +class ParamManipulationFunctions extends ItemParameterManipulation { |
| 17 | + |
| 18 | + /** |
| 19 | + * The names of functions to apply. |
| 20 | + * |
| 21 | + * @since 0.4.2 |
| 22 | + * |
| 23 | + * @var array of callbacks |
| 24 | + */ |
| 25 | + protected $functions = array(); |
| 26 | + |
| 27 | + /** |
| 28 | + * Constructor. |
| 29 | + * |
| 30 | + * @since 0.4.2 |
| 31 | + * |
| 32 | + * You can provide an array with function names or pass each function name as a separate argument. |
| 33 | + */ |
| 34 | + public function __construct() { |
| 35 | + parent::__construct(); |
| 36 | + |
| 37 | + $args = func_get_args(); |
| 38 | + |
| 39 | + if ( count( $args ) > 0 ) { |
| 40 | + $this->functions = is_array( $args[0] ) ? $args[0] : $args; |
| 41 | + } |
| 42 | + } |
| 43 | + |
| 44 | + /** |
| 45 | + * @see ItemParameterManipulation::doManipulation |
| 46 | + * |
| 47 | + * @since 0.4.2 |
| 48 | + */ |
| 49 | + public function doManipulation( &$value, Parameter $parameter, array &$parameters ) { |
| 50 | + foreach ( $this->functions as $function ) { |
| 51 | + $value = call_user_func( $function, $value ); |
| 52 | + } |
| 53 | + } |
| 54 | + |
| 55 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/manipulations/ParamManipulationFunctions.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 56 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/manipulations/ParamManipulationImplode.php |
— | — | @@ -0,0 +1,55 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter manipulation converting the value into a list by joining the items together. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file ParamManipulationImplode.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup ParameterManipulations |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class ParamManipulationImplode extends ListParameterManipulation { |
| 16 | + |
| 17 | + /** |
| 18 | + * The delimiter to join the items together with. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + * |
| 22 | + * @var string |
| 23 | + */ |
| 24 | + protected $delimiter; |
| 25 | + |
| 26 | + /** |
| 27 | + * A wrapper to encapsulate each item in. |
| 28 | + * |
| 29 | + * @since 0.4 |
| 30 | + * |
| 31 | + * @var string |
| 32 | + */ |
| 33 | + protected $wrapper; |
| 34 | + |
| 35 | + /** |
| 36 | + * Constructor. |
| 37 | + * |
| 38 | + * @since 0.4 |
| 39 | + */ |
| 40 | + public function __construct( $delimiter = ',', $wrapper = '' ) { |
| 41 | + parent::__construct(); |
| 42 | + |
| 43 | + $this->delimiter = $delimiter; |
| 44 | + $this->wrapper = $wrapper; |
| 45 | + } |
| 46 | + |
| 47 | + /** |
| 48 | + * @see ParameterManipulation::manipulate |
| 49 | + * |
| 50 | + * @since 0.4 |
| 51 | + */ |
| 52 | + public function manipulate( Parameter &$parameter, array &$parameters ) { |
| 53 | + $parameter->setValue( $this->wrapper . implode( $this->wrapper . $this->delimiter . $this->wrapper, $parameter->getValue() ) . $this->wrapper ); |
| 54 | + } |
| 55 | + |
| 56 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/manipulations/ParamManipulationImplode.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 57 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/manipulations/ParamManipulationInteger.php |
— | — | @@ -0,0 +1,34 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter manipulation converting the value to a integer. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file ParamManipulationInteger.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup ParameterManipulations |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class ParamManipulationInteger extends ItemParameterManipulation { |
| 16 | + |
| 17 | + /** |
| 18 | + * Constructor. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + */ |
| 22 | + public function __construct() { |
| 23 | + parent::__construct(); |
| 24 | + } |
| 25 | + |
| 26 | + /** |
| 27 | + * @see ItemParameterManipulation::doManipulation |
| 28 | + * |
| 29 | + * @since 0.4 |
| 30 | + */ |
| 31 | + public function doManipulation( &$value, Parameter $parameter, array &$parameters ) { |
| 32 | + $value = (int)$value; |
| 33 | + } |
| 34 | + |
| 35 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/manipulations/ParamManipulationInteger.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 36 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/manipulations/ParamManipulationBoolean.php |
— | — | @@ -0,0 +1,37 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter manipulation converting the value to a boolean. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file ParamManipulationBoolean.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup ParameterManipulations |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class ParamManipulationBoolean extends ItemParameterManipulation { |
| 16 | + |
| 17 | + /** |
| 18 | + * Constructor. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + */ |
| 22 | + public function __construct() { |
| 23 | + parent::__construct(); |
| 24 | + } |
| 25 | + |
| 26 | + /** |
| 27 | + * @see ItemParameterManipulation::doManipulation |
| 28 | + * |
| 29 | + * @since 0.4 |
| 30 | + */ |
| 31 | + public function doManipulation( &$value, Parameter $parameter, array &$parameters ) { |
| 32 | + // When the value defaulted to a boolean, there is no need for this manipulation. |
| 33 | + if ( !is_bool( $value ) || !$parameter->wasSetToDefault() ) { |
| 34 | + $value = in_array( strtolower( $value ), array( 'yes', 'on' ) ); |
| 35 | + } |
| 36 | + } |
| 37 | + |
| 38 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/manipulations/ParamManipulationBoolean.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 39 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/manipulations/ParamManipulationFloat.php |
— | — | @@ -0,0 +1,34 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter manipulation converting the value to a float. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file ParamManipulationFloat.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup ParameterManipulations |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class ParamManipulationFloat extends ItemParameterManipulation { |
| 16 | + |
| 17 | + /** |
| 18 | + * Constructor. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + */ |
| 22 | + public function __construct() { |
| 23 | + parent::__construct(); |
| 24 | + } |
| 25 | + |
| 26 | + /** |
| 27 | + * @see ItemParameterManipulation::doManipulation |
| 28 | + * |
| 29 | + * @since 0.4 |
| 30 | + */ |
| 31 | + public function doManipulation( &$value, Parameter $parameter, array &$parameters ) { |
| 32 | + $value = (float)$value; |
| 33 | + } |
| 34 | + |
| 35 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/manipulations/ParamManipulationFloat.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 36 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/manipulations/ParamManipulationString.php |
— | — | @@ -0,0 +1,34 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter manipulation converting the value to a string. |
| 6 | + * |
| 7 | + * @since 0.4.5 |
| 8 | + * |
| 9 | + * @file ParamManipulationString.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup ParameterManipulations |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class ParamManipulationString extends ItemParameterManipulation { |
| 16 | + |
| 17 | + /** |
| 18 | + * Constructor. |
| 19 | + * |
| 20 | + * @since 0.4.5 |
| 21 | + */ |
| 22 | + public function __construct() { |
| 23 | + parent::__construct(); |
| 24 | + } |
| 25 | + |
| 26 | + /** |
| 27 | + * @see ItemParameterManipulation::doManipulation |
| 28 | + * |
| 29 | + * @since 0.4.5 |
| 30 | + */ |
| 31 | + public function doManipulation( &$value, Parameter $parameter, array &$parameters ) { |
| 32 | + $value = (string)$value; |
| 33 | + } |
| 34 | + |
| 35 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/manipulations/ParamManipulationString.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 36 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/ListParameterManipulation.php |
— | — | @@ -0,0 +1,35 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * List parameter manipulation base class. This is for manipulations |
| 6 | + * that apply to list parameters as a whole instead of to their |
| 7 | + * individual items. |
| 8 | + * |
| 9 | + * @since 0.4 |
| 10 | + * |
| 11 | + * @file ListParameterManipulation.php |
| 12 | + * @ingroup Validator |
| 13 | + * @ingroup ParameterManipulations |
| 14 | + * |
| 15 | + * @licence GNU GPL v3 or later |
| 16 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 17 | + */ |
| 18 | +abstract class ListParameterManipulation extends ParameterManipulation { |
| 19 | + |
| 20 | + /** |
| 21 | + * Constructor. |
| 22 | + * |
| 23 | + * @since 0.4 |
| 24 | + */ |
| 25 | + public function __construct() { |
| 26 | + parent::__construct(); |
| 27 | + } |
| 28 | + |
| 29 | + /** |
| 30 | + * @see ParameterManipulation::isForLists |
| 31 | + */ |
| 32 | + public function isForLists() { |
| 33 | + return true; |
| 34 | + } |
| 35 | + |
| 36 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/ListParameterManipulation.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 37 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/ParameterCriterion.php |
— | — | @@ -0,0 +1,47 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter criterion base class. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file ParameterCriterion.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup Criteria |
| 12 | + * |
| 13 | + * @licence GNU GPL v3 or later |
| 14 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 15 | + */ |
| 16 | +abstract class ParameterCriterion { |
| 17 | + |
| 18 | + /** |
| 19 | + * Validate a parameter against the criterion. |
| 20 | + * |
| 21 | + * @param Parameter $parameter |
| 22 | + * @param array $parameters |
| 23 | + * |
| 24 | + * @since 0.4 |
| 25 | + * |
| 26 | + * @return CriterionValidationResult |
| 27 | + */ |
| 28 | + public abstract function validate( Parameter $parameter, array $parameters ); |
| 29 | + |
| 30 | + /** |
| 31 | + * Returns if the criterion applies to lists as a whole. |
| 32 | + * |
| 33 | + * @since 0.4 |
| 34 | + * |
| 35 | + * @return boolean |
| 36 | + */ |
| 37 | + public abstract function isForLists(); |
| 38 | + |
| 39 | + /** |
| 40 | + * Constructor. |
| 41 | + * |
| 42 | + * @since 0.4 |
| 43 | + */ |
| 44 | + public function __construct() { |
| 45 | + |
| 46 | + } |
| 47 | + |
| 48 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/ParameterCriterion.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 49 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/ParameterInput.php |
— | — | @@ -0,0 +1,253 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Simple class to get a HTML input for the parameter. |
| 6 | + * Usable for when creating a GUI from a parameter list. |
| 7 | + * |
| 8 | + * Based on 'addOptionInput' from Special:Ask in SMW 1.5.6. |
| 9 | + * |
| 10 | + * TODO: support lists (now only done when values are restricted to an array) |
| 11 | + * TODO: nicify HTML |
| 12 | + * |
| 13 | + * @since 0.4.6 |
| 14 | + * |
| 15 | + * @file ParameterInput.php |
| 16 | + * @ingroup Validator |
| 17 | + * |
| 18 | + * @licence GNU GPL v3 or later |
| 19 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 20 | + */ |
| 21 | +class ParameterInput { |
| 22 | + |
| 23 | + /** |
| 24 | + * The parameter to print an input for. |
| 25 | + * |
| 26 | + * @since O.4.6 |
| 27 | + * |
| 28 | + * @var Parameter |
| 29 | + */ |
| 30 | + protected $param; |
| 31 | + |
| 32 | + /** |
| 33 | + * The current value for the parameter. When provided, |
| 34 | + * it'll be used as value for the input, otherwise the |
| 35 | + * parameters default value will be used. |
| 36 | + * |
| 37 | + * @since 0.4.6 |
| 38 | + * |
| 39 | + * @var mixed: string or false |
| 40 | + */ |
| 41 | + protected $currentValue; |
| 42 | + |
| 43 | + /** |
| 44 | + * Name for the input. |
| 45 | + * |
| 46 | + * @since 0.6.4 |
| 47 | + * |
| 48 | + * @var string |
| 49 | + */ |
| 50 | + protected $inputName; |
| 51 | + |
| 52 | + /** |
| 53 | + * Constructor. |
| 54 | + * |
| 55 | + * @since 0.4.6 |
| 56 | + * |
| 57 | + * @param Parameter $param |
| 58 | + * @param mixed $currentValue |
| 59 | + */ |
| 60 | + public function __construct( Parameter $param, $currentValue = false ) { |
| 61 | + $this->param = $param; |
| 62 | + $this->currentValue = $currentValue; |
| 63 | + $this->inputName = $param->getName(); |
| 64 | + } |
| 65 | + |
| 66 | + /** |
| 67 | + * Sets the current value. |
| 68 | + * |
| 69 | + * @since 0.4.6 |
| 70 | + * |
| 71 | + * @param mixed $currentValue |
| 72 | + */ |
| 73 | + public function setCurrentValue( $currentValue ) { |
| 74 | + $this->currentValue = $currentValue; |
| 75 | + } |
| 76 | + |
| 77 | + /** |
| 78 | + * Sets the name for the input; defaults to the name of the parameter. |
| 79 | + * |
| 80 | + * @since 0.6.4 |
| 81 | + * |
| 82 | + * @param string $name |
| 83 | + */ |
| 84 | + public function setInputName( $name ) { |
| 85 | + $this->inputName = $name; |
| 86 | + } |
| 87 | + |
| 88 | + /** |
| 89 | + * Returns the HTML for the parameter input. |
| 90 | + * |
| 91 | + * @since 0.4.6 |
| 92 | + * |
| 93 | + * @return string |
| 94 | + */ |
| 95 | + public function getHtml() { |
| 96 | + $valueList = array(); |
| 97 | + |
| 98 | + foreach ( $this->param->getCriteria() as $criterion ) { |
| 99 | + if ( $criterion instanceof CriterionInArray ) { |
| 100 | + $valueList[] = $criterion->getAllowedValues(); |
| 101 | + } |
| 102 | + } |
| 103 | + |
| 104 | + if ( count( $valueList ) > 0 ) { |
| 105 | + $valueList = count( $valueList ) > 1 ? call_user_func_array( 'array_intersect', $valueList ) : $valueList[0]; |
| 106 | + $html = $this->param->isList() ? $this->getCheckboxListInput( $valueList ) : $this->getSelectInput( $valueList ); |
| 107 | + } |
| 108 | + else { |
| 109 | + switch ( $this->param->getType() ) { |
| 110 | + case Parameter::TYPE_CHAR: |
| 111 | + case Parameter::TYPE_FLOAT: |
| 112 | + case Parameter::TYPE_INTEGER: |
| 113 | + case Parameter::TYPE_NUMBER: |
| 114 | + $html = $this->getNumberInput(); |
| 115 | + break; |
| 116 | + case Parameter::TYPE_BOOLEAN: |
| 117 | + $html = $this->getBooleanInput(); |
| 118 | + break; |
| 119 | + case Parameter::TYPE_STRING: |
| 120 | + default: |
| 121 | + $html = $this->getStrInput(); |
| 122 | + break; |
| 123 | + } |
| 124 | + } |
| 125 | + |
| 126 | + return $html; |
| 127 | + } |
| 128 | + |
| 129 | + /** |
| 130 | + * Returns the value to initially display with the input. |
| 131 | + * |
| 132 | + * @since 0.4.6 |
| 133 | + * |
| 134 | + * @return mixed |
| 135 | + */ |
| 136 | + protected function getValueToUse() { |
| 137 | + return $this->currentValue === false ? $this->param->getDefault() : $this->currentValue; |
| 138 | + } |
| 139 | + |
| 140 | + /** |
| 141 | + * Gets a short text input suitable for numbers. |
| 142 | + * |
| 143 | + * @since 0.4.6 |
| 144 | + * |
| 145 | + * @return string |
| 146 | + */ |
| 147 | + protected function getNumberInput() { |
| 148 | + return Html::input( |
| 149 | + $this->inputName, |
| 150 | + $this->getValueToUse(), |
| 151 | + 'text', |
| 152 | + array( |
| 153 | + 'size' => 6 |
| 154 | + ) |
| 155 | + ); |
| 156 | + } |
| 157 | + |
| 158 | + /** |
| 159 | + * Gets a text input for a string. |
| 160 | + * |
| 161 | + * @since 0.4.6 |
| 162 | + * |
| 163 | + * @return string |
| 164 | + */ |
| 165 | + protected function getStrInput() { |
| 166 | + return Html::input( |
| 167 | + $this->inputName, |
| 168 | + $this->getValueToUse(), |
| 169 | + 'text', |
| 170 | + array( |
| 171 | + 'size' => 32 |
| 172 | + ) |
| 173 | + ); |
| 174 | + } |
| 175 | + |
| 176 | + /** |
| 177 | + * Gets a checkbox. |
| 178 | + * |
| 179 | + * @since 0.4.6 |
| 180 | + * |
| 181 | + * @return string |
| 182 | + */ |
| 183 | + protected function getBooleanInput() { |
| 184 | + return Xml::check( |
| 185 | + $this->inputName, |
| 186 | + $this->getValueToUse() |
| 187 | + ); |
| 188 | + } |
| 189 | + |
| 190 | + /** |
| 191 | + * Gets a select menu for the provided values. |
| 192 | + * |
| 193 | + * @since 0.4.6 |
| 194 | + * |
| 195 | + * @param array $valueList |
| 196 | + * |
| 197 | + * @return string |
| 198 | + */ |
| 199 | + protected function getSelectInput( array $valueList ) { |
| 200 | + $options = array(); |
| 201 | + $options[] = '<option value=""></option>'; |
| 202 | + |
| 203 | + $currentValues = (array)$this->getValueToUse(); |
| 204 | + if ( is_null( $currentValues ) ) $currentValues = array(); |
| 205 | + |
| 206 | + foreach ( $valueList as $value ) { |
| 207 | + $options[] = |
| 208 | + '<option value="' . htmlspecialchars( $value ) . '"' . |
| 209 | + ( in_array( $value, $currentValues ) ? ' selected' : '' ) . '>' . htmlspecialchars( $value ) . |
| 210 | + '</option>'; |
| 211 | + } |
| 212 | + |
| 213 | + return Html::rawElement( |
| 214 | + 'select', |
| 215 | + array( |
| 216 | + 'name' => $this->inputName |
| 217 | + ), |
| 218 | + implode( "\n", $options ) |
| 219 | + ); |
| 220 | + } |
| 221 | + |
| 222 | + /** |
| 223 | + * Gets a list of input boxes for the provided values. |
| 224 | + * |
| 225 | + * @since 0.4.6 |
| 226 | + * |
| 227 | + * @param array $valueList |
| 228 | + * |
| 229 | + * @return string |
| 230 | + */ |
| 231 | + protected function getCheckboxListInput( array $valueList ) { |
| 232 | + $boxes = array(); |
| 233 | + |
| 234 | + $currentValues = (array)$this->getValueToUse(); |
| 235 | + if ( is_null( $currentValues ) ) $currentValues = array(); |
| 236 | + |
| 237 | + foreach ( $valueList as $value ) { |
| 238 | + $boxes[] = Html::rawElement( |
| 239 | + 'span', |
| 240 | + array( |
| 241 | + 'style' => 'white-space: nowrap; padding-right: 5px;' |
| 242 | + ), |
| 243 | + Xml::check( |
| 244 | + $this->inputName . '[' . htmlspecialchars( $value ). ']', |
| 245 | + in_array( $value, $currentValues ) |
| 246 | + ) . |
| 247 | + Html::element( 'tt', array(), $value ) |
| 248 | + ); |
| 249 | + } |
| 250 | + |
| 251 | + return implode( "\n", $boxes ); |
| 252 | + } |
| 253 | + |
| 254 | +} |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/ParameterInput.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 255 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/ParameterManipulation.php |
— | — | @@ -0,0 +1,45 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter manipulation base class. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file ParameterManipulation.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup ParameterManipulations |
| 12 | + * |
| 13 | + * @licence GNU GPL v3 or later |
| 14 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 15 | + */ |
| 16 | +abstract class ParameterManipulation { |
| 17 | + |
| 18 | + /** |
| 19 | + * Validate a parameter against the criterion. |
| 20 | + * |
| 21 | + * @param Parameter $parameter |
| 22 | + * @param array $parameters |
| 23 | + * |
| 24 | + * @since 0.4 |
| 25 | + */ |
| 26 | + public abstract function manipulate( Parameter &$parameter, array &$parameters ); |
| 27 | + |
| 28 | + /** |
| 29 | + * Returns if the manipulation applies to lists as a whole. |
| 30 | + * |
| 31 | + * @since 0.4 |
| 32 | + * |
| 33 | + * @return boolean |
| 34 | + */ |
| 35 | + public abstract function isForLists(); |
| 36 | + |
| 37 | + /** |
| 38 | + * Constructor. |
| 39 | + * |
| 40 | + * @since 0.4 |
| 41 | + */ |
| 42 | + public function __construct() { |
| 43 | + |
| 44 | + } |
| 45 | + |
| 46 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/ParameterManipulation.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 47 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/ValidationErrorHandler.php |
— | — | @@ -0,0 +1,59 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Static class for error handling. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file Validator_ErrorHandler.php |
| 10 | + * @ingroup Validator |
| 11 | + * |
| 12 | + * @licence GNU GPL v3 or later |
| 13 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 14 | + */ |
| 15 | +final class ValidationErrorHandler { |
| 16 | + |
| 17 | + /** |
| 18 | + * @since 0.4 |
| 19 | + * |
| 20 | + * @var array of ValidationError |
| 21 | + */ |
| 22 | + protected static $errors = array(); |
| 23 | + |
| 24 | + /** |
| 25 | + * Adds a single ValidationError. |
| 26 | + * |
| 27 | + * @since 0.4 |
| 28 | + * |
| 29 | + * @param string $errorMessage |
| 30 | + * @param integer $severity |
| 31 | + */ |
| 32 | + public static function addError( ValidationError $error ) { |
| 33 | + self::$errors[$error->getElement()][] = $error; |
| 34 | + } |
| 35 | + |
| 36 | + /** |
| 37 | + * Adds a list of ValidationError. |
| 38 | + * |
| 39 | + * @since 0.4 |
| 40 | + * |
| 41 | + * @param array $errors |
| 42 | + */ |
| 43 | + public static function addErrors( array $errors ) { |
| 44 | + foreach ( $errors as $error ) { |
| 45 | + self::addError( $error ); |
| 46 | + } |
| 47 | + } |
| 48 | + |
| 49 | + /** |
| 50 | + * Returns a list of all registered errors. |
| 51 | + * |
| 52 | + * @since 0.4 |
| 53 | + * |
| 54 | + * @return array of ValidationError |
| 55 | + */ |
| 56 | + public static function getErrors() { |
| 57 | + return self::$errors; |
| 58 | + } |
| 59 | + |
| 60 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/ValidationErrorHandler.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 61 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/ValidationError.php |
— | — | @@ -0,0 +1,234 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Error class. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file Validator_Error.php |
| 10 | + * @ingroup Validator |
| 11 | + * |
| 12 | + * @licence GNU GPL v3 or later |
| 13 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 14 | + */ |
| 15 | +class ValidationError { |
| 16 | + |
| 17 | + const SEVERITY_MINOR = 0; // Minor error. ie a deprecation notice |
| 18 | + const SEVERITY_LOW = 1; // Lower-then-normal severity. ie an unknown parameter |
| 19 | + const SEVERITY_NORMAL = 2; // Normal severity. ie an invalid value provided |
| 20 | + const SEVERITY_HIGH = 3; // Higher-then-normal severity. ie an invalid value for a significant parameter |
| 21 | + const SEVERITY_FATAL = 4; // Fatal error. Either a missing or an invalid required parameter |
| 22 | + |
| 23 | + const ACTION_IGNORE = 0; // Ignore the error |
| 24 | + const ACTION_LOG = 1; // Log the error |
| 25 | + const ACTION_WARN = 2; // Warn that there is an error |
| 26 | + const ACTION_SHOW = 3; // Show the error |
| 27 | + const ACTION_DEMAND = 4; // Show the error and don't render output |
| 28 | + |
| 29 | + public $message; |
| 30 | + public $severity; |
| 31 | + |
| 32 | + /** |
| 33 | + * List of 'tags' for the error. This is mainly meant for indicating an error |
| 34 | + * type, such as 'missing parameter' or 'invalid value', but allows for multiple |
| 35 | + * such indications. |
| 36 | + * |
| 37 | + * @since 0.4 |
| 38 | + * |
| 39 | + * @var array |
| 40 | + */ |
| 41 | + protected $tags; |
| 42 | + |
| 43 | + /** |
| 44 | + * Where the error occurred. |
| 45 | + * |
| 46 | + * @since 0.4 |
| 47 | + * |
| 48 | + * @var mixed: string or false |
| 49 | + */ |
| 50 | + public $element; |
| 51 | + |
| 52 | + /** |
| 53 | + * @since 0.4 |
| 54 | + * |
| 55 | + * @param string $message |
| 56 | + * @param integer $severity |
| 57 | + */ |
| 58 | + public function __construct( $message, $severity = self::SEVERITY_NORMAL, $element = false, array $tags = array() ) { |
| 59 | + $this->message = $message; |
| 60 | + $this->severity = $severity; |
| 61 | + $this->element = $element; |
| 62 | + $this->tags = $tags; |
| 63 | + } |
| 64 | + |
| 65 | + /** |
| 66 | + * Adds one or more tags. |
| 67 | + * |
| 68 | + * @since 0.4.1 |
| 69 | + * |
| 70 | + * @param mixed $criteria string or array of string |
| 71 | + */ |
| 72 | + public function addTags() { |
| 73 | + $args = func_get_args(); |
| 74 | + $this->tags = array_merge( $this->tags, is_array( $args[0] ) ? $args[0] : $args ); |
| 75 | + } |
| 76 | + |
| 77 | + /** |
| 78 | + * Returns the error message describing the error. |
| 79 | + * |
| 80 | + * @since 0.4 |
| 81 | + * |
| 82 | + * @return string |
| 83 | + */ |
| 84 | + public function getMessage() { |
| 85 | + return $this->message; |
| 86 | + } |
| 87 | + |
| 88 | + /** |
| 89 | + * Returns the element this error occurred at, or 'unknown' when i's unknown. |
| 90 | + * |
| 91 | + * @since 0.4 |
| 92 | + * |
| 93 | + * @return string |
| 94 | + */ |
| 95 | + public function getElement() { |
| 96 | + return $this->element === false ? 'unknown' : $this->element; |
| 97 | + } |
| 98 | + |
| 99 | + /** |
| 100 | + * Returns the severity of the error. |
| 101 | + * |
| 102 | + * @since 0.4 |
| 103 | + * |
| 104 | + * @return integer Element of the ValidationError::SEVERITY_ enum |
| 105 | + */ |
| 106 | + public function getSeverity() { |
| 107 | + return $this->severity; |
| 108 | + } |
| 109 | + |
| 110 | + /** |
| 111 | + * Returns if the severity is equal to or bigger then the provided one. |
| 112 | + * |
| 113 | + * @since 0.4 |
| 114 | + * |
| 115 | + * @param integer $severity |
| 116 | + * |
| 117 | + * @return boolean |
| 118 | + */ |
| 119 | + public function hasSeverity( $severity ) { |
| 120 | + return $this->severity >= $severity; |
| 121 | + } |
| 122 | + |
| 123 | + /** |
| 124 | + * Returns if the error has a certain tag. |
| 125 | + * |
| 126 | + * @since 0.4.1 |
| 127 | + * |
| 128 | + * @param string $tag |
| 129 | + * |
| 130 | + * @return boolean |
| 131 | + */ |
| 132 | + public function hasTag( $tag ) { |
| 133 | + return in_array( $tag, $this->tags ); |
| 134 | + } |
| 135 | + |
| 136 | + /** |
| 137 | + * Returns the tags. |
| 138 | + * |
| 139 | + * @since 0.4.1 |
| 140 | + * |
| 141 | + * @return array |
| 142 | + */ |
| 143 | + public function getTags() { |
| 144 | + return $this->tags; |
| 145 | + } |
| 146 | + |
| 147 | + /** |
| 148 | + * Returns the action associated with the errors severity. |
| 149 | + * |
| 150 | + * @since 0.4 |
| 151 | + * |
| 152 | + * @return integer Element of the ValidationError::ACTION_ enum |
| 153 | + */ |
| 154 | + public function getAction() { |
| 155 | + global $egErrorActions; |
| 156 | + |
| 157 | + if ( $this->severity === self::SEVERITY_FATAL ) { |
| 158 | + // This action should not be configurable, as lowering it would break in the Validator class. |
| 159 | + return self::ACTION_DEMAND; |
| 160 | + } |
| 161 | + elseif ( array_key_exists( $this->severity, $egErrorActions ) ) { |
| 162 | + return $egErrorActions[$this->severity]; |
| 163 | + } |
| 164 | + else { |
| 165 | + throw new Exception( "No action associated with error severity '$this->severity'" ); |
| 166 | + } |
| 167 | + } |
| 168 | + |
| 169 | + /** |
| 170 | + * Returns if the action associated with the severity is equal to or bigger then the provided one. |
| 171 | + * |
| 172 | + * @since 0.4 |
| 173 | + * |
| 174 | + * @return boolean |
| 175 | + */ |
| 176 | + public function hasAction( $action ) { |
| 177 | + return $this->getAction() >= $action; |
| 178 | + } |
| 179 | + |
| 180 | + /** |
| 181 | + * Returns if the error is fatal. |
| 182 | + * |
| 183 | + * @since 0.4 |
| 184 | + * |
| 185 | + * @return boolean |
| 186 | + */ |
| 187 | + public function isFatal() { |
| 188 | + return $this->hasSeverity( self::SEVERITY_FATAL ); |
| 189 | + } |
| 190 | + |
| 191 | + /** |
| 192 | + * Returns if the error should be logged. |
| 193 | + * |
| 194 | + * @since 0.4 |
| 195 | + * |
| 196 | + * @return boolean |
| 197 | + */ |
| 198 | + public function shouldLog() { |
| 199 | + return $this->hasAction( self::ACTION_LOG ); |
| 200 | + } |
| 201 | + |
| 202 | + /** |
| 203 | + * Returns if there should be a warning that errors are present. |
| 204 | + * |
| 205 | + * @since 0.4 |
| 206 | + * |
| 207 | + * @return boolean |
| 208 | + */ |
| 209 | + public function shouldWarn() { |
| 210 | + return $this->hasAction( self::ACTION_WARN ); |
| 211 | + } |
| 212 | + |
| 213 | + /** |
| 214 | + * Returns if the error message should be shown. |
| 215 | + * |
| 216 | + * @since 0.4 |
| 217 | + * |
| 218 | + * @return boolean |
| 219 | + */ |
| 220 | + public function shouldShow() { |
| 221 | + return $this->hasAction( self::ACTION_SHOW ); |
| 222 | + } |
| 223 | + |
| 224 | + /** |
| 225 | + * Returns if the error message should be shown, and the output not be rendered. |
| 226 | + * |
| 227 | + * @since 0.4 |
| 228 | + * |
| 229 | + * @return boolean |
| 230 | + */ |
| 231 | + public function shouldDemand() { |
| 232 | + return $this->hasAction( self::ACTION_DEMAND ); |
| 233 | + } |
| 234 | + |
| 235 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/ValidationError.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 236 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/CriterionValidationResult.php |
— | — | @@ -0,0 +1,105 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Class to hold parameter validation result info. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file CriterionValidationResult.php |
| 10 | + * @ingroup Validator |
| 11 | + * |
| 12 | + * @licence GNU GPL v3 or later |
| 13 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 14 | + */ |
| 15 | +class CriterionValidationResult { |
| 16 | + |
| 17 | + /** |
| 18 | + * @since 0.4 |
| 19 | + * |
| 20 | + * @var array of ValidationError |
| 21 | + */ |
| 22 | + protected $errors = array(); |
| 23 | + |
| 24 | + /** |
| 25 | + * @since 0.4 |
| 26 | + * |
| 27 | + * @var array of string |
| 28 | + */ |
| 29 | + protected $invalidItems = array(); |
| 30 | + |
| 31 | + /** |
| 32 | + * Constructor. |
| 33 | + * |
| 34 | + * @since 0.4 |
| 35 | + */ |
| 36 | + public function __construct() { |
| 37 | + |
| 38 | + } |
| 39 | + |
| 40 | + /** |
| 41 | + * Adds a single error object. |
| 42 | + * |
| 43 | + * @since 0.4 |
| 44 | + * |
| 45 | + * @param ValidationError $error |
| 46 | + */ |
| 47 | + public function addError( ValidationError $error ) { |
| 48 | + $this->errors[] = $error; |
| 49 | + } |
| 50 | + |
| 51 | + /** |
| 52 | + * Adds a single invalid item. |
| 53 | + * |
| 54 | + * @since 0.4 |
| 55 | + * |
| 56 | + * @param string $item |
| 57 | + */ |
| 58 | + public function addInvalidItem( $item ) { |
| 59 | + $this->invalidItems[] = $item; |
| 60 | + } |
| 61 | + |
| 62 | + /** |
| 63 | + * Gets the errors. |
| 64 | + * |
| 65 | + * @since 0.4 |
| 66 | + * |
| 67 | + * @return array of ValidationError |
| 68 | + */ |
| 69 | + public function getErrors() { |
| 70 | + return $this->errors; |
| 71 | + } |
| 72 | + |
| 73 | + /** |
| 74 | + * Gets the invalid items. |
| 75 | + * |
| 76 | + * @since 0.4 |
| 77 | + * |
| 78 | + * @return array of string |
| 79 | + */ |
| 80 | + public function getInvalidItems() { |
| 81 | + return $this->invalidItems; |
| 82 | + } |
| 83 | + |
| 84 | + /** |
| 85 | + * Returns whether no errors occurred. |
| 86 | + * |
| 87 | + * @since 0.4 |
| 88 | + * |
| 89 | + * @return boolean |
| 90 | + */ |
| 91 | + public function isValid() { |
| 92 | + return count( $this->errors ) == 0 && !$this->hasInvalidItems(); |
| 93 | + } |
| 94 | + |
| 95 | + /** |
| 96 | + * Returns there are any invalid items. |
| 97 | + * |
| 98 | + * @since 0.4 |
| 99 | + * |
| 100 | + * @return boolean |
| 101 | + */ |
| 102 | + public function hasInvalidItems() { |
| 103 | + return count( $this->invalidItems ) != 0; |
| 104 | + } |
| 105 | + |
| 106 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/CriterionValidationResult.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 107 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/parserHooks/Validator_ListErrors.php |
— | — | @@ -0,0 +1,220 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Class for the 'listerrors' parser hooks. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file Validator_ListErrors.php |
| 10 | + * @ingroup Validator |
| 11 | + * |
| 12 | + * @author Jeroen De Dauw |
| 13 | + */ |
| 14 | +class ValidatorListErrors extends ParserHook { |
| 15 | + |
| 16 | + /** |
| 17 | + * Array to map the possible values for the 'minseverity' parameter |
| 18 | + * to their equivalent in the ValidationError::SEVERITY_ enum. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + * |
| 22 | + * @var array |
| 23 | + */ |
| 24 | + protected static $severityMap = array( |
| 25 | + 'minor' => ValidationError::SEVERITY_MINOR, |
| 26 | + 'low' => ValidationError::SEVERITY_LOW, |
| 27 | + 'normal' => ValidationError::SEVERITY_NORMAL, |
| 28 | + 'high' => ValidationError::SEVERITY_HIGH, |
| 29 | + 'fatal' => ValidationError::SEVERITY_FATAL |
| 30 | + ); |
| 31 | + |
| 32 | + /** |
| 33 | + * No LSB in pre-5.3 PHP *sigh*. |
| 34 | + * This is to be refactored as soon as php >=5.3 becomes acceptable. |
| 35 | + */ |
| 36 | + public static function staticMagic( array &$magicWords, $langCode ) { |
| 37 | + $className = __CLASS__; |
| 38 | + $instance = new $className(); |
| 39 | + return $instance->magic( $magicWords, $langCode ); |
| 40 | + } |
| 41 | + |
| 42 | + /** |
| 43 | + * No LSB in pre-5.3 PHP *sigh*. |
| 44 | + * This is to be refactored as soon as php >=5.3 becomes acceptable. |
| 45 | + */ |
| 46 | + public static function staticInit( Parser &$wgParser ) { |
| 47 | + $className = __CLASS__; |
| 48 | + $instance = new $className(); |
| 49 | + return $instance->init( $wgParser ); |
| 50 | + } |
| 51 | + |
| 52 | + /** |
| 53 | + * Gets the name of the parser hook. |
| 54 | + * @see ParserHook::getName |
| 55 | + * |
| 56 | + * @since 0.4 |
| 57 | + * |
| 58 | + * @return string |
| 59 | + */ |
| 60 | + protected function getName() { |
| 61 | + return 'listerrors'; |
| 62 | + } |
| 63 | + |
| 64 | + /** |
| 65 | + * Returns an array containing the parameter info. |
| 66 | + * @see ParserHook::getParameterInfo |
| 67 | + * |
| 68 | + * @since 0.4 |
| 69 | + * |
| 70 | + * @return array of Parameter |
| 71 | + */ |
| 72 | + protected function getParameterInfo( $type ) { |
| 73 | + global $egValidatorErrListMin; |
| 74 | + |
| 75 | + $params = array(); |
| 76 | + |
| 77 | + $params['minseverity'] = new Parameter( 'minseverity' ); |
| 78 | + $params['minseverity']->setDefault( $egValidatorErrListMin ); |
| 79 | + $params['minseverity']->addCriteria( new CriterionInArray( array_keys( self::$severityMap ) ) ); |
| 80 | + $params['minseverity']->setDescription( wfMsg( 'validator-listerrors-par-minseverity' ) ); |
| 81 | + |
| 82 | + return $params; |
| 83 | + } |
| 84 | + |
| 85 | + /** |
| 86 | + * Returns the list of default parameters. |
| 87 | + * @see ParserHook::getDefaultParameters |
| 88 | + * |
| 89 | + * @since 0.4 |
| 90 | + * |
| 91 | + * @return array |
| 92 | + */ |
| 93 | + protected function getDefaultParameters( $type ) { |
| 94 | + return array( 'minseverity' ); |
| 95 | + } |
| 96 | + |
| 97 | + /** |
| 98 | + * Renders and returns the output. |
| 99 | + * @see ParserHook::render |
| 100 | + * |
| 101 | + * @since 0.4 |
| 102 | + * |
| 103 | + * @param array $parameters |
| 104 | + * |
| 105 | + * @return string |
| 106 | + */ |
| 107 | + public function render( array $parameters ) { |
| 108 | + $errorList = $this->getErrorList( |
| 109 | + ValidationErrorHandler::getErrors(), |
| 110 | + self::$severityMap[$parameters['minseverity']] |
| 111 | + ); |
| 112 | + |
| 113 | + return $errorList; |
| 114 | + } |
| 115 | + |
| 116 | + /** |
| 117 | + * Returns a list of errors in wikitext. |
| 118 | + * |
| 119 | + * @since 0.4 |
| 120 | + * |
| 121 | + * @param array $errors |
| 122 | + * @param integer $minSeverity |
| 123 | + * |
| 124 | + * @return string |
| 125 | + */ |
| 126 | + public function getErrorList( array $errors, $minSeverity = ValidationError::SEVERITY_MINOR ) { |
| 127 | + $elementHtml = array(); |
| 128 | + |
| 129 | + if ( count( $errors ) == 0 ) { |
| 130 | + return ''; |
| 131 | + } |
| 132 | + |
| 133 | + $elements = array_keys( $errors ); |
| 134 | + natcasesort( $elements ); |
| 135 | + |
| 136 | + foreach ( $elements as $element ) { |
| 137 | + $elementErrors = $this->getErrorListForElement( $errors[$element], $element, $minSeverity ); |
| 138 | + |
| 139 | + if ( $elementErrors ) { |
| 140 | + $elementHtml[] = $elementErrors; |
| 141 | + } |
| 142 | + } |
| 143 | + |
| 144 | + if ( count( $elementHtml ) == 0 ) { |
| 145 | + return ''; |
| 146 | + } |
| 147 | + |
| 148 | + return Html::element( |
| 149 | + 'h2', |
| 150 | + array(), |
| 151 | + wfMsg( 'validator-listerrors-errors' ) |
| 152 | + ) . implode( "\n\n", $elementHtml ); |
| 153 | + } |
| 154 | + |
| 155 | + /** |
| 156 | + * Returns wikitext listing the errors for a single element. |
| 157 | + * |
| 158 | + * @since 0.4 |
| 159 | + * |
| 160 | + * @param array $allErrors |
| 161 | + * @param string $element |
| 162 | + * @param integer $minSeverity |
| 163 | + * |
| 164 | + * @return mixed String or false |
| 165 | + */ |
| 166 | + public function getErrorListForElement( array $allErrors, $element, $minSeverity = ValidationError::SEVERITY_MINOR ) { |
| 167 | + $errors = array(); |
| 168 | + |
| 169 | + foreach ( $allErrors as $error ) { |
| 170 | + if ( $error->hasSeverity( $minSeverity ) ) { |
| 171 | + $errors[] = $error; |
| 172 | + } |
| 173 | + } |
| 174 | + |
| 175 | + if ( count( $errors ) > 0 ) { |
| 176 | + $lines = array(); |
| 177 | + |
| 178 | + foreach ( $errors as $error ) { |
| 179 | + // TODO: switch on severity |
| 180 | + $lines[] = '* ' . wfMsgExt( |
| 181 | + 'validator-listerrors-severity-message', |
| 182 | + 'parsemag', |
| 183 | + $this->getSeverityMessage( $error->getSeverity() ), |
| 184 | + $error->message |
| 185 | + ); |
| 186 | + } |
| 187 | + |
| 188 | + return '<h3>' . htmlspecialchars( $element ) . "</h3>\n\n" . implode( "\n", $lines ); |
| 189 | + } |
| 190 | + else { |
| 191 | + return false; |
| 192 | + } |
| 193 | + } |
| 194 | + |
| 195 | + /** |
| 196 | + * Returns a message for a severity. |
| 197 | + * |
| 198 | + * @since 0.4 |
| 199 | + * |
| 200 | + * @param integer $severity |
| 201 | + * |
| 202 | + * @return string |
| 203 | + */ |
| 204 | + protected function getSeverityMessage( $severity ) { |
| 205 | + static $reverseMap = false; |
| 206 | + |
| 207 | + if ( $reverseMap === false ) { |
| 208 | + $reverseMap = array_flip( self::$severityMap ); |
| 209 | + } |
| 210 | + |
| 211 | + return wfMsg( 'validator-listerrors-' . $reverseMap[$severity] ); |
| 212 | + } |
| 213 | + |
| 214 | + /** |
| 215 | + * @see ParserHook::getDescription() |
| 216 | + */ |
| 217 | + public function getDescription() { |
| 218 | + return wfMsg( 'validator-listerrors-description' ); |
| 219 | + } |
| 220 | + |
| 221 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/parserHooks/Validator_ListErrors.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 222 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/parserHooks/Validator_Describe.php |
— | — | @@ -0,0 +1,501 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Class for the 'describe' parser hooks. |
| 6 | + * |
| 7 | + * @since 0.4.3 |
| 8 | + * |
| 9 | + * @file Validator_Describe.php |
| 10 | + * @ingroup Validator |
| 11 | + * |
| 12 | + * @licence GNU GPL v3 or later |
| 13 | + * |
| 14 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 15 | + */ |
| 16 | +class ValidatorDescribe extends ParserHook { |
| 17 | + |
| 18 | + /** |
| 19 | + * Field to store the value of the language parameter. |
| 20 | + * |
| 21 | + * @since 0.4.10 |
| 22 | + * |
| 23 | + * @var string |
| 24 | + */ |
| 25 | + protected $language; |
| 26 | + |
| 27 | + /** |
| 28 | + * No LSB in pre-5.3 PHP *sigh*. |
| 29 | + * This is to be refactored as soon as php >=5.3 becomes acceptable. |
| 30 | + */ |
| 31 | + public static function staticMagic( array &$magicWords, $langCode ) { |
| 32 | + $className = __CLASS__; |
| 33 | + $instance = new $className(); |
| 34 | + return $instance->magic( $magicWords, $langCode ); |
| 35 | + } |
| 36 | + |
| 37 | + /** |
| 38 | + * No LSB in pre-5.3 PHP *sigh*. |
| 39 | + * This is to be refactored as soon as php >=5.3 becomes acceptable. |
| 40 | + */ |
| 41 | + public static function staticInit( Parser &$wgParser ) { |
| 42 | + $className = __CLASS__; |
| 43 | + $instance = new $className(); |
| 44 | + return $instance->init( $wgParser ); |
| 45 | + } |
| 46 | + |
| 47 | + /** |
| 48 | + * Gets the name of the parser hook. |
| 49 | + * @see ParserHook::getName |
| 50 | + * |
| 51 | + * @since 0.4.3 |
| 52 | + * |
| 53 | + * @return string |
| 54 | + */ |
| 55 | + protected function getName() { |
| 56 | + return 'describe'; |
| 57 | + } |
| 58 | + |
| 59 | + /** |
| 60 | + * Returns an array containing the parameter info. |
| 61 | + * @see ParserHook::getParameterInfo |
| 62 | + * |
| 63 | + * @since 0.4.3 |
| 64 | + * |
| 65 | + * @return array of Parameter |
| 66 | + */ |
| 67 | + protected function getParameterInfo( $type ) { |
| 68 | + $params = array(); |
| 69 | + |
| 70 | + $params['hooks'] = new ListParameter( 'hooks' ); |
| 71 | + $params['hooks']->setDefault( array_keys( ParserHook::getRegisteredParserHooks() ) ); |
| 72 | + $params['hooks']->setMessage( 'validator-describe-par-hooks' ); |
| 73 | + $params['hooks']->addAliases( 'hook' ); |
| 74 | + |
| 75 | + $params['pre'] = new Parameter( 'pre', Parameter::TYPE_BOOLEAN ); |
| 76 | + $params['pre']->setDefault( 'off' ); |
| 77 | + $params['pre']->setMessage( 'validator-describe-par-pre' ); |
| 78 | + |
| 79 | + $params['language'] = new Parameter( 'language' ); |
| 80 | + $params['language']->setDefault( $GLOBALS['wgLanguageCode'] ); |
| 81 | + $params['language']->setMessage( 'validator-describe-par-language' ); |
| 82 | + |
| 83 | + return $params; |
| 84 | + } |
| 85 | + |
| 86 | + /** |
| 87 | + * Returns the list of default parameters. |
| 88 | + * @see ParserHook::getDefaultParameters |
| 89 | + * |
| 90 | + * @since 0.4.3 |
| 91 | + * |
| 92 | + * @return array |
| 93 | + */ |
| 94 | + protected function getDefaultParameters( $type ) { |
| 95 | + return array( 'hooks' ); |
| 96 | + } |
| 97 | + |
| 98 | + /** |
| 99 | + * Renders and returns the output. |
| 100 | + * @see ParserHook::render |
| 101 | + * |
| 102 | + * @since 0.4.3 |
| 103 | + * |
| 104 | + * @param array $parameters |
| 105 | + * |
| 106 | + * @return string |
| 107 | + */ |
| 108 | + public function render( array $parameters ) { |
| 109 | + $this->language = $parameters['language']; |
| 110 | + |
| 111 | + $parts = array(); |
| 112 | + |
| 113 | + // Loop over the hooks for which the docs should be added. |
| 114 | + foreach ( $parameters['hooks'] as $hookName ) { |
| 115 | + $parserHook = $this->getParserHookInstance( $hookName ); |
| 116 | + |
| 117 | + if ( $parserHook === false ) { |
| 118 | + $parts[] = wfMsgExt( 'validator-describe-notfound', 'parsemag', $hookName ); |
| 119 | + } |
| 120 | + else { |
| 121 | + $parts[] = $this->getParserHookDescription( $hookName, $parameters, $parserHook ); |
| 122 | + } |
| 123 | + } |
| 124 | + |
| 125 | + return $this->parseWikitext( implode( "\n\n", $parts ) ); |
| 126 | + } |
| 127 | + |
| 128 | + /** |
| 129 | + * Returns the wikitext description for a single parser hook. |
| 130 | + * |
| 131 | + * @since 0.4.3 |
| 132 | + * |
| 133 | + * @param string $hookName |
| 134 | + * @param array $parameters |
| 135 | + * @param ParserHook $parserHook |
| 136 | + * |
| 137 | + * @return string |
| 138 | + */ |
| 139 | + protected function getParserHookDescription( $hookName, array $parameters, ParserHook $parserHook ) { |
| 140 | + global $wgLang; |
| 141 | + |
| 142 | + $descriptionData = $parserHook->getDescriptionData( ParserHook::TYPE_TAG ); // TODO |
| 143 | + $this->sortParameters( $descriptionData['parameters'], $descriptionData['defaults'] ); |
| 144 | + |
| 145 | + $description = |
| 146 | + ( $parameters['pre'] ? '== ' : '<h2>' ) . |
| 147 | + $hookName . |
| 148 | + ( $parameters['pre'] ? ' ==' : '</h2>' ); |
| 149 | + |
| 150 | + if ( $parameters['pre'] ) { |
| 151 | + $description .= "\n<!-- " . $this->msg( 'validator-describe-autogen' ) . ' -->'; |
| 152 | + } |
| 153 | + |
| 154 | + $description .= "\n\n"; |
| 155 | + |
| 156 | + if ( $descriptionData['message'] !== false ) { |
| 157 | + $description .= $this->msg( 'validator-describe-descriptionmsg', $this->msg( $descriptionData['message'] ) ); |
| 158 | + $description .= "\n\n"; |
| 159 | + } |
| 160 | + else if ( $descriptionData['description'] !== false ) { |
| 161 | + $description .= wfMsgExt( 'validator-describe-descriptionmsg', $descriptionData['description'] ); |
| 162 | + $description .= "\n\n"; |
| 163 | + } |
| 164 | + |
| 165 | + if ( count( $descriptionData['names'] ) > 1 ) { |
| 166 | + $aliases = array(); |
| 167 | + |
| 168 | + foreach ( $descriptionData['names'] as $name ) { |
| 169 | + if ( $name != $hookName ) { |
| 170 | + $aliases[] = $name; |
| 171 | + } |
| 172 | + } |
| 173 | + |
| 174 | + $description .= $this->msg( 'validator-describe-aliases', 'parsemag', $wgLang->listToText( $aliases ), count( $aliases ) ); |
| 175 | + $description .= "\n\n"; |
| 176 | + } |
| 177 | + |
| 178 | + if ( $parserHook->forTagExtensions || $parserHook->forParserFunctions ) { |
| 179 | + if ( $parserHook->forTagExtensions && $parserHook->forParserFunctions ) { |
| 180 | + $description .= $this->msg( 'validator-describe-bothhooks' ); |
| 181 | + } |
| 182 | + elseif ( $parserHook->forTagExtensions ) { |
| 183 | + $description .= $this->msg( 'validator-describe-tagextension' ); |
| 184 | + } |
| 185 | + else { // if $parserHook->forParserFunctions |
| 186 | + $description .= $this->msg( 'validator-describe-parserfunction' ); |
| 187 | + } |
| 188 | + |
| 189 | + $description .= "\n\n"; |
| 190 | + } |
| 191 | + |
| 192 | + $description .= $this->getParameterTable( $descriptionData['parameters'], $descriptionData['defaults'], $parameters['pre'] ); |
| 193 | + |
| 194 | + if ( $parserHook->forTagExtensions || $parserHook->forParserFunctions ) { |
| 195 | + $description .= $this->getSyntaxExamples( $hookName, $descriptionData['parameters'], $parserHook, $descriptionData['defaults'], $parameters['pre'] ); |
| 196 | + } |
| 197 | + |
| 198 | + if ( $parameters['pre'] ) { |
| 199 | + $description = '<pre>' . $description . '</pre>'; |
| 200 | + } |
| 201 | + |
| 202 | + return $description; |
| 203 | + } |
| 204 | + |
| 205 | + /** |
| 206 | + * Sorts the provided parameters array to match the default parameter order. |
| 207 | + * |
| 208 | + * @since 0.4.3 |
| 209 | + * |
| 210 | + * @param array of Parameter $parameters |
| 211 | + * @param array of string $defaults |
| 212 | + */ |
| 213 | + protected function sortParameters( array &$parameters, array $defaults ) { |
| 214 | + $sort = array(); |
| 215 | + $count = 9000; |
| 216 | + |
| 217 | + foreach ( $parameters as $parameter ) { |
| 218 | + $position = array_search( $parameter->getName(), $defaults ); |
| 219 | + |
| 220 | + if ( $position === false ) { |
| 221 | + $count++; |
| 222 | + $sort[$count] = $parameter; |
| 223 | + } |
| 224 | + else { |
| 225 | + $sort[$position] = $parameter; |
| 226 | + } |
| 227 | + } |
| 228 | + |
| 229 | + ksort( $sort ); |
| 230 | + $parameters = array_values( $sort ); |
| 231 | + } |
| 232 | + |
| 233 | + /** |
| 234 | + * Returns the wikitext for some syntax examples. |
| 235 | + * |
| 236 | + * @since 0.4.3 |
| 237 | + * |
| 238 | + * @param string $hookName |
| 239 | + * @param array $parameters |
| 240 | + * @param ParserHook $parserHook |
| 241 | + * @param array $defaults |
| 242 | + * @param boolean $pre |
| 243 | + * |
| 244 | + * @return string |
| 245 | + */ |
| 246 | + protected function getSyntaxExamples( $hookName, array $parameters, ParserHook $parserHook, array $defaults, $pre ) { |
| 247 | + $result = "\n\n" . |
| 248 | + ( $pre ? '=== ' : '<h3>' ) . |
| 249 | + wfMsg( 'validator-describe-syntax' ) . |
| 250 | + ( $pre ? ' ===' : '</h3>' ); |
| 251 | + |
| 252 | + $params = array(); |
| 253 | + $requiredParams = array(); |
| 254 | + $plainParams = array(); |
| 255 | + |
| 256 | + foreach ( $parameters as $parameter ) { |
| 257 | + $params[$parameter->getName()] = '{' . $parameter->getTypeMessage() . '}'; |
| 258 | + $plainParams[$parameter->getName()] = $parameter->getTypeMessage(); |
| 259 | + |
| 260 | + if ( $parameter->isRequired() ) { |
| 261 | + $requiredParams[$parameter->getName()] = '{' . $parameter->getTypeMessage() . '}'; |
| 262 | + } |
| 263 | + } |
| 264 | + |
| 265 | + $preOpen = $pre ? '<pre>' : '<pre>'; |
| 266 | + $preClose = $pre ? '</pre>' : '</pre>'; |
| 267 | + |
| 268 | + if ( $parserHook->forTagExtensions ) { |
| 269 | + $result .= "\n\n'''" . $this->msg( 'validator-describe-tagmin' ) . "'''\n\n"; |
| 270 | + |
| 271 | + $result .= "$preOpen<nowiki>\n" . Xml::element( |
| 272 | + $hookName, |
| 273 | + $requiredParams |
| 274 | + ) . "\n</nowiki>$preClose"; |
| 275 | + |
| 276 | + $result .= "\n\n'''" . $this->msg( 'validator-describe-tagmax' ) . "'''\n\n"; |
| 277 | + |
| 278 | + // TODO: multiline when long |
| 279 | + $result .= "$preOpen<nowiki>\n" . Xml::element( |
| 280 | + $hookName, |
| 281 | + $params |
| 282 | + ) . "\n</nowiki>$preClose"; |
| 283 | + |
| 284 | + if ( count( $defaults ) > 0 ) { |
| 285 | + $result .= "\n\n'''" . $this->msg( 'validator-describe-tagdefault' ) . "'''\n\n"; |
| 286 | + $contents = ''; |
| 287 | + foreach ( $plainParams as $name => $type ) { |
| 288 | + $contents = '{' . $name . ', ' . $type . '}'; |
| 289 | + break; |
| 290 | + } |
| 291 | + |
| 292 | + $result .= "$preOpen<nowiki>\n" . Xml::element( |
| 293 | + $hookName, |
| 294 | + array_slice( $params, 1 ), |
| 295 | + $contents |
| 296 | + ) . "\n</nowiki>$preClose"; |
| 297 | + } |
| 298 | + } |
| 299 | + |
| 300 | + if ( $parserHook->forParserFunctions ) { |
| 301 | + $result .= "\n\n'''" . $this->msg( 'validator-describe-pfmin' ) . "'''\n\n"; |
| 302 | + |
| 303 | + $result .= "$preOpen<nowiki>\n" . |
| 304 | + $this->buildParserFunctionSyntax( $hookName, $requiredParams ) |
| 305 | + . "\n</nowiki>$preClose"; |
| 306 | + |
| 307 | + $result .= "\n\n'''" . $this->msg( 'validator-describe-pfmax' ) . "'''\n\n"; |
| 308 | + |
| 309 | + $result .= "$preOpen<nowiki>\n" . |
| 310 | + $this->buildParserFunctionSyntax( $hookName, $params ) |
| 311 | + . "\n</nowiki>$preClose"; |
| 312 | + |
| 313 | + if ( count( $defaults ) > 0 ) { |
| 314 | + $result .= "\n\n'''" . $this->msg( 'validator-describe-pfdefault' ) . "'''\n\n"; |
| 315 | + |
| 316 | + $result .= "$preOpen<nowiki>\n" . |
| 317 | + $this->buildParserFunctionSyntax( $hookName, $plainParams, $defaults ) |
| 318 | + . "\n</nowiki>$preClose"; |
| 319 | + } |
| 320 | + } |
| 321 | + |
| 322 | + return $result; |
| 323 | + } |
| 324 | + |
| 325 | + /** |
| 326 | + * Builds the wikitext syntax for a parser function. |
| 327 | + * |
| 328 | + * @since 0.4.3 |
| 329 | + * |
| 330 | + * @param string $functionName |
| 331 | + * @param array $parameters Parameters (keys) and their type (values) |
| 332 | + * @param array $defaults |
| 333 | + * |
| 334 | + * @return string |
| 335 | + */ |
| 336 | + protected function buildParserFunctionSyntax( $functionName, array $parameters, array $defaults = array() ) { |
| 337 | + $arguments = array(); |
| 338 | + |
| 339 | + foreach ( $parameters as $name => $type ) { |
| 340 | + if ( in_array( $name, $defaults ) ) { |
| 341 | + $arguments[] = '{' . $name . ', ' . $type . '}'; |
| 342 | + } |
| 343 | + else { |
| 344 | + $arguments[] = "$name=$type"; |
| 345 | + } |
| 346 | + } |
| 347 | + |
| 348 | + $singleLine = count( $arguments ) <= 3; |
| 349 | + $delimiter = $singleLine ? '|' : "\n| "; |
| 350 | + $wrapper = $singleLine ? '' : "\n"; |
| 351 | + |
| 352 | + return "{{#$functionName:$wrapper" . implode( $delimiter, $arguments ) . $wrapper . '}}'; |
| 353 | + } |
| 354 | + |
| 355 | + /** |
| 356 | + * Returns the wikitext for a table listing the provided parameters. |
| 357 | + * |
| 358 | + * @since 0.4.3 |
| 359 | + * |
| 360 | + * @param array $parameters |
| 361 | + * @param array $defaults |
| 362 | + * @param boolean $pre |
| 363 | + * |
| 364 | + * @return string |
| 365 | + */ |
| 366 | + protected function getParameterTable( array $parameters, array $defaults, $pre ) { |
| 367 | + $tableRows = array(); |
| 368 | + |
| 369 | + foreach ( $parameters as $parameter ) { |
| 370 | + $tableRows[] = $this->getDescriptionRow( $parameter, $defaults ); |
| 371 | + } |
| 372 | + |
| 373 | + $table = ''; |
| 374 | + |
| 375 | + if ( count( $tableRows ) > 0 ) { |
| 376 | + $tableRows = array_merge( array( |
| 377 | + "! #\n" . |
| 378 | + '!' . $this->msg( 'validator-describe-header-parameter' ) ."\n" . |
| 379 | + '!' . $this->msg( 'validator-describe-header-aliases' ) ."\n" . |
| 380 | + '!' . $this->msg( 'validator-describe-header-type' ) ."\n" . |
| 381 | + '!' . $this->msg( 'validator-describe-header-default' ) ."\n" . |
| 382 | + '!' . $this->msg( 'validator-describe-header-description' ) |
| 383 | + ), $tableRows ); |
| 384 | + |
| 385 | + $table = implode( "\n|-\n", $tableRows ); |
| 386 | + |
| 387 | + $h3 = |
| 388 | + ( $pre ? '=== ' : '<h3>' ) . |
| 389 | + $this->msg( 'validator-describe-parameters' ) . |
| 390 | + ( $pre ? ' ===' : '</h3>' ); |
| 391 | + |
| 392 | + $table = "$h3\n\n" . |
| 393 | + '{| class="wikitable sortable"' . "\n" . |
| 394 | + $table . |
| 395 | + "\n|}"; |
| 396 | + } |
| 397 | + |
| 398 | + return $table; |
| 399 | + } |
| 400 | + |
| 401 | + /** |
| 402 | + * Returns the wikitext for a table row describing a single parameter. |
| 403 | + * |
| 404 | + * @since 0.4.3 |
| 405 | + * |
| 406 | + * @param Parameter $parameter |
| 407 | + * @param array $defaults |
| 408 | + * |
| 409 | + * @return string |
| 410 | + */ |
| 411 | + protected function getDescriptionRow( Parameter $parameter, array $defaults ) { |
| 412 | + $aliases = $parameter->getAliases(); |
| 413 | + $aliases = count( $aliases ) > 0 ? implode( ', ', $aliases ) : '-'; |
| 414 | + |
| 415 | + $description = $parameter->getMessage(); |
| 416 | + |
| 417 | + if ( $description === false ) { |
| 418 | + $description = $parameter->getDescription(); |
| 419 | + if ( $description === false ) $description = '-'; |
| 420 | + } |
| 421 | + else { |
| 422 | + $description = $this->msg( $description ); |
| 423 | + } |
| 424 | + |
| 425 | + $type = $parameter->getTypeMessage(); |
| 426 | + |
| 427 | + $number = 0; |
| 428 | + $isDefault = false; |
| 429 | + |
| 430 | + foreach ( $defaults as $default ) { |
| 431 | + $number++; |
| 432 | + |
| 433 | + if ( $default == $parameter->getName() ) { |
| 434 | + $isDefault = true; |
| 435 | + break; |
| 436 | + } |
| 437 | + } |
| 438 | + |
| 439 | + $default = $parameter->isRequired() ? "''" . $this->msg( 'validator-describe-required' ) . "''" : $parameter->getDefault(); |
| 440 | + |
| 441 | + if ( is_array( $default ) ) { |
| 442 | + $default = implode( ', ', $default ); |
| 443 | + } |
| 444 | + else if ( is_bool( $default ) ) { |
| 445 | + $default = $default ? 'yes' : 'no'; |
| 446 | + } |
| 447 | + |
| 448 | + if ( $default === '' ) $default = "''" . $this->msg( 'validator-describe-empty' ) . "''"; |
| 449 | + |
| 450 | + if ( !$isDefault ) { |
| 451 | + $number = '-'; |
| 452 | + } |
| 453 | + |
| 454 | + return <<<EOT |
| 455 | +| {$number} |
| 456 | +| {$parameter->getName()} |
| 457 | +| {$aliases} |
| 458 | +| {$type} |
| 459 | +| {$default} |
| 460 | +| {$description} |
| 461 | +EOT; |
| 462 | + } |
| 463 | + |
| 464 | + /** |
| 465 | + * Returns an instance of the class handling the specified parser hook, |
| 466 | + * or false if there is none. |
| 467 | + * |
| 468 | + * @since 0.4.3 |
| 469 | + * |
| 470 | + * @param string $parserHookName |
| 471 | + * |
| 472 | + * @return mixed ParserHook or false |
| 473 | + */ |
| 474 | + protected function getParserHookInstance( $parserHookName ) { |
| 475 | + $className = ParserHook::getHookClassName( $parserHookName ); |
| 476 | + return $className !== false && class_exists( $className ) ? new $className() : false; |
| 477 | + } |
| 478 | + |
| 479 | + /** |
| 480 | + * @see ParserHook::getMessage() |
| 481 | + */ |
| 482 | + public function getMessage() { |
| 483 | + return 'validator-describe-description'; |
| 484 | + } |
| 485 | + |
| 486 | + /** |
| 487 | + * Message function that takes into account the language parameter. |
| 488 | + * |
| 489 | + * @since 0.4.10 |
| 490 | + * |
| 491 | + * @param string $key |
| 492 | + * @param array $args |
| 493 | + * |
| 494 | + * @return string |
| 495 | + */ |
| 496 | + protected function msg() { |
| 497 | + $args = func_get_args(); |
| 498 | + $key = array_shift( $args ); |
| 499 | + return wfMsgReal( $key, $args, true, $this->language ); |
| 500 | + } |
| 501 | + |
| 502 | +} |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/parserHooks/Validator_Describe.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 503 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/ListParameter.php |
— | — | @@ -0,0 +1,236 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Class for list parameters. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file ListParameter.php |
| 10 | + * @ingroup Validator |
| 11 | + * |
| 12 | + * @licence GNU GPL v3 or later |
| 13 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 14 | + */ |
| 15 | +class ListParameter extends Parameter { |
| 16 | + |
| 17 | + /** |
| 18 | + * Indicates if errors in list items should cause the item to be omitted, |
| 19 | + * versus having the whole list be set to it's default. |
| 20 | + * |
| 21 | + * @since 0.4 |
| 22 | + * |
| 23 | + * @var boolean |
| 24 | + */ |
| 25 | + public static $perItemValidation = true; |
| 26 | + |
| 27 | + /** |
| 28 | + * The default delimiter for lists, used when the parameter definition does not specify one. |
| 29 | + * |
| 30 | + * @since 0.4 |
| 31 | + * |
| 32 | + * @var string |
| 33 | + */ |
| 34 | + const DEFAULT_DELIMITER = ','; |
| 35 | + |
| 36 | + /** |
| 37 | + * The list delimiter. |
| 38 | + * |
| 39 | + * @since 0.4 |
| 40 | + * |
| 41 | + * @var string |
| 42 | + */ |
| 43 | + protected $delimiter; |
| 44 | + |
| 45 | + /** |
| 46 | + * List of criteria the parameter value as a whole needs to hold against. |
| 47 | + * |
| 48 | + * @since 0.4 |
| 49 | + * |
| 50 | + * @var array of ListParameterCriterion |
| 51 | + */ |
| 52 | + protected $listCriteria; |
| 53 | + |
| 54 | + /** |
| 55 | + * Holder for temporary information needed in the itemIsValid callback. |
| 56 | + * |
| 57 | + * @since 0.4 |
| 58 | + * |
| 59 | + * @var array |
| 60 | + */ |
| 61 | + protected $tempInvalidList; |
| 62 | + |
| 63 | + /** |
| 64 | + * Constructor. |
| 65 | + * |
| 66 | + * @since 0.4 |
| 67 | + * |
| 68 | + * @param string $name |
| 69 | + * @param string $delimiter |
| 70 | + * @param mixed $type |
| 71 | + * @param mixed $default Use null for no default (which makes the parameter required) |
| 72 | + * @param array $aliases |
| 73 | + * @param array $criteria |
| 74 | + */ |
| 75 | + public function __construct( $name, $delimiter = ListParameter::DEFAULT_DELIMITER, $type = Parameter::TYPE_STRING, |
| 76 | + $default = null, array $aliases = array(), array $criteria = array() ) { |
| 77 | + $itemCriteria = array(); |
| 78 | + $listCriteria = array(); |
| 79 | + |
| 80 | + $this->cleanCriteria( $criteria ); |
| 81 | + |
| 82 | + foreach ( $criteria as $criterion ) { |
| 83 | + if ( $criterion->isForLists() ) { |
| 84 | + $listCriteria[] = $criterion; |
| 85 | + } |
| 86 | + else { |
| 87 | + $itemCriteria[] = $criterion; |
| 88 | + } |
| 89 | + } |
| 90 | + |
| 91 | + $this->listCriteria = $listCriteria; |
| 92 | + |
| 93 | + parent::__construct( $name, $type, $default, $aliases, $itemCriteria ); |
| 94 | + |
| 95 | + $this->delimiter = $delimiter; |
| 96 | + |
| 97 | + } |
| 98 | + |
| 99 | + /** |
| 100 | + * Returns if the parameter is a list or not. |
| 101 | + * |
| 102 | + * @since 0.4 |
| 103 | + * |
| 104 | + * @return boolean |
| 105 | + */ |
| 106 | + public function isList() { |
| 107 | + return true; |
| 108 | + } |
| 109 | + |
| 110 | + /** |
| 111 | + * Sets the $value to a cleaned value of $originalValue. |
| 112 | + * |
| 113 | + * @since 0.4 |
| 114 | + */ |
| 115 | + protected function cleanValue() { |
| 116 | + if ( $this->originalValue == '' ) { |
| 117 | + // If no value is provided, there are no items, and not a single empty item. |
| 118 | + $this->value = array(); |
| 119 | + } |
| 120 | + else { |
| 121 | + $this->value = explode( $this->delimiter, $this->originalValue ); |
| 122 | + |
| 123 | + if ( $this->trimValue ) { |
| 124 | + foreach ( $this->value as &$item ) { |
| 125 | + $item = trim( $item ); |
| 126 | + } |
| 127 | + } |
| 128 | + } |
| 129 | + } |
| 130 | + |
| 131 | + /** |
| 132 | + * @see Parameter::validate |
| 133 | + */ |
| 134 | + public function validate( array $parameters ) { |
| 135 | + $listSuccess = $this->validateListCriteria( $parameters ); |
| 136 | + |
| 137 | + if ( $listSuccess ) { |
| 138 | + $this->doValidation( $parameters ); |
| 139 | + } |
| 140 | + // TODO |
| 141 | + |
| 142 | + // FIXME: it's possible the list criteria are not satisfied here anymore due to filtering of invalid items. |
| 143 | + } |
| 144 | + |
| 145 | + /** |
| 146 | + * @see Parameter::setToDefaultIfNeeded |
| 147 | + * |
| 148 | + * @since 0.4 |
| 149 | + */ |
| 150 | + protected function setToDefaultIfNeeded() { |
| 151 | + if ( count( $this->errors ) > 0 && count( $this->value ) == 0 && !$this->hasFatalError() ) { |
| 152 | + $this->setToDefault(); |
| 153 | + } |
| 154 | + } |
| 155 | + |
| 156 | + /** |
| 157 | + * @see Parameter::setToDefault |
| 158 | + * |
| 159 | + * @since 0.4 |
| 160 | + */ |
| 161 | + protected function setToDefault() { |
| 162 | + $this->defaulted = true; |
| 163 | + $this->value = is_array( $this->default ) ? $this->default : array( $this->default ); |
| 164 | + } |
| 165 | + |
| 166 | + /** |
| 167 | + * |
| 168 | + * |
| 169 | + * @since 0.4 |
| 170 | + * |
| 171 | + * @param array $parameters |
| 172 | + */ |
| 173 | + protected function validateListCriteria( array $parameters ) { |
| 174 | + foreach ( $this->getListCriteria() as $listCriterion ) { |
| 175 | + if ( !$listCriterion->validate( $this, $parameters ) ) { |
| 176 | + $hasError = true; |
| 177 | + |
| 178 | + if ( !self::$accumulateParameterErrors ) { |
| 179 | + break; |
| 180 | + } |
| 181 | + } |
| 182 | + } |
| 183 | + |
| 184 | + // TODO |
| 185 | + return true; |
| 186 | + } |
| 187 | + |
| 188 | + /** |
| 189 | + * Returns the parameter list criteria. |
| 190 | + * |
| 191 | + * @since 0.4 |
| 192 | + * |
| 193 | + * @return array of ListParameterCriterion |
| 194 | + */ |
| 195 | + public function getListCriteria() { |
| 196 | + return $this->listCriteria; |
| 197 | + } |
| 198 | + |
| 199 | + /** |
| 200 | + * Handles any validation errors that occurred for a single criterion. |
| 201 | + * |
| 202 | + * @since 0.4 |
| 203 | + * |
| 204 | + * @param CriterionValidationResult $validationResult |
| 205 | + */ |
| 206 | + protected function handleValidationError( CriterionValidationResult $validationResult ) { |
| 207 | + parent::handleValidationError( $validationResult ); |
| 208 | + |
| 209 | + // Filter out the items that have already been found to be invalid. |
| 210 | + if ( $validationResult->hasInvalidItems() ) { |
| 211 | + $this->tempInvalidList = $validationResult->getInvalidItems(); |
| 212 | + $this->value = array_filter( $this->value, array( $this, 'itemIsValid' ) ); |
| 213 | + } |
| 214 | + } |
| 215 | + |
| 216 | + /** |
| 217 | + * Returns if an item is valid or not. |
| 218 | + * |
| 219 | + * @since 0.4 |
| 220 | + * |
| 221 | + * @return boolean |
| 222 | + */ |
| 223 | + protected function itemIsValid( $item ) { |
| 224 | + return !in_array( $item, $this->tempInvalidList ); |
| 225 | + } |
| 226 | + |
| 227 | + /** |
| 228 | + * @see Parameter::setDefault |
| 229 | + * |
| 230 | + * @since 0.4 |
| 231 | + */ |
| 232 | + public function setDefault( $default, $manipulate = true ) { |
| 233 | + $this->default = is_array( $default ) ? $default : array( $default ); |
| 234 | + $this->setDoManipulationOfDefault( $manipulate ); |
| 235 | + } |
| 236 | + |
| 237 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/ListParameter.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 238 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/criteria/CriterionHasLength.php |
— | — | @@ -0,0 +1,63 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter criterion stating that the value must have a certain length. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file CriterionHasLength.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup Criteria |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class CriterionHasLength extends ItemParameterCriterion { |
| 16 | + |
| 17 | + protected $lowerBound; |
| 18 | + protected $upperBound; |
| 19 | + |
| 20 | + /** |
| 21 | + * Constructor. |
| 22 | + * |
| 23 | + * @param integer $lowerBound False for no lower bound (since 0.4.8). |
| 24 | + * @param mixed $upperBound False for same value as lower bound. False for no upper bound (since 0.4.8). |
| 25 | + * |
| 26 | + * @since 0.4 |
| 27 | + */ |
| 28 | + public function __construct( $lowerBound, $upperBound = null ) { |
| 29 | + parent::__construct(); |
| 30 | + |
| 31 | + $this->lowerBound = $lowerBound; |
| 32 | + $this->upperBound = is_null( $upperBound ) ? $lowerBound : $upperBound; |
| 33 | + } |
| 34 | + |
| 35 | + /** |
| 36 | + * @see ItemParameterCriterion::validate |
| 37 | + */ |
| 38 | + protected function doValidation( $value, Parameter $parameter, array $parameters ) { |
| 39 | + $strlen = strlen( $value ); |
| 40 | + return ( $this->upperBound === false || $strlen <= $this->upperBound ) |
| 41 | + && ( $this->lowerBound === false || $strlen >= $this->lowerBound ); |
| 42 | + } |
| 43 | + |
| 44 | + /** |
| 45 | + * @see ItemParameterCriterion::getItemErrorMessage |
| 46 | + */ |
| 47 | + protected function getItemErrorMessage( Parameter $parameter ) { |
| 48 | + global $wgLang; |
| 49 | + |
| 50 | + if ( $this->lowerBound == $this->upperBound ) { |
| 51 | + return wfMsgExt( 'validator-error-invalid-length', 'parsemag', $parameter->getOriginalName(), $wgLang->formatNum( $this->lowerBound ) ); |
| 52 | + } |
| 53 | + else { |
| 54 | + return wfMsgExt( |
| 55 | + 'validator-error-invalid-length-range', |
| 56 | + 'parsemag', |
| 57 | + $parameter->getOriginalName(), |
| 58 | + $wgLang->formatNum( $this->lowerBound ), |
| 59 | + $wgLang->formatNum( $this->upperBound ) |
| 60 | + ); |
| 61 | + } |
| 62 | + } |
| 63 | + |
| 64 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/criteria/CriterionHasLength.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 65 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/criteria/CriterionIsNumeric.php |
— | — | @@ -0,0 +1,46 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter criterion stating that the value must be a number. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file CriterionIsNumeric.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup Criteria |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class CriterionIsNumeric extends ItemParameterCriterion { |
| 16 | + |
| 17 | + /** |
| 18 | + * Constructor. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + */ |
| 22 | + public function __construct( ) { |
| 23 | + parent::__construct(); |
| 24 | + } |
| 25 | + |
| 26 | + /** |
| 27 | + * @see ItemParameterCriterion::validate |
| 28 | + */ |
| 29 | + protected function doValidation( $value, Parameter $parameter, array $parameters ) { |
| 30 | + return is_numeric( $value ); |
| 31 | + } |
| 32 | + |
| 33 | + /** |
| 34 | + * @see ItemParameterCriterion::getItemErrorMessage |
| 35 | + */ |
| 36 | + protected function getItemErrorMessage( Parameter $parameter ) { |
| 37 | + return wfMsgExt( 'validator_error_must_be_number', 'parsemag', $parameter->getOriginalName() ); |
| 38 | + } |
| 39 | + |
| 40 | + /** |
| 41 | + * @see ItemParameterCriterion::getFullListErrorMessage |
| 42 | + */ |
| 43 | + protected function getFullListErrorMessage( Parameter $parameter ) { |
| 44 | + return wfMsgExt( 'validator_list_error_must_be_number', 'parsemag', $parameter->getOriginalName() ); |
| 45 | + } |
| 46 | + |
| 47 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/criteria/CriterionIsNumeric.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 48 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/criteria/CriterionMatchesRegex.php |
— | — | @@ -0,0 +1,59 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter criterion stating that the value must match a regex. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file CriterionMatchesRegex.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup Criteria |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class CriterionMatchesRegex extends ItemParameterCriterion { |
| 16 | + |
| 17 | + /** |
| 18 | + * The pattern to match against. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + * |
| 22 | + * @var string |
| 23 | + */ |
| 24 | + protected $pattern; |
| 25 | + |
| 26 | + /** |
| 27 | + * Constructor. |
| 28 | + * |
| 29 | + * @param string $pattern |
| 30 | + * |
| 31 | + * @since 0.4 |
| 32 | + */ |
| 33 | + public function __construct( $pattern ) { |
| 34 | + parent::__construct(); |
| 35 | + |
| 36 | + $this->pattern = $pattern; |
| 37 | + } |
| 38 | + |
| 39 | + /** |
| 40 | + * @see ItemParameterCriterion::validate |
| 41 | + */ |
| 42 | + protected function doValidation( $value, Parameter $parameter, array $parameters ) { |
| 43 | + return (bool)preg_match( $this->pattern, $value ); |
| 44 | + } |
| 45 | + |
| 46 | + /** |
| 47 | + * @see ItemParameterCriterion::getItemErrorMessage |
| 48 | + */ |
| 49 | + protected function getItemErrorMessage( Parameter $parameter ) { |
| 50 | + return wfMsgExt( 'validator-error-invalid-regex', 'parsemag', $parameter->getOriginalName(), $this->pattern ); |
| 51 | + } |
| 52 | + |
| 53 | + /** |
| 54 | + * @see ItemParameterCriterion::getFullListErrorMessage |
| 55 | + */ |
| 56 | + protected function getFullListErrorMessage( Parameter $parameter ) { |
| 57 | + return wfMsgExt( 'validator-list-error-invalid-regex', 'parsemag', $parameter->getOriginalName(), $this->pattern ); |
| 58 | + } |
| 59 | + |
| 60 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/criteria/CriterionMatchesRegex.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 61 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/criteria/CriterionNotEmpty.php |
— | — | @@ -0,0 +1,46 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter criterion stating that the value must not be empty (empty being a string with 0 lentgh). |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file CriterionNotEmpty.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup Criteria |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class CriterionNotEmpty extends ItemParameterCriterion { |
| 16 | + |
| 17 | + /** |
| 18 | + * Constructor. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + */ |
| 22 | + public function __construct() { |
| 23 | + parent::__construct(); |
| 24 | + } |
| 25 | + |
| 26 | + /** |
| 27 | + * @see ItemParameterCriterion::validate |
| 28 | + */ |
| 29 | + protected function doValidation( $value, Parameter $parameter, array $parameters ) { |
| 30 | + return trim( $value ) != ''; |
| 31 | + } |
| 32 | + |
| 33 | + /** |
| 34 | + * @see ItemParameterCriterion::getItemErrorMessage |
| 35 | + */ |
| 36 | + protected function getItemErrorMessage( Parameter $parameter ) { |
| 37 | + return wfMsgExt( 'validator_error_empty_argument', 'parsemag', $parameter->getOriginalName() ); |
| 38 | + } |
| 39 | + |
| 40 | + /** |
| 41 | + * @see ItemParameterCriterion::getFullListErrorMessage |
| 42 | + */ |
| 43 | + protected function getFullListErrorMessage( Parameter $parameter ) { |
| 44 | + return wfMsgExt( 'validator_list_error_empty_argument', 'parsemag', $parameter->getOriginalName() ); |
| 45 | + } |
| 46 | + |
| 47 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/criteria/CriterionNotEmpty.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 48 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/criteria/CriterionTrue.php |
— | — | @@ -0,0 +1,46 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter criterion that is always true. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file CriterionTrue.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup Criteria |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class CriterionTrue extends ItemParameterCriterion { |
| 16 | + |
| 17 | + /** |
| 18 | + * Constructor. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + */ |
| 22 | + public function __construct() { |
| 23 | + parent::__construct(); |
| 24 | + } |
| 25 | + |
| 26 | + /** |
| 27 | + * @see ItemParameterCriterion::validate |
| 28 | + */ |
| 29 | + protected function doValidation( $value, Parameter $parameter, array $parameters ) { |
| 30 | + return true; |
| 31 | + } |
| 32 | + |
| 33 | + /** |
| 34 | + * @see ItemParameterCriterion::getItemErrorMessage |
| 35 | + */ |
| 36 | + protected function getItemErrorMessage( Parameter $parameter ) { |
| 37 | + return ''; |
| 38 | + } |
| 39 | + |
| 40 | + /** |
| 41 | + * @see ItemParameterCriterion::getListErrorMessage |
| 42 | + */ |
| 43 | + protected function getListErrorMessage( Parameter $parameter, array $invalidItems, $allInvalid ) { |
| 44 | + return ''; |
| 45 | + } |
| 46 | + |
| 47 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/criteria/CriterionTrue.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 48 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/criteria/CriterionIsFloat.php |
— | — | @@ -0,0 +1,46 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter criterion stating that the value must be a float. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file CriterionIsFloat.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup Criteria |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class CriterionIsFloat extends ItemParameterCriterion { |
| 16 | + |
| 17 | + /** |
| 18 | + * Constructor. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + */ |
| 22 | + public function __construct() { |
| 23 | + parent::__construct(); |
| 24 | + } |
| 25 | + |
| 26 | + /** |
| 27 | + * @see ItemParameterCriterion::validate |
| 28 | + */ |
| 29 | + protected function doValidation( $value, Parameter $parameter, array $parameters ) { |
| 30 | + return preg_match( '/^(-)?\d+((\.|,)\d+)?$/', $value ); |
| 31 | + } |
| 32 | + |
| 33 | + /** |
| 34 | + * @see ItemParameterCriterion::getItemErrorMessage |
| 35 | + */ |
| 36 | + protected function getItemErrorMessage( Parameter $parameter ) { |
| 37 | + return wfMsgExt( 'validator-error-must-be-float', 'parsemag', $parameter->getOriginalName() ); |
| 38 | + } |
| 39 | + |
| 40 | + /** |
| 41 | + * @see ItemParameterCriterion::getFullListErrorMessage |
| 42 | + */ |
| 43 | + protected function getFullListErrorMessage( Parameter $parameter ) { |
| 44 | + return wfMsgExt( 'validator-list-error-must-be-float', 'parsemag', $parameter->getOriginalName() ); |
| 45 | + } |
| 46 | + |
| 47 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/criteria/CriterionIsFloat.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 48 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/criteria/CriterionInRange.php |
— | — | @@ -0,0 +1,102 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter criterion stating that the value must be in a certain range. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file CriterionInRange.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup Criteria |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class CriterionInRange extends ItemParameterCriterion { |
| 16 | + |
| 17 | + /** |
| 18 | + * Lower bound of the range. Either a number or false, for no lower limit. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + * |
| 22 | + * @var mixed |
| 23 | + */ |
| 24 | + protected $lowerBound; |
| 25 | + |
| 26 | + /** |
| 27 | + * Upper bound of the range. Either a number or false, for no upper limit. |
| 28 | + * |
| 29 | + * @since 0.4 |
| 30 | + * |
| 31 | + * @var mixed |
| 32 | + */ |
| 33 | + protected $upperBound; |
| 34 | + |
| 35 | + /** |
| 36 | + * Constructor. |
| 37 | + * |
| 38 | + * @param mixed $lowerBound |
| 39 | + * @param mixed $upperBound |
| 40 | + * |
| 41 | + * @since 0.4 |
| 42 | + */ |
| 43 | + public function __construct( $lowerBound, $upperBound ) { |
| 44 | + parent::__construct(); |
| 45 | + |
| 46 | + $this->lowerBound = $lowerBound; |
| 47 | + $this->upperBound = $upperBound; |
| 48 | + } |
| 49 | + |
| 50 | + /** |
| 51 | + * @see ItemParameterCriterion::validate |
| 52 | + */ |
| 53 | + protected function doValidation( $value, Parameter $parameter, array $parameters ) { |
| 54 | + if ( !is_numeric( $value ) ) { |
| 55 | + return false; |
| 56 | + } |
| 57 | + |
| 58 | + switch( $parameter->getType() ) { |
| 59 | + case Parameter::TYPE_INTEGER: |
| 60 | + $value = (int)$value; |
| 61 | + break; |
| 62 | + case Parameter::TYPE_FLOAT: |
| 63 | + $value = (float)$value; |
| 64 | + break; |
| 65 | + default: |
| 66 | + return false; |
| 67 | + } |
| 68 | + |
| 69 | + return ( $this->upperBound === false || $value <= $this->upperBound ) |
| 70 | + && ( $this->lowerBound === false || $value >= $this->lowerBound ); |
| 71 | + } |
| 72 | + |
| 73 | + /** |
| 74 | + * @see ItemParameterCriterion::getItemErrorMessage |
| 75 | + */ |
| 76 | + protected function getItemErrorMessage( Parameter $parameter ) { |
| 77 | + global $wgLang; |
| 78 | + |
| 79 | + return wfMsgExt( |
| 80 | + 'validator_error_invalid_range', |
| 81 | + 'parsemag', |
| 82 | + $parameter->getOriginalName(), |
| 83 | + $wgLang->formatNum( $this->lowerBound ), |
| 84 | + $wgLang->formatNum( $this->upperBound ) |
| 85 | + ); |
| 86 | + } |
| 87 | + |
| 88 | + /** |
| 89 | + * @see ItemParameterCriterion::getFullListErrorMessage |
| 90 | + */ |
| 91 | + protected function getFullListErrorMessage( Parameter $parameter ) { |
| 92 | + global $wgLang; |
| 93 | + |
| 94 | + return wfMsgExt( |
| 95 | + 'validator_list_error_invalid_range', |
| 96 | + 'parsemag', |
| 97 | + $parameter->getOriginalName(), |
| 98 | + $wgLang->formatNum( $this->lowerBound ), |
| 99 | + $wgLang->formatNum( $this->upperBound ) |
| 100 | + ); |
| 101 | + } |
| 102 | + |
| 103 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/criteria/CriterionInRange.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 104 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/criteria/CriterionInArray.php |
— | — | @@ -0,0 +1,164 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter criterion stating that the value must be in an array. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file CriterionInArray.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup Criteria |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class CriterionInArray extends ItemParameterCriterion { |
| 16 | + |
| 17 | + /** |
| 18 | + * List of allowed values. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + * |
| 22 | + * @var array |
| 23 | + */ |
| 24 | + protected $allowedValues; |
| 25 | + |
| 26 | + /** |
| 27 | + * If the values should match case. |
| 28 | + * |
| 29 | + * @since 0.4.2 |
| 30 | + * |
| 31 | + * @var boolean |
| 32 | + */ |
| 33 | + protected $careAboutCapitalization = false; |
| 34 | + |
| 35 | + /** |
| 36 | + * Constructor. |
| 37 | + * |
| 38 | + * You can specify the allowed values either by passing an array, |
| 39 | + * or by passing each value as an argument. You can also specify |
| 40 | + * if the criterion should care about capitalization or not by |
| 41 | + * adding a boolean as last argument. This value default to false. |
| 42 | + * |
| 43 | + * @since 0.4 |
| 44 | + */ |
| 45 | + public function __construct() { |
| 46 | + parent::__construct(); |
| 47 | + |
| 48 | + $args = func_get_args(); |
| 49 | + |
| 50 | + $lastElement = array_pop( $args ); |
| 51 | + |
| 52 | + if ( is_bool( $lastElement ) ) { |
| 53 | + // The element is a boolean, so it's the capitalization parameter. |
| 54 | + $this->careAboutCapitalization = $lastElement; |
| 55 | + } |
| 56 | + else { |
| 57 | + // Add the element back to the array. |
| 58 | + $args[] = $lastElement; |
| 59 | + } |
| 60 | + |
| 61 | + if ( count( $args ) > 1 ) { |
| 62 | + $this->allowedValues = $args; |
| 63 | + } |
| 64 | + elseif ( count( $args ) == 1 ) { |
| 65 | + $this->allowedValues = (array)$args[0]; |
| 66 | + } |
| 67 | + else { |
| 68 | + // Not a lot that will pass validation in this case :D |
| 69 | + $this->allowedValues = array(); |
| 70 | + } |
| 71 | + |
| 72 | + if ( !$this->careAboutCapitalization ) { |
| 73 | + // If case doesn't matter, lowercase everything and later on compare a lowercased value. |
| 74 | + $this->allowedValues = array_map( 'strtolower', $this->allowedValues ); |
| 75 | + } |
| 76 | + } |
| 77 | + |
| 78 | + /** |
| 79 | + * @see ItemParameterCriterion::validate |
| 80 | + */ |
| 81 | + protected function doValidation( $value, Parameter $parameter, array $parameters ) { |
| 82 | + return in_array( |
| 83 | + $this->careAboutCapitalization ? $value : strtolower( $value ), |
| 84 | + $this->allowedValues |
| 85 | + ); |
| 86 | + } |
| 87 | + |
| 88 | + /** |
| 89 | + * @see ItemParameterCriterion::getItemErrorMessage |
| 90 | + */ |
| 91 | + protected function getItemErrorMessage( Parameter $parameter ) { |
| 92 | + global $wgLang; |
| 93 | + |
| 94 | + $originalCount = count( $this->allowedValues ); |
| 95 | + |
| 96 | + if ( $originalCount > 15 ) { |
| 97 | + $allowedValues = array_slice( $this->allowedValues, 0, 13 ); |
| 98 | + $omitCount = $originalCount - count( $allowedValues ); |
| 99 | + |
| 100 | + return wfMsgExt( |
| 101 | + 'validator-error-accepts-only-omitted', |
| 102 | + 'parsemag', |
| 103 | + $parameter->getOriginalName(), |
| 104 | + $parameter->getValue(), |
| 105 | + $wgLang->listToText( $allowedValues ), |
| 106 | + $wgLang->formatNum( $omitCount ) |
| 107 | + ); |
| 108 | + } |
| 109 | + else { |
| 110 | + return wfMsgExt( |
| 111 | + 'validator_error_accepts_only', |
| 112 | + 'parsemag', |
| 113 | + $parameter->getOriginalName(), |
| 114 | + $wgLang->listToText( $this->allowedValues ), |
| 115 | + count( $this->allowedValues ), |
| 116 | + $parameter->getValue() |
| 117 | + ); |
| 118 | + } |
| 119 | + } |
| 120 | + |
| 121 | + /** |
| 122 | + * @see ItemParameterCriterion::getFullListErrorMessage |
| 123 | + */ |
| 124 | + protected function getFullListErrorMessage( Parameter $parameter ) { |
| 125 | + global $wgLang; |
| 126 | + |
| 127 | + $originalCount = count( $this->allowedValues ); |
| 128 | + |
| 129 | + if ( $originalCount > 15 ) { |
| 130 | + $allowedValues = array_slice( $this->allowedValues, 0, 13 ); |
| 131 | + $omitCount = $originalCount - count( $allowedValues ); |
| 132 | + |
| 133 | + return wfMsgExt( |
| 134 | + 'validator-list-error-accepts-only-omitted', |
| 135 | + 'parsemag', |
| 136 | + $parameter->getOriginalName(), |
| 137 | + $wgLang->listToText( $allowedValues ), |
| 138 | + count( $allowedValues ), |
| 139 | + $wgLang->formatNum( $omitCount ) |
| 140 | + ); |
| 141 | + } |
| 142 | + else { |
| 143 | + return wfMsgExt( |
| 144 | + 'validator-list-error-accepts-only', |
| 145 | + 'parsemag', |
| 146 | + $parameter->getOriginalName(), |
| 147 | + $wgLang->listToText( $this->allowedValues ), |
| 148 | + count( $this->allowedValues ), |
| 149 | + $parameter->getValue() |
| 150 | + ); |
| 151 | + } |
| 152 | + } |
| 153 | + |
| 154 | + /** |
| 155 | + * Returns the allowed values. |
| 156 | + * |
| 157 | + * @since 0.4.6 |
| 158 | + * |
| 159 | + * @return array |
| 160 | + */ |
| 161 | + public function getAllowedValues() { |
| 162 | + return $this->allowedValues; |
| 163 | + } |
| 164 | + |
| 165 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/criteria/CriterionInArray.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 166 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/criteria/CriterionItemCount.php |
— | — | @@ -0,0 +1,43 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter criterion stating that the value must have a certain length. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file CriterionHasLength.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup Criteria |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class CriterionItemCount extends ListParameterCriterion { |
| 16 | + |
| 17 | + protected $lowerBound; |
| 18 | + protected $upperBound; |
| 19 | + |
| 20 | + /** |
| 21 | + * Constructor. |
| 22 | + * |
| 23 | + * @param integer $lowerBound False for no lower bound (since 0.4.8). |
| 24 | + * @param mixed $upperBound False for no lower bound (since 0.4.8). |
| 25 | + * |
| 26 | + * @since 0.4 |
| 27 | + */ |
| 28 | + public function __construct( $lowerBound, $upperBound = null ) { |
| 29 | + parent::__construct(); |
| 30 | + |
| 31 | + $this->lowerBound = $lowerBound; |
| 32 | + $this->upperBound = is_null( $upperBound ) ? $lowerBound : $upperBound; |
| 33 | + } |
| 34 | + |
| 35 | + /** |
| 36 | + * @see ParameterCriterion::validate |
| 37 | + */ |
| 38 | + public function validate( Parameter $parameter, array $parameters) { |
| 39 | + $count = count( $parameter->getValue() ); |
| 40 | + return ( $this->upperBound === false || $count <= $this->upperBound ) |
| 41 | + && ( $this->lowerBound === false || $count >= $this->lowerBound ); |
| 42 | + } |
| 43 | + |
| 44 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/criteria/CriterionItemCount.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 45 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/criteria/CriterionUniqueItems.php |
— | — | @@ -0,0 +1,46 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter criterion stating that the value must have a certain length. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file CriterionHasLength.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup Criteria |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class CriterionUniqueItems extends ListParameterCriterion { |
| 16 | + |
| 17 | + /** |
| 18 | + * If the values should match case. |
| 19 | + * |
| 20 | + * @since 0.4.2 |
| 21 | + * |
| 22 | + * @var boolean |
| 23 | + */ |
| 24 | + protected $careAboutCapitalization; |
| 25 | + |
| 26 | + /** |
| 27 | + * Constructor. |
| 28 | + * |
| 29 | + * @since 0.4 |
| 30 | + */ |
| 31 | + public function __construct( $careAboutCapitalization = false ) { |
| 32 | + parent::__construct(); |
| 33 | + |
| 34 | + $this->careAboutCapitalization = $careAboutCapitalization; |
| 35 | + } |
| 36 | + |
| 37 | + /** |
| 38 | + * @see ParameterCriterion::validate |
| 39 | + */ |
| 40 | + public function validate( Parameter $parameter, array $parameters ) { |
| 41 | + return count( $parameter->getValue() ) |
| 42 | + == count( array_unique( |
| 43 | + $this->careAboutCapitalization ? $parameter->getValue() : array_map( 'strtolower', $parameter->getValue() ) |
| 44 | + ) ); |
| 45 | + } |
| 46 | + |
| 47 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/criteria/CriterionUniqueItems.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 48 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/criteria/CriterionIsInteger.php |
— | — | @@ -0,0 +1,56 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter criterion stating that the value must be an integer. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file CriterionIsInteger.php |
| 10 | + * @ingroup Validator |
| 11 | + * @ingroup Criteria |
| 12 | + * |
| 13 | + * @author Jeroen De Dauw |
| 14 | + */ |
| 15 | +class CriterionIsInteger extends ItemParameterCriterion { |
| 16 | + |
| 17 | + protected $negativesAllowed; |
| 18 | + |
| 19 | + /** |
| 20 | + * Constructor. |
| 21 | + * |
| 22 | + * @param boolean $negativesAllowed since 0.4.8 |
| 23 | + * |
| 24 | + * @since 0.4 |
| 25 | + */ |
| 26 | + public function __construct( $negativesAllowed = true ) { |
| 27 | + $this->negativesAllowed = $negativesAllowed; |
| 28 | + |
| 29 | + parent::__construct(); |
| 30 | + } |
| 31 | + |
| 32 | + /** |
| 33 | + * @see ItemParameterCriterion::validate |
| 34 | + */ |
| 35 | + protected function doValidation( $value, Parameter $parameter, array $parameters ) { |
| 36 | + if ( $this->negativesAllowed && strpos( $value, '-' ) === 0 ) { |
| 37 | + $value = substr( $value, 1 ); |
| 38 | + } |
| 39 | + |
| 40 | + return ctype_digit( (string)$value ); |
| 41 | + } |
| 42 | + |
| 43 | + /** |
| 44 | + * @see ItemParameterCriterion::getItemErrorMessage |
| 45 | + */ |
| 46 | + protected function getItemErrorMessage( Parameter $parameter ) { |
| 47 | + return wfMsgExt( 'validator_error_must_be_integer', 'parsemag', $parameter->getOriginalName() ); |
| 48 | + } |
| 49 | + |
| 50 | + /** |
| 51 | + * @see ItemParameterCriterion::getFullListErrorMessage |
| 52 | + */ |
| 53 | + protected function getFullListErrorMessage( Parameter $parameter ) { |
| 54 | + return wfMsgExt( 'validator_list_error_must_be_integer', 'parsemag', $parameter->getOriginalName() ); |
| 55 | + } |
| 56 | + |
| 57 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/criteria/CriterionIsInteger.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 58 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/ParserHook.php |
— | — | @@ -0,0 +1,524 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Class for out of the box parser hook functionality integrated with the validation |
| 6 | + * provided by Validator. |
| 7 | + * |
| 8 | + * @since 0.4 |
| 9 | + * |
| 10 | + * @file ParserHook.php |
| 11 | + * @ingroup Validator |
| 12 | + * |
| 13 | + * @licence GNU GPL v3 or later |
| 14 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 15 | + */ |
| 16 | +abstract class ParserHook { |
| 17 | + |
| 18 | + const TYPE_TAG = 0; |
| 19 | + const TYPE_FUNCTION = 1; |
| 20 | + |
| 21 | + /** |
| 22 | + * @since 0.4.3 |
| 23 | + * |
| 24 | + * @var array |
| 25 | + */ |
| 26 | + protected static $registeredHooks = array(); |
| 27 | + |
| 28 | + /** |
| 29 | + * Returns an array of registered parser hooks (keys) and their handling |
| 30 | + * ParserHook deriving class names (values). |
| 31 | + * |
| 32 | + * @since 0.4.3 |
| 33 | + * |
| 34 | + * @return array |
| 35 | + */ |
| 36 | + public static function getRegisteredParserHooks() { |
| 37 | + return self::$registeredHooks; |
| 38 | + } |
| 39 | + |
| 40 | + /** |
| 41 | + * Returns the name of the ParserHook deriving class that defines a certain parser hook, |
| 42 | + * or false if there is none. |
| 43 | + * |
| 44 | + * @since 0.4.3 |
| 45 | + * |
| 46 | + * @param string $hookName |
| 47 | + * |
| 48 | + * @return mixed string or false |
| 49 | + */ |
| 50 | + public static function getHookClassName( $hookName ) { |
| 51 | + return array_key_exists( $hookName, self::$registeredHooks ) ? self::$registeredHooks[$hookName] : false; |
| 52 | + } |
| 53 | + |
| 54 | + /** |
| 55 | + * @since 0.4 |
| 56 | + * |
| 57 | + * @var Validator |
| 58 | + */ |
| 59 | + protected $validator; |
| 60 | + |
| 61 | + /** |
| 62 | + * @since 0.4 |
| 63 | + * |
| 64 | + * @var Parser |
| 65 | + */ |
| 66 | + protected $parser; |
| 67 | + |
| 68 | + /** |
| 69 | + * @since 0.4.4 |
| 70 | + * |
| 71 | + * @var PPFrame |
| 72 | + */ |
| 73 | + protected $frame; |
| 74 | + |
| 75 | + /** |
| 76 | + * @since 0.4.4 |
| 77 | + * |
| 78 | + * @var ParserHook::TYPE_ enum item |
| 79 | + */ |
| 80 | + protected $currentType; |
| 81 | + |
| 82 | + /** |
| 83 | + * @since 0.4 |
| 84 | + * |
| 85 | + * @var boolean |
| 86 | + */ |
| 87 | + public $forTagExtensions; |
| 88 | + |
| 89 | + /** |
| 90 | + * @since 0.4 |
| 91 | + * |
| 92 | + * @var boolean |
| 93 | + */ |
| 94 | + public $forParserFunctions; |
| 95 | + |
| 96 | + /** |
| 97 | + * Gets the name of the parser hook. |
| 98 | + * |
| 99 | + * @since 0.4 |
| 100 | + * |
| 101 | + * @return string or array of string |
| 102 | + */ |
| 103 | + protected abstract function getName(); |
| 104 | + |
| 105 | + /** |
| 106 | + * Renders and returns the output. |
| 107 | + * |
| 108 | + * @since 0.4 |
| 109 | + * |
| 110 | + * @param array $parameters |
| 111 | + * |
| 112 | + * @return string |
| 113 | + */ |
| 114 | + protected abstract function render( array $parameters ); |
| 115 | + |
| 116 | + /** |
| 117 | + * Constructor. |
| 118 | + * |
| 119 | + * @since 0.4 |
| 120 | + * |
| 121 | + * @param boolean $forTagExtensions |
| 122 | + * @param boolean $forParserFunctions |
| 123 | + */ |
| 124 | + public function __construct( $forTagExtensions = true, $forParserFunctions = true ) { |
| 125 | + $this->forTagExtensions = $forTagExtensions; |
| 126 | + $this->forParserFunctions = $forParserFunctions; |
| 127 | + } |
| 128 | + |
| 129 | + /** |
| 130 | + * Function to hook up the coordinate rendering functions to the parser. |
| 131 | + * |
| 132 | + * @since 0.4 |
| 133 | + * |
| 134 | + * @param Parser $wgParser |
| 135 | + * |
| 136 | + * @return true |
| 137 | + */ |
| 138 | + public function init( Parser &$wgParser ) { |
| 139 | + $className = get_class( $this ); |
| 140 | + $first = true; |
| 141 | + |
| 142 | + foreach ( $this->getNames() as $name ) { |
| 143 | + if ( $first ) { |
| 144 | + self::$registeredHooks[$name] = $className; |
| 145 | + $first = false; |
| 146 | + } |
| 147 | + |
| 148 | + if ( $this->forTagExtensions ) { |
| 149 | + $wgParser->setHook( |
| 150 | + $name, |
| 151 | + array( new ParserHookCaller( $className, 'renderTag' ), 'runHook' ) |
| 152 | + ); |
| 153 | + } |
| 154 | + |
| 155 | + if ( $this->forParserFunctions ) { |
| 156 | + $wgParser->setFunctionHook( |
| 157 | + $name, |
| 158 | + array( new ParserHookCaller( $className, 'renderFunction' ), 'runHook' ) |
| 159 | + ); |
| 160 | + } |
| 161 | + } |
| 162 | + |
| 163 | + return true; |
| 164 | + } |
| 165 | + |
| 166 | + /** |
| 167 | + * returns an array with the names for the parser hook. |
| 168 | + * |
| 169 | + * @since 0.4 |
| 170 | + * |
| 171 | + * @return array |
| 172 | + */ |
| 173 | + protected function getNames() { |
| 174 | + $names = $this->getName(); |
| 175 | + |
| 176 | + if ( !is_array( $names ) ) { |
| 177 | + $names = array( $names ); |
| 178 | + } |
| 179 | + |
| 180 | + return $names; |
| 181 | + } |
| 182 | + |
| 183 | + /** |
| 184 | + * Function to add the magic word in pre MW 1.16. |
| 185 | + * |
| 186 | + * @since 0.4 |
| 187 | + * |
| 188 | + * @param array $magicWords |
| 189 | + * @param string $langCode |
| 190 | + * |
| 191 | + * @return true |
| 192 | + */ |
| 193 | + public function magic( array &$magicWords, $langCode ) { |
| 194 | + foreach ( $this->getNames() as $name ) { |
| 195 | + $magicWords[$name] = array( 0, $name ); |
| 196 | + } |
| 197 | + |
| 198 | + return true; |
| 199 | + } |
| 200 | + |
| 201 | + /** |
| 202 | + * Handler for rendering the tag hook. |
| 203 | + * |
| 204 | + * @since 0.4 |
| 205 | + * |
| 206 | + * @param minxed $input string or null |
| 207 | + * @param array $args |
| 208 | + * @param Parser $parser |
| 209 | + * @param PPFrame $frame Available from 1.16 |
| 210 | + * |
| 211 | + * @return string |
| 212 | + */ |
| 213 | + public function renderTag( $input, array $args, Parser $parser, PPFrame $frame = null ) { |
| 214 | + $this->parser = $parser; |
| 215 | + $this->frame = $frame; |
| 216 | + |
| 217 | + $defaultParameters = $this->getDefaultParameters( self::TYPE_TAG ); |
| 218 | + $defaultParam = array_shift( $defaultParameters ); |
| 219 | + |
| 220 | + // If there is a first default parameter, set the tag contents as it's value. |
| 221 | + if ( !is_null( $defaultParam ) && !is_null( $input ) ) { |
| 222 | + $args[$defaultParam] = $input; |
| 223 | + } |
| 224 | + |
| 225 | + return $this->validateAndRender( $args, self::TYPE_TAG ); |
| 226 | + } |
| 227 | + |
| 228 | + /** |
| 229 | + * Handler for rendering the function hook. |
| 230 | + * |
| 231 | + * @since 0.4 |
| 232 | + * |
| 233 | + * @param Parser $parser |
| 234 | + * ... further arguments ... |
| 235 | + * |
| 236 | + * @return array |
| 237 | + */ |
| 238 | + public function renderFunction() { |
| 239 | + $args = func_get_args(); |
| 240 | + |
| 241 | + $this->parser = array_shift( $args ); |
| 242 | + $output = $this->validateAndRender( $args, self::TYPE_FUNCTION ); |
| 243 | + $options = $this->getFunctionOptions(); |
| 244 | + |
| 245 | + if ( array_key_exists( 'isHTML', $options ) && $options['isHTML'] ) { |
| 246 | + return $this->parser->insertStripItem( $output, $this->parser->mStripState ); |
| 247 | + } |
| 248 | + |
| 249 | + return array_merge( |
| 250 | + array( $output ), |
| 251 | + $options |
| 252 | + ); |
| 253 | + } |
| 254 | + |
| 255 | + /** |
| 256 | + * Returns the parser function otpions. |
| 257 | + * |
| 258 | + * @since 0.4 |
| 259 | + * |
| 260 | + * @return array |
| 261 | + */ |
| 262 | + protected function getFunctionOptions() { |
| 263 | + return array(); |
| 264 | + } |
| 265 | + |
| 266 | + /** |
| 267 | + * Takes care of validation and rendering, and returns the output. |
| 268 | + * |
| 269 | + * @since 0.4 |
| 270 | + * |
| 271 | + * @param array $arguments |
| 272 | + * @param integer $type Item of the ParserHook::TYPE_ enum |
| 273 | + * |
| 274 | + * @return string |
| 275 | + */ |
| 276 | + public function validateAndRender( array $arguments, $type ) { |
| 277 | + $names = $this->getNames(); |
| 278 | + $this->validator = new Validator( $names[0] ); |
| 279 | + |
| 280 | + if ( $type === self::TYPE_FUNCTION ) { |
| 281 | + $this->validator->setFunctionParams( $arguments, $this->getParameterInfo( $type ), $this->getDefaultParameters( $type ) ); |
| 282 | + } |
| 283 | + else { |
| 284 | + $this->validator->setParameters( $arguments, $this->getParameterInfo( $type ) ); |
| 285 | + } |
| 286 | + |
| 287 | + $this->validator->validateParameters(); |
| 288 | + |
| 289 | + $fatalError = $this->validator->hasFatalError(); |
| 290 | + |
| 291 | + if ( $fatalError === false ) { |
| 292 | + $output = $this->render( $this->validator->getParameterValues() ); |
| 293 | + $output = $this->renderErrors( $output ); |
| 294 | + } |
| 295 | + else { |
| 296 | + $output = $this->renderFatalError( $fatalError ); |
| 297 | + } |
| 298 | + |
| 299 | + return $output; |
| 300 | + } |
| 301 | + |
| 302 | + /** |
| 303 | + * Returns the ValidationError objects for the errors and warnings that should be displayed. |
| 304 | + * |
| 305 | + * @since 0.4 |
| 306 | + * |
| 307 | + * @return array of array of ValidationError |
| 308 | + */ |
| 309 | + protected function getErrorsToDisplay() { |
| 310 | + $errors = array(); |
| 311 | + $warnings = array(); |
| 312 | + |
| 313 | + foreach ( $this->validator->getErrors() as $error ) { |
| 314 | + // Check if the severity of the error is high enough to display it. |
| 315 | + if ( $error->shouldShow() ) { |
| 316 | + $errors[] = $error; |
| 317 | + } |
| 318 | + elseif ( $error->shouldWarn() ) { |
| 319 | + $warnings[] = $error; |
| 320 | + } |
| 321 | + } |
| 322 | + |
| 323 | + return array( 'errors' => $errors, 'warnings' => $warnings ); |
| 324 | + } |
| 325 | + |
| 326 | + /** |
| 327 | + * Creates and returns the output when a fatal error prevent regular rendering. |
| 328 | + * |
| 329 | + * @since 0.4 |
| 330 | + * |
| 331 | + * @param ValidationError $error |
| 332 | + * |
| 333 | + * @return string |
| 334 | + */ |
| 335 | + protected function renderFatalError( ValidationError $error ) { |
| 336 | + return '<div><span class="errorbox">' . |
| 337 | + htmlspecialchars( wfMsgExt( 'validator-fatal-error', 'parsemag', $error->getMessage() ) ) . |
| 338 | + '</span></div><br /><br />'; |
| 339 | + } |
| 340 | + |
| 341 | + /** |
| 342 | + * @since 0.4 |
| 343 | + * |
| 344 | + * @param string $output |
| 345 | + * |
| 346 | + * @return string |
| 347 | + */ |
| 348 | + protected function renderErrors( $output ) { |
| 349 | + $displayStuff = $this->getErrorsToDisplay(); |
| 350 | + |
| 351 | + if ( count( $displayStuff['errors'] ) > 0 ) { |
| 352 | + $output .= wfMsgExt( 'validator_error_parameters', 'parsemag', count( $displayStuff['errors'] ) ); |
| 353 | + |
| 354 | + foreach( $displayStuff['errors'] as $error ) { |
| 355 | + $output .= '<br />* ' . $error->getMessage(); |
| 356 | + } |
| 357 | + |
| 358 | + if ( count( $displayStuff['warnings'] ) > 0 ) { |
| 359 | + $output .= '<br />* ' . wfMsgExt( 'validator-warning-adittional-errors', 'parsemag', count( $displayStuff['warnings'] ) ); |
| 360 | + } |
| 361 | + } |
| 362 | + elseif ( count( $displayStuff['warnings'] ) > 0 ) { |
| 363 | + $output .= wfMsgExt( |
| 364 | + 'validator-warning', |
| 365 | + 'parsemag', |
| 366 | + wfMsgExt( 'validator_warning_parameters', 'parsemag', count( $displayStuff['warnings'] ) ) |
| 367 | + ); |
| 368 | + } |
| 369 | + |
| 370 | + return $output; |
| 371 | + } |
| 372 | + |
| 373 | + /** |
| 374 | + * Returns an array containing the parameter info. |
| 375 | + * Override in deriving classes to add parameter info. |
| 376 | + * |
| 377 | + * @since 0.4 |
| 378 | + * |
| 379 | + * @param integer $type Item of the ParserHook::TYPE_ enum |
| 380 | + * |
| 381 | + * @return array |
| 382 | + */ |
| 383 | + protected function getParameterInfo( $type ) { |
| 384 | + return array(); |
| 385 | + } |
| 386 | + |
| 387 | + /** |
| 388 | + * Returns the list of default parameters. |
| 389 | + * Override in deriving classes to add default parameters. |
| 390 | + * |
| 391 | + * @since 0.4 |
| 392 | + * |
| 393 | + * @param integer $type Item of the ParserHook::TYPE_ enum |
| 394 | + * |
| 395 | + * @return array |
| 396 | + */ |
| 397 | + protected function getDefaultParameters( $type ) { |
| 398 | + return array(); |
| 399 | + } |
| 400 | + |
| 401 | + /** |
| 402 | + * Returns the data needed to describe the parser hook. |
| 403 | + * This is mainly needed because some of the individual get methods |
| 404 | + * that return the needed data are protected, and cannot be made |
| 405 | + * public without breaking b/c in a rather bad way. |
| 406 | + * |
| 407 | + * @since 0.4.3 |
| 408 | + * |
| 409 | + * @param integer $type Item of the ParserHook::TYPE_ enum |
| 410 | + * |
| 411 | + * @return array |
| 412 | + */ |
| 413 | + public function getDescriptionData( $type ) { |
| 414 | + return array( |
| 415 | + 'names' => $this->getNames(), |
| 416 | + 'description' => $this->getDescription(), |
| 417 | + 'message' => $this->getMessage(), |
| 418 | + 'parameters' => $this->getParameterInfo( $type ), |
| 419 | + 'defaults' => $this->getDefaultParameters( $type ), |
| 420 | + ); |
| 421 | + } |
| 422 | + |
| 423 | + /** |
| 424 | + * Returns a description for the parser hook, or false when there is none. |
| 425 | + * Override in deriving classes to add a message. |
| 426 | + * |
| 427 | + * @since 0.4.3 |
| 428 | + * |
| 429 | + * @return mixed string or false |
| 430 | + */ |
| 431 | + public function getDescription() { |
| 432 | + $msg = $this->getMessage(); |
| 433 | + return $msg === false ? false : wfMsg( $msg ); |
| 434 | + } |
| 435 | + |
| 436 | + /** |
| 437 | + * Returns a description message for the parser hook, or false when there is none. |
| 438 | + * Override in deriving classes to add a message. |
| 439 | + * |
| 440 | + * @since 0.4.10 |
| 441 | + * |
| 442 | + * @return mixed string or false |
| 443 | + */ |
| 444 | + public function getMessage() { |
| 445 | + return false; |
| 446 | + } |
| 447 | + |
| 448 | + /** |
| 449 | + * Returns if the current render request is coming from a tag extension. |
| 450 | + * |
| 451 | + * @since 0.4.4 |
| 452 | + * |
| 453 | + * @return boolean |
| 454 | + */ |
| 455 | + protected function isTag() { |
| 456 | + return $this->currentType == self::TYPE_TAG; |
| 457 | + } |
| 458 | + |
| 459 | + /** |
| 460 | + * Returns if the current render request is coming from a parser function. |
| 461 | + * |
| 462 | + * @since 0.4.4 |
| 463 | + * |
| 464 | + * @return boolean |
| 465 | + */ |
| 466 | + protected function isFunction() { |
| 467 | + return $this->currentType == self::TYPE_FUNCTION; |
| 468 | + } |
| 469 | + |
| 470 | + /** |
| 471 | + * Utility function to parse wikitext without having to care |
| 472 | + * about handling a tag extension or parser function. |
| 473 | + * |
| 474 | + * @since 0.4.4 |
| 475 | + * |
| 476 | + * @param string $text The wikitext to be parsed |
| 477 | + * |
| 478 | + * @return string the parsed output |
| 479 | + */ |
| 480 | + protected function parseWikitext( $text ) { |
| 481 | + // Parse the wikitext to HTML. |
| 482 | + if ( $this->isFunction() ) { |
| 483 | + return $this->parser->parse( |
| 484 | + $text, |
| 485 | + $this->parser->mTitle, |
| 486 | + $this->parser->mOptions, |
| 487 | + true, |
| 488 | + false |
| 489 | + )->getText(); |
| 490 | + } |
| 491 | + else { |
| 492 | + return $this->parser->recursiveTagParse( |
| 493 | + $text, |
| 494 | + $this->frame |
| 495 | + ); |
| 496 | + } |
| 497 | + } |
| 498 | + |
| 499 | +} |
| 500 | + |
| 501 | +/** |
| 502 | + * Completely evil class to create a new instance of the handling ParserHook when the actual hook gets called. |
| 503 | + * |
| 504 | + * @evillness >9000 - to be replaced when a better solution (LSB?) is possible. |
| 505 | + * |
| 506 | + * @since 0.4 |
| 507 | + * |
| 508 | + * @author Jeroen De Dauw |
| 509 | + */ |
| 510 | +class ParserHookCaller { |
| 511 | + |
| 512 | + protected $class; |
| 513 | + protected $method; |
| 514 | + |
| 515 | + function __construct( $class, $method ) { |
| 516 | + $this->class = $class; |
| 517 | + $this->method = $method; |
| 518 | + } |
| 519 | + |
| 520 | + public function runHook() { |
| 521 | + $args = func_get_args(); |
| 522 | + return call_user_func_array( array( new $this->class(), $this->method ), $args ); |
| 523 | + } |
| 524 | + |
| 525 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/ParserHook.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 526 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/ItemParameterCriterion.php |
— | — | @@ -0,0 +1,173 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Item parameter criterion definition class. This is for criteria |
| 6 | + * that apply to individual values, which can either be the whole value |
| 7 | + * of a non-list parameter, or a single item of a list parameter. |
| 8 | + * |
| 9 | + * @since 0.4 |
| 10 | + * |
| 11 | + * @file ItemParameterCriterion.php |
| 12 | + * @ingroup Validator |
| 13 | + * @ingroup Criteria |
| 14 | + * |
| 15 | + * @licence GNU GPL v3 or later |
| 16 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 17 | + */ |
| 18 | +abstract class ItemParameterCriterion extends ParameterCriterion { |
| 19 | + |
| 20 | + /** |
| 21 | + * Validate a value against the criterion. |
| 22 | + * |
| 23 | + * @param string $value |
| 24 | + * @param Parameter $parameter |
| 25 | + * @param array $parameters |
| 26 | + * |
| 27 | + * @since 0.4 |
| 28 | + * |
| 29 | + * @return boolean |
| 30 | + */ |
| 31 | + protected abstract function doValidation( $value, Parameter $parameter, array $parameters ); |
| 32 | + |
| 33 | + /** |
| 34 | + * Gets an internationalized error message to construct a ValidationError with |
| 35 | + * when the criteria validation failed. (for non-list values) |
| 36 | + * |
| 37 | + * @param Parameter $parameter |
| 38 | + * |
| 39 | + * @since 0.4 |
| 40 | + * |
| 41 | + * @return string |
| 42 | + */ |
| 43 | + protected abstract function getItemErrorMessage( Parameter $parameter ); |
| 44 | + |
| 45 | + /** |
| 46 | + * Constructor. |
| 47 | + * |
| 48 | + * @since 0.4 |
| 49 | + */ |
| 50 | + public function __construct() { |
| 51 | + parent::__construct(); |
| 52 | + } |
| 53 | + |
| 54 | + /** |
| 55 | + * @see ParameterCriterion::isForLists |
| 56 | + */ |
| 57 | + public function isForLists() { |
| 58 | + return false; |
| 59 | + } |
| 60 | + |
| 61 | + /** |
| 62 | + * Validate the provided value or list of values against the criterion. |
| 63 | + * |
| 64 | + * @since 0.4 |
| 65 | + * |
| 66 | + * @param Parameter $parameter |
| 67 | + * @param array $parameters |
| 68 | + * |
| 69 | + * @return CriterionValidationResult |
| 70 | + */ |
| 71 | + public function validate( Parameter $parameter, array $parameters ) { |
| 72 | + $result = new CriterionValidationResult(); |
| 73 | + |
| 74 | + if ( is_array( $parameter->getValue() ) ) { |
| 75 | + foreach ( $parameter->getValue() as $item ) { |
| 76 | + if ( !$this->doValidation( $item, $parameter, $parameters ) ) { |
| 77 | + $result->addInvalidItem( $item ); |
| 78 | + } |
| 79 | + } |
| 80 | + |
| 81 | + if ( $result->hasInvalidItems() ) { |
| 82 | + $allInvalid = count( $result->getInvalidItems() ) == count( $parameter->getValue() ); |
| 83 | + |
| 84 | + // If the parameter is required and all items are invalid, it's fatal. |
| 85 | + // Else it's high for required, and normal for non-required parameters. |
| 86 | + if ( $parameter->isRequired() ) { |
| 87 | + $severity = $allInvalid ? ValidationError::SEVERITY_FATAL : ValidationError::SEVERITY_HIGH; |
| 88 | + } |
| 89 | + else { |
| 90 | + $severity = $allInvalid ? ValidationError::SEVERITY_NORMAL : ValidationError::SEVERITY_LOW; |
| 91 | + } |
| 92 | + |
| 93 | + $result->addError( |
| 94 | + new ValidationError( |
| 95 | + $this->getListErrorMessage( $parameter, $result->getInvalidItems(), $allInvalid ), |
| 96 | + $severity |
| 97 | + ) |
| 98 | + ); |
| 99 | + } |
| 100 | + } |
| 101 | + else { |
| 102 | + if ( !$this->doValidation( $parameter->getValue(), $parameter, $parameters ) ) { |
| 103 | + $result->addError( |
| 104 | + new ValidationError( |
| 105 | + $this->getItemErrorMessage( $parameter ), |
| 106 | + $parameter->isRequired() ? ValidationError::SEVERITY_FATAL : ValidationError::SEVERITY_NORMAL |
| 107 | + ) |
| 108 | + ); |
| 109 | + } |
| 110 | + } |
| 111 | + |
| 112 | + return $result; |
| 113 | + } |
| 114 | + |
| 115 | + /** |
| 116 | + * Gets an internationalized error message to construct a ValidationError with |
| 117 | + * when the criteria validation failed. (for list values) |
| 118 | + * |
| 119 | + * @param Parameter $parameter |
| 120 | + * @param array $invalidItems |
| 121 | + * @param boolean $allInvalid |
| 122 | + * |
| 123 | + * @since 0.4 |
| 124 | + * |
| 125 | + * @return string |
| 126 | + */ |
| 127 | + protected function getListErrorMessage( Parameter $parameter, array $invalidItems, $allInvalid ) { |
| 128 | + if ( $allInvalid ) { |
| 129 | + return $this->getFullListErrorMessage( $parameter ); |
| 130 | + } |
| 131 | + else { |
| 132 | + return $this->getPartialListErrorMessage( $parameter, $invalidItems, $allInvalid ); |
| 133 | + } |
| 134 | + } |
| 135 | + |
| 136 | + /** |
| 137 | + * Gets an internationalized error message to construct a ValidationError with |
| 138 | + * when the criteria validation failed. (for list values when all values are invalid) |
| 139 | + * |
| 140 | + * @param Parameter $parameter |
| 141 | + * |
| 142 | + * @since 0.4 |
| 143 | + * |
| 144 | + * @return string |
| 145 | + */ |
| 146 | + protected function getFullListErrorMessage( Parameter $parameter ) { |
| 147 | + return wfMsgExt( 'validator-error-problem', 'parsemag', $parameter->getOriginalName() ); |
| 148 | + } |
| 149 | + |
| 150 | + /** |
| 151 | + * Gets an internationalized error message to construct a ValidationError with |
| 152 | + * when the criteria validation failed. (for list values when only some values are invalid) |
| 153 | + * |
| 154 | + * @param Parameter $parameter |
| 155 | + * @param array $invalidItems |
| 156 | + * @param boolean $allInvalid |
| 157 | + * |
| 158 | + * @since 0.4 |
| 159 | + * |
| 160 | + * @return string |
| 161 | + */ |
| 162 | + protected function getPartialListErrorMessage( Parameter $parameter, array $invalidItems, $allInvalid ) { |
| 163 | + global $wgLang; |
| 164 | + |
| 165 | + return $this->getFullListErrorMessage( $parameter ) . |
| 166 | + wfMsgExt( |
| 167 | + 'validator-error-omitted', |
| 168 | + 'parsemag', |
| 169 | + $wgLang->listToText( $invalidItems ), |
| 170 | + count( $invalidItems ) |
| 171 | + ); |
| 172 | + } |
| 173 | + |
| 174 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/ItemParameterCriterion.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 175 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/ItemParameterManipulation.php |
— | — | @@ -0,0 +1,68 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Item parameter manipulation base class. This is for manipulations |
| 6 | + * that apply to individual values, which can either be the whole value |
| 7 | + * of a non-list parameter, or a single item of a list parameter. |
| 8 | + * |
| 9 | + * @since 0.4 |
| 10 | + * |
| 11 | + * @file ItemParameterManipulation.php |
| 12 | + * @ingroup Validator |
| 13 | + * @ingroup ParameterManipulations |
| 14 | + * |
| 15 | + * @licence GNU GPL v3 or later |
| 16 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 17 | + */ |
| 18 | +abstract class ItemParameterManipulation extends ParameterManipulation { |
| 19 | + |
| 20 | + /** |
| 21 | + * Manipulate an actual value. |
| 22 | + * |
| 23 | + * @param string $value |
| 24 | + * @param Parameter $parameter |
| 25 | + * @param array $parameters |
| 26 | + * |
| 27 | + * @since 0.4 |
| 28 | + * |
| 29 | + * @return mixed |
| 30 | + */ |
| 31 | + protected abstract function doManipulation( &$value, Parameter $parameter, array &$parameters ); |
| 32 | + |
| 33 | + /** |
| 34 | + * Constructor. |
| 35 | + * |
| 36 | + * @since 0.4 |
| 37 | + */ |
| 38 | + public function __construct() { |
| 39 | + parent::__construct(); |
| 40 | + } |
| 41 | + |
| 42 | + /** |
| 43 | + * @see ParameterManipulation::isForLists |
| 44 | + */ |
| 45 | + public function isForLists() { |
| 46 | + return false; |
| 47 | + } |
| 48 | + |
| 49 | + /** |
| 50 | + * Validate a parameter against the criterion. |
| 51 | + * |
| 52 | + * @param Parameter $parameter |
| 53 | + * @param array $parameters |
| 54 | + * |
| 55 | + * @since 0.4 |
| 56 | + */ |
| 57 | + public function manipulate( Parameter &$parameter, array &$parameters ) { |
| 58 | + if ( is_array( $parameter->getValue() ) ) { |
| 59 | + $value = &$parameter->getValue(); |
| 60 | + foreach ( $value as &$item ) { |
| 61 | + $this->doManipulation( $item, $parameter, $parameters ); |
| 62 | + } |
| 63 | + } |
| 64 | + else { |
| 65 | + $this->doManipulation( $parameter->getValue(), $parameter, $parameters ); |
| 66 | + } |
| 67 | + } |
| 68 | + |
| 69 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/ItemParameterManipulation.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 70 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/Parameter.php |
— | — | @@ -0,0 +1,823 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Parameter definition class. |
| 6 | + * |
| 7 | + * @since 0.4 |
| 8 | + * |
| 9 | + * @file Parameter.php |
| 10 | + * @ingroup Validator |
| 11 | + * |
| 12 | + * @licence GNU GPL v3 or later |
| 13 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 14 | + */ |
| 15 | +class Parameter { |
| 16 | + |
| 17 | + const TYPE_STRING = 'string'; |
| 18 | + const TYPE_NUMBER = 'number'; |
| 19 | + const TYPE_INTEGER = 'integer'; |
| 20 | + const TYPE_FLOAT = 'float'; |
| 21 | + const TYPE_BOOLEAN = 'boolean'; |
| 22 | + const TYPE_CHAR = 'char'; |
| 23 | + |
| 24 | + /** |
| 25 | + * Indicates whether parameters that are provided more then once should be accepted, |
| 26 | + * and use the first provided value, or not, and generate an error. |
| 27 | + * |
| 28 | + * @since 0.4 |
| 29 | + * |
| 30 | + * @var boolean |
| 31 | + */ |
| 32 | + public static $acceptOverriding = false; |
| 33 | + |
| 34 | + /** |
| 35 | + * Indicates whether parameters not found in the criteria list |
| 36 | + * should be stored in case they are not accepted. The default is false. |
| 37 | + * |
| 38 | + * @since 0.4 |
| 39 | + * |
| 40 | + * @var boolean |
| 41 | + */ |
| 42 | + public static $accumulateParameterErrors = false; |
| 43 | + |
| 44 | + /** |
| 45 | + * Indicates if the parameter value should trimmed. |
| 46 | + * |
| 47 | + * @since 0.4 |
| 48 | + * |
| 49 | + * @var boolean |
| 50 | + */ |
| 51 | + public $trimValue = true; |
| 52 | + |
| 53 | + /** |
| 54 | + * Dependency list containing parameters that need to be handled before this one. |
| 55 | + * |
| 56 | + * @since 0.4 |
| 57 | + * |
| 58 | + * @var array |
| 59 | + */ |
| 60 | + protected $dependencies = array(); |
| 61 | + |
| 62 | + /** |
| 63 | + * The default value for the parameter, or null when the parameter is required. |
| 64 | + * |
| 65 | + * @since 0.4 |
| 66 | + * |
| 67 | + * @var mixed |
| 68 | + */ |
| 69 | + protected $default; |
| 70 | + |
| 71 | + /** |
| 72 | + * The main name of the parameter. |
| 73 | + * |
| 74 | + * @since 0.4 |
| 75 | + * |
| 76 | + * @var string |
| 77 | + */ |
| 78 | + protected $name; |
| 79 | + |
| 80 | + /** |
| 81 | + * The type of the parameter, element of the Parameter::TYPE_ enum. |
| 82 | + * |
| 83 | + * @since 0.4 |
| 84 | + * |
| 85 | + * @var string |
| 86 | + */ |
| 87 | + protected $type; |
| 88 | + |
| 89 | + /** |
| 90 | + * List of aliases for the parameter name. |
| 91 | + * |
| 92 | + * @since 0.4 |
| 93 | + * |
| 94 | + * @var array |
| 95 | + */ |
| 96 | + protected $aliases = array(); |
| 97 | + |
| 98 | + /** |
| 99 | + * List of criteria the parameter value needs to hold against. |
| 100 | + * |
| 101 | + * @since 0.4 |
| 102 | + * |
| 103 | + * @var array of ParameterCriterion |
| 104 | + */ |
| 105 | + protected $criteria = array(); |
| 106 | + |
| 107 | + /** |
| 108 | + * List of manipulations the parameter value needs to undergo. |
| 109 | + * |
| 110 | + * @since 0.4 |
| 111 | + * |
| 112 | + * @var array of ParameterManipulation |
| 113 | + */ |
| 114 | + protected $manipulations = array(); |
| 115 | + |
| 116 | + /** |
| 117 | + * The original parameter name as provided by the user. This can be the |
| 118 | + * main name or an alias. |
| 119 | + * |
| 120 | + * @since 0.4 |
| 121 | + * |
| 122 | + * @var string |
| 123 | + */ |
| 124 | + protected $originalName; |
| 125 | + |
| 126 | + /** |
| 127 | + * The original value as provided by the user. This is mainly retained for |
| 128 | + * usage in error messages when the parameter turns out to be invalid. |
| 129 | + * |
| 130 | + * @since 0.4 |
| 131 | + * |
| 132 | + * @var string |
| 133 | + */ |
| 134 | + protected $originalValue; |
| 135 | + |
| 136 | + /** |
| 137 | + * The value of the parameter. |
| 138 | + * |
| 139 | + * @since 0.4 |
| 140 | + * |
| 141 | + * @var mixed |
| 142 | + */ |
| 143 | + protected $value; |
| 144 | + |
| 145 | + /** |
| 146 | + * Keeps track of how many times the parameter has been set by the user. |
| 147 | + * This is used to detect overrides and for figuring out a parameter is missing. |
| 148 | + * |
| 149 | + * @since 0.4 |
| 150 | + * |
| 151 | + * @var integer |
| 152 | + */ |
| 153 | + protected $setCount = 0; |
| 154 | + |
| 155 | + /** |
| 156 | + * List of validation errors for this parameter. |
| 157 | + * |
| 158 | + * @since 0.4 |
| 159 | + * |
| 160 | + * @var array of ValidationError |
| 161 | + */ |
| 162 | + protected $errors = array(); |
| 163 | + |
| 164 | + /** |
| 165 | + * Indicates if the parameter manipulations should be applied to the default value. |
| 166 | + * |
| 167 | + * @since 0.4 |
| 168 | + * |
| 169 | + * @var boolean |
| 170 | + */ |
| 171 | + protected $applyManipulationsToDefault = true; |
| 172 | + |
| 173 | + /** |
| 174 | + * Indicates if the parameter was set to it's default. |
| 175 | + * |
| 176 | + * @since 0.4 |
| 177 | + * |
| 178 | + * @var boolean |
| 179 | + */ |
| 180 | + protected $defaulted = false; |
| 181 | + |
| 182 | + /** |
| 183 | + * A description for the parameter or false when there is none. |
| 184 | + * Can be obtained via getDescription and set via setDescription. |
| 185 | + * |
| 186 | + * @since 0.4.3 |
| 187 | + * |
| 188 | + * @var mixed string or false |
| 189 | + */ |
| 190 | + protected $description = false; |
| 191 | + |
| 192 | + /** |
| 193 | + * A message that acts as description for the parameter or false when there is none. |
| 194 | + * Can be obtained via getMessage and set via setMessage. |
| 195 | + * |
| 196 | + * @since 0.4.9 |
| 197 | + * |
| 198 | + * @var mixed string or false |
| 199 | + */ |
| 200 | + protected $message = false; |
| 201 | + |
| 202 | + /** |
| 203 | + * Constructor. |
| 204 | + * |
| 205 | + * @since 0.4 |
| 206 | + * |
| 207 | + * @param string $name |
| 208 | + * @param string $type |
| 209 | + * @param mixed $default Use null for no default (which makes the parameter required) |
| 210 | + * @param array $aliases |
| 211 | + * @param array $criteria |
| 212 | + * @param array $dependencies |
| 213 | + */ |
| 214 | + public function __construct( $name, $type = Parameter::TYPE_STRING, |
| 215 | + $default = null, array $aliases = array(), array $criteria = array(), array $dependencies = array() ) { |
| 216 | + |
| 217 | + $this->name = $name; |
| 218 | + $this->type = $type; |
| 219 | + $this->default = $default; |
| 220 | + $this->aliases = $aliases; |
| 221 | + |
| 222 | + $this->cleanCriteria( $criteria ); |
| 223 | + $this->criteria = $criteria; |
| 224 | + |
| 225 | + $this->dependencies = $dependencies; |
| 226 | + } |
| 227 | + |
| 228 | + /** |
| 229 | + * Ensures all Validator 3.x-style criteria definitions are converted into ParameterCriterion instances. |
| 230 | + * |
| 231 | + * @since 0.4 |
| 232 | + * |
| 233 | + * @param array $criteria |
| 234 | + */ |
| 235 | + protected function cleanCriteria( array &$criteria ) { |
| 236 | + foreach ( $criteria as $key => &$criterion ) { |
| 237 | + if ( !$criterion instanceof ParameterCriterion ) { |
| 238 | + throw new Exception( "$key is not a valid ParameterCriterion." ); |
| 239 | + } |
| 240 | + } |
| 241 | + } |
| 242 | + |
| 243 | + /** |
| 244 | + * Adds one or more aliases for the parameter name. |
| 245 | + * |
| 246 | + * @since 0.4 |
| 247 | + * |
| 248 | + * @param mixed $aliases string or array of string |
| 249 | + */ |
| 250 | + public function addAliases() { |
| 251 | + $args = func_get_args(); |
| 252 | + $this->aliases = array_merge( $this->aliases, is_array( $args[0] ) ? $args[0] : $args ); |
| 253 | + } |
| 254 | + |
| 255 | + /** |
| 256 | + * Adds one or more ParameterCriterion. |
| 257 | + * |
| 258 | + * @since 0.4 |
| 259 | + * |
| 260 | + * @param mixed $criteria ParameterCriterion or array of ParameterCriterion |
| 261 | + */ |
| 262 | + public function addCriteria() { |
| 263 | + $args = func_get_args(); |
| 264 | + $this->criteria = array_merge( $this->criteria, is_array( $args[0] ) ? $args[0] : $args ); |
| 265 | + } |
| 266 | + |
| 267 | + /** |
| 268 | + * Adds one or more dependencies. There are the names of parameters |
| 269 | + * that need to be validated and formatted before this one. |
| 270 | + * |
| 271 | + * @since 0.4 |
| 272 | + * |
| 273 | + * @return array |
| 274 | + */ |
| 275 | + public function addDependencies() { |
| 276 | + $args = func_get_args(); |
| 277 | + $this->dependencies = array_merge( $this->dependencies, is_array( $args[0] ) ? $args[0] : $args ); |
| 278 | + } |
| 279 | + |
| 280 | + /** |
| 281 | + * Adds one or more ParameterManipulation. |
| 282 | + * |
| 283 | + * @since 0.4 |
| 284 | + * |
| 285 | + * @param mixed $manipulations ParameterManipulation or array of ParameterManipulation |
| 286 | + */ |
| 287 | + public function addManipulations( $manipulations ) { |
| 288 | + $args = func_get_args(); |
| 289 | + $this->manipulations = array_merge( $this->manipulations, is_array( $args[0] ) ? $args[0] : $args ); |
| 290 | + } |
| 291 | + |
| 292 | + /** |
| 293 | + * Sets and cleans the original value and name. |
| 294 | + * |
| 295 | + * @since 0.4 |
| 296 | + * |
| 297 | + * @param string $paramName |
| 298 | + * @param string $paramValue |
| 299 | + * |
| 300 | + * @return boolean |
| 301 | + */ |
| 302 | + public function setUserValue( $paramName, $paramValue ) { |
| 303 | + if ( $this->setCount > 0 && !self::$acceptOverriding ) { |
| 304 | + // TODO: fatal error |
| 305 | + /* |
| 306 | + $this->registerError( |
| 307 | + wfMsgExt( |
| 308 | + 'validator-error-override-argument', |
| 309 | + 'parsemag', |
| 310 | + $paramName, |
| 311 | + $this->mParameters[$mainName]['original-value'], |
| 312 | + is_array( $paramData ) ? $paramData['original-value'] : $paramData |
| 313 | + ), |
| 314 | + 'override' |
| 315 | + ); |
| 316 | + */ |
| 317 | + return false; |
| 318 | + } |
| 319 | + else { |
| 320 | + $this->originalName = $paramName; |
| 321 | + $this->originalValue = $paramValue; |
| 322 | + |
| 323 | + $this->cleanValue(); |
| 324 | + |
| 325 | + $this->setCount++; |
| 326 | + |
| 327 | + return true; |
| 328 | + } |
| 329 | + } |
| 330 | + |
| 331 | + /** |
| 332 | + * Sets the value. |
| 333 | + * |
| 334 | + * @since 0.4 |
| 335 | + * |
| 336 | + * @param mixed $value |
| 337 | + */ |
| 338 | + public function setValue( $value ) { |
| 339 | + $this->value = $value; |
| 340 | + } |
| 341 | + |
| 342 | + /** |
| 343 | + * Sets the $value to a cleaned value of $originalValue. |
| 344 | + * |
| 345 | + * @since 0.4 |
| 346 | + */ |
| 347 | + protected function cleanValue() { |
| 348 | + $this->value = $this->originalValue; |
| 349 | + |
| 350 | + if ( $this->trimValue ) { |
| 351 | + $this->value = trim( $this->value ); |
| 352 | + } |
| 353 | + } |
| 354 | + |
| 355 | + /** |
| 356 | + * Validates the parameter value and sets the value to it's default when errors occur. |
| 357 | + * |
| 358 | + * @since 0.4 |
| 359 | + * |
| 360 | + * @param array $parameters |
| 361 | + */ |
| 362 | + public function validate( array $parameters ) { |
| 363 | + $this->doValidation( $parameters ); |
| 364 | + } |
| 365 | + |
| 366 | + /** |
| 367 | + * Applies the parameter manipulations. |
| 368 | + * |
| 369 | + * @since 0.4 |
| 370 | + * |
| 371 | + * @param array $parameters |
| 372 | + */ |
| 373 | + public function format( array &$parameters ) { |
| 374 | + if ( $this->applyManipulationsToDefault || !$this->wasSetToDefault() ) { |
| 375 | + foreach ( $this->getManipulations() as $manipulation ) { |
| 376 | + $manipulation->manipulate( $this, $parameters ); |
| 377 | + } |
| 378 | + } |
| 379 | + } |
| 380 | + |
| 381 | + /** |
| 382 | + * Validates the parameter value. |
| 383 | + * Also sets the value to the default when it's not set or invalid, assuming there is a default. |
| 384 | + * |
| 385 | + * @since 0.4 |
| 386 | + * |
| 387 | + * @param array $parameters |
| 388 | + */ |
| 389 | + protected function doValidation( array $parameters ) { |
| 390 | + if ( $this->setCount == 0 ) { |
| 391 | + if ( $this->isRequired() ) { |
| 392 | + // This should not occur, so thorw an exception. |
| 393 | + throw new Exception( 'Attempted to validate a required parameter without first setting a value.' ); |
| 394 | + } |
| 395 | + else { |
| 396 | + $this->setToDefault(); |
| 397 | + } |
| 398 | + } |
| 399 | + else { |
| 400 | + $this->validateCriteria( $parameters ); |
| 401 | + $this->setToDefaultIfNeeded(); |
| 402 | + } |
| 403 | + } |
| 404 | + |
| 405 | + /** |
| 406 | + * Sets the parameter value to the default if needed. |
| 407 | + * |
| 408 | + * @since 0.4 |
| 409 | + */ |
| 410 | + protected function setToDefaultIfNeeded() { |
| 411 | + if ( count( $this->errors ) > 0 && !$this->hasFatalError() ) { |
| 412 | + $this->setToDefault(); |
| 413 | + } |
| 414 | + } |
| 415 | + |
| 416 | + /** |
| 417 | + * Validates the provided value against all criteria. |
| 418 | + * |
| 419 | + * @since 0.4 |
| 420 | + * |
| 421 | + * @param array $parameters |
| 422 | + */ |
| 423 | + protected function validateCriteria( array $parameters ) { |
| 424 | + foreach ( $this->getCriteria() as $criterion ) { |
| 425 | + $validationResult = $criterion->validate( $this, $parameters ); |
| 426 | + |
| 427 | + if ( !$validationResult->isValid() ) { |
| 428 | + $this->handleValidationError( $validationResult ); |
| 429 | + |
| 430 | + if ( !self::$accumulateParameterErrors || $this->hasFatalError() ) { |
| 431 | + break; |
| 432 | + } |
| 433 | + } |
| 434 | + } |
| 435 | + } |
| 436 | + |
| 437 | + /** |
| 438 | + * Handles any validation errors that occurred for a single criterion. |
| 439 | + * |
| 440 | + * @since 0.4 |
| 441 | + * |
| 442 | + * @param CriterionValidationResult $validationResult |
| 443 | + */ |
| 444 | + protected function handleValidationError( CriterionValidationResult $validationResult ) { |
| 445 | + foreach ( $validationResult->getErrors() as $error ) { |
| 446 | + $error->addTags( $this->getName() ); |
| 447 | + $this->errors[] = $error; |
| 448 | + } |
| 449 | + } |
| 450 | + |
| 451 | + /** |
| 452 | + * Returns the parameters main name. |
| 453 | + * |
| 454 | + * @since 0.4 |
| 455 | + * |
| 456 | + * @return string |
| 457 | + */ |
| 458 | + public function getName() { |
| 459 | + return $this->name; |
| 460 | + } |
| 461 | + |
| 462 | + /** |
| 463 | + * Returns the parameters value. |
| 464 | + * |
| 465 | + * @since 0.4 |
| 466 | + * |
| 467 | + * @return string |
| 468 | + */ |
| 469 | + public function &getValue() { |
| 470 | + return $this->value; |
| 471 | + } |
| 472 | + |
| 473 | + /** |
| 474 | + * Returns the type of the parameter. |
| 475 | + * |
| 476 | + * @since 0.4.3 |
| 477 | + * |
| 478 | + * @return string element of the Parameter::TYPE_ enum |
| 479 | + */ |
| 480 | + public function getType() { |
| 481 | + return $this->type; |
| 482 | + } |
| 483 | + |
| 484 | + /** |
| 485 | + * Returns an internationalized message indicating the parameter type suited for display to users. |
| 486 | + * |
| 487 | + * @since 0.4.3 |
| 488 | + * |
| 489 | + * @return string |
| 490 | + */ |
| 491 | + public function getTypeMessage() { |
| 492 | + global $wgLang; |
| 493 | + |
| 494 | + $message = wfMsg( 'validator-type-' . $this->type ); |
| 495 | + return $this->isList() ? |
| 496 | + wfMsgExt( 'validator-describe-listtype', 'parsemag', $message ) |
| 497 | + : $wgLang->ucfirst( $message ); |
| 498 | + } |
| 499 | + |
| 500 | + /** |
| 501 | + * Returns a list of dependencies the parameter has, in the form of |
| 502 | + * other parameter names. |
| 503 | + * |
| 504 | + * @since 0.4 |
| 505 | + * |
| 506 | + * @return array |
| 507 | + */ |
| 508 | + public function getDependencies() { |
| 509 | + return $this->dependencies; |
| 510 | + } |
| 511 | + |
| 512 | + /** |
| 513 | + * Returns the original use-provided name. |
| 514 | + * |
| 515 | + * @since 0.4 |
| 516 | + * |
| 517 | + * @return string |
| 518 | + */ |
| 519 | + public function getOriginalName() { |
| 520 | + if ( $this->setCount == 0 ) { |
| 521 | + throw new Exception( 'No user imput set to the parameter yet, so the original name does not exist' ); |
| 522 | + } |
| 523 | + return $this->originalName; |
| 524 | + } |
| 525 | + |
| 526 | + /** |
| 527 | + * Returns the original use-provided value. |
| 528 | + * |
| 529 | + * @since 0.4 |
| 530 | + * |
| 531 | + * @return string |
| 532 | + */ |
| 533 | + public function getOriginalValue() { |
| 534 | + if ( $this->setCount == 0 ) { |
| 535 | + throw new Exception( 'No user imput set to the parameter yet, so the original value does not exist' ); |
| 536 | + } |
| 537 | + return $this->originalValue; |
| 538 | + } |
| 539 | + |
| 540 | + /** |
| 541 | + * Returns all validation errors that occurred so far. |
| 542 | + * |
| 543 | + * @since 0.4 |
| 544 | + * |
| 545 | + * @return array of ValidationError |
| 546 | + */ |
| 547 | + public function getErrors() { |
| 548 | + return $this->errors; |
| 549 | + } |
| 550 | + |
| 551 | + /** |
| 552 | + * Returns if the parameter is a required one or not. |
| 553 | + * |
| 554 | + * @since 0.4 |
| 555 | + * |
| 556 | + * @return boolean |
| 557 | + */ |
| 558 | + public function isRequired() { |
| 559 | + return is_null( $this->default ); |
| 560 | + } |
| 561 | + |
| 562 | + /** |
| 563 | + * Returns if the parameter is a list or not. |
| 564 | + * |
| 565 | + * @since 0.4 |
| 566 | + * |
| 567 | + * @return boolean |
| 568 | + */ |
| 569 | + public function isList() { |
| 570 | + return false; |
| 571 | + } |
| 572 | + |
| 573 | + /** |
| 574 | + * Returns the parameter criteria. |
| 575 | + * |
| 576 | + * @since 0.4 |
| 577 | + * |
| 578 | + * @return array of ParameterCriterion |
| 579 | + */ |
| 580 | + public function getCriteria() { |
| 581 | + return array_merge( $this->getCriteriaForType(), $this->criteria ); |
| 582 | + } |
| 583 | + |
| 584 | + /** |
| 585 | + * Returns the parameter manipulations. |
| 586 | + * |
| 587 | + * @since 0.4 |
| 588 | + * |
| 589 | + * @return array of ParameterManipulation |
| 590 | + */ |
| 591 | + public function getManipulations() { |
| 592 | + return array_merge( $this->getManipulationsForType(), $this->manipulations ); |
| 593 | + } |
| 594 | + |
| 595 | + /** |
| 596 | + * Gets the criteria for the type of the parameter. |
| 597 | + * |
| 598 | + * @since 0.4 |
| 599 | + * |
| 600 | + * @return array |
| 601 | + */ |
| 602 | + protected function getCriteriaForType() { |
| 603 | + $criteria = array(); |
| 604 | + |
| 605 | + switch( $this->type ) { |
| 606 | + case self::TYPE_INTEGER: |
| 607 | + $criteria[] = new CriterionIsInteger(); |
| 608 | + break; |
| 609 | + case self::TYPE_FLOAT: |
| 610 | + $criteria[] = new CriterionIsFloat(); |
| 611 | + break; |
| 612 | + case self::TYPE_NUMBER: // Note: This accepts non-decimal notations! |
| 613 | + $criteria[] = new CriterionIsNumeric(); |
| 614 | + break; |
| 615 | + case self::TYPE_BOOLEAN: |
| 616 | + // TODO: work with list of true and false values and i18n. |
| 617 | + $criteria[] = new CriterionInArray( 'yes', 'no', 'on', 'off' ); |
| 618 | + break; |
| 619 | + case self::TYPE_CHAR: |
| 620 | + $criteria[] = new CriterionHasLength( 1, 1 ); |
| 621 | + break; |
| 622 | + case self::TYPE_STRING: default: |
| 623 | + // No extra criteria for strings. |
| 624 | + break; |
| 625 | + } |
| 626 | + |
| 627 | + return $criteria; |
| 628 | + } |
| 629 | + |
| 630 | + /** |
| 631 | + * Gets the manipulation for the type of the parameter. |
| 632 | + * |
| 633 | + * @since 0.4 |
| 634 | + * |
| 635 | + * @return array |
| 636 | + */ |
| 637 | + protected function getManipulationsForType() { |
| 638 | + $manipulations = array(); |
| 639 | + |
| 640 | + switch( $this->type ) { |
| 641 | + case self::TYPE_INTEGER: |
| 642 | + $manipulations[] = new ParamManipulationInteger(); |
| 643 | + break; |
| 644 | + case self::TYPE_FLOAT: case self::TYPE_NUMBER: |
| 645 | + $manipulations[] = new ParamManipulationFloat(); |
| 646 | + break; |
| 647 | + case self::TYPE_BOOLEAN: |
| 648 | + $manipulations[] = new ParamManipulationBoolean(); |
| 649 | + break; |
| 650 | + case self::TYPE_CHAR: case self::TYPE_STRING: default: |
| 651 | + $manipulations[] = new ParamManipulationString(); |
| 652 | + break; |
| 653 | + } |
| 654 | + |
| 655 | + return $manipulations; |
| 656 | + } |
| 657 | + |
| 658 | + /** |
| 659 | + * Sets the parameter value to the default. |
| 660 | + * |
| 661 | + * @since 0.4 |
| 662 | + */ |
| 663 | + protected function setToDefault() { |
| 664 | + $this->defaulted = true; |
| 665 | + $this->value = $this->default; |
| 666 | + } |
| 667 | + |
| 668 | + /** |
| 669 | + * Gets if the parameter was set to it's default. |
| 670 | + * |
| 671 | + * @since 0.4 |
| 672 | + * |
| 673 | + * @return boolean |
| 674 | + */ |
| 675 | + public function wasSetToDefault() { |
| 676 | + return $this->defaulted; |
| 677 | + } |
| 678 | + |
| 679 | + /** |
| 680 | + * Returns the criteria that apply to the list as a whole. |
| 681 | + * |
| 682 | + * @since 0.4 |
| 683 | + * |
| 684 | + * @return array |
| 685 | + */ |
| 686 | + public function getListCriteria() { |
| 687 | + return array(); |
| 688 | + } |
| 689 | + |
| 690 | + /** |
| 691 | + * Returns the parameter name aliases. |
| 692 | + * |
| 693 | + * @since 0.4 |
| 694 | + * |
| 695 | + * @return array |
| 696 | + */ |
| 697 | + public function getAliases() { |
| 698 | + return $this->aliases; |
| 699 | + } |
| 700 | + |
| 701 | + /** |
| 702 | + * Returns if the parameter has a certain alias. |
| 703 | + * |
| 704 | + * @since 0.4 |
| 705 | + * |
| 706 | + * @param string $alias |
| 707 | + * |
| 708 | + * @return boolean |
| 709 | + */ |
| 710 | + public function hasAlias( $alias ) { |
| 711 | + return in_array( $alias, $this->getAliases() ); |
| 712 | + } |
| 713 | + |
| 714 | + /** |
| 715 | + * Returns if the parameter has a certain dependency. |
| 716 | + * |
| 717 | + * @since 0.4 |
| 718 | + * |
| 719 | + * @param string $dependency |
| 720 | + * |
| 721 | + * @return boolean |
| 722 | + */ |
| 723 | + public function hasDependency( $dependency ) { |
| 724 | + return in_array( $dependency, $this->getDependencies() ); |
| 725 | + } |
| 726 | + |
| 727 | + /** |
| 728 | + * Sets the default parameter value. Null indicates no default, |
| 729 | + * and therefore makes the parameter required. |
| 730 | + * |
| 731 | + * @since 0.4 |
| 732 | + * |
| 733 | + * @param mixed $default |
| 734 | + * @param boolean $manipulate Should the default be manipulated or not? Since 0.4.6. |
| 735 | + */ |
| 736 | + public function setDefault( $default, $manipulate = true ) { |
| 737 | + $this->default = $default; |
| 738 | + $this->setDoManipulationOfDefault( $manipulate ); |
| 739 | + } |
| 740 | + |
| 741 | + /** |
| 742 | + * Returns the default value. |
| 743 | + * |
| 744 | + * @since 0.4.3 |
| 745 | + * |
| 746 | + * @return mixed |
| 747 | + */ |
| 748 | + public function getDefault() { |
| 749 | + return $this->default; |
| 750 | + } |
| 751 | + |
| 752 | + /** |
| 753 | + * Set if the parameter manipulations should be applied to the default value. |
| 754 | + * |
| 755 | + * @since 0.4 |
| 756 | + * |
| 757 | + * @param boolean $doOrDoNot |
| 758 | + */ |
| 759 | + public function setDoManipulationOfDefault( $doOrDoNot ) { |
| 760 | + $this->applyManipulationsToDefault = $doOrDoNot; |
| 761 | + } |
| 762 | + |
| 763 | + /** |
| 764 | + * Returns false when there are no fatal errors or an ValidationError when one is found. |
| 765 | + * |
| 766 | + * @return mixed false or ValidationError |
| 767 | + */ |
| 768 | + public function hasFatalError() { |
| 769 | + foreach ( $this->errors as $error ) { |
| 770 | + if ( $error->isFatal() ) { |
| 771 | + return true; |
| 772 | + } |
| 773 | + } |
| 774 | + |
| 775 | + return false; |
| 776 | + } |
| 777 | + |
| 778 | + /** |
| 779 | + * Returns a description message for the parameter, or false when there is none. |
| 780 | + * Override in deriving classes to add a message. |
| 781 | + * |
| 782 | + * @since 0.4.3 |
| 783 | + * |
| 784 | + * @return mixed string or false |
| 785 | + */ |
| 786 | + public function getDescription() { |
| 787 | + return $this->description; |
| 788 | + } |
| 789 | + |
| 790 | + /** |
| 791 | + * Sets a description message for the parameter. |
| 792 | + * |
| 793 | + * @since 0.4.3 |
| 794 | + * |
| 795 | + * @param string $descriptionMessage |
| 796 | + */ |
| 797 | + public function setDescription( $descriptionMessage ) { |
| 798 | + $this->description = $descriptionMessage; |
| 799 | + } |
| 800 | + |
| 801 | + /** |
| 802 | + * Returns a message that will act as a description message for the parameter, or false when there is none. |
| 803 | + * Override in deriving classes to add a message. |
| 804 | + * |
| 805 | + * @since 0.4.9 |
| 806 | + * |
| 807 | + * @return mixed string or false |
| 808 | + */ |
| 809 | + public function getMessage() { |
| 810 | + return $this->message; |
| 811 | + } |
| 812 | + |
| 813 | + /** |
| 814 | + * Sets a message for the parameter that will act as description. |
| 815 | + * |
| 816 | + * @since 0.4.9 |
| 817 | + * |
| 818 | + * @param string $message |
| 819 | + */ |
| 820 | + public function setMessage( $message ) { |
| 821 | + $this->message = $message; |
| 822 | + } |
| 823 | + |
| 824 | +} |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/Parameter.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 825 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/TopologicalSort.php |
— | — | @@ -0,0 +1,163 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Sorts a series of dependency pairs in linear order. |
| 6 | + * |
| 7 | + * Based on http://blog.metafoundry.com/2007/09/topological-sort-in-php.html |
| 8 | + * |
| 9 | + * usage: |
| 10 | + * $t = new TopologicalSort($dependency_pairs); |
| 11 | + * $load_order = $t->doSort(); |
| 12 | + * |
| 13 | + * where dependency_pairs is in the form: |
| 14 | + * $name => (depends on) $value |
| 15 | + * |
| 16 | + * @author Eddie Haber |
| 17 | + * @author Jeroen De Dauw |
| 18 | + * |
| 19 | + * TODO: fix conventions further |
| 20 | + * TODO: include/load class |
| 21 | + * TODO: Use in revised version of Validator class |
| 22 | + */ |
| 23 | +class TopologicalSort { |
| 24 | + |
| 25 | + private $mNodes = array(); |
| 26 | + private $mNodeNames = array(); |
| 27 | + |
| 28 | + /** |
| 29 | + * Dependency pairs are a list of arrays in the form |
| 30 | + * $name => $val where $key must come before $val in load order. |
| 31 | + */ |
| 32 | + function __construct( $dependencies = array(), $parse = true ) { |
| 33 | + $this->mNodeNames = array_keys( $dependencies ); |
| 34 | + |
| 35 | + if ( $parse ) { |
| 36 | + $dependencies = $this->parseDependencyList( $dependencies ); |
| 37 | + } |
| 38 | + |
| 39 | + // turn pairs into double-linked node tree |
| 40 | + foreach ( $dependencies as $dpair ) { |
| 41 | + list ( $module, $dependency ) = each ( $dpair ); |
| 42 | + if ( !isset( $this->mNodes[$module] ) ) $this->mNodes[$module] = new TSNode( $module ); |
| 43 | + if ( !isset( $this->mNodes[$dependency] ) ) $this->mNodes[$dependency] = new TSNode( $dependency ); |
| 44 | + if ( !in_array( $dependency, $this->mNodes[$module]->children ) ) $this->mNodes[$module]->children[] = $dependency; |
| 45 | + if ( !in_array( $module, $this->mNodes[$dependency]->parents ) ) $this->mNodes[$dependency]->parents[] = $module; |
| 46 | + } |
| 47 | + } |
| 48 | + |
| 49 | + /** |
| 50 | + * Perform Topological Sort. |
| 51 | + * |
| 52 | + * @return sorted array |
| 53 | + */ |
| 54 | + public function doSort() { |
| 55 | + $nodes = $this->mNodes; |
| 56 | + |
| 57 | + // get nodes without parents |
| 58 | + $root_nodes = array_values( $this->getRootNodes( $nodes ) ); |
| 59 | + |
| 60 | + // begin algorithm |
| 61 | + $sorted = array(); |
| 62 | + while ( count( $nodes ) > 0 ) { |
| 63 | + // check for circular reference |
| 64 | + if ( count( $root_nodes ) == 0 ) return false; |
| 65 | + |
| 66 | + |
| 67 | + // remove this node from root_nodes |
| 68 | + // and add it to the output |
| 69 | + $n = array_pop( $root_nodes ); |
| 70 | + $sorted[] = $n->name; |
| 71 | + |
| 72 | + // for each of its children |
| 73 | + // queue the new node finally remove the original |
| 74 | + for ( $i = count( $n->children ) - 1; $i >= 0; $i -- ) { |
| 75 | + $childnode = $n->children[$i]; |
| 76 | + // remove the link from this node to its |
| 77 | + // children ($nodes[$n->name]->children[$i]) AND |
| 78 | + // remove the link from each child to this |
| 79 | + // parent ($nodes[$childnode]->parents[?]) THEN |
| 80 | + // remove this child from this node |
| 81 | + unset( $nodes[$n->name]->children[$i] ); |
| 82 | + $parent_position = array_search ( $n->name, $nodes[$childnode]->parents ); |
| 83 | + unset( $nodes[$childnode]->parents[$parent_position] ); |
| 84 | + // check if this child has other parents |
| 85 | + // if not, add it to the root nodes list |
| 86 | + if ( !count( $nodes[$childnode]->parents ) ) { |
| 87 | + array_push( $root_nodes, $nodes [$childnode] ); |
| 88 | + } |
| 89 | + } |
| 90 | + |
| 91 | + // nodes.Remove(n); |
| 92 | + unset( $nodes[$n->name] ); |
| 93 | + } |
| 94 | + |
| 95 | + $looseNodes = array(); |
| 96 | + |
| 97 | + // Return the result with the loose nodes (items with no dependencies) appended. |
| 98 | + foreach( $this->mNodeNames as $name ) { |
| 99 | + if ( !in_array( $name, $sorted ) ) { |
| 100 | + $looseNodes[] = $name; |
| 101 | + } |
| 102 | + } |
| 103 | + |
| 104 | + return array_merge( $sorted, $looseNodes ); |
| 105 | + } |
| 106 | + |
| 107 | + /** |
| 108 | + * Returns a list of node objects that do not have parents |
| 109 | + * |
| 110 | + * @param array $nodes array of node objects |
| 111 | + * |
| 112 | + * @return array of node objects |
| 113 | + */ |
| 114 | + private function getRootNodes( array $nodes ) { |
| 115 | + $output = array (); |
| 116 | + |
| 117 | + foreach ( $nodes as $name => $node ) { |
| 118 | + if ( !count ( $node->parents ) ) { |
| 119 | + $output[$name] = $node; |
| 120 | + } |
| 121 | + } |
| 122 | + |
| 123 | + return $output; |
| 124 | + } |
| 125 | + |
| 126 | + /** |
| 127 | + * Parses an array of dependencies into an array of dependency pairs |
| 128 | + * |
| 129 | + * The array of dependencies would be in the form: |
| 130 | + * $dependency_list = array( |
| 131 | + * "name" => array("dependency1","dependency2","dependency3"), |
| 132 | + * "name2" => array("dependencyA","dependencyB","dependencyC"), |
| 133 | + * ...etc |
| 134 | + * ); |
| 135 | + * |
| 136 | + * @param array $dlist Array of dependency pairs for use as parameter in doSort method |
| 137 | + * |
| 138 | + * @return array |
| 139 | + */ |
| 140 | + private function parseDependencyList( array $dlist = array() ) { |
| 141 | + $output = array(); |
| 142 | + |
| 143 | + foreach ( $dlist as $name => $dependencies ) { |
| 144 | + foreach ( $dependencies as $d ) { |
| 145 | + array_push ( $output, array ( $d => $name ) ); |
| 146 | + } |
| 147 | + } |
| 148 | + |
| 149 | + return $output; |
| 150 | + } |
| 151 | +} |
| 152 | + |
| 153 | +/** |
| 154 | + * Node class for Topological Sort Class |
| 155 | + */ |
| 156 | +class TSNode { |
| 157 | + public $name; |
| 158 | + public $children = array(); |
| 159 | + public $parents = array(); |
| 160 | + |
| 161 | + public function TSNode( $name = '' ) { |
| 162 | + $this->name = $name; |
| 163 | + } |
| 164 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/TopologicalSort.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 165 | + native |
Index: tags/extensions/Validator/REL_0_4_10/includes/Validator.php |
— | — | @@ -0,0 +1,463 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Class for parameter validation of a single parser hook or other parametrized construct. |
| 6 | + * |
| 7 | + * @since 0.1 |
| 8 | + * |
| 9 | + * @file Validator.php |
| 10 | + * @ingroup Validator |
| 11 | + * |
| 12 | + * @licence GNU GPL v3 or later |
| 13 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 14 | + */ |
| 15 | +class Validator { |
| 16 | + |
| 17 | + /** |
| 18 | + * Array containing the parameters. |
| 19 | + * |
| 20 | + * @since 0.4 |
| 21 | + * |
| 22 | + * @var array of Parameter |
| 23 | + */ |
| 24 | + protected $parameters; |
| 25 | + |
| 26 | + /** |
| 27 | + * Associative array containing parameter names (keys) and their user-provided data (values). |
| 28 | + * This list is needed because additional parameter definitions can be added to the $parameters |
| 29 | + * field during validation, so we can't determine in advance if a parameter is unknown. |
| 30 | + * |
| 31 | + * @since 0.4 |
| 32 | + * |
| 33 | + * @var array of string |
| 34 | + */ |
| 35 | + protected $rawParameters = array(); |
| 36 | + |
| 37 | + /** |
| 38 | + * Array containing the names of the parameters to handle, ordered by priority. |
| 39 | + * |
| 40 | + * @since 0.4 |
| 41 | + * |
| 42 | + * @var array |
| 43 | + */ |
| 44 | + protected $paramsToHandle = array(); |
| 45 | + |
| 46 | + /** |
| 47 | + * List of ValidationError. |
| 48 | + * |
| 49 | + * @since 0.4 |
| 50 | + * |
| 51 | + * @var array |
| 52 | + */ |
| 53 | + protected $errors = array(); |
| 54 | + |
| 55 | + /** |
| 56 | + * Name of the element that's being validated. |
| 57 | + * |
| 58 | + * @since 0.4 |
| 59 | + * |
| 60 | + * @var string |
| 61 | + */ |
| 62 | + protected $element; |
| 63 | + |
| 64 | + /** |
| 65 | + * Indicates if unknown parameters should be seen as invalid. |
| 66 | + * If this value is false, they will simply be ignored. |
| 67 | + * |
| 68 | + * @since 0.4.3 |
| 69 | + * |
| 70 | + * @var boolean |
| 71 | + */ |
| 72 | + protected $unknownInvalid; |
| 73 | + |
| 74 | + /** |
| 75 | + * @var array |
| 76 | + */ |
| 77 | + protected $paramsTohandle; |
| 78 | + |
| 79 | + /** |
| 80 | + * Constructor. |
| 81 | + * |
| 82 | + * @param string $element |
| 83 | + * @param boolean $unknownInvalid Should unknown parameter be regarded as invalid (or, if not, just be ignored) |
| 84 | + * |
| 85 | + * @since 0.4 |
| 86 | + */ |
| 87 | + public function __construct( $element = '', $unknownInvalid = true ) { |
| 88 | + $this->element = $element; |
| 89 | + $this->unknownInvalid = $unknownInvalid; |
| 90 | + } |
| 91 | + |
| 92 | + /** |
| 93 | + * Determines the names and values of all parameters. Also takes care of default parameters. |
| 94 | + * After that the resulting parameter list is passed to Validator::setParameters |
| 95 | + * |
| 96 | + * @since 0.4 |
| 97 | + * |
| 98 | + * @param array $rawParams |
| 99 | + * @param array $parameterInfo |
| 100 | + * @param array $defaultParams |
| 101 | + * @param boolean $toLower Indicates if the parameter values should be put to lower case. Defaults to true. |
| 102 | + */ |
| 103 | + public function setFunctionParams( array $rawParams, array $parameterInfo, array $defaultParams = array(), $toLower = true ) { |
| 104 | + $parameters = array(); |
| 105 | + |
| 106 | + $nr = 0; |
| 107 | + $defaultNr = 0; |
| 108 | + |
| 109 | + foreach ( $rawParams as $arg ) { |
| 110 | + // Only take into account strings. If the value is not a string, |
| 111 | + // it is not a raw parameter, and can not be parsed correctly in all cases. |
| 112 | + if ( is_string( $arg ) ) { |
| 113 | + $parts = explode( '=', $arg, 2 ); |
| 114 | + |
| 115 | + // If there is only one part, no parameter name is provided, so try default parameter assignment. |
| 116 | + if ( count( $parts ) == 1 ) { |
| 117 | + // Default parameter assignment is only possible when there are default parameters! |
| 118 | + if ( count( $defaultParams ) > 0 ) { |
| 119 | + $defaultParam = strtolower( array_shift( $defaultParams ) ); |
| 120 | + |
| 121 | + $parameters[$defaultParam] = array( |
| 122 | + 'original-value' => trim( $parts[0] ), |
| 123 | + 'default' => $defaultNr, |
| 124 | + 'position' => $nr |
| 125 | + ); |
| 126 | + $defaultNr++; |
| 127 | + } |
| 128 | + else { |
| 129 | + // It might be nice to have some sort of warning or error here, as the value is simply ignored. |
| 130 | + } |
| 131 | + } else { |
| 132 | + $paramName = trim( strtolower( $parts[0] ) ); |
| 133 | + |
| 134 | + $parameters[$paramName] = array( |
| 135 | + 'original-value' => trim( $parts[1] ), |
| 136 | + 'default' => false, |
| 137 | + 'position' => $nr |
| 138 | + ); |
| 139 | + |
| 140 | + // Let's not be evil, and remove the used parameter name from the default parameter list. |
| 141 | + // This code is basically a remove array element by value algorithm. |
| 142 | + $newDefaults = array(); |
| 143 | + |
| 144 | + foreach( $defaultParams as $defaultParam ) { |
| 145 | + if ( $defaultParam != $paramName ) $newDefaults[] = $defaultParam; |
| 146 | + } |
| 147 | + |
| 148 | + $defaultParams = $newDefaults; |
| 149 | + } |
| 150 | + } |
| 151 | + |
| 152 | + $nr++; |
| 153 | + } |
| 154 | + |
| 155 | + $this->setParameters( $parameters, $parameterInfo, false ); |
| 156 | + } |
| 157 | + |
| 158 | + /** |
| 159 | + * Loops through a list of provided parameters, resolves aliasing and stores errors |
| 160 | + * for unknown parameters and optionally for parameter overriding. |
| 161 | + * |
| 162 | + * @param array $parameters Parameter name as key, parameter value as value |
| 163 | + * @param array $parameterInfo Main parameter name as key, parameter meta data as value |
| 164 | + * @param boolean $toLower Indicates if the parameter values should be put to lower case. Defaults to true. |
| 165 | + */ |
| 166 | + public function setParameters( array $parameters, array $parameterInfo, $toLower = true ) { |
| 167 | + $this->cleanParameterInfo( $parameterInfo ); |
| 168 | + |
| 169 | + $this->parameters = $parameterInfo; |
| 170 | + |
| 171 | + // Loop through all the user provided parameters, and distinguish between those that are allowed and those that are not. |
| 172 | + foreach ( $parameters as $paramName => $paramData ) { |
| 173 | + $paramName = trim( strtolower( $paramName ) ); |
| 174 | + $paramValue = is_array( $paramData ) ? $paramData['original-value'] : trim( $paramData ); |
| 175 | + |
| 176 | + $this->rawParameters[$paramName] = $paramValue; |
| 177 | + } |
| 178 | + } |
| 179 | + |
| 180 | + /** |
| 181 | + * Registers an error. |
| 182 | + * |
| 183 | + * @since 0.4 |
| 184 | + * |
| 185 | + * @param string $message |
| 186 | + * @param mixed $tags string or array |
| 187 | + * @param integer $severity |
| 188 | + */ |
| 189 | + protected function registerNewError( $message, $tags = array(), $severity = ValidationError::SEVERITY_NORMAL ) { |
| 190 | + $this->registerError( |
| 191 | + new ValidationError( |
| 192 | + $message, |
| 193 | + $severity, |
| 194 | + $this->element, |
| 195 | + (array)$tags |
| 196 | + ) |
| 197 | + ); |
| 198 | + } |
| 199 | + |
| 200 | + /** |
| 201 | + * Registers an error. |
| 202 | + * |
| 203 | + * @since 0.4 |
| 204 | + * |
| 205 | + * @param ValidationError $error |
| 206 | + */ |
| 207 | + protected function registerError( ValidationError $error ) { |
| 208 | + $error->element = $this->element; |
| 209 | + $this->errors[] = $error; |
| 210 | + ValidationErrorHandler::addError( $error ); |
| 211 | + } |
| 212 | + |
| 213 | + /** |
| 214 | + * Ensures all elements of the array are Parameter objects, |
| 215 | + * and that the array keys match the main parameter name. |
| 216 | + * |
| 217 | + * @since 0.4 |
| 218 | + * |
| 219 | + * @param array $paramInfo |
| 220 | + */ |
| 221 | + protected function cleanParameterInfo( array &$paramInfo ) { |
| 222 | + $cleanedList = array(); |
| 223 | + |
| 224 | + foreach ( $paramInfo as $key => $parameter ) { |
| 225 | + if ( $parameter instanceof Parameter ) { |
| 226 | + $cleanedList[$parameter->getName()] = $parameter; |
| 227 | + } |
| 228 | + else { |
| 229 | + throw new Exception( "$key is not a valid Parameter." ); |
| 230 | + } |
| 231 | + } |
| 232 | + |
| 233 | + $paramInfo = $cleanedList; |
| 234 | + } |
| 235 | + |
| 236 | + /** |
| 237 | + * Validates and formats all the parameters (but aborts when a fatal error occurs). |
| 238 | + * |
| 239 | + * @since 0.4 |
| 240 | + */ |
| 241 | + public function validateParameters() { |
| 242 | + $this->doParamProcessing(); |
| 243 | + |
| 244 | + if ( !$this->hasFatalError() && $this->unknownInvalid ) { |
| 245 | + // Loop over the remaining raw parameters. |
| 246 | + // These are unrecognized parameters, as they where not used by any parameter definition. |
| 247 | + foreach ( $this->rawParameters as $paramName => $paramValue ) { |
| 248 | + $this->registerNewError( |
| 249 | + wfMsgExt( 'validator_error_unknown_argument', 'parsemag', $paramName ), |
| 250 | + $paramName |
| 251 | + ); |
| 252 | + } |
| 253 | + } |
| 254 | + } |
| 255 | + |
| 256 | + /** |
| 257 | + * Does the actual parameter processing. |
| 258 | + * |
| 259 | + * @since 0.4 |
| 260 | + */ |
| 261 | + protected function doParamProcessing() { |
| 262 | + $this->getParamsToProcess( array(), $this->parameters ); |
| 263 | + |
| 264 | + while ( $paramName = array_shift( $this->paramsTohandle ) ) { |
| 265 | + $parameter = $this->parameters[$paramName]; |
| 266 | + |
| 267 | + $setUservalue = $this->attemptToSetUserValue( $parameter ); |
| 268 | + |
| 269 | + // If the parameter is required but not provided, register a fatal error and stop processing. |
| 270 | + if ( !$setUservalue && $parameter->isRequired() ) { |
| 271 | + $this->registerNewError( |
| 272 | + wfMsgExt( 'validator_error_required_missing', 'parsemag', $paramName ), |
| 273 | + array( $paramName, 'missing' ), |
| 274 | + ValidationError::SEVERITY_FATAL |
| 275 | + ); |
| 276 | + break; |
| 277 | + } |
| 278 | + else { |
| 279 | + $parameter->validate( $this->parameters ); |
| 280 | + |
| 281 | + foreach ( $parameter->getErrors() as $error ) { |
| 282 | + $this->registerError( $error ); |
| 283 | + } |
| 284 | + |
| 285 | + if ( $parameter->hasFatalError() ) { |
| 286 | + // If there was a fatal error, and the parameter is required, stop processing. |
| 287 | + break; |
| 288 | + } |
| 289 | + |
| 290 | + $initialSet = $this->parameters; |
| 291 | + |
| 292 | + $parameter->format( $this->parameters ); |
| 293 | + |
| 294 | + $this->getParamsToProcess( $initialSet, $this->parameters ); |
| 295 | + } |
| 296 | + } |
| 297 | + } |
| 298 | + |
| 299 | + /** |
| 300 | + * Gets an ordered list of parameters to process. |
| 301 | + * |
| 302 | + * @since 0.4 |
| 303 | + * |
| 304 | + * @param array $initialParamSet |
| 305 | + * @param array $resultingParamSet |
| 306 | + */ |
| 307 | + protected function getParamsToProcess( array $initialParamSet, array $resultingParamSet ) { |
| 308 | + if ( count( $initialParamSet ) == 0 ) { |
| 309 | + $this->paramsTohandle = array_keys( $resultingParamSet ); |
| 310 | + } |
| 311 | + else { |
| 312 | + if ( !is_array( $this->paramsTohandle ) ) { |
| 313 | + $this->paramsTohandle = array(); |
| 314 | + } |
| 315 | + |
| 316 | + foreach ( $resultingParamSet as $paramName => $parameter ) { |
| 317 | + if ( !array_key_exists( $paramName, $initialParamSet ) ) { |
| 318 | + $this->paramsTohandle[] = $paramName; |
| 319 | + } |
| 320 | + } |
| 321 | + } |
| 322 | + |
| 323 | + $dependencyList = array(); |
| 324 | + |
| 325 | + // Loop over the parameters to handle to create a dependency list. |
| 326 | + foreach ( $this->paramsTohandle as $paramName ) { |
| 327 | + $dependencies = array(); |
| 328 | + |
| 329 | + // Only include dependencies that are in the list of parameters to handle. |
| 330 | + foreach ( $this->parameters[$paramName]->getDependencies() as $dependency ) { |
| 331 | + if ( in_array( $dependency, $this->paramsTohandle ) ) { |
| 332 | + $dependencies[] = $dependency; |
| 333 | + } |
| 334 | + } |
| 335 | + |
| 336 | + $dependencyList[$paramName] = $dependencies; |
| 337 | + } |
| 338 | + |
| 339 | + $sorter = new TopologicalSort( $dependencyList, true ); |
| 340 | + |
| 341 | + $this->paramsTohandle = $sorter->doSort(); |
| 342 | + } |
| 343 | + |
| 344 | + /** |
| 345 | + * Tries to find a matching user provided value and, when found, assigns it |
| 346 | + * to the parameter, and removes it from the raw values. Returns a boolean |
| 347 | + * indicating if there was any user value set or not. |
| 348 | + * |
| 349 | + * @since 0.4 |
| 350 | + * |
| 351 | + * @return boolean |
| 352 | + */ |
| 353 | + protected function attemptToSetUserValue( Parameter $parameter ) { |
| 354 | + if ( array_key_exists( $parameter->getName(), $this->rawParameters ) ) { |
| 355 | + $parameter->setUserValue( $parameter->getName(), $this->rawParameters[$parameter->getName()] ); |
| 356 | + unset( $this->rawParameters[$parameter->getName()] ); |
| 357 | + return true; |
| 358 | + } |
| 359 | + else { |
| 360 | + foreach ( $parameter->getAliases() as $alias ) { |
| 361 | + if ( array_key_exists( $alias, $this->rawParameters ) ) { |
| 362 | + $parameter->setUserValue( $alias, $this->rawParameters[$alias] ); |
| 363 | + unset( $this->rawParameters[$alias] ); |
| 364 | + return true; |
| 365 | + } |
| 366 | + } |
| 367 | + } |
| 368 | + |
| 369 | + return false; |
| 370 | + } |
| 371 | + |
| 372 | + /** |
| 373 | + * Returns the parameters. |
| 374 | + * |
| 375 | + * @since 0.4 |
| 376 | + * |
| 377 | + * @return array |
| 378 | + */ |
| 379 | + public function getParameters() { |
| 380 | + return $this->parameters; |
| 381 | + } |
| 382 | + |
| 383 | + /** |
| 384 | + * Returns a single parameter. |
| 385 | + * |
| 386 | + * @since 0.4 |
| 387 | + * |
| 388 | + * @param string $parameterName The name of the parameter to return |
| 389 | + * |
| 390 | + * @return Parameter |
| 391 | + */ |
| 392 | + public function getParameter( $parameterName ) { |
| 393 | + return $this->parameters[$parameterName]; |
| 394 | + } |
| 395 | + |
| 396 | + /** |
| 397 | + * Returns an associative array with the parameter names as key and their |
| 398 | + * corresponding values as value. |
| 399 | + * |
| 400 | + * @since 0.4 |
| 401 | + * |
| 402 | + * @return array |
| 403 | + */ |
| 404 | + public function getParameterValues() { |
| 405 | + $parameters = array(); |
| 406 | + |
| 407 | + foreach ( $this->parameters as $parameter ) { |
| 408 | + $parameters[$parameter->getName()] = $parameter->getValue(); |
| 409 | + } |
| 410 | + |
| 411 | + return $parameters; |
| 412 | + } |
| 413 | + |
| 414 | + /** |
| 415 | + * Returns the errors. |
| 416 | + * |
| 417 | + * @since 0.4 |
| 418 | + * |
| 419 | + * @return array of ValidationError |
| 420 | + */ |
| 421 | + public function getErrors() { |
| 422 | + return $this->errors; |
| 423 | + } |
| 424 | + |
| 425 | + /** |
| 426 | + * @since 0.4.6 |
| 427 | + * |
| 428 | + * @return array of string |
| 429 | + */ |
| 430 | + public function getErrorMessages() { |
| 431 | + $errors = array(); |
| 432 | + |
| 433 | + foreach ( $this->errors as $error ) { |
| 434 | + $errors[] = $error->getMessage(); |
| 435 | + } |
| 436 | + |
| 437 | + return $errors; |
| 438 | + } |
| 439 | + |
| 440 | + /** |
| 441 | + * Returns if there where any errors during validation. |
| 442 | + * |
| 443 | + * @return boolean |
| 444 | + */ |
| 445 | + public function hasErrors() { |
| 446 | + return count( $this->errors ) > 0; |
| 447 | + } |
| 448 | + |
| 449 | + /** |
| 450 | + * Returns false when there are no fatal errors or an ValidationError when one is found. |
| 451 | + * |
| 452 | + * @return mixed false or ValidationError |
| 453 | + */ |
| 454 | + public function hasFatalError() { |
| 455 | + foreach ( $this->errors as $error ) { |
| 456 | + if ( $error->isFatal() ) { |
| 457 | + return $error; |
| 458 | + } |
| 459 | + } |
| 460 | + |
| 461 | + return false; |
| 462 | + } |
| 463 | + |
| 464 | +} |
Property changes on: tags/extensions/Validator/REL_0_4_10/includes/Validator.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 465 | + native |
Index: tags/extensions/Validator/REL_0_4_10/COPYING |
— | — | @@ -0,0 +1,682 @@ |
| 2 | +The license text below "----" applies to all files within this distribution, other |
| 3 | +than those that are in a directory which contains files named "LICENSE" or |
| 4 | +"COPYING", or a subdirectory thereof. For those files, the license text contained in |
| 5 | +said file overrides any license information contained in directories of smaller depth. |
| 6 | +Alternative licenses are typically used for software that is provided by external |
| 7 | +parties, and merely packaged with this software for convenience. |
| 8 | +---- |
| 9 | + |
| 10 | + GNU GENERAL PUBLIC LICENSE |
| 11 | + Version 3, 29 June 2007 |
| 12 | + |
| 13 | + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> |
| 14 | + Everyone is permitted to copy and distribute verbatim copies |
| 15 | + of this license document, but changing it is not allowed. |
| 16 | + |
| 17 | + Preamble |
| 18 | + |
| 19 | + The GNU General Public License is a free, copyleft license for |
| 20 | +software and other kinds of works. |
| 21 | + |
| 22 | + The licenses for most software and other practical works are designed |
| 23 | +to take away your freedom to share and change the works. By contrast, |
| 24 | +the GNU General Public License is intended to guarantee your freedom to |
| 25 | +share and change all versions of a program--to make sure it remains free |
| 26 | +software for all its users. We, the Free Software Foundation, use the |
| 27 | +GNU General Public License for most of our software; it applies also to |
| 28 | +any other work released this way by its authors. You can apply it to |
| 29 | +your programs, too. |
| 30 | + |
| 31 | + When we speak of free software, we are referring to freedom, not |
| 32 | +price. Our General Public Licenses are designed to make sure that you |
| 33 | +have the freedom to distribute copies of free software (and charge for |
| 34 | +them if you wish), that you receive source code or can get it if you |
| 35 | +want it, that you can change the software or use pieces of it in new |
| 36 | +free programs, and that you know you can do these things. |
| 37 | + |
| 38 | + To protect your rights, we need to prevent others from denying you |
| 39 | +these rights or asking you to surrender the rights. Therefore, you have |
| 40 | +certain responsibilities if you distribute copies of the software, or if |
| 41 | +you modify it: responsibilities to respect the freedom of others. |
| 42 | + |
| 43 | + For example, if you distribute copies of such a program, whether |
| 44 | +gratis or for a fee, you must pass on to the recipients the same |
| 45 | +freedoms that you received. You must make sure that they, too, receive |
| 46 | +or can get the source code. And you must show them these terms so they |
| 47 | +know their rights. |
| 48 | + |
| 49 | + Developers that use the GNU GPL protect your rights with two steps: |
| 50 | +(1) assert copyright on the software, and (2) offer you this License |
| 51 | +giving you legal permission to copy, distribute and/or modify it. |
| 52 | + |
| 53 | + For the developers' and authors' protection, the GPL clearly explains |
| 54 | +that there is no warranty for this free software. For both users' and |
| 55 | +authors' sake, the GPL requires that modified versions be marked as |
| 56 | +changed, so that their problems will not be attributed erroneously to |
| 57 | +authors of previous versions. |
| 58 | + |
| 59 | + Some devices are designed to deny users access to install or run |
| 60 | +modified versions of the software inside them, although the manufacturer |
| 61 | +can do so. This is fundamentally incompatible with the aim of |
| 62 | +protecting users' freedom to change the software. The systematic |
| 63 | +pattern of such abuse occurs in the area of products for individuals to |
| 64 | +use, which is precisely where it is most unacceptable. Therefore, we |
| 65 | +have designed this version of the GPL to prohibit the practice for those |
| 66 | +products. If such problems arise substantially in other domains, we |
| 67 | +stand ready to extend this provision to those domains in future versions |
| 68 | +of the GPL, as needed to protect the freedom of users. |
| 69 | + |
| 70 | + Finally, every program is threatened constantly by software patents. |
| 71 | +States should not allow patents to restrict development and use of |
| 72 | +software on general-purpose computers, but in those that do, we wish to |
| 73 | +avoid the special danger that patents applied to a free program could |
| 74 | +make it effectively proprietary. To prevent this, the GPL assures that |
| 75 | +patents cannot be used to render the program non-free. |
| 76 | + |
| 77 | + The precise terms and conditions for copying, distribution and |
| 78 | +modification follow. |
| 79 | + |
| 80 | + TERMS AND CONDITIONS |
| 81 | + |
| 82 | + 0. Definitions. |
| 83 | + |
| 84 | + "This License" refers to version 3 of the GNU General Public License. |
| 85 | + |
| 86 | + "Copyright" also means copyright-like laws that apply to other kinds of |
| 87 | +works, such as semiconductor masks. |
| 88 | + |
| 89 | + "The Program" refers to any copyrightable work licensed under this |
| 90 | +License. Each licensee is addressed as "you". "Licensees" and |
| 91 | +"recipients" may be individuals or organizations. |
| 92 | + |
| 93 | + To "modify" a work means to copy from or adapt all or part of the work |
| 94 | +in a fashion requiring copyright permission, other than the making of an |
| 95 | +exact copy. The resulting work is called a "modified version" of the |
| 96 | +earlier work or a work "based on" the earlier work. |
| 97 | + |
| 98 | + A "covered work" means either the unmodified Program or a work based |
| 99 | +on the Program. |
| 100 | + |
| 101 | + To "propagate" a work means to do anything with it that, without |
| 102 | +permission, would make you directly or secondarily liable for |
| 103 | +infringement under applicable copyright law, except executing it on a |
| 104 | +computer or modifying a private copy. Propagation includes copying, |
| 105 | +distribution (with or without modification), making available to the |
| 106 | +public, and in some countries other activities as well. |
| 107 | + |
| 108 | + To "convey" a work means any kind of propagation that enables other |
| 109 | +parties to make or receive copies. Mere interaction with a user through |
| 110 | +a computer network, with no transfer of a copy, is not conveying. |
| 111 | + |
| 112 | + An interactive user interface displays "Appropriate Legal Notices" |
| 113 | +to the extent that it includes a convenient and prominently visible |
| 114 | +feature that (1) displays an appropriate copyright notice, and (2) |
| 115 | +tells the user that there is no warranty for the work (except to the |
| 116 | +extent that warranties are provided), that licensees may convey the |
| 117 | +work under this License, and how to view a copy of this License. If |
| 118 | +the interface presents a list of user commands or options, such as a |
| 119 | +menu, a prominent item in the list meets this criterion. |
| 120 | + |
| 121 | + 1. Source Code. |
| 122 | + |
| 123 | + The "source code" for a work means the preferred form of the work |
| 124 | +for making modifications to it. "Object code" means any non-source |
| 125 | +form of a work. |
| 126 | + |
| 127 | + A "Standard Interface" means an interface that either is an official |
| 128 | +standard defined by a recognized standards body, or, in the case of |
| 129 | +interfaces specified for a particular programming language, one that |
| 130 | +is widely used among developers working in that language. |
| 131 | + |
| 132 | + The "System Libraries" of an executable work include anything, other |
| 133 | +than the work as a whole, that (a) is included in the normal form of |
| 134 | +packaging a Major Component, but which is not part of that Major |
| 135 | +Component, and (b) serves only to enable use of the work with that |
| 136 | +Major Component, or to implement a Standard Interface for which an |
| 137 | +implementation is available to the public in source code form. A |
| 138 | +"Major Component", in this context, means a major essential component |
| 139 | +(kernel, window system, and so on) of the specific operating system |
| 140 | +(if any) on which the executable work runs, or a compiler used to |
| 141 | +produce the work, or an object code interpreter used to run it. |
| 142 | + |
| 143 | + The "Corresponding Source" for a work in object code form means all |
| 144 | +the source code needed to generate, install, and (for an executable |
| 145 | +work) run the object code and to modify the work, including scripts to |
| 146 | +control those activities. However, it does not include the work's |
| 147 | +System Libraries, or general-purpose tools or generally available free |
| 148 | +programs which are used unmodified in performing those activities but |
| 149 | +which are not part of the work. For example, Corresponding Source |
| 150 | +includes interface definition files associated with source files for |
| 151 | +the work, and the source code for shared libraries and dynamically |
| 152 | +linked subprograms that the work is specifically designed to require, |
| 153 | +such as by intimate data communication or control flow between those |
| 154 | +subprograms and other parts of the work. |
| 155 | + |
| 156 | + The Corresponding Source need not include anything that users |
| 157 | +can regenerate automatically from other parts of the Corresponding |
| 158 | +Source. |
| 159 | + |
| 160 | + The Corresponding Source for a work in source code form is that |
| 161 | +same work. |
| 162 | + |
| 163 | + 2. Basic Permissions. |
| 164 | + |
| 165 | + All rights granted under this License are granted for the term of |
| 166 | +copyright on the Program, and are irrevocable provided the stated |
| 167 | +conditions are met. This License explicitly affirms your unlimited |
| 168 | +permission to run the unmodified Program. The output from running a |
| 169 | +covered work is covered by this License only if the output, given its |
| 170 | +content, constitutes a covered work. This License acknowledges your |
| 171 | +rights of fair use or other equivalent, as provided by copyright law. |
| 172 | + |
| 173 | + You may make, run and propagate covered works that you do not |
| 174 | +convey, without conditions so long as your license otherwise remains |
| 175 | +in force. You may convey covered works to others for the sole purpose |
| 176 | +of having them make modifications exclusively for you, or provide you |
| 177 | +with facilities for running those works, provided that you comply with |
| 178 | +the terms of this License in conveying all material for which you do |
| 179 | +not control copyright. Those thus making or running the covered works |
| 180 | +for you must do so exclusively on your behalf, under your direction |
| 181 | +and control, on terms that prohibit them from making any copies of |
| 182 | +your copyrighted material outside their relationship with you. |
| 183 | + |
| 184 | + Conveying under any other circumstances is permitted solely under |
| 185 | +the conditions stated below. Sublicensing is not allowed; section 10 |
| 186 | +makes it unnecessary. |
| 187 | + |
| 188 | + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. |
| 189 | + |
| 190 | + No covered work shall be deemed part of an effective technological |
| 191 | +measure under any applicable law fulfilling obligations under article |
| 192 | +11 of the WIPO copyright treaty adopted on 20 December 1996, or |
| 193 | +similar laws prohibiting or restricting circumvention of such |
| 194 | +measures. |
| 195 | + |
| 196 | + When you convey a covered work, you waive any legal power to forbid |
| 197 | +circumvention of technological measures to the extent such circumvention |
| 198 | +is effected by exercising rights under this License with respect to |
| 199 | +the covered work, and you disclaim any intention to limit operation or |
| 200 | +modification of the work as a means of enforcing, against the work's |
| 201 | +users, your or third parties' legal rights to forbid circumvention of |
| 202 | +technological measures. |
| 203 | + |
| 204 | + 4. Conveying Verbatim Copies. |
| 205 | + |
| 206 | + You may convey verbatim copies of the Program's source code as you |
| 207 | +receive it, in any medium, provided that you conspicuously and |
| 208 | +appropriately publish on each copy an appropriate copyright notice; |
| 209 | +keep intact all notices stating that this License and any |
| 210 | +non-permissive terms added in accord with section 7 apply to the code; |
| 211 | +keep intact all notices of the absence of any warranty; and give all |
| 212 | +recipients a copy of this License along with the Program. |
| 213 | + |
| 214 | + You may charge any price or no price for each copy that you convey, |
| 215 | +and you may offer support or warranty protection for a fee. |
| 216 | + |
| 217 | + 5. Conveying Modified Source Versions. |
| 218 | + |
| 219 | + You may convey a work based on the Program, or the modifications to |
| 220 | +produce it from the Program, in the form of source code under the |
| 221 | +terms of section 4, provided that you also meet all of these conditions: |
| 222 | + |
| 223 | + a) The work must carry prominent notices stating that you modified |
| 224 | + it, and giving a relevant date. |
| 225 | + |
| 226 | + b) The work must carry prominent notices stating that it is |
| 227 | + released under this License and any conditions added under section |
| 228 | + 7. This requirement modifies the requirement in section 4 to |
| 229 | + "keep intact all notices". |
| 230 | + |
| 231 | + c) You must license the entire work, as a whole, under this |
| 232 | + License to anyone who comes into possession of a copy. This |
| 233 | + License will therefore apply, along with any applicable section 7 |
| 234 | + additional terms, to the whole of the work, and all its parts, |
| 235 | + regardless of how they are packaged. This License gives no |
| 236 | + permission to license the work in any other way, but it does not |
| 237 | + invalidate such permission if you have separately received it. |
| 238 | + |
| 239 | + d) If the work has interactive user interfaces, each must display |
| 240 | + Appropriate Legal Notices; however, if the Program has interactive |
| 241 | + interfaces that do not display Appropriate Legal Notices, your |
| 242 | + work need not make them do so. |
| 243 | + |
| 244 | + A compilation of a covered work with other separate and independent |
| 245 | +works, which are not by their nature extensions of the covered work, |
| 246 | +and which are not combined with it such as to form a larger program, |
| 247 | +in or on a volume of a storage or distribution medium, is called an |
| 248 | +"aggregate" if the compilation and its resulting copyright are not |
| 249 | +used to limit the access or legal rights of the compilation's users |
| 250 | +beyond what the individual works permit. Inclusion of a covered work |
| 251 | +in an aggregate does not cause this License to apply to the other |
| 252 | +parts of the aggregate. |
| 253 | + |
| 254 | + 6. Conveying Non-Source Forms. |
| 255 | + |
| 256 | + You may convey a covered work in object code form under the terms |
| 257 | +of sections 4 and 5, provided that you also convey the |
| 258 | +machine-readable Corresponding Source under the terms of this License, |
| 259 | +in one of these ways: |
| 260 | + |
| 261 | + a) Convey the object code in, or embodied in, a physical product |
| 262 | + (including a physical distribution medium), accompanied by the |
| 263 | + Corresponding Source fixed on a durable physical medium |
| 264 | + customarily used for software interchange. |
| 265 | + |
| 266 | + b) Convey the object code in, or embodied in, a physical product |
| 267 | + (including a physical distribution medium), accompanied by a |
| 268 | + written offer, valid for at least three years and valid for as |
| 269 | + long as you offer spare parts or customer support for that product |
| 270 | + model, to give anyone who possesses the object code either (1) a |
| 271 | + copy of the Corresponding Source for all the software in the |
| 272 | + product that is covered by this License, on a durable physical |
| 273 | + medium customarily used for software interchange, for a price no |
| 274 | + more than your reasonable cost of physically performing this |
| 275 | + conveying of source, or (2) access to copy the |
| 276 | + Corresponding Source from a network server at no charge. |
| 277 | + |
| 278 | + c) Convey individual copies of the object code with a copy of the |
| 279 | + written offer to provide the Corresponding Source. This |
| 280 | + alternative is allowed only occasionally and noncommercially, and |
| 281 | + only if you received the object code with such an offer, in accord |
| 282 | + with subsection 6b. |
| 283 | + |
| 284 | + d) Convey the object code by offering access from a designated |
| 285 | + place (gratis or for a charge), and offer equivalent access to the |
| 286 | + Corresponding Source in the same way through the same place at no |
| 287 | + further charge. You need not require recipients to copy the |
| 288 | + Corresponding Source along with the object code. If the place to |
| 289 | + copy the object code is a network server, the Corresponding Source |
| 290 | + may be on a different server (operated by you or a third party) |
| 291 | + that supports equivalent copying facilities, provided you maintain |
| 292 | + clear directions next to the object code saying where to find the |
| 293 | + Corresponding Source. Regardless of what server hosts the |
| 294 | + Corresponding Source, you remain obligated to ensure that it is |
| 295 | + available for as long as needed to satisfy these requirements. |
| 296 | + |
| 297 | + e) Convey the object code using peer-to-peer transmission, provided |
| 298 | + you inform other peers where the object code and Corresponding |
| 299 | + Source of the work are being offered to the general public at no |
| 300 | + charge under subsection 6d. |
| 301 | + |
| 302 | + A separable portion of the object code, whose source code is excluded |
| 303 | +from the Corresponding Source as a System Library, need not be |
| 304 | +included in conveying the object code work. |
| 305 | + |
| 306 | + A "User Product" is either (1) a "consumer product", which means any |
| 307 | +tangible personal property which is normally used for personal, family, |
| 308 | +or household purposes, or (2) anything designed or sold for incorporation |
| 309 | +into a dwelling. In determining whether a product is a consumer product, |
| 310 | +doubtful cases shall be resolved in favor of coverage. For a particular |
| 311 | +product received by a particular user, "normally used" refers to a |
| 312 | +typical or common use of that class of product, regardless of the status |
| 313 | +of the particular user or of the way in which the particular user |
| 314 | +actually uses, or expects or is expected to use, the product. A product |
| 315 | +is a consumer product regardless of whether the product has substantial |
| 316 | +commercial, industrial or non-consumer uses, unless such uses represent |
| 317 | +the only significant mode of use of the product. |
| 318 | + |
| 319 | + "Installation Information" for a User Product means any methods, |
| 320 | +procedures, authorization keys, or other information required to install |
| 321 | +and execute modified versions of a covered work in that User Product from |
| 322 | +a modified version of its Corresponding Source. The information must |
| 323 | +suffice to ensure that the continued functioning of the modified object |
| 324 | +code is in no case prevented or interfered with solely because |
| 325 | +modification has been made. |
| 326 | + |
| 327 | + If you convey an object code work under this section in, or with, or |
| 328 | +specifically for use in, a User Product, and the conveying occurs as |
| 329 | +part of a transaction in which the right of possession and use of the |
| 330 | +User Product is transferred to the recipient in perpetuity or for a |
| 331 | +fixed term (regardless of how the transaction is characterized), the |
| 332 | +Corresponding Source conveyed under this section must be accompanied |
| 333 | +by the Installation Information. But this requirement does not apply |
| 334 | +if neither you nor any third party retains the ability to install |
| 335 | +modified object code on the User Product (for example, the work has |
| 336 | +been installed in ROM). |
| 337 | + |
| 338 | + The requirement to provide Installation Information does not include a |
| 339 | +requirement to continue to provide support service, warranty, or updates |
| 340 | +for a work that has been modified or installed by the recipient, or for |
| 341 | +the User Product in which it has been modified or installed. Access to a |
| 342 | +network may be denied when the modification itself materially and |
| 343 | +adversely affects the operation of the network or violates the rules and |
| 344 | +protocols for communication across the network. |
| 345 | + |
| 346 | + Corresponding Source conveyed, and Installation Information provided, |
| 347 | +in accord with this section must be in a format that is publicly |
| 348 | +documented (and with an implementation available to the public in |
| 349 | +source code form), and must require no special password or key for |
| 350 | +unpacking, reading or copying. |
| 351 | + |
| 352 | + 7. Additional Terms. |
| 353 | + |
| 354 | + "Additional permissions" are terms that supplement the terms of this |
| 355 | +License by making exceptions from one or more of its conditions. |
| 356 | +Additional permissions that are applicable to the entire Program shall |
| 357 | +be treated as though they were included in this License, to the extent |
| 358 | +that they are valid under applicable law. If additional permissions |
| 359 | +apply only to part of the Program, that part may be used separately |
| 360 | +under those permissions, but the entire Program remains governed by |
| 361 | +this License without regard to the additional permissions. |
| 362 | + |
| 363 | + When you convey a copy of a covered work, you may at your option |
| 364 | +remove any additional permissions from that copy, or from any part of |
| 365 | +it. (Additional permissions may be written to require their own |
| 366 | +removal in certain cases when you modify the work.) You may place |
| 367 | +additional permissions on material, added by you to a covered work, |
| 368 | +for which you have or can give appropriate copyright permission. |
| 369 | + |
| 370 | + Notwithstanding any other provision of this License, for material you |
| 371 | +add to a covered work, you may (if authorized by the copyright holders of |
| 372 | +that material) supplement the terms of this License with terms: |
| 373 | + |
| 374 | + a) Disclaiming warranty or limiting liability differently from the |
| 375 | + terms of sections 15 and 16 of this License; or |
| 376 | + |
| 377 | + b) Requiring preservation of specified reasonable legal notices or |
| 378 | + author attributions in that material or in the Appropriate Legal |
| 379 | + Notices displayed by works containing it; or |
| 380 | + |
| 381 | + c) Prohibiting misrepresentation of the origin of that material, or |
| 382 | + requiring that modified versions of such material be marked in |
| 383 | + reasonable ways as different from the original version; or |
| 384 | + |
| 385 | + d) Limiting the use for publicity purposes of names of licensors or |
| 386 | + authors of the material; or |
| 387 | + |
| 388 | + e) Declining to grant rights under trademark law for use of some |
| 389 | + trade names, trademarks, or service marks; or |
| 390 | + |
| 391 | + f) Requiring indemnification of licensors and authors of that |
| 392 | + material by anyone who conveys the material (or modified versions of |
| 393 | + it) with contractual assumptions of liability to the recipient, for |
| 394 | + any liability that these contractual assumptions directly impose on |
| 395 | + those licensors and authors. |
| 396 | + |
| 397 | + All other non-permissive additional terms are considered "further |
| 398 | +restrictions" within the meaning of section 10. If the Program as you |
| 399 | +received it, or any part of it, contains a notice stating that it is |
| 400 | +governed by this License along with a term that is a further |
| 401 | +restriction, you may remove that term. If a license document contains |
| 402 | +a further restriction but permits relicensing or conveying under this |
| 403 | +License, you may add to a covered work material governed by the terms |
| 404 | +of that license document, provided that the further restriction does |
| 405 | +not survive such relicensing or conveying. |
| 406 | + |
| 407 | + If you add terms to a covered work in accord with this section, you |
| 408 | +must place, in the relevant source files, a statement of the |
| 409 | +additional terms that apply to those files, or a notice indicating |
| 410 | +where to find the applicable terms. |
| 411 | + |
| 412 | + Additional terms, permissive or non-permissive, may be stated in the |
| 413 | +form of a separately written license, or stated as exceptions; |
| 414 | +the above requirements apply either way. |
| 415 | + |
| 416 | + 8. Termination. |
| 417 | + |
| 418 | + You may not propagate or modify a covered work except as expressly |
| 419 | +provided under this License. Any attempt otherwise to propagate or |
| 420 | +modify it is void, and will automatically terminate your rights under |
| 421 | +this License (including any patent licenses granted under the third |
| 422 | +paragraph of section 11). |
| 423 | + |
| 424 | + However, if you cease all violation of this License, then your |
| 425 | +license from a particular copyright holder is reinstated (a) |
| 426 | +provisionally, unless and until the copyright holder explicitly and |
| 427 | +finally terminates your license, and (b) permanently, if the copyright |
| 428 | +holder fails to notify you of the violation by some reasonable means |
| 429 | +prior to 60 days after the cessation. |
| 430 | + |
| 431 | + Moreover, your license from a particular copyright holder is |
| 432 | +reinstated permanently if the copyright holder notifies you of the |
| 433 | +violation by some reasonable means, this is the first time you have |
| 434 | +received notice of violation of this License (for any work) from that |
| 435 | +copyright holder, and you cure the violation prior to 30 days after |
| 436 | +your receipt of the notice. |
| 437 | + |
| 438 | + Termination of your rights under this section does not terminate the |
| 439 | +licenses of parties who have received copies or rights from you under |
| 440 | +this License. If your rights have been terminated and not permanently |
| 441 | +reinstated, you do not qualify to receive new licenses for the same |
| 442 | +material under section 10. |
| 443 | + |
| 444 | + 9. Acceptance Not Required for Having Copies. |
| 445 | + |
| 446 | + You are not required to accept this License in order to receive or |
| 447 | +run a copy of the Program. Ancillary propagation of a covered work |
| 448 | +occurring solely as a consequence of using peer-to-peer transmission |
| 449 | +to receive a copy likewise does not require acceptance. However, |
| 450 | +nothing other than this License grants you permission to propagate or |
| 451 | +modify any covered work. These actions infringe copyright if you do |
| 452 | +not accept this License. Therefore, by modifying or propagating a |
| 453 | +covered work, you indicate your acceptance of this License to do so. |
| 454 | + |
| 455 | + 10. Automatic Licensing of Downstream Recipients. |
| 456 | + |
| 457 | + Each time you convey a covered work, the recipient automatically |
| 458 | +receives a license from the original licensors, to run, modify and |
| 459 | +propagate that work, subject to this License. You are not responsible |
| 460 | +for enforcing compliance by third parties with this License. |
| 461 | + |
| 462 | + An "entity transaction" is a transaction transferring control of an |
| 463 | +organization, or substantially all assets of one, or subdividing an |
| 464 | +organization, or merging organizations. If propagation of a covered |
| 465 | +work results from an entity transaction, each party to that |
| 466 | +transaction who receives a copy of the work also receives whatever |
| 467 | +licenses to the work the party's predecessor in interest had or could |
| 468 | +give under the previous paragraph, plus a right to possession of the |
| 469 | +Corresponding Source of the work from the predecessor in interest, if |
| 470 | +the predecessor has it or can get it with reasonable efforts. |
| 471 | + |
| 472 | + You may not impose any further restrictions on the exercise of the |
| 473 | +rights granted or affirmed under this License. For example, you may |
| 474 | +not impose a license fee, royalty, or other charge for exercise of |
| 475 | +rights granted under this License, and you may not initiate litigation |
| 476 | +(including a cross-claim or counterclaim in a lawsuit) alleging that |
| 477 | +any patent claim is infringed by making, using, selling, offering for |
| 478 | +sale, or importing the Program or any portion of it. |
| 479 | + |
| 480 | + 11. Patents. |
| 481 | + |
| 482 | + A "contributor" is a copyright holder who authorizes use under this |
| 483 | +License of the Program or a work on which the Program is based. The |
| 484 | +work thus licensed is called the contributor's "contributor version". |
| 485 | + |
| 486 | + A contributor's "essential patent claims" are all patent claims |
| 487 | +owned or controlled by the contributor, whether already acquired or |
| 488 | +hereafter acquired, that would be infringed by some manner, permitted |
| 489 | +by this License, of making, using, or selling its contributor version, |
| 490 | +but do not include claims that would be infringed only as a |
| 491 | +consequence of further modification of the contributor version. For |
| 492 | +purposes of this definition, "control" includes the right to grant |
| 493 | +patent sublicenses in a manner consistent with the requirements of |
| 494 | +this License. |
| 495 | + |
| 496 | + Each contributor grants you a non-exclusive, worldwide, royalty-free |
| 497 | +patent license under the contributor's essential patent claims, to |
| 498 | +make, use, sell, offer for sale, import and otherwise run, modify and |
| 499 | +propagate the contents of its contributor version. |
| 500 | + |
| 501 | + In the following three paragraphs, a "patent license" is any express |
| 502 | +agreement or commitment, however denominated, not to enforce a patent |
| 503 | +(such as an express permission to practice a patent or covenant not to |
| 504 | +sue for patent infringement). To "grant" such a patent license to a |
| 505 | +party means to make such an agreement or commitment not to enforce a |
| 506 | +patent against the party. |
| 507 | + |
| 508 | + If you convey a covered work, knowingly relying on a patent license, |
| 509 | +and the Corresponding Source of the work is not available for anyone |
| 510 | +to copy, free of charge and under the terms of this License, through a |
| 511 | +publicly available network server or other readily accessible means, |
| 512 | +then you must either (1) cause the Corresponding Source to be so |
| 513 | +available, or (2) arrange to deprive yourself of the benefit of the |
| 514 | +patent license for this particular work, or (3) arrange, in a manner |
| 515 | +consistent with the requirements of this License, to extend the patent |
| 516 | +license to downstream recipients. "Knowingly relying" means you have |
| 517 | +actual knowledge that, but for the patent license, your conveying the |
| 518 | +covered work in a country, or your recipient's use of the covered work |
| 519 | +in a country, would infringe one or more identifiable patents in that |
| 520 | +country that you have reason to believe are valid. |
| 521 | + |
| 522 | + If, pursuant to or in connection with a single transaction or |
| 523 | +arrangement, you convey, or propagate by procuring conveyance of, a |
| 524 | +covered work, and grant a patent license to some of the parties |
| 525 | +receiving the covered work authorizing them to use, propagate, modify |
| 526 | +or convey a specific copy of the covered work, then the patent license |
| 527 | +you grant is automatically extended to all recipients of the covered |
| 528 | +work and works based on it. |
| 529 | + |
| 530 | + A patent license is "discriminatory" if it does not include within |
| 531 | +the scope of its coverage, prohibits the exercise of, or is |
| 532 | +conditioned on the non-exercise of one or more of the rights that are |
| 533 | +specifically granted under this License. You may not convey a covered |
| 534 | +work if you are a party to an arrangement with a third party that is |
| 535 | +in the business of distributing software, under which you make payment |
| 536 | +to the third party based on the extent of your activity of conveying |
| 537 | +the work, and under which the third party grants, to any of the |
| 538 | +parties who would receive the covered work from you, a discriminatory |
| 539 | +patent license (a) in connection with copies of the covered work |
| 540 | +conveyed by you (or copies made from those copies), or (b) primarily |
| 541 | +for and in connection with specific products or compilations that |
| 542 | +contain the covered work, unless you entered into that arrangement, |
| 543 | +or that patent license was granted, prior to 28 March 2007. |
| 544 | + |
| 545 | + Nothing in this License shall be construed as excluding or limiting |
| 546 | +any implied license or other defenses to infringement that may |
| 547 | +otherwise be available to you under applicable patent law. |
| 548 | + |
| 549 | + 12. No Surrender of Others' Freedom. |
| 550 | + |
| 551 | + If conditions are imposed on you (whether by court order, agreement or |
| 552 | +otherwise) that contradict the conditions of this License, they do not |
| 553 | +excuse you from the conditions of this License. If you cannot convey a |
| 554 | +covered work so as to satisfy simultaneously your obligations under this |
| 555 | +License and any other pertinent obligations, then as a consequence you may |
| 556 | +not convey it at all. For example, if you agree to terms that obligate you |
| 557 | +to collect a royalty for further conveying from those to whom you convey |
| 558 | +the Program, the only way you could satisfy both those terms and this |
| 559 | +License would be to refrain entirely from conveying the Program. |
| 560 | + |
| 561 | + 13. Use with the GNU Affero General Public License. |
| 562 | + |
| 563 | + Notwithstanding any other provision of this License, you have |
| 564 | +permission to link or combine any covered work with a work licensed |
| 565 | +under version 3 of the GNU Affero General Public License into a single |
| 566 | +combined work, and to convey the resulting work. The terms of this |
| 567 | +License will continue to apply to the part which is the covered work, |
| 568 | +but the special requirements of the GNU Affero General Public License, |
| 569 | +section 13, concerning interaction through a network will apply to the |
| 570 | +combination as such. |
| 571 | + |
| 572 | + 14. Revised Versions of this License. |
| 573 | + |
| 574 | + The Free Software Foundation may publish revised and/or new versions of |
| 575 | +the GNU General Public License from time to time. Such new versions will |
| 576 | +be similar in spirit to the present version, but may differ in detail to |
| 577 | +address new problems or concerns. |
| 578 | + |
| 579 | + Each version is given a distinguishing version number. If the |
| 580 | +Program specifies that a certain numbered version of the GNU General |
| 581 | +Public License "or any later version" applies to it, you have the |
| 582 | +option of following the terms and conditions either of that numbered |
| 583 | +version or of any later version published by the Free Software |
| 584 | +Foundation. If the Program does not specify a version number of the |
| 585 | +GNU General Public License, you may choose any version ever published |
| 586 | +by the Free Software Foundation. |
| 587 | + |
| 588 | + If the Program specifies that a proxy can decide which future |
| 589 | +versions of the GNU General Public License can be used, that proxy's |
| 590 | +public statement of acceptance of a version permanently authorizes you |
| 591 | +to choose that version for the Program. |
| 592 | + |
| 593 | + Later license versions may give you additional or different |
| 594 | +permissions. However, no additional obligations are imposed on any |
| 595 | +author or copyright holder as a result of your choosing to follow a |
| 596 | +later version. |
| 597 | + |
| 598 | + 15. Disclaimer of Warranty. |
| 599 | + |
| 600 | + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY |
| 601 | +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT |
| 602 | +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY |
| 603 | +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, |
| 604 | +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 605 | +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM |
| 606 | +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF |
| 607 | +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. |
| 608 | + |
| 609 | + 16. Limitation of Liability. |
| 610 | + |
| 611 | + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING |
| 612 | +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS |
| 613 | +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY |
| 614 | +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE |
| 615 | +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF |
| 616 | +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD |
| 617 | +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), |
| 618 | +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF |
| 619 | +SUCH DAMAGES. |
| 620 | + |
| 621 | + 17. Interpretation of Sections 15 and 16. |
| 622 | + |
| 623 | + If the disclaimer of warranty and limitation of liability provided |
| 624 | +above cannot be given local legal effect according to their terms, |
| 625 | +reviewing courts shall apply local law that most closely approximates |
| 626 | +an absolute waiver of all civil liability in connection with the |
| 627 | +Program, unless a warranty or assumption of liability accompanies a |
| 628 | +copy of the Program in return for a fee. |
| 629 | + |
| 630 | + END OF TERMS AND CONDITIONS |
| 631 | + |
| 632 | + How to Apply These Terms to Your New Programs |
| 633 | + |
| 634 | + If you develop a new program, and you want it to be of the greatest |
| 635 | +possible use to the public, the best way to achieve this is to make it |
| 636 | +free software which everyone can redistribute and change under these terms. |
| 637 | + |
| 638 | + To do so, attach the following notices to the program. It is safest |
| 639 | +to attach them to the start of each source file to most effectively |
| 640 | +state the exclusion of warranty; and each file should have at least |
| 641 | +the "copyright" line and a pointer to where the full notice is found. |
| 642 | + |
| 643 | + <one line to give the program's name and a brief idea of what it does.> |
| 644 | + Copyright (C) <year> <name of author> |
| 645 | + |
| 646 | + This program is free software: you can redistribute it and/or modify |
| 647 | + it under the terms of the GNU General Public License as published by |
| 648 | + the Free Software Foundation, either version 3 of the License, or |
| 649 | + (at your option) any later version. |
| 650 | + |
| 651 | + This program is distributed in the hope that it will be useful, |
| 652 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 653 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 654 | + GNU General Public License for more details. |
| 655 | + |
| 656 | + You should have received a copy of the GNU General Public License |
| 657 | + along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 658 | + |
| 659 | +Also add information on how to contact you by electronic and paper mail. |
| 660 | + |
| 661 | + If the program does terminal interaction, make it output a short |
| 662 | +notice like this when it starts in an interactive mode: |
| 663 | + |
| 664 | + <program> Copyright (C) <year> <name of author> |
| 665 | + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. |
| 666 | + This is free software, and you are welcome to redistribute it |
| 667 | + under certain conditions; type `show c' for details. |
| 668 | + |
| 669 | +The hypothetical commands `show w' and `show c' should show the appropriate |
| 670 | +parts of the General Public License. Of course, your program's commands |
| 671 | +might be different; for a GUI interface, you would use an "about box". |
| 672 | + |
| 673 | + You should also get your employer (if you work as a programmer) or school, |
| 674 | +if any, to sign a "copyright disclaimer" for the program, if necessary. |
| 675 | +For more information on this, and how to apply and follow the GNU GPL, see |
| 676 | +<http://www.gnu.org/licenses/>. |
| 677 | + |
| 678 | + The GNU General Public License does not permit incorporating your program |
| 679 | +into proprietary programs. If your program is a subroutine library, you |
| 680 | +may consider it more useful to permit linking proprietary applications with |
| 681 | +the library. If this is what you want to do, use the GNU Lesser General |
| 682 | +Public License instead of this License. But first, please read |
| 683 | +<http://www.gnu.org/philosophy/why-not-lgpl.html>. |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_10/COPYING |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 684 | + native |
Index: tags/extensions/Validator/REL_0_4_10/Validator.i18n.php |
— | — | @@ -0,0 +1,2484 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Internationalization file for the Validator extension |
| 6 | + * |
| 7 | + * @file Validator.i18n.php |
| 8 | + * @ingroup Validator |
| 9 | + * |
| 10 | + * @licence GNU GPL v3 or later |
| 11 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 12 | +*/ |
| 13 | + |
| 14 | +$messages = array(); |
| 15 | + |
| 16 | +/** English |
| 17 | + * @author Jeroen De Dauw |
| 18 | + */ |
| 19 | +$messages['en'] = array( |
| 20 | + 'validator-desc' => 'Provides generic parameter handling support for other extensions', |
| 21 | + |
| 22 | + // General |
| 23 | + 'validator-warning' => 'Warning: $1', |
| 24 | + 'validator-error' => 'Error: $1', |
| 25 | + 'validator-fatal-error' => 'Fatal error: $1', |
| 26 | + 'validator_error_parameters' => 'The following {{PLURAL:$1|error has|errors have}} been detected in your syntax:', |
| 27 | + 'validator_warning_parameters' => 'There {{PLURAL:$1|is an error|are errors}} in your syntax.', |
| 28 | + 'validator-warning-adittional-errors' => '... and {{PLURAL:$1|one more issue|multiple more issues}}.', |
| 29 | + 'validator-error-omitted' => 'The {{PLURAL:$2|value "$1" has|values "$1" have}} been omitted.', |
| 30 | + 'validator-error-problem' => 'There was a problem with parameter $1.', |
| 31 | + |
| 32 | + // General errors |
| 33 | + 'validator_error_unknown_argument' => '$1 is not a valid parameter.', |
| 34 | + 'validator_error_required_missing' => 'The required parameter "$1" is not provided.', |
| 35 | + 'validator-error-override-argument' => 'Tried to override parameter $1 (value: $2) with value "$3"', |
| 36 | + |
| 37 | + // Parameter types |
| 38 | + 'validator-type-string' => 'text', |
| 39 | + 'validator-type-number' => 'number', |
| 40 | + 'validator-type-integer' => 'whole number', |
| 41 | + 'validator-type-float' => 'number', |
| 42 | + 'validator-type-boolean' => 'yes/no', |
| 43 | + 'validator-type-char' => 'character', |
| 44 | + |
| 45 | + // Listerrors |
| 46 | + 'validator-listerrors-errors' => 'Errors', |
| 47 | + 'validator-listerrors-severity-message' => '($1) $2', // $1 = severity; $2 = message |
| 48 | + 'validator-listerrors-minor' => 'Minor', |
| 49 | + 'validator-listerrors-low' => 'Low', |
| 50 | + 'validator-listerrors-normal' => 'Normal', |
| 51 | + 'validator-listerrors-high' => 'High', |
| 52 | + 'validator-listerrors-fatal' => 'Fatal', |
| 53 | + 'validator-listerrors-description' => 'Lists errors (and warnings) that occured in parser hooks added via Validator. |
| 54 | +Only lists for parser hooks added above where listerrors is inserted; |
| 55 | +place listerrors at or near the bottom of the page to get all errors.', |
| 56 | + 'validator-listerrors-par-minseverity' => 'The minimum severity of an issue for it to be listed.', |
| 57 | + |
| 58 | + // Describe |
| 59 | + 'validator-describe-description' => 'Generates documentation for one or more parser hooks defined via Validator.', |
| 60 | + 'validator-describe-notfound' => 'There is no parser hook that handles "$1".', |
| 61 | + 'validator-describe-descriptionmsg' => "'''Description''': $1", // Because it's 1360 < 3 |
| 62 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Alias|Aliases}}''': $1", |
| 63 | + 'validator-describe-parserfunction' => 'Implemented only as parser function.', |
| 64 | + 'validator-describe-tagextension' => 'Implemented only as tag extension.', |
| 65 | + 'validator-describe-bothhooks' => 'Implemented as both parser function and as tag extension.', |
| 66 | + 'validator-describe-par-hooks' => 'The parser hooks for which to display documentation.', |
| 67 | + 'validator-describe-par-pre' => 'Allows you to get the actual wikitext for the documentation, without it being rendered on the page.', |
| 68 | + 'validator-describe-par-language' => 'The language to display the descriptions in', |
| 69 | + 'validator-describe-listtype' => 'List of $1 items', |
| 70 | + 'validator-describe-empty' => 'empty', |
| 71 | + 'validator-describe-required' => 'required', |
| 72 | + 'validator-describe-header-parameter' => 'Parameter', |
| 73 | + 'validator-describe-header-aliases' => 'Aliases', |
| 74 | + 'validator-describe-header-type' => 'Type', |
| 75 | + 'validator-describe-header-default' => 'Default', |
| 76 | + 'validator-describe-header-description' => 'Description', |
| 77 | + 'validator-describe-parameters' => 'Parameters', |
| 78 | + 'validator-describe-syntax' => 'Syntax', |
| 79 | + 'validator-describe-tagmin' => 'Tag extension with only the required parameters.', |
| 80 | + 'validator-describe-tagmax' => 'Tag extension with all parameters.', |
| 81 | + 'validator-describe-tagdefault' => 'Tag extension with all parameters using the default parameter notation.', |
| 82 | + 'validator-describe-pfmin' => 'Parser function with only the required parameters.', |
| 83 | + 'validator-describe-pfmax' => 'Parser function with all parameters.', |
| 84 | + 'validator-describe-pfdefault' => 'Parser function with all parameters using the default parameter notation.', |
| 85 | + 'validator-describe-autogen' => 'The contents of this section was auto-generated by the "describe" parser hook of the Validator extension.', |
| 86 | + |
| 87 | + // Criteria errors for single values |
| 88 | + 'validator_error_empty_argument' => 'Parameter $1 can not have an empty value.', |
| 89 | + 'validator_error_must_be_number' => 'Parameter $1 can only be a number.', |
| 90 | + 'validator_error_must_be_integer' => 'Parameter $1 can only be an integer.', |
| 91 | + 'validator-error-must-be-float' => 'Parameter $1 can only be a floating point number.', |
| 92 | + 'validator_error_invalid_range' => 'Parameter $1 must be between $2 and $3.', |
| 93 | + 'validator-error-invalid-regex' => 'Parameter $1 must match this regular expression: $2.', |
| 94 | + 'validator-error-invalid-length' => 'Parameter $1 must have a length of $2.', |
| 95 | + 'validator-error-invalid-length-range' => 'Parameter $1 must have a length between $2 and $3.', |
| 96 | + 'validator_error_invalid_argument' => 'The value $1 is not valid for parameter $2.', |
| 97 | + |
| 98 | + // Criteria errors for lists |
| 99 | + 'validator_list_error_empty_argument' => 'Parameter $1 does not accept empty values.', |
| 100 | + 'validator_list_error_must_be_number' => 'Parameter $1 can only contain numbers.', |
| 101 | + 'validator_list_error_must_be_integer' => 'Parameter $1 can only contain integers.', |
| 102 | + 'validator-list-error-must-be-float' => 'Parameter $1 can only contain floats.', |
| 103 | + 'validator_list_error_invalid_range' => 'All values of parameter $1 must be between $2 and $3.', |
| 104 | + 'validator-list-error-invalid-regex' => 'All values of parameter $1 must match this regular expression: $2.', |
| 105 | + 'validator_list_error_invalid_argument' => 'One or more values for parameter $1 are invalid.', |
| 106 | + 'validator-list-error-accepts-only' => 'One or more values for parameter $1 are invalid. It only accepts {{PLURAL:$3|this value|these values}}: $2.', |
| 107 | + 'validator-list-error-accepts-only-omitted' => 'One or more values for parameter $1 are invalid. It only accepts {{PLURAL:$3|this value|these values}}: $2 (and $4 omitted {{PLURAL:$4|value|values}}).', |
| 108 | + |
| 109 | + // Criteria errors for single values & lists |
| 110 | + 'validator_error_accepts_only' => 'The value "$4" is not valid for parameter $1. It only accepts {{PLURAL:$3|this value|these values}}: $2.', |
| 111 | + 'validator-error-accepts-only-omitted' => 'The value "$2" is not valid for parameter $1. It only accepts {{PLURAL:$5|this value|these values}}: $3 (and $4 omitted {{PLURAL:$4|value|values}}).', |
| 112 | + |
| 113 | + 'validator_list_omitted' => 'The {{PLURAL:$2|value|values}} $1 {{PLURAL:$2|has|have}} been omitted.', |
| 114 | +); |
| 115 | + |
| 116 | +/** Message documentation (Message documentation) |
| 117 | + * @author EugeneZelenko |
| 118 | + * @author Fryed-peach |
| 119 | + * @author Purodha |
| 120 | + * @author Raymond |
| 121 | + */ |
| 122 | +$messages['qqq'] = array( |
| 123 | + 'validator-desc' => '{{desc}}', |
| 124 | + 'validator-warning' => '{{Identical|Warning}}', |
| 125 | + 'validator-error' => '{{Identical|Error}}', |
| 126 | + 'validator_error_parameters' => 'Parameters: |
| 127 | +* $1 is the number of syntax errors, for PLURAL support (optional)', |
| 128 | + 'validator-listerrors-errors' => '{{Identical|Error}}', |
| 129 | + 'validator-listerrors-severity-message' => '{{Optional}} |
| 130 | +* $1 = severit |
| 131 | +* $2 = message', |
| 132 | + 'validator-listerrors-normal' => '{{Identical|Normal}}', |
| 133 | + 'validator-describe-descriptionmsg' => '{{Identical|Description}}', |
| 134 | + 'validator-describe-empty' => '{{Identical|Empty}}', |
| 135 | + 'validator-describe-required' => '{{Identical|Required}}', |
| 136 | + 'validator-describe-header-parameter' => '{{Identical|Parameter}}', |
| 137 | + 'validator-describe-header-type' => '{{Identical|Type}}', |
| 138 | + 'validator-describe-header-default' => '{{Identical|Default}}', |
| 139 | + 'validator-describe-header-description' => '{{Identical|Description}}', |
| 140 | + 'validator-describe-parameters' => '{{Identical|Parameter}}', |
| 141 | +); |
| 142 | + |
| 143 | +/** Afrikaans (Afrikaans) |
| 144 | + * @author Naudefj |
| 145 | + */ |
| 146 | +$messages['af'] = array( |
| 147 | + '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', |
| 148 | + 'validator-warning' => 'Waarskuwing: $ 1', |
| 149 | + 'validator-error' => 'Fout: $1', |
| 150 | + 'validator-fatal-error' => 'Onherstelbare fout: $1', |
| 151 | + 'validator_error_parameters' => 'Die volgende {{PLURAL:$1|fout|foute}} is in u sintaks waargeneem:', |
| 152 | + 'validator_error_unknown_argument' => "$1 is nie 'n geldige parameter nie.", |
| 153 | + 'validator_error_required_missing' => 'Die verpligte parameter $1 is nie verskaf nie.', |
| 154 | + 'validator-listerrors-errors' => 'Foute', |
| 155 | + 'validator-listerrors-minor' => 'Oorkomelik', |
| 156 | + 'validator-listerrors-low' => 'Laag', |
| 157 | + 'validator-listerrors-normal' => 'Gemiddeld', |
| 158 | + 'validator-listerrors-high' => 'Groot', |
| 159 | + 'validator-listerrors-fatal' => 'Fataal', |
| 160 | + 'validator_error_empty_argument' => 'Die parameter $1 mag nie leeg wees nie.', |
| 161 | + 'validator_error_must_be_number' => "Die parameter $1 mag net 'n getal wees.", |
| 162 | + 'validator_error_must_be_integer' => "Die parameter $1 kan slegs 'n heelgetal wees.", |
| 163 | + 'validator_error_invalid_range' => 'Die parameter $1 moet tussen $2 en $3 lê.', |
| 164 | + 'validator_error_invalid_argument' => 'Die waarde $1 is nie geldig vir parameter $2 nie.', |
| 165 | + 'validator_error_accepts_only' => 'Die parameter $1 kan slegs die volgende {{PLURAL:$3|waarde|waardes}} hê: $2.', |
| 166 | +); |
| 167 | + |
| 168 | +/** Gheg Albanian (Gegë) |
| 169 | + * @author Mdupont |
| 170 | + */ |
| 171 | +$messages['aln'] = array( |
| 172 | + 'validator-desc' => 'Validator është një zgjerim MediaWiki që ofron parametër përgjithshme trajtimin mbështetje të shtesave të tjera', |
| 173 | + 'validator_error_parameters' => 'Më poshtë {{PLURAL:$1|gabim ka gabime|kanë}} është zbuluar në sintaksën e juaj:', |
| 174 | + 'validator_warning_parameters' => 'Ka {{PLURAL:$1|është|janë gabime gabim}} në sintaksë tuaj.', |
| 175 | + 'validator_error_unknown_argument' => '$1 nuk është një parametër i vlefshëm.', |
| 176 | + 'validator_error_required_missing' => 'Parametrat e nevojshëm $1 nuk jepet.', |
| 177 | + 'validator_error_empty_argument' => 'Parametër $1 nuk mund të ketë një vlerë bosh.', |
| 178 | + 'validator_error_must_be_number' => 'Parametër $1 mund të jetë vetëm një numër.', |
| 179 | + 'validator_error_must_be_integer' => 'Parametër $1 mund të jetë vetëm një numër i plotë.', |
| 180 | + 'validator_error_invalid_range' => 'Parametër $1 duhet të jetë në mes të $2 dhe $3.', |
| 181 | + 'validator_error_invalid_argument' => 'Vlera $1 nuk është i vlefshëm për parametër $2.', |
| 182 | + 'validator_list_error_empty_argument' => 'Parametër $1 nuk e pranon vlerat bosh.', |
| 183 | + 'validator_list_error_must_be_number' => 'Parametër $1 mund të përmbajë vetëm numrat.', |
| 184 | + 'validator_list_error_must_be_integer' => 'Parametër $1 mund të përmbajë vetëm numra të plotë.', |
| 185 | + 'validator_list_error_invalid_range' => 'Të gjitha vlerat e parametrit $1 duhet të jetë në mes të $2 dhe $3.', |
| 186 | + 'validator_list_error_invalid_argument' => 'Një ose më shumë vlera për parametër $1 janë të pavlefshme.', |
| 187 | + 'validator_error_accepts_only' => 'Parametër $1 vetëm pranon {{PLURAL:$3|kjo vlerë|këtyre vlerave}}: $2.', |
| 188 | + 'validator_list_omitted' => '{{PLURAL:$2 |vlerë|vlerat}} $1 {{PLURAL:$2|ka|kanë}} janë lënë jashtë.', |
| 189 | +); |
| 190 | + |
| 191 | +/** Arabic (العربية) |
| 192 | + * @author Meno25 |
| 193 | + */ |
| 194 | +$messages['ar'] = array( |
| 195 | + 'validator-desc' => 'المحقق يوفر طريقة سهلة للامتدادات الأخرى للتحقق من محددات دوال المحلل وامتدادات الوسوم، وضبط القيم الافتراضية وتوليد رسائل الخطأ', |
| 196 | + 'validator_error_parameters' => '{{PLURAL:$1|الخطأ التالي|الاخطاء التالية}} تم كشفها في صياغتك:', |
| 197 | + 'validator_warning_parameters' => 'هناك {{PLURAL:$1|خطأ|أخطاء}} في صياغتك.', |
| 198 | + 'validator_error_unknown_argument' => '$1 ليس محددا صحيحا.', |
| 199 | + 'validator_error_required_missing' => 'المحدد المطلوب $1 ليس متوفرا.', |
| 200 | + 'validator_error_empty_argument' => 'المحدد $1 لا يمكن أن تكون قيمته فارغة.', |
| 201 | + 'validator_error_must_be_number' => 'المحدد $1 يمكن أن يكون فقط عددا.', |
| 202 | + 'validator_error_must_be_integer' => 'المحدد $1 يمكن أن يكون عددا صحيحا فقط.', |
| 203 | + 'validator_error_invalid_range' => 'المحدد $1 يجب أن يكون بين $2 و $3.', |
| 204 | + 'validator_error_invalid_argument' => 'القيمة $1 ليست صحيحة للمحدد $2.', |
| 205 | + 'validator_list_error_empty_argument' => 'المحدد $1 لا يقبل القيم الفارغة.', |
| 206 | + 'validator_list_error_must_be_number' => 'المحدد $1 يمكن أن يحتوي فقط على أرقام.', |
| 207 | + 'validator_list_error_must_be_integer' => 'المحدد $1 يمكن أن يحتوي فقط على أرقام صحيحة.', |
| 208 | + 'validator_list_error_invalid_range' => 'كل قيم المحدد $1 يجب أن تكون بين $2 و$3.', |
| 209 | + 'validator_list_error_invalid_argument' => 'قيمة واحدة أو أكثر للمحدد $1 غير صحيحة.', |
| 210 | + 'validator_error_accepts_only' => 'المحدد $1 يقبل فقط {{PLURAL:$3|هذه القيمة|هذه القيم}}: $2.', |
| 211 | + 'validator_list_omitted' => '{{PLURAL:$2|القيمة|القيم}} $1 {{PLURAL:$2|تم|تم}} مسحها.', |
| 212 | +); |
| 213 | + |
| 214 | +/** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) |
| 215 | + * @author EugeneZelenko |
| 216 | + * @author Jim-by |
| 217 | + * @author Wizardist |
| 218 | + */ |
| 219 | +$messages['be-tarask'] = array( |
| 220 | + 'validator-desc' => 'Правяраючы палягчае іншым пашырэньням працу па праверцы парамэтраў функцыяў парсэру і тэгаў пашырэньняў, устанаўлівае значэньні па змоўчваньні і стварае паведамленьні пра памылкі', |
| 221 | + 'validator-warning' => 'Папярэджаньне: $1', |
| 222 | + 'validator-error' => 'Памылка: $1', |
| 223 | + 'validator-fatal-error' => 'Крытычная памылка: $1', |
| 224 | + 'validator_error_parameters' => 'У сынтаксісе {{PLURAL:$1|выяўленая наступная памылка|выяўленыя наступныя памылкі}}:', |
| 225 | + 'validator_warning_parameters' => 'У Вашы сынтаксісе {{PLURAL:$1|маецца памылка|маюцца памылкі}}.', |
| 226 | + 'validator-warning-adittional-errors' => '... і {{PLURAL:$1|яшчэ адна праблема|яшчэ некалькі праблемаў}}.', |
| 227 | + 'validator-error-omitted' => '{{PLURAL:$2|Значэньне «$1» было прапушчанае|Значэньні «$1» былі прапушчаныя}}.', |
| 228 | + 'validator-error-problem' => 'Узьнікла праблема з парамэтрам $1.', |
| 229 | + 'validator_error_unknown_argument' => 'Няслушны парамэтар $1.', |
| 230 | + 'validator_error_required_missing' => 'Не пададзены абавязковы парамэтар $1.', |
| 231 | + 'validator-error-override-argument' => 'Спрабаваў памяняць значэньне парамэтру $1 з «$2» на «$3»', |
| 232 | + 'validator-type-string' => 'тэкст', |
| 233 | + 'validator-type-number' => 'лік', |
| 234 | + 'validator-type-integer' => 'цэлы лік', |
| 235 | + 'validator-type-float' => 'лік', |
| 236 | + 'validator-type-boolean' => 'так/не', |
| 237 | + 'validator-type-char' => 'сымбаль', |
| 238 | + 'validator-listerrors-errors' => 'Памылкі', |
| 239 | + 'validator-listerrors-minor' => 'Дробная', |
| 240 | + 'validator-listerrors-low' => 'Малая', |
| 241 | + 'validator-listerrors-normal' => 'Звычайная', |
| 242 | + 'validator-listerrors-high' => 'Значная', |
| 243 | + 'validator-listerrors-fatal' => 'Фатальная', |
| 244 | + 'validator-listerrors-description' => 'Пералічвае памылкі (і папярэджаньні), якія адбыліся ў працэдурах-перахопніках парсэра, дададзеных праз Validator. |
| 245 | +Паказваюцца толькі працэдуры-перахопнікі парсэра, якія знаходзяцца Вышэй listerrors. |
| 246 | +Зьмясьціце listerrors у самы канец старонкі, каб атрымаць сьпіс усіх памылак.', |
| 247 | + 'validator-listerrors-par-minseverity' => 'Мінімальная сур’ёзнасьць праблемы, для таго каб яна была ўключаная ў сьпіс.', |
| 248 | + 'validator-describe-description' => 'Стварае дакумэнтацыю для аднаго ці болей працэдур-перахопнікаў парсэра, атрымаўшым вызначэньне праз Validator.', |
| 249 | + 'validator-describe-notfound' => 'Не існуе працэдур-перахопніка парсэра для «$1».', |
| 250 | + 'validator-describe-descriptionmsg' => "'''Апісаньне''': $1", |
| 251 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Псэўданім|Псэўданімы}}''': $1", |
| 252 | + 'validator-describe-parserfunction' => 'Рэалізаваная толькі функцыя парсэру.', |
| 253 | + 'validator-describe-tagextension' => 'Рэалізаваная толькі як пашырэньне тэгу.', |
| 254 | + 'validator-describe-bothhooks' => 'Рэалізаваная як функцыя парсэру і як пашырэньне тэгу.', |
| 255 | + 'validator-describe-par-hooks' => 'Працэдура-перахопнік парсэра, для якой паказваць дакумэнтацыю.', |
| 256 | + 'validator-describe-par-pre' => 'Дазваляе Вам атрымліваць актуальны вікі-тэкст для дакумэнтацыі, без паказу на старонцы.', |
| 257 | + 'validator-describe-listtype' => 'Сьпіс элемэнтаў $1', |
| 258 | + 'validator-describe-empty' => 'пуста', |
| 259 | + 'validator-describe-required' => 'абавязкова', |
| 260 | + 'validator-describe-header-parameter' => 'Парамэтар', |
| 261 | + 'validator-describe-header-aliases' => 'Псэўданімы', |
| 262 | + 'validator-describe-header-type' => 'Тып', |
| 263 | + 'validator-describe-header-default' => 'Па змоўчваньні', |
| 264 | + 'validator-describe-header-description' => 'Апісаньне', |
| 265 | + 'validator-describe-parameters' => 'Парамэтры', |
| 266 | + 'validator-describe-syntax' => 'Сынтаксіс', |
| 267 | + 'validator-describe-tagmin' => 'Пашырэньне тэга, якое мае толькі неабходныя парамэтры.', |
| 268 | + 'validator-describe-tagmax' => 'Пашырэньне тэга з усімі парамэтрамі.', |
| 269 | + 'validator-describe-tagdefault' => 'Пашырэньне тэга з усімі парамэтрамі, выкарыстаньнем запісаў парамэтраў па змоўчваньні.', |
| 270 | + 'validator-describe-pfmin' => 'Функцыя парсэра, якае мае толькі неабходныя парамэтры.', |
| 271 | + 'validator-describe-pfmax' => 'Функцыя парсэра з усімі парамэтрамі.', |
| 272 | + 'validator-describe-pfdefault' => 'Функцыя парсэра з усімі парамэтрамі, выкарыстаньнем запісаў парамэтраў па змоўчваньні.', |
| 273 | + 'validator-describe-autogen' => 'Зьмест гэтай сэкцыі быў аўтаматычна створаны працэдурай-перахопнікам парсэра «describe» пашырэньня Validator.', |
| 274 | + 'validator_error_empty_argument' => 'Парамэтар $1 ня можа мець пустое значэньне.', |
| 275 | + 'validator_error_must_be_number' => 'Парамэтар $1 можа быць толькі лікам.', |
| 276 | + 'validator_error_must_be_integer' => 'Парамэтар $1 можа быць толькі цэлым лікам.', |
| 277 | + 'validator-error-must-be-float' => 'Парамэтар $1 можа быць толькі лікам з плаваючай коскай.', |
| 278 | + 'validator_error_invalid_range' => 'Парамэтар $1 павінен быць паміж $2 і $3.', |
| 279 | + 'validator-error-invalid-regex' => 'парамэтар $1 мусіць адпавядаць гэтаму рэгулярнаму выразу: $2.', |
| 280 | + 'validator-error-invalid-length' => 'Парамэтар $1 павінен мець даўжыню $2.', |
| 281 | + 'validator-error-invalid-length-range' => 'Парамэтар $1 павінен мець даўжыню паміж $2 і $3.', |
| 282 | + 'validator_error_invalid_argument' => 'Значэньне $1 не зьяўляецца слушным для парамэтру $2.', |
| 283 | + 'validator_list_error_empty_argument' => 'Парамэтар $1 ня можа прымаць пустыя значэньні.', |
| 284 | + 'validator_list_error_must_be_number' => 'Парамэтар $1 можа ўтрымліваць толькі лікі.', |
| 285 | + 'validator_list_error_must_be_integer' => 'Парамэтар $1 можа ўтрымліваць толькі цэлыя лікі.', |
| 286 | + 'validator-list-error-must-be-float' => 'Парамэтар $1 можа ўтрымліваць толькі лікі з плаваючай кропкай.', |
| 287 | + 'validator_list_error_invalid_range' => 'Усе значэньні парамэтру $1 павінны знаходзіцца паміж $2 і $3.', |
| 288 | + 'validator-list-error-invalid-regex' => 'Усе значэньні парамэтру $1 мусяць адпавядаць гэтаму рэгулярнаму выразу: $2.', |
| 289 | + 'validator_list_error_invalid_argument' => 'Адно ці болей значэньняў парамэтру $1 зьяўляюцца няслушнымі.', |
| 290 | + 'validator-list-error-accepts-only' => 'Адзін ці некалькі значэньняў парамэтру $1 зьяўляюцца няслушнымі. |
| 291 | +{{PLURAL:$3|Ён мусіць мець наступнае значэньне|Яны мусяць мець наступныя значэньні}}: $2.', |
| 292 | + 'validator-list-error-accepts-only-omitted' => 'Адзін ці некалькі значэньняў парамэтру $1 зьяўляюцца няслушнымі. |
| 293 | +{{PLURAL:$3|Ён мусіць мець наступнае значэньне|Яны мусяць мець наступныя значэньні}}: $2. (і $4 {{PLURAL:$4|прапушчанае значэньне|прапушчаныя значэньні|прапушчаных значэньняў}}).', |
| 294 | + 'validator_error_accepts_only' => 'Значэньне «$4» зьяўляецца няслушным для парамэтру $1. Ён можа прымаць толькі {{PLURAL:$3|гэтае значэньне|гэтыя значэньні}}: $2.', |
| 295 | + 'validator-error-accepts-only-omitted' => 'Значэньне «$2» зьяўляецца няслушным для парамэтру $1. |
| 296 | +{{PLURAL:$5|Ён мусіць мець наступнае значэньне|Яны мусяць мець наступныя значэньні}}: $3. (і $4 {{PLURAL:$4|прапушчанае значэньне|прапушчаныя значэньні|прапушчаных значэньняў}}).', |
| 297 | + 'validator_list_omitted' => '{{PLURAL:$2|Значэньне|Значэньні}} $1 {{PLURAL:$2|было прапушчанае|былі прапушчаныя}}.', |
| 298 | +); |
| 299 | + |
| 300 | +/** Bulgarian (Български) |
| 301 | + * @author DCLXVI |
| 302 | + * @author Reedy |
| 303 | + */ |
| 304 | +$messages['bg'] = array( |
| 305 | + 'validator_error_empty_argument' => 'Параметърът $1 не може да има празна стойност.', |
| 306 | +); |
| 307 | + |
| 308 | +/** Bengali (বাংলা) |
| 309 | + * @author Ehsanulhb |
| 310 | + */ |
| 311 | +$messages['bn'] = array( |
| 312 | + 'validator-describe-descriptionmsg' => "'''বিবরণ''': $1", |
| 313 | + 'validator-describe-header-description' => 'বিবরণ', |
| 314 | +); |
| 315 | + |
| 316 | +/** Breton (Brezhoneg) |
| 317 | + * @author Fohanno |
| 318 | + * @author Fulup |
| 319 | + * @author Gwendal |
| 320 | + * @author Y-M D |
| 321 | + */ |
| 322 | +$messages['br'] = array( |
| 323 | + 'validator-desc' => 'Un doare aes eo kadarnataer evit an astennoù all da gadarnaat arventennoù ar fonksionoù parser hag astennoù ar balizennoù, evit termeniñ talvoudennoù dre ziouer ha sevel kemennoù fazioù', |
| 324 | + 'validator-warning' => 'Diwallit : $1', |
| 325 | + 'validator-error' => 'Fazi : $1', |
| 326 | + 'validator-fatal-error' => 'Fazi diremed: $1', |
| 327 | + 'validator_error_parameters' => "Kavet eo bet ar {{PLURAL:$1|fazi|fazioù}} da-heul en hoc'h ereadur :", |
| 328 | + 'validator_warning_parameters' => "{{PLURAL:$1|Ur fazi|Fazioù}} zo en hoc'h ereadur.", |
| 329 | + 'validator-warning-adittional-errors' => '... {{PLURAL:$1|hag ur gudenn bennak all|ha meur a gudenn all}}.', |
| 330 | + 'validator-error-omitted' => 'N\'eo ket bet merket ar {{PLURAL:$2|roadenn "$1"|roadennoù "$1"}}.', |
| 331 | + 'validator-error-problem' => 'Ur gudenn zo bet gant an arventenn $1.', |
| 332 | + 'validator_error_unknown_argument' => "$1 n'eo ket un arventenn reizh.", |
| 333 | + 'validator_error_required_missing' => "N'eo ket bet pourchaset an arventenn rekis $1", |
| 334 | + 'validator-error-override-argument' => 'Klasket en deus ar meziant erlec\'hiañ an arventenn $1 (talvoud : $2) gant an talvoud "$3"', |
| 335 | + 'validator-type-string' => 'testenn', |
| 336 | + 'validator-type-number' => 'niver', |
| 337 | + 'validator-type-integer' => 'Niver klok', |
| 338 | + 'validator-type-float' => 'niver', |
| 339 | + 'validator-type-boolean' => 'ya/nann', |
| 340 | + 'validator-type-char' => 'arouezenn', |
| 341 | + 'validator-listerrors-errors' => 'Fazioù', |
| 342 | + 'validator-listerrors-minor' => 'Minor', |
| 343 | + 'validator-listerrors-low' => 'Gwan', |
| 344 | + 'validator-listerrors-normal' => 'Reizh', |
| 345 | + 'validator-listerrors-high' => 'Uhel', |
| 346 | + 'validator-listerrors-fatal' => 'Diremed', |
| 347 | + 'validator-describe-descriptionmsg' => "'''Deskrivadur''': $1", |
| 348 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Alias|Aliasoù}}''': $1", |
| 349 | + 'validator-describe-listtype' => 'Roll gant $1 elfenn', |
| 350 | + 'validator-describe-empty' => 'goullo', |
| 351 | + 'validator-describe-required' => 'rekis', |
| 352 | + 'validator-describe-header-parameter' => 'Arventenn', |
| 353 | + 'validator-describe-header-aliases' => 'Aliasoù', |
| 354 | + 'validator-describe-header-type' => 'Seurt', |
| 355 | + 'validator-describe-header-default' => 'Diouer', |
| 356 | + 'validator-describe-header-description' => 'Deskrivadur', |
| 357 | + 'validator-describe-parameters' => 'Arventennoù', |
| 358 | + 'validator-describe-syntax' => 'Ereadurezh', |
| 359 | + 'validator_error_empty_argument' => "N'hall ket an arventenn $1 bezañ goullo he zalvoudenn", |
| 360 | + 'validator_error_must_be_number' => 'Un niver e rank an arventenn $1 bezañ hepken.', |
| 361 | + 'validator_error_must_be_integer' => 'Rankout a ra an arventenn $1 bezañ un niver anterin.', |
| 362 | + 'validator-error-must-be-float' => 'Rankout a ra an arventenn $1 bezañ un niver skej war-neuñv.', |
| 363 | + 'validator_error_invalid_range' => 'Rankout a ra an arventenn $1 bezañ etre $2 hag $3.', |
| 364 | + 'validator-error-invalid-regex' => 'Rankout a ra an arventenn $1 klotañ gant ar jedad poellek-mañ : $2.', |
| 365 | + 'validator-error-invalid-length' => "Ret eo d'an arventenn $1 bezañ par he hed da $2.", |
| 366 | + 'validator-error-invalid-length-range' => 'Rankout a ra an arventenn $1 bezañ he hed etre $2 hag $3.', |
| 367 | + 'validator_error_invalid_argument' => "N'eo ket reizh an dalvoudenn $1 evit an arventenn $2.", |
| 368 | + 'validator_list_error_empty_argument' => 'Ne zegemer ket an arventenn $1 an talvoudennoù goullo.', |
| 369 | + 'validator_list_error_must_be_number' => "N'hall bezañ nemet niveroù en arventenn $1.", |
| 370 | + 'validator_list_error_must_be_integer' => "N'hall bezañ nemet niveroù anterin en arventenn $1.", |
| 371 | + 'validator-list-error-must-be-float' => "N'hall bezañ nemet niveroù gant skej en arventenn $1.", |
| 372 | + 'validator_list_error_invalid_range' => 'An holl talvoudennoù eus an arventenn $1 a rank bezañ etre $2 ha $3.', |
| 373 | + 'validator-list-error-invalid-regex' => 'Rankout a ra holl dalvoudoù an arventenn $1 klotañ gant ar jedad poellek-mañ : $2.', |
| 374 | + 'validator_list_error_invalid_argument' => 'Faziek eo unan pe meur a dalvoudenn eus an arventenn $1.', |
| 375 | + 'validator-list-error-accepts-only' => 'Direizh eo unan pe meur a hini eus an talvoudoù evit an arventenn $1. |
| 376 | +Ne zegemer nemet an {{PLURAL:$3|talvoud|talvoudoù}}-mañ : $2.', |
| 377 | + 'validator-list-error-accepts-only-omitted' => 'Direizh eo unan pe meur a hini eus an talvoudoù evit an arventenn $1. |
| 378 | +Ne zegemer nemet an {{PLURAL:$3|talvoud|talvoudoù}}-mañ : $2 (ha $4 {{PLURAL:$4|talvoud anroet|talvoud anroet}}).', |
| 379 | + 'validator_error_accepts_only' => 'Ne zegemer ket an arventenn $1 an talvoud "$4". Ne zegemer nemet {{PLURAL:$3|an talvoud|an talvoudoù}}-mañ : $2.', |
| 380 | + 'validator-error-accepts-only-omitted' => 'Direizh eo an talvoud "$2" evit an arventenn $1. |
| 381 | +Ne zegemer nemet an {{PLURAL:$5|talvoud|talvoudoù}}-mañ : $3 (ha $4 {{PLURAL:$4|talvoud anroet|talvoud anroet}}).', |
| 382 | + 'validator_list_omitted' => 'Disoñjet eo bet an {{PLURAL:$2|talvoudenn|talvoudennoù}} $1.', |
| 383 | +); |
| 384 | + |
| 385 | +/** Bosnian (Bosanski) |
| 386 | + * @author CERminator |
| 387 | + */ |
| 388 | +$messages['bs'] = array( |
| 389 | + '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.', |
| 390 | + 'validator-warning' => 'Upozorenje: $1', |
| 391 | + 'validator-error' => 'Greška: $1', |
| 392 | + 'validator-fatal-error' => 'Fatalna greška: $1', |
| 393 | + 'validator_error_parameters' => 'U Vašoj sintaksi {{PLURAL:$1|je|su}} {{PLURAL:$1|otkivena slijedeća greška|otkrivene slijedeće greške}}:', |
| 394 | + 'validator_warning_parameters' => '{{PLURAL:$1|Postoji greška|Postoje greške}} u Vašoj sintaksi.', |
| 395 | + 'validator-warning-adittional-errors' => '... i {{PLURAL:$1|još jedan problem|još nekoliko problema}}.', |
| 396 | + 'validator_error_unknown_argument' => '$1 nije valjan parametar.', |
| 397 | + 'validator_error_required_missing' => 'Obavezni parametar $1 nije naveden.', |
| 398 | + 'validator-error-override-argument' => 'Pokušano da se preskoči parametar $1 (vrijednost: $2) vrijednošću "$3"', |
| 399 | + 'validator-listerrors-normal' => 'Normalno', |
| 400 | + 'validator_error_empty_argument' => 'Parametar $1 ne može imati praznu vrijednost.', |
| 401 | + 'validator_error_must_be_number' => 'Parametar $1 može biti samo broj.', |
| 402 | + 'validator_error_must_be_integer' => 'Parametar $1 može biti samo cijeli broj.', |
| 403 | + 'validator-error-must-be-float' => 'Parametar $1 može biti samo broj sa plutajućim zarezom.', |
| 404 | + 'validator_error_invalid_range' => 'Parametar $1 mora biti između $2 i $3.', |
| 405 | + 'validator-error-invalid-length' => 'Parametar $1 mora imati dužinu $2.', |
| 406 | + 'validator-error-invalid-length-range' => 'Parametar $1 mora imati dužinu između $2 i $3.', |
| 407 | + 'validator_error_invalid_argument' => 'Vrijednost $1 nije valjana za parametar $2.', |
| 408 | + 'validator_list_error_empty_argument' => 'Parametar $1 ne prima prazne vrijednosti.', |
| 409 | + 'validator_list_error_must_be_number' => 'Parametar $1 može sadržavati samo brojeve.', |
| 410 | + 'validator_list_error_must_be_integer' => 'Parametar $1 može sadržavati samo cijele brojeve.', |
| 411 | + 'validator_list_error_invalid_range' => 'Sve vrijednosti parametra $1 moraju biti između $2 i $3.', |
| 412 | + 'validator_list_error_invalid_argument' => 'Jedna ili više vrijednosti za parametar $1 nisu valjane.', |
| 413 | + 'validator_error_accepts_only' => 'Vrijednost "$4" nije valjana za parametar $1. On prihvata samo {{PLURAL:$3|ovu vrijednost|ove vrijednosti}}: $2.', |
| 414 | + 'validator_list_omitted' => '{{PLURAL:$2|Vrijednost|Vrijednosti}} $1 {{PLURAL:$2|je ispuštena|su ispuštene}}.', |
| 415 | +); |
| 416 | + |
| 417 | +/** Czech (Česky) |
| 418 | + * @author Matěj Grabovský |
| 419 | + * @author Mormegil |
| 420 | + * @author Reaperman |
| 421 | + */ |
| 422 | +$messages['cs'] = array( |
| 423 | + '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.', |
| 424 | + 'validator_error_parameters' => 'Ve vaší syntaxi {{PLURAL:$1|byla nalezena následující chyba|byly nalezeny následující chyby}}:', |
| 425 | + 'validator_warning_parameters' => 'Ve vaší syntaxi {{PLURAL:$1|je chyba|jsou chyby}}.', |
| 426 | + 'validator_error_unknown_argument' => '$1 není platný parametr.', |
| 427 | + 'validator_error_required_missing' => 'Povinný parameter $1 nebyl specifikován.', |
| 428 | + 'validator_error_empty_argument' => 'Parametr $1 nemůže být prázdný.', |
| 429 | + 'validator_error_must_be_number' => 'Parametr $1 může být pouze číslo.', |
| 430 | + 'validator_error_must_be_integer' => 'Parametr $1 může být pouze celé číslo.', |
| 431 | + 'validator_error_invalid_range' => 'Parametr $1 musí být v rozmezí $2 až $3.', |
| 432 | + 'validator_error_invalid_argument' => '$1 není platná hodnota pro parametr $2.', |
| 433 | + 'validator_list_error_empty_argument' => 'Parametr $1 npeřijímá prázdné hoodnoty.', |
| 434 | + 'validator_list_error_must_be_number' => 'Parametr $1 může obsahovat pouze čísla.', |
| 435 | + 'validator_list_error_must_be_integer' => 'Paramter $1 může obsahovat pouze celá čísla.', |
| 436 | + 'validator_list_error_invalid_range' => 'Všechny hodnoty parametru $1 musí být v rozmezí $2 až $3.', |
| 437 | + 'validator_list_error_invalid_argument' => 'Jedna nebo více hodnot parametru $1 jsou neplatné.', |
| 438 | + 'validator_error_accepts_only' => 'Parametr $1 nemůže mít hodnotu „$4“; přijímá pouze {{PLURAL:$3|tuto hodnotu|tyto hodnoty}}: $2.', |
| 439 | + 'validator_list_omitted' => '{{PLURAL:$2|Hodnota $1 byla vynechána|Hodnoty $1 byly vynechány}}.', |
| 440 | +); |
| 441 | + |
| 442 | +/** German (Deutsch) |
| 443 | + * @author DaSch |
| 444 | + * @author Imre |
| 445 | + * @author Kghbln |
| 446 | + * @author LWChris |
| 447 | + */ |
| 448 | +$messages['de'] = array( |
| 449 | + 'validator-desc' => 'Ermöglicht es anderen Softwareerweiterungen Parameter verarbeiten zu können', |
| 450 | + 'validator-warning' => 'Warnung: $1', |
| 451 | + 'validator-error' => 'Fehler: $1', |
| 452 | + 'validator-fatal-error' => "'''Schwerwiegender Fehler:''' $1", |
| 453 | + 'validator_error_parameters' => '{{PLURAL:$1|Der folgende Fehler wurde|Die folgenden Fehler wurden}} in der Syntax gefunden:', |
| 454 | + 'validator_warning_parameters' => '{{PLURAL:$1|Es ist ein Fehler|Es sind Fehler}} in der Syntax.', |
| 455 | + 'validator-warning-adittional-errors' => '… und {{PLURAL:$1|ein weiteres Problem|weitere Probleme}}.', |
| 456 | + 'validator-error-omitted' => '{{PLURAL:$2|Der Wert „$1“ wurde|Die Werte „$1“ wurden}} ausgelassen.', |
| 457 | + 'validator-error-problem' => 'Es gab ein Problem mit Parameter $1.', |
| 458 | + 'validator_error_unknown_argument' => '$1 ist kein gültiger Parameter.', |
| 459 | + 'validator_error_required_missing' => 'Der notwendige Parameter $1 wurde nicht angegeben.', |
| 460 | + 'validator-error-override-argument' => 'Es wurde versucht Parameter $1 ($2) mit dem Wert „$3“ zu überschreiben.', |
| 461 | + 'validator-type-string' => 'Text', |
| 462 | + 'validator-type-number' => 'Zahl', |
| 463 | + 'validator-type-integer' => 'Ganzzahl', |
| 464 | + 'validator-type-float' => 'Zahl', |
| 465 | + 'validator-type-boolean' => 'Ja/Nein', |
| 466 | + 'validator-type-char' => 'Zeichen', |
| 467 | + 'validator-listerrors-errors' => 'Fehler', |
| 468 | + 'validator-listerrors-minor' => 'Marginal', |
| 469 | + 'validator-listerrors-low' => 'Klein', |
| 470 | + 'validator-listerrors-normal' => 'Normal', |
| 471 | + 'validator-listerrors-high' => 'Groß', |
| 472 | + 'validator-listerrors-fatal' => 'Schwerwiegend', |
| 473 | + 'validator-listerrors-description' => 'Zeigt Fehler und Warnungen an, die bei über die Erweiterung Validator genutzten Parserhooks auftraten. |
| 474 | +Zeigt sie lediglich bezüglich der Parserhooks an, die über dem Element „listerrors“ eingefügt wurden. „Listerrors“ sollte daher am oder gegen Ende der Seite eingefügt werden, um alle Fehler und Warnungen angezeigt zu bekommen.', |
| 475 | + 'validator-listerrors-par-minseverity' => 'Der Mindestschweregrad eines Problems, damit dieses angezeigt wird.', |
| 476 | + 'validator-describe-description' => 'Erzeugt die Dokumentation für einen oder mehrere Parserhooks, die mit der Erweiterung Validator definiert wurden.', |
| 477 | + 'validator-describe-notfound' => 'Es gibt keinen Parserhook, der „$1“ verarbeitet.', |
| 478 | + 'validator-describe-descriptionmsg' => "'''Beschreibung:''' $1", |
| 479 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Alias|Aliasse}}:''' $1", |
| 480 | + 'validator-describe-parserfunction' => 'Lediglich als Parserfunktion implementiert.', |
| 481 | + 'validator-describe-tagextension' => 'Lediglich als Elementerweiterung implementiert.', |
| 482 | + 'validator-describe-bothhooks' => 'Sowohl als Parserfunktion wie auch Elementerweiterung implementiert.', |
| 483 | + 'validator-describe-par-hooks' => 'Die Parserhooks für welche die Dokumentation angezeigt werden soll.', |
| 484 | + 'validator-describe-par-pre' => 'Ermöglicht die Ausgabe der Dokumentation in Wikitext ohne dass dieser bei der Darstellung der Seite genutzt wird.', |
| 485 | + 'validator-describe-listtype' => 'Liste von $1 {{PLURAL:$1|Elemente|Elementen}}', |
| 486 | + 'validator-describe-empty' => 'leer', |
| 487 | + 'validator-describe-required' => 'erforderlich', |
| 488 | + 'validator-describe-header-parameter' => 'Parameter', |
| 489 | + 'validator-describe-header-aliases' => 'Aliasse', |
| 490 | + 'validator-describe-header-type' => 'Typ', |
| 491 | + 'validator-describe-header-default' => 'Standard', |
| 492 | + 'validator-describe-header-description' => 'Beschreibung', |
| 493 | + 'validator-describe-parameters' => 'Parameter', |
| 494 | + 'validator-describe-syntax' => 'Syntax', |
| 495 | + 'validator-describe-tagmin' => 'Elementerweiterung, lediglich mit den erforderlichen Parametern.', |
| 496 | + 'validator-describe-tagmax' => 'Elementerweiterung mit allen Parametern.', |
| 497 | + 'validator-describe-tagdefault' => 'Elementerweiterung mit allen Parametern, welche die Standardnotation für Parameter nutzen.', |
| 498 | + 'validator-describe-pfmin' => 'Parserfunktion, lediglich mit den erforderlichen Parametern.', |
| 499 | + 'validator-describe-pfmax' => 'Parserfunktion mit allen Parametern.', |
| 500 | + 'validator-describe-pfdefault' => 'Parserfunktion mit allen Parametern, welche die Standardnotation für Parameter nutzen.', |
| 501 | + 'validator-describe-autogen' => 'Der Inhalt dieses Abschnitts wurde automatisch durch den Parserhook „describe“ der Erweiterung Validator erzeugt.', |
| 502 | + 'validator_error_empty_argument' => 'Parameter $1 kann keinen leeren Wert haben.', |
| 503 | + 'validator_error_must_be_number' => 'Parameter $1 kann nur eine Nummer sein.', |
| 504 | + 'validator_error_must_be_integer' => 'Parameter $1 kann nur eine ganze Zahl sein.', |
| 505 | + 'validator-error-must-be-float' => 'Parameter $1 kann nur eine Gleitkommazahl sein.', |
| 506 | + 'validator_error_invalid_range' => 'Parameter $1 muss zwischen $2 und $3 liegen.', |
| 507 | + 'validator-error-invalid-regex' => 'Parameter $1 muss diesem regulären Ausdruck entsprechen: $2.', |
| 508 | + 'validator-error-invalid-length' => 'Parameter $1 muss eine Länge von $2 haben.', |
| 509 | + 'validator-error-invalid-length-range' => 'Parameter $1 muss eine Länge zwischen $2 und $3 haben.', |
| 510 | + 'validator_error_invalid_argument' => 'Der Wert „$1“ ist nicht gültig für Parameter $2.', |
| 511 | + 'validator_list_error_empty_argument' => 'Parameter $1 akzeptiert keine leeren Werte.', |
| 512 | + 'validator_list_error_must_be_number' => 'Parameter $1 kann nur Ziffern enthalten.', |
| 513 | + 'validator_list_error_must_be_integer' => 'Parameter $1 kann nur ganze Zahlen enthalten.', |
| 514 | + 'validator-list-error-must-be-float' => 'Parameter $1 kann nur Gleitkommazahlen enthalten.', |
| 515 | + 'validator_list_error_invalid_range' => 'Alle Werte des Parameters $1 müssen zwischen „$2“ und „$3“ liegen.', |
| 516 | + 'validator-list-error-invalid-regex' => 'Alle Werte des Parameters $1 müssen diesem regulären Ausdruck entsprechen: $2.', |
| 517 | + 'validator_list_error_invalid_argument' => 'Einer oder mehrere Werte für Parameter $1 sind ungültig.', |
| 518 | + 'validator-list-error-accepts-only' => 'Einer oder mehrere Werte für Parameter $1 sind ungültig. |
| 519 | +Nur {{PLURAL:$3|der folgende Wert wird|die folgenden Werte werden}} akzeptiert: $2.', |
| 520 | + 'validator-list-error-accepts-only-omitted' => 'Einer oder mehrere Werte für Parameter $1 sind ungültig. |
| 521 | +Nur {{PLURAL:$3|der folgende Wert wird|die folgenden Werte werden}} akzeptiert: $2 (sowie $4 ausgelassene {{PLURAL:$4|Wert|Werte}}).', |
| 522 | + 'validator_error_accepts_only' => 'Der Wert „$4“ ist nicht gültig für Parameter $1. |
| 523 | +Nur {{PLURAL:$3|der folgende Wert wird|die folgenden Werte werden}} akzeptiert: $2.', |
| 524 | + 'validator-error-accepts-only-omitted' => 'Der Wert „$2“ ist nicht gültig für Parameter $1. |
| 525 | +Nur {{PLURAL:$5|der folgende Wert wird|die folgenden Werte werden}} akzeptiert: $3 (sowie $4 ausgelassene {{PLURAL:$4|Wert|Werte}}).', |
| 526 | + 'validator_list_omitted' => '{{PLURAL:$2|Der Wert „$1“ wurde|Die Werte „$1“ wurden}} ausgelassen.', |
| 527 | +); |
| 528 | + |
| 529 | +/** Lower Sorbian (Dolnoserbski) |
| 530 | + * @author Michawiki |
| 531 | + */ |
| 532 | +$messages['dsb'] = array( |
| 533 | + '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', |
| 534 | + 'validator-warning' => 'Warnowanje: $1', |
| 535 | + 'validator-error' => 'Zmólka: $1', |
| 536 | + 'validator-fatal-error' => 'Rozwažna zmólka: $1', |
| 537 | + '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:', |
| 538 | + 'validator_warning_parameters' => '{{PLURAL:$1|Jo zmólka|Stej zmólce|Su zmólki|Su zmólki}} w twójej syntaksy.', |
| 539 | + 'validator-error-problem' => 'Jo był problem z parametrom $1.', |
| 540 | + 'validator_error_unknown_argument' => '$1 njejo płaśiwy parameter.', |
| 541 | + 'validator_error_required_missing' => 'Trěbny parameter $1 njejo pódany.', |
| 542 | + 'validator-type-string' => 'tekst', |
| 543 | + 'validator-type-number' => 'licba', |
| 544 | + 'validator-type-integer' => 'ceła licba', |
| 545 | + 'validator-type-float' => 'licba', |
| 546 | + 'validator-type-boolean' => 'jo/ně', |
| 547 | + 'validator-type-char' => 'znamuško', |
| 548 | + 'validator-listerrors-errors' => 'Zmólki', |
| 549 | + 'validator-listerrors-minor' => 'Snadna', |
| 550 | + 'validator-listerrors-low' => 'Niska', |
| 551 | + 'validator-listerrors-normal' => 'Normalna', |
| 552 | + 'validator-listerrors-high' => 'Wusoka', |
| 553 | + 'validator-listerrors-fatal' => 'Rozwažna', |
| 554 | + 'validator-describe-descriptionmsg' => "'''wopisanje''': $1", |
| 555 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Alias|Aliasa|Aliase|Aliase}}''': $1", |
| 556 | + 'validator-describe-listtype' => 'Lisćina $1 {{PLURAL:$1|elementa|elementowu|elementow|elementow}}', |
| 557 | + 'validator-describe-empty' => 'prozny', |
| 558 | + 'validator-describe-required' => 'trěbny', |
| 559 | + 'validator-describe-header-parameter' => 'Parameter', |
| 560 | + 'validator-describe-header-aliases' => 'Aliase', |
| 561 | + 'validator-describe-header-type' => 'Typ', |
| 562 | + 'validator-describe-header-default' => 'Standard', |
| 563 | + 'validator-describe-header-description' => 'Wopisanje', |
| 564 | + 'validator-describe-parameters' => 'Parametry', |
| 565 | + 'validator-describe-syntax' => 'Syntaksa', |
| 566 | + 'validator_error_empty_argument' => 'Parameter $1 njamóžo proznu gódnotu měś.', |
| 567 | + 'validator_error_must_be_number' => 'Parameter $1 móžo jano licba byś.', |
| 568 | + 'validator_error_must_be_integer' => 'Parameter $1 móžo jano ceła licba byś.', |
| 569 | + 'validator_error_invalid_range' => 'Parameter $1 musy mjazy $2 a $3 byś.', |
| 570 | + 'validator_error_invalid_argument' => 'Gódnota $1 njejo płaśiwa za parameter $2.', |
| 571 | + 'validator_list_error_empty_argument' => 'Parameter $1 njeakceptěrujo prozne gódnoty.', |
| 572 | + 'validator_list_error_must_be_number' => 'Parameter $1 móžo jano licby wopśimjeś.', |
| 573 | + 'validator_list_error_must_be_integer' => 'Parameter $1 móžo jano cełe licby wopśimjeś.', |
| 574 | + 'validator_list_error_invalid_range' => 'Wšykne gódnoty parametra $1 muse mjazy $2 a $3 byś.', |
| 575 | + 'validator_list_error_invalid_argument' => 'Jadna gódnota abo wěcej gódnotow za parameter $1 su njepłaśiwe.', |
| 576 | + 'validator_error_accepts_only' => 'Gódnota "$4" njejo płaśiwa za parameter $1. Akcepteptěrujo se jano {{PLURAL:$3|toś ta gódnota|toś tej gódnośe|toś te gódnoty|toś te gódnoty}}: $2.', |
| 577 | + '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}}.', |
| 578 | +); |
| 579 | + |
| 580 | +/** Greek (Ελληνικά) |
| 581 | + * @author Dada |
| 582 | + * @author Lou |
| 583 | + * @author ZaDiak |
| 584 | + * @author Απεργός |
| 585 | + */ |
| 586 | +$messages['el'] = array( |
| 587 | + 'validator_error_unknown_argument' => '$1 δεν είναι μια έγκυρη παράμετρος.', |
| 588 | + 'validator_error_required_missing' => 'Λείπει η απαιτούμενη παράμετρος $1.', |
| 589 | + 'validator_error_must_be_number' => 'Η παράμετρος $1 μπορεί να είναι μόνο αριθμός.', |
| 590 | + 'validator_error_must_be_integer' => 'Η παράμετρος $1 μπορεί να είναι μόνο ακέραιος αριθμός.', |
| 591 | + 'validator_list_error_must_be_number' => 'Η παράμετρος $1 μπορεί να περιέχει μόνο αριθμούς.', |
| 592 | + 'validator_list_error_must_be_integer' => 'Η παράμετρος $1 μπορεί να περιέχει μόνο ακέραιους αριθμούς.', |
| 593 | + 'validator_list_error_invalid_range' => 'Όλες οι τιμές της παραμέτρου $1 πρέπει να είναι μεταξύ $2 και $3.', |
| 594 | +); |
| 595 | + |
| 596 | +/** Esperanto (Esperanto) |
| 597 | + * @author Yekrats |
| 598 | + */ |
| 599 | +$messages['eo'] = array( |
| 600 | + 'validator_error_unknown_argument' => '$1 ne estas valida parametro.', |
| 601 | + 'validator_error_required_missing' => 'La nepra parametro $1 mankas.', |
| 602 | + 'validator_error_empty_argument' => 'Parametro $1 ne povas esti nula valoro.', |
| 603 | + 'validator_error_must_be_number' => 'Parametro $1 nur povas esti numero.', |
| 604 | + 'validator_error_must_be_integer' => 'Parametro $1 nur povas esti entjero.', |
| 605 | + 'validator_error_invalid_range' => 'Parametro $1 estu inter $2 kaj $3.', |
| 606 | + 'validator_list_error_invalid_argument' => 'Unu aŭ pliaj valoroj por parametro $1 estas malvalida.', |
| 607 | +); |
| 608 | + |
| 609 | +/** Spanish (Español) |
| 610 | + * @author Crazymadlover |
| 611 | + * @author Imre |
| 612 | + * @author Translationista |
| 613 | + */ |
| 614 | +$messages['es'] = array( |
| 615 | + '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', |
| 616 | + 'validator-warning' => 'Advertencia: $1', |
| 617 | + 'validator-error' => 'Error: $1', |
| 618 | + 'validator-fatal-error' => 'Error fatal: $1', |
| 619 | + 'validator_error_parameters' => 'Se detectó {{PLURAL:$1|el siguiente error|los siguientes errores}} en la sintaxis empleada:', |
| 620 | + 'validator_warning_parameters' => 'Hay {{PLURAL:$1|un error|errores}} en tu sintaxis.', |
| 621 | + 'validator-warning-adittional-errors' => '...y {{PLURAL:$1|otro problema|muchos otros problemas}}.', |
| 622 | + 'validator-error-omitted' => '{{PLURAL:$2|el valor "$1" ha sido omitido|los valores "$1" han sido omitidos}}.', |
| 623 | + 'validator-error-problem' => 'Ha habido un problema con el parámetro $1.', |
| 624 | + 'validator_error_unknown_argument' => '$1 no es un parámetro válido.', |
| 625 | + 'validator_error_required_missing' => 'No se ha provisto el parámetro requerido $1.', |
| 626 | + 'validator-error-override-argument' => 'Se ha intentado sobreescribir el parámetro $1 (valor: $2) con el valor "$3"', |
| 627 | + 'validator-listerrors-errors' => 'Errores', |
| 628 | + 'validator-listerrors-minor' => 'Menor', |
| 629 | + 'validator-listerrors-low' => 'Bajo', |
| 630 | + 'validator-listerrors-normal' => 'Normal', |
| 631 | + 'validator-listerrors-high' => 'Alto', |
| 632 | + 'validator-listerrors-fatal' => 'Fatal', |
| 633 | + 'validator_error_empty_argument' => 'El parámetro $1 no puede tener un valor vacío.', |
| 634 | + 'validator_error_must_be_number' => 'El parámetro $1 sólo puede ser un número.', |
| 635 | + 'validator_error_must_be_integer' => 'El parámetro $1 sólo puede ser un número entero.', |
| 636 | + 'validator-error-must-be-float' => 'El parámetro $1 tiene que ser un número de punto flotante.', |
| 637 | + 'validator_error_invalid_range' => 'El parámetro $1 debe ser entre $2 y $3.', |
| 638 | + 'validator-error-invalid-regex' => 'El parámetro $1 tiene que coincidir con esta expresión racional : $2.', |
| 639 | + 'validator-error-invalid-length' => 'El parámetro $1 tiene que tener una longitud de $2.', |
| 640 | + 'validator-error-invalid-length-range' => 'El parámetro $1 tiene que tener una longitud comprendida entre $2 y $3.', |
| 641 | + 'validator_error_invalid_argument' => 'El valor $1 no es válido para el parámetro $2.', |
| 642 | + 'validator_list_error_empty_argument' => 'El parámetro $1 no acepta valores vacíos.', |
| 643 | + 'validator_list_error_must_be_number' => 'El parámetro $1 sólo puede contener números.', |
| 644 | + 'validator_list_error_must_be_integer' => 'El parámetro $1 sólo puede contener números enteros.', |
| 645 | + 'validator-list-error-must-be-float' => 'El parámetro $1 sólo puede contener floats.', |
| 646 | + 'validator_list_error_invalid_range' => 'Todos los valores del parámetro $1 deben ser entre $2 y $3.', |
| 647 | + 'validator-list-error-invalid-regex' => 'El parámetro $1 tiene que coincidir con esta expresión regular: $2.', |
| 648 | + 'validator_list_error_invalid_argument' => 'Uno o más valores del parámetros $1 son inválidos.', |
| 649 | + 'validator-list-error-accepts-only' => 'Uno o más valores para el parámetro $1 son inválidos. |
| 650 | +Sólo acepta{{PLURAL:$3|este valor| estos valores}}: $2.', |
| 651 | + 'validator-list-error-accepts-only-omitted' => 'Uno o más valores para el parámetro $1 son inválidos. |
| 652 | +Sólo acepta {{PLURAL:$3|este valor|estos valores}}: $2 (y $4 {{PLURAL:$4|valor omitido|valores omitidos}}).', |
| 653 | + 'validator_error_accepts_only' => 'El valor "$4" no es válido para el parámetro $1. El parámetro sólo acepta {{PLURAL:$3|este valor|estos valores}}: $2.', |
| 654 | + 'validator-error-accepts-only-omitted' => 'El valor $2 no es válido para el parámetro $1. |
| 655 | +Sólo acepta {{PLURAL:$5|este valor|estos valores}}: $3 (y $4 {{PLURAL:$4|valor omitido|valores omitidos}}).', |
| 656 | + 'validator_list_omitted' => '{{PLURAL:$2|El valor|Los valores}} $1 {{PLURAL:$2|ha sido omitido|han sido omitidos}}.', |
| 657 | +); |
| 658 | + |
| 659 | +/** Finnish (Suomi) |
| 660 | + * @author Crt |
| 661 | + * @author Silvonen |
| 662 | + * @author Str4nd |
| 663 | + */ |
| 664 | +$messages['fi'] = array( |
| 665 | + 'validator-desc' => 'Tarkastaja tarjoaa helpon tavan muille laajennuksille jäsenninfunktioiden ja tagilaajennusten parametrien tarkastukseen, oletusarvojen asettamiseen ja virheilmoitusten luomiseen.', |
| 666 | + 'validator_error_must_be_number' => 'Parametrin $1 on oltava luku.', |
| 667 | + 'validator_error_must_be_integer' => 'Parametrin $1 on oltava kokonaisluku.', |
| 668 | +); |
| 669 | + |
| 670 | +/** French (Français) |
| 671 | + * @author Cedric31 |
| 672 | + * @author Crochet.david |
| 673 | + * @author IAlex |
| 674 | + * @author Jean-Frédéric |
| 675 | + * @author McDutchie |
| 676 | + * @author Peter17 |
| 677 | + * @author PieRRoMaN |
| 678 | + * @author Sherbrooke |
| 679 | + * @author Urhixidur |
| 680 | + * @author Verdy p |
| 681 | + */ |
| 682 | +$messages['fr'] = array( |
| 683 | + 'validator-desc' => 'Le validateur fournit aux autres extensions un moyen simple de valider les paramètres des fonctions parseur et des extensions de balises, de définir des valeurs par défaut et de générer des messages d’erreur', |
| 684 | + 'validator-warning' => 'Attention : $1', |
| 685 | + 'validator-error' => 'Erreur : $1', |
| 686 | + 'validator-fatal-error' => 'Erreur fatale : $1', |
| 687 | + 'validator_error_parameters' => '{{PLURAL:$1|L’erreur suivante a été détectée|Les erreurs suivantes ont été détectées}} dans votre syntaxe :', |
| 688 | + 'validator_warning_parameters' => 'Il y a {{PLURAL:$1|une erreur|des erreurs}} dans votre syntaxe.', |
| 689 | + 'validator-warning-adittional-errors' => '... et {{PLURAL:$1|un problème supplémentaire|plusieurs autres problèmes}}.', |
| 690 | + 'validator-error-omitted' => '{{PLURAL:$2|La valeur « $1 » a été oubliée|Les valeurs « $1 » ont été oubliées}}.', |
| 691 | + 'validator-error-problem' => 'Il y a un problème avec le paramètre $1.', |
| 692 | + 'validator_error_unknown_argument' => '$1 n’est pas un paramètre valide.', |
| 693 | + 'validator_error_required_missing' => 'Le paramètre requis $1 n’est pas fourni.', |
| 694 | + 'validator-error-override-argument' => 'Le logiciel a essayé de remplacer le paramètre $1 (valeur : $2) avec la valeur « $3 »', |
| 695 | + 'validator-type-string' => 'texte', |
| 696 | + 'validator-type-number' => 'nombre', |
| 697 | + 'validator-type-integer' => 'nombre entier', |
| 698 | + 'validator-type-float' => 'nombre', |
| 699 | + 'validator-type-boolean' => 'oui/non', |
| 700 | + 'validator-type-char' => 'caractère', |
| 701 | + 'validator-listerrors-errors' => 'Erreurs', |
| 702 | + 'validator-listerrors-minor' => 'Mineur', |
| 703 | + 'validator-listerrors-low' => 'Faible', |
| 704 | + 'validator-listerrors-normal' => 'Normal', |
| 705 | + 'validator-listerrors-high' => 'Élevé', |
| 706 | + 'validator-listerrors-fatal' => 'Fatal', |
| 707 | + 'validator-listerrors-description' => "Liste les erreurs (et les avertissements) qui se sont produits dans les ''hooks'' de l'analyseur syntaxique ''via'' ''Validator''. |
| 708 | +Seules les listes pour les ''hooks'' de l'analyseur syntaxique (ajoutées où apparaît <code>listerrors</code>) sont insérées ; |
| 709 | +placer <code>listerrors</code> au plus bas de la page pour obtenir toutes les erreurs.", |
| 710 | + 'validator-listerrors-par-minseverity' => "La sévérité minimale d'une erreur pour être listée.", |
| 711 | + 'validator-describe-description' => "Génère la documentation pour un ou plusieurs ''hooks'' de l'analyseur syntaxique ''via'' ''Validator'.", |
| 712 | + 'validator-describe-notfound' => "Il n'y a pas de ''hook'' qui gère « $1 ».", |
| 713 | + 'validator-describe-descriptionmsg' => "'''Description''': $1", |
| 714 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Alias|Alias}}''': $1", |
| 715 | + 'validator-describe-parserfunction' => "Mis en oeuvre uniquement comme fonction de l'analyseur syntaxique.", |
| 716 | + 'validator-describe-tagextension' => "Mis en œuvre seulement comme balise d'extension.", |
| 717 | + 'validator-describe-bothhooks' => "Mis en oeuvre comme fonction de l'analyseur syntaxique et comme balise d'extension.", |
| 718 | + 'validator-describe-par-hooks' => "Les ''hooks'' de l'analyseur syntaxique dont il faut afficher la documentation.", |
| 719 | + 'validator-describe-par-pre' => "Permet d'obtenir le wikitexte de la documentation, sans qu'il soit rendu sur la page.", |
| 720 | + 'validator-describe-listtype' => 'Liste de $1 éléments', |
| 721 | + 'validator-describe-empty' => 'vide', |
| 722 | + 'validator-describe-required' => 'requis', |
| 723 | + 'validator-describe-header-parameter' => 'Paramètre', |
| 724 | + 'validator-describe-header-aliases' => 'Alias', |
| 725 | + 'validator-describe-header-type' => 'Type', |
| 726 | + 'validator-describe-header-default' => 'Défaut', |
| 727 | + 'validator-describe-header-description' => 'Description', |
| 728 | + 'validator-describe-parameters' => 'Paramètres', |
| 729 | + 'validator-describe-syntax' => 'Syntaxe', |
| 730 | + 'validator-describe-tagmin' => "Balise d'extension avec seulement les paramètres requis.", |
| 731 | + 'validator-describe-tagmax' => "Balise d'extension avec tous les paramètres.", |
| 732 | + 'validator-describe-tagdefault' => "Balise d'extension avec tous les paramètres en utilisant la notation par défaut des paramètres.", |
| 733 | + 'validator-describe-pfmin' => "Fonction de l'analyseur syntaxique avec seulement les paramètres requis.", |
| 734 | + 'validator-describe-pfmax' => "Fonction de l'analyseur syntaxique avec tous les paramètres.", |
| 735 | + 'validator-describe-pfdefault' => "Fonction de l'analyseur syntaxique avec tous les paramètres en utilisant la notation par défaut des paramètres.", |
| 736 | + 'validator-describe-autogen' => "Le contenu de cette section a été généré automatiquement par le ''hook'' ''Describe'' de l'extension ''Validator''.", |
| 737 | + 'validator_error_empty_argument' => 'Le paramètre $1 ne peut pas avoir une valeur vide.', |
| 738 | + 'validator_error_must_be_number' => 'Le paramètre $1 peut être uniquement un nombre.', |
| 739 | + 'validator_error_must_be_integer' => 'Le paramètre $1 peut seulement être un entier.', |
| 740 | + 'validator-error-must-be-float' => 'Le paramètre $1 doit être un nombre à virgule flottante.', |
| 741 | + 'validator_error_invalid_range' => 'Le paramètre $1 doit être entre $2 et $3.', |
| 742 | + 'validator-error-invalid-regex' => 'Le paramètre $1 doit vérifier cette expression rationnelle : « $2 ».', |
| 743 | + 'validator-error-invalid-length' => 'Le paramètre $1 doit avoir une longueur de $2.', |
| 744 | + 'validator-error-invalid-length-range' => 'Le paramètre $1 doit avoir une longueur comprise entre $2 et $3.', |
| 745 | + 'validator_error_invalid_argument' => 'La valeur $1 n’est pas valide pour le paramètre $2.', |
| 746 | + 'validator_list_error_empty_argument' => 'Le paramètre $1 n’accepte pas les valeurs vides.', |
| 747 | + 'validator_list_error_must_be_number' => 'Le paramètre $1 ne peut contenir que des nombres.', |
| 748 | + 'validator_list_error_must_be_integer' => 'Le paramètre $1 ne peut contenir que des entiers.', |
| 749 | + 'validator-list-error-must-be-float' => 'Le paramètre $1 ne peut contenir que des nombres à virgule.', |
| 750 | + 'validator_list_error_invalid_range' => 'Toutes les valeurs du paramètre $1 doivent être comprises entre $2 et $3.', |
| 751 | + 'validator-list-error-invalid-regex' => 'Toutes les valeurs du paramètre $1 doivent vérifier cette expression rationnelle : « $2 ».', |
| 752 | + 'validator_list_error_invalid_argument' => 'Une ou plusieurs valeurs du paramètre $1 sont invalides.', |
| 753 | + 'validator-list-error-accepts-only' => 'Une ou plusieurs valeur(s) du paramètre $1 est(sont) invalide(s). |
| 754 | +Il n’accepte que {{PLURAL:$3|cette valeur|ces valeurs}} : $2.', |
| 755 | + 'validator-list-error-accepts-only-omitted' => 'Une ou plusieurs valeur(s) du paramètre $1 est(sont) invalide(s). |
| 756 | +Celui-ci n’accepte que {{PLURAL:$3|cette valeur|ces valeurs}} : $2 (et $4 {{PLURAL:$4|valeur omise|valeurs omises}}).', |
| 757 | + 'validator_error_accepts_only' => "La valeur « $4 » n'est pas valable pour le paramètre $1. Il accepte uniquement {{PLURAL:$3|cette valeur|ces valeurs}} : $2.", |
| 758 | + 'validator-error-accepts-only-omitted' => 'La valeur « $2 » n’est pas valable pour le paramètre $1. |
| 759 | +Celui-ci n’accepte que {{PLURAL:$5|cette valeur|ces valeurs}} : $3 (et $4 {{PLURAL:$4|valeur omise|valeurs omises}}).', |
| 760 | + 'validator_list_omitted' => '{{PLURAL:$2|La valeur|Les valeurs}} $1 {{PLURAL:$2|a été oubliée|ont été oubliées}}.', |
| 761 | +); |
| 762 | + |
| 763 | +/** Franco-Provençal (Arpetan) |
| 764 | + * @author ChrisPtDe |
| 765 | + */ |
| 766 | +$messages['frp'] = array( |
| 767 | + 'validator-warning' => 'Avèrtissement : $1', |
| 768 | + 'validator-error' => 'Èrror : $1', |
| 769 | + 'validator-fatal-error' => 'Èrror fatala : $1', |
| 770 | + 'validator_error_parameters' => '{{PLURAL:$1|Ceta èrror at étâ dècelâ|Cetes èrrors ont étâ dècelâs}} dens voutra sintaxa :', |
| 771 | + 'validator_warning_parameters' => 'Y at {{PLURAL:$1|una èrror|des èrrors}} dens voutra sintaxa.', |
| 772 | + 'validator-warning-adittional-errors' => '... et un {{PLURAL:$1|problèmo de ples|mouél d’ôtros problèmos}}.', |
| 773 | + 'validator-error-omitted' => '{{PLURAL:$2|La valor « $1 » at étâ oubliâ|Les valors « $1 » ont étâ oubliâs}}.', |
| 774 | + 'validator-error-problem' => 'Y at un problèmo avouéc lo paramètre $1.', |
| 775 | + 'validator_error_unknown_argument' => '$1 est pas un paramètre valido.', |
| 776 | + 'validator_error_required_missing' => 'Lo paramètre nècèssèro $1 est pas balyê.', |
| 777 | + 'validator-error-override-argument' => 'La programeria at tâchiê de remplaciér lo paramètre $1 (valor : $2) avouéc la valor « $3 »', |
| 778 | + 'validator-type-string' => 'tèxto', |
| 779 | + 'validator-type-number' => 'nombro', |
| 780 | + 'validator-type-integer' => 'nombro entiér', |
| 781 | + 'validator-type-float' => 'nombro', |
| 782 | + 'validator-type-boolean' => 'ouè/nan', |
| 783 | + 'validator-type-char' => 'caractèro', |
| 784 | + 'validator-listerrors-errors' => 'Èrrors', |
| 785 | + 'validator-listerrors-minor' => 'Petiôt', |
| 786 | + 'validator-listerrors-low' => 'Fêblo', |
| 787 | + 'validator-listerrors-normal' => 'Normal', |
| 788 | + 'validator-listerrors-high' => 'Hôt', |
| 789 | + 'validator-listerrors-fatal' => 'Fatal', |
| 790 | + 'validator-describe-descriptionmsg' => "'''Dèscripcion :''' $1", |
| 791 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Nom paralèlo|Noms paralèlos}} :''' $1", |
| 792 | + 'validator-describe-listtype' => 'Lista de $1 èlèments', |
| 793 | + 'validator-describe-empty' => 'vouedo', |
| 794 | + 'validator-describe-required' => 'nècèssèro', |
| 795 | + 'validator-describe-header-parameter' => 'Paramètre', |
| 796 | + 'validator-describe-header-aliases' => 'Noms paralèlos', |
| 797 | + 'validator-describe-header-type' => 'Tipo', |
| 798 | + 'validator-describe-header-default' => 'Per dèfôt', |
| 799 | + 'validator-describe-header-description' => 'Dèscripcion', |
| 800 | + 'validator-describe-parameters' => 'Paramètres', |
| 801 | + 'validator-describe-syntax' => 'Sintaxa', |
| 802 | + 'validator_error_empty_argument' => 'Lo paramètre $1 pôt pas avêr una valor voueda.', |
| 803 | + 'validator_error_must_be_number' => 'Lo paramètre $1 pôt étre ren qu’un nombro.', |
| 804 | + 'validator_error_must_be_integer' => 'Lo paramètre $1 pôt étre ren qu’un entiér.', |
| 805 | + 'validator_error_invalid_range' => 'Lo paramètre $1 dêt étre entre-mié $2 et $3.', |
| 806 | + 'validator_error_invalid_argument' => 'La valor $1 est pas valida por lo paramètre $2.', |
| 807 | + 'validator_list_error_empty_argument' => 'Lo paramètre $1 accèpte pas les valors vouedes.', |
| 808 | + 'validator_list_error_must_be_number' => 'Lo paramètre $1 pôt contegnir ren que des nombros.', |
| 809 | + 'validator_list_error_must_be_integer' => 'Lo paramètre $1 pôt contegnir ren que des entiérs.', |
| 810 | + 'validator_list_error_invalid_range' => 'Totes les valors du paramètre $1 dêvont étre entre-mié $2 et $3.', |
| 811 | + 'validator_list_error_invalid_argument' => 'Yona ou ben un mouél de valors du paramètre $1 sont envalides.', |
| 812 | + 'validator_error_accepts_only' => 'La valor « $4 » est pas valida por lo paramètre $1. Accèpte ren que {{PLURAL:$3|ceta valor|cetes valors}} : $2.', |
| 813 | + 'validator_list_omitted' => '{{PLURAL:$2|La valor|Les valors}} $1 {{PLURAL:$2|at étâ oubliâ|ont étâ oubliâs}}.', |
| 814 | +); |
| 815 | + |
| 816 | +/** Galician (Galego) |
| 817 | + * @author Toliño |
| 818 | + */ |
| 819 | +$messages['gl'] = array( |
| 820 | + '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', |
| 821 | + 'validator-warning' => 'Atención: $1', |
| 822 | + 'validator-error' => 'Erro: $1', |
| 823 | + 'validator-fatal-error' => 'Erro fatal: $1', |
| 824 | + 'validator_error_parameters' => '{{PLURAL:$1|Detectouse o seguinte erro|Detectáronse os seguintes erros}} na sintaxe empregada:', |
| 825 | + 'validator_warning_parameters' => 'Hai {{PLURAL:$1|un erro|erros}} na súa sintaxe.', |
| 826 | + 'validator-warning-adittional-errors' => '... e {{PLURAL:$1|un problema máis|moitos máis problemas}}.', |
| 827 | + 'validator-error-omitted' => '{{PLURAL:$2|Omitiuse o valor "$1"|Omitíronse os valores "$1"}}.', |
| 828 | + 'validator-error-problem' => 'Houbo un problema co parámetro $1.', |
| 829 | + 'validator_error_unknown_argument' => '"$1" non é un parámetro válido.', |
| 830 | + 'validator_error_required_missing' => 'Non se proporcionou o parámetro $1 necesario.', |
| 831 | + 'validator-error-override-argument' => 'Intentouse sobrescribir o parámetro $1 (valor: $2) co valor "$3"', |
| 832 | + 'validator-type-string' => 'texto', |
| 833 | + 'validator-type-number' => 'número', |
| 834 | + 'validator-type-integer' => 'número completo', |
| 835 | + 'validator-type-float' => 'número', |
| 836 | + 'validator-type-boolean' => 'si/non', |
| 837 | + 'validator-type-char' => 'carácter', |
| 838 | + 'validator-listerrors-errors' => 'Erros', |
| 839 | + 'validator-listerrors-minor' => 'Menor', |
| 840 | + 'validator-listerrors-low' => 'Baixo', |
| 841 | + 'validator-listerrors-normal' => 'Normal', |
| 842 | + 'validator-listerrors-high' => 'Alto', |
| 843 | + 'validator-listerrors-fatal' => 'Fatal', |
| 844 | + 'validator-listerrors-description' => 'Lista os erros (e avisos) que ocorreron no asociador do analizador engadidos a través do Validator. |
| 845 | +Só aparecerán nas listas para os asociadores do analizador que estean colocados enriba de listerrors; |
| 846 | +coloque listerrors na parte inferior da páxina para obter todos os erros.', |
| 847 | + 'validator-listerrors-par-minseverity' => 'A severidade mínima dun problema para que apareza na lista.', |
| 848 | + 'validator-describe-description' => 'Xera a documentación para un ou máis asociadores do analizador definidos a través do Validator.', |
| 849 | + 'validator-describe-notfound' => 'Non hai ningún asociador do analizador que manexe "$1".', |
| 850 | + 'validator-describe-descriptionmsg' => "'''Descrición:''' $1", |
| 851 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Alcume|Alcumes}}:''' $1", |
| 852 | + 'validator-describe-parserfunction' => 'Implementado só como función analítica.', |
| 853 | + 'validator-describe-tagextension' => 'Implementado só como etiqueta de extensión.', |
| 854 | + 'validator-describe-bothhooks' => 'Implementado como función analítica e como etiqueta de extensión.', |
| 855 | + 'validator-describe-par-hooks' => 'O analizador de asociadores para o que mostrar a documentación.', |
| 856 | + 'validator-describe-par-pre' => 'Permite obter o texto wiki para a documentación, sen que sexa renderizado na páxina.', |
| 857 | + 'validator-describe-listtype' => 'Lista de $1 elementos', |
| 858 | + 'validator-describe-empty' => 'baleiro', |
| 859 | + 'validator-describe-required' => 'obrigatorio', |
| 860 | + 'validator-describe-header-parameter' => 'Parámetro', |
| 861 | + 'validator-describe-header-aliases' => 'Pseudónimos', |
| 862 | + 'validator-describe-header-type' => 'Tipo', |
| 863 | + 'validator-describe-header-default' => 'Por defecto', |
| 864 | + 'validator-describe-header-description' => 'Descrición', |
| 865 | + 'validator-describe-parameters' => 'Parámetros', |
| 866 | + 'validator-describe-syntax' => 'Sintaxe', |
| 867 | + 'validator-describe-tagmin' => 'Etiqueta de extensión cos únicos parámetros obrigatorios.', |
| 868 | + 'validator-describe-tagmax' => 'Etiqueta de extensión con todos os parámetros.', |
| 869 | + 'validator-describe-tagdefault' => 'Etiqueta de extensión con todos os parámetros, empregando a notación por defecto dos parámetros.', |
| 870 | + 'validator-describe-pfmin' => 'Función analítica cos únicos parámetros obrigatorios.', |
| 871 | + 'validator-describe-pfmax' => 'Función analítica con todos os parámetros.', |
| 872 | + 'validator-describe-pfdefault' => 'Función analítica con todos os parámetros, empregando a notación por defecto dos parámetros.', |
| 873 | + 'validator-describe-autogen' => 'O contido desta sección foi xerado automaticamente polo analizador do asociador "describir" da extensión Validator.', |
| 874 | + 'validator_error_empty_argument' => 'O parámetro $1 non pode ter un valor baleiro.', |
| 875 | + 'validator_error_must_be_number' => 'O parámetro $1 só pode ser un número.', |
| 876 | + 'validator_error_must_be_integer' => 'O parámetro $1 só pode ser un número enteiro.', |
| 877 | + 'validator-error-must-be-float' => 'O parámetro $1 só pode ser un número de coma flotante.', |
| 878 | + 'validator_error_invalid_range' => 'O parámetro $1 debe estar entre $2 e $3.', |
| 879 | + 'validator-error-invalid-regex' => 'O parámetro $1 debe coincidir con esta expresión regular: $2.', |
| 880 | + 'validator-error-invalid-length' => 'O parámetro $1 debe ter unha lonxitude de $2.', |
| 881 | + 'validator-error-invalid-length-range' => 'O parámetro $1 ter unha lonxitude de entre $2 e $3.', |
| 882 | + 'validator_error_invalid_argument' => 'O valor $1 non é válido para o parámetro $2.', |
| 883 | + 'validator_list_error_empty_argument' => 'O parámetro $1 non acepta valores en branco.', |
| 884 | + 'validator_list_error_must_be_number' => 'O parámetro $1 só pode conter números.', |
| 885 | + 'validator_list_error_must_be_integer' => 'O parámetro $1 só pode conter números enteiros.', |
| 886 | + 'validator-list-error-must-be-float' => 'O parámetro $1 só pode conter comas flotantes.', |
| 887 | + 'validator_list_error_invalid_range' => 'Todos os valores do parámetro $1 deben estar comprendidos entre $2 e $3.', |
| 888 | + 'validator-list-error-invalid-regex' => 'Todos os valores do parámetro $1 deben coincidir con esta expresión regular: $2.', |
| 889 | + 'validator_list_error_invalid_argument' => 'Un ou varios valores do parámetro $1 non son válidos.', |
| 890 | + 'validator-list-error-accepts-only' => 'Un ou varios valores do parámetro $1 non son válidos. |
| 891 | +Só acepta {{PLURAL:$3|este valor|estes valores}}: $2.', |
| 892 | + 'validator-list-error-accepts-only-omitted' => 'Un ou varios valores do parámetro $1 non son válidos. |
| 893 | +Só acepta {{PLURAL:$3|este valor|estes valores}}: $2 (e $4 {{PLURAL:$4|valor omitido|valores omitidos}}).', |
| 894 | + 'validator_error_accepts_only' => 'O valor "$4" non é válido para o parámetro "$1". Só acepta {{PLURAL:$3|este valor|estes valores}}: $2.', |
| 895 | + 'validator-error-accepts-only-omitted' => 'O valor "$2" non é válido para o parámetro $1. |
| 896 | +Só acepta {{PLURAL:$5|este valor|estes valores}}: $3 (e $4 {{PLURAL:$4|valor omitido|valores omitidos}}).', |
| 897 | + 'validator_list_omitted' => '{{PLURAL:$2|O valor|Os valores}} $1 {{PLURAL:$2|foi omitido|foron omitidos}}.', |
| 898 | +); |
| 899 | + |
| 900 | +/** Swiss German (Alemannisch) |
| 901 | + * @author Als-Holder |
| 902 | + */ |
| 903 | +$messages['gsw'] = array( |
| 904 | + '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', |
| 905 | + 'validator-warning' => 'Warnig: $1', |
| 906 | + 'validator-error' => 'Fähler: $1', |
| 907 | + 'validator-fatal-error' => 'Fähler, wu nit cha behobe wäre: $1', |
| 908 | + 'validator_error_parameters' => '{{PLURAL:$1|Dää Fähler isch|Die Fähler sin}} in Dyyre Syntax gfunde wore:', |
| 909 | + 'validator_warning_parameters' => 'S het {{PLURAL:$1|e Fähler|Fähler}} in dyyre Syntax.', |
| 910 | + 'validator-warning-adittional-errors' => '... un {{PLURAL:$1|e ander Probläm|$1 anderi Probläm}}.', |
| 911 | + 'validator-error-omitted' => '{{PLURAL:$2|Dr Wärt|D Wärt}} „$1“ {{PLURAL:$2|isch|sin}} uusgloo wore.', |
| 912 | + 'validator-error-problem' => 'S het e Probläm gee mit em Parameter $1.', |
| 913 | + 'validator_error_unknown_argument' => '$1 isch kei giltige Parameter.', |
| 914 | + 'validator_error_required_missing' => 'Dr Paramter $1, wu aagforderet woren isch, wird nit z Verfiegig gstellt.', |
| 915 | + 'validator-error-override-argument' => 'S isch versuecht wore, dr Parameter $1 (Wärt: $2) mit em Wärt „$3“ z iberschryybe', |
| 916 | + 'validator-type-string' => 'Täxt', |
| 917 | + 'validator-type-number' => 'Zahl', |
| 918 | + 'validator-type-integer' => 'Ganzzahl', |
| 919 | + 'validator-type-float' => 'Zahl', |
| 920 | + 'validator-type-boolean' => 'Jo/Nei', |
| 921 | + 'validator-type-char' => 'Zeiche', |
| 922 | + 'validator-listerrors-errors' => 'Fähler', |
| 923 | + 'validator-listerrors-minor' => 'Gring', |
| 924 | + 'validator-listerrors-low' => 'Chlei', |
| 925 | + 'validator-listerrors-normal' => 'Normal', |
| 926 | + 'validator-listerrors-high' => 'Groß', |
| 927 | + 'validator-listerrors-fatal' => 'Schwär', |
| 928 | + 'validator-listerrors-description' => 'Zeigt Fähler un Warnigen aa, wu ufträtte sin bi dr Parserhook, wu iber d Erwyterig Validator gnutzt wäre. |
| 929 | +Zeigt nume d Parserhook aa, wu iber em Elemänt „listerrors“ yygfiegt wore sin. |
| 930 | +„Listerrors“ sott wäge däm am oder gege Änd vu dr Syte yygfiegt wäre, ass alli Fähler un Warnigen aazeigt wäre.', |
| 931 | + 'validator-listerrors-par-minseverity' => 'Dr Mindeschtschwärigrad vun eme Probläm, ass es aazeigt wird.', |
| 932 | + 'validator-describe-description' => 'Generiert d Dokumentation fir ein oder mehreri Parserhook, wu mit dr Erwyterig Validator definiert wore sin.', |
| 933 | + 'validator-describe-notfound' => 'S git kei Parserhook, wu „$1“ verarbeitet.', |
| 934 | + 'validator-describe-descriptionmsg' => "'''Bschrybig:''' $1", |
| 935 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Alias|Aliasse}}:''' $1", |
| 936 | + 'validator-describe-parserfunction' => 'Numen as Parserfunktion implementiert.', |
| 937 | + 'validator-describe-tagextension' => 'Numen as Elementerweiteryg implementiert.', |
| 938 | + 'validator-describe-bothhooks' => 'As Parserfunktion un au as Elementerwyterig implementiert.', |
| 939 | + 'validator-describe-par-hooks' => 'D Parserhook, wu d Dokumentation derfir soll aazeigt wäre.', |
| 940 | + 'validator-describe-par-pre' => 'Macht d Uusgab vu dr Dokumentation in Wikitext megli ohni ass dää bi dr Darstellig vu dr Syte gnutzt wird.', |
| 941 | + 'validator-describe-listtype' => 'Lischt vu $1 {{PLURAL:$1|Element|Element}}', |
| 942 | + 'validator-describe-empty' => 'läär', |
| 943 | + 'validator-describe-required' => 'erforderlig', |
| 944 | + 'validator-describe-header-parameter' => 'Parameter', |
| 945 | + 'validator-describe-header-aliases' => 'Aliasse', |
| 946 | + 'validator-describe-header-type' => 'Typ', |
| 947 | + 'validator-describe-header-default' => 'Standard', |
| 948 | + 'validator-describe-header-description' => 'Bschrybig', |
| 949 | + 'validator-describe-parameters' => 'Parameter', |
| 950 | + 'validator-describe-syntax' => 'Syntax', |
| 951 | + 'validator-describe-tagmin' => 'Elementerwyterig, nume mit dr erforderlige Parameter.', |
| 952 | + 'validator-describe-tagmax' => 'Elementerwyterig mit allne Parameter.', |
| 953 | + 'validator-describe-tagdefault' => 'Elementerwyterig mit allne Parameter, wu d Standardnotation fir Parameter nutze.', |
| 954 | + 'validator-describe-pfmin' => 'Parserfunktion, nume mit dr erforderlige Parameter.', |
| 955 | + 'validator-describe-pfmax' => 'Parserfunktion mit allne Parameter.', |
| 956 | + 'validator-describe-pfdefault' => 'Parserfunktion mit allne Parameter, wu d Standardnotation fir Parameter nutze.', |
| 957 | + 'validator-describe-autogen' => 'Dr Inhalt vu däm Abschnitt isch automatisch dur dr Parserhook „describe“ vu dr Erwyterig Validator generiert wore.', |
| 958 | + 'validator_error_empty_argument' => 'Dr Parameter $1 cha kei lääre Wärt haa.', |
| 959 | + 'validator_error_must_be_number' => 'Dr Parameter $1 cha nume ne Zahl syy.', |
| 960 | + 'validator_error_must_be_integer' => 'Parameter $1 cha nume ne giltigi Zahl syy.', |
| 961 | + 'validator-error-must-be-float' => 'Parameter $1 cha nume ne Gleitkommazahl syy.', |
| 962 | + 'validator_error_invalid_range' => 'Dr Parameter $1 muess zwische $2 un $3 syy.', |
| 963 | + 'validator-error-invalid-regex' => 'Parameter $1 mueß däm reguläre Uusdruck entspräche: $2.', |
| 964 | + 'validator-error-invalid-length' => 'Parameter $1 mueß e Lengi haa vu $2.', |
| 965 | + 'validator-error-invalid-length-range' => 'Parameter $1 mueß e Lengi haa zwische $2 un $3.', |
| 966 | + 'validator_error_invalid_argument' => 'Dr Wärt $1 isch nit giltig fir dr Parameter $2.', |
| 967 | + 'validator_list_error_empty_argument' => 'Bim Parameter $1 sin keini lääre Wärt zuegloo.', |
| 968 | + 'validator_list_error_must_be_number' => 'Fir dr Parameter $1 si nume Zahle zuegloo.', |
| 969 | + 'validator_list_error_must_be_integer' => 'Fir dr Parameter $1 sin nume ganzi Zahle zuegloo.', |
| 970 | + 'validator-list-error-must-be-float' => 'Im Parameter $1 cha s nume Gleitkommazahle haa.', |
| 971 | + 'validator_list_error_invalid_range' => 'Alli Wärt fir dr Parameter $1 mien zwische $2 un $3 lige.', |
| 972 | + 'validator-list-error-invalid-regex' => 'Alli Wärt vum Parameter $1 mien däm reguläre Uusdruck entspräche: $2.', |
| 973 | + 'validator_list_error_invalid_argument' => 'Ein oder mehreri Wärt fir dr Parameter $1 sin nit giltig.', |
| 974 | + 'validator-list-error-accepts-only' => 'Ein oder meh Wärt fir dr Parameter $1 sin nit giltig. |
| 975 | +Nume {{PLURAL:$3|dää Wärt wird|die Wärt wäre}} akzeptiert: $2.', |
| 976 | + 'validator-list-error-accepts-only-omitted' => 'Ein oder meh Wärt fir dr Parameter $1 sin nit giltig. |
| 977 | +Nume {{PLURAL:$3|dää Wärt wird|die Wärt wäre}} akzeptiert: $2 (un $4 uusglosseni {{PLURAL:$4|Wärt|Wärt}}).', |
| 978 | + 'validator_error_accepts_only' => 'Dr Wärt „$4“ isch nit giltig fir dr Parameter $1. Nume {{PLURAL:$3|dää Wärt wird|die Wärt wäre}} akzeptiert: „$2“.', |
| 979 | + 'validator-error-accepts-only-omitted' => 'Dr Wärt „$2“ isch nit giltig fir dr Parameter $1. |
| 980 | +Nume {{PLURAL:$5|dää Wärt wird|die Wärt wäre}} akzeptiert: $3 (un $4 uusglosseni {{PLURAL:$4|Wärt|Wärt}}).', |
| 981 | + 'validator_list_omitted' => '{{PLURAL:$2|Dr Wärt|D Wärt}} $1 {{PLURAL:$2|isch|sin}} uusgloo wore.', |
| 982 | +); |
| 983 | + |
| 984 | +/** Hebrew (עברית) |
| 985 | + * @author Amire80 |
| 986 | + * @author Rotemliss |
| 987 | + * @author YaronSh |
| 988 | + */ |
| 989 | +$messages['he'] = array( |
| 990 | + 'validator-desc' => 'כלים כלליים לטיפול בפרמטרים עבור הרחבות אחרות', |
| 991 | + 'validator-warning' => 'אזהרה: $1', |
| 992 | + 'validator-error' => 'שגיאה: $1', |
| 993 | + 'validator-fatal-error' => 'שגיאה חמורה: $1', |
| 994 | + 'validator_error_parameters' => '{{PLURAL:$1|השגיאה הבאה נמצאה|השגיאות הבאות נמצאו}} בתחביר:', |
| 995 | + 'validator_warning_parameters' => '{{PLURAL:$1|ישנה שגיאה|ישנן שגיאות}} בתחביר שלכם.', |
| 996 | + 'validator-warning-adittional-errors' => '... ועוד {{PLURAL:$1|בעיה אחת|מספר בעיות}}.', |
| 997 | + 'validator-error-omitted' => '{{PLURAL:$2|הערך|הערכים}} "$1" {{PLURAL:$2|הושמט|הושמטו}}.', |
| 998 | + 'validator-error-problem' => 'הייתה בעיה עם הפרמטר $1.', |
| 999 | + 'validator_error_unknown_argument' => '$1 אינו פרמטר תקני.', |
| 1000 | + 'validator_error_required_missing' => 'הפרמטר הדרוש $1 לא צוין.', |
| 1001 | + 'validator-error-override-argument' => 'ניסיתי לעקוף את הפרמטר $1 (ערך: $2) ולהציב את הערך "$3"', |
| 1002 | + 'validator-type-string' => 'טקסט', |
| 1003 | + 'validator-type-number' => 'מספר', |
| 1004 | + 'validator-type-integer' => 'מספר שלם', |
| 1005 | + 'validator-type-float' => 'מספר', |
| 1006 | + 'validator-type-boolean' => 'כן או לא', |
| 1007 | + 'validator-type-char' => 'תו', |
| 1008 | + 'validator-listerrors-errors' => 'שגיאות', |
| 1009 | + 'validator-listerrors-minor' => 'משנית', |
| 1010 | + 'validator-listerrors-low' => 'נמוכה', |
| 1011 | + 'validator-listerrors-normal' => 'רגילה', |
| 1012 | + 'validator-listerrors-high' => 'גבוהה', |
| 1013 | + 'validator-listerrors-fatal' => 'חמורה', |
| 1014 | + 'validator-listerrors-description' => 'מכין רשימת של שגיאות ואזהרות שהתרחשו במילות הפעלה של מפענח שנוספו דרך Validator. |
| 1015 | +רק רשימות עבור מילות הפעלה של מפענח מעל listerrors; |
| 1016 | +יש לשים את listerrors בתחתית העמוד או קרוב אליה כדי לקבל את כל השגיאות.', |
| 1017 | + 'validator-listerrors-par-minseverity' => 'יש להזין את רמת החומרה המזערית.', |
| 1018 | + 'validator-describe-description' => 'מחולל תיעוד עבור מילות הפעלה במפענח שמוגדרות דרך Validator.', |
| 1019 | + 'validator-describe-notfound' => '"$1" אינו מטופל על־ידי שום מילת הפעלה במפענח.', |
| 1020 | + 'validator-describe-descriptionmsg' => "'''תיאור''': $1", |
| 1021 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|כינוי|כינויים}}''': $1", |
| 1022 | + 'validator-describe-parserfunction' => 'מיושם רק בתור פונקציית מפענח.', |
| 1023 | + 'validator-describe-tagextension' => 'מיושם רק בתור הרחבת תג.', |
| 1024 | + 'validator-describe-bothhooks' => 'מיושם הן בתור פונקציית מפענח והן בתור הרחבת תג.', |
| 1025 | + 'validator-describe-par-hooks' => 'מילות הפעלה של מפענח שעבורן יש להציג תיעוד.', |
| 1026 | + 'validator-describe-par-pre' => 'מאפשר לייצר את קוד הוויקי עבור התיעוד מבלי להציג אותו על הדף.', |
| 1027 | + 'validator-describe-listtype' => 'רשימה של פריטים מסוג "$1"', |
| 1028 | + 'validator-describe-empty' => 'ריק', |
| 1029 | + 'validator-describe-required' => 'נדרש', |
| 1030 | + 'validator-describe-header-parameter' => 'פרמטר', |
| 1031 | + 'validator-describe-header-aliases' => 'כינויים', |
| 1032 | + 'validator-describe-header-type' => 'סוג', |
| 1033 | + 'validator-describe-header-default' => 'בררת המחדל', |
| 1034 | + 'validator-describe-header-description' => 'תיאור', |
| 1035 | + 'validator-describe-parameters' => 'פרמטרים', |
| 1036 | + 'validator-describe-syntax' => 'תחביר', |
| 1037 | + 'validator-describe-tagmin' => 'הרחבת תג רק עם הפרמטרים הדרושים.', |
| 1038 | + 'validator-describe-tagmax' => 'הרחבת תג עם כל הפרמטרים.', |
| 1039 | + 'validator-describe-tagdefault' => 'הרחבת תג עם כל הפרמטרים עם ציון פרמטרים בבררת מחדל.', |
| 1040 | + 'validator-describe-pfmin' => 'פונקציית מפענח רק עם הפרמטרים הדרושים.', |
| 1041 | + 'validator-describe-pfmax' => 'פונקציית מפענח עם כל הפרמטרים.', |
| 1042 | + 'validator-describe-pfdefault' => 'פונקציית מפענח שבה כל הפרמטרים משתמשים בציון פרמטרים בבררת מחדל.', |
| 1043 | + 'validator-describe-autogen' => 'תוכן החלק הזה חולל באופן אוטומטי באמצעות מילת ההפעלה "descrbibe" של ההרחבה Validator.', |
| 1044 | + 'validator_error_empty_argument' => 'הפרמטר $1 לא יכול להיות ערך ריק.', |
| 1045 | + 'validator_error_must_be_number' => 'הפרמטר $1 יכול להיות מספר בלבד.', |
| 1046 | + 'validator_error_must_be_integer' => 'הפרמטר $1 יכול להיות מספר שלם בלבד.', |
| 1047 | + 'validator-error-must-be-float' => 'הפרמטר $1 יכול להיות רק מספר עם נקודה צפה.', |
| 1048 | + 'validator_error_invalid_range' => 'הפרמטר $1 חייב להיות בין $2 ל־$3.', |
| 1049 | + 'validator-error-invalid-regex' => 'פרמטר $1 חייב להתאים לביטוי הרגולרי הבא: $2.', |
| 1050 | + 'validator-error-invalid-length' => 'אורך פרמטר $1 חייב להיות $2.', |
| 1051 | + 'validator-error-invalid-length-range' => 'אורך פרמטר $1 חייב להיות בין $2 לבין $3.', |
| 1052 | + 'validator_error_invalid_argument' => 'הערך $1 אינו תקני עבור הפרמטר $2.', |
| 1053 | + 'validator_list_error_empty_argument' => 'פרמטר $1 אינו יכול להיות ריק.', |
| 1054 | + 'validator_list_error_must_be_number' => 'פרמטר $1 יכול להכיל רק מספרים.', |
| 1055 | + 'validator_list_error_must_be_integer' => 'פרמטר $1 יכול להכיל רק מספרים שלמים.', |
| 1056 | + 'validator-list-error-must-be-float' => 'פרמטר $1 יכול להכיל רק מספר עם נקודה צפה.', |
| 1057 | + 'validator_list_error_invalid_range' => 'כל הערכים של הפרמטר $1 צריכים להיות בין $2 לבין $3.', |
| 1058 | + 'validator-list-error-invalid-regex' => 'כל הערכים של הפרמטר $1 צריכים להתאים לביטוי הרגולרי הבא: $2.', |
| 1059 | + 'validator_list_error_invalid_argument' => 'ערך בלתי־חוקי אחד או יותר עבור הפרמטר $1.', |
| 1060 | + 'validator-list-error-accepts-only' => 'ערך בלתי־חוקי אחד או יותר עבור הפרמטר $1. הוא מקבל רק את {{PLURAL:$3|הערך הזה|הערכים האלה}}: $2.', |
| 1061 | + 'validator-list-error-accepts-only-omitted' => 'ערכים לא תקינים הוזנו לפרמטר "$1". הוא יכול לקבל רק את {{PLURAL:$3|הערך הבא|הערכים הבאים}}: $2 (וכן {{PLURAL:$4|ערך מושמט אחד|$4 ערכים מושמטים}}).', |
| 1062 | + 'validator_error_accepts_only' => 'הערך "$4" אינו תקין עבור הפרמטר $1. הוא מקבל רק את {{PLURAL:$3|הערך הבא|הערכים הבאים}}: $2.', |
| 1063 | + 'validator-error-accepts-only-omitted' => 'הערך "$2" אינו תקין עבור הפרמטר $1. הוא יכול לקבל רק את {{PLURAL:$5|הערך הבא|הערכים הבאים}}: $3 (וכן {{PLURAL:$4|ערך מושמט אחד|$4 ערכים מושמטים}}).', |
| 1064 | + 'validator_list_omitted' => '{{PLURAL:$2|הערך|הערכים}} $1 {{PLURAL:$2|הושמט|הושמטו}}.', |
| 1065 | +); |
| 1066 | + |
| 1067 | +/** Upper Sorbian (Hornjoserbsce) |
| 1068 | + * @author Michawiki |
| 1069 | + */ |
| 1070 | +$messages['hsb'] = array( |
| 1071 | + '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', |
| 1072 | + 'validator-warning' => 'Warnowanje: $1', |
| 1073 | + 'validator-error' => 'Zmylk: $1', |
| 1074 | + 'validator-fatal-error' => 'Chutny zmylk: $1', |
| 1075 | + '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}}:', |
| 1076 | + 'validator_warning_parameters' => '{{PLURAL:$1|Je zmylk|Stej zmylkaj|Su zmylki|Su zmylki}} w twojej syntaksy.', |
| 1077 | + 'validator-warning-adittional-errors' => '... a {{PLURAL:$1|dalši problem|dalšej problemaj|dalše problemy|dalše problemy}}.', |
| 1078 | + 'validator-error-omitted' => '{{PLURAL:$2|Hódnota "$1" je so wuwostajena|Hódnoće "$1" stej so wuwostajenej|Hódnoty "$1" su so wuwostajene|Hódnoty "$1" su so wuwostajene}}.', |
| 1079 | + 'validator-error-problem' => 'Bě problem z parametrom $1.', |
| 1080 | + 'validator_error_unknown_argument' => '$1 płaćiwy parameter njeje.', |
| 1081 | + 'validator_error_required_missing' => 'Trěbny parameter $1 njeje podaty.', |
| 1082 | + 'validator-error-override-argument' => 'Spyta so parameter $1 (hódnota: $2) přez "$3" přepisować', |
| 1083 | + 'validator-type-string' => 'tekst', |
| 1084 | + 'validator-type-number' => 'ličba', |
| 1085 | + 'validator-type-integer' => 'cyła ličba', |
| 1086 | + 'validator-type-float' => 'ličba', |
| 1087 | + 'validator-type-boolean' => 'haj/ně', |
| 1088 | + 'validator-type-char' => 'znamješko', |
| 1089 | + 'validator-listerrors-errors' => 'Zmylki', |
| 1090 | + 'validator-listerrors-minor' => 'Snadny', |
| 1091 | + 'validator-listerrors-low' => 'Niski', |
| 1092 | + 'validator-listerrors-normal' => 'Normalny', |
| 1093 | + 'validator-listerrors-high' => 'Wysoki', |
| 1094 | + 'validator-listerrors-fatal' => 'Chutny', |
| 1095 | + 'validator-listerrors-description' => 'Nalistuje zmylki (a warnowanja), kotrež su w parserowych hóčkach wustupili, kotrež su so přez Validator přidali. |
| 1096 | +Listuje jenož parserowe hóčki, kotrež bu wyše "listerror" zasunjene; |
| 1097 | +staj "listerrors" deleka na stronje abo blisko kónca strony, zo by wšě zmylki widźał.', |
| 1098 | + 'validator-listerrors-par-minseverity' => 'Minimalna ćežkosć problema, zo by so zwobraznił.', |
| 1099 | + 'validator-describe-description' => 'Płodźi dokumentaciju za jednu parserowu hóčku abo wjacore parserowe hóčki přez Validator.', |
| 1100 | + 'validator-describe-notfound' => 'Njeje parserowa hóčka, kotraž "$1" wobdźěłuje.', |
| 1101 | + 'validator-describe-descriptionmsg' => "'''Wopisanje''': $1", |
| 1102 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Alias|Aliasaj|Aliasy|Aliasow}}''': $1", |
| 1103 | + 'validator-describe-parserfunction' => 'Jenož jako parserowa funkcija implementowany.', |
| 1104 | + 'validator-describe-tagextension' => 'Jenož jako elementowe rozšěrjenje implementowany.', |
| 1105 | + 'validator-describe-bothhooks' => 'Jako parserowa funkcija kaž tež jako elementowe rozšěrjenje implementowany.', |
| 1106 | + 'validator-describe-par-hooks' => 'Parserowe hóčki, za kotrež ma so dokumentacija zwobraznić.', |
| 1107 | + 'validator-describe-par-pre' => 'Zmóžnja woprawdźity wikitekst za dokumentaciju wobstarać, bjez toho zo so na stronje rysował.', |
| 1108 | + 'validator-describe-listtype' => 'Lisćina $1 {{PLURAL:$1|elementa|elementow|elementow|elementow}}', |
| 1109 | + 'validator-describe-empty' => 'prózdny', |
| 1110 | + 'validator-describe-required' => 'trěbny', |
| 1111 | + 'validator-describe-header-parameter' => 'Parameter', |
| 1112 | + 'validator-describe-header-aliases' => 'Aliasy', |
| 1113 | + 'validator-describe-header-type' => 'Typ', |
| 1114 | + 'validator-describe-header-default' => 'Standard', |
| 1115 | + 'validator-describe-header-description' => 'Wopisanje', |
| 1116 | + 'validator-describe-parameters' => 'Parametry', |
| 1117 | + 'validator-describe-syntax' => 'Syntaksa', |
| 1118 | + 'validator-describe-tagmin' => 'Elementowe rozšěrjenje jenož z trěbnymi parametrami.', |
| 1119 | + 'validator-describe-tagmax' => 'Elementowe rozšěrjenje ze wšěmi parametrami.', |
| 1120 | + 'validator-describe-tagdefault' => 'Elementowe rozšěrjenje ze wšěmi parametrami, kotrež standardnu notaciju za parametry wužiwaja.', |
| 1121 | + 'validator-describe-pfmin' => 'Parserowa funkcija jenož z trěbnymi parametrami.', |
| 1122 | + 'validator-describe-pfmax' => 'Parserowa funkcija ze wšěmi parametrami.', |
| 1123 | + 'validator-describe-pfdefault' => 'Parserowa funkcija ze wšěmi parametrami, kotrež standardnu notaciju za parametry wužiwaja.', |
| 1124 | + 'validator-describe-autogen' => 'Wobsah tutoho wotrězka je so přez parserowu hóčku rozšěrjenja Validator awtomatisce spłodźił.', |
| 1125 | + 'validator_error_empty_argument' => 'Parameter $1 njemóže prózdnu hódnotu měć.', |
| 1126 | + 'validator_error_must_be_number' => 'Parameter $1 móže jenož ličba być.', |
| 1127 | + 'validator_error_must_be_integer' => 'Parameter $1 móže jenož cyła ličba być.', |
| 1128 | + 'validator-error-must-be-float' => 'Parameter $1 móže jenož ličba z pohibliwej komu być.', |
| 1129 | + 'validator_error_invalid_range' => 'Parameter $1 dyrbi mjez $2 a $3 być.', |
| 1130 | + 'validator-error-invalid-regex' => 'Parameter $1 dyrbi tutomu regularnemu wurazej wotpowědować: $2', |
| 1131 | + 'validator-error-invalid-length' => 'Parameter $1 dyrbi $2 dołhi być.', |
| 1132 | + 'validator-error-invalid-length-range' => 'Parameter $1 dyrbi mjez $2 a $3 dołhi być.', |
| 1133 | + 'validator_error_invalid_argument' => 'Hódnota $1 njeje płaćiwa za parameter $2.', |
| 1134 | + 'validator_list_error_empty_argument' => 'Parameter $1 njeakceptuje prózdne hódnoty.', |
| 1135 | + 'validator_list_error_must_be_number' => 'Parameter $1 móže jenož ličby wobsahować.', |
| 1136 | + 'validator_list_error_must_be_integer' => 'Parameter $1 móže jenož cyłe ličby wobsahować.', |
| 1137 | + 'validator-list-error-must-be-float' => 'Parameter $1 móže jenož ličby z pohibliwej komu wobsahować.', |
| 1138 | + 'validator_list_error_invalid_range' => 'Wšě hódnoty parametra $1 dyrbja mjez $2 a $3 być.', |
| 1139 | + 'validator-list-error-invalid-regex' => 'Wšě hódnoty parametra $1 dyrbja tutomu regularnemu wurazej wotpowědować: $2', |
| 1140 | + 'validator_list_error_invalid_argument' => 'Jedna hódnota abo wjace hódnotow za parameter $1 su njepłaćiwe.', |
| 1141 | + 'validator-list-error-accepts-only' => 'Jedna abo wjacore hódnoty za parameter $1 su njepłaćiwe. {{PLURAL:$3|Akceptuje|Akceptujetej|Akceptuja|Akceptuja}} so jenož {{PLURAL:$3|tuta hódnota|tutej hódnoće|tute hódnoty|tute hódnoty}}: $2', |
| 1142 | + 'validator-list-error-accepts-only-omitted' => 'Jedna abo wjacore hódnoty za parameter $1 su njepłaćiwe. {{PLURAL:$3|Akceptuje|Akceptujetej|Akceptuja|Akceptuja}} so jenož {{PLURAL:$3|tuta hódnota|tutej hódnoće|tute hódnoty|tute hódnoty}}: $2 (a $4 {{PLURAl:$4|wuwostajena hódnota|wuwostajenej hódnoće|wuwostajene hódnoty|wuwostajenych hódnotow}}).', |
| 1143 | + 'validator_error_accepts_only' => 'Hódnota "$4" za parameter $1 płaćiwa njeje. Akceptuje jenož {{PLURAL:$3|tutu hódnotu|tutej hódnoće|tute hódnoty|tute hódnoty}}: $2.', |
| 1144 | + 'validator-error-accepts-only-omitted' => 'Hódnota "$2" njeje płaćiwa za parameter $1. {{PLURAL:$5|Akceptuje|Akceptujetej|Akceptuja|Akceptuja}} so jenož {{PLURAL:$5|tuta hódnota|tutej hódnoće|tute hódnoty|tute hódnoty}}: $3 (a $4 {{PLURAl:$4|wuwostajena hódnota|wuwostajenej hódnoće|wuwostajene hódnoty|wuwostajenych hódnotow}}).', |
| 1145 | + '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}}.', |
| 1146 | +); |
| 1147 | + |
| 1148 | +/** Hungarian (Magyar) |
| 1149 | + * @author Dani |
| 1150 | + * @author Glanthor Reviol |
| 1151 | + */ |
| 1152 | +$messages['hu'] = array( |
| 1153 | + '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.', |
| 1154 | + 'validator-warning' => 'Figyelmeztetés: $1', |
| 1155 | + 'validator-error' => 'Hiba: $1', |
| 1156 | + 'validator-fatal-error' => 'Végzetes hiba: $1', |
| 1157 | + 'validator_error_parameters' => 'A következő {{PLURAL:$1|hiba található|hibák találhatóak}} a szintaxisban:', |
| 1158 | + 'validator_warning_parameters' => '{{PLURAL:$1|Hiba van|Hibák vannak}} a szintaxisodban.', |
| 1159 | + 'validator_error_unknown_argument' => 'A(z) $1 nem érvényes paraméter.', |
| 1160 | + 'validator_error_required_missing' => 'A(z) $1 kötelező paraméter nem lett megadva.', |
| 1161 | + 'validator-type-string' => 'szöveg', |
| 1162 | + 'validator-type-number' => 'szám', |
| 1163 | + 'validator-type-integer' => 'egész szám', |
| 1164 | + 'validator-type-float' => 'szám', |
| 1165 | + 'validator-type-boolean' => 'igen/nem', |
| 1166 | + 'validator-type-char' => 'karakter', |
| 1167 | + 'validator-listerrors-errors' => 'Hibák', |
| 1168 | + 'validator-listerrors-minor' => 'Apró', |
| 1169 | + 'validator-listerrors-low' => 'Alacsony', |
| 1170 | + 'validator-listerrors-normal' => 'Normális', |
| 1171 | + 'validator-listerrors-high' => 'Komoly', |
| 1172 | + 'validator-listerrors-fatal' => 'Végzetes', |
| 1173 | + 'validator-describe-descriptionmsg' => "'''Leírás''': $1", |
| 1174 | + 'validator-describe-empty' => 'üres', |
| 1175 | + 'validator-describe-required' => 'kötelező', |
| 1176 | + 'validator-describe-header-parameter' => 'Paraméter', |
| 1177 | + 'validator-describe-header-aliases' => 'Álnevek', |
| 1178 | + 'validator-describe-header-type' => 'Típus', |
| 1179 | + 'validator-describe-header-default' => 'Alapértelmezett', |
| 1180 | + 'validator-describe-header-description' => 'Leírás', |
| 1181 | + 'validator-describe-parameters' => 'Paraméterek', |
| 1182 | + 'validator-describe-syntax' => 'Szintaxis', |
| 1183 | + 'validator_error_empty_argument' => 'A(z) $1 paraméter értéke nem lehet üres.', |
| 1184 | + 'validator_error_must_be_number' => 'A(z) $1 paraméter csak szám lehet.', |
| 1185 | + 'validator_error_must_be_integer' => 'A(z) $1 paraméter csak egész szám lehet.', |
| 1186 | + 'validator-error-must-be-float' => 'A(z) $1 paraméter csak lebegőpontos szám lehet.', |
| 1187 | + 'validator_error_invalid_range' => 'A(z) $1 paraméter értékének $2 és $3 között kell lennie.', |
| 1188 | + 'validator-error-invalid-regex' => 'A(z) $1 paraméternek illeszkednie kell a következő reguláris kifejezésre: $2.', |
| 1189 | + 'validator-error-invalid-length' => 'A(z) $1 paraméternek legalább $2 karakter hosszúnak kell lennie.', |
| 1190 | + 'validator-error-invalid-length-range' => 'A(z) $1 paraméternek $2 és $3 karakter közötti hosszúnak kell lennie.', |
| 1191 | + 'validator_error_invalid_argument' => 'A(z) $1 érték nem érvényes a(z) $2 paraméterhez.', |
| 1192 | + 'validator_list_error_empty_argument' => 'A(z) $1 paraméter nem fogad el üres értékeket.', |
| 1193 | + 'validator_list_error_must_be_number' => 'A(z) $1 paraméter csak számokat tartalmazhat.', |
| 1194 | + 'validator_list_error_must_be_integer' => 'A(z) $1 paraméter csak egész számokat tartalmazhat.', |
| 1195 | + 'validator-list-error-must-be-float' => 'A(z) $1 paraméter csak lebegőpontos számokat tartalmazhat.', |
| 1196 | + 'validator_list_error_invalid_range' => 'A(z) $1 paraméter összes értékének $2 és $3 közöttinek kell lennie.', |
| 1197 | + 'validator_list_error_invalid_argument' => 'A(z) $1 paraméter egy vagy több értéke érvénytelen.', |
| 1198 | + 'validator_error_accepts_only' => 'A(z) $1 paraméter csak a következő {{PLURAL:$3|értéket|értékeket}} fogadja el: $2', |
| 1199 | + 'validator_list_omitted' => 'A(z) $1 {{PLURAL:$2|érték mellőzve lett.|értékek mellőzve lettek.}}', |
| 1200 | +); |
| 1201 | + |
| 1202 | +/** Interlingua (Interlingua) |
| 1203 | + * @author McDutchie |
| 1204 | + */ |
| 1205 | +$messages['ia'] = array( |
| 1206 | + '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', |
| 1207 | + 'validator-warning' => 'Aviso: $1', |
| 1208 | + 'validator-error' => 'Error: $1', |
| 1209 | + 'validator-fatal-error' => 'Error fatal: $1', |
| 1210 | + 'validator_error_parameters' => 'Le sequente {{PLURAL:$1|error|errores}} ha essite detegite in tu syntaxe:', |
| 1211 | + 'validator_warning_parameters' => 'Il ha {{PLURAL:$1|un error|errores}} in tu syntaxe.', |
| 1212 | + 'validator-warning-adittional-errors' => '... e {{PLURAL:$1|un altere problema|plure altere problemas}}.', |
| 1213 | + 'validator-error-omitted' => 'Le {{PLURAL:$2|valor|valores}} "$1" ha essite omittite.', |
| 1214 | + 'validator-error-problem' => 'Il habeva un problema con le parametro $1.', |
| 1215 | + 'validator_error_unknown_argument' => '$1 non es un parametro valide.', |
| 1216 | + 'validator_error_required_missing' => 'Le parametro requisite $1 non ha essite fornite.', |
| 1217 | + 'validator-error-override-argument' => 'Tentava supplantar le parametro $1 (valor: $2) con le valor "$3"', |
| 1218 | + 'validator-type-string' => 'texto', |
| 1219 | + 'validator-type-number' => 'numero', |
| 1220 | + 'validator-type-integer' => 'numero integre', |
| 1221 | + 'validator-type-float' => 'numero', |
| 1222 | + 'validator-type-boolean' => 'si/no', |
| 1223 | + 'validator-type-char' => 'character', |
| 1224 | + 'validator-listerrors-errors' => 'Errores', |
| 1225 | + 'validator-listerrors-minor' => 'Minor', |
| 1226 | + 'validator-listerrors-low' => 'Basse', |
| 1227 | + 'validator-listerrors-normal' => 'Normal', |
| 1228 | + 'validator-listerrors-high' => 'Alte', |
| 1229 | + 'validator-listerrors-fatal' => 'Fatal', |
| 1230 | + 'validator-listerrors-description' => 'Lista errores (e advertimentos) que occurreva in uncinos analysator addite con Validator. |
| 1231 | +Isto face listas solmente pro le uncinos analysator addite supra le loco ubi "listerrors" es inserite; |
| 1232 | +mitte "listerrors" al fin del pagina, o proxime al fin, pro obtener tote le errores.', |
| 1233 | + 'validator-listerrors-par-minseverity' => 'Le severitate minime de un problema pro esser listate.', |
| 1234 | + 'validator-describe-description' => 'Genera documentation pro un o plus uncinos del analysator syntactic, definite via Validator.', |
| 1235 | + 'validator-describe-notfound' => 'Non existe un uncino del analysator syntactic que manea "$1".', |
| 1236 | + 'validator-describe-descriptionmsg' => "'''Description''': $1", |
| 1237 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Alias|Aliases}}''': $1", |
| 1238 | + 'validator-describe-parserfunction' => 'Implementate solmente como function del analysator syntactic.', |
| 1239 | + 'validator-describe-tagextension' => 'Implementate solmente como extension de etiquetta.', |
| 1240 | + 'validator-describe-bothhooks' => 'Implementate como function del analysator syntactic e como extension de etiquetta.', |
| 1241 | + 'validator-describe-par-hooks' => 'Le uncinos del analysator syntactic pro le quales presentar documentation.', |
| 1242 | + 'validator-describe-par-pre' => 'Permitte obtener le ver wikitexto pro le documentation, sin render lo in le pagina.', |
| 1243 | + 'validator-describe-listtype' => 'Lista de $1 elementos', |
| 1244 | + 'validator-describe-empty' => 'vacue', |
| 1245 | + 'validator-describe-required' => 'requirite', |
| 1246 | + 'validator-describe-header-parameter' => 'Parametro', |
| 1247 | + 'validator-describe-header-aliases' => 'Aliases', |
| 1248 | + 'validator-describe-header-type' => 'Typo', |
| 1249 | + 'validator-describe-header-default' => 'Predefinition', |
| 1250 | + 'validator-describe-header-description' => 'Description', |
| 1251 | + 'validator-describe-parameters' => 'Parametros', |
| 1252 | + 'validator-describe-syntax' => 'Syntaxe', |
| 1253 | + 'validator-describe-tagmin' => 'Extension de etiquetta con solmente le parametros obligatori.', |
| 1254 | + 'validator-describe-tagmax' => 'Extension de etiquetta con tote le parametros.', |
| 1255 | + 'validator-describe-tagdefault' => 'Extension de etiquetta con tote le parametros usante le notation predefinite de parametros.', |
| 1256 | + 'validator-describe-pfmin' => 'Function analysator con solmente le parametros obligatori.', |
| 1257 | + 'validator-describe-pfmax' => 'Function analysator con tote le parametros.', |
| 1258 | + 'validator-describe-pfdefault' => 'Function analysator con tote le parametros usante le notation predefinite de parametros.', |
| 1259 | + 'validator-describe-autogen' => 'Le contento de iste section esseva auto-generate per le uncino analysator "describe" del extension Validator.', |
| 1260 | + 'validator_error_empty_argument' => 'Le parametro $1 non pote haber un valor vacue.', |
| 1261 | + 'validator_error_must_be_number' => 'Le parametro $1 pote solmente esser un numero.', |
| 1262 | + 'validator_error_must_be_integer' => 'Le parametro $1 pote solmente esser un numero integre.', |
| 1263 | + 'validator-error-must-be-float' => 'Le parametro $1 pote solmente esser un numero con fraction decimal.', |
| 1264 | + 'validator_error_invalid_range' => 'Le parametro $1 debe esser inter $2 e $3.', |
| 1265 | + 'validator-error-invalid-regex' => 'Le parametro $1 debe corresponder a iste expression regular: $2.', |
| 1266 | + 'validator-error-invalid-length' => 'Le parametro $1 debe haber un longitude de $2.', |
| 1267 | + 'validator-error-invalid-length-range' => 'Le parametro $1 debe haber un longitude inter $2 e $3.', |
| 1268 | + 'validator_error_invalid_argument' => 'Le valor $1 non es valide pro le parametro $2.', |
| 1269 | + 'validator_list_error_empty_argument' => 'Le parametro $1 non accepta valores vacue.', |
| 1270 | + 'validator_list_error_must_be_number' => 'Le parametro $1 pote solmente continer numeros.', |
| 1271 | + 'validator_list_error_must_be_integer' => 'Le parametro $1 pote solmente continer numeros integre.', |
| 1272 | + 'validator-list-error-must-be-float' => 'Le parametro $1 pote solmente continer numeros a comma flottante.', |
| 1273 | + 'validator_list_error_invalid_range' => 'Tote le valores del parametro $1 debe esser inter $2 e $3.', |
| 1274 | + 'validator-list-error-invalid-regex' => 'Tote le valores del parametro $1 debe corresponder a iste expression regular: $2.', |
| 1275 | + 'validator_list_error_invalid_argument' => 'Un o plus valores pro le parametro $1 es invalide.', |
| 1276 | + 'validator-list-error-accepts-only' => 'Un o plus valores del parametro $1 es invalide. |
| 1277 | +Illo accepta solmente iste {{PLURAL:$3|valor|valores}}: $2.', |
| 1278 | + 'validator-list-error-accepts-only-omitted' => 'Un o plus valores del parametro $1 es invalide. |
| 1279 | +Illo accepta solmente iste {{PLURAL:$3|valor|valores}}: $2. (e $4 {{PLURAL:$4|valor|valores}} omittite).', |
| 1280 | + 'validator_error_accepts_only' => 'Le valor "$4" non es valide pro le parametro $1. Illo accepta solmente iste {{PLURAL:$3|valor|valores}}: $2.', |
| 1281 | + 'validator-error-accepts-only-omitted' => 'Le valor "$2" non es valide pro le parametro $1. |
| 1282 | +Illo accepta solmente iste {{PLURAL:$5|valor|valores}}: $3 (e $4 {{PLURAL:$4|valor|valores}} omittite).', |
| 1283 | + 'validator_list_omitted' => 'Le {{PLURAL:$2|valor|valores}} $1 ha essite omittite.', |
| 1284 | +); |
| 1285 | + |
| 1286 | +/** Indonesian (Bahasa Indonesia) |
| 1287 | + * @author Bennylin |
| 1288 | + * @author Farras |
| 1289 | + * @author Irwangatot |
| 1290 | + * @author IvanLanin |
| 1291 | + */ |
| 1292 | +$messages['id'] = array( |
| 1293 | + 'validator-desc' => 'Validator memberikan cara mudah untuk ekstensi lain untuk memvalidasi parameter ParserFunction dan ekstensi tag, mengatur nilai biasa dan membuat pesan kesalahan', |
| 1294 | + 'validator-warning' => 'Peringatan: $1', |
| 1295 | + 'validator-error' => 'Kesalahan: $1', |
| 1296 | + 'validator-fatal-error' => 'Kesalahan fatal: $1', |
| 1297 | + 'validator_error_parameters' => '{{PLURAL:$1|Kesalahan|Kesalahan}} berikut telah terdeteksi pada sintaks Anda:', |
| 1298 | + 'validator_warning_parameters' => 'Terdapat {{PLURAL:$1|kesalahan|kesalahan}} pada sintaks Anda.', |
| 1299 | + 'validator-warning-adittional-errors' => '... dan {{PLURAL:$1|satu|banyak}} masalah lain.', |
| 1300 | + 'validator-error-omitted' => 'Nilai {{PLURAL:$2|"$1"|"$1"}} telah diabaikan.', |
| 1301 | + 'validator-error-problem' => 'Ada masalah dengan parameter $1.', |
| 1302 | + 'validator_error_unknown_argument' => '$1 bukan parameter yang benar.', |
| 1303 | + 'validator_error_required_missing' => 'Parameter $1 yang diperlukan tidak diberikan.', |
| 1304 | + 'validator-error-override-argument' => 'Mencoba menimpa parameter $1 (nilai: $2) dengan nilai "$3"', |
| 1305 | + 'validator-type-string' => 'teks', |
| 1306 | + 'validator-type-number' => 'nomor', |
| 1307 | + 'validator-type-integer' => 'bilangan bulat', |
| 1308 | + 'validator-type-float' => 'nomor', |
| 1309 | + 'validator-type-boolean' => 'ya/tidak', |
| 1310 | + 'validator-type-char' => 'karakter', |
| 1311 | + 'validator-listerrors-errors' => 'Kesalahan', |
| 1312 | + 'validator-listerrors-minor' => 'Kecil', |
| 1313 | + 'validator-listerrors-low' => 'Rendah', |
| 1314 | + 'validator-listerrors-normal' => 'Normal', |
| 1315 | + 'validator-listerrors-high' => 'Tinggi', |
| 1316 | + 'validator-listerrors-fatal' => 'Fatal', |
| 1317 | + 'validator-listerrors-description' => 'Daftar galat (dan peringatan) yang terjadi pada pengait parser yang ditambahkan melalui Validator. |
| 1318 | +Hanya daftar untuk pengait parser yang ditambahkan di atas bagian tempat listerrors disisipkan; |
| 1319 | +tempatkan listerrors pada atau di dekat bagian bawah halaman untuk mendapatkan semua kesalahan.', |
| 1320 | + 'validator-listerrors-par-minseverity' => 'Tingkat keparahan minimum masalah yang didaftarkan.', |
| 1321 | + 'validator-describe-description' => 'Menghasilkan dokumentasi untuk satu atau beberapa pengait parser yang didefinisikan melalui Validator.', |
| 1322 | + 'validator-describe-notfound' => 'Tidak ada pengait parser yang menangani "$1".', |
| 1323 | + 'validator-describe-descriptionmsg' => "'''Deskripsi''': $1", |
| 1324 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Alias|Alias}}''': $1", |
| 1325 | + 'validator-describe-parserfunction' => 'Diterapkan hanya sebagai fungsi parser.', |
| 1326 | + 'validator-describe-tagextension' => 'Diterapkan hanya sebagai ekstensi tag.', |
| 1327 | + 'validator-describe-bothhooks' => 'Diterapkan sebagai fungsi parser dan ekstensi tag.', |
| 1328 | + 'validator-describe-par-hooks' => 'Pengait parser untuk menampilkan dokumentasi.', |
| 1329 | + 'validator-describe-par-pre' => 'Memungkinkan Anda mengambil tekswiki aktual untuk dokumentasi, tanpa ditampilkan pada halaman.', |
| 1330 | + 'validator-describe-listtype' => 'Daftar $1 butir', |
| 1331 | + 'validator-describe-empty' => 'kosong', |
| 1332 | + 'validator-describe-required' => 'wajib diisi', |
| 1333 | + 'validator-describe-header-parameter' => 'Parameter', |
| 1334 | + 'validator-describe-header-aliases' => 'Alias', |
| 1335 | + 'validator-describe-header-type' => 'Jenis', |
| 1336 | + 'validator-describe-header-default' => 'Bawaan', |
| 1337 | + 'validator-describe-header-description' => 'Deskripsi', |
| 1338 | + 'validator-describe-parameters' => 'Parameter', |
| 1339 | + 'validator-describe-syntax' => 'Sintaksis', |
| 1340 | + 'validator-describe-tagmin' => 'Ekstensi tag hanya dengan parameter wajib.', |
| 1341 | + 'validator-describe-tagmax' => 'Ekstensi tag dengan semua parameter.', |
| 1342 | + 'validator-describe-tagdefault' => 'Ekstensi tag dengan semua parameter menggunakan notasi parameter bawaan.', |
| 1343 | + 'validator-describe-pfmin' => 'Fungsi parser hanya dengan parameter wajib.', |
| 1344 | + 'validator-describe-pfmax' => 'Fungsi parser dengan semua parameter.', |
| 1345 | + 'validator-describe-pfdefault' => 'Fungsi parser dengan semua parameter menggunakan notasi parameter bawaan.', |
| 1346 | + 'validator-describe-autogen' => 'Isi bagian ini adalah dihasilkan otomatis oleh pengait parser "describe" dari ekstensi Validator.', |
| 1347 | + 'validator_error_empty_argument' => 'Parameter $1 tidak dapat bernilai kosong.', |
| 1348 | + 'validator_error_must_be_number' => 'Parameter $1 hanya dapat berupa angka.', |
| 1349 | + 'validator_error_must_be_integer' => 'Parameter $1 hanya dapat berupa integer.', |
| 1350 | + 'validator-error-must-be-float' => 'Parameter $1 hanya dapat berupa angka titik kambang.', |
| 1351 | + 'validator_error_invalid_range' => 'Parameter $1 harus antara $2 dan $3.', |
| 1352 | + 'validator-error-invalid-regex' => 'Parameter $1 harus sesuai dengan persamaan reguler: $2.', |
| 1353 | + 'validator-error-invalid-length' => 'Parameter $1 harus memiliki panjang $2.', |
| 1354 | + 'validator-error-invalid-length-range' => 'Parameter $1 harus memiliki panjang antara $2 dan $3.', |
| 1355 | + 'validator_error_invalid_argument' => 'Nilai $1 tidak valid untuk parameter $2.', |
| 1356 | + 'validator_list_error_empty_argument' => 'Parameter $1 tidak menerima nilai kosong.', |
| 1357 | + 'validator_list_error_must_be_number' => 'Parameter $1 hanya dapat berisi angka.', |
| 1358 | + 'validator_list_error_must_be_integer' => 'Parameter $1 hanya dapat berisi bilangan bulat.', |
| 1359 | + 'validator-list-error-must-be-float' => 'Parameter $1 hanya dapat berisi angka kambang.', |
| 1360 | + 'validator_list_error_invalid_range' => 'Semua nilai parameter $1 harus antara $2 dan $3.', |
| 1361 | + 'validator-list-error-invalid-regex' => 'Semua nilai parameter $1 harus sesuai dengan persamaan reguler: $2.', |
| 1362 | + 'validator_list_error_invalid_argument' => 'Satu nilai atau lebih untuk parameter $1 tidak sah.', |
| 1363 | + 'validator-list-error-accepts-only' => 'Satu atau lebih nilai untuk parameter $1 tidak sah. Parameter itu hanya menerima {{PLURAL:$3|nilai berikut|nilai berikut}}: $2.', |
| 1364 | + 'validator-list-error-accepts-only-omitted' => 'Satu atau lebih nilai untuk parameter $1 tidak sah. Parameter itu hanya menerima {{PLURAL:$3|nilai berikut|nilai berikut}}: $2 (dan $4 {{PLURAL:$4|nilai|nilai}} yang diabaikan).', |
| 1365 | + 'validator_error_accepts_only' => 'Nilai "$4" tidak sah untuk parameter $1. Nilai yang diterima hanyalah {{PLURAL:$3|nilai ini|nilai-nilai ini}}: $2.', |
| 1366 | + 'validator-error-accepts-only-omitted' => 'Nilai "$2" tidak sah untuk parameter $1. Parameter itu hanya menerima {{PLURAL:$5|nilai berikut|nilai berikut}}: $3 (dan $4 {{PLURAL:$4|nilai|nilai}} yang diabaikan).', |
| 1367 | + 'validator_list_omitted' => '{{PLURAL:$2|Nilai|Nilai}} $1 {{PLURAL:$2|telah|telah}} dihapus.', |
| 1368 | +); |
| 1369 | + |
| 1370 | +/** Italian (Italiano) |
| 1371 | + * @author Civvì |
| 1372 | + * @author HalphaZ |
| 1373 | + */ |
| 1374 | +$messages['it'] = array( |
| 1375 | + 'validator-desc' => 'Validator fornisce ad altre estensiono un modo semplice per la convalida dei parametri delle funzioni parser e dei tag introdotti, per impostare i valori di default e per generare messaggi di errore.', |
| 1376 | + 'validator_error_parameters' => 'Nella tua sintassi {{PLURAL:$1|è stato individuato il seguente errore|sono stati individuati i seguenti errori}}:', |
| 1377 | + 'validator_warning_parameters' => "Nella tua sintassi {{PLURAL:$1|c'è un errore|ci sono errori}}.", |
| 1378 | + 'validator_error_unknown_argument' => '$1 non è un parametro valido.', |
| 1379 | + 'validator_error_required_missing' => 'Il parametro richiesto $1 non è stato fornito.', |
| 1380 | + 'validator_error_empty_argument' => 'Il parametro $1 non può avere un valore vuoto.', |
| 1381 | + 'validator_error_must_be_number' => 'Il parametro $1 può essere solo un numero.', |
| 1382 | + 'validator_error_must_be_integer' => 'Il parametro $1 può essere solo un intero.', |
| 1383 | + 'validator_error_invalid_range' => 'Il parametro $1 deve essere compreso tra $2 e $3.', |
| 1384 | + 'validator_error_invalid_argument' => 'Il valore $1 non è valido per il parametro $2.', |
| 1385 | + 'validator_list_error_empty_argument' => 'Il parametro $1 non accetta valori vuoti.', |
| 1386 | + 'validator_list_error_must_be_number' => 'Il parametro $1 può contenere solo numeri.', |
| 1387 | + 'validator_list_error_must_be_integer' => 'Il parametro $1 può contenere solo numeri interi.', |
| 1388 | + 'validator_list_error_invalid_range' => 'Tutti i valori del parametro $1 devono essere compresi tra $2 e $3.', |
| 1389 | + 'validator_list_error_invalid_argument' => 'Uno o più valori del parametro $1 non sono validi.', |
| 1390 | + 'validator_error_accepts_only' => 'Il parametro $1 accetta solo {{PLURAL:$3|questo valore|questi valori}}: $2.', |
| 1391 | + 'validator_list_omitted' => '{{PLURAL:$2|Il valore|I valori}} $1 {{PLURAL:$2|è stato omesso|sono stati omessi}}.', |
| 1392 | +); |
| 1393 | + |
| 1394 | +/** Japanese (日本語) |
| 1395 | + * @author Aotake |
| 1396 | + * @author Fryed-peach |
| 1397 | + * @author Marine-Blue |
| 1398 | + * @author Whym |
| 1399 | + * @author Yanajin66 |
| 1400 | + */ |
| 1401 | +$messages['ja'] = array( |
| 1402 | + 'validator-desc' => '妥当性評価器は他の拡張機能にパーサー関数やタグ拡張の引数の妥当性を確認したり、規定値を設定したり、エラーメッセージを生成する手段を提供する', |
| 1403 | + 'validator-warning' => '警告: $1', |
| 1404 | + 'validator-error' => 'エラー: $1', |
| 1405 | + 'validator-fatal-error' => '致命的なエラー: $1', |
| 1406 | + 'validator_error_parameters' => 'あなたの入力から以下の{{PLURAL:$1|エラー|エラー}}が検出されました:', |
| 1407 | + 'validator_warning_parameters' => 'あなたの入力した構文には{{PLURAL:$1|エラー}}があります。', |
| 1408 | + 'validator-warning-adittional-errors' => '...と{{PLURAL:$1|他の問題}}。', |
| 1409 | + 'validator-error-omitted' => '{{PLURAL:$2|$1 個の値}}が省略されました。', |
| 1410 | + 'validator-error-problem' => 'パラメータ $1 に問題が見つかりました。', |
| 1411 | + 'validator_error_unknown_argument' => '$1 は有効な引数ではありません。', |
| 1412 | + 'validator_error_required_missing' => '必須の引数「$1」が入力されていません。', |
| 1413 | + 'validator-error-override-argument' => '値"$3"とともにパラメータ$1 (値: $2)を無視してみてください', |
| 1414 | + 'validator-listerrors-errors' => 'エラー', |
| 1415 | + 'validator-listerrors-minor' => '非常に軽度', |
| 1416 | + 'validator-listerrors-low' => '軽度', |
| 1417 | + 'validator-listerrors-normal' => '普通', |
| 1418 | + 'validator-listerrors-high' => '重大', |
| 1419 | + 'validator-listerrors-fatal' => '非常に重大', |
| 1420 | + 'validator_error_empty_argument' => '引数「$1」は空の値をとることができません。', |
| 1421 | + 'validator_error_must_be_number' => '引数「$1」は数値でなければなりません。', |
| 1422 | + 'validator_error_must_be_integer' => '引数「$1」は整数でなければなりません。', |
| 1423 | + 'validator-error-must-be-float' => 'パラメータ$1は浮動小数点数になることだけができます。', |
| 1424 | + 'validator_error_invalid_range' => '引数「$1」は $2 と $3 の間の値でなければなりません。', |
| 1425 | + 'validator-error-invalid-regex' => 'パラメータ $1 は次の正規表現と一致する必要があります: $2', |
| 1426 | + 'validator-error-invalid-length' => 'パラメータ$1は$2の長さを保持していなければならない。', |
| 1427 | + 'validator-error-invalid-length-range' => 'パラメータ$1は$2と$3間の長さを保持していなければならない。', |
| 1428 | + 'validator_error_invalid_argument' => '値「$1」は引数「$2」として妥当ではありません。', |
| 1429 | + 'validator_list_error_empty_argument' => '引数「$1」は空の値をとりません。', |
| 1430 | + 'validator_list_error_must_be_number' => '引数「$1」は数値しかとることができません。', |
| 1431 | + 'validator_list_error_must_be_integer' => '引数「$1」は整数値しかとることができません。', |
| 1432 | + 'validator-list-error-must-be-float' => 'パラメータ $1 は整数値しか利用できません。', |
| 1433 | + 'validator_list_error_invalid_range' => '引数「$1」の値はすべて $2 と $3 の間のものでなくてはなりません。', |
| 1434 | + 'validator-list-error-invalid-regex' => 'パラメータ $1 の値は次の正規表現と一致する必要があります: $2', |
| 1435 | + 'validator_list_error_invalid_argument' => '引数「$1」の値に不正なものが1つ以上あります。', |
| 1436 | + 'validator-list-error-accepts-only' => 'パラメータ $1 に無効な値が含まれています。 |
| 1437 | +このパラメータは{{PLURAL:$3|次の値}}しか利用できません: $2', |
| 1438 | + 'validator-list-error-accepts-only-omitted' => 'パラメータ $1 に無効な値が含まれています。 |
| 1439 | +このパラメータは{{PLURAL:$3|次の値}}しか利用できません: $2 (と省略された $4 の値)', |
| 1440 | + 'validator_error_accepts_only' => '値"$4"はパラメーター$1にとって有効ではありません。{{PLURAL:$3|この値|これらの値}}のみ受け入れられます。: $2。', |
| 1441 | + 'validator-error-accepts-only-omitted' => 'パラメータ $1 の値 "$2" は有効ではありません。 |
| 1442 | +このパラメータは{{PLURAL:$5|次の値}}しか利用できません: $3 (と省略された $4 の値)', |
| 1443 | + 'validator_list_omitted' => '{{PLURAL:$2|値}} $1 は省かれました。', |
| 1444 | +); |
| 1445 | + |
| 1446 | +/** Colognian (Ripoarisch) |
| 1447 | + * @author Purodha |
| 1448 | + */ |
| 1449 | +$messages['ksh'] = array( |
| 1450 | + '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.', |
| 1451 | + 'validator-warning' => 'Opjepaß: $1', |
| 1452 | + 'validator-error' => 'Fähler: $1', |
| 1453 | + 'validator-fatal-error' => "'''Dä!''' $1", |
| 1454 | + 'validator_error_parameters' => '{{PLURAL:$1|Heh dä|Heh di|Keine}} Fähler {{PLURAL:$1|es|sin|es}} en Dinge Syntax opjevalle:', |
| 1455 | + 'validator_warning_parameters' => 'Et {{PLURAL:$1|es ene|sin|es keine}} Fähler en Dinge Süntax.', |
| 1456 | + 'validator-warning-adittional-errors' => '… un {{PLURAL:$1|noch e Probleem|söns Probleeme|söns kei Probleem}}.', |
| 1457 | + 'validator-error-omitted' => '{{PLURAL:$2|Dä Wert „$1“ fählt|De Wääte „$1“ fähle|Nix fählt}}.', |
| 1458 | + 'validator-error-problem' => 'Et johv e Probleem mem Parrameeter $1.', |
| 1459 | + 'validator_error_unknown_argument' => '„$1“ es keine jöltijje Parameeter.', |
| 1460 | + 'validator_error_required_missing' => 'Dä Parameeter $1 moß aanjejovve sin, un fählt.', |
| 1461 | + 'validator-error-override-argument' => 'Versooht, dä Parrameeter $1 (mem Wäät: $2) met „$3“ ze övverschriive.', |
| 1462 | + 'validator-type-string' => 'Täx', |
| 1463 | + 'validator-type-number' => 'Zahl', |
| 1464 | + 'validator-type-integer' => 'janze Zahl (ohne Komma!)', |
| 1465 | + 'validator-type-float' => 'Zahl (met Komma)', |
| 1466 | + 'validator-type-boolean' => 'Joh udder Nää', |
| 1467 | + 'validator-type-char' => 'Zeiche, Zeffer, Boochshtaabe, …', |
| 1468 | + 'validator-listerrors-errors' => 'Fähler', |
| 1469 | + 'validator-listerrors-minor' => 'Bahl ejaal', |
| 1470 | + 'validator-listerrors-low' => 'Kleineshkeit', |
| 1471 | + 'validator-listerrors-normal' => 'Nomaal', |
| 1472 | + 'validator-listerrors-high' => 'Huh', |
| 1473 | + 'validator-listerrors-fatal' => 'Schlemm', |
| 1474 | + 'validator-listerrors-par-minseverity' => 'Wi schlemm ene Fähler winnishßdens sin moß, domet_e aanjezeish weed.', |
| 1475 | + 'validator-describe-notfound' => 'Et jidd_er keine Paaserhooke, dä „$1“ afhandele deiht.', |
| 1476 | + 'validator-describe-parserfunction' => 'Bloß als ene Paaserfunxjuhn enjeresht.', |
| 1477 | + 'validator-describe-listtype' => 'Leß met {{PLURAL:$1|einem Endraach|$1 Endrääsh|keinem Endraach}}', |
| 1478 | + 'validator-describe-empty' => 'nix dren', |
| 1479 | + 'validator-describe-required' => 'nüüdesch', |
| 1480 | + 'validator-describe-header-parameter' => 'Parrameeter', |
| 1481 | + 'validator-describe-header-type' => 'Zoot', |
| 1482 | + 'validator-describe-header-default' => 'Shtandatt', |
| 1483 | + 'validator-describe-parameters' => 'Parrameetere', |
| 1484 | + 'validator-describe-syntax' => 'Süntax', |
| 1485 | + 'validator_error_empty_argument' => 'Dä Parameeter $1 kann keine Wäät met nix dren hann.', |
| 1486 | + 'validator_error_must_be_number' => 'Dä Parameeter $1 kann blohß en Zahl sin.', |
| 1487 | + 'validator_error_must_be_integer' => 'Dä Parrameeter $1 kann bloß en jannze Zahl sin.', |
| 1488 | + 'validator-error-must-be-float' => 'Dä Parameeter $1 kann blohß en Zahl met Komma sin.', |
| 1489 | + 'validator_error_invalid_range' => 'Dä Parameeter $1 moß zwesche $2 un $3 sin.', |
| 1490 | + 'validator-error-invalid-regex' => 'Dä Parrameeter $1 moß op di <i lang="en">regular expression</i> „<code>$2</code>“ paße.', |
| 1491 | + 'validator-error-invalid-length' => 'Dä Parameeter $1 moß $2 Zeijshe lang sin.', |
| 1492 | + 'validator-error-invalid-length-range' => 'Dä Parameeter $1 moß zwesche $2 un $3 Zeijshe lang sin.', |
| 1493 | + 'validator_error_invalid_argument' => 'Däm Parameeter $2 singe Wäät es $1, dat es ävver doför nit jöltesch.', |
| 1494 | + 'validator_list_error_empty_argument' => 'Dä Parameeter $1 kann nit läddesh sin.', |
| 1495 | + 'validator_list_error_must_be_number' => 'Dä Parameeter $1 kann blohß Zeffere enthallde.', |
| 1496 | + 'validator_list_error_must_be_integer' => 'Dä Parameeter $1 kann blohß janze Zahle enthallde.', |
| 1497 | + 'validator_list_error_invalid_range' => 'All de Wääte vum Parameeter $1 möße zwesche $2 un $3 lijje.', |
| 1498 | + 'validator_error_accepts_only' => '„$4“ es nit ze Bruche, weil dä Parameeter $1 {{PLURAL:$3|bloß eine Wäät|bloß eine vun heh dä Wääte|keine Wäät}} han kann: $2', |
| 1499 | + 'validator_list_omitted' => '{{PLURAL:$2|Dä Wäät|De Wääte|Keine Wäät}} $1 {{PLURAL:$2|es|sen|se}} fottjelohße woode.', |
| 1500 | +); |
| 1501 | + |
| 1502 | +/** Kurdish (Latin) (Kurdî (Latin)) |
| 1503 | + * @author George Animal |
| 1504 | + */ |
| 1505 | +$messages['ku-latn'] = array( |
| 1506 | + 'validator-type-boolean' => 'erê/na', |
| 1507 | + 'validator-listerrors-high' => 'bilind', |
| 1508 | + 'validator-describe-header-type' => 'Cure', |
| 1509 | +); |
| 1510 | + |
| 1511 | +/** Luxembourgish (Lëtzebuergesch) |
| 1512 | + * @author Les Meloures |
| 1513 | + * @author Robby |
| 1514 | + */ |
| 1515 | +$messages['lb'] = array( |
| 1516 | + 'validator-desc' => 'Validator erlaabt et op eng einfach Manéier fir Parametere vu Parser-Fonctiounen an Tag-Erweiderungen ze validéieren, fir Standard-Wäerter festzeleeën a fir Feeler-Messagen ze generéieren', |
| 1517 | + 'validator-warning' => 'Opgepasst: $1', |
| 1518 | + 'validator-error' => 'Feeler: $1', |
| 1519 | + 'validator-fatal-error' => 'Fatale Feeler: $1', |
| 1520 | + 'validator_error_parameters' => '{{PLURAL:$1|Dëse Feeler gouf|Dës Feeler goufen}} an Ärer Syntax fonnt:', |
| 1521 | + 'validator_warning_parameters' => 'Et {{PLURAL:$1|ass ee|si}} Feeler an Ärer Syntax.', |
| 1522 | + 'validator-error-omitted' => '{{PLURAL:$2|De Wäert|D\'Wäerter}} "$1" {{PLURAL:$2|gouf|goufe}} vergiess.', |
| 1523 | + 'validator-error-problem' => 'Et gouf e Problem mam Parameter $1.', |
| 1524 | + 'validator_error_unknown_argument' => '$1 ass kee valbele Parameter.', |
| 1525 | + 'validator_error_required_missing' => 'Den obligatoresche Parameter $1 war net derbäi.', |
| 1526 | + 'validator-error-override-argument' => 'huet versicht de Parameter $1 (Wäert: $2) mam Wäert "$3" z\'iwwerschreiwen', |
| 1527 | + 'validator-type-string' => 'Text', |
| 1528 | + 'validator-type-number' => 'Zuel', |
| 1529 | + 'validator-type-integer' => 'Ganz Zuel', |
| 1530 | + 'validator-type-float' => 'Zuel', |
| 1531 | + 'validator-type-boolean' => 'Jo/Neen', |
| 1532 | + 'validator-type-char' => 'Zeechen', |
| 1533 | + 'validator-listerrors-errors' => 'Feeler', |
| 1534 | + 'validator-listerrors-minor' => 'Marginal', |
| 1535 | + 'validator-listerrors-low' => 'Niddreg', |
| 1536 | + 'validator-listerrors-normal' => 'Normal', |
| 1537 | + 'validator-listerrors-high' => 'Héich', |
| 1538 | + 'validator-listerrors-fatal' => 'Fatal', |
| 1539 | + 'validator-describe-descriptionmsg' => "'''Beschreiwung''': $1", |
| 1540 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Alias|Aliasen}}:''' $1", |
| 1541 | + 'validator-describe-listtype' => 'Lëscht mat {{PLURAL:$1|engem Element|$1 Elementer}}', |
| 1542 | + 'validator-describe-empty' => 'eidel', |
| 1543 | + 'validator-describe-required' => 'obligatoresch', |
| 1544 | + 'validator-describe-header-parameter' => 'Parameter', |
| 1545 | + 'validator-describe-header-aliases' => 'Aliasen', |
| 1546 | + 'validator-describe-header-type' => 'Typ', |
| 1547 | + 'validator-describe-header-default' => 'Standard', |
| 1548 | + 'validator-describe-header-description' => 'Beschreiwung', |
| 1549 | + 'validator-describe-parameters' => 'Parameteren', |
| 1550 | + 'validator-describe-syntax' => 'Syntax', |
| 1551 | + 'validator-describe-pfmax' => 'Parserfonctioun mat alle Parameter.', |
| 1552 | + 'validator_error_empty_argument' => 'De Parameter $1 ka keen eidele Wäert hunn.', |
| 1553 | + 'validator_error_must_be_number' => 'De Parameter $1 ka just eng Zuel sinn', |
| 1554 | + 'validator_error_must_be_integer' => 'De Parameter $1 ka just eng ganz Zuel sinn.', |
| 1555 | + 'validator-error-must-be-float' => 'Parameter $1 kann nëmmen eng Féisskommazuel sinn.', |
| 1556 | + 'validator_error_invalid_range' => 'De Parameter $1 muss tëschent $2 an $3 leien.', |
| 1557 | + 'validator-error-invalid-regex' => 'De Parameter $1 muss esou ausgesinn: $2', |
| 1558 | + 'validator-error-invalid-length' => 'Parameter $1 muss eng Längt vu(n) $2 hunn.', |
| 1559 | + 'validator-error-invalid-length-range' => 'De Parameter $1 muss eng Längt tëschent $2 an $3 hunn.', |
| 1560 | + 'validator_error_invalid_argument' => 'De Wäert $1 ass net valabel fir de Parameter $2.', |
| 1561 | + 'validator_list_error_empty_argument' => 'De Parameter $1 hëlt keng eidel Wäerter un.', |
| 1562 | + 'validator_list_error_must_be_number' => 'Am Parameter $1 kënnen nëmmen Zuelen dra sinn.', |
| 1563 | + 'validator_list_error_must_be_integer' => 'Am Parameter $1 kënnen nëmme ganz Zuele sinn.', |
| 1564 | + 'validator-list-error-must-be-float' => 'Am Parameter $1 kënnen nëmme Kommazuelen dra sinn.', |
| 1565 | + 'validator_list_error_invalid_range' => 'All Wäerter vum Parameter $1 mussen tëschent $2 an $3 leien.', |
| 1566 | + 'validator-list-error-invalid-regex' => 'All Wäerter vum Parameter $1 mussen dësem regulären Ausdrock entspriechen: $2', |
| 1567 | + 'validator_list_error_invalid_argument' => 'Een oder méi Wäerter fir de Parameter $1 sinn net valabel.', |
| 1568 | + 'validator-list-error-accepts-only' => 'Een oder méi Wäerter vum Parameter $1 sinn net valabel. |
| 1569 | +En akzeptéiert nëmmen {{PLURAL:$3|dëse Wäert|dës Wäerter}}: $2.', |
| 1570 | + 'validator_error_accepts_only' => 'De Wäert $4 ass net valabel fir de Parameter $1. En akzeptéiert just {{PLURAL:$3|dëse Wäert|dës Wäerter}}: $2', |
| 1571 | + 'validator-error-accepts-only-omitted' => 'De Wäert "$2" ass net valabel fir de Parameter $1. |
| 1572 | +En akzeptéiert nëmmen {{PLURAL:$5|dëse Wäert|dës Wäerter}}: $3 (an {{PLURAL:$4|een ausgeloossene Wäert|$4 ausgeloosse Wäerter}}).', |
| 1573 | + 'validator_list_omitted' => "{{PLURAL:$2|De Wäert|D'Wäerter}} $1 {{PLURAL:$2|gouf|goufe}} vergiess.", |
| 1574 | +); |
| 1575 | + |
| 1576 | +/** Latvian (Latviešu) |
| 1577 | + * @author GreenZeb |
| 1578 | + */ |
| 1579 | +$messages['lv'] = array( |
| 1580 | + 'validator-listerrors-errors' => 'Kļūdas', |
| 1581 | + 'validator-listerrors-minor' => 'Maznozīmīgas', |
| 1582 | + 'validator-listerrors-fatal' => 'Fatālas', |
| 1583 | +); |
| 1584 | + |
| 1585 | +/** Macedonian (Македонски) |
| 1586 | + * @author Bjankuloski06 |
| 1587 | + * @author McDutchie |
| 1588 | + */ |
| 1589 | +$messages['mk'] = array( |
| 1590 | + 'validator-desc' => 'Потврдувачот овозможува лесен начин другите додатоци да ги потврдат параметрите на парсерските функции и додатоците со ознаки, да поставаат основно зададени вредности и да создаваат пораки за грешки', |
| 1591 | + 'validator-warning' => 'Предупредување: $1', |
| 1592 | + 'validator-error' => 'Грешка: $1', |
| 1593 | + 'validator-fatal-error' => 'Фатална грешка: $1', |
| 1594 | + 'validator_error_parameters' => 'Во вашата синтакса {{PLURAL:$1|е откриена следнава грешка|се откриени следниве грешки}}:', |
| 1595 | + 'validator_warning_parameters' => 'Имате {{PLURAL:$1|грешка|грешки}} во синтаксата.', |
| 1596 | + 'validator-warning-adittional-errors' => '... и {{PLURAL:$1|уште еден проблем|повеќе други проблеми}}.', |
| 1597 | + 'validator-error-omitted' => '{{PLURAL:$2|Изоставена е вредноста „$1“|Изоставени се вредностите „$1“}}.', |
| 1598 | + 'validator-error-problem' => 'Се појави проблем со параметарот $1.', |
| 1599 | + 'validator_error_unknown_argument' => '$1 не е важечки параметар.', |
| 1600 | + 'validator_error_required_missing' => 'Бараниот параметар $1 не е наведен.', |
| 1601 | + 'validator-error-override-argument' => 'Се обидовте да презапишете врз параметарот $1 (вредност: $2) со вредност „$3“', |
| 1602 | + 'validator-type-string' => 'текст', |
| 1603 | + 'validator-type-number' => 'број', |
| 1604 | + 'validator-type-integer' => 'цел број', |
| 1605 | + 'validator-type-float' => 'број', |
| 1606 | + 'validator-type-boolean' => 'да/не', |
| 1607 | + 'validator-type-char' => 'знак', |
| 1608 | + 'validator-listerrors-errors' => 'Грешки', |
| 1609 | + 'validator-listerrors-minor' => 'Ситни', |
| 1610 | + 'validator-listerrors-low' => 'Малку', |
| 1611 | + 'validator-listerrors-normal' => 'Нормално', |
| 1612 | + 'validator-listerrors-high' => 'Многу', |
| 1613 | + 'validator-listerrors-fatal' => 'Фатални', |
| 1614 | + 'validator-listerrors-description' => 'Ги наведува грешките (и предупредувањата) што се јавиле кај парсерските куки додадени преки Потврдувачот (Validator). |
| 1615 | +Ги наведува само парсерските куки додадени погоре каде е вметнато „listerrors“; |
| 1616 | +ставете го „listerrors“ на или близу дното на страницата за да ви се прикажат сите грешки.', |
| 1617 | + 'validator-listerrors-par-minseverity' => 'Минималната сериозност на проблемот за да биде наведен.', |
| 1618 | + 'validator-describe-description' => 'Создава документација за една или повеќе парсерски куки определени преку Потврдувачот.', |
| 1619 | + 'validator-describe-notfound' => 'Нема парсерска кука што работи со „$1“.', |
| 1620 | + 'validator-describe-descriptionmsg' => "'''Опис''': $1", |
| 1621 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Алијас|Алијаси}}''': $1", |
| 1622 | + 'validator-describe-parserfunction' => 'Се применува само во својство на парсерска функција.', |
| 1623 | + 'validator-describe-tagextension' => 'Се применува само во својство на додаток за означување.', |
| 1624 | + 'validator-describe-bothhooks' => 'Се применува во својство на парсерска функција и додаток за означување (обете).', |
| 1625 | + 'validator-describe-par-hooks' => 'Парсерските куки за кои сакате да се прикаже документација.', |
| 1626 | + 'validator-describe-par-pre' => 'Ви овозможува да го добиете самиот викитекст за документацијата, без да се испише на страницата', |
| 1627 | + 'validator-describe-listtype' => 'Список на $1 ставки', |
| 1628 | + 'validator-describe-empty' => 'празно', |
| 1629 | + 'validator-describe-required' => 'задолжително', |
| 1630 | + 'validator-describe-header-parameter' => 'Параметар', |
| 1631 | + 'validator-describe-header-aliases' => 'Алијаси', |
| 1632 | + 'validator-describe-header-type' => 'Вид', |
| 1633 | + 'validator-describe-header-default' => 'По основно', |
| 1634 | + 'validator-describe-header-description' => 'Опис', |
| 1635 | + 'validator-describe-parameters' => 'Параметри', |
| 1636 | + 'validator-describe-syntax' => 'Синтакса', |
| 1637 | + 'validator-describe-tagmin' => 'Додаток за означување само со задолжителните параметри.', |
| 1638 | + 'validator-describe-tagmax' => 'Додаток за означување со сите параметри.', |
| 1639 | + 'validator-describe-tagdefault' => 'Додаток за означување кајшто сите параметри ја користат стандардната параметарска нотација.', |
| 1640 | + 'validator-describe-pfmin' => 'Парсерска функција само со задолжителните параметри.', |
| 1641 | + 'validator-describe-pfmax' => 'Парсерска функција со сите параметри.', |
| 1642 | + 'validator-describe-pfdefault' => 'Парсерска функција кајшто сите параметри ја користат стандардната параметарска нотација.', |
| 1643 | + 'validator-describe-autogen' => 'Содржината на овој поднаслов е создадена автоматски од парсерската кука „describe“ на додатокот Потврдувач (Validator).', |
| 1644 | + 'validator_error_empty_argument' => 'Параметарот $1 не може да има празна вредност.', |
| 1645 | + 'validator_error_must_be_number' => 'Параметарот $1 може да биде само број.', |
| 1646 | + 'validator_error_must_be_integer' => 'Параметарот $1 може да биде само цел број.', |
| 1647 | + 'validator-error-must-be-float' => 'Параметарот $1 може да биде само број со подвижна точка.', |
| 1648 | + 'validator_error_invalid_range' => 'Параметарот $1 мора да изнесува помеѓу $2 и $3.', |
| 1649 | + 'validator-error-invalid-regex' => 'Параметарот $1 мора да се совпаѓа со следниов регуларен израз: $2.', |
| 1650 | + 'validator-error-invalid-length' => 'Параметарот $1 мора да има должина од $2.', |
| 1651 | + 'validator-error-invalid-length-range' => 'Должината на параметарот параметарот $1 мора да изнесува помеѓу $2 и $3.', |
| 1652 | + 'validator_error_invalid_argument' => 'Вредноста $1 е неважечка за параметарот $2.', |
| 1653 | + 'validator_list_error_empty_argument' => 'Параметарот $1 не прифаќа празни вредности.', |
| 1654 | + 'validator_list_error_must_be_number' => 'Параметарот $1 може да содржи само бројки.', |
| 1655 | + 'validator_list_error_must_be_integer' => 'Параметарот $1 може да содржи само цели броеви.', |
| 1656 | + 'validator-list-error-must-be-float' => 'Параметарот $1 може да содржи само подвижни бинарни точки.', |
| 1657 | + 'validator_list_error_invalid_range' => 'Сите вредности на параметарот $1 мора да бидат помеѓу $2 и $3.', |
| 1658 | + 'validator-list-error-invalid-regex' => 'Сите вредности на параметарот $1 мора да се совпаднат со следниов регуларен израз: $2.', |
| 1659 | + 'validator_list_error_invalid_argument' => 'Една или повеќе вредности на параметарот $1 се неважечки.', |
| 1660 | + 'validator-list-error-accepts-only' => 'Параметарот $1 има една или повеќе неважечки вредности. |
| 1661 | +Се {{PLURAL:$3|прифаќа само следнава вредност|прифаќаат само следниве вредности}}: $2.', |
| 1662 | + 'validator-list-error-accepts-only-omitted' => 'Параметарот $1 има една или повеќе неважечки вредности. |
| 1663 | +Се {{PLURAL:$3|прифаќа само следнава вредност|прифаќаат само следниве вредности}}: $2 (и $4 {{PLURAL:$4|изоставена вредност|изоставени вредности}}).', |
| 1664 | + 'validator_error_accepts_only' => 'Вредноста „$4“ е неважечка за параметарот $1. Се {{PLURAL:$3|прифаќа само следнава вредност|прифаќаат само следниве вредности}}: $2.', |
| 1665 | + 'validator-error-accepts-only-omitted' => 'Вредноста „$2“ не е важечка за параметарот $1. Се прифаќаат само следниве вредности: $3 (и $4 изоставени вредности).', |
| 1666 | + 'validator_list_omitted' => '{{PLURAL:$2|Вредноста|Вредностите}} $1 {{PLURAL:$2|беше испуштена|беа испуштени}}.', |
| 1667 | +); |
| 1668 | + |
| 1669 | +/** Malay (Bahasa Melayu) |
| 1670 | + * @author Anakmalaysia |
| 1671 | + */ |
| 1672 | +$messages['ms'] = array( |
| 1673 | + 'validator-describe-descriptionmsg' => "'''Keterangan''': $1", |
| 1674 | + 'validator-describe-empty' => 'kosong', |
| 1675 | + 'validator-describe-required' => 'wajib', |
| 1676 | + 'validator-describe-header-default' => 'Tersedia', |
| 1677 | +); |
| 1678 | + |
| 1679 | +/** Dutch (Nederlands) |
| 1680 | + * @author Jeroen De Dauw |
| 1681 | + * @author Siebrand |
| 1682 | + */ |
| 1683 | +$messages['nl'] = array( |
| 1684 | + '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', |
| 1685 | + 'validator-warning' => 'Waarschuwing: $1', |
| 1686 | + 'validator-error' => 'Fout: $1', |
| 1687 | + 'validator-fatal-error' => 'Onherstelbare fout: $1', |
| 1688 | + 'validator_error_parameters' => 'In uw syntaxis {{PLURAL:$1|is de volgende fout|zijn de volgende fouten}} gedetecteerd:', |
| 1689 | + 'validator_warning_parameters' => 'Er {{PLURAL:$1|zit een fout|zitten $1 fouten}} in uw syntaxis.', |
| 1690 | + 'validator-warning-adittional-errors' => '... en nog {{PLURAL:$1|een ander probleem|$1 andere problemen}}.', |
| 1691 | + 'validator-error-omitted' => 'De {{PLURAL:$2|waarde "$1" mist|waarden "$1" missen}}.', |
| 1692 | + 'validator-error-problem' => 'Er was een probleem met de parameter $1.', |
| 1693 | + 'validator_error_unknown_argument' => '$1 is geen geldige parameter.', |
| 1694 | + 'validator_error_required_missing' => 'De verplichte parameter $1 is niet opgegeven.', |
| 1695 | + 'validator-error-override-argument' => 'Geprobeerd de parameter $1 (waarde: $2) te overschrijven met waarde "$3".', |
| 1696 | + 'validator-type-string' => 'tekst', |
| 1697 | + 'validator-type-number' => 'getal', |
| 1698 | + 'validator-type-integer' => 'geheel getal', |
| 1699 | + 'validator-type-float' => 'getal', |
| 1700 | + 'validator-type-boolean' => 'ja / nee', |
| 1701 | + 'validator-type-char' => 'teken', |
| 1702 | + 'validator-listerrors-errors' => 'Fouten', |
| 1703 | + 'validator-listerrors-minor' => 'Overkomelijk', |
| 1704 | + 'validator-listerrors-low' => 'Laag', |
| 1705 | + 'validator-listerrors-normal' => 'Gemiddeld', |
| 1706 | + 'validator-listerrors-high' => 'Groot', |
| 1707 | + 'validator-listerrors-fatal' => 'Fataal', |
| 1708 | + 'validator-listerrors-description' => "Fouten en waarschuwingen weergeven die zijn opgetreden in parserhooks die via Validator zijn toegevoegd. |
| 1709 | +Geeft alleen parserhooks weer die zijn toegevoegd voordat de fout is opgetreden; |
| 1710 | +plaats fouten onderaan of bijna onderaan pagina's om alle fouten weer te geven.", |
| 1711 | + 'validator-listerrors-par-minseverity' => 'De minimale ernst van een probleem voordat het wordt weergegeven.', |
| 1712 | + 'validator-describe-description' => 'Maakt documentatie aan voor een of meer parserhooks die via Validator zijn gedefinieerd.', |
| 1713 | + 'validator-describe-notfound' => 'Er is geen parserhook die "$1" afhandelt.', |
| 1714 | + 'validator-describe-descriptionmsg' => "'''Beschrijving''': $1", |
| 1715 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Alias|Aliassen}}''': $1", |
| 1716 | + 'validator-describe-parserfunction' => 'Alleen als parserfunctie geïmplementeerd.', |
| 1717 | + 'validator-describe-tagextension' => 'Alleen als labeluitbreiding geïmplementeerd.', |
| 1718 | + 'validator-describe-bothhooks' => 'Als parserfunctie en labeluitbreiding geïmplementeerd.', |
| 1719 | + 'validator-describe-par-hooks' => 'Parserhooks waarvoor documentatie weergegeven moet worden.', |
| 1720 | + 'validator-describe-par-pre' => 'Maakt het mogelijk de wikitekst voor de documentatie weer te geven zonder dat deze wordt verwerkt.', |
| 1721 | + 'validator-describe-listtype' => 'Lijst met $1 items', |
| 1722 | + 'validator-describe-empty' => 'leeg', |
| 1723 | + 'validator-describe-required' => 'verplicht', |
| 1724 | + 'validator-describe-header-parameter' => 'Parameter', |
| 1725 | + 'validator-describe-header-aliases' => 'Aliassen', |
| 1726 | + 'validator-describe-header-type' => 'Type', |
| 1727 | + 'validator-describe-header-default' => 'Standaard', |
| 1728 | + 'validator-describe-header-description' => 'Beschrijving', |
| 1729 | + 'validator-describe-parameters' => 'Parameters', |
| 1730 | + 'validator-describe-syntax' => 'Syntaxis', |
| 1731 | + 'validator-describe-tagmin' => 'Labeluitbreiding met alleen de verplichte parameters.', |
| 1732 | + 'validator-describe-tagmax' => 'Labeluitbreiding met alle parameters.', |
| 1733 | + 'validator-describe-tagdefault' => 'Labeluitbreiding met alle parameters die de standaard parameternotatie gebruiken.', |
| 1734 | + 'validator-describe-pfmin' => 'Parserfunctie met alleen de verplichte parameters.', |
| 1735 | + 'validator-describe-pfmax' => 'Parserfunctie met alle parameters.', |
| 1736 | + 'validator-describe-pfdefault' => 'Parserfunctie met alle parameters die de standaard parameternotatie gebruiken.', |
| 1737 | + 'validator-describe-autogen' => 'De inhoud van deze paragraaf is automatisch aangemaakt door de parserhook "beschrijven" (describe) van de uitbreiding Validator.', |
| 1738 | + 'validator_error_empty_argument' => 'De parameter $1 mag niet leeg zijn.', |
| 1739 | + 'validator_error_must_be_number' => 'De parameter $1 mag alleen een getal zijn.', |
| 1740 | + 'validator_error_must_be_integer' => 'De parameter $1 kan alleen een heel getal zijn.', |
| 1741 | + 'validator-error-must-be-float' => 'Parameter $1 kan alleen een getal met decimalen zijn.', |
| 1742 | + 'validator_error_invalid_range' => 'De parameter $1 moet tussen $2 en $3 liggen.', |
| 1743 | + 'validator-error-invalid-regex' => 'De parameter $1 moet voldoen aan deze reguliere expressie: $2.', |
| 1744 | + 'validator-error-invalid-length' => 'Parameter $1 moet een lengte hebben van $2.', |
| 1745 | + 'validator-error-invalid-length-range' => 'Parameter $1 moet een lengte hebben tussen $2 en $3.', |
| 1746 | + 'validator_error_invalid_argument' => 'De waarde $1 is niet geldig voor de parameter $2.', |
| 1747 | + 'validator_list_error_empty_argument' => 'Voor de parameter $1 zijn lege waarden niet toegestaan.', |
| 1748 | + 'validator_list_error_must_be_number' => 'Voor de parameter $1 zijn alleen getallen toegestaan.', |
| 1749 | + 'validator_list_error_must_be_integer' => 'Voor de parameter $1 zijn alleen hele getallen toegestaan.', |
| 1750 | + 'validator-list-error-must-be-float' => 'Voor de parameter $1 zijn alleen getallen met drijvende komma toegestaan.', |
| 1751 | + 'validator_list_error_invalid_range' => 'Alle waarden voor de parameter $1 moeten tussen $2 en $3 liggen.', |
| 1752 | + 'validator-list-error-invalid-regex' => 'Alle waarden voor de parameter $1 moeten voldoen aan deze reguliere expressie: $2.', |
| 1753 | + 'validator_list_error_invalid_argument' => 'Een of meerdere waarden voor de parameter $1 zijn ongeldig.', |
| 1754 | + 'validator-list-error-accepts-only' => 'Een of meer waarden voor de parameter $1 zijn ongeldig. |
| 1755 | +Alleen deze {{PLURAL:$3|waarde is|waarden zijn}} toegestaan: $2.', |
| 1756 | + 'validator-list-error-accepts-only-omitted' => 'Een of meer waarden voor de parameter $1 zijn ongeldig. |
| 1757 | +Alleen deze {{PLURAL:$3|waarde is|waarden zijn}} toegestaan: $2. |
| 1758 | +Als ook $4 weggelaten {{PLURAL:$4|waarde|waarden}}.', |
| 1759 | + 'validator_error_accepts_only' => 'De waarde "$4" is ongeldig voor parameter $1. Deze kan alleen de volgende {{PLURAL:$3|waarde|waarden}} hebben: $2.', |
| 1760 | + 'validator-error-accepts-only-omitted' => 'De waarde "$2" is niet geldig voor de parameter $1. |
| 1761 | +Alleen deze {{PLURAL:$5|waarde is|waarden zijn}} toegestaan: $3. |
| 1762 | +Als ook $4 weggelaten {{PLURAL:$4|waarde|waarden}}.', |
| 1763 | + 'validator_list_omitted' => 'De {{PLURAL:$2|waarde|waarden}} $1 {{PLURAL:$2|mist|missen}}.', |
| 1764 | +); |
| 1765 | + |
| 1766 | +/** Norwegian (bokmål) (Norsk (bokmål)) |
| 1767 | + * @author Jon Harald Søby |
| 1768 | + * @author Nghtwlkr |
| 1769 | + */ |
| 1770 | +$messages['no'] = array( |
| 1771 | + 'validator-desc' => 'Gir generisk støtte for parameterhåndtering for andre utvidelser', |
| 1772 | + 'validator-warning' => 'Advarsel: $1', |
| 1773 | + 'validator-error' => 'Feil: $1', |
| 1774 | + 'validator-fatal-error' => 'Kritisk feil: $1', |
| 1775 | + 'validator_error_parameters' => 'Følgende {{PLURAL:$1|feil|feil}} har blitt oppdaget i syntaksen din:', |
| 1776 | + 'validator_warning_parameters' => 'Det er {{PLURAL:$1|én feil|flere feil}} i syntaksen din.', |
| 1777 | + 'validator-warning-adittional-errors' => '... og {{PLURAL:$1|ett problem til|flere problem}}.', |
| 1778 | + 'validator-error-omitted' => '{{PLURAL:$2|Verdien|Verdiene}} «$1» har blitt utelatt.', |
| 1779 | + 'validator-error-problem' => 'Det var et problem med parameteren $1.', |
| 1780 | + 'validator_error_unknown_argument' => '$1 er ikke en gyldig parameter.', |
| 1781 | + 'validator_error_required_missing' => 'Den nødvendige parameteren «$1» er ikke angitt.', |
| 1782 | + 'validator-error-override-argument' => 'Prøvde å overkjøre parameter $1 (verdi: $2) med verdien «$3»', |
| 1783 | + 'validator-listerrors-errors' => 'Feil', |
| 1784 | + 'validator-listerrors-minor' => 'Mindre', |
| 1785 | + 'validator-listerrors-low' => 'Lav', |
| 1786 | + 'validator-listerrors-normal' => 'Normal', |
| 1787 | + 'validator-listerrors-high' => 'Høy', |
| 1788 | + 'validator-listerrors-fatal' => 'Kritisk', |
| 1789 | + 'validator_error_empty_argument' => 'Parameteren $1 kan ikke ha en tom verdi.', |
| 1790 | + 'validator_error_must_be_number' => 'Parameteren $1 må være et tall.', |
| 1791 | + 'validator_error_must_be_integer' => 'Parameteren $1 må være et heltall.', |
| 1792 | + 'validator-error-must-be-float' => 'Parameter $1 må være et flyttall.', |
| 1793 | + 'validator_error_invalid_range' => 'Parameter $1 må være mellom $2 og $3.', |
| 1794 | + 'validator-error-invalid-regex' => 'Parameteren $1 må samsvare med dette regulære uttrykket: $2.', |
| 1795 | + 'validator-error-invalid-length' => 'Parameter $1 må ha en lengde på $2.', |
| 1796 | + 'validator-error-invalid-length-range' => 'Parameter $1 må ha en lengde mellom $2 og $3.', |
| 1797 | + 'validator_error_invalid_argument' => 'Verdien $1 er ikke gyldig for parameter $2.', |
| 1798 | + 'validator_list_error_empty_argument' => 'Parameteren $1 godtar ikke tomme verdier.', |
| 1799 | + 'validator_list_error_must_be_number' => 'Parameteren $1 kan bare inneholde tall.', |
| 1800 | + 'validator_list_error_must_be_integer' => 'Parameteren $1 kan bare inneholde heltall.', |
| 1801 | + 'validator-list-error-must-be-float' => 'Parameteren $1 kan bare innholde flyttall.', |
| 1802 | + 'validator_list_error_invalid_range' => 'Alle verdier av parameteren $1 må være mellom $2 og $3.', |
| 1803 | + 'validator-list-error-invalid-regex' => 'Alle verdier av parameteren $1 må samsvare med dette regulære uttrykket: $2.', |
| 1804 | + 'validator_list_error_invalid_argument' => 'Parameteren $1 har en eller flere ugyldige verdier.', |
| 1805 | + 'validator-list-error-accepts-only' => 'En eller flere verdier for parameteren $1 er ugyldige. |
| 1806 | +Den godtar bare {{PLURAL:$3|denne verdien|disse verdiene}}: $2.', |
| 1807 | + 'validator-list-error-accepts-only-omitted' => 'En eller flere verdier for parameteren $1 er ugyldige. |
| 1808 | +Den godtar bare {{PLURAL:$3|denne verdien|disse verdiene}}: $2 (og $4 {{PLURAL:$4|utelatt verdi|utelatte verdier}}).', |
| 1809 | + 'validator_error_accepts_only' => 'Verdien «$4» er ikke gyldig for parameteren $1. Den aksepterer kun {{PLURAL:$3|denne verdien|disse verdiene}}: $2.', |
| 1810 | + 'validator-error-accepts-only-omitted' => 'Verdien «$2» er ikke gyldig for parameteren $1. |
| 1811 | +Den godtar bare {{PLURAL:$5|denne verdien|disse verdiene}}: $3 (og $4 {{PLURAL:$4|utelatt verdi|utelatte verdier}}).', |
| 1812 | + 'validator_list_omitted' => '{{PLURAL:$2|Verdien|Verdiene}} $1 har blitt utelatt.', |
| 1813 | +); |
| 1814 | + |
| 1815 | +/** Occitan (Occitan) |
| 1816 | + * @author Cedric31 |
| 1817 | + * @author Jfblanc |
| 1818 | + */ |
| 1819 | +$messages['oc'] = array( |
| 1820 | + '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", |
| 1821 | + 'validator_error_parameters' => '{{PLURAL:$1|Aquela error es estada detectada|Aquelas errors son estadas detectadas}} dins la sintaxi', |
| 1822 | + 'validator_error_unknown_argument' => '$1 es pas un paramètre valedor.', |
| 1823 | + 'validator_error_required_missing' => "Manca lo paramètre $1 qu'es obligatòri.", |
| 1824 | + 'validator_error_empty_argument' => 'Lo paramètre $1 pòt pas estar voide.', |
| 1825 | + 'validator_error_must_be_number' => 'Lo paramètre $1 deu èsser un nombre.', |
| 1826 | + 'validator_error_must_be_integer' => 'Lo paramètre $1 deu èsser un nombre entièr.', |
| 1827 | + 'validator_error_invalid_range' => 'Lo paramètre $1 deu èsser entre $2 e $3.', |
| 1828 | + 'validator_error_invalid_argument' => '$1 es pas valedor pel paramètre $2.', |
| 1829 | + 'validator_error_accepts_only' => 'Sonque {{PLURAL:$3|aquela valor es valedora|aquelas valors son valedoras}}pel paramètre $1 : $2.', |
| 1830 | +); |
| 1831 | + |
| 1832 | +/** Polish (Polski) |
| 1833 | + * @author Fizykaa |
| 1834 | + * @author Sp5uhe |
| 1835 | + */ |
| 1836 | +$messages['pl'] = array( |
| 1837 | + 'validator-desc' => 'Dostarcza innym rozszerzeniom ogólną obsługę parametrów', |
| 1838 | + 'validator-warning' => 'Uwaga – $1', |
| 1839 | + 'validator-error' => 'Błąd – $1', |
| 1840 | + 'validator-fatal-error' => 'Błąd krytyczny – $1', |
| 1841 | + 'validator_error_parameters' => 'W Twoim kodzie {{PLURAL:$1|został wykryty następujący błąd|zostały wykryte następujące błędy}} składni:', |
| 1842 | + 'validator_warning_parameters' => 'W Twoim kodzie {{PLURAL:$1|wystąpił błąd|wystąpiły błędy}} składni.', |
| 1843 | + 'validator-warning-adittional-errors' => '... i {{PLURAL:$1|jeszcze jeden problem|wiele więcej problemów}}.', |
| 1844 | + 'validator-error-omitted' => '{{PLURAL:$2|Wartość „$1” została pominięta|Wartości „$1” zostały pominięte}}.', |
| 1845 | + 'validator-error-problem' => 'Wystąpił problem z parametrem $1.', |
| 1846 | + 'validator_error_unknown_argument' => '$1 jest niepoprawnym parametrem.', |
| 1847 | + 'validator_error_required_missing' => 'Obowiązkowy parametr $1 nie został przekazany.', |
| 1848 | + 'validator-error-override-argument' => 'Próba nadpisania parametru $1 o wartości „$2” nową wartością „$3”', |
| 1849 | + 'validator-type-string' => 'tekst', |
| 1850 | + 'validator-type-number' => 'liczba', |
| 1851 | + 'validator-type-integer' => 'liczba całkowita', |
| 1852 | + 'validator-type-float' => 'liczba rzeczywista', |
| 1853 | + 'validator-type-boolean' => 'tak lub nie', |
| 1854 | + 'validator-type-char' => 'znak', |
| 1855 | + 'validator-listerrors-errors' => 'Błędy', |
| 1856 | + 'validator-listerrors-minor' => 'Nieistotny', |
| 1857 | + 'validator-listerrors-low' => 'Mało istotny', |
| 1858 | + 'validator-listerrors-normal' => 'Typowy', |
| 1859 | + 'validator-listerrors-high' => 'Istotny', |
| 1860 | + 'validator-listerrors-fatal' => 'Krytyczny', |
| 1861 | + 'validator_error_empty_argument' => 'Parametr $1 nie może być pusty.', |
| 1862 | + 'validator_error_must_be_number' => 'Parametr $1 musi być liczbą.', |
| 1863 | + 'validator_error_must_be_integer' => 'Parametr $1 musi być liczbą całkowitą.', |
| 1864 | + 'validator-error-must-be-float' => 'Parametr $1 musi być liczbą rzeczywistą.', |
| 1865 | + 'validator_error_invalid_range' => 'Parametr $1 musi zawierać się w przedziale od $2 do $3.', |
| 1866 | + 'validator-error-invalid-regex' => 'Parametr $1 musi pasować do wyrażenia regularnego $2.', |
| 1867 | + 'validator-error-invalid-length' => 'Parametr $1 musi mieć długość $2.', |
| 1868 | + 'validator-error-invalid-length-range' => 'Długość parametru $1 musi zawierać się w przedziale od $2 do $3.', |
| 1869 | + 'validator_error_invalid_argument' => 'Nieprawidłowa wartość $1 parametru $2.', |
| 1870 | + 'validator_list_error_empty_argument' => 'Parametr $1 nie może być pusty.', |
| 1871 | + 'validator_list_error_must_be_number' => 'Parametrem $1 mogą być wyłącznie liczby.', |
| 1872 | + 'validator_list_error_must_be_integer' => 'Parametrem $1 mogą być wyłącznie liczby całkowite.', |
| 1873 | + 'validator-list-error-must-be-float' => 'Parametrem $1 mogą być wyłącznie liczby rzeczywiste.', |
| 1874 | + 'validator_list_error_invalid_range' => 'Wartości parametru $1 muszą zawierać się w przedziale od $2 do $3.', |
| 1875 | + 'validator-list-error-invalid-regex' => 'Wszystkie wartości parametru $1 muszą pasować do wyrażenia regularnego $2.', |
| 1876 | + 'validator_list_error_invalid_argument' => 'Przynajmniej jedna wartość parametru $1 jest nieprawidłowa.', |
| 1877 | + 'validator-list-error-accepts-only' => 'Jedna lub więcej wartości parametru $1 są nieprawidłowe. |
| 1878 | +Może przyjmować wyłącznie {{PLURAL:$3|wartość|wartości:}} $2.', |
| 1879 | + 'validator-list-error-accepts-only-omitted' => 'Jedna lub więcej wartości parametru $1 są nieprawidłowe. |
| 1880 | +Może przyjmować wyłącznie {{PLURAL:$3|wartość|wartości:}} $2 (oraz $4 {{PLURAL:$4|pominiętą wartość|pominięte wartości|pominiętych wartości}}).', |
| 1881 | + 'validator_error_accepts_only' => 'Wartość „$4” jest nieprawidłowa dla parametru $1. {{PLURAL:$3|Dopuszczalna jest wyłącznie wartość|Dopuszczalne są wyłącznie wartości:}} $2.', |
| 1882 | + 'validator-error-accepts-only-omitted' => 'Wartość „$2” parametru $1 jest nieprawidłowa. |
| 1883 | +Parametr może przyjmować wyłącznie {{PLURAL:$5|wartość|wartości:}} $3 (oraz $4 {{PLURAL:$4|pominiętą wartość|pominięte wartości|pominiętych wartości}}).', |
| 1884 | + 'validator_list_omitted' => '{{PLURAL:$2|Parametr|Parametry}} $1 {{PLURAL:$2|został opuszczony|zostały opuszczone}}.', |
| 1885 | +); |
| 1886 | + |
| 1887 | +/** Piedmontese (Piemontèis) |
| 1888 | + * @author Borichèt |
| 1889 | + * @author Dragonòt |
| 1890 | + * @author McDutchie |
| 1891 | + */ |
| 1892 | +$messages['pms'] = array( |
| 1893 | + '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", |
| 1894 | + 'validator-warning' => 'Avis: $1', |
| 1895 | + 'validator-error' => 'Eror: $1', |
| 1896 | + 'validator-fatal-error' => 'Eror Fatal: $1', |
| 1897 | + '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:", |
| 1898 | + 'validator_warning_parameters' => "{{PLURAL:$1|A-i é n'|A-i son dj'}}eror ant soa sintassi.", |
| 1899 | + 'validator-warning-adittional-errors' => "... e {{PLURAL:$1|ëdcò n'àutr problema|vàire àutri problema}}.", |
| 1900 | + 'validator-error-omitted' => '{{PLURAL:$2|Ël valor "$1" a l\'é|Ij valor "$1" a son}} stàit sautà.', |
| 1901 | + 'validator-error-problem' => 'A-i é staje un problema con ël paràmetr $1.', |
| 1902 | + 'validator_error_unknown_argument' => "$1 a l'é un paràmetr pa bon.", |
| 1903 | + 'validator_error_required_missing' => "Ël paràmetr obligatòri $1 a l'é pa dàit.", |
| 1904 | + 'validator-error-override-argument' => 'Provà a coaté ël paràmetr $1 (valor: $2) con ël valor "$3"', |
| 1905 | + 'validator-type-string' => 'test', |
| 1906 | + 'validator-type-number' => 'nùmer', |
| 1907 | + 'validator-type-integer' => 'nùmer anter', |
| 1908 | + 'validator-type-float' => 'nùmer', |
| 1909 | + 'validator-type-boolean' => 'é!/nò', |
| 1910 | + 'validator-type-char' => 'caràter', |
| 1911 | + 'validator-listerrors-errors' => 'Eror', |
| 1912 | + 'validator-listerrors-minor' => 'Pi cit', |
| 1913 | + 'validator-listerrors-low' => 'Bass', |
| 1914 | + 'validator-listerrors-normal' => 'Normal', |
| 1915 | + 'validator-listerrors-high' => 'Àut', |
| 1916 | + 'validator-listerrors-fatal' => 'Fatal', |
| 1917 | + 'validator-listerrors-description' => "A lista eror (e avis) che a son capità ant ij gancio dël parser giontà via Validator. |
| 1918 | +A lista mach ij gancio ëd parser giontà dzora andoa listerrors a l'é anserì; |
| 1919 | +piassa listerrors dzora o davzin la sima dla pagina për pijé tùit j'eror.", |
| 1920 | + 'validator-listerrors-par-minseverity' => "La minima severità d'un eror përchè a sia listà.", |
| 1921 | + 'validator-describe-description' => 'A genera documentassion për un o pi gancio ëd parser definì via Validator.', |
| 1922 | + 'validator-describe-notfound' => 'A-i é pa gnun gancio ëd parser ch\'a gestissa "$1".', |
| 1923 | + 'validator-describe-descriptionmsg' => "'''Descrission''': $1", |
| 1924 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Alias|Alias}}''': $1", |
| 1925 | + 'validator-describe-parserfunction' => 'Amplementà mach com funsion dël parser.', |
| 1926 | + 'validator-describe-tagextension' => 'Amplementà mach com estension ëd tag.', |
| 1927 | + 'validator-describe-bothhooks' => 'Amplementà sia com funsion dël parser che com estension ëd tag.', |
| 1928 | + 'validator-describe-par-hooks' => 'Ël gancio dël parser për ël qual mosté la documentassion.', |
| 1929 | + 'validator-describe-par-pre' => "At përmëtt ëd pijé ël wikitest atual për la documentassion, sensa ch'a sia presentà an sla pagina.", |
| 1930 | + 'validator-describe-listtype' => 'Lista ëd $1 element', |
| 1931 | + 'validator-describe-empty' => 'veuid', |
| 1932 | + 'validator-describe-required' => 'ciamà', |
| 1933 | + 'validator-describe-header-parameter' => 'Paràmetr', |
| 1934 | + 'validator-describe-header-aliases' => 'Alias', |
| 1935 | + 'validator-describe-header-type' => 'Sòrt', |
| 1936 | + 'validator-describe-header-default' => 'Për sòlit', |
| 1937 | + 'validator-describe-header-description' => 'Descrission', |
| 1938 | + 'validator-describe-parameters' => 'Paràmetr', |
| 1939 | + 'validator-describe-syntax' => 'Sintassi', |
| 1940 | + 'validator-describe-tagmin' => 'Estension ëd tag con mach ij paràmetr ciamà.', |
| 1941 | + 'validator-describe-tagmax' => 'Estension ëd tag con tùit ij paràmetr.', |
| 1942 | + 'validator-describe-tagdefault' => 'Estension ëd tag con tùit ij paràmetr an dovrand la notassion ëd default dij paràmetr.', |
| 1943 | + 'validator-describe-pfmin' => 'Funsion dël parser con mach ij paràmetr ciamà.', |
| 1944 | + 'validator-describe-pfmax' => 'Funsion dël parser con tùit ij paràmetr.', |
| 1945 | + 'validator-describe-pfdefault' => 'Funsion dël parser con tùit ij paràmetr an dovrand la notassion ëd default dij paràmetr.', |
| 1946 | + 'validator-describe-autogen' => 'Ël contnù dë sta session a l\'era auto-generà dal gancio dël parser "descriv" ëd l\'estension ëd Validator.', |
| 1947 | + 'validator_error_empty_argument' => 'Ël paràmetr $1 a peul pa avèj un valor veuid.', |
| 1948 | + 'validator_error_must_be_number' => 'Ël paràmetr $1 a peul mach esse un nùmer.', |
| 1949 | + 'validator_error_must_be_integer' => "Ël paràmetr $1 a peul mach esse n'antregh.", |
| 1950 | + 'validator-error-must-be-float' => 'Ël paràmetr $1 a peul mach esse un nùmer an vìrgola mòbil.', |
| 1951 | + 'validator_error_invalid_range' => 'Ël paràmetr $1 a deuv esse an tra $2 e $3.', |
| 1952 | + 'validator-error-invalid-regex' => 'Ël paràmetr $1 a dev cobiesse con sta espression regolar: $2.', |
| 1953 | + 'validator-error-invalid-length' => 'Ël paràmetr $1 a dev avèj na longheur ëd $2.', |
| 1954 | + 'validator-error-invalid-length-range' => 'Ël paràmetr $1 a dev avèj na longheur antra $2 e $3.', |
| 1955 | + 'validator_error_invalid_argument' => "Ël valor $1 a l'é pa bon për ël paràmetr $2.", |
| 1956 | + 'validator_list_error_empty_argument' => 'Ël paràmetr $1 a aceta pa dij valor veuid.', |
| 1957 | + 'validator_list_error_must_be_number' => 'Ël paràmetr $1 a peul mach conten-e dij nùmer.', |
| 1958 | + 'validator_list_error_must_be_integer' => "Ël paràmetr $1 a peul mach conten-e dj'antegr.", |
| 1959 | + 'validator-list-error-must-be-float' => 'Ël paràmetr $1 a peul mach conten-e dij nùmer con vìrgola.', |
| 1960 | + 'validator_list_error_invalid_range' => 'Tùit ij valor dël paràmetr $1 a deuvo esse tra $2 e $3.', |
| 1961 | + 'validator-list-error-invalid-regex' => 'Tùit ij valor dël paràmetr $1 a devo cobiesse con sta espression regolar: $2.', |
| 1962 | + 'validator_list_error_invalid_argument' => 'Un o pi valor dël paràmetr $1 a son pa bon.', |
| 1963 | + 'validator-list-error-accepts-only' => 'Un o pi valor për ël paràmetr $1 a son pa bon. |
| 1964 | +A aceta mach {{PLURAL:$3|sto valor|sti valor}}: $2.', |
| 1965 | + 'validator-list-error-accepts-only-omitted' => 'Un o pi valor për ël paràmetr $1 a son pa bon. |
| 1966 | +A aceta mach {{PLURAL:$3|sto valor|sti valor}}: $2 (e $4 {{PLURAL:$4|valor|valor}} sautà).', |
| 1967 | + 'validator_error_accepts_only' => 'Ël valor "$4" a l\'é pa bon për ël paràmetr $1. A aceta mach {{PLURAL:$3|sto valor-sì|sti valor-sì}}: $2.', |
| 1968 | + 'validator-error-accepts-only-omitted' => 'Ël valor "$2" a l\'é pa bon për ël paràmetr $1. A aceta mach sti valor: $3 (e ij valor pa butà $4).', |
| 1969 | + 'validator_list_omitted' => "{{PLURAL:$2|Ël valor|Ij valor}} $1 {{PLURAL:$2|a l'é|a son}} pa stàit butà.", |
| 1970 | +); |
| 1971 | + |
| 1972 | +/** Pashto (پښتو) |
| 1973 | + * @author Ahmed-Najib-Biabani-Ibrahimkhel |
| 1974 | + */ |
| 1975 | +$messages['ps'] = array( |
| 1976 | + 'validator-type-string' => 'متن', |
| 1977 | + 'validator-type-number' => 'شمېره', |
| 1978 | + 'validator-type-float' => 'شمېره', |
| 1979 | + 'validator-type-boolean' => 'هو/نه', |
| 1980 | + 'validator-type-char' => 'لوښه', |
| 1981 | + 'validator-listerrors-normal' => 'نورمال', |
| 1982 | + 'validator-describe-empty' => 'تش', |
| 1983 | + 'validator-describe-header-default' => 'تلواليز', |
| 1984 | +); |
| 1985 | + |
| 1986 | +/** Portuguese (Português) |
| 1987 | + * @author Giro720 |
| 1988 | + * @author Hamilton Abreu |
| 1989 | + * @author Lijealso |
| 1990 | + * @author Waldir |
| 1991 | + */ |
| 1992 | +$messages['pt'] = array( |
| 1993 | + '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', |
| 1994 | + 'validator-warning' => 'Aviso: $1', |
| 1995 | + 'validator-error' => 'Erro: $1', |
| 1996 | + 'validator-fatal-error' => 'Erro fatal: $1', |
| 1997 | + 'validator_error_parameters' => '{{PLURAL:$1|Foi detectado o seguinte erro sintáctico|Foram detectados os seguintes erros sintácticos}}:', |
| 1998 | + 'validator_warning_parameters' => '{{PLURAL:$1|Existe um erro sintáctico|Existem erros sintácticos}}.', |
| 1999 | + 'validator-warning-adittional-errors' => '... e {{PLURAL:$1|mais um problema|vários outros problemas}}.', |
| 2000 | + 'validator-error-omitted' => '{{PLURAL:$2|O valor "$1" foi omitido|Os valores "$1" foram omitidos}}.', |
| 2001 | + 'validator-error-problem' => 'Houve um problema com o parâmetro $1.', |
| 2002 | + 'validator_error_unknown_argument' => '$1 não é um parâmetro válido.', |
| 2003 | + 'validator_error_required_missing' => 'O parâmetro obrigatório $1 não foi fornecido.', |
| 2004 | + 'validator-error-override-argument' => 'Tentativa de sobrepor o parâmetro $1 (valor: $2) com o valor "$3"', |
| 2005 | + 'validator-type-string' => 'texto', |
| 2006 | + 'validator-type-number' => 'número', |
| 2007 | + 'validator-type-integer' => 'número inteiro', |
| 2008 | + 'validator-type-float' => 'número', |
| 2009 | + 'validator-type-boolean' => 'sim/não', |
| 2010 | + 'validator-type-char' => 'carácter', |
| 2011 | + 'validator-listerrors-errors' => 'Erros', |
| 2012 | + 'validator-listerrors-minor' => 'Menor', |
| 2013 | + 'validator-listerrors-low' => 'Baixo', |
| 2014 | + 'validator-listerrors-normal' => 'Normal', |
| 2015 | + 'validator-listerrors-high' => 'Alto', |
| 2016 | + 'validator-listerrors-fatal' => 'Fatal', |
| 2017 | + 'validator-listerrors-description' => 'Lista os erros (e avisos) que ocorreram nos hooks do analisador sintáctico adicionados através do Serviço de Validação. |
| 2018 | +Da lista constarão apenas os hooks que apareçam acima do ponto na página onde está listerrors; |
| 2019 | +para obter todos os erros, coloque listerrors ao fundo da página.', |
| 2020 | + 'validator-listerrors-par-minseverity' => 'A gravidade mínima de um problema, para que este seja listado.', |
| 2021 | + 'validator-describe-description' => 'Gera documentação para um ou mais hooks do analisador sintáctico definidos através do Serviço de Validação.', |
| 2022 | + 'validator-describe-notfound' => 'Não existe nenhum hook para lidar com "$1".', |
| 2023 | + 'validator-describe-descriptionmsg' => "'''Descrição''': $1", |
| 2024 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Nome alternativo|Nomes alternativos}}''': $1", |
| 2025 | + 'validator-describe-parserfunction' => 'Implementada apenas como função do analisador sintáctico.', |
| 2026 | + 'validator-describe-tagextension' => 'Implementada apenas como extensão de tag.', |
| 2027 | + 'validator-describe-bothhooks' => 'Implementada como função do analisador sintáctico e como extensão de tag.', |
| 2028 | + 'validator-describe-par-hooks' => 'Os hooks do analisador sintáctico para os quais será mostrada documentação.', |
| 2029 | + 'validator-describe-par-pre' => 'Permite obter o texto wiki real da documentação, sem que este seja formatado na página.', |
| 2030 | + 'validator-describe-listtype' => 'Lista de $1 elementos', |
| 2031 | + 'validator-describe-empty' => 'vazio', |
| 2032 | + 'validator-describe-required' => 'necessário', |
| 2033 | + 'validator-describe-header-parameter' => 'Parâmetro', |
| 2034 | + 'validator-describe-header-aliases' => 'Nomes alternativos', |
| 2035 | + 'validator-describe-header-type' => 'Tipo', |
| 2036 | + 'validator-describe-header-default' => 'Por omissão', |
| 2037 | + 'validator-describe-header-description' => 'Descrição', |
| 2038 | + 'validator-describe-parameters' => 'Parâmetros', |
| 2039 | + 'validator-describe-syntax' => 'Sintaxe', |
| 2040 | + 'validator-describe-tagmin' => 'Extensão de tag só com os parâmetros obrigatórios.', |
| 2041 | + 'validator-describe-tagmax' => 'Extensão de tag com todos os parâmetros.', |
| 2042 | + 'validator-describe-tagdefault' => 'Extensão de tag com todos os parâmetros, usando a notação do parâmetro por omissão.', |
| 2043 | + 'validator-describe-pfmin' => 'Função do analisador sintáctico só com os parâmetros obrigatórios.', |
| 2044 | + 'validator-describe-pfmax' => 'Função do analisador sintáctico com todos os parâmetros.', |
| 2045 | + 'validator-describe-pfdefault' => 'Função do analisador sintáctico com todos os parâmetros, usando a notação do parâmetro por omissão.', |
| 2046 | + 'validator-describe-autogen' => 'O conteúdo desta secção foi gerado de forma automática pelo hook "describe" do analisador sintáctico, criado pela extensão Serviço de Validação.', |
| 2047 | + 'validator_error_empty_argument' => 'O parâmetro $1 não pode estar vazio.', |
| 2048 | + 'validator_error_must_be_number' => 'O parâmetro $1 só pode ser numérico.', |
| 2049 | + 'validator_error_must_be_integer' => 'O parâmetro $1 só pode ser um número inteiro.', |
| 2050 | + 'validator-error-must-be-float' => 'O parâmetro $1 só pode ser um número de vírgula flutuante.', |
| 2051 | + 'validator_error_invalid_range' => 'O parâmetro $1 tem de ser entre $2 e $3.', |
| 2052 | + 'validator-error-invalid-regex' => 'O parâmetro $1 deve corresponder à expressão regular: $2.', |
| 2053 | + 'validator-error-invalid-length' => 'O parâmetro $1 tem de ter um comprimento de $2.', |
| 2054 | + 'validator-error-invalid-length-range' => 'O parâmetro $1 tem de ter um comprimento entre $2 e $3.', |
| 2055 | + 'validator_error_invalid_argument' => 'O valor $1 não é válido para o parâmetro $2.', |
| 2056 | + 'validator_list_error_empty_argument' => 'O parâmetro $1 não pode estar vazio.', |
| 2057 | + 'validator_list_error_must_be_number' => 'O parâmetro $1 só pode ser numérico.', |
| 2058 | + 'validator_list_error_must_be_integer' => 'O parâmetro $1 só pode ser um número inteiro.', |
| 2059 | + 'validator-list-error-must-be-float' => 'O parâmetro $1 só pode conter valores de vírgula flutuante.', |
| 2060 | + 'validator_list_error_invalid_range' => 'Todos os valores do parâmetro $1 têm de ser entre $2 e $3.', |
| 2061 | + 'validator-list-error-invalid-regex' => 'Todos os valores do parâmetro $1 devem corresponder à expressão regular: $2.', |
| 2062 | + 'validator_list_error_invalid_argument' => 'Um ou mais valores do parâmetro $1 são inválidos.', |
| 2063 | + 'validator-list-error-accepts-only' => 'Um ou mais valores para o parâmetro $1 são inválidos. |
| 2064 | +Só {{PLURAL:$3|é aceite este valor|são aceites estes valores}}: $2.', |
| 2065 | + 'validator-list-error-accepts-only-omitted' => 'Um ou mais valores para o parâmetro $1 são inválidos. |
| 2066 | +Só {{PLURAL:$3|é aceite este valor|são aceites estes valores}}: $2 (e $4 {{PLURAL:$4|valor omitido|valores omitidos}}).', |
| 2067 | + 'validator_error_accepts_only' => 'O valor "$4" não é válido para o parâmetro $1. O parâmetro só aceita {{PLURAL:$3|este valor|estes valores}}: $2.', |
| 2068 | + 'validator-error-accepts-only-omitted' => 'O valor $2 não é válido para o parâmetro $1. |
| 2069 | +Só {{PLURAL:$5|é aceite este valor|são aceites estes valores}}: $3 (e $4 {{PLURAL:$4|valor omitido|valores omitidos}}).', |
| 2070 | + 'validator_list_omitted' => '{{PLURAL:$2|O valor $1 foi omitido|Os valores $1 foram omitidos}}.', |
| 2071 | +); |
| 2072 | + |
| 2073 | +/** Brazilian Portuguese (Português do Brasil) |
| 2074 | + * @author Giro720 |
| 2075 | + * @author Luckas Blade |
| 2076 | + */ |
| 2077 | +$messages['pt-br'] = array( |
| 2078 | + 'validator-desc' => 'Fornece suporte a manipulação de parâmetros genéricos para outras extensões', |
| 2079 | + 'validator-warning' => 'Atenção: $1', |
| 2080 | + 'validator-error' => 'Erro: $1', |
| 2081 | + 'validator-fatal-error' => 'Erro crítico: $1', |
| 2082 | + 'validator_error_parameters' => '{{PLURAL:$1|Foi detectado o seguinte erro sintáctico|Foram detectados os seguintes erros sintácticos}}:', |
| 2083 | + 'validator_warning_parameters' => '{{PLURAL:$1|Existe um erro|Existem erros}} em sua sintaxe.', |
| 2084 | + 'validator-warning-adittional-errors' => '... e {{PLURAL:$1|mais um problema|vários outros problemas}}.', |
| 2085 | + 'validator-error-omitted' => '{{PLURAL:$2|O valor "$1" foi omitido|Os valores "$1" foram omitidos}}.', |
| 2086 | + 'validator-error-problem' => 'Houve um problema com o parâmetro $1.', |
| 2087 | + 'validator_error_unknown_argument' => '$1 não é um parâmetro válido.', |
| 2088 | + 'validator_error_required_missing' => 'O parâmetro obrigatório $1 não foi fornecido.', |
| 2089 | + 'validator-error-override-argument' => 'Tentativa de sobrepor o parâmetro $1 (valor: $2) com o valor "$3"', |
| 2090 | + 'validator-type-string' => 'texto', |
| 2091 | + 'validator-type-number' => 'número', |
| 2092 | + 'validator-type-integer' => 'número inteiro', |
| 2093 | + 'validator-listerrors-errors' => 'Erros', |
| 2094 | + 'validator-listerrors-minor' => 'Menor', |
| 2095 | + 'validator-listerrors-low' => 'Baixo', |
| 2096 | + 'validator-listerrors-normal' => 'Normal', |
| 2097 | + 'validator-listerrors-high' => 'Alto', |
| 2098 | + 'validator-listerrors-fatal' => 'Fatal', |
| 2099 | + 'validator_error_empty_argument' => 'O parâmetro $1 não pode estar vazio.', |
| 2100 | + 'validator_error_must_be_number' => 'O parâmetro $1 só pode ser numérico.', |
| 2101 | + 'validator_error_must_be_integer' => 'O parâmetro $1 só pode ser um número inteiro.', |
| 2102 | + 'validator-error-must-be-float' => 'O parâmetro $1 deve ser um número de ponto flutuante.', |
| 2103 | + 'validator_error_invalid_range' => 'O parâmetro $1 tem de ser entre $2 e $3.', |
| 2104 | + 'validator-error-invalid-regex' => 'O parâmetro $1 deve corresponder à expressão regular: $2.', |
| 2105 | + 'validator-error-invalid-length' => 'O parâmetro $1 deve ter um comprimento de $2.', |
| 2106 | + 'validator-error-invalid-length-range' => 'O parâmetro $1 deve ter um comprimento entre $2 e $3.', |
| 2107 | + 'validator_error_invalid_argument' => 'O valor $1 não é válido para o parâmetro $2.', |
| 2108 | + 'validator_list_error_empty_argument' => 'O parâmetro $1 não pode estar vazio.', |
| 2109 | + 'validator_list_error_must_be_number' => 'O parâmetro $1 só pode ser numérico.', |
| 2110 | + 'validator_list_error_must_be_integer' => 'O parâmetro $1 só pode ser um número inteiro.', |
| 2111 | + 'validator-list-error-must-be-float' => 'O parâmetro $1 só pode conter valores de ponto flutuante.', |
| 2112 | + 'validator_list_error_invalid_range' => 'Todos os valores do parâmetro $1 têm de ser entre $2 e $3.', |
| 2113 | + 'validator-list-error-invalid-regex' => 'Todos os valores do parâmetro $1 devem corresponder à expressão regular: $2.', |
| 2114 | + 'validator_list_error_invalid_argument' => 'Um ou mais valores do parâmetro $1 são inválidos.', |
| 2115 | + 'validator-list-error-accepts-only' => 'Um ou mais valores para o parâmetro $1 são inválidos. |
| 2116 | +Só {{PLURAL:$3|é aceite este valor|são aceites estes valores}}: $2.', |
| 2117 | + 'validator-list-error-accepts-only-omitted' => 'Um ou mais valores para o parâmetro $1 são inválidos. |
| 2118 | +Só {{PLURAL:$3|é aceite este valor|são aceites estes valores}}: $2 (e $4 {{PLURAL:$4|valor omitido|valores omitidos}}).', |
| 2119 | + 'validator_error_accepts_only' => 'O valor $4 não é válido para o parâmetro $1. Esse parâmetro só aceita {{PLURAL:$3|este valor|estes valores}}: $2.', |
| 2120 | + 'validator-error-accepts-only-omitted' => 'O valor $2 não é válido para o parâmetro $1. |
| 2121 | +Só {{PLURAL:$5|é aceite este valor|são aceites estes valores}}: $3 (e $4 {{PLURAL:$4|valor omitido|valores omitidos}}).', |
| 2122 | + 'validator_list_omitted' => '{{PLURAL:$2|O valor $1 foi omitido|Os valores $1 foram omitidos}}.', |
| 2123 | +); |
| 2124 | + |
| 2125 | +/** Romanian (Română) |
| 2126 | + * @author Stelistcristi |
| 2127 | + */ |
| 2128 | +$messages['ro'] = array( |
| 2129 | + 'validator-warning' => 'Avertisment: $1', |
| 2130 | + 'validator-fatal-error' => 'Eroare fatală: $1', |
| 2131 | + 'validator_error_unknown_argument' => '$1 nu este un parametru valid.', |
| 2132 | + 'validator_error_required_missing' => 'Parametrul solicitat „$1” nu este furnizat.', |
| 2133 | + 'validator-listerrors-errors' => 'Erori', |
| 2134 | + 'validator_error_empty_argument' => 'Parametrul $1 nu poate avea o valoare goală.', |
| 2135 | + 'validator_error_must_be_number' => 'Parametrul $1 poate fi doar un număr.', |
| 2136 | + 'validator_error_must_be_integer' => 'Parametrul $1 poate fi doar un număr întreg.', |
| 2137 | +); |
| 2138 | + |
| 2139 | +/** Russian (Русский) |
| 2140 | + * @author Aleksandrit |
| 2141 | + * @author Eleferen |
| 2142 | + * @author Haffman |
| 2143 | + * @author Lockal |
| 2144 | + * @author MaxSem |
| 2145 | + * @author McDutchie |
| 2146 | + * @author Александр Сигачёв |
| 2147 | + */ |
| 2148 | +$messages['ru'] = array( |
| 2149 | + 'validator-desc' => 'Валидатор предоставляет другим расширениям возможности проверки параметров функций парсера и тегов, установки значения по умолчанию и создания сообщения об ошибках', |
| 2150 | + 'validator-warning' => 'Внимание: $1', |
| 2151 | + 'validator-error' => 'Ошибка: $1', |
| 2152 | + 'validator-fatal-error' => 'Критическая ошибка: $1', |
| 2153 | + 'validator_error_parameters' => 'В вашем синтаксисе {{PLURAL:$1|обнаружена следующая ошибка|обнаружены следующие ошибки}}:', |
| 2154 | + 'validator_warning_parameters' => 'В вашем синтаксисе {{PLURAL:$1|имеется ошибка|имеются ошибки}}.', |
| 2155 | + 'validator-warning-adittional-errors' => '… и {{PLURAL:$1|ещё одна проблема|ещё несколько проблем}}.', |
| 2156 | + 'validator-error-omitted' => '{{PLURAL:$2|Значение «$1» пропущено|Значения «$1» пропущены}}.', |
| 2157 | + 'validator-error-problem' => 'Обнаружена проблема с параметром «$1».', |
| 2158 | + 'validator_error_unknown_argument' => '$1 не является допустимым параметром.', |
| 2159 | + 'validator_error_required_missing' => 'Не указан обязательный параметр $1.', |
| 2160 | + 'validator-error-override-argument' => 'Попытка переопределения параметра $1 (значение: $2) значением «$3»', |
| 2161 | + 'validator-type-string' => 'текст', |
| 2162 | + 'validator-type-number' => 'число', |
| 2163 | + 'validator-type-integer' => 'целое число', |
| 2164 | + 'validator-type-float' => 'число', |
| 2165 | + 'validator-type-boolean' => 'да/нет', |
| 2166 | + 'validator-type-char' => 'символ', |
| 2167 | + 'validator-listerrors-errors' => 'Ошибки', |
| 2168 | + 'validator-listerrors-minor' => 'Незначительная', |
| 2169 | + 'validator-listerrors-low' => 'Низкая', |
| 2170 | + 'validator-listerrors-normal' => 'Обычная', |
| 2171 | + 'validator-listerrors-high' => 'Высокая', |
| 2172 | + 'validator-listerrors-fatal' => 'Фатальная', |
| 2173 | + 'validator-listerrors-description' => 'Перечисляет ошибки (и предупреждения), произошедшие в обработчиках парсера, добавленных с помощью Validator. |
| 2174 | +Выводятся только обработчики парсера, добавленные выше вставленно listerrors. |
| 2175 | +Поместите listerrors в самый конец страницы, чтобы получить все ошибки.', |
| 2176 | + 'validator-listerrors-par-minseverity' => 'Минимальная серьезность вопроса, для включения в список.', |
| 2177 | + 'validator-describe-description' => 'Создает документацию для одного или нескольких обработчиков парсера, по пределениям Validator.', |
| 2178 | + 'validator-describe-notfound' => 'Не существует обработчика парсера для «$1».', |
| 2179 | + 'validator-describe-descriptionmsg' => "'''Описание''': $1", |
| 2180 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Псевдоним|Псевдонимы}}''': $1", |
| 2181 | + 'validator-describe-parserfunction' => 'Реализована только функция парсера.', |
| 2182 | + 'validator-describe-tagextension' => 'Реализовано только как дополнительный тег.', |
| 2183 | + 'validator-describe-bothhooks' => 'Реализовано и функция парсера, и дополнительный тег.', |
| 2184 | + 'validator-describe-par-hooks' => 'Обработчик парсера, для которого отображать документацию.', |
| 2185 | + 'validator-describe-par-pre' => 'Позволяет получить фактический викитекст для документации, без показа на странице.', |
| 2186 | + 'validator-describe-listtype' => 'Перечень пунктов $1', |
| 2187 | + 'validator-describe-empty' => 'пусто', |
| 2188 | + 'validator-describe-required' => 'требуется', |
| 2189 | + 'validator-describe-header-parameter' => 'Параметр', |
| 2190 | + 'validator-describe-header-aliases' => 'Псевдонимы', |
| 2191 | + 'validator-describe-header-type' => 'Тип', |
| 2192 | + 'validator-describe-header-default' => 'По умолчанию', |
| 2193 | + 'validator-describe-header-description' => 'Описание', |
| 2194 | + 'validator-describe-parameters' => 'Параметры', |
| 2195 | + 'validator-describe-syntax' => 'Синтаксис', |
| 2196 | + 'validator-describe-tagmin' => 'Теговое расширение, имеющее только обязательные параметры.', |
| 2197 | + 'validator-describe-tagmax' => 'Теговое расширение со всеми параметрами.', |
| 2198 | + 'validator-describe-tagdefault' => 'Теговое расширение со всеми параметрами, использованием параметров по умолчанию.', |
| 2199 | + 'validator-describe-pfmin' => 'Парсерная функция, имеющая только обязательные параметры.', |
| 2200 | + 'validator-describe-pfmax' => 'Парсерная функция со всеми параметрами.', |
| 2201 | + 'validator-describe-pfdefault' => 'Парсерная функция со всеми параметрами, использованием параметров по умолчанию.', |
| 2202 | + 'validator-describe-autogen' => 'Содержимое этого раздела было автоматически создано парсерным обработчиком «describe» расширения Validator.', |
| 2203 | + 'validator_error_empty_argument' => 'Параметр $1 не может принимать пустое значение.', |
| 2204 | + 'validator_error_must_be_number' => 'Значением параметра $1 могут быть только числа.', |
| 2205 | + 'validator_error_must_be_integer' => 'Параметр $1 может быть только целым числом.', |
| 2206 | + 'validator-error-must-be-float' => 'Параметр $1 может быть числом с плавающей точкой.', |
| 2207 | + 'validator_error_invalid_range' => 'Параметр $1 должен быть от $2 до $3.', |
| 2208 | + 'validator-error-invalid-regex' => 'Параметр «$1» должен соответствовать регулярному выражению «$2».', |
| 2209 | + 'validator-error-invalid-length' => 'Параметр $1 должен иметь длину $2.', |
| 2210 | + 'validator-error-invalid-length-range' => 'Параметр $1 должен иметь длину от $2 до $3.', |
| 2211 | + 'validator_error_invalid_argument' => 'Значение $1 не является допустимым параметром $2', |
| 2212 | + 'validator_list_error_empty_argument' => 'Параметр $1 не может принимать пустые значения.', |
| 2213 | + 'validator_list_error_must_be_number' => 'Параметр $1 может содержать только цифры.', |
| 2214 | + 'validator_list_error_must_be_integer' => 'Параметр $1 может содержать только целые числа.', |
| 2215 | + 'validator-list-error-must-be-float' => 'Параметр «$1» может содержать только числа с плавающей точкой.', |
| 2216 | + 'validator_list_error_invalid_range' => 'Все значения параметра $1 должна находиться в диапазоне от $2 до $3.', |
| 2217 | + 'validator-list-error-invalid-regex' => 'Все значения параметра «$1» должны соответствовать регулярноve выражению «$2».', |
| 2218 | + 'validator_list_error_invalid_argument' => 'Одно или несколько значений параметра $1 ошибочны.', |
| 2219 | + 'validator-list-error-accepts-only' => 'Ошибочны один или несколько значений параметра $1. |
| 2220 | +{{PLURAL:$3|Допустимо только следующее значение|Допустимы только следующие значения}}: $2.', |
| 2221 | + 'validator-list-error-accepts-only-omitted' => 'Ошибочны один или несколько значений параметра $1. |
| 2222 | +{{PLURAL:$3|Допустимо только следующее значение|Допустимы только следующие значения}}: $2 (и $4 {{PLURAL:$4|опущенное значение|опущенных значения|опущенных значений}}).', |
| 2223 | + 'validator_error_accepts_only' => 'Значение «$4» не подходит для параметра $1. Оно может принимать только {{PLURAL:$3|следующее значение|следующие значения}}: $2.', |
| 2224 | + 'validator-error-accepts-only-omitted' => 'Значение «$2» не подходит для параметра $1. |
| 2225 | +{{PLURAL:$5|Допускается только значение|Допускаются только значения}}: $3 (и $4 {{PLURAL:$4|пропущенное значение|пропущенных значения|пропущенных значений}}).', |
| 2226 | + 'validator_list_omitted' => '{{PLURAL:$2|Значение $1 было пропущено|Значения $1 были пропущены}}.', |
| 2227 | +); |
| 2228 | + |
| 2229 | +/** Sinhala (සිංහල) |
| 2230 | + * @author Calcey |
| 2231 | + */ |
| 2232 | +$messages['si'] = array( |
| 2233 | + 'validator-desc' => 'තහවුරු කරන්නා ටැග් දිඟුවන් හා parser ශ්රිතවල පරාමිතීන් තහවුරු කිරීමට අනෙක් දිඟුවන් සඳහා පහසු ක්රමයක් සපයයි,පෙරනිමි අගයන් පිහිටුවීම හා දෝෂ පණිවුඩ ජනනය කිරීම ද සිදු කරයි', |
| 2234 | + 'validator_error_parameters' => 'ඔබේ වාග් රීතිය මඟින් පහත {{PLURAL:$1|දෝෂය|දෝෂයන්}} අනාවරණය කරනු ලැබ ඇත', |
| 2235 | + 'validator_error_unknown_argument' => '$1 වලංගු පරාමිතියක් නොවේ.', |
| 2236 | + 'validator_error_required_missing' => 'අවශ්ය වන $1 පරාමිතිය සපයා නොමැත.', |
| 2237 | + 'validator_error_empty_argument' => '$1 පරාමිතියට හිස් අගයක් තිබිය නොහැක.', |
| 2238 | + 'validator_error_must_be_number' => '$1 පරාමිතිය විය හැක්කේ ඉලක්කමක් පමණි.', |
| 2239 | + 'validator_error_invalid_range' => '$1 පරාමිතිය $2 හා $3 අතර විය යුතුය.', |
| 2240 | + 'validator_error_invalid_argument' => '$2 පරාමිතිය සඳහා $1 අගය වලංගු නොවේ.', |
| 2241 | + 'validator_error_accepts_only' => '$1 පරාමිතිය විසින් පිළිගනු ලබන්නේ {{PLURAL:$3|මෙම අගය|මෙම අගයන්}}: $2 පමණි.', |
| 2242 | +); |
| 2243 | + |
| 2244 | +/** Swedish (Svenska) |
| 2245 | + * @author Fluff |
| 2246 | + * @author Ozp |
| 2247 | + * @author Per |
| 2248 | + * @author Sertion |
| 2249 | + */ |
| 2250 | +$messages['sv'] = array( |
| 2251 | + 'validator-desc' => 'Valideraren skapar ett smidigt sätt för andra tillägg att validera olika parserfunktioners parametrar och taggar, sätta standardvärden för tilläggen samt att generera felmeddelanden', |
| 2252 | + 'validator_error_parameters' => 'Följande {{PLURAL:$1|fel|fel}} har upptäckts i din syntax:', |
| 2253 | + 'validator_warning_parameters' => 'Det finns {{PLURAL:$1|ett|flera}} fel i din syntax.', |
| 2254 | + 'validator_error_unknown_argument' => '$1 är inte en giltig paramter.', |
| 2255 | + 'validator_error_required_missing' => 'Den nödvändiga parametern $1 har inte angivits.', |
| 2256 | + 'validator_error_empty_argument' => 'Parametern $1 kan inte lämnas tom.', |
| 2257 | + 'validator_error_must_be_number' => 'Parameter $1 måste bestå av ett tal.', |
| 2258 | + 'validator_error_must_be_integer' => 'Parametern $1 måste vara ett heltal.', |
| 2259 | + 'validator_error_invalid_range' => 'Parameter $1 måste vara i mellan $2 och $3.', |
| 2260 | + 'validator_error_invalid_argument' => 'Värdet $1 är inte giltigt som parameter $2.', |
| 2261 | + 'validator_list_error_empty_argument' => 'Parameter $1 accepterar inte tomma värden.', |
| 2262 | + 'validator_list_error_must_be_number' => 'Parameter $1 får endast innehålla siffror.', |
| 2263 | + 'validator_list_error_must_be_integer' => 'Parameter $1 får endast innehålla heltal.', |
| 2264 | + 'validator_list_error_invalid_range' => 'Alla värden av parameter $1 måste vara mellan $2 och $3.', |
| 2265 | + 'validator_list_error_invalid_argument' => 'Ett eller flera värden av parameter $1 är ogiltiga.', |
| 2266 | + 'validator_error_accepts_only' => 'Parametern $1 måste ha {{PLURAL:$3|detta värde|ett av dessa värden}}: $2.', |
| 2267 | + 'validator_list_omitted' => '{{PLURAL:$2|Värdet|Värdena}} $1 har blivit {{PLURAL:$2|utelämnat|utelämnade}}.', |
| 2268 | +); |
| 2269 | + |
| 2270 | +/** Telugu (తెలుగు) |
| 2271 | + * @author Ravichandra |
| 2272 | + * @author Veeven |
| 2273 | + */ |
| 2274 | +$messages['te'] = array( |
| 2275 | + 'validator-warning' => 'హెచ్చరిక: $1', |
| 2276 | + 'validator-error' => 'పొరపాటు: $1', |
| 2277 | + 'validator_error_unknown_argument' => '$1 అనేది సరైన పరామితి కాదు.', |
| 2278 | + 'validator_error_required_missing' => 'తప్పకుండా కావాల్సిన $1 పరామితిని ఇవ్వలేదు.', |
| 2279 | + 'validator-type-string' => 'పాఠ్యం', |
| 2280 | + 'validator-type-number' => 'సంఖ్య', |
| 2281 | + 'validator-type-integer' => 'పూర్ణ సంఖ్య', |
| 2282 | + 'validator-type-float' => 'సంఖ్య', |
| 2283 | + 'validator-type-boolean' => 'అవును/కాదు', |
| 2284 | + 'validator-listerrors-errors' => 'పొరపాట్లు', |
| 2285 | + 'validator-describe-descriptionmsg' => "'''వివరణ''': $1", |
| 2286 | + 'validator-describe-required' => 'తప్పనిసరి', |
| 2287 | + 'validator-describe-header-aliases' => 'మారుపేర్లు', |
| 2288 | + 'validator-describe-header-type' => 'రకం', |
| 2289 | + 'validator-describe-header-default' => 'అప్రమేయం', |
| 2290 | + 'validator-describe-header-description' => 'వివరణ', |
| 2291 | + 'validator-describe-parameters' => 'పరామితులు', |
| 2292 | + 'validator_error_empty_argument' => '$1 పరామితి ఖాళీగా ఉండకూడదు', |
| 2293 | + 'validator_error_must_be_number' => '$1 పరామితి ఖచ్చితంగా ఓ సంఖ్య అయిఉండాలి', |
| 2294 | + 'validator_error_must_be_integer' => '$1 పరామితి ఒక పూర్ణసంఖ్య అయిఉండాలి', |
| 2295 | + 'validator_error_invalid_range' => '$1 పరామితి $2, $3 మద్యలో ఉండాలి.', |
| 2296 | + 'validator_error_invalid_argument' => '$2 పరామితి కోసం $1 విలువ సరైంది కాదు', |
| 2297 | + 'validator_list_error_must_be_number' => '$1 పరామితి ఖచ్చితంగా సంఖ్యలను మాత్రమే కలిగివుండాలి.', |
| 2298 | + 'validator_list_error_must_be_integer' => '$1 పరామితి పూర్ణసంఖ్యలను మాత్రమే కలిగివుండాలి.', |
| 2299 | +); |
| 2300 | + |
| 2301 | +/** Tagalog (Tagalog) |
| 2302 | + * @author AnakngAraw |
| 2303 | + */ |
| 2304 | +$messages['tl'] = array( |
| 2305 | + 'validator-desc' => 'Nagbibigay ng panlahatang magtangkilik na paghawak sa ibang mga dugtong', |
| 2306 | + 'validator-warning' => 'Babala: $1', |
| 2307 | + 'validator-error' => 'Kamalian: $1', |
| 2308 | + 'validator-fatal-error' => 'Masidhing kamalian: $1', |
| 2309 | + 'validator_error_parameters' => 'Ang sumusunod na {{PLURAL:$1|kamalian|mga kamalian}} ay napansin sa iyong sintaks:', |
| 2310 | + 'validator_warning_parameters' => 'May {{PLURAL:$1|mali|mga mali}} sa sintaks mo.', |
| 2311 | + 'validator-warning-adittional-errors' => '... at {{PLURAL:$1|isa pang paksa|maramihan pang mga paksa}}.', |
| 2312 | + 'validator-error-omitted' => 'Ang {{PLURAL:$2|halagang "$1" ay|mga halaga "$1" ay}} natanggal na.', |
| 2313 | + 'validator-error-problem' => 'Nagkaroon ng suliranin sa parametrong $1.', |
| 2314 | + 'validator_error_unknown_argument' => 'Ang $1 ay isang hindi tanggap na parametro.', |
| 2315 | + 'validator_error_required_missing' => 'Hindi ibinigay ang kailangang parametro na $1.', |
| 2316 | + 'validator-error-override-argument' => 'Sinubukang pangingibabawan ang parametrong $1 (halaga: $2) ng halagang "$3"', |
| 2317 | + 'validator-type-string' => 'teksto', |
| 2318 | + 'validator-type-number' => 'bilang', |
| 2319 | + 'validator-type-integer' => 'buong bilang', |
| 2320 | + 'validator-type-float' => 'bilang', |
| 2321 | + 'validator-type-boolean' => 'oo/hindi', |
| 2322 | + 'validator-type-char' => 'panitik', |
| 2323 | + 'validator-listerrors-errors' => 'Mga kamalian', |
| 2324 | + 'validator-listerrors-minor' => 'Munti', |
| 2325 | + 'validator-listerrors-low' => 'Mababa', |
| 2326 | + 'validator-listerrors-normal' => 'Karaniwan', |
| 2327 | + 'validator-listerrors-high' => 'Mataas', |
| 2328 | + 'validator-listerrors-fatal' => 'Nakamamatay', |
| 2329 | + 'validator-listerrors-par-minseverity' => 'Ang pinakamaliit na kalubhaan ng isang paksa para ito maitala.', |
| 2330 | + 'validator-describe-description' => 'Bumbuo ng dokumentasyon para sa isa o mahigit pang mga kalawit na pambanghay na binigyan ng kahulugan sa pamamagitan ng Tagapagpatunay.', |
| 2331 | + 'validator-describe-notfound' => 'Walang kawit ng pambanghay na humahawak sa "$1".', |
| 2332 | + 'validator-describe-descriptionmsg' => "'''Paglalarawan''': $1", |
| 2333 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Taguri|Mga taguri}}''': $1", |
| 2334 | + 'validator-describe-parserfunction' => 'Ipinatupad lamang bilang tungkuling pambanghay.', |
| 2335 | + 'validator-describe-tagextension' => 'Ipinatupad lamang bilang dugtong ng tatak.', |
| 2336 | + 'validator-describe-bothhooks' => 'Ipinatupad bilang kapwa tungkulin ng pambanghay at bilang dugtong ng tatak.', |
| 2337 | + 'validator-describe-par-hooks' => 'Ang mga kalawit ng pambanghay para kung saan ipapakita ang dokumentasyon.', |
| 2338 | + 'validator-describe-listtype' => 'Tala ng $1 mga bagay', |
| 2339 | + 'validator-describe-empty' => 'walang laman', |
| 2340 | + 'validator-describe-required' => 'kailangan', |
| 2341 | + 'validator-describe-header-parameter' => 'parametro', |
| 2342 | + 'validator-describe-header-aliases' => 'Mga taguri', |
| 2343 | + 'validator-describe-header-type' => 'Uri', |
| 2344 | + 'validator-describe-header-default' => 'Likas na nakatakda', |
| 2345 | + 'validator-describe-header-description' => 'Paglalarawan', |
| 2346 | + 'validator-describe-parameters' => 'Mga parametro', |
| 2347 | + 'validator-describe-syntax' => 'Palaugnayan', |
| 2348 | + 'validator-describe-tagmin' => 'Tatakan ang mga dugtong na may kinakailangang mga parametro lamang.', |
| 2349 | + 'validator-describe-tagmax' => 'Dugtong ng tatak na mayroon ng lahat ng mga parametro.', |
| 2350 | + 'validator-describe-tagdefault' => 'Dugtong ng tatak na mayroon ng lahat ng mga parametro na ginagamit ang likas na nakatakdang talihalat ng parametro.', |
| 2351 | + 'validator-describe-pfmin' => 'Tungkuling pambanghay na mayroon lamang ng kinakailangang mga parametro.', |
| 2352 | + 'validator-describe-pfmax' => 'Tungkulin ng pambanghay na mayroon ng lahat ng mga parametro.', |
| 2353 | + 'validator-describe-pfdefault' => 'Tungkulin ng pambanghay na mayroon ng lahat ng mga parametro na ginagamit ang likas na nakatakdang katalaan ng parametro.', |
| 2354 | + 'validator_error_empty_argument' => 'Hindi dapat na isang halagang walang laman ang parametrong $1.', |
| 2355 | + 'validator_error_must_be_number' => 'Dapat na bilang lang ang parametrong $1.', |
| 2356 | + 'validator_error_must_be_integer' => 'Dapat na tambilang lang ang parametrong $1.', |
| 2357 | + 'validator-error-must-be-float' => 'Ang parametrong $1 ay maaaring isang lumulutang na bilang ng punto lamang.', |
| 2358 | + 'validator_error_invalid_range' => 'Dapat na nasa pagitan ng $2 at $3 ang parametrong $1.', |
| 2359 | + 'validator-error-invalid-regex' => 'Ang parametrong $1 ay dapat tumugma sa ganitong pangkaraniwang pagsasaad: $2.', |
| 2360 | + 'validator-error-invalid-length' => 'Ang parametrong $1 ay dapat na may isang haba na $2.', |
| 2361 | + 'validator-error-invalid-length-range' => 'Ang parametrong $1 ay dapat na may isang haba na nasa pagitan ng $2 at $3.', |
| 2362 | + 'validator_error_invalid_argument' => 'Ang halagang $1 ay hindi tanggap para sa parametrong $2.', |
| 2363 | + 'validator_list_error_empty_argument' => 'Hindi tumatanggap ng halagang walang laman ang parametrong $1.', |
| 2364 | + 'validator_list_error_must_be_number' => 'Dapat na naglalaman lang ng mga bilang ang parametrong $1.', |
| 2365 | + 'validator_list_error_must_be_integer' => 'Dapat na naglalaman lang ng mga tambilang ang parametrong $1.', |
| 2366 | + 'validator-list-error-must-be-float' => 'Ang parametrong $1 ay maaaring maglaman lamang ng mga palutang.', |
| 2367 | + 'validator_list_error_invalid_range' => 'Dapat na nasa pagitan ng $2 at $3 ang lahat ng mga halaga ng parametrong $1.', |
| 2368 | + 'validator-list-error-invalid-regex' => 'Ang lahat ng mga halaga ng parametrong $1 ay dapat na tumugma sa pangkaraniwang pagsasaad na ito: $2.', |
| 2369 | + 'validator_list_error_invalid_argument' => 'Hindi tanggap ang isa o higit pang mga halaga para sa parametrong $1.', |
| 2370 | + 'validator_error_accepts_only' => 'Ang halagang "$4" ay hindi tanggap para sa parametrong $1. Tumatanggap lamang ito ng |
| 2371 | +{{PLURAL:$3|ganitong halaga|ganitong mga halaga}}: $2.', |
| 2372 | + 'validator_list_omitted' => 'Tinanggal {{PLURAL:$2|na ang|na ang mga}} {{PLURAL:$2|halaga|halaga}} ng $1.', |
| 2373 | +); |
| 2374 | + |
| 2375 | +/** Turkish (Türkçe) |
| 2376 | + * @author Vito Genovese |
| 2377 | + */ |
| 2378 | +$messages['tr'] = array( |
| 2379 | + 'validator_error_unknown_argument' => '$1, geçerli bir parametre değildir.', |
| 2380 | + 'validator_error_empty_argument' => '$1 parametresi boş bir değere sahip olamaz.', |
| 2381 | + 'validator_error_must_be_number' => '$1 parametresi sadece sayı olabilir.', |
| 2382 | + 'validator_error_must_be_integer' => '$1 parametresi sadece bir tamsayı olabilir', |
| 2383 | + 'validator_list_error_empty_argument' => '$1 parametresi boş değerleri kabul etmemektedir.', |
| 2384 | + 'validator_list_error_must_be_number' => '$1 parametresi sadece sayı içerebilir.', |
| 2385 | +); |
| 2386 | + |
| 2387 | +/** Ukrainian (Українська) |
| 2388 | + * @author NickK |
| 2389 | + * @author Prima klasy4na |
| 2390 | + */ |
| 2391 | +$messages['uk'] = array( |
| 2392 | + 'validator-desc' => 'Валідатор забезпечує іншим розширенням можливості перевірки параметрів функцій парсера і тегів, встановлення значень за умовчанням та створення повідомлень про помилки', |
| 2393 | + 'validator_error_parameters' => 'У вашому синтаксисі {{PLURAL:$1|виявлена така помилка|виявлені такі помилки}}:', |
| 2394 | +); |
| 2395 | + |
| 2396 | +/** Vietnamese (Tiếng Việt) |
| 2397 | + * @author Minh Nguyen |
| 2398 | + * @author Vinhtantran |
| 2399 | + */ |
| 2400 | +$messages['vi'] = array( |
| 2401 | + '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.', |
| 2402 | + 'validator-warning' => 'Cảnh báo: $1', |
| 2403 | + 'validator-error' => 'Lỗi: $1', |
| 2404 | + 'validator_error_parameters' => '{{PLURAL:$1|Lỗi|Các lỗi}} cú pháp sau được nhận ra trong mã của bạn:', |
| 2405 | + 'validator_warning_parameters' => 'Có {{PLURAL:$1|lỗi|lỗi}} cú pháp trong mã của bạn.', |
| 2406 | + 'validator_error_unknown_argument' => '$1 không phải là tham số hợp lệ.', |
| 2407 | + 'validator_error_required_missing' => 'Không định rõ tham số bắt buộc “$1”.', |
| 2408 | + 'validator-listerrors-errors' => 'Lỗi', |
| 2409 | + 'validator-listerrors-low' => 'Thấp', |
| 2410 | + 'validator-listerrors-normal' => 'Thường', |
| 2411 | + 'validator-listerrors-high' => 'Cao', |
| 2412 | + 'validator_error_empty_argument' => 'Tham số “$1” không được để trống.', |
| 2413 | + 'validator_error_must_be_number' => 'Tham số “$1” phải là con số.', |
| 2414 | + 'validator_error_must_be_integer' => 'Tham số “$1” phải là số nguyên.', |
| 2415 | + 'validator_error_invalid_range' => 'Tham số “$1” phải nằm giữa $2 và $3.', |
| 2416 | + 'validator_error_invalid_argument' => 'Giá trị “$1” không hợp tham số “$2”.', |
| 2417 | + 'validator_list_error_empty_argument' => 'Không được để trống tham số “$1”.', |
| 2418 | + 'validator_list_error_must_be_number' => 'Tham số “$1” chỉ được phép bao gồm con số.', |
| 2419 | + 'validator_list_error_must_be_integer' => 'Tham số “$1” chỉ được phép bao gồm số nguyên.', |
| 2420 | + 'validator_list_error_invalid_range' => 'Tất cả các giá trị của tham số “$1” phải nằm giữa $2 và $3.', |
| 2421 | + 'validator_list_error_invalid_argument' => 'Ít nhất một giá trị của tham số “$1” không hợp lệ.', |
| 2422 | + 'validator_error_accepts_only' => 'Tham số $1 có giá trị không hợp lệ “$4”. Tham số chỉ nhận được {{PLURAL:$3|giá trị|các giá trị}} này: $2.', |
| 2423 | + 'validator_list_omitted' => '{{PLURAL:$2|Giá trị|Các giá trị}} “$1” bị bỏ qua.', |
| 2424 | +); |
| 2425 | + |
| 2426 | +/** Simplified Chinese (中文(简体)) |
| 2427 | + * @author Hydra |
| 2428 | + * @author Richarddong |
| 2429 | + * @author Wilsonmess |
| 2430 | + * @author Xiaomingyan |
| 2431 | + */ |
| 2432 | +$messages['zh-hans'] = array( |
| 2433 | + 'validator-warning' => '警告:$1', |
| 2434 | + 'validator-error' => '错误:$1', |
| 2435 | + 'validator-fatal-error' => '致命错误:$1', |
| 2436 | + 'validator_error_parameters' => '从您的语法中检测到以下错误:', |
| 2437 | + 'validator_warning_parameters' => '您的语法中存在错误。', |
| 2438 | + 'validator-warning-adittional-errors' => '⋯⋯以及更多的问题。', |
| 2439 | + 'validator-error-omitted' => '"$1"等值被忽略。', |
| 2440 | + 'validator-error-problem' => '参数 $1 存在一个问题。', |
| 2441 | + 'validator_error_unknown_argument' => '$1 不是一个有效的参数。', |
| 2442 | + 'validator_error_required_missing' => '未能提供必要的参数 $1 。', |
| 2443 | + 'validator-error-override-argument' => '试图用 "$3" 覆盖参数 $1 的值($2)', |
| 2444 | + 'validator-type-string' => '文本', |
| 2445 | + 'validator-type-number' => '号码', |
| 2446 | + 'validator-type-float' => '浮点数', |
| 2447 | + 'validator-type-boolean' => '布尔值', |
| 2448 | + 'validator-type-char' => '字符', |
| 2449 | + 'validator-listerrors-errors' => '错误', |
| 2450 | + 'validator-listerrors-minor' => '很小', |
| 2451 | + 'validator-listerrors-low' => '小', |
| 2452 | + 'validator-listerrors-normal' => '中', |
| 2453 | + 'validator-listerrors-high' => '大', |
| 2454 | + 'validator-listerrors-fatal' => '致命', |
| 2455 | + 'validator-describe-descriptionmsg' => "'''说明''':$1", |
| 2456 | + 'validator-describe-empty' => '空白', |
| 2457 | + 'validator-describe-header-type' => '类型', |
| 2458 | + 'validator-describe-header-description' => '说明', |
| 2459 | + 'validator_error_empty_argument' => '参数 $1 不能为空。', |
| 2460 | + 'validator_error_must_be_number' => '参数 $1 只能为数字。', |
| 2461 | + 'validator_error_must_be_integer' => '参数 $1 只能为整数。', |
| 2462 | + 'validator_error_invalid_range' => '参数 $1 的范围必须介于 $2 与 $3 之间。', |
| 2463 | + 'validator_error_invalid_argument' => '值 $1 对于参数 $2 不合法。', |
| 2464 | + 'validator_list_error_empty_argument' => '参数 $1 不接受空值。', |
| 2465 | + 'validator_list_error_must_be_number' => '参数 $1 只能包含数字。', |
| 2466 | + 'validator_list_error_must_be_integer' => '参数 $1 只能包含整数。', |
| 2467 | + 'validator_list_error_invalid_range' => '参数 $1 所有合法的值都必须介于 $2 与 $3 之间。', |
| 2468 | + 'validator_list_error_invalid_argument' => '参数 $1 的一个或多个值不合法。', |
| 2469 | +); |
| 2470 | + |
| 2471 | +/** Traditional Chinese (中文(繁體)) |
| 2472 | + * @author Mark85296341 |
| 2473 | + * @author Wrightbus |
| 2474 | + */ |
| 2475 | +$messages['zh-hant'] = array( |
| 2476 | + 'validator-warning' => '警告:$1', |
| 2477 | + 'validator-error' => '錯誤:$1', |
| 2478 | + 'validator-fatal-error' => '致命錯誤:$1', |
| 2479 | + 'validator-describe-header-parameter' => '參數', |
| 2480 | + 'validator_list_error_empty_argument' => '參數 $1 不接受空值。', |
| 2481 | + 'validator_list_error_must_be_number' => '參數 $1 只能包含數字。', |
| 2482 | + 'validator_list_error_must_be_integer' => '參數 $1 只能包含整數。', |
| 2483 | + 'validator-list-error-must-be-float' => '參數 $1 只能包含浮點數。', |
| 2484 | +); |
| 2485 | + |
Property changes on: tags/extensions/Validator/REL_0_4_10/Validator.i18n.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 2486 | + native |
Index: tags/extensions/Validator/REL_0_4_10/Validator.php |
— | — | @@ -0,0 +1,101 @@ |
| 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 | + * @licence GNU GPL v3 or later |
| 14 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 15 | + */ |
| 16 | + |
| 17 | +/** |
| 18 | + * This documenation group collects source code files belonging to Validator. |
| 19 | + * |
| 20 | + * Please do not use this group name for other code. |
| 21 | + * |
| 22 | + * @defgroup Validator Validator |
| 23 | + */ |
| 24 | + |
| 25 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 26 | + die( 'Not an entry point.' ); |
| 27 | +} |
| 28 | + |
| 29 | +define( 'Validator_VERSION', '0.4.10' ); |
| 30 | + |
| 31 | +// Register the internationalization file. |
| 32 | +$wgExtensionMessagesFiles['Validator'] = dirname( __FILE__ ) . '/Validator.i18n.php'; |
| 33 | + |
| 34 | +$wgExtensionCredits['other'][] = array( |
| 35 | + 'path' => __FILE__, |
| 36 | + 'name' => 'Validator', |
| 37 | + 'version' => Validator_VERSION, |
| 38 | + 'author' => array( '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]' ), |
| 39 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:Validator', |
| 40 | + 'descriptionmsg' => 'validator-desc', |
| 41 | +); |
| 42 | + |
| 43 | +// Autoload the classes. |
| 44 | +$wgAutoloadClasses['ValidatorHooks'] = dirname( __FILE__ ) . '/Validator.hooks.php'; |
| 45 | + |
| 46 | +$incDir = dirname( __FILE__ ) . '/includes/'; |
| 47 | +$wgAutoloadClasses['CriterionValidationResult'] = $incDir . 'CriterionValidationResult.php'; |
| 48 | +$wgAutoloadClasses['ItemParameterCriterion'] = $incDir . 'ItemParameterCriterion.php'; |
| 49 | +$wgAutoloadClasses['ItemParameterManipulation'] = $incDir . 'ItemParameterManipulation.php'; |
| 50 | +$wgAutoloadClasses['ListParameter'] = $incDir . 'ListParameter.php'; |
| 51 | +$wgAutoloadClasses['ListParameterCriterion'] = $incDir . 'ListParameterCriterion.php'; |
| 52 | +$wgAutoloadClasses['ListParameterManipulation'] = $incDir . 'ListParameterManipulation.php'; |
| 53 | +$wgAutoloadClasses['Parameter'] = $incDir . 'Parameter.php'; |
| 54 | +$wgAutoloadClasses['ParameterCriterion'] = $incDir . 'ParameterCriterion.php'; |
| 55 | +$wgAutoloadClasses['ParameterInput'] = $incDir . 'ParameterInput.php'; |
| 56 | +$wgAutoloadClasses['ParameterManipulation'] = $incDir . 'ParameterManipulation.php'; |
| 57 | +$wgAutoloadClasses['ParserHook'] = $incDir . 'ParserHook.php'; |
| 58 | +$wgAutoloadClasses['Validator'] = $incDir . 'Validator.php'; |
| 59 | +$wgAutoloadClasses['TopologicalSort'] = $incDir . 'TopologicalSort.php'; |
| 60 | +// No need to autoload this one, since it's directly included below. |
| 61 | +//$wgAutoloadClasses['ValidationError'] = $incDir . 'ValidationError.php'; |
| 62 | +$wgAutoloadClasses['ValidationErrorHandler'] = $incDir . 'ValidationErrorHandler.php'; |
| 63 | + |
| 64 | +$wgAutoloadClasses['CriterionHasLength'] = $incDir . 'criteria/CriterionHasLength.php'; |
| 65 | +$wgAutoloadClasses['CriterionInArray'] = $incDir . 'criteria/CriterionInArray.php'; |
| 66 | +$wgAutoloadClasses['CriterionInRange'] = $incDir . 'criteria/CriterionInRange.php'; |
| 67 | +$wgAutoloadClasses['CriterionIsFloat'] = $incDir . 'criteria/CriterionIsFloat.php'; |
| 68 | +$wgAutoloadClasses['CriterionIsInteger'] = $incDir . 'criteria/CriterionIsInteger.php'; |
| 69 | +$wgAutoloadClasses['CriterionIsNumeric'] = $incDir . 'criteria/CriterionIsNumeric.php'; |
| 70 | +$wgAutoloadClasses['CriterionItemCount'] = $incDir . 'criteria/CriterionItemCount.php'; |
| 71 | +$wgAutoloadClasses['CriterionMatchesRegex'] = $incDir . 'criteria/CriterionMatchesRegex.php'; |
| 72 | +$wgAutoloadClasses['CriterionNotEmpty'] = $incDir . 'criteria/CriterionNotEmpty.php'; |
| 73 | +$wgAutoloadClasses['CriterionTrue'] = $incDir . 'criteria/CriterionTrue.php'; |
| 74 | +$wgAutoloadClasses['CriterionUniqueItems'] = $incDir . 'criteria/CriterionUniqueItems.php'; |
| 75 | + |
| 76 | +$wgAutoloadClasses['ParamManipulationBoolean'] = $incDir . 'manipulations/ParamManipulationBoolean.php'; |
| 77 | +$wgAutoloadClasses['ParamManipulationFloat'] = $incDir . 'manipulations/ParamManipulationFloat.php'; |
| 78 | +$wgAutoloadClasses['ParamManipulationFunctions']= $incDir . 'manipulations/ParamManipulationFunctions.php'; |
| 79 | +$wgAutoloadClasses['ParamManipulationImplode'] = $incDir . 'manipulations/ParamManipulationImplode.php'; |
| 80 | +$wgAutoloadClasses['ParamManipulationInteger'] = $incDir . 'manipulations/ParamManipulationInteger.php'; |
| 81 | +$wgAutoloadClasses['ParamManipulationString'] = $incDir . 'manipulations/ParamManipulationString.php'; |
| 82 | + |
| 83 | +$wgAutoloadClasses['ValidatorDescribe'] = $incDir . 'parserHooks/Validator_Describe.php'; |
| 84 | +$wgAutoloadClasses['ValidatorListErrors'] = $incDir . 'parserHooks/Validator_ListErrors.php'; |
| 85 | +unset( $incDir ); |
| 86 | + |
| 87 | +# Registration of the listerrors parser hooks. |
| 88 | +$wgHooks['ParserFirstCallInit'][] = 'ValidatorListErrors::staticInit'; |
| 89 | +$wgHooks['LanguageGetMagic'][] = 'ValidatorListErrors::staticMagic'; |
| 90 | + |
| 91 | +# Registration of the describe parser hooks. |
| 92 | +$wgHooks['ParserFirstCallInit'][] = 'ValidatorDescribe::staticInit'; |
| 93 | +$wgHooks['LanguageGetMagic'][] = 'ValidatorDescribe::staticMagic'; |
| 94 | + |
| 95 | +// Since 0.4.8 |
| 96 | +$wgHooks['UnitTestsList'][] = 'ValidatorHooks::registerUnitTests'; |
| 97 | + |
| 98 | +// This file needs to be included directly, since Validator_Settings.php |
| 99 | +// uses it, in some rare cases before autoloading is defined. |
| 100 | +require_once 'includes/ValidationError.php' ; |
| 101 | +// Include the settings file. |
| 102 | +require_once 'Validator_Settings.php'; |
Property changes on: tags/extensions/Validator/REL_0_4_10/Validator.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 103 | + native |
Index: tags/extensions/Validator/REL_0_4_10/Validator_Settings.php |
— | — | @@ -0,0 +1,33 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * File defining the settings for the Validator extension |
| 6 | + * |
| 7 | + * NOTICE: |
| 8 | + * Changing one of these settings can be done by copying 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 | + * @licence GNU GPL v3 or later |
| 15 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 16 | + */ |
| 17 | + |
| 18 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 19 | + die( 'Not an entry point.' ); |
| 20 | +} |
| 21 | + |
| 22 | +# Maps actions to error severity. |
| 23 | +# ACTION_LOG will cause the error to be logged |
| 24 | +# ACTION_WARN will cause a notice that there is an error to be shown inline |
| 25 | +# ACTION_SHOW will cause an error message to be shown inline |
| 26 | +# ACTION_DEMAND will cause an error message to be shown inline and prevent rendering of the regular output |
| 27 | +$egErrorActions = array( |
| 28 | + ValidationError::SEVERITY_MINOR => ValidationError::ACTION_LOG, |
| 29 | + ValidationError::SEVERITY_LOW => ValidationError::ACTION_WARN, |
| 30 | + ValidationError::SEVERITY_NORMAL => ValidationError::ACTION_SHOW, |
| 31 | + ValidationError::SEVERITY_HIGH => ValidationError::ACTION_DEMAND, |
| 32 | +); |
| 33 | + |
| 34 | +$egValidatorErrListMin = 'minor'; |
Property changes on: tags/extensions/Validator/REL_0_4_10/Validator_Settings.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 35 | + native |
Index: tags/extensions/Validator/REL_0_4_10/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 |
Property changes on: tags/extensions/Validator/REL_0_4_10/README |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 14 | + native |
Index: tags/extensions/Validator/REL_0_4_10/Validator.hooks.php |
— | — | @@ -0,0 +1,31 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Static class for hooks handled by the Validator extension. |
| 6 | + * |
| 7 | + * @since 0.4.8 |
| 8 | + * |
| 9 | + * @file Validator.hooks.php |
| 10 | + * @ingroup Validator |
| 11 | + * |
| 12 | + * @licence GNU GPL v3 |
| 13 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
| 14 | + */ |
| 15 | +final class ValidatorHooks { |
| 16 | + |
| 17 | + /** |
| 18 | + * Hook to add PHPUnit test cases. |
| 19 | + * |
| 20 | + * @since 0.4.8 |
| 21 | + * |
| 22 | + * @param array $files |
| 23 | + */ |
| 24 | + public static function registerUnitTests( array &$files ) { |
| 25 | + $testDir = dirname( __FILE__ ) . '/test/'; |
| 26 | + |
| 27 | + $files[] = $testDir . 'ValidatorCriteriaTests.php'; |
| 28 | + |
| 29 | + return true; |
| 30 | + } |
| 31 | + |
| 32 | +} |
Property changes on: tags/extensions/Validator/REL_0_4_10/Validator.hooks.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 33 | + native |