Index: tags/extensions/Validator/REL_0_4_8/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_8/test/ValidatorCriteriaTests.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 247 | + native |
Index: tags/extensions/Validator/REL_0_4_8/INSTALL |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +[[Validator 0.4.8]] |
| 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_8/INSTALL |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Index: tags/extensions/Validator/REL_0_4_8/RELEASE-NOTES |
— | — | @@ -0,0 +1,184 @@ |
| 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.8 === |
| 9 | +(2011-07-19) |
| 10 | + |
| 11 | +* Added unit tests for the criteria. |
| 12 | + |
| 13 | +* Fixed issue with handling floats in CriterionInRange. |
| 14 | + |
| 15 | +* Added support for open limits in CriterionHasLength and CriterionItemCount. |
| 16 | + |
| 17 | +=== Validator 0.4.7 === |
| 18 | +(2011-05-15) |
| 19 | + |
| 20 | +* Added ParameterInput class to generate HTML inputs for parameters, based on code from SMWs Special:Ask. |
| 21 | + |
| 22 | +* Added "$manipulate = true" as second parameter for Parameter::setDefault, |
| 23 | + which gets passed to Parameter::setDoManipulationOfDefault. |
| 24 | + |
| 25 | +* Boolean manipulation now ignores values that are already a boolean. |
| 26 | + |
| 27 | +=== Validator 0.4.6 === |
| 28 | +(2011-03-21) |
| 29 | + |
| 30 | +* Removed ParamManipulationBoolstr. |
| 31 | + |
| 32 | +* Added method to get the allowed values to CriterionInArray. |
| 33 | + |
| 34 | +* Added automatic non-using of boolean manipulation when a boolean param was defaulted to a boolean value. |
| 35 | + |
| 36 | +* Parameter fix in ListParameter::setDefault, follow up to change in 0.4.5. |
| 37 | + |
| 38 | +=== Validator 0.4.5 === |
| 39 | +(2011-03-05) |
| 40 | + |
| 41 | +* Escaping fix in the describe parser hook. |
| 42 | + |
| 43 | +* Added string manipulation, applied by default on strings and chars. |
| 44 | + |
| 45 | +=== Validator 0.4.4 === |
| 46 | +(2011-02-16) |
| 47 | + |
| 48 | +* Tweaks to parser usage in the ParserHook class. |
| 49 | + |
| 50 | +* Fixed incorrect output of nested pre-tags in the describe parser hook. |
| 51 | + |
| 52 | +=== Validator 0.4.3.1 === |
| 53 | +(2011-01-20) |
| 54 | + |
| 55 | +* Removed underscore and space switching behaviour for tag extensions and parser functions. |
| 56 | + |
| 57 | +=== Validator 0.4.3 === |
| 58 | +(2011-01-11) |
| 59 | + |
| 60 | +* Added describe parser hook that enables automatic documentation generation of parser hooks defined via Validator. |
| 61 | + |
| 62 | +* Modified the ParserHook and Parameter classes to allow specifying a description message. |
| 63 | + |
| 64 | +=== Validator 0.4.2 === |
| 65 | +(2010-10-28) |
| 66 | + |
| 67 | +* Fixed compatibility with MediaWiki 1.15.x. |
| 68 | + |
| 69 | +* Removed the lowerCaseValue field in the Parameter class and replaced it's functionality with a ParameterManipulation. |
| 70 | + |
| 71 | +=== Validator 0.4.1 === |
| 72 | +(2010-10-20) |
| 73 | + |
| 74 | +* Made several small fixes and improvements. |
| 75 | + |
| 76 | +=== Validator 0.4 === |
| 77 | +(2010-10-15) |
| 78 | + |
| 79 | +==== New features ==== |
| 80 | + |
| 81 | +* Added ParserHook class that allows for out-of-the-box parser function and tag extension creation |
| 82 | +: with full Validator support. |
| 83 | + |
| 84 | +* Added listerrors parser hook that allows you to list all validation errors that occurred at the point it's rendered. |
| 85 | + |
| 86 | +* Added support for conditional parameter adding. |
| 87 | + |
| 88 | +==== Refactoring ==== |
| 89 | + |
| 90 | +Basically everything got rewritten... |
| 91 | + |
| 92 | +* Added Parameter and ListParameter classes to replace parameter definitions in array form. |
| 93 | + |
| 94 | +* Added ParameterCriterion and ListParameterCriterion classes for better handling of parameter criteria. |
| 95 | + |
| 96 | +* Added ParameterManipulation and ListParameterManipulation classes for more structured formatting of parameters. |
| 97 | + |
| 98 | +* Added ValidationError class to better describe errors. |
| 99 | + |
| 100 | +* Replaced the error level enum by ValidationError::SEVERITY_ and ValidationError::ACTION_, which are linked in $egErrorActions. |
| 101 | + |
| 102 | +=== Validator 0.3.6 === |
| 103 | +(2010-08-26) |
| 104 | + |
| 105 | +* Added support for 'tolower' argument in parameter info definitions. |
| 106 | + |
| 107 | +=== Validator 0.3.5 === |
| 108 | +(2010-07-26) |
| 109 | + |
| 110 | +* Fixed issue with the original parameter name (and in some cases also value) in error messages. |
| 111 | + |
| 112 | +=== Validator 0.3.4 === |
| 113 | +(2010-07-07) |
| 114 | + |
| 115 | +* Fixed issue with parameter reference that occurred in php 5.3 and later. |
| 116 | + |
| 117 | +* Fixed escaping issue that caused parameter names in error messages to be shown incorrectly. |
| 118 | + |
| 119 | +* Fixed small issue with parameter value trimming that caused problems when objects where passed. |
| 120 | + |
| 121 | +=== Validator 0.3.3 === |
| 122 | +(2010-06-20) |
| 123 | + |
| 124 | +* Fixed bug that caused notices when using the ValidatorManager::manageParsedParameters method in some cases. |
| 125 | + |
| 126 | +=== Validator 0.3.2 === |
| 127 | +(2010-06-07) |
| 128 | + |
| 129 | +* Added lower casing to parameter names, and optionally, but default on, lower-casing for parameter values. |
| 130 | + |
| 131 | +* Added removal of default parameters from the default parameter queue when used as a named parameter. |
| 132 | + |
| 133 | +=== Validator 0.3.1 === |
| 134 | +(2010-06-04) |
| 135 | + |
| 136 | +* Added ValidatorManager::manageParsedParameters and Validator::setParameters. |
| 137 | + |
| 138 | +=== Validator 0.3 === |
| 139 | +(2010-05-31) |
| 140 | + |
| 141 | +* Added generic default parameter support. |
| 142 | + |
| 143 | +* Added parameter dependency support. |
| 144 | + |
| 145 | +* Added full meta data support for validation and formatting functions, enabling more advanced handling of parameters. |
| 146 | + |
| 147 | +* Major refactoring to conform to MediaWiki convention. |
| 148 | + |
| 149 | +=== Validator 0.2.2 === |
| 150 | +(2010-03-01) |
| 151 | + |
| 152 | +* Fixed potential xss vectors. |
| 153 | + |
| 154 | +* Minor code improvements. |
| 155 | + |
| 156 | +=== Validator 0.2.1 === |
| 157 | +(2010-02-01) |
| 158 | + |
| 159 | +* Changed the inclusion of the upper bound for range validation functions. |
| 160 | + |
| 161 | +* Small language fixes. |
| 162 | + |
| 163 | +=== Validator 0.2 === |
| 164 | +(2009-12-25) |
| 165 | + |
| 166 | +* Added handling for lists of a type, instead of having list as a type. This includes per-item-validation and per-item-defaulting. |
| 167 | + |
| 168 | +* Added list validation functions: item_count and unique_items |
| 169 | + |
| 170 | +* Added boolean, number and char types. |
| 171 | + |
| 172 | +* 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. |
| 173 | + |
| 174 | +* Added Validator_ERRORS_MINIMAL value for $egValidatorErrorLevel. |
| 175 | + |
| 176 | +* Added warning message to ValidatorManager that will be shown for errors when egValidatorErrorLevel is Validator_ERRORS_WARN. |
| 177 | + |
| 178 | +* Added criteria support for is_boolean, has_length and regex. |
| 179 | + |
| 180 | +=== Validator 0.1 === |
| 181 | +(2009-12-17) |
| 182 | + |
| 183 | +* Initial release, featuring parameter validation, defaulting and error generation. |
| 184 | + |
| 185 | +{{Validator see also}} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_8/RELEASE-NOTES |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 186 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/ListParameterCriterion.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 39 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/manipulations/ParamManipulationFunctions.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 56 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/manipulations/ParamManipulationImplode.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 57 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/manipulations/ParamManipulationInteger.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 36 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/manipulations/ParamManipulationBoolean.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 39 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/manipulations/ParamManipulationFloat.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 36 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/manipulations/ParamManipulationString.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 36 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/ListParameterManipulation.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 37 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/ParameterCriterion.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 49 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/ParameterInput.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 255 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/ParameterManipulation.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 47 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/ValidationErrorHandler.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 61 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/ValidationError.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 236 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/CriterionValidationResult.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 107 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/parserHooks/Validator_ListErrors.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 222 | + native |
Index: tags/extensions/Validator/REL_0_4_8/includes/parserHooks/Validator_Describe.php |
— | — | @@ -0,0 +1,459 @@ |
| 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 | + * No LSB in pre-5.3 PHP *sigh*. |
| 20 | + * This is to be refactored as soon as php >=5.3 becomes acceptable. |
| 21 | + */ |
| 22 | + public static function staticMagic( array &$magicWords, $langCode ) { |
| 23 | + $className = __CLASS__; |
| 24 | + $instance = new $className(); |
| 25 | + return $instance->magic( $magicWords, $langCode ); |
| 26 | + } |
| 27 | + |
| 28 | + /** |
| 29 | + * No LSB in pre-5.3 PHP *sigh*. |
| 30 | + * This is to be refactored as soon as php >=5.3 becomes acceptable. |
| 31 | + */ |
| 32 | + public static function staticInit( Parser &$wgParser ) { |
| 33 | + $className = __CLASS__; |
| 34 | + $instance = new $className(); |
| 35 | + return $instance->init( $wgParser ); |
| 36 | + } |
| 37 | + |
| 38 | + /** |
| 39 | + * Gets the name of the parser hook. |
| 40 | + * @see ParserHook::getName |
| 41 | + * |
| 42 | + * @since 0.4.3 |
| 43 | + * |
| 44 | + * @return string |
| 45 | + */ |
| 46 | + protected function getName() { |
| 47 | + return 'describe'; |
| 48 | + } |
| 49 | + |
| 50 | + /** |
| 51 | + * Returns an array containing the parameter info. |
| 52 | + * @see ParserHook::getParameterInfo |
| 53 | + * |
| 54 | + * @since 0.4.3 |
| 55 | + * |
| 56 | + * @return array of Parameter |
| 57 | + */ |
| 58 | + protected function getParameterInfo( $type ) { |
| 59 | + $params = array(); |
| 60 | + |
| 61 | + $params['hooks'] = new ListParameter( 'hooks' ); |
| 62 | + $params['hooks']->setDefault( array_keys( ParserHook::getRegisteredParserHooks() ) ); |
| 63 | + $params['hooks']->setDescription( wfMsg( 'validator-describe-par-hooks' ) ); |
| 64 | + $params['hooks']->addAliases( 'hook' ); |
| 65 | + |
| 66 | + $params['pre'] = new Parameter( 'pre', Parameter::TYPE_BOOLEAN ); |
| 67 | + $params['pre']->setDefault( 'off' ); |
| 68 | + $params['pre']->setDescription( wfMsg( 'validator-describe-par-pre' ) ); |
| 69 | + |
| 70 | + return $params; |
| 71 | + } |
| 72 | + |
| 73 | + /** |
| 74 | + * Returns the list of default parameters. |
| 75 | + * @see ParserHook::getDefaultParameters |
| 76 | + * |
| 77 | + * @since 0.4.3 |
| 78 | + * |
| 79 | + * @return array |
| 80 | + */ |
| 81 | + protected function getDefaultParameters( $type ) { |
| 82 | + return array( 'hooks' ); |
| 83 | + } |
| 84 | + |
| 85 | + /** |
| 86 | + * Renders and returns the output. |
| 87 | + * @see ParserHook::render |
| 88 | + * |
| 89 | + * @since 0.4.3 |
| 90 | + * |
| 91 | + * @param array $parameters |
| 92 | + * |
| 93 | + * @return string |
| 94 | + */ |
| 95 | + public function render( array $parameters ) { |
| 96 | + $parts = array(); |
| 97 | + |
| 98 | + // Loop over the hooks for which the docs should be added. |
| 99 | + foreach ( $parameters['hooks'] as $hookName ) { |
| 100 | + $parserHook = $this->getParserHookInstance( $hookName ); |
| 101 | + |
| 102 | + if ( $parserHook === false ) { |
| 103 | + $parts[] = wfMsgExt( 'validator-describe-notfound', 'parsemag', $hookName ); |
| 104 | + } |
| 105 | + else { |
| 106 | + $parts[] = $this->getParserHookDescription( $hookName, $parameters, $parserHook ); |
| 107 | + } |
| 108 | + } |
| 109 | + |
| 110 | + return $this->parseWikitext( implode( "\n\n", $parts ) ); |
| 111 | + } |
| 112 | + |
| 113 | + /** |
| 114 | + * Returns the wikitext description for a single parser hook. |
| 115 | + * |
| 116 | + * @since 0.4.3 |
| 117 | + * |
| 118 | + * @param string $hookName |
| 119 | + * @param array $parameters |
| 120 | + * @param ParserHook $parserHook |
| 121 | + * |
| 122 | + * @return string |
| 123 | + */ |
| 124 | + protected function getParserHookDescription( $hookName, array $parameters, ParserHook $parserHook ) { |
| 125 | + global $wgLang; |
| 126 | + |
| 127 | + $descriptionData = $parserHook->getDescriptionData( ParserHook::TYPE_TAG ); // TODO |
| 128 | + $this->sortParameters( $descriptionData['parameters'], $descriptionData['defaults'] ); |
| 129 | + |
| 130 | + $description = |
| 131 | + ( $parameters['pre'] ? '== ' : '<h2>' ) . |
| 132 | + $hookName . |
| 133 | + ( $parameters['pre'] ? ' ==' : '</h2>' ); |
| 134 | + |
| 135 | + if ( $parameters['pre'] ) { |
| 136 | + $description .= "\n<!-- " . wfMsg( 'validator-describe-autogen' ) . ' -->'; |
| 137 | + } |
| 138 | + |
| 139 | + $description .= "\n\n"; |
| 140 | + |
| 141 | + if ( $descriptionData['description'] !== false ) { |
| 142 | + $description .= wfMsgExt( 'validator-describe-descriptionmsg', 'parsemag', $descriptionData['description'] ); |
| 143 | + $description .= "\n\n"; |
| 144 | + } |
| 145 | + |
| 146 | + if ( count( $descriptionData['names'] ) > 1 ) { |
| 147 | + $aliases = array(); |
| 148 | + |
| 149 | + foreach ( $descriptionData['names'] as $name ) { |
| 150 | + if ( $name != $hookName ) { |
| 151 | + $aliases[] = $name; |
| 152 | + } |
| 153 | + } |
| 154 | + |
| 155 | + $description .= wfMsgExt( 'validator-describe-aliases', 'parsemag', $wgLang->listToText( $aliases ), count( $aliases ) ); |
| 156 | + $description .= "\n\n"; |
| 157 | + } |
| 158 | + |
| 159 | + if ( $parserHook->forTagExtensions || $parserHook->forParserFunctions ) { |
| 160 | + if ( $parserHook->forTagExtensions && $parserHook->forParserFunctions ) { |
| 161 | + $description .= wfMsg( 'validator-describe-bothhooks' ); |
| 162 | + } |
| 163 | + elseif ( $parserHook->forTagExtensions ) { |
| 164 | + $description .= wfMsg( 'validator-describe-tagextension' ); |
| 165 | + } |
| 166 | + else { // if $parserHook->forParserFunctions |
| 167 | + $description .= wfMsg( 'validator-describe-parserfunction' ); |
| 168 | + } |
| 169 | + |
| 170 | + $description .= "\n\n"; |
| 171 | + } |
| 172 | + |
| 173 | + $description .= $this->getParameterTable( $descriptionData['parameters'], $descriptionData['defaults'], $parameters['pre'] ); |
| 174 | + |
| 175 | + if ( $parserHook->forTagExtensions || $parserHook->forParserFunctions ) { |
| 176 | + $description .= $this->getSyntaxExamples( $hookName, $descriptionData['parameters'], $parserHook, $descriptionData['defaults'], $parameters['pre'] ); |
| 177 | + } |
| 178 | + |
| 179 | + if ( $parameters['pre'] ) { |
| 180 | + $description = '<pre>' . $description . '</pre>'; |
| 181 | + } |
| 182 | + |
| 183 | + return $description; |
| 184 | + } |
| 185 | + |
| 186 | + /** |
| 187 | + * Sorts the provided parameters array to match the default parameter order. |
| 188 | + * |
| 189 | + * @since 0.4.3 |
| 190 | + * |
| 191 | + * @param array of Parameter $parameters |
| 192 | + * @param array of string $defaults |
| 193 | + */ |
| 194 | + protected function sortParameters( array &$parameters, array $defaults ) { |
| 195 | + $sort = array(); |
| 196 | + $count = 9000; |
| 197 | + |
| 198 | + foreach ( $parameters as $parameter ) { |
| 199 | + $position = array_search( $parameter->getName(), $defaults ); |
| 200 | + |
| 201 | + if ( $position === false ) { |
| 202 | + $count++; |
| 203 | + $sort[$count] = $parameter; |
| 204 | + } |
| 205 | + else { |
| 206 | + $sort[$position] = $parameter; |
| 207 | + } |
| 208 | + } |
| 209 | + |
| 210 | + ksort( $sort ); |
| 211 | + $parameters = array_values( $sort ); |
| 212 | + } |
| 213 | + |
| 214 | + /** |
| 215 | + * Returns the wikitext for some syntax examples. |
| 216 | + * |
| 217 | + * @since 0.4.3 |
| 218 | + * |
| 219 | + * @param string $hookName |
| 220 | + * @param array $parameters |
| 221 | + * @param ParserHook $parserHook |
| 222 | + * @param array $defaults |
| 223 | + * @param boolean $pre |
| 224 | + * |
| 225 | + * @return string |
| 226 | + */ |
| 227 | + protected function getSyntaxExamples( $hookName, array $parameters, ParserHook $parserHook, array $defaults, $pre ) { |
| 228 | + $result = "\n\n" . |
| 229 | + ( $pre ? '=== ' : '<h3>' ) . |
| 230 | + wfMsg( 'validator-describe-syntax' ) . |
| 231 | + ( $pre ? ' ===' : '</h3>' ); |
| 232 | + |
| 233 | + $params = array(); |
| 234 | + $requiredParams = array(); |
| 235 | + $plainParams = array(); |
| 236 | + |
| 237 | + foreach ( $parameters as $parameter ) { |
| 238 | + $params[$parameter->getName()] = '{' . $parameter->getTypeMessage() . '}'; |
| 239 | + $plainParams[$parameter->getName()] = $parameter->getTypeMessage(); |
| 240 | + |
| 241 | + if ( $parameter->isRequired() ) { |
| 242 | + $requiredParams[$parameter->getName()] = '{' . $parameter->getTypeMessage() . '}'; |
| 243 | + } |
| 244 | + } |
| 245 | + |
| 246 | + $preOpen = $pre ? '<pre>' : '<pre>'; |
| 247 | + $preClose = $pre ? '</pre>' : '</pre>'; |
| 248 | + |
| 249 | + if ( $parserHook->forTagExtensions ) { |
| 250 | + $result .= "\n\n'''" . wfMsg( 'validator-describe-tagmin' ) . "'''\n\n"; |
| 251 | + |
| 252 | + $result .= "$preOpen<nowiki>\n" . Xml::element( |
| 253 | + $hookName, |
| 254 | + $requiredParams |
| 255 | + ) . "\n</nowiki>$preClose"; |
| 256 | + |
| 257 | + $result .= "\n\n'''" . wfMsg( 'validator-describe-tagmax' ) . "'''\n\n"; |
| 258 | + |
| 259 | + // TODO: multiline when long |
| 260 | + $result .= "$preOpen<nowiki>\n" . Xml::element( |
| 261 | + $hookName, |
| 262 | + $params |
| 263 | + ) . "\n</nowiki>$preClose"; |
| 264 | + |
| 265 | + if ( count( $defaults ) > 0 ) { |
| 266 | + $result .= "\n\n'''" . wfMsg( 'validator-describe-tagdefault' ) . "'''\n\n"; |
| 267 | + $contents = ''; |
| 268 | + foreach ( $plainParams as $name => $type ) { |
| 269 | + $contents = '{' . $name . ', ' . $type . '}'; |
| 270 | + break; |
| 271 | + } |
| 272 | + |
| 273 | + $result .= "$preOpen<nowiki>\n" . Xml::element( |
| 274 | + $hookName, |
| 275 | + array_slice( $params, 1 ), |
| 276 | + $contents |
| 277 | + ) . "\n</nowiki>$preClose"; |
| 278 | + } |
| 279 | + } |
| 280 | + |
| 281 | + if ( $parserHook->forParserFunctions ) { |
| 282 | + $result .= "\n\n'''" . wfMsg( 'validator-describe-pfmin' ) . "'''\n\n"; |
| 283 | + |
| 284 | + $result .= "$preOpen<nowiki>\n" . |
| 285 | + $this->buildParserFunctionSyntax( $hookName, $requiredParams ) |
| 286 | + . "\n</nowiki>$preClose"; |
| 287 | + |
| 288 | + $result .= "\n\n'''" . wfMsg( 'validator-describe-pfmax' ) . "'''\n\n"; |
| 289 | + |
| 290 | + $result .= "$preOpen<nowiki>\n" . |
| 291 | + $this->buildParserFunctionSyntax( $hookName, $params ) |
| 292 | + . "\n</nowiki>$preClose"; |
| 293 | + |
| 294 | + if ( count( $defaults ) > 0 ) { |
| 295 | + $result .= "\n\n'''" . wfMsg( 'validator-describe-pfdefault' ) . "'''\n\n"; |
| 296 | + |
| 297 | + $result .= "$preOpen<nowiki>\n" . |
| 298 | + $this->buildParserFunctionSyntax( $hookName, $plainParams, $defaults ) |
| 299 | + . "\n</nowiki>$preClose"; |
| 300 | + } |
| 301 | + } |
| 302 | + |
| 303 | + return $result; |
| 304 | + } |
| 305 | + |
| 306 | + /** |
| 307 | + * Builds the wikitext syntax for a parser function. |
| 308 | + * |
| 309 | + * @since 0.4.3 |
| 310 | + * |
| 311 | + * @param string $functionName |
| 312 | + * @param array $parameters Parameters (keys) and their type (values) |
| 313 | + * @param array $defaults |
| 314 | + * |
| 315 | + * @return string |
| 316 | + */ |
| 317 | + protected function buildParserFunctionSyntax( $functionName, array $parameters, array $defaults = array() ) { |
| 318 | + $arguments = array(); |
| 319 | + |
| 320 | + foreach ( $parameters as $name => $type ) { |
| 321 | + if ( in_array( $name, $defaults ) ) { |
| 322 | + $arguments[] = '{' . $name . ', ' . $type . '}'; |
| 323 | + } |
| 324 | + else { |
| 325 | + $arguments[] = "$name=$type"; |
| 326 | + } |
| 327 | + } |
| 328 | + |
| 329 | + $singleLine = count( $arguments ) <= 3; |
| 330 | + $delimiter = $singleLine ? '|' : "\n| "; |
| 331 | + $wrapper = $singleLine ? '' : "\n"; |
| 332 | + |
| 333 | + return "{{#$functionName:$wrapper" . implode( $delimiter, $arguments ) . $wrapper . '}}'; |
| 334 | + } |
| 335 | + |
| 336 | + /** |
| 337 | + * Returns the wikitext for a table listing the provided parameters. |
| 338 | + * |
| 339 | + * @since 0.4.3 |
| 340 | + * |
| 341 | + * @param array $parameters |
| 342 | + * @param array $defaults |
| 343 | + * @param boolean $pre |
| 344 | + * |
| 345 | + * @return string |
| 346 | + */ |
| 347 | + protected function getParameterTable( array $parameters, array $defaults, $pre ) { |
| 348 | + $tableRows = array(); |
| 349 | + |
| 350 | + foreach ( $parameters as $parameter ) { |
| 351 | + $tableRows[] = $this->getDescriptionRow( $parameter, $defaults ); |
| 352 | + } |
| 353 | + |
| 354 | + $table = ''; |
| 355 | + |
| 356 | + if ( count( $tableRows ) > 0 ) { |
| 357 | + $tableRows = array_merge( array( |
| 358 | + "! #\n" . |
| 359 | + '!' . wfMsg( 'validator-describe-header-parameter' ) ."\n" . |
| 360 | + '!' . wfMsg( 'validator-describe-header-aliases' ) ."\n" . |
| 361 | + '!' . wfMsg( 'validator-describe-header-type' ) ."\n" . |
| 362 | + '!' . wfMsg( 'validator-describe-header-default' ) ."\n" . |
| 363 | + '!' . wfMsg( 'validator-describe-header-description' ) |
| 364 | + ), $tableRows ); |
| 365 | + |
| 366 | + $table = implode( "\n|-\n", $tableRows ); |
| 367 | + |
| 368 | + $h3 = |
| 369 | + ( $pre ? '=== ' : '<h3>' ) . |
| 370 | + wfMsg( 'validator-describe-parameters' ) . |
| 371 | + ( $pre ? ' ===' : '</h3>' ); |
| 372 | + |
| 373 | + $table = "$h3\n\n" . |
| 374 | + '{| class="wikitable sortable"' . "\n" . |
| 375 | + $table . |
| 376 | + "\n|}"; |
| 377 | + } |
| 378 | + |
| 379 | + return $table; |
| 380 | + } |
| 381 | + |
| 382 | + /** |
| 383 | + * Returns the wikitext for a table row describing a single parameter. |
| 384 | + * |
| 385 | + * @since 0.4.3 |
| 386 | + * |
| 387 | + * @param Parameter $parameter |
| 388 | + * @param array $defaults |
| 389 | + * |
| 390 | + * @return string |
| 391 | + */ |
| 392 | + protected function getDescriptionRow( Parameter $parameter, array $defaults ) { |
| 393 | + $aliases = $parameter->getAliases(); |
| 394 | + $aliases = count( $aliases ) > 0 ? implode( ', ', $aliases ) : '-'; |
| 395 | + |
| 396 | + $description = $parameter->getDescription(); |
| 397 | + if ( $description === false ) $description = '-'; |
| 398 | + |
| 399 | + $type = $parameter->getTypeMessage(); |
| 400 | + |
| 401 | + $number = 0; |
| 402 | + $isDefault = false; |
| 403 | + |
| 404 | + foreach ( $defaults as $default ) { |
| 405 | + $number++; |
| 406 | + |
| 407 | + if ( $default == $parameter->getName() ) { |
| 408 | + $isDefault = true; |
| 409 | + break; |
| 410 | + } |
| 411 | + } |
| 412 | + |
| 413 | + $default = $parameter->isRequired() ? "''" . wfMsg( 'validator-describe-required' ) . "''" : $parameter->getDefault(); |
| 414 | + |
| 415 | + if ( is_array( $default ) ) { |
| 416 | + $default = implode( ', ', $default ); |
| 417 | + } |
| 418 | + else if ( is_bool( $default ) ) { |
| 419 | + $default = $default ? 'yes' : 'no'; |
| 420 | + } |
| 421 | + |
| 422 | + if ( $default === '' ) $default = "''" . wfMsg( 'validator-describe-empty' ) . "''"; |
| 423 | + |
| 424 | + if ( !$isDefault ) { |
| 425 | + $number = '-'; |
| 426 | + } |
| 427 | + |
| 428 | + return <<<EOT |
| 429 | +| {$number} |
| 430 | +| {$parameter->getName()} |
| 431 | +| {$aliases} |
| 432 | +| {$type} |
| 433 | +| {$default} |
| 434 | +| {$description} |
| 435 | +EOT; |
| 436 | + } |
| 437 | + |
| 438 | + /** |
| 439 | + * Returns an instance of the class handling the specified parser hook, |
| 440 | + * or false if there is none. |
| 441 | + * |
| 442 | + * @since 0.4.3 |
| 443 | + * |
| 444 | + * @param string $parserHookName |
| 445 | + * |
| 446 | + * @return mixed ParserHook or false |
| 447 | + */ |
| 448 | + protected function getParserHookInstance( $parserHookName ) { |
| 449 | + $className = ParserHook::getHookClassName( $parserHookName ); |
| 450 | + return $className !== false && class_exists( $className ) ? new $className() : false; |
| 451 | + } |
| 452 | + |
| 453 | + /** |
| 454 | + * @see ParserHook::getDescription() |
| 455 | + */ |
| 456 | + public function getDescription() { |
| 457 | + return wfMsg( 'validator-describe-description' ); |
| 458 | + } |
| 459 | + |
| 460 | +} |
Property changes on: tags/extensions/Validator/REL_0_4_8/includes/parserHooks/Validator_Describe.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 461 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/ListParameter.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 238 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/criteria/CriterionHasLength.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 65 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/criteria/CriterionIsNumeric.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 48 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/criteria/CriterionMatchesRegex.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 61 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/criteria/CriterionNotEmpty.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 48 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/criteria/CriterionTrue.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 48 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/criteria/CriterionIsFloat.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 48 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/criteria/CriterionInRange.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 104 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/criteria/CriterionInArray.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 166 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/criteria/CriterionItemCount.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 45 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/criteria/CriterionUniqueItems.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 48 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/criteria/CriterionIsInteger.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 58 | + native |
Index: tags/extensions/Validator/REL_0_4_8/includes/ParserHook.php |
— | — | @@ -0,0 +1,510 @@ |
| 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 | + 'parameters' => $this->getParameterInfo( $type ), |
| 418 | + 'defaults' => $this->getDefaultParameters( $type ), |
| 419 | + ); |
| 420 | + } |
| 421 | + |
| 422 | + /** |
| 423 | + * Returns a description message for the parser hook, or false when there is none. |
| 424 | + * Override in deriving classes to add a message. |
| 425 | + * |
| 426 | + * @since 0.4.3 |
| 427 | + * |
| 428 | + * @return mixed string or false |
| 429 | + */ |
| 430 | + public function getDescription() { |
| 431 | + return false; |
| 432 | + } |
| 433 | + |
| 434 | + /** |
| 435 | + * Returns if the current render request is coming from a tag extension. |
| 436 | + * |
| 437 | + * @since 0.4.4 |
| 438 | + * |
| 439 | + * @return boolean |
| 440 | + */ |
| 441 | + protected function isTag() { |
| 442 | + return $this->currentType == self::TYPE_TAG; |
| 443 | + } |
| 444 | + |
| 445 | + /** |
| 446 | + * Returns if the current render request is coming from a parser function. |
| 447 | + * |
| 448 | + * @since 0.4.4 |
| 449 | + * |
| 450 | + * @return boolean |
| 451 | + */ |
| 452 | + protected function isFunction() { |
| 453 | + return $this->currentType == self::TYPE_FUNCTION; |
| 454 | + } |
| 455 | + |
| 456 | + /** |
| 457 | + * Utility function to parse wikitext without having to care |
| 458 | + * about handling a tag extension or parser function. |
| 459 | + * |
| 460 | + * @since 0.4.4 |
| 461 | + * |
| 462 | + * @param string $text The wikitext to be parsed |
| 463 | + * |
| 464 | + * @return string the parsed output |
| 465 | + */ |
| 466 | + protected function parseWikitext( $text ) { |
| 467 | + // Parse the wikitext to HTML. |
| 468 | + if ( $this->isFunction() ) { |
| 469 | + return $this->parser->parse( |
| 470 | + $text, |
| 471 | + $this->parser->mTitle, |
| 472 | + $this->parser->mOptions, |
| 473 | + true, |
| 474 | + false |
| 475 | + )->getText(); |
| 476 | + } |
| 477 | + else { |
| 478 | + return $this->parser->recursiveTagParse( |
| 479 | + $text, |
| 480 | + $this->frame |
| 481 | + ); |
| 482 | + } |
| 483 | + } |
| 484 | + |
| 485 | +} |
| 486 | + |
| 487 | +/** |
| 488 | + * Completely evil class to create a new instance of the handling ParserHook when the actual hook gets called. |
| 489 | + * |
| 490 | + * @evillness >9000 - to be replaced when a better solution (LSB?) is possible. |
| 491 | + * |
| 492 | + * @since 0.4 |
| 493 | + * |
| 494 | + * @author Jeroen De Dauw |
| 495 | + */ |
| 496 | +class ParserHookCaller { |
| 497 | + |
| 498 | + protected $class; |
| 499 | + protected $method; |
| 500 | + |
| 501 | + function __construct( $class, $method ) { |
| 502 | + $this->class = $class; |
| 503 | + $this->method = $method; |
| 504 | + } |
| 505 | + |
| 506 | + public function runHook() { |
| 507 | + $args = func_get_args(); |
| 508 | + return call_user_func_array( array( new $this->class(), $this->method ), $args ); |
| 509 | + } |
| 510 | + |
| 511 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_8/includes/ParserHook.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 512 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/ItemParameterCriterion.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 175 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/ItemParameterManipulation.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 70 | + native |
Index: tags/extensions/Validator/REL_0_4_8/includes/Parameter.php |
— | — | @@ -0,0 +1,790 @@ |
| 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 | + * Constructor. |
| 194 | + * |
| 195 | + * @since 0.4 |
| 196 | + * |
| 197 | + * @param string $name |
| 198 | + * @param string $type |
| 199 | + * @param mixed $default Use null for no default (which makes the parameter required) |
| 200 | + * @param array $aliases |
| 201 | + * @param array $criteria |
| 202 | + * @param array $dependencies |
| 203 | + */ |
| 204 | + public function __construct( $name, $type = Parameter::TYPE_STRING, |
| 205 | + $default = null, array $aliases = array(), array $criteria = array(), array $dependencies = array() ) { |
| 206 | + |
| 207 | + $this->name = $name; |
| 208 | + $this->type = $type; |
| 209 | + $this->default = $default; |
| 210 | + $this->aliases = $aliases; |
| 211 | + |
| 212 | + $this->cleanCriteria( $criteria ); |
| 213 | + $this->criteria = $criteria; |
| 214 | + |
| 215 | + $this->dependencies = $dependencies; |
| 216 | + } |
| 217 | + |
| 218 | + /** |
| 219 | + * Ensures all Validator 3.x-style criteria definitions are converted into ParameterCriterion instances. |
| 220 | + * |
| 221 | + * @since 0.4 |
| 222 | + * |
| 223 | + * @param array $criteria |
| 224 | + */ |
| 225 | + protected function cleanCriteria( array &$criteria ) { |
| 226 | + foreach ( $criteria as $key => &$criterion ) { |
| 227 | + if ( !$criterion instanceof ParameterCriterion ) { |
| 228 | + throw new Exception( "$key is not a valid ParameterCriterion." ); |
| 229 | + } |
| 230 | + } |
| 231 | + } |
| 232 | + |
| 233 | + /** |
| 234 | + * Adds one or more aliases for the parameter name. |
| 235 | + * |
| 236 | + * @since 0.4 |
| 237 | + * |
| 238 | + * @param mixed $aliases string or array of string |
| 239 | + */ |
| 240 | + public function addAliases() { |
| 241 | + $args = func_get_args(); |
| 242 | + $this->aliases = array_merge( $this->aliases, is_array( $args[0] ) ? $args[0] : $args ); |
| 243 | + } |
| 244 | + |
| 245 | + /** |
| 246 | + * Adds one or more ParameterCriterion. |
| 247 | + * |
| 248 | + * @since 0.4 |
| 249 | + * |
| 250 | + * @param mixed $criteria ParameterCriterion or array of ParameterCriterion |
| 251 | + */ |
| 252 | + public function addCriteria() { |
| 253 | + $args = func_get_args(); |
| 254 | + $this->criteria = array_merge( $this->criteria, is_array( $args[0] ) ? $args[0] : $args ); |
| 255 | + } |
| 256 | + |
| 257 | + /** |
| 258 | + * Adds one or more dependencies. There are the names of parameters |
| 259 | + * that need to be validated and formatted before this one. |
| 260 | + * |
| 261 | + * @since 0.4 |
| 262 | + * |
| 263 | + * @return array |
| 264 | + */ |
| 265 | + public function addDependencies() { |
| 266 | + $args = func_get_args(); |
| 267 | + $this->dependencies = array_merge( $this->dependencies, is_array( $args[0] ) ? $args[0] : $args ); |
| 268 | + } |
| 269 | + |
| 270 | + /** |
| 271 | + * Adds one or more ParameterManipulation. |
| 272 | + * |
| 273 | + * @since 0.4 |
| 274 | + * |
| 275 | + * @param mixed $manipulations ParameterManipulation or array of ParameterManipulation |
| 276 | + */ |
| 277 | + public function addManipulations( $manipulations ) { |
| 278 | + $args = func_get_args(); |
| 279 | + $this->manipulations = array_merge( $this->manipulations, is_array( $args[0] ) ? $args[0] : $args ); |
| 280 | + } |
| 281 | + |
| 282 | + /** |
| 283 | + * Sets and cleans the original value and name. |
| 284 | + * |
| 285 | + * @since 0.4 |
| 286 | + * |
| 287 | + * @param string $paramName |
| 288 | + * @param string $paramValue |
| 289 | + * |
| 290 | + * @return boolean |
| 291 | + */ |
| 292 | + public function setUserValue( $paramName, $paramValue ) { |
| 293 | + if ( $this->setCount > 0 && !self::$acceptOverriding ) { |
| 294 | + // TODO: fatal error |
| 295 | + /* |
| 296 | + $this->registerError( |
| 297 | + wfMsgExt( |
| 298 | + 'validator-error-override-argument', |
| 299 | + 'parsemag', |
| 300 | + $paramName, |
| 301 | + $this->mParameters[$mainName]['original-value'], |
| 302 | + is_array( $paramData ) ? $paramData['original-value'] : $paramData |
| 303 | + ), |
| 304 | + 'override' |
| 305 | + ); |
| 306 | + */ |
| 307 | + return false; |
| 308 | + } |
| 309 | + else { |
| 310 | + $this->originalName = $paramName; |
| 311 | + $this->originalValue = $paramValue; |
| 312 | + |
| 313 | + $this->cleanValue(); |
| 314 | + |
| 315 | + $this->setCount++; |
| 316 | + |
| 317 | + return true; |
| 318 | + } |
| 319 | + } |
| 320 | + |
| 321 | + /** |
| 322 | + * Sets the value. |
| 323 | + * |
| 324 | + * @since 0.4 |
| 325 | + * |
| 326 | + * @param mixed $value |
| 327 | + */ |
| 328 | + public function setValue( $value ) { |
| 329 | + $this->value = $value; |
| 330 | + } |
| 331 | + |
| 332 | + /** |
| 333 | + * Sets the $value to a cleaned value of $originalValue. |
| 334 | + * |
| 335 | + * @since 0.4 |
| 336 | + */ |
| 337 | + protected function cleanValue() { |
| 338 | + $this->value = $this->originalValue; |
| 339 | + |
| 340 | + if ( $this->trimValue ) { |
| 341 | + $this->value = trim( $this->value ); |
| 342 | + } |
| 343 | + } |
| 344 | + |
| 345 | + /** |
| 346 | + * Validates the parameter value and sets the value to it's default when errors occur. |
| 347 | + * |
| 348 | + * @since 0.4 |
| 349 | + * |
| 350 | + * @param array $parameters |
| 351 | + */ |
| 352 | + public function validate( array $parameters ) { |
| 353 | + $this->doValidation( $parameters ); |
| 354 | + } |
| 355 | + |
| 356 | + /** |
| 357 | + * Applies the parameter manipulations. |
| 358 | + * |
| 359 | + * @since 0.4 |
| 360 | + * |
| 361 | + * @param array $parameters |
| 362 | + */ |
| 363 | + public function format( array &$parameters ) { |
| 364 | + if ( $this->applyManipulationsToDefault || !$this->wasSetToDefault() ) { |
| 365 | + foreach ( $this->getManipulations() as $manipulation ) { |
| 366 | + $manipulation->manipulate( $this, $parameters ); |
| 367 | + } |
| 368 | + } |
| 369 | + } |
| 370 | + |
| 371 | + /** |
| 372 | + * Validates the parameter value. |
| 373 | + * Also sets the value to the default when it's not set or invalid, assuming there is a default. |
| 374 | + * |
| 375 | + * @since 0.4 |
| 376 | + * |
| 377 | + * @param array $parameters |
| 378 | + */ |
| 379 | + protected function doValidation( array $parameters ) { |
| 380 | + if ( $this->setCount == 0 ) { |
| 381 | + if ( $this->isRequired() ) { |
| 382 | + // This should not occur, so thorw an exception. |
| 383 | + throw new Exception( 'Attempted to validate a required parameter without first setting a value.' ); |
| 384 | + } |
| 385 | + else { |
| 386 | + $this->setToDefault(); |
| 387 | + } |
| 388 | + } |
| 389 | + else { |
| 390 | + $this->validateCriteria( $parameters ); |
| 391 | + $this->setToDefaultIfNeeded(); |
| 392 | + } |
| 393 | + } |
| 394 | + |
| 395 | + /** |
| 396 | + * Sets the parameter value to the default if needed. |
| 397 | + * |
| 398 | + * @since 0.4 |
| 399 | + */ |
| 400 | + protected function setToDefaultIfNeeded() { |
| 401 | + if ( count( $this->errors ) > 0 && !$this->hasFatalError() ) { |
| 402 | + $this->setToDefault(); |
| 403 | + } |
| 404 | + } |
| 405 | + |
| 406 | + /** |
| 407 | + * Validates the provided value against all criteria. |
| 408 | + * |
| 409 | + * @since 0.4 |
| 410 | + * |
| 411 | + * @param array $parameters |
| 412 | + */ |
| 413 | + protected function validateCriteria( array $parameters ) { |
| 414 | + foreach ( $this->getCriteria() as $criterion ) { |
| 415 | + $validationResult = $criterion->validate( $this, $parameters ); |
| 416 | + |
| 417 | + if ( !$validationResult->isValid() ) { |
| 418 | + $this->handleValidationError( $validationResult ); |
| 419 | + |
| 420 | + if ( !self::$accumulateParameterErrors || $this->hasFatalError() ) { |
| 421 | + break; |
| 422 | + } |
| 423 | + } |
| 424 | + } |
| 425 | + } |
| 426 | + |
| 427 | + /** |
| 428 | + * Handles any validation errors that occurred for a single criterion. |
| 429 | + * |
| 430 | + * @since 0.4 |
| 431 | + * |
| 432 | + * @param CriterionValidationResult $validationResult |
| 433 | + */ |
| 434 | + protected function handleValidationError( CriterionValidationResult $validationResult ) { |
| 435 | + foreach ( $validationResult->getErrors() as $error ) { |
| 436 | + $error->addTags( $this->getName() ); |
| 437 | + $this->errors[] = $error; |
| 438 | + } |
| 439 | + } |
| 440 | + |
| 441 | + /** |
| 442 | + * Returns the parameters main name. |
| 443 | + * |
| 444 | + * @since 0.4 |
| 445 | + * |
| 446 | + * @return string |
| 447 | + */ |
| 448 | + public function getName() { |
| 449 | + return $this->name; |
| 450 | + } |
| 451 | + |
| 452 | + /** |
| 453 | + * Returns the parameters value. |
| 454 | + * |
| 455 | + * @since 0.4 |
| 456 | + * |
| 457 | + * @return string |
| 458 | + */ |
| 459 | + public function &getValue() { |
| 460 | + return $this->value; |
| 461 | + } |
| 462 | + |
| 463 | + /** |
| 464 | + * Returns the type of the parameter. |
| 465 | + * |
| 466 | + * @since 0.4.3 |
| 467 | + * |
| 468 | + * @return string element of the Parameter::TYPE_ enum |
| 469 | + */ |
| 470 | + public function getType() { |
| 471 | + return $this->type; |
| 472 | + } |
| 473 | + |
| 474 | + /** |
| 475 | + * Returns an internationalized message indicating the parameter type suited for display to users. |
| 476 | + * |
| 477 | + * @since 0.4.3 |
| 478 | + * |
| 479 | + * @return string |
| 480 | + */ |
| 481 | + public function getTypeMessage() { |
| 482 | + global $wgLang; |
| 483 | + |
| 484 | + $message = wfMsg( 'validator-type-' . $this->type ); |
| 485 | + return $this->isList() ? |
| 486 | + wfMsgExt( 'validator-describe-listtype', 'parsemag', $message ) |
| 487 | + : $wgLang->ucfirst( $message ); |
| 488 | + } |
| 489 | + |
| 490 | + /** |
| 491 | + * Returns a list of dependencies the parameter has, in the form of |
| 492 | + * other parameter names. |
| 493 | + * |
| 494 | + * @since 0.4 |
| 495 | + * |
| 496 | + * @return array |
| 497 | + */ |
| 498 | + public function getDependencies() { |
| 499 | + return $this->dependencies; |
| 500 | + } |
| 501 | + |
| 502 | + /** |
| 503 | + * Returns the original use-provided name. |
| 504 | + * |
| 505 | + * @since 0.4 |
| 506 | + * |
| 507 | + * @return string |
| 508 | + */ |
| 509 | + public function getOriginalName() { |
| 510 | + if ( $this->setCount == 0 ) { |
| 511 | + throw new Exception( 'No user imput set to the parameter yet, so the original name does not exist' ); |
| 512 | + } |
| 513 | + return $this->originalName; |
| 514 | + } |
| 515 | + |
| 516 | + /** |
| 517 | + * Returns the original use-provided value. |
| 518 | + * |
| 519 | + * @since 0.4 |
| 520 | + * |
| 521 | + * @return string |
| 522 | + */ |
| 523 | + public function getOriginalValue() { |
| 524 | + if ( $this->setCount == 0 ) { |
| 525 | + throw new Exception( 'No user imput set to the parameter yet, so the original value does not exist' ); |
| 526 | + } |
| 527 | + return $this->originalValue; |
| 528 | + } |
| 529 | + |
| 530 | + /** |
| 531 | + * Returns all validation errors that occurred so far. |
| 532 | + * |
| 533 | + * @since 0.4 |
| 534 | + * |
| 535 | + * @return array of ValidationError |
| 536 | + */ |
| 537 | + public function getErrors() { |
| 538 | + return $this->errors; |
| 539 | + } |
| 540 | + |
| 541 | + /** |
| 542 | + * Returns if the parameter is a required one or not. |
| 543 | + * |
| 544 | + * @since 0.4 |
| 545 | + * |
| 546 | + * @return boolean |
| 547 | + */ |
| 548 | + public function isRequired() { |
| 549 | + return is_null( $this->default ); |
| 550 | + } |
| 551 | + |
| 552 | + /** |
| 553 | + * Returns if the parameter is a list or not. |
| 554 | + * |
| 555 | + * @since 0.4 |
| 556 | + * |
| 557 | + * @return boolean |
| 558 | + */ |
| 559 | + public function isList() { |
| 560 | + return false; |
| 561 | + } |
| 562 | + |
| 563 | + /** |
| 564 | + * Returns the parameter criteria. |
| 565 | + * |
| 566 | + * @since 0.4 |
| 567 | + * |
| 568 | + * @return array of ParameterCriterion |
| 569 | + */ |
| 570 | + public function getCriteria() { |
| 571 | + return array_merge( $this->getCriteriaForType(), $this->criteria ); |
| 572 | + } |
| 573 | + |
| 574 | + /** |
| 575 | + * Returns the parameter manipulations. |
| 576 | + * |
| 577 | + * @since 0.4 |
| 578 | + * |
| 579 | + * @return array of ParameterManipulation |
| 580 | + */ |
| 581 | + public function getManipulations() { |
| 582 | + return array_merge( $this->getManipulationsForType(), $this->manipulations ); |
| 583 | + } |
| 584 | + |
| 585 | + /** |
| 586 | + * Gets the criteria for the type of the parameter. |
| 587 | + * |
| 588 | + * @since 0.4 |
| 589 | + * |
| 590 | + * @return array |
| 591 | + */ |
| 592 | + protected function getCriteriaForType() { |
| 593 | + $criteria = array(); |
| 594 | + |
| 595 | + switch( $this->type ) { |
| 596 | + case self::TYPE_INTEGER: |
| 597 | + $criteria[] = new CriterionIsInteger(); |
| 598 | + break; |
| 599 | + case self::TYPE_FLOAT: |
| 600 | + $criteria[] = new CriterionIsFloat(); |
| 601 | + break; |
| 602 | + case self::TYPE_NUMBER: // Note: This accepts non-decimal notations! |
| 603 | + $criteria[] = new CriterionIsNumeric(); |
| 604 | + break; |
| 605 | + case self::TYPE_BOOLEAN: |
| 606 | + // TODO: work with list of true and false values and i18n. |
| 607 | + $criteria[] = new CriterionInArray( 'yes', 'no', 'on', 'off' ); |
| 608 | + break; |
| 609 | + case self::TYPE_CHAR: |
| 610 | + $criteria[] = new CriterionHasLength( 1, 1 ); |
| 611 | + break; |
| 612 | + case self::TYPE_STRING: default: |
| 613 | + // No extra criteria for strings. |
| 614 | + break; |
| 615 | + } |
| 616 | + |
| 617 | + return $criteria; |
| 618 | + } |
| 619 | + |
| 620 | + /** |
| 621 | + * Gets the manipulation for the type of the parameter. |
| 622 | + * |
| 623 | + * @since 0.4 |
| 624 | + * |
| 625 | + * @return array |
| 626 | + */ |
| 627 | + protected function getManipulationsForType() { |
| 628 | + $manipulations = array(); |
| 629 | + |
| 630 | + switch( $this->type ) { |
| 631 | + case self::TYPE_INTEGER: |
| 632 | + $manipulations[] = new ParamManipulationInteger(); |
| 633 | + break; |
| 634 | + case self::TYPE_FLOAT: case self::TYPE_NUMBER: |
| 635 | + $manipulations[] = new ParamManipulationFloat(); |
| 636 | + break; |
| 637 | + case self::TYPE_BOOLEAN: |
| 638 | + $manipulations[] = new ParamManipulationBoolean(); |
| 639 | + break; |
| 640 | + case self::TYPE_CHAR: case self::TYPE_STRING: default: |
| 641 | + $manipulations[] = new ParamManipulationString(); |
| 642 | + break; |
| 643 | + } |
| 644 | + |
| 645 | + return $manipulations; |
| 646 | + } |
| 647 | + |
| 648 | + /** |
| 649 | + * Sets the parameter value to the default. |
| 650 | + * |
| 651 | + * @since 0.4 |
| 652 | + */ |
| 653 | + protected function setToDefault() { |
| 654 | + $this->defaulted = true; |
| 655 | + $this->value = $this->default; |
| 656 | + } |
| 657 | + |
| 658 | + /** |
| 659 | + * Gets if the parameter was set to it's default. |
| 660 | + * |
| 661 | + * @since 0.4 |
| 662 | + * |
| 663 | + * @return boolean |
| 664 | + */ |
| 665 | + public function wasSetToDefault() { |
| 666 | + return $this->defaulted; |
| 667 | + } |
| 668 | + |
| 669 | + /** |
| 670 | + * Returns the criteria that apply to the list as a whole. |
| 671 | + * |
| 672 | + * @since 0.4 |
| 673 | + * |
| 674 | + * @return array |
| 675 | + */ |
| 676 | + public function getListCriteria() { |
| 677 | + return array(); |
| 678 | + } |
| 679 | + |
| 680 | + /** |
| 681 | + * Returns the parameter name aliases. |
| 682 | + * |
| 683 | + * @since 0.4 |
| 684 | + * |
| 685 | + * @return array |
| 686 | + */ |
| 687 | + public function getAliases() { |
| 688 | + return $this->aliases; |
| 689 | + } |
| 690 | + |
| 691 | + /** |
| 692 | + * Returns if the parameter has a certain alias. |
| 693 | + * |
| 694 | + * @since 0.4 |
| 695 | + * |
| 696 | + * @param string $alias |
| 697 | + * |
| 698 | + * @return boolean |
| 699 | + */ |
| 700 | + public function hasAlias( $alias ) { |
| 701 | + return in_array( $alias, $this->getAliases() ); |
| 702 | + } |
| 703 | + |
| 704 | + /** |
| 705 | + * Returns if the parameter has a certain dependency. |
| 706 | + * |
| 707 | + * @since 0.4 |
| 708 | + * |
| 709 | + * @param string $dependency |
| 710 | + * |
| 711 | + * @return boolean |
| 712 | + */ |
| 713 | + public function hasDependency( $dependency ) { |
| 714 | + return in_array( $dependency, $this->getDependencies() ); |
| 715 | + } |
| 716 | + |
| 717 | + /** |
| 718 | + * Sets the default parameter value. Null indicates no default, |
| 719 | + * and therefore makes the parameter required. |
| 720 | + * |
| 721 | + * @since 0.4 |
| 722 | + * |
| 723 | + * @param mixed $default |
| 724 | + * @param boolean $manipulate Should the default be manipulated or not? Since 0.4.6. |
| 725 | + */ |
| 726 | + public function setDefault( $default, $manipulate = true ) { |
| 727 | + $this->default = $default; |
| 728 | + $this->setDoManipulationOfDefault( $manipulate ); |
| 729 | + } |
| 730 | + |
| 731 | + /** |
| 732 | + * Returns the default value. |
| 733 | + * |
| 734 | + * @since 0.4.3 |
| 735 | + * |
| 736 | + * @return mixed |
| 737 | + */ |
| 738 | + public function getDefault() { |
| 739 | + return $this->default; |
| 740 | + } |
| 741 | + |
| 742 | + /** |
| 743 | + * Set if the parameter manipulations should be applied to the default value. |
| 744 | + * |
| 745 | + * @since 0.4 |
| 746 | + * |
| 747 | + * @param boolean $doOrDoNot |
| 748 | + */ |
| 749 | + public function setDoManipulationOfDefault( $doOrDoNot ) { |
| 750 | + $this->applyManipulationsToDefault = $doOrDoNot; |
| 751 | + } |
| 752 | + |
| 753 | + /** |
| 754 | + * Returns false when there are no fatal errors or an ValidationError when one is found. |
| 755 | + * |
| 756 | + * @return mixed false or ValidationError |
| 757 | + */ |
| 758 | + public function hasFatalError() { |
| 759 | + foreach ( $this->errors as $error ) { |
| 760 | + if ( $error->isFatal() ) { |
| 761 | + return true; |
| 762 | + } |
| 763 | + } |
| 764 | + |
| 765 | + return false; |
| 766 | + } |
| 767 | + |
| 768 | + /** |
| 769 | + * Returns a description message for the parameter, or false when there is none. |
| 770 | + * Override in deriving classes to add a message. |
| 771 | + * |
| 772 | + * @since 0.4.3 |
| 773 | + * |
| 774 | + * @return mixed string or false |
| 775 | + */ |
| 776 | + public function getDescription() { |
| 777 | + return $this->description; |
| 778 | + } |
| 779 | + |
| 780 | + /** |
| 781 | + * Sets a description message for the parameter. |
| 782 | + * |
| 783 | + * @since 0.4.3 |
| 784 | + * |
| 785 | + * @param string $descriptionMessage |
| 786 | + */ |
| 787 | + public function setDescription( $descriptionMessage ) { |
| 788 | + $this->description = $descriptionMessage; |
| 789 | + } |
| 790 | + |
| 791 | +} |
\ No newline at end of file |
Property changes on: tags/extensions/Validator/REL_0_4_8/includes/Parameter.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 792 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/TopologicalSort.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 165 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/includes/Validator.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 465 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/COPYING |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 684 | + native |
Index: tags/extensions/Validator/REL_0_4_8/Validator.i18n.php |
— | — | @@ -0,0 +1,2483 @@ |
| 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-listtype' => 'List of $1 items', |
| 69 | + 'validator-describe-empty' => 'empty', |
| 70 | + 'validator-describe-required' => 'required', |
| 71 | + 'validator-describe-header-parameter' => 'Parameter', |
| 72 | + 'validator-describe-header-aliases' => 'Aliases', |
| 73 | + 'validator-describe-header-type' => 'Type', |
| 74 | + 'validator-describe-header-default' => 'Default', |
| 75 | + 'validator-describe-header-description' => 'Description', |
| 76 | + 'validator-describe-parameters' => 'Parameters', |
| 77 | + 'validator-describe-syntax' => 'Syntax', |
| 78 | + 'validator-describe-tagmin' => 'Tag extension with only the required parameters.', |
| 79 | + 'validator-describe-tagmax' => 'Tag extension with all parameters.', |
| 80 | + 'validator-describe-tagdefault' => 'Tag extension with all parameters using the default parameter notation.', |
| 81 | + 'validator-describe-pfmin' => 'Parser function with only the required parameters.', |
| 82 | + 'validator-describe-pfmax' => 'Parser function with all parameters.', |
| 83 | + 'validator-describe-pfdefault' => 'Parser function with all parameters using the default parameter notation.', |
| 84 | + 'validator-describe-autogen' => 'The contents of this section was auto-generated by the "describe" parser hook of the Validator extension.', |
| 85 | + |
| 86 | + // Criteria errors for single values |
| 87 | + 'validator_error_empty_argument' => 'Parameter $1 can not have an empty value.', |
| 88 | + 'validator_error_must_be_number' => 'Parameter $1 can only be a number.', |
| 89 | + 'validator_error_must_be_integer' => 'Parameter $1 can only be an integer.', |
| 90 | + 'validator-error-must-be-float' => 'Parameter $1 can only be a floating point number.', |
| 91 | + 'validator_error_invalid_range' => 'Parameter $1 must be between $2 and $3.', |
| 92 | + 'validator-error-invalid-regex' => 'Parameter $1 must match this regular expression: $2.', |
| 93 | + 'validator-error-invalid-length' => 'Parameter $1 must have a length of $2.', |
| 94 | + 'validator-error-invalid-length-range' => 'Parameter $1 must have a length between $2 and $3.', |
| 95 | + 'validator_error_invalid_argument' => 'The value $1 is not valid for parameter $2.', |
| 96 | + |
| 97 | + // Criteria errors for lists |
| 98 | + 'validator_list_error_empty_argument' => 'Parameter $1 does not accept empty values.', |
| 99 | + 'validator_list_error_must_be_number' => 'Parameter $1 can only contain numbers.', |
| 100 | + 'validator_list_error_must_be_integer' => 'Parameter $1 can only contain integers.', |
| 101 | + 'validator-list-error-must-be-float' => 'Parameter $1 can only contain floats.', |
| 102 | + 'validator_list_error_invalid_range' => 'All values of parameter $1 must be between $2 and $3.', |
| 103 | + 'validator-list-error-invalid-regex' => 'All values of parameter $1 must match this regular expression: $2.', |
| 104 | + 'validator_list_error_invalid_argument' => 'One or more values for parameter $1 are invalid.', |
| 105 | + 'validator-list-error-accepts-only' => 'One or more values for parameter $1 are invalid. It only accepts {{PLURAL:$3|this value|these values}}: $2.', |
| 106 | + '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}}).', |
| 107 | + |
| 108 | + // Criteria errors for single values & lists |
| 109 | + 'validator_error_accepts_only' => 'The value "$4" is not valid for parameter $1. It only accepts {{PLURAL:$3|this value|these values}}: $2.', |
| 110 | + '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}}).', |
| 111 | + |
| 112 | + 'validator_list_omitted' => 'The {{PLURAL:$2|value|values}} $1 {{PLURAL:$2|has|have}} been omitted.', |
| 113 | +); |
| 114 | + |
| 115 | +/** Message documentation (Message documentation) |
| 116 | + * @author EugeneZelenko |
| 117 | + * @author Fryed-peach |
| 118 | + * @author Purodha |
| 119 | + * @author Raymond |
| 120 | + */ |
| 121 | +$messages['qqq'] = array( |
| 122 | + 'validator-desc' => '{{desc}}', |
| 123 | + 'validator-warning' => '{{Identical|Warning}}', |
| 124 | + 'validator-error' => '{{Identical|Error}}', |
| 125 | + 'validator_error_parameters' => 'Parameters: |
| 126 | +* $1 is the number of syntax errors, for PLURAL support (optional)', |
| 127 | + 'validator-listerrors-errors' => '{{Identical|Error}}', |
| 128 | + 'validator-listerrors-severity-message' => '{{Optional}} |
| 129 | +* $1 = severit |
| 130 | +* $2 = message', |
| 131 | + 'validator-listerrors-normal' => '{{Identical|Normal}}', |
| 132 | + 'validator-describe-descriptionmsg' => '{{Identical|Description}}', |
| 133 | + 'validator-describe-empty' => '{{Identical|Empty}}', |
| 134 | + 'validator-describe-required' => '{{Identical|Required}}', |
| 135 | + 'validator-describe-header-parameter' => '{{Identical|Parameter}}', |
| 136 | + 'validator-describe-header-type' => '{{Identical|Type}}', |
| 137 | + 'validator-describe-header-default' => '{{Identical|Default}}', |
| 138 | + 'validator-describe-header-description' => '{{Identical|Description}}', |
| 139 | + 'validator-describe-parameters' => '{{Identical|Parameter}}', |
| 140 | +); |
| 141 | + |
| 142 | +/** Afrikaans (Afrikaans) |
| 143 | + * @author Naudefj |
| 144 | + */ |
| 145 | +$messages['af'] = array( |
| 146 | + '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', |
| 147 | + 'validator-warning' => 'Waarskuwing: $ 1', |
| 148 | + 'validator-error' => 'Fout: $1', |
| 149 | + 'validator-fatal-error' => 'Onherstelbare fout: $1', |
| 150 | + 'validator_error_parameters' => 'Die volgende {{PLURAL:$1|fout|foute}} is in u sintaks waargeneem:', |
| 151 | + 'validator_error_unknown_argument' => "$1 is nie 'n geldige parameter nie.", |
| 152 | + 'validator_error_required_missing' => 'Die verpligte parameter $1 is nie verskaf nie.', |
| 153 | + 'validator-listerrors-errors' => 'Foute', |
| 154 | + 'validator-listerrors-minor' => 'Oorkomelik', |
| 155 | + 'validator-listerrors-low' => 'Laag', |
| 156 | + 'validator-listerrors-normal' => 'Gemiddeld', |
| 157 | + 'validator-listerrors-high' => 'Groot', |
| 158 | + 'validator-listerrors-fatal' => 'Fataal', |
| 159 | + 'validator_error_empty_argument' => 'Die parameter $1 mag nie leeg wees nie.', |
| 160 | + 'validator_error_must_be_number' => "Die parameter $1 mag net 'n getal wees.", |
| 161 | + 'validator_error_must_be_integer' => "Die parameter $1 kan slegs 'n heelgetal wees.", |
| 162 | + 'validator_error_invalid_range' => 'Die parameter $1 moet tussen $2 en $3 lê.', |
| 163 | + 'validator_error_invalid_argument' => 'Die waarde $1 is nie geldig vir parameter $2 nie.', |
| 164 | + 'validator_error_accepts_only' => 'Die parameter $1 kan slegs die volgende {{PLURAL:$3|waarde|waardes}} hê: $2.', |
| 165 | +); |
| 166 | + |
| 167 | +/** Gheg Albanian (Gegë) |
| 168 | + * @author Mdupont |
| 169 | + */ |
| 170 | +$messages['aln'] = array( |
| 171 | + 'validator-desc' => 'Validator është një zgjerim MediaWiki që ofron parametër përgjithshme trajtimin mbështetje të shtesave të tjera', |
| 172 | + 'validator_error_parameters' => 'Më poshtë {{PLURAL:$1|gabim ka gabime|kanë}} është zbuluar në sintaksën e juaj:', |
| 173 | + 'validator_warning_parameters' => 'Ka {{PLURAL:$1|është|janë gabime gabim}} në sintaksë tuaj.', |
| 174 | + 'validator_error_unknown_argument' => '$1 nuk është një parametër i vlefshëm.', |
| 175 | + 'validator_error_required_missing' => 'Parametrat e nevojshëm $1 nuk jepet.', |
| 176 | + 'validator_error_empty_argument' => 'Parametër $1 nuk mund të ketë një vlerë bosh.', |
| 177 | + 'validator_error_must_be_number' => 'Parametër $1 mund të jetë vetëm një numër.', |
| 178 | + 'validator_error_must_be_integer' => 'Parametër $1 mund të jetë vetëm një numër i plotë.', |
| 179 | + 'validator_error_invalid_range' => 'Parametër $1 duhet të jetë në mes të $2 dhe $3.', |
| 180 | + 'validator_error_invalid_argument' => 'Vlera $1 nuk është i vlefshëm për parametër $2.', |
| 181 | + 'validator_list_error_empty_argument' => 'Parametër $1 nuk e pranon vlerat bosh.', |
| 182 | + 'validator_list_error_must_be_number' => 'Parametër $1 mund të përmbajë vetëm numrat.', |
| 183 | + 'validator_list_error_must_be_integer' => 'Parametër $1 mund të përmbajë vetëm numra të plotë.', |
| 184 | + 'validator_list_error_invalid_range' => 'Të gjitha vlerat e parametrit $1 duhet të jetë në mes të $2 dhe $3.', |
| 185 | + 'validator_list_error_invalid_argument' => 'Një ose më shumë vlera për parametër $1 janë të pavlefshme.', |
| 186 | + 'validator_error_accepts_only' => 'Parametër $1 vetëm pranon {{PLURAL:$3|kjo vlerë|këtyre vlerave}}: $2.', |
| 187 | + 'validator_list_omitted' => '{{PLURAL:$2 |vlerë|vlerat}} $1 {{PLURAL:$2|ka|kanë}} janë lënë jashtë.', |
| 188 | +); |
| 189 | + |
| 190 | +/** Arabic (العربية) |
| 191 | + * @author Meno25 |
| 192 | + */ |
| 193 | +$messages['ar'] = array( |
| 194 | + 'validator-desc' => 'المحقق يوفر طريقة سهلة للامتدادات الأخرى للتحقق من محددات دوال المحلل وامتدادات الوسوم، وضبط القيم الافتراضية وتوليد رسائل الخطأ', |
| 195 | + 'validator_error_parameters' => '{{PLURAL:$1|الخطأ التالي|الاخطاء التالية}} تم كشفها في صياغتك:', |
| 196 | + 'validator_warning_parameters' => 'هناك {{PLURAL:$1|خطأ|أخطاء}} في صياغتك.', |
| 197 | + 'validator_error_unknown_argument' => '$1 ليس محددا صحيحا.', |
| 198 | + 'validator_error_required_missing' => 'المحدد المطلوب $1 ليس متوفرا.', |
| 199 | + 'validator_error_empty_argument' => 'المحدد $1 لا يمكن أن تكون قيمته فارغة.', |
| 200 | + 'validator_error_must_be_number' => 'المحدد $1 يمكن أن يكون فقط عددا.', |
| 201 | + 'validator_error_must_be_integer' => 'المحدد $1 يمكن أن يكون عددا صحيحا فقط.', |
| 202 | + 'validator_error_invalid_range' => 'المحدد $1 يجب أن يكون بين $2 و $3.', |
| 203 | + 'validator_error_invalid_argument' => 'القيمة $1 ليست صحيحة للمحدد $2.', |
| 204 | + 'validator_list_error_empty_argument' => 'المحدد $1 لا يقبل القيم الفارغة.', |
| 205 | + 'validator_list_error_must_be_number' => 'المحدد $1 يمكن أن يحتوي فقط على أرقام.', |
| 206 | + 'validator_list_error_must_be_integer' => 'المحدد $1 يمكن أن يحتوي فقط على أرقام صحيحة.', |
| 207 | + 'validator_list_error_invalid_range' => 'كل قيم المحدد $1 يجب أن تكون بين $2 و$3.', |
| 208 | + 'validator_list_error_invalid_argument' => 'قيمة واحدة أو أكثر للمحدد $1 غير صحيحة.', |
| 209 | + 'validator_error_accepts_only' => 'المحدد $1 يقبل فقط {{PLURAL:$3|هذه القيمة|هذه القيم}}: $2.', |
| 210 | + 'validator_list_omitted' => '{{PLURAL:$2|القيمة|القيم}} $1 {{PLURAL:$2|تم|تم}} مسحها.', |
| 211 | +); |
| 212 | + |
| 213 | +/** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) |
| 214 | + * @author EugeneZelenko |
| 215 | + * @author Jim-by |
| 216 | + * @author Wizardist |
| 217 | + */ |
| 218 | +$messages['be-tarask'] = array( |
| 219 | + 'validator-desc' => 'Правяраючы палягчае іншым пашырэньням працу па праверцы парамэтраў функцыяў парсэру і тэгаў пашырэньняў, устанаўлівае значэньні па змоўчваньні і стварае паведамленьні пра памылкі', |
| 220 | + 'validator-warning' => 'Папярэджаньне: $1', |
| 221 | + 'validator-error' => 'Памылка: $1', |
| 222 | + 'validator-fatal-error' => 'Крытычная памылка: $1', |
| 223 | + 'validator_error_parameters' => 'У сынтаксісе {{PLURAL:$1|выяўленая наступная памылка|выяўленыя наступныя памылкі}}:', |
| 224 | + 'validator_warning_parameters' => 'У Вашы сынтаксісе {{PLURAL:$1|маецца памылка|маюцца памылкі}}.', |
| 225 | + 'validator-warning-adittional-errors' => '... і {{PLURAL:$1|яшчэ адна праблема|яшчэ некалькі праблемаў}}.', |
| 226 | + 'validator-error-omitted' => '{{PLURAL:$2|Значэньне «$1» было прапушчанае|Значэньні «$1» былі прапушчаныя}}.', |
| 227 | + 'validator-error-problem' => 'Узьнікла праблема з парамэтрам $1.', |
| 228 | + 'validator_error_unknown_argument' => 'Няслушны парамэтар $1.', |
| 229 | + 'validator_error_required_missing' => 'Не пададзены абавязковы парамэтар $1.', |
| 230 | + 'validator-error-override-argument' => 'Спрабаваў памяняць значэньне парамэтру $1 з «$2» на «$3»', |
| 231 | + 'validator-type-string' => 'тэкст', |
| 232 | + 'validator-type-number' => 'лік', |
| 233 | + 'validator-type-integer' => 'цэлы лік', |
| 234 | + 'validator-type-float' => 'лік', |
| 235 | + 'validator-type-boolean' => 'так/не', |
| 236 | + 'validator-type-char' => 'сымбаль', |
| 237 | + 'validator-listerrors-errors' => 'Памылкі', |
| 238 | + 'validator-listerrors-minor' => 'Дробная', |
| 239 | + 'validator-listerrors-low' => 'Малая', |
| 240 | + 'validator-listerrors-normal' => 'Звычайная', |
| 241 | + 'validator-listerrors-high' => 'Значная', |
| 242 | + 'validator-listerrors-fatal' => 'Фатальная', |
| 243 | + 'validator-listerrors-description' => 'Пералічвае памылкі (і папярэджаньні), якія адбыліся ў працэдурах-перахопніках парсэра, дададзеных праз Validator. |
| 244 | +Паказваюцца толькі працэдуры-перахопнікі парсэра, якія знаходзяцца Вышэй listerrors. |
| 245 | +Зьмясьціце listerrors у самы канец старонкі, каб атрымаць сьпіс усіх памылак.', |
| 246 | + 'validator-listerrors-par-minseverity' => 'Мінімальная сур’ёзнасьць праблемы, для таго каб яна была ўключаная ў сьпіс.', |
| 247 | + 'validator-describe-description' => 'Стварае дакумэнтацыю для аднаго ці болей працэдур-перахопнікаў парсэра, атрымаўшым вызначэньне праз Validator.', |
| 248 | + 'validator-describe-notfound' => 'Не існуе працэдур-перахопніка парсэра для «$1».', |
| 249 | + 'validator-describe-descriptionmsg' => "'''Апісаньне''': $1", |
| 250 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Псэўданім|Псэўданімы}}''': $1", |
| 251 | + 'validator-describe-parserfunction' => 'Рэалізаваная толькі функцыя парсэру.', |
| 252 | + 'validator-describe-tagextension' => 'Рэалізаваная толькі як пашырэньне тэгу.', |
| 253 | + 'validator-describe-bothhooks' => 'Рэалізаваная як функцыя парсэру і як пашырэньне тэгу.', |
| 254 | + 'validator-describe-par-hooks' => 'Працэдура-перахопнік парсэра, для якой паказваць дакумэнтацыю.', |
| 255 | + 'validator-describe-par-pre' => 'Дазваляе Вам атрымліваць актуальны вікі-тэкст для дакумэнтацыі, без паказу на старонцы.', |
| 256 | + 'validator-describe-listtype' => 'Сьпіс элемэнтаў $1', |
| 257 | + 'validator-describe-empty' => 'пуста', |
| 258 | + 'validator-describe-required' => 'абавязкова', |
| 259 | + 'validator-describe-header-parameter' => 'Парамэтар', |
| 260 | + 'validator-describe-header-aliases' => 'Псэўданімы', |
| 261 | + 'validator-describe-header-type' => 'Тып', |
| 262 | + 'validator-describe-header-default' => 'Па змоўчваньні', |
| 263 | + 'validator-describe-header-description' => 'Апісаньне', |
| 264 | + 'validator-describe-parameters' => 'Парамэтры', |
| 265 | + 'validator-describe-syntax' => 'Сынтаксіс', |
| 266 | + 'validator-describe-tagmin' => 'Пашырэньне тэга, якое мае толькі неабходныя парамэтры.', |
| 267 | + 'validator-describe-tagmax' => 'Пашырэньне тэга з усімі парамэтрамі.', |
| 268 | + 'validator-describe-tagdefault' => 'Пашырэньне тэга з усімі парамэтрамі, выкарыстаньнем запісаў парамэтраў па змоўчваньні.', |
| 269 | + 'validator-describe-pfmin' => 'Функцыя парсэра, якае мае толькі неабходныя парамэтры.', |
| 270 | + 'validator-describe-pfmax' => 'Функцыя парсэра з усімі парамэтрамі.', |
| 271 | + 'validator-describe-pfdefault' => 'Функцыя парсэра з усімі парамэтрамі, выкарыстаньнем запісаў парамэтраў па змоўчваньні.', |
| 272 | + 'validator-describe-autogen' => 'Зьмест гэтай сэкцыі быў аўтаматычна створаны працэдурай-перахопнікам парсэра «describe» пашырэньня Validator.', |
| 273 | + 'validator_error_empty_argument' => 'Парамэтар $1 ня можа мець пустое значэньне.', |
| 274 | + 'validator_error_must_be_number' => 'Парамэтар $1 можа быць толькі лікам.', |
| 275 | + 'validator_error_must_be_integer' => 'Парамэтар $1 можа быць толькі цэлым лікам.', |
| 276 | + 'validator-error-must-be-float' => 'Парамэтар $1 можа быць толькі лікам з плаваючай коскай.', |
| 277 | + 'validator_error_invalid_range' => 'Парамэтар $1 павінен быць паміж $2 і $3.', |
| 278 | + 'validator-error-invalid-regex' => 'парамэтар $1 мусіць адпавядаць гэтаму рэгулярнаму выразу: $2.', |
| 279 | + 'validator-error-invalid-length' => 'Парамэтар $1 павінен мець даўжыню $2.', |
| 280 | + 'validator-error-invalid-length-range' => 'Парамэтар $1 павінен мець даўжыню паміж $2 і $3.', |
| 281 | + 'validator_error_invalid_argument' => 'Значэньне $1 не зьяўляецца слушным для парамэтру $2.', |
| 282 | + 'validator_list_error_empty_argument' => 'Парамэтар $1 ня можа прымаць пустыя значэньні.', |
| 283 | + 'validator_list_error_must_be_number' => 'Парамэтар $1 можа ўтрымліваць толькі лікі.', |
| 284 | + 'validator_list_error_must_be_integer' => 'Парамэтар $1 можа ўтрымліваць толькі цэлыя лікі.', |
| 285 | + 'validator-list-error-must-be-float' => 'Парамэтар $1 можа ўтрымліваць толькі лікі з плаваючай кропкай.', |
| 286 | + 'validator_list_error_invalid_range' => 'Усе значэньні парамэтру $1 павінны знаходзіцца паміж $2 і $3.', |
| 287 | + 'validator-list-error-invalid-regex' => 'Усе значэньні парамэтру $1 мусяць адпавядаць гэтаму рэгулярнаму выразу: $2.', |
| 288 | + 'validator_list_error_invalid_argument' => 'Адно ці болей значэньняў парамэтру $1 зьяўляюцца няслушнымі.', |
| 289 | + 'validator-list-error-accepts-only' => 'Адзін ці некалькі значэньняў парамэтру $1 зьяўляюцца няслушнымі. |
| 290 | +{{PLURAL:$3|Ён мусіць мець наступнае значэньне|Яны мусяць мець наступныя значэньні}}: $2.', |
| 291 | + 'validator-list-error-accepts-only-omitted' => 'Адзін ці некалькі значэньняў парамэтру $1 зьяўляюцца няслушнымі. |
| 292 | +{{PLURAL:$3|Ён мусіць мець наступнае значэньне|Яны мусяць мець наступныя значэньні}}: $2. (і $4 {{PLURAL:$4|прапушчанае значэньне|прапушчаныя значэньні|прапушчаных значэньняў}}).', |
| 293 | + 'validator_error_accepts_only' => 'Значэньне «$4» зьяўляецца няслушным для парамэтру $1. Ён можа прымаць толькі {{PLURAL:$3|гэтае значэньне|гэтыя значэньні}}: $2.', |
| 294 | + 'validator-error-accepts-only-omitted' => 'Значэньне «$2» зьяўляецца няслушным для парамэтру $1. |
| 295 | +{{PLURAL:$5|Ён мусіць мець наступнае значэньне|Яны мусяць мець наступныя значэньні}}: $3. (і $4 {{PLURAL:$4|прапушчанае значэньне|прапушчаныя значэньні|прапушчаных значэньняў}}).', |
| 296 | + 'validator_list_omitted' => '{{PLURAL:$2|Значэньне|Значэньні}} $1 {{PLURAL:$2|было прапушчанае|былі прапушчаныя}}.', |
| 297 | +); |
| 298 | + |
| 299 | +/** Bulgarian (Български) |
| 300 | + * @author DCLXVI |
| 301 | + * @author Reedy |
| 302 | + */ |
| 303 | +$messages['bg'] = array( |
| 304 | + 'validator_error_empty_argument' => 'Параметърът $1 не може да има празна стойност.', |
| 305 | +); |
| 306 | + |
| 307 | +/** Bengali (বাংলা) |
| 308 | + * @author Ehsanulhb |
| 309 | + */ |
| 310 | +$messages['bn'] = array( |
| 311 | + 'validator-describe-descriptionmsg' => "'''বিবরণ''': $1", |
| 312 | + 'validator-describe-header-description' => 'বিবরণ', |
| 313 | +); |
| 314 | + |
| 315 | +/** Breton (Brezhoneg) |
| 316 | + * @author Fohanno |
| 317 | + * @author Fulup |
| 318 | + * @author Gwendal |
| 319 | + * @author Y-M D |
| 320 | + */ |
| 321 | +$messages['br'] = array( |
| 322 | + '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ù', |
| 323 | + 'validator-warning' => 'Diwallit : $1', |
| 324 | + 'validator-error' => 'Fazi : $1', |
| 325 | + 'validator-fatal-error' => 'Fazi diremed: $1', |
| 326 | + 'validator_error_parameters' => "Kavet eo bet ar {{PLURAL:$1|fazi|fazioù}} da-heul en hoc'h ereadur :", |
| 327 | + 'validator_warning_parameters' => "{{PLURAL:$1|Ur fazi|Fazioù}} zo en hoc'h ereadur.", |
| 328 | + 'validator-warning-adittional-errors' => '... {{PLURAL:$1|hag ur gudenn bennak all|ha meur a gudenn all}}.', |
| 329 | + 'validator-error-omitted' => 'N\'eo ket bet merket ar {{PLURAL:$2|roadenn "$1"|roadennoù "$1"}}.', |
| 330 | + 'validator-error-problem' => 'Ur gudenn zo bet gant an arventenn $1.', |
| 331 | + 'validator_error_unknown_argument' => "$1 n'eo ket un arventenn reizh.", |
| 332 | + 'validator_error_required_missing' => "N'eo ket bet pourchaset an arventenn rekis $1", |
| 333 | + 'validator-error-override-argument' => 'Klasket en deus ar meziant erlec\'hiañ an arventenn $1 (talvoud : $2) gant an talvoud "$3"', |
| 334 | + 'validator-type-string' => 'testenn', |
| 335 | + 'validator-type-number' => 'niver', |
| 336 | + 'validator-type-integer' => 'Niver klok', |
| 337 | + 'validator-type-float' => 'niver', |
| 338 | + 'validator-type-boolean' => 'ya/nann', |
| 339 | + 'validator-type-char' => 'arouezenn', |
| 340 | + 'validator-listerrors-errors' => 'Fazioù', |
| 341 | + 'validator-listerrors-minor' => 'Minor', |
| 342 | + 'validator-listerrors-low' => 'Gwan', |
| 343 | + 'validator-listerrors-normal' => 'Reizh', |
| 344 | + 'validator-listerrors-high' => 'Uhel', |
| 345 | + 'validator-listerrors-fatal' => 'Diremed', |
| 346 | + 'validator-describe-descriptionmsg' => "'''Deskrivadur''': $1", |
| 347 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Alias|Aliasoù}}''': $1", |
| 348 | + 'validator-describe-listtype' => 'Roll gant $1 elfenn', |
| 349 | + 'validator-describe-empty' => 'goullo', |
| 350 | + 'validator-describe-required' => 'rekis', |
| 351 | + 'validator-describe-header-parameter' => 'Arventenn', |
| 352 | + 'validator-describe-header-aliases' => 'Aliasoù', |
| 353 | + 'validator-describe-header-type' => 'Seurt', |
| 354 | + 'validator-describe-header-default' => 'Diouer', |
| 355 | + 'validator-describe-header-description' => 'Deskrivadur', |
| 356 | + 'validator-describe-parameters' => 'Arventennoù', |
| 357 | + 'validator-describe-syntax' => 'Ereadurezh', |
| 358 | + 'validator_error_empty_argument' => "N'hall ket an arventenn $1 bezañ goullo he zalvoudenn", |
| 359 | + 'validator_error_must_be_number' => 'Un niver e rank an arventenn $1 bezañ hepken.', |
| 360 | + 'validator_error_must_be_integer' => 'Rankout a ra an arventenn $1 bezañ un niver anterin.', |
| 361 | + 'validator-error-must-be-float' => 'Rankout a ra an arventenn $1 bezañ un niver skej war-neuñv.', |
| 362 | + 'validator_error_invalid_range' => 'Rankout a ra an arventenn $1 bezañ etre $2 hag $3.', |
| 363 | + 'validator-error-invalid-regex' => 'Rankout a ra an arventenn $1 klotañ gant ar jedad poellek-mañ : $2.', |
| 364 | + 'validator-error-invalid-length' => "Ret eo d'an arventenn $1 bezañ par he hed da $2.", |
| 365 | + 'validator-error-invalid-length-range' => 'Rankout a ra an arventenn $1 bezañ he hed etre $2 hag $3.', |
| 366 | + 'validator_error_invalid_argument' => "N'eo ket reizh an dalvoudenn $1 evit an arventenn $2.", |
| 367 | + 'validator_list_error_empty_argument' => 'Ne zegemer ket an arventenn $1 an talvoudennoù goullo.', |
| 368 | + 'validator_list_error_must_be_number' => "N'hall bezañ nemet niveroù en arventenn $1.", |
| 369 | + 'validator_list_error_must_be_integer' => "N'hall bezañ nemet niveroù anterin en arventenn $1.", |
| 370 | + 'validator-list-error-must-be-float' => "N'hall bezañ nemet niveroù gant skej en arventenn $1.", |
| 371 | + 'validator_list_error_invalid_range' => 'An holl talvoudennoù eus an arventenn $1 a rank bezañ etre $2 ha $3.', |
| 372 | + 'validator-list-error-invalid-regex' => 'Rankout a ra holl dalvoudoù an arventenn $1 klotañ gant ar jedad poellek-mañ : $2.', |
| 373 | + 'validator_list_error_invalid_argument' => 'Faziek eo unan pe meur a dalvoudenn eus an arventenn $1.', |
| 374 | + 'validator-list-error-accepts-only' => 'Direizh eo unan pe meur a hini eus an talvoudoù evit an arventenn $1. |
| 375 | +Ne zegemer nemet an {{PLURAL:$3|talvoud|talvoudoù}}-mañ : $2.', |
| 376 | + 'validator-list-error-accepts-only-omitted' => 'Direizh eo unan pe meur a hini eus an talvoudoù evit an arventenn $1. |
| 377 | +Ne zegemer nemet an {{PLURAL:$3|talvoud|talvoudoù}}-mañ : $2 (ha $4 {{PLURAL:$4|talvoud anroet|talvoud anroet}}).', |
| 378 | + 'validator_error_accepts_only' => 'Ne zegemer ket an arventenn $1 an talvoud "$4". Ne zegemer nemet {{PLURAL:$3|an talvoud|an talvoudoù}}-mañ : $2.', |
| 379 | + 'validator-error-accepts-only-omitted' => 'Direizh eo an talvoud "$2" evit an arventenn $1. |
| 380 | +Ne zegemer nemet an {{PLURAL:$5|talvoud|talvoudoù}}-mañ : $3 (ha $4 {{PLURAL:$4|talvoud anroet|talvoud anroet}}).', |
| 381 | + 'validator_list_omitted' => 'Disoñjet eo bet an {{PLURAL:$2|talvoudenn|talvoudennoù}} $1.', |
| 382 | +); |
| 383 | + |
| 384 | +/** Bosnian (Bosanski) |
| 385 | + * @author CERminator |
| 386 | + */ |
| 387 | +$messages['bs'] = array( |
| 388 | + '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.', |
| 389 | + 'validator-warning' => 'Upozorenje: $1', |
| 390 | + 'validator-error' => 'Greška: $1', |
| 391 | + 'validator-fatal-error' => 'Fatalna greška: $1', |
| 392 | + 'validator_error_parameters' => 'U Vašoj sintaksi {{PLURAL:$1|je|su}} {{PLURAL:$1|otkivena slijedeća greška|otkrivene slijedeće greške}}:', |
| 393 | + 'validator_warning_parameters' => '{{PLURAL:$1|Postoji greška|Postoje greške}} u Vašoj sintaksi.', |
| 394 | + 'validator-warning-adittional-errors' => '... i {{PLURAL:$1|još jedan problem|još nekoliko problema}}.', |
| 395 | + 'validator_error_unknown_argument' => '$1 nije valjan parametar.', |
| 396 | + 'validator_error_required_missing' => 'Obavezni parametar $1 nije naveden.', |
| 397 | + 'validator-error-override-argument' => 'Pokušano da se preskoči parametar $1 (vrijednost: $2) vrijednošću "$3"', |
| 398 | + 'validator-listerrors-normal' => 'Normalno', |
| 399 | + 'validator_error_empty_argument' => 'Parametar $1 ne može imati praznu vrijednost.', |
| 400 | + 'validator_error_must_be_number' => 'Parametar $1 može biti samo broj.', |
| 401 | + 'validator_error_must_be_integer' => 'Parametar $1 može biti samo cijeli broj.', |
| 402 | + 'validator-error-must-be-float' => 'Parametar $1 može biti samo broj sa plutajućim zarezom.', |
| 403 | + 'validator_error_invalid_range' => 'Parametar $1 mora biti između $2 i $3.', |
| 404 | + 'validator-error-invalid-length' => 'Parametar $1 mora imati dužinu $2.', |
| 405 | + 'validator-error-invalid-length-range' => 'Parametar $1 mora imati dužinu između $2 i $3.', |
| 406 | + 'validator_error_invalid_argument' => 'Vrijednost $1 nije valjana za parametar $2.', |
| 407 | + 'validator_list_error_empty_argument' => 'Parametar $1 ne prima prazne vrijednosti.', |
| 408 | + 'validator_list_error_must_be_number' => 'Parametar $1 može sadržavati samo brojeve.', |
| 409 | + 'validator_list_error_must_be_integer' => 'Parametar $1 može sadržavati samo cijele brojeve.', |
| 410 | + 'validator_list_error_invalid_range' => 'Sve vrijednosti parametra $1 moraju biti između $2 i $3.', |
| 411 | + 'validator_list_error_invalid_argument' => 'Jedna ili više vrijednosti za parametar $1 nisu valjane.', |
| 412 | + 'validator_error_accepts_only' => 'Vrijednost "$4" nije valjana za parametar $1. On prihvata samo {{PLURAL:$3|ovu vrijednost|ove vrijednosti}}: $2.', |
| 413 | + 'validator_list_omitted' => '{{PLURAL:$2|Vrijednost|Vrijednosti}} $1 {{PLURAL:$2|je ispuštena|su ispuštene}}.', |
| 414 | +); |
| 415 | + |
| 416 | +/** Czech (Česky) |
| 417 | + * @author Matěj Grabovský |
| 418 | + * @author Mormegil |
| 419 | + * @author Reaperman |
| 420 | + */ |
| 421 | +$messages['cs'] = array( |
| 422 | + '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.', |
| 423 | + 'validator_error_parameters' => 'Ve vaší syntaxi {{PLURAL:$1|byla nalezena následující chyba|byly nalezeny následující chyby}}:', |
| 424 | + 'validator_warning_parameters' => 'Ve vaší syntaxi {{PLURAL:$1|je chyba|jsou chyby}}.', |
| 425 | + 'validator_error_unknown_argument' => '$1 není platný parametr.', |
| 426 | + 'validator_error_required_missing' => 'Povinný parameter $1 nebyl specifikován.', |
| 427 | + 'validator_error_empty_argument' => 'Parametr $1 nemůže být prázdný.', |
| 428 | + 'validator_error_must_be_number' => 'Parametr $1 může být pouze číslo.', |
| 429 | + 'validator_error_must_be_integer' => 'Parametr $1 může být pouze celé číslo.', |
| 430 | + 'validator_error_invalid_range' => 'Parametr $1 musí být v rozmezí $2 až $3.', |
| 431 | + 'validator_error_invalid_argument' => '$1 není platná hodnota pro parametr $2.', |
| 432 | + 'validator_list_error_empty_argument' => 'Parametr $1 npeřijímá prázdné hoodnoty.', |
| 433 | + 'validator_list_error_must_be_number' => 'Parametr $1 může obsahovat pouze čísla.', |
| 434 | + 'validator_list_error_must_be_integer' => 'Paramter $1 může obsahovat pouze celá čísla.', |
| 435 | + 'validator_list_error_invalid_range' => 'Všechny hodnoty parametru $1 musí být v rozmezí $2 až $3.', |
| 436 | + 'validator_list_error_invalid_argument' => 'Jedna nebo více hodnot parametru $1 jsou neplatné.', |
| 437 | + 'validator_error_accepts_only' => 'Parametr $1 nemůže mít hodnotu „$4“; přijímá pouze {{PLURAL:$3|tuto hodnotu|tyto hodnoty}}: $2.', |
| 438 | + 'validator_list_omitted' => '{{PLURAL:$2|Hodnota $1 byla vynechána|Hodnoty $1 byly vynechány}}.', |
| 439 | +); |
| 440 | + |
| 441 | +/** German (Deutsch) |
| 442 | + * @author DaSch |
| 443 | + * @author Imre |
| 444 | + * @author Kghbln |
| 445 | + * @author LWChris |
| 446 | + */ |
| 447 | +$messages['de'] = array( |
| 448 | + 'validator-desc' => 'Ermöglicht es anderen Softwareerweiterungen Parameter verarbeiten zu können', |
| 449 | + 'validator-warning' => 'Warnung: $1', |
| 450 | + 'validator-error' => 'Fehler: $1', |
| 451 | + 'validator-fatal-error' => "'''Schwerwiegender Fehler:''' $1", |
| 452 | + 'validator_error_parameters' => '{{PLURAL:$1|Der folgende Fehler wurde|Die folgenden Fehler wurden}} in der Syntax gefunden:', |
| 453 | + 'validator_warning_parameters' => '{{PLURAL:$1|Es ist ein Fehler|Es sind Fehler}} in der Syntax.', |
| 454 | + 'validator-warning-adittional-errors' => '… und {{PLURAL:$1|ein weiteres Problem|weitere Probleme}}.', |
| 455 | + 'validator-error-omitted' => '{{PLURAL:$2|Der Wert „$1“ wurde|Die Werte „$1“ wurden}} ausgelassen.', |
| 456 | + 'validator-error-problem' => 'Es gab ein Problem mit Parameter $1.', |
| 457 | + 'validator_error_unknown_argument' => '$1 ist kein gültiger Parameter.', |
| 458 | + 'validator_error_required_missing' => 'Der notwendige Parameter $1 wurde nicht angegeben.', |
| 459 | + 'validator-error-override-argument' => 'Es wurde versucht Parameter $1 ($2) mit dem Wert „$3“ zu überschreiben.', |
| 460 | + 'validator-type-string' => 'Text', |
| 461 | + 'validator-type-number' => 'Zahl', |
| 462 | + 'validator-type-integer' => 'Ganzzahl', |
| 463 | + 'validator-type-float' => 'Zahl', |
| 464 | + 'validator-type-boolean' => 'Ja/Nein', |
| 465 | + 'validator-type-char' => 'Zeichen', |
| 466 | + 'validator-listerrors-errors' => 'Fehler', |
| 467 | + 'validator-listerrors-minor' => 'Marginal', |
| 468 | + 'validator-listerrors-low' => 'Klein', |
| 469 | + 'validator-listerrors-normal' => 'Normal', |
| 470 | + 'validator-listerrors-high' => 'Groß', |
| 471 | + 'validator-listerrors-fatal' => 'Schwerwiegend', |
| 472 | + 'validator-listerrors-description' => 'Zeigt Fehler und Warnungen an, die bei über die Erweiterung Validator genutzten Parserhooks auftraten. |
| 473 | +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.', |
| 474 | + 'validator-listerrors-par-minseverity' => 'Der Mindestschweregrad eines Problems, damit dieses angezeigt wird.', |
| 475 | + 'validator-describe-description' => 'Erzeugt die Dokumentation für einen oder mehrere Parserhooks, die mit der Erweiterung Validator definiert wurden.', |
| 476 | + 'validator-describe-notfound' => 'Es gibt keinen Parserhook, der „$1“ verarbeitet.', |
| 477 | + 'validator-describe-descriptionmsg' => "'''Beschreibung:''' $1", |
| 478 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Alias|Aliasse}}:''' $1", |
| 479 | + 'validator-describe-parserfunction' => 'Lediglich als Parserfunktion implementiert.', |
| 480 | + 'validator-describe-tagextension' => 'Lediglich als Elementerweiterung implementiert.', |
| 481 | + 'validator-describe-bothhooks' => 'Sowohl als Parserfunktion wie auch Elementerweiterung implementiert.', |
| 482 | + 'validator-describe-par-hooks' => 'Die Parserhooks für welche die Dokumentation angezeigt werden soll.', |
| 483 | + 'validator-describe-par-pre' => 'Ermöglicht die Ausgabe der Dokumentation in Wikitext ohne dass dieser bei der Darstellung der Seite genutzt wird.', |
| 484 | + 'validator-describe-listtype' => 'Liste von $1 {{PLURAL:$1|Elemente|Elementen}}', |
| 485 | + 'validator-describe-empty' => 'leer', |
| 486 | + 'validator-describe-required' => 'erforderlich', |
| 487 | + 'validator-describe-header-parameter' => 'Parameter', |
| 488 | + 'validator-describe-header-aliases' => 'Aliasse', |
| 489 | + 'validator-describe-header-type' => 'Typ', |
| 490 | + 'validator-describe-header-default' => 'Standard', |
| 491 | + 'validator-describe-header-description' => 'Beschreibung', |
| 492 | + 'validator-describe-parameters' => 'Parameter', |
| 493 | + 'validator-describe-syntax' => 'Syntax', |
| 494 | + 'validator-describe-tagmin' => 'Elementerweiterung, lediglich mit den erforderlichen Parametern.', |
| 495 | + 'validator-describe-tagmax' => 'Elementerweiterung mit allen Parametern.', |
| 496 | + 'validator-describe-tagdefault' => 'Elementerweiterung mit allen Parametern, welche die Standardnotation für Parameter nutzen.', |
| 497 | + 'validator-describe-pfmin' => 'Parserfunktion, lediglich mit den erforderlichen Parametern.', |
| 498 | + 'validator-describe-pfmax' => 'Parserfunktion mit allen Parametern.', |
| 499 | + 'validator-describe-pfdefault' => 'Parserfunktion mit allen Parametern, welche die Standardnotation für Parameter nutzen.', |
| 500 | + 'validator-describe-autogen' => 'Der Inhalt dieses Abschnitts wurde automatisch durch den Parserhook „describe“ der Erweiterung Validator erzeugt.', |
| 501 | + 'validator_error_empty_argument' => 'Parameter $1 kann keinen leeren Wert haben.', |
| 502 | + 'validator_error_must_be_number' => 'Parameter $1 kann nur eine Nummer sein.', |
| 503 | + 'validator_error_must_be_integer' => 'Parameter $1 kann nur eine ganze Zahl sein.', |
| 504 | + 'validator-error-must-be-float' => 'Parameter $1 kann nur eine Gleitkommazahl sein.', |
| 505 | + 'validator_error_invalid_range' => 'Parameter $1 muss zwischen $2 und $3 liegen.', |
| 506 | + 'validator-error-invalid-regex' => 'Parameter $1 muss diesem regulären Ausdruck entsprechen: $2.', |
| 507 | + 'validator-error-invalid-length' => 'Parameter $1 muss eine Länge von $2 haben.', |
| 508 | + 'validator-error-invalid-length-range' => 'Parameter $1 muss eine Länge zwischen $2 und $3 haben.', |
| 509 | + 'validator_error_invalid_argument' => 'Der Wert „$1“ ist nicht gültig für Parameter $2.', |
| 510 | + 'validator_list_error_empty_argument' => 'Parameter $1 akzeptiert keine leeren Werte.', |
| 511 | + 'validator_list_error_must_be_number' => 'Parameter $1 kann nur Ziffern enthalten.', |
| 512 | + 'validator_list_error_must_be_integer' => 'Parameter $1 kann nur ganze Zahlen enthalten.', |
| 513 | + 'validator-list-error-must-be-float' => 'Parameter $1 kann nur Gleitkommazahlen enthalten.', |
| 514 | + 'validator_list_error_invalid_range' => 'Alle Werte des Parameters $1 müssen zwischen „$2“ und „$3“ liegen.', |
| 515 | + 'validator-list-error-invalid-regex' => 'Alle Werte des Parameters $1 müssen diesem regulären Ausdruck entsprechen: $2.', |
| 516 | + 'validator_list_error_invalid_argument' => 'Einer oder mehrere Werte für Parameter $1 sind ungültig.', |
| 517 | + 'validator-list-error-accepts-only' => 'Einer oder mehrere Werte für Parameter $1 sind ungültig. |
| 518 | +Nur {{PLURAL:$3|der folgende Wert wird|die folgenden Werte werden}} akzeptiert: $2.', |
| 519 | + 'validator-list-error-accepts-only-omitted' => 'Einer oder mehrere Werte für Parameter $1 sind ungültig. |
| 520 | +Nur {{PLURAL:$3|der folgende Wert wird|die folgenden Werte werden}} akzeptiert: $2 (sowie $4 ausgelassene {{PLURAL:$4|Wert|Werte}}).', |
| 521 | + 'validator_error_accepts_only' => 'Der Wert „$4“ ist nicht gültig für Parameter $1. |
| 522 | +Nur {{PLURAL:$3|der folgende Wert wird|die folgenden Werte werden}} akzeptiert: $2.', |
| 523 | + 'validator-error-accepts-only-omitted' => 'Der Wert „$2“ ist nicht gültig für Parameter $1. |
| 524 | +Nur {{PLURAL:$5|der folgende Wert wird|die folgenden Werte werden}} akzeptiert: $3 (sowie $4 ausgelassene {{PLURAL:$4|Wert|Werte}}).', |
| 525 | + 'validator_list_omitted' => '{{PLURAL:$2|Der Wert „$1“ wurde|Die Werte „$1“ wurden}} ausgelassen.', |
| 526 | +); |
| 527 | + |
| 528 | +/** Lower Sorbian (Dolnoserbski) |
| 529 | + * @author Michawiki |
| 530 | + */ |
| 531 | +$messages['dsb'] = array( |
| 532 | + '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', |
| 533 | + 'validator-warning' => 'Warnowanje: $1', |
| 534 | + 'validator-error' => 'Zmólka: $1', |
| 535 | + 'validator-fatal-error' => 'Rozwažna zmólka: $1', |
| 536 | + '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:', |
| 537 | + 'validator_warning_parameters' => '{{PLURAL:$1|Jo zmólka|Stej zmólce|Su zmólki|Su zmólki}} w twójej syntaksy.', |
| 538 | + 'validator-error-problem' => 'Jo był problem z parametrom $1.', |
| 539 | + 'validator_error_unknown_argument' => '$1 njejo płaśiwy parameter.', |
| 540 | + 'validator_error_required_missing' => 'Trěbny parameter $1 njejo pódany.', |
| 541 | + 'validator-type-string' => 'tekst', |
| 542 | + 'validator-type-number' => 'licba', |
| 543 | + 'validator-type-integer' => 'ceła licba', |
| 544 | + 'validator-type-float' => 'licba', |
| 545 | + 'validator-type-boolean' => 'jo/ně', |
| 546 | + 'validator-type-char' => 'znamuško', |
| 547 | + 'validator-listerrors-errors' => 'Zmólki', |
| 548 | + 'validator-listerrors-minor' => 'Snadna', |
| 549 | + 'validator-listerrors-low' => 'Niska', |
| 550 | + 'validator-listerrors-normal' => 'Normalna', |
| 551 | + 'validator-listerrors-high' => 'Wusoka', |
| 552 | + 'validator-listerrors-fatal' => 'Rozwažna', |
| 553 | + 'validator-describe-descriptionmsg' => "'''wopisanje''': $1", |
| 554 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Alias|Aliasa|Aliase|Aliase}}''': $1", |
| 555 | + 'validator-describe-listtype' => 'Lisćina $1 {{PLURAL:$1|elementa|elementowu|elementow|elementow}}', |
| 556 | + 'validator-describe-empty' => 'prozny', |
| 557 | + 'validator-describe-required' => 'trěbny', |
| 558 | + 'validator-describe-header-parameter' => 'Parameter', |
| 559 | + 'validator-describe-header-aliases' => 'Aliase', |
| 560 | + 'validator-describe-header-type' => 'Typ', |
| 561 | + 'validator-describe-header-default' => 'Standard', |
| 562 | + 'validator-describe-header-description' => 'Wopisanje', |
| 563 | + 'validator-describe-parameters' => 'Parametry', |
| 564 | + 'validator-describe-syntax' => 'Syntaksa', |
| 565 | + 'validator_error_empty_argument' => 'Parameter $1 njamóžo proznu gódnotu měś.', |
| 566 | + 'validator_error_must_be_number' => 'Parameter $1 móžo jano licba byś.', |
| 567 | + 'validator_error_must_be_integer' => 'Parameter $1 móžo jano ceła licba byś.', |
| 568 | + 'validator_error_invalid_range' => 'Parameter $1 musy mjazy $2 a $3 byś.', |
| 569 | + 'validator_error_invalid_argument' => 'Gódnota $1 njejo płaśiwa za parameter $2.', |
| 570 | + 'validator_list_error_empty_argument' => 'Parameter $1 njeakceptěrujo prozne gódnoty.', |
| 571 | + 'validator_list_error_must_be_number' => 'Parameter $1 móžo jano licby wopśimjeś.', |
| 572 | + 'validator_list_error_must_be_integer' => 'Parameter $1 móžo jano cełe licby wopśimjeś.', |
| 573 | + 'validator_list_error_invalid_range' => 'Wšykne gódnoty parametra $1 muse mjazy $2 a $3 byś.', |
| 574 | + 'validator_list_error_invalid_argument' => 'Jadna gódnota abo wěcej gódnotow za parameter $1 su njepłaśiwe.', |
| 575 | + '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.', |
| 576 | + '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}}.', |
| 577 | +); |
| 578 | + |
| 579 | +/** Greek (Ελληνικά) |
| 580 | + * @author Dada |
| 581 | + * @author Lou |
| 582 | + * @author ZaDiak |
| 583 | + * @author Απεργός |
| 584 | + */ |
| 585 | +$messages['el'] = array( |
| 586 | + 'validator_error_unknown_argument' => '$1 δεν είναι μια έγκυρη παράμετρος.', |
| 587 | + 'validator_error_required_missing' => 'Λείπει η απαιτούμενη παράμετρος $1.', |
| 588 | + 'validator_error_must_be_number' => 'Η παράμετρος $1 μπορεί να είναι μόνο αριθμός.', |
| 589 | + 'validator_error_must_be_integer' => 'Η παράμετρος $1 μπορεί να είναι μόνο ακέραιος αριθμός.', |
| 590 | + 'validator_list_error_must_be_number' => 'Η παράμετρος $1 μπορεί να περιέχει μόνο αριθμούς.', |
| 591 | + 'validator_list_error_must_be_integer' => 'Η παράμετρος $1 μπορεί να περιέχει μόνο ακέραιους αριθμούς.', |
| 592 | + 'validator_list_error_invalid_range' => 'Όλες οι τιμές της παραμέτρου $1 πρέπει να είναι μεταξύ $2 και $3.', |
| 593 | +); |
| 594 | + |
| 595 | +/** Esperanto (Esperanto) |
| 596 | + * @author Yekrats |
| 597 | + */ |
| 598 | +$messages['eo'] = array( |
| 599 | + 'validator_error_unknown_argument' => '$1 ne estas valida parametro.', |
| 600 | + 'validator_error_required_missing' => 'La nepra parametro $1 mankas.', |
| 601 | + 'validator_error_empty_argument' => 'Parametro $1 ne povas esti nula valoro.', |
| 602 | + 'validator_error_must_be_number' => 'Parametro $1 nur povas esti numero.', |
| 603 | + 'validator_error_must_be_integer' => 'Parametro $1 nur povas esti entjero.', |
| 604 | + 'validator_error_invalid_range' => 'Parametro $1 estu inter $2 kaj $3.', |
| 605 | + 'validator_list_error_invalid_argument' => 'Unu aŭ pliaj valoroj por parametro $1 estas malvalida.', |
| 606 | +); |
| 607 | + |
| 608 | +/** Spanish (Español) |
| 609 | + * @author Crazymadlover |
| 610 | + * @author Imre |
| 611 | + * @author Translationista |
| 612 | + */ |
| 613 | +$messages['es'] = array( |
| 614 | + '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', |
| 615 | + 'validator-warning' => 'Advertencia: $1', |
| 616 | + 'validator-error' => 'Error: $1', |
| 617 | + 'validator-fatal-error' => 'Error fatal: $1', |
| 618 | + 'validator_error_parameters' => 'Se detectó {{PLURAL:$1|el siguiente error|los siguientes errores}} en la sintaxis empleada:', |
| 619 | + 'validator_warning_parameters' => 'Hay {{PLURAL:$1|un error|errores}} en tu sintaxis.', |
| 620 | + 'validator-warning-adittional-errors' => '...y {{PLURAL:$1|otro problema|muchos otros problemas}}.', |
| 621 | + 'validator-error-omitted' => '{{PLURAL:$2|el valor "$1" ha sido omitido|los valores "$1" han sido omitidos}}.', |
| 622 | + 'validator-error-problem' => 'Ha habido un problema con el parámetro $1.', |
| 623 | + 'validator_error_unknown_argument' => '$1 no es un parámetro válido.', |
| 624 | + 'validator_error_required_missing' => 'No se ha provisto el parámetro requerido $1.', |
| 625 | + 'validator-error-override-argument' => 'Se ha intentado sobreescribir el parámetro $1 (valor: $2) con el valor "$3"', |
| 626 | + 'validator-listerrors-errors' => 'Errores', |
| 627 | + 'validator-listerrors-minor' => 'Menor', |
| 628 | + 'validator-listerrors-low' => 'Bajo', |
| 629 | + 'validator-listerrors-normal' => 'Normal', |
| 630 | + 'validator-listerrors-high' => 'Alto', |
| 631 | + 'validator-listerrors-fatal' => 'Fatal', |
| 632 | + 'validator_error_empty_argument' => 'El parámetro $1 no puede tener un valor vacío.', |
| 633 | + 'validator_error_must_be_number' => 'El parámetro $1 sólo puede ser un número.', |
| 634 | + 'validator_error_must_be_integer' => 'El parámetro $1 sólo puede ser un número entero.', |
| 635 | + 'validator-error-must-be-float' => 'El parámetro $1 tiene que ser un número de punto flotante.', |
| 636 | + 'validator_error_invalid_range' => 'El parámetro $1 debe ser entre $2 y $3.', |
| 637 | + 'validator-error-invalid-regex' => 'El parámetro $1 tiene que coincidir con esta expresión racional : $2.', |
| 638 | + 'validator-error-invalid-length' => 'El parámetro $1 tiene que tener una longitud de $2.', |
| 639 | + 'validator-error-invalid-length-range' => 'El parámetro $1 tiene que tener una longitud comprendida entre $2 y $3.', |
| 640 | + 'validator_error_invalid_argument' => 'El valor $1 no es válido para el parámetro $2.', |
| 641 | + 'validator_list_error_empty_argument' => 'El parámetro $1 no acepta valores vacíos.', |
| 642 | + 'validator_list_error_must_be_number' => 'El parámetro $1 sólo puede contener números.', |
| 643 | + 'validator_list_error_must_be_integer' => 'El parámetro $1 sólo puede contener números enteros.', |
| 644 | + 'validator-list-error-must-be-float' => 'El parámetro $1 sólo puede contener floats.', |
| 645 | + 'validator_list_error_invalid_range' => 'Todos los valores del parámetro $1 deben ser entre $2 y $3.', |
| 646 | + 'validator-list-error-invalid-regex' => 'El parámetro $1 tiene que coincidir con esta expresión regular: $2.', |
| 647 | + 'validator_list_error_invalid_argument' => 'Uno o más valores del parámetros $1 son inválidos.', |
| 648 | + 'validator-list-error-accepts-only' => 'Uno o más valores para el parámetro $1 son inválidos. |
| 649 | +Sólo acepta{{PLURAL:$3|este valor| estos valores}}: $2.', |
| 650 | + 'validator-list-error-accepts-only-omitted' => 'Uno o más valores para el parámetro $1 son inválidos. |
| 651 | +Sólo acepta {{PLURAL:$3|este valor|estos valores}}: $2 (y $4 {{PLURAL:$4|valor omitido|valores omitidos}}).', |
| 652 | + '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.', |
| 653 | + 'validator-error-accepts-only-omitted' => 'El valor $2 no es válido para el parámetro $1. |
| 654 | +Sólo acepta {{PLURAL:$5|este valor|estos valores}}: $3 (y $4 {{PLURAL:$4|valor omitido|valores omitidos}}).', |
| 655 | + 'validator_list_omitted' => '{{PLURAL:$2|El valor|Los valores}} $1 {{PLURAL:$2|ha sido omitido|han sido omitidos}}.', |
| 656 | +); |
| 657 | + |
| 658 | +/** Finnish (Suomi) |
| 659 | + * @author Crt |
| 660 | + * @author Silvonen |
| 661 | + * @author Str4nd |
| 662 | + */ |
| 663 | +$messages['fi'] = array( |
| 664 | + 'validator-desc' => 'Tarkastaja tarjoaa helpon tavan muille laajennuksille jäsenninfunktioiden ja tagilaajennusten parametrien tarkastukseen, oletusarvojen asettamiseen ja virheilmoitusten luomiseen.', |
| 665 | + 'validator_error_must_be_number' => 'Parametrin $1 on oltava luku.', |
| 666 | + 'validator_error_must_be_integer' => 'Parametrin $1 on oltava kokonaisluku.', |
| 667 | +); |
| 668 | + |
| 669 | +/** French (Français) |
| 670 | + * @author Cedric31 |
| 671 | + * @author Crochet.david |
| 672 | + * @author IAlex |
| 673 | + * @author Jean-Frédéric |
| 674 | + * @author McDutchie |
| 675 | + * @author Peter17 |
| 676 | + * @author PieRRoMaN |
| 677 | + * @author Sherbrooke |
| 678 | + * @author Urhixidur |
| 679 | + * @author Verdy p |
| 680 | + */ |
| 681 | +$messages['fr'] = array( |
| 682 | + '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', |
| 683 | + 'validator-warning' => 'Attention : $1', |
| 684 | + 'validator-error' => 'Erreur : $1', |
| 685 | + 'validator-fatal-error' => 'Erreur fatale : $1', |
| 686 | + 'validator_error_parameters' => '{{PLURAL:$1|L’erreur suivante a été détectée|Les erreurs suivantes ont été détectées}} dans votre syntaxe :', |
| 687 | + 'validator_warning_parameters' => 'Il y a {{PLURAL:$1|une erreur|des erreurs}} dans votre syntaxe.', |
| 688 | + 'validator-warning-adittional-errors' => '... et {{PLURAL:$1|un problème supplémentaire|plusieurs autres problèmes}}.', |
| 689 | + 'validator-error-omitted' => '{{PLURAL:$2|La valeur « $1 » a été oubliée|Les valeurs « $1 » ont été oubliées}}.', |
| 690 | + 'validator-error-problem' => 'Il y a un problème avec le paramètre $1.', |
| 691 | + 'validator_error_unknown_argument' => '$1 n’est pas un paramètre valide.', |
| 692 | + 'validator_error_required_missing' => 'Le paramètre requis $1 n’est pas fourni.', |
| 693 | + 'validator-error-override-argument' => 'Le logiciel a essayé de remplacer le paramètre $1 (valeur : $2) avec la valeur « $3 »', |
| 694 | + 'validator-type-string' => 'texte', |
| 695 | + 'validator-type-number' => 'nombre', |
| 696 | + 'validator-type-integer' => 'nombre entier', |
| 697 | + 'validator-type-float' => 'nombre', |
| 698 | + 'validator-type-boolean' => 'oui/non', |
| 699 | + 'validator-type-char' => 'caractère', |
| 700 | + 'validator-listerrors-errors' => 'Erreurs', |
| 701 | + 'validator-listerrors-minor' => 'Mineur', |
| 702 | + 'validator-listerrors-low' => 'Faible', |
| 703 | + 'validator-listerrors-normal' => 'Normal', |
| 704 | + 'validator-listerrors-high' => 'Élevé', |
| 705 | + 'validator-listerrors-fatal' => 'Fatal', |
| 706 | + 'validator-listerrors-description' => "Liste les erreurs (et les avertissements) qui se sont produits dans les ''hooks'' de l'analyseur syntaxique ''via'' ''Validator''. |
| 707 | +Seules les listes pour les ''hooks'' de l'analyseur syntaxique (ajoutées où apparaît <code>listerrors</code>) sont insérées ; |
| 708 | +placer <code>listerrors</code> au plus bas de la page pour obtenir toutes les erreurs.", |
| 709 | + 'validator-listerrors-par-minseverity' => "La sévérité minimale d'une erreur pour être listée.", |
| 710 | + 'validator-describe-description' => "Génère la documentation pour un ou plusieurs ''hooks'' de l'analyseur syntaxique ''via'' ''Validator'.", |
| 711 | + 'validator-describe-notfound' => "Il n'y a pas de ''hook'' qui gère « $1 ».", |
| 712 | + 'validator-describe-descriptionmsg' => "'''Description''': $1", |
| 713 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Alias|Alias}}''': $1", |
| 714 | + 'validator-describe-parserfunction' => "Mis en oeuvre uniquement comme fonction de l'analyseur syntaxique.", |
| 715 | + 'validator-describe-tagextension' => "Mis en œuvre seulement comme balise d'extension.", |
| 716 | + 'validator-describe-bothhooks' => "Mis en oeuvre comme fonction de l'analyseur syntaxique et comme balise d'extension.", |
| 717 | + 'validator-describe-par-hooks' => "Les ''hooks'' de l'analyseur syntaxique dont il faut afficher la documentation.", |
| 718 | + 'validator-describe-par-pre' => "Permet d'obtenir le wikitexte de la documentation, sans qu'il soit rendu sur la page.", |
| 719 | + 'validator-describe-listtype' => 'Liste de $1 éléments', |
| 720 | + 'validator-describe-empty' => 'vide', |
| 721 | + 'validator-describe-required' => 'requis', |
| 722 | + 'validator-describe-header-parameter' => 'Paramètre', |
| 723 | + 'validator-describe-header-aliases' => 'Alias', |
| 724 | + 'validator-describe-header-type' => 'Type', |
| 725 | + 'validator-describe-header-default' => 'Défaut', |
| 726 | + 'validator-describe-header-description' => 'Description', |
| 727 | + 'validator-describe-parameters' => 'Paramètres', |
| 728 | + 'validator-describe-syntax' => 'Syntaxe', |
| 729 | + 'validator-describe-tagmin' => "Balise d'extension avec seulement les paramètres requis.", |
| 730 | + 'validator-describe-tagmax' => "Balise d'extension avec tous les paramètres.", |
| 731 | + 'validator-describe-tagdefault' => "Balise d'extension avec tous les paramètres en utilisant la notation par défaut des paramètres.", |
| 732 | + 'validator-describe-pfmin' => "Fonction de l'analyseur syntaxique avec seulement les paramètres requis.", |
| 733 | + 'validator-describe-pfmax' => "Fonction de l'analyseur syntaxique avec tous les paramètres.", |
| 734 | + 'validator-describe-pfdefault' => "Fonction de l'analyseur syntaxique avec tous les paramètres en utilisant la notation par défaut des paramètres.", |
| 735 | + 'validator-describe-autogen' => "Le contenu de cette section a été généré automatiquement par le ''hook'' ''Describe'' de l'extension ''Validator''.", |
| 736 | + 'validator_error_empty_argument' => 'Le paramètre $1 ne peut pas avoir une valeur vide.', |
| 737 | + 'validator_error_must_be_number' => 'Le paramètre $1 peut être uniquement un nombre.', |
| 738 | + 'validator_error_must_be_integer' => 'Le paramètre $1 peut seulement être un entier.', |
| 739 | + 'validator-error-must-be-float' => 'Le paramètre $1 doit être un nombre à virgule flottante.', |
| 740 | + 'validator_error_invalid_range' => 'Le paramètre $1 doit être entre $2 et $3.', |
| 741 | + 'validator-error-invalid-regex' => 'Le paramètre $1 doit vérifier cette expression rationnelle : « $2 ».', |
| 742 | + 'validator-error-invalid-length' => 'Le paramètre $1 doit avoir une longueur de $2.', |
| 743 | + 'validator-error-invalid-length-range' => 'Le paramètre $1 doit avoir une longueur comprise entre $2 et $3.', |
| 744 | + 'validator_error_invalid_argument' => 'La valeur $1 n’est pas valide pour le paramètre $2.', |
| 745 | + 'validator_list_error_empty_argument' => 'Le paramètre $1 n’accepte pas les valeurs vides.', |
| 746 | + 'validator_list_error_must_be_number' => 'Le paramètre $1 ne peut contenir que des nombres.', |
| 747 | + 'validator_list_error_must_be_integer' => 'Le paramètre $1 ne peut contenir que des entiers.', |
| 748 | + 'validator-list-error-must-be-float' => 'Le paramètre $1 ne peut contenir que des nombres à virgule.', |
| 749 | + 'validator_list_error_invalid_range' => 'Toutes les valeurs du paramètre $1 doivent être comprises entre $2 et $3.', |
| 750 | + 'validator-list-error-invalid-regex' => 'Toutes les valeurs du paramètre $1 doivent vérifier cette expression rationnelle : « $2 ».', |
| 751 | + 'validator_list_error_invalid_argument' => 'Une ou plusieurs valeurs du paramètre $1 sont invalides.', |
| 752 | + 'validator-list-error-accepts-only' => 'Une ou plusieurs valeur(s) du paramètre $1 est(sont) invalide(s). |
| 753 | +Il n’accepte que {{PLURAL:$3|cette valeur|ces valeurs}} : $2.', |
| 754 | + 'validator-list-error-accepts-only-omitted' => 'Une ou plusieurs valeur(s) du paramètre $1 est(sont) invalide(s). |
| 755 | +Celui-ci n’accepte que {{PLURAL:$3|cette valeur|ces valeurs}} : $2 (et $4 {{PLURAL:$4|valeur omise|valeurs omises}}).', |
| 756 | + '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.", |
| 757 | + 'validator-error-accepts-only-omitted' => 'La valeur « $2 » n’est pas valable pour le paramètre $1. |
| 758 | +Celui-ci n’accepte que {{PLURAL:$5|cette valeur|ces valeurs}} : $3 (et $4 {{PLURAL:$4|valeur omise|valeurs omises}}).', |
| 759 | + 'validator_list_omitted' => '{{PLURAL:$2|La valeur|Les valeurs}} $1 {{PLURAL:$2|a été oubliée|ont été oubliées}}.', |
| 760 | +); |
| 761 | + |
| 762 | +/** Franco-Provençal (Arpetan) |
| 763 | + * @author ChrisPtDe |
| 764 | + */ |
| 765 | +$messages['frp'] = array( |
| 766 | + 'validator-warning' => 'Avèrtissement : $1', |
| 767 | + 'validator-error' => 'Èrror : $1', |
| 768 | + 'validator-fatal-error' => 'Èrror fatala : $1', |
| 769 | + 'validator_error_parameters' => '{{PLURAL:$1|Ceta èrror at étâ dècelâ|Cetes èrrors ont étâ dècelâs}} dens voutra sintaxa :', |
| 770 | + 'validator_warning_parameters' => 'Y at {{PLURAL:$1|una èrror|des èrrors}} dens voutra sintaxa.', |
| 771 | + 'validator-warning-adittional-errors' => '... et un {{PLURAL:$1|problèmo de ples|mouél d’ôtros problèmos}}.', |
| 772 | + 'validator-error-omitted' => '{{PLURAL:$2|La valor « $1 » at étâ oubliâ|Les valors « $1 » ont étâ oubliâs}}.', |
| 773 | + 'validator-error-problem' => 'Y at un problèmo avouéc lo paramètre $1.', |
| 774 | + 'validator_error_unknown_argument' => '$1 est pas un paramètre valido.', |
| 775 | + 'validator_error_required_missing' => 'Lo paramètre nècèssèro $1 est pas balyê.', |
| 776 | + 'validator-error-override-argument' => 'La programeria at tâchiê de remplaciér lo paramètre $1 (valor : $2) avouéc la valor « $3 »', |
| 777 | + 'validator-type-string' => 'tèxto', |
| 778 | + 'validator-type-number' => 'nombro', |
| 779 | + 'validator-type-integer' => 'nombro entiér', |
| 780 | + 'validator-type-float' => 'nombro', |
| 781 | + 'validator-type-boolean' => 'ouè/nan', |
| 782 | + 'validator-type-char' => 'caractèro', |
| 783 | + 'validator-listerrors-errors' => 'Èrrors', |
| 784 | + 'validator-listerrors-minor' => 'Petiôt', |
| 785 | + 'validator-listerrors-low' => 'Fêblo', |
| 786 | + 'validator-listerrors-normal' => 'Normal', |
| 787 | + 'validator-listerrors-high' => 'Hôt', |
| 788 | + 'validator-listerrors-fatal' => 'Fatal', |
| 789 | + 'validator-describe-descriptionmsg' => "'''Dèscripcion :''' $1", |
| 790 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Nom paralèlo|Noms paralèlos}} :''' $1", |
| 791 | + 'validator-describe-listtype' => 'Lista de $1 èlèments', |
| 792 | + 'validator-describe-empty' => 'vouedo', |
| 793 | + 'validator-describe-required' => 'nècèssèro', |
| 794 | + 'validator-describe-header-parameter' => 'Paramètre', |
| 795 | + 'validator-describe-header-aliases' => 'Noms paralèlos', |
| 796 | + 'validator-describe-header-type' => 'Tipo', |
| 797 | + 'validator-describe-header-default' => 'Per dèfôt', |
| 798 | + 'validator-describe-header-description' => 'Dèscripcion', |
| 799 | + 'validator-describe-parameters' => 'Paramètres', |
| 800 | + 'validator-describe-syntax' => 'Sintaxa', |
| 801 | + 'validator_error_empty_argument' => 'Lo paramètre $1 pôt pas avêr una valor voueda.', |
| 802 | + 'validator_error_must_be_number' => 'Lo paramètre $1 pôt étre ren qu’un nombro.', |
| 803 | + 'validator_error_must_be_integer' => 'Lo paramètre $1 pôt étre ren qu’un entiér.', |
| 804 | + 'validator_error_invalid_range' => 'Lo paramètre $1 dêt étre entre-mié $2 et $3.', |
| 805 | + 'validator_error_invalid_argument' => 'La valor $1 est pas valida por lo paramètre $2.', |
| 806 | + 'validator_list_error_empty_argument' => 'Lo paramètre $1 accèpte pas les valors vouedes.', |
| 807 | + 'validator_list_error_must_be_number' => 'Lo paramètre $1 pôt contegnir ren que des nombros.', |
| 808 | + 'validator_list_error_must_be_integer' => 'Lo paramètre $1 pôt contegnir ren que des entiérs.', |
| 809 | + 'validator_list_error_invalid_range' => 'Totes les valors du paramètre $1 dêvont étre entre-mié $2 et $3.', |
| 810 | + 'validator_list_error_invalid_argument' => 'Yona ou ben un mouél de valors du paramètre $1 sont envalides.', |
| 811 | + '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.', |
| 812 | + 'validator_list_omitted' => '{{PLURAL:$2|La valor|Les valors}} $1 {{PLURAL:$2|at étâ oubliâ|ont étâ oubliâs}}.', |
| 813 | +); |
| 814 | + |
| 815 | +/** Galician (Galego) |
| 816 | + * @author Toliño |
| 817 | + */ |
| 818 | +$messages['gl'] = array( |
| 819 | + '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', |
| 820 | + 'validator-warning' => 'Atención: $1', |
| 821 | + 'validator-error' => 'Erro: $1', |
| 822 | + 'validator-fatal-error' => 'Erro fatal: $1', |
| 823 | + 'validator_error_parameters' => '{{PLURAL:$1|Detectouse o seguinte erro|Detectáronse os seguintes erros}} na sintaxe empregada:', |
| 824 | + 'validator_warning_parameters' => 'Hai {{PLURAL:$1|un erro|erros}} na súa sintaxe.', |
| 825 | + 'validator-warning-adittional-errors' => '... e {{PLURAL:$1|un problema máis|moitos máis problemas}}.', |
| 826 | + 'validator-error-omitted' => '{{PLURAL:$2|Omitiuse o valor "$1"|Omitíronse os valores "$1"}}.', |
| 827 | + 'validator-error-problem' => 'Houbo un problema co parámetro $1.', |
| 828 | + 'validator_error_unknown_argument' => '"$1" non é un parámetro válido.', |
| 829 | + 'validator_error_required_missing' => 'Non se proporcionou o parámetro $1 necesario.', |
| 830 | + 'validator-error-override-argument' => 'Intentouse sobrescribir o parámetro $1 (valor: $2) co valor "$3"', |
| 831 | + 'validator-type-string' => 'texto', |
| 832 | + 'validator-type-number' => 'número', |
| 833 | + 'validator-type-integer' => 'número completo', |
| 834 | + 'validator-type-float' => 'número', |
| 835 | + 'validator-type-boolean' => 'si/non', |
| 836 | + 'validator-type-char' => 'carácter', |
| 837 | + 'validator-listerrors-errors' => 'Erros', |
| 838 | + 'validator-listerrors-minor' => 'Menor', |
| 839 | + 'validator-listerrors-low' => 'Baixo', |
| 840 | + 'validator-listerrors-normal' => 'Normal', |
| 841 | + 'validator-listerrors-high' => 'Alto', |
| 842 | + 'validator-listerrors-fatal' => 'Fatal', |
| 843 | + 'validator-listerrors-description' => 'Lista os erros (e avisos) que ocorreron no asociador do analizador engadidos a través do Validator. |
| 844 | +Só aparecerán nas listas para os asociadores do analizador que estean colocados enriba de listerrors; |
| 845 | +coloque listerrors na parte inferior da páxina para obter todos os erros.', |
| 846 | + 'validator-listerrors-par-minseverity' => 'A severidade mínima dun problema para que apareza na lista.', |
| 847 | + 'validator-describe-description' => 'Xera a documentación para un ou máis asociadores do analizador definidos a través do Validator.', |
| 848 | + 'validator-describe-notfound' => 'Non hai ningún asociador do analizador que manexe "$1".', |
| 849 | + 'validator-describe-descriptionmsg' => "'''Descrición:''' $1", |
| 850 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Alcume|Alcumes}}:''' $1", |
| 851 | + 'validator-describe-parserfunction' => 'Implementado só como función analítica.', |
| 852 | + 'validator-describe-tagextension' => 'Implementado só como etiqueta de extensión.', |
| 853 | + 'validator-describe-bothhooks' => 'Implementado como función analítica e como etiqueta de extensión.', |
| 854 | + 'validator-describe-par-hooks' => 'O analizador de asociadores para o que mostrar a documentación.', |
| 855 | + 'validator-describe-par-pre' => 'Permite obter o texto wiki para a documentación, sen que sexa renderizado na páxina.', |
| 856 | + 'validator-describe-listtype' => 'Lista de $1 elementos', |
| 857 | + 'validator-describe-empty' => 'baleiro', |
| 858 | + 'validator-describe-required' => 'obrigatorio', |
| 859 | + 'validator-describe-header-parameter' => 'Parámetro', |
| 860 | + 'validator-describe-header-aliases' => 'Pseudónimos', |
| 861 | + 'validator-describe-header-type' => 'Tipo', |
| 862 | + 'validator-describe-header-default' => 'Por defecto', |
| 863 | + 'validator-describe-header-description' => 'Descrición', |
| 864 | + 'validator-describe-parameters' => 'Parámetros', |
| 865 | + 'validator-describe-syntax' => 'Sintaxe', |
| 866 | + 'validator-describe-tagmin' => 'Etiqueta de extensión cos únicos parámetros obrigatorios.', |
| 867 | + 'validator-describe-tagmax' => 'Etiqueta de extensión con todos os parámetros.', |
| 868 | + 'validator-describe-tagdefault' => 'Etiqueta de extensión con todos os parámetros, empregando a notación por defecto dos parámetros.', |
| 869 | + 'validator-describe-pfmin' => 'Función analítica cos únicos parámetros obrigatorios.', |
| 870 | + 'validator-describe-pfmax' => 'Función analítica con todos os parámetros.', |
| 871 | + 'validator-describe-pfdefault' => 'Función analítica con todos os parámetros, empregando a notación por defecto dos parámetros.', |
| 872 | + 'validator-describe-autogen' => 'O contido desta sección foi xerado automaticamente polo analizador do asociador "describir" da extensión Validator.', |
| 873 | + 'validator_error_empty_argument' => 'O parámetro $1 non pode ter un valor baleiro.', |
| 874 | + 'validator_error_must_be_number' => 'O parámetro $1 só pode ser un número.', |
| 875 | + 'validator_error_must_be_integer' => 'O parámetro $1 só pode ser un número enteiro.', |
| 876 | + 'validator-error-must-be-float' => 'O parámetro $1 só pode ser un número de coma flotante.', |
| 877 | + 'validator_error_invalid_range' => 'O parámetro $1 debe estar entre $2 e $3.', |
| 878 | + 'validator-error-invalid-regex' => 'O parámetro $1 debe coincidir con esta expresión regular: $2.', |
| 879 | + 'validator-error-invalid-length' => 'O parámetro $1 debe ter unha lonxitude de $2.', |
| 880 | + 'validator-error-invalid-length-range' => 'O parámetro $1 ter unha lonxitude de entre $2 e $3.', |
| 881 | + 'validator_error_invalid_argument' => 'O valor $1 non é válido para o parámetro $2.', |
| 882 | + 'validator_list_error_empty_argument' => 'O parámetro $1 non acepta valores en branco.', |
| 883 | + 'validator_list_error_must_be_number' => 'O parámetro $1 só pode conter números.', |
| 884 | + 'validator_list_error_must_be_integer' => 'O parámetro $1 só pode conter números enteiros.', |
| 885 | + 'validator-list-error-must-be-float' => 'O parámetro $1 só pode conter comas flotantes.', |
| 886 | + 'validator_list_error_invalid_range' => 'Todos os valores do parámetro $1 deben estar comprendidos entre $2 e $3.', |
| 887 | + 'validator-list-error-invalid-regex' => 'Todos os valores do parámetro $1 deben coincidir con esta expresión regular: $2.', |
| 888 | + 'validator_list_error_invalid_argument' => 'Un ou varios valores do parámetro $1 non son válidos.', |
| 889 | + 'validator-list-error-accepts-only' => 'Un ou varios valores do parámetro $1 non son válidos. |
| 890 | +Só acepta {{PLURAL:$3|este valor|estes valores}}: $2.', |
| 891 | + 'validator-list-error-accepts-only-omitted' => 'Un ou varios valores do parámetro $1 non son válidos. |
| 892 | +Só acepta {{PLURAL:$3|este valor|estes valores}}: $2 (e $4 {{PLURAL:$4|valor omitido|valores omitidos}}).', |
| 893 | + 'validator_error_accepts_only' => 'O valor "$4" non é válido para o parámetro "$1". Só acepta {{PLURAL:$3|este valor|estes valores}}: $2.', |
| 894 | + 'validator-error-accepts-only-omitted' => 'O valor "$2" non é válido para o parámetro $1. |
| 895 | +Só acepta {{PLURAL:$5|este valor|estes valores}}: $3 (e $4 {{PLURAL:$4|valor omitido|valores omitidos}}).', |
| 896 | + 'validator_list_omitted' => '{{PLURAL:$2|O valor|Os valores}} $1 {{PLURAL:$2|foi omitido|foron omitidos}}.', |
| 897 | +); |
| 898 | + |
| 899 | +/** Swiss German (Alemannisch) |
| 900 | + * @author Als-Holder |
| 901 | + */ |
| 902 | +$messages['gsw'] = array( |
| 903 | + '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', |
| 904 | + 'validator-warning' => 'Warnig: $1', |
| 905 | + 'validator-error' => 'Fähler: $1', |
| 906 | + 'validator-fatal-error' => 'Fähler, wu nit cha behobe wäre: $1', |
| 907 | + 'validator_error_parameters' => '{{PLURAL:$1|Dää Fähler isch|Die Fähler sin}} in Dyyre Syntax gfunde wore:', |
| 908 | + 'validator_warning_parameters' => 'S het {{PLURAL:$1|e Fähler|Fähler}} in dyyre Syntax.', |
| 909 | + 'validator-warning-adittional-errors' => '... un {{PLURAL:$1|e ander Probläm|$1 anderi Probläm}}.', |
| 910 | + 'validator-error-omitted' => '{{PLURAL:$2|Dr Wärt|D Wärt}} „$1“ {{PLURAL:$2|isch|sin}} uusgloo wore.', |
| 911 | + 'validator-error-problem' => 'S het e Probläm gee mit em Parameter $1.', |
| 912 | + 'validator_error_unknown_argument' => '$1 isch kei giltige Parameter.', |
| 913 | + 'validator_error_required_missing' => 'Dr Paramter $1, wu aagforderet woren isch, wird nit z Verfiegig gstellt.', |
| 914 | + 'validator-error-override-argument' => 'S isch versuecht wore, dr Parameter $1 (Wärt: $2) mit em Wärt „$3“ z iberschryybe', |
| 915 | + 'validator-type-string' => 'Täxt', |
| 916 | + 'validator-type-number' => 'Zahl', |
| 917 | + 'validator-type-integer' => 'Ganzzahl', |
| 918 | + 'validator-type-float' => 'Zahl', |
| 919 | + 'validator-type-boolean' => 'Jo/Nei', |
| 920 | + 'validator-type-char' => 'Zeiche', |
| 921 | + 'validator-listerrors-errors' => 'Fähler', |
| 922 | + 'validator-listerrors-minor' => 'Gring', |
| 923 | + 'validator-listerrors-low' => 'Chlei', |
| 924 | + 'validator-listerrors-normal' => 'Normal', |
| 925 | + 'validator-listerrors-high' => 'Groß', |
| 926 | + 'validator-listerrors-fatal' => 'Schwär', |
| 927 | + 'validator-listerrors-description' => 'Zeigt Fähler un Warnigen aa, wu ufträtte sin bi dr Parserhook, wu iber d Erwyterig Validator gnutzt wäre. |
| 928 | +Zeigt nume d Parserhook aa, wu iber em Elemänt „listerrors“ yygfiegt wore sin. |
| 929 | +„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.', |
| 930 | + 'validator-listerrors-par-minseverity' => 'Dr Mindeschtschwärigrad vun eme Probläm, ass es aazeigt wird.', |
| 931 | + 'validator-describe-description' => 'Generiert d Dokumentation fir ein oder mehreri Parserhook, wu mit dr Erwyterig Validator definiert wore sin.', |
| 932 | + 'validator-describe-notfound' => 'S git kei Parserhook, wu „$1“ verarbeitet.', |
| 933 | + 'validator-describe-descriptionmsg' => "'''Bschrybig:''' $1", |
| 934 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Alias|Aliasse}}:''' $1", |
| 935 | + 'validator-describe-parserfunction' => 'Numen as Parserfunktion implementiert.', |
| 936 | + 'validator-describe-tagextension' => 'Numen as Elementerweiteryg implementiert.', |
| 937 | + 'validator-describe-bothhooks' => 'As Parserfunktion un au as Elementerwyterig implementiert.', |
| 938 | + 'validator-describe-par-hooks' => 'D Parserhook, wu d Dokumentation derfir soll aazeigt wäre.', |
| 939 | + 'validator-describe-par-pre' => 'Macht d Uusgab vu dr Dokumentation in Wikitext megli ohni ass dää bi dr Darstellig vu dr Syte gnutzt wird.', |
| 940 | + 'validator-describe-listtype' => 'Lischt vu $1 {{PLURAL:$1|Element|Element}}', |
| 941 | + 'validator-describe-empty' => 'läär', |
| 942 | + 'validator-describe-required' => 'erforderlig', |
| 943 | + 'validator-describe-header-parameter' => 'Parameter', |
| 944 | + 'validator-describe-header-aliases' => 'Aliasse', |
| 945 | + 'validator-describe-header-type' => 'Typ', |
| 946 | + 'validator-describe-header-default' => 'Standard', |
| 947 | + 'validator-describe-header-description' => 'Bschrybig', |
| 948 | + 'validator-describe-parameters' => 'Parameter', |
| 949 | + 'validator-describe-syntax' => 'Syntax', |
| 950 | + 'validator-describe-tagmin' => 'Elementerwyterig, nume mit dr erforderlige Parameter.', |
| 951 | + 'validator-describe-tagmax' => 'Elementerwyterig mit allne Parameter.', |
| 952 | + 'validator-describe-tagdefault' => 'Elementerwyterig mit allne Parameter, wu d Standardnotation fir Parameter nutze.', |
| 953 | + 'validator-describe-pfmin' => 'Parserfunktion, nume mit dr erforderlige Parameter.', |
| 954 | + 'validator-describe-pfmax' => 'Parserfunktion mit allne Parameter.', |
| 955 | + 'validator-describe-pfdefault' => 'Parserfunktion mit allne Parameter, wu d Standardnotation fir Parameter nutze.', |
| 956 | + 'validator-describe-autogen' => 'Dr Inhalt vu däm Abschnitt isch automatisch dur dr Parserhook „describe“ vu dr Erwyterig Validator generiert wore.', |
| 957 | + 'validator_error_empty_argument' => 'Dr Parameter $1 cha kei lääre Wärt haa.', |
| 958 | + 'validator_error_must_be_number' => 'Dr Parameter $1 cha nume ne Zahl syy.', |
| 959 | + 'validator_error_must_be_integer' => 'Parameter $1 cha nume ne giltigi Zahl syy.', |
| 960 | + 'validator-error-must-be-float' => 'Parameter $1 cha nume ne Gleitkommazahl syy.', |
| 961 | + 'validator_error_invalid_range' => 'Dr Parameter $1 muess zwische $2 un $3 syy.', |
| 962 | + 'validator-error-invalid-regex' => 'Parameter $1 mueß däm reguläre Uusdruck entspräche: $2.', |
| 963 | + 'validator-error-invalid-length' => 'Parameter $1 mueß e Lengi haa vu $2.', |
| 964 | + 'validator-error-invalid-length-range' => 'Parameter $1 mueß e Lengi haa zwische $2 un $3.', |
| 965 | + 'validator_error_invalid_argument' => 'Dr Wärt $1 isch nit giltig fir dr Parameter $2.', |
| 966 | + 'validator_list_error_empty_argument' => 'Bim Parameter $1 sin keini lääre Wärt zuegloo.', |
| 967 | + 'validator_list_error_must_be_number' => 'Fir dr Parameter $1 si nume Zahle zuegloo.', |
| 968 | + 'validator_list_error_must_be_integer' => 'Fir dr Parameter $1 sin nume ganzi Zahle zuegloo.', |
| 969 | + 'validator-list-error-must-be-float' => 'Im Parameter $1 cha s nume Gleitkommazahle haa.', |
| 970 | + 'validator_list_error_invalid_range' => 'Alli Wärt fir dr Parameter $1 mien zwische $2 un $3 lige.', |
| 971 | + 'validator-list-error-invalid-regex' => 'Alli Wärt vum Parameter $1 mien däm reguläre Uusdruck entspräche: $2.', |
| 972 | + 'validator_list_error_invalid_argument' => 'Ein oder mehreri Wärt fir dr Parameter $1 sin nit giltig.', |
| 973 | + 'validator-list-error-accepts-only' => 'Ein oder meh Wärt fir dr Parameter $1 sin nit giltig. |
| 974 | +Nume {{PLURAL:$3|dää Wärt wird|die Wärt wäre}} akzeptiert: $2.', |
| 975 | + 'validator-list-error-accepts-only-omitted' => 'Ein oder meh Wärt fir dr Parameter $1 sin nit giltig. |
| 976 | +Nume {{PLURAL:$3|dää Wärt wird|die Wärt wäre}} akzeptiert: $2 (un $4 uusglosseni {{PLURAL:$4|Wärt|Wärt}}).', |
| 977 | + '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“.', |
| 978 | + 'validator-error-accepts-only-omitted' => 'Dr Wärt „$2“ isch nit giltig fir dr Parameter $1. |
| 979 | +Nume {{PLURAL:$5|dää Wärt wird|die Wärt wäre}} akzeptiert: $3 (un $4 uusglosseni {{PLURAL:$4|Wärt|Wärt}}).', |
| 980 | + 'validator_list_omitted' => '{{PLURAL:$2|Dr Wärt|D Wärt}} $1 {{PLURAL:$2|isch|sin}} uusgloo wore.', |
| 981 | +); |
| 982 | + |
| 983 | +/** Hebrew (עברית) |
| 984 | + * @author Amire80 |
| 985 | + * @author Rotemliss |
| 986 | + * @author YaronSh |
| 987 | + */ |
| 988 | +$messages['he'] = array( |
| 989 | + 'validator-desc' => 'כלים כלליים לטיפול בפרמטרים עבור הרחבות אחרות', |
| 990 | + 'validator-warning' => 'אזהרה: $1', |
| 991 | + 'validator-error' => 'שגיאה: $1', |
| 992 | + 'validator-fatal-error' => 'שגיאה חמורה: $1', |
| 993 | + 'validator_error_parameters' => '{{PLURAL:$1|השגיאה הבאה נמצאה|השגיאות הבאות נמצאו}} בתחביר:', |
| 994 | + 'validator_warning_parameters' => '{{PLURAL:$1|ישנה שגיאה|ישנן שגיאות}} בתחביר שלכם.', |
| 995 | + 'validator-warning-adittional-errors' => '... ועוד {{PLURAL:$1|בעיה אחת|מספר בעיות}}.', |
| 996 | + 'validator-error-omitted' => '{{PLURAL:$2|הערך|הערכים}} "$1" {{PLURAL:$2|הושמט|הושמטו}}.', |
| 997 | + 'validator-error-problem' => 'הייתה בעיה עם הפרמטר $1.', |
| 998 | + 'validator_error_unknown_argument' => '$1 אינו פרמטר תקני.', |
| 999 | + 'validator_error_required_missing' => 'הפרמטר הדרוש $1 לא צוין.', |
| 1000 | + 'validator-error-override-argument' => 'ניסיתי לעקוף את הפרמטר $1 (ערך: $2) ולהציב את הערך "$3"', |
| 1001 | + 'validator-type-string' => 'טקסט', |
| 1002 | + 'validator-type-number' => 'מספר', |
| 1003 | + 'validator-type-integer' => 'מספר שלם', |
| 1004 | + 'validator-type-float' => 'מספר', |
| 1005 | + 'validator-type-boolean' => 'כן או לא', |
| 1006 | + 'validator-type-char' => 'תו', |
| 1007 | + 'validator-listerrors-errors' => 'שגיאות', |
| 1008 | + 'validator-listerrors-minor' => 'משנית', |
| 1009 | + 'validator-listerrors-low' => 'נמוכה', |
| 1010 | + 'validator-listerrors-normal' => 'רגילה', |
| 1011 | + 'validator-listerrors-high' => 'גבוהה', |
| 1012 | + 'validator-listerrors-fatal' => 'חמורה', |
| 1013 | + 'validator-listerrors-description' => 'מכין רשימת של שגיאות ואזהרות שהתרחשו במילות הפעלה של מפענח שנוספו דרך Validator. |
| 1014 | +רק רשימות עבור מילות הפעלה של מפענח מעל listerrors; |
| 1015 | +יש לשים את listerrors בתחתית העמוד או קרוב אליה כדי לקבל את כל השגיאות.', |
| 1016 | + 'validator-listerrors-par-minseverity' => 'יש להזין את רמת החומרה המזערית.', |
| 1017 | + 'validator-describe-description' => 'מחולל תיעוד עבור מילות הפעלה במפענח שמוגדרות דרך Validator.', |
| 1018 | + 'validator-describe-notfound' => '"$1" אינו מטופל על־ידי שום מילת הפעלה במפענח.', |
| 1019 | + 'validator-describe-descriptionmsg' => "'''תיאור''': $1", |
| 1020 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|כינוי|כינויים}}''': $1", |
| 1021 | + 'validator-describe-parserfunction' => 'מיושם רק בתור פונקציית מפענח.', |
| 1022 | + 'validator-describe-tagextension' => 'מיושם רק בתור הרחבת תג.', |
| 1023 | + 'validator-describe-bothhooks' => 'מיושם הן בתור פונקציית מפענח והן בתור הרחבת תג.', |
| 1024 | + 'validator-describe-par-hooks' => 'מילות הפעלה של מפענח שעבורן יש להציג תיעוד.', |
| 1025 | + 'validator-describe-par-pre' => 'מאפשר לייצר את קוד הוויקי עבור התיעוד מבלי להציג אותו על הדף.', |
| 1026 | + 'validator-describe-listtype' => 'רשימה של פריטים מסוג "$1"', |
| 1027 | + 'validator-describe-empty' => 'ריק', |
| 1028 | + 'validator-describe-required' => 'נדרש', |
| 1029 | + 'validator-describe-header-parameter' => 'פרמטר', |
| 1030 | + 'validator-describe-header-aliases' => 'כינויים', |
| 1031 | + 'validator-describe-header-type' => 'סוג', |
| 1032 | + 'validator-describe-header-default' => 'בררת המחדל', |
| 1033 | + 'validator-describe-header-description' => 'תיאור', |
| 1034 | + 'validator-describe-parameters' => 'פרמטרים', |
| 1035 | + 'validator-describe-syntax' => 'תחביר', |
| 1036 | + 'validator-describe-tagmin' => 'הרחבת תג רק עם הפרמטרים הדרושים.', |
| 1037 | + 'validator-describe-tagmax' => 'הרחבת תג עם כל הפרמטרים.', |
| 1038 | + 'validator-describe-tagdefault' => 'הרחבת תג עם כל הפרמטרים עם ציון פרמטרים בבררת מחדל.', |
| 1039 | + 'validator-describe-pfmin' => 'פונקציית מפענח רק עם הפרמטרים הדרושים.', |
| 1040 | + 'validator-describe-pfmax' => 'פונקציית מפענח עם כל הפרמטרים.', |
| 1041 | + 'validator-describe-pfdefault' => 'פונקציית מפענח שבה כל הפרמטרים משתמשים בציון פרמטרים בבררת מחדל.', |
| 1042 | + 'validator-describe-autogen' => 'תוכן החלק הזה חולל באופן אוטומטי באמצעות מילת ההפעלה "descrbibe" של ההרחבה Validator.', |
| 1043 | + 'validator_error_empty_argument' => 'הפרמטר $1 לא יכול להיות ערך ריק.', |
| 1044 | + 'validator_error_must_be_number' => 'הפרמטר $1 יכול להיות מספר בלבד.', |
| 1045 | + 'validator_error_must_be_integer' => 'הפרמטר $1 יכול להיות מספר שלם בלבד.', |
| 1046 | + 'validator-error-must-be-float' => 'הפרמטר $1 יכול להיות רק מספר עם נקודה צפה.', |
| 1047 | + 'validator_error_invalid_range' => 'הפרמטר $1 חייב להיות בין $2 ל־$3.', |
| 1048 | + 'validator-error-invalid-regex' => 'פרמטר $1 חייב להתאים לביטוי הרגולרי הבא: $2.', |
| 1049 | + 'validator-error-invalid-length' => 'אורך פרמטר $1 חייב להיות $2.', |
| 1050 | + 'validator-error-invalid-length-range' => 'אורך פרמטר $1 חייב להיות בין $2 לבין $3.', |
| 1051 | + 'validator_error_invalid_argument' => 'הערך $1 אינו תקני עבור הפרמטר $2.', |
| 1052 | + 'validator_list_error_empty_argument' => 'פרמטר $1 אינו יכול להיות ריק.', |
| 1053 | + 'validator_list_error_must_be_number' => 'פרמטר $1 יכול להכיל רק מספרים.', |
| 1054 | + 'validator_list_error_must_be_integer' => 'פרמטר $1 יכול להכיל רק מספרים שלמים.', |
| 1055 | + 'validator-list-error-must-be-float' => 'פרמטר $1 יכול להכיל רק מספר עם נקודה צפה.', |
| 1056 | + 'validator_list_error_invalid_range' => 'כל הערכים של הפרמטר $1 צריכים להיות בין $2 לבין $3.', |
| 1057 | + 'validator-list-error-invalid-regex' => 'כל הערכים של הפרמטר $1 צריכים להתאים לביטוי הרגולרי הבא: $2.', |
| 1058 | + 'validator_list_error_invalid_argument' => 'ערך בלתי־חוקי אחד או יותר עבור הפרמטר $1.', |
| 1059 | + 'validator-list-error-accepts-only' => 'ערך בלתי־חוקי אחד או יותר עבור הפרמטר $1. הוא מקבל רק את {{PLURAL:$3|הערך הזה|הערכים האלה}}: $2.', |
| 1060 | + 'validator-list-error-accepts-only-omitted' => 'ערכים לא תקינים הוזנו לפרמטר "$1". הוא יכול לקבל רק את {{PLURAL:$3|הערך הבא|הערכים הבאים}}: $2 (וכן {{PLURAL:$4|ערך מושמט אחד|$4 ערכים מושמטים}}).', |
| 1061 | + 'validator_error_accepts_only' => 'הערך "$4" אינו תקין עבור הפרמטר $1. הוא מקבל רק את {{PLURAL:$3|הערך הבא|הערכים הבאים}}: $2.', |
| 1062 | + 'validator-error-accepts-only-omitted' => 'הערך "$2" אינו תקין עבור הפרמטר $1. הוא יכול לקבל רק את {{PLURAL:$5|הערך הבא|הערכים הבאים}}: $3 (וכן {{PLURAL:$4|ערך מושמט אחד|$4 ערכים מושמטים}}).', |
| 1063 | + 'validator_list_omitted' => '{{PLURAL:$2|הערך|הערכים}} $1 {{PLURAL:$2|הושמט|הושמטו}}.', |
| 1064 | +); |
| 1065 | + |
| 1066 | +/** Upper Sorbian (Hornjoserbsce) |
| 1067 | + * @author Michawiki |
| 1068 | + */ |
| 1069 | +$messages['hsb'] = array( |
| 1070 | + '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', |
| 1071 | + 'validator-warning' => 'Warnowanje: $1', |
| 1072 | + 'validator-error' => 'Zmylk: $1', |
| 1073 | + 'validator-fatal-error' => 'Chutny zmylk: $1', |
| 1074 | + '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}}:', |
| 1075 | + 'validator_warning_parameters' => '{{PLURAL:$1|Je zmylk|Stej zmylkaj|Su zmylki|Su zmylki}} w twojej syntaksy.', |
| 1076 | + 'validator-warning-adittional-errors' => '... a {{PLURAL:$1|dalši problem|dalšej problemaj|dalše problemy|dalše problemy}}.', |
| 1077 | + '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}}.', |
| 1078 | + 'validator-error-problem' => 'Bě problem z parametrom $1.', |
| 1079 | + 'validator_error_unknown_argument' => '$1 płaćiwy parameter njeje.', |
| 1080 | + 'validator_error_required_missing' => 'Trěbny parameter $1 njeje podaty.', |
| 1081 | + 'validator-error-override-argument' => 'Spyta so parameter $1 (hódnota: $2) přez "$3" přepisować', |
| 1082 | + 'validator-type-string' => 'tekst', |
| 1083 | + 'validator-type-number' => 'ličba', |
| 1084 | + 'validator-type-integer' => 'cyła ličba', |
| 1085 | + 'validator-type-float' => 'ličba', |
| 1086 | + 'validator-type-boolean' => 'haj/ně', |
| 1087 | + 'validator-type-char' => 'znamješko', |
| 1088 | + 'validator-listerrors-errors' => 'Zmylki', |
| 1089 | + 'validator-listerrors-minor' => 'Snadny', |
| 1090 | + 'validator-listerrors-low' => 'Niski', |
| 1091 | + 'validator-listerrors-normal' => 'Normalny', |
| 1092 | + 'validator-listerrors-high' => 'Wysoki', |
| 1093 | + 'validator-listerrors-fatal' => 'Chutny', |
| 1094 | + 'validator-listerrors-description' => 'Nalistuje zmylki (a warnowanja), kotrež su w parserowych hóčkach wustupili, kotrež su so přez Validator přidali. |
| 1095 | +Listuje jenož parserowe hóčki, kotrež bu wyše "listerror" zasunjene; |
| 1096 | +staj "listerrors" deleka na stronje abo blisko kónca strony, zo by wšě zmylki widźał.', |
| 1097 | + 'validator-listerrors-par-minseverity' => 'Minimalna ćežkosć problema, zo by so zwobraznił.', |
| 1098 | + 'validator-describe-description' => 'Płodźi dokumentaciju za jednu parserowu hóčku abo wjacore parserowe hóčki přez Validator.', |
| 1099 | + 'validator-describe-notfound' => 'Njeje parserowa hóčka, kotraž "$1" wobdźěłuje.', |
| 1100 | + 'validator-describe-descriptionmsg' => "'''Wopisanje''': $1", |
| 1101 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Alias|Aliasaj|Aliasy|Aliasow}}''': $1", |
| 1102 | + 'validator-describe-parserfunction' => 'Jenož jako parserowa funkcija implementowany.', |
| 1103 | + 'validator-describe-tagextension' => 'Jenož jako elementowe rozšěrjenje implementowany.', |
| 1104 | + 'validator-describe-bothhooks' => 'Jako parserowa funkcija kaž tež jako elementowe rozšěrjenje implementowany.', |
| 1105 | + 'validator-describe-par-hooks' => 'Parserowe hóčki, za kotrež ma so dokumentacija zwobraznić.', |
| 1106 | + 'validator-describe-par-pre' => 'Zmóžnja woprawdźity wikitekst za dokumentaciju wobstarać, bjez toho zo so na stronje rysował.', |
| 1107 | + 'validator-describe-listtype' => 'Lisćina $1 {{PLURAL:$1|elementa|elementow|elementow|elementow}}', |
| 1108 | + 'validator-describe-empty' => 'prózdny', |
| 1109 | + 'validator-describe-required' => 'trěbny', |
| 1110 | + 'validator-describe-header-parameter' => 'Parameter', |
| 1111 | + 'validator-describe-header-aliases' => 'Aliasy', |
| 1112 | + 'validator-describe-header-type' => 'Typ', |
| 1113 | + 'validator-describe-header-default' => 'Standard', |
| 1114 | + 'validator-describe-header-description' => 'Wopisanje', |
| 1115 | + 'validator-describe-parameters' => 'Parametry', |
| 1116 | + 'validator-describe-syntax' => 'Syntaksa', |
| 1117 | + 'validator-describe-tagmin' => 'Elementowe rozšěrjenje jenož z trěbnymi parametrami.', |
| 1118 | + 'validator-describe-tagmax' => 'Elementowe rozšěrjenje ze wšěmi parametrami.', |
| 1119 | + 'validator-describe-tagdefault' => 'Elementowe rozšěrjenje ze wšěmi parametrami, kotrež standardnu notaciju za parametry wužiwaja.', |
| 1120 | + 'validator-describe-pfmin' => 'Parserowa funkcija jenož z trěbnymi parametrami.', |
| 1121 | + 'validator-describe-pfmax' => 'Parserowa funkcija ze wšěmi parametrami.', |
| 1122 | + 'validator-describe-pfdefault' => 'Parserowa funkcija ze wšěmi parametrami, kotrež standardnu notaciju za parametry wužiwaja.', |
| 1123 | + 'validator-describe-autogen' => 'Wobsah tutoho wotrězka je so přez parserowu hóčku rozšěrjenja Validator awtomatisce spłodźił.', |
| 1124 | + 'validator_error_empty_argument' => 'Parameter $1 njemóže prózdnu hódnotu měć.', |
| 1125 | + 'validator_error_must_be_number' => 'Parameter $1 móže jenož ličba być.', |
| 1126 | + 'validator_error_must_be_integer' => 'Parameter $1 móže jenož cyła ličba być.', |
| 1127 | + 'validator-error-must-be-float' => 'Parameter $1 móže jenož ličba z pohibliwej komu być.', |
| 1128 | + 'validator_error_invalid_range' => 'Parameter $1 dyrbi mjez $2 a $3 być.', |
| 1129 | + 'validator-error-invalid-regex' => 'Parameter $1 dyrbi tutomu regularnemu wurazej wotpowědować: $2', |
| 1130 | + 'validator-error-invalid-length' => 'Parameter $1 dyrbi $2 dołhi być.', |
| 1131 | + 'validator-error-invalid-length-range' => 'Parameter $1 dyrbi mjez $2 a $3 dołhi być.', |
| 1132 | + 'validator_error_invalid_argument' => 'Hódnota $1 njeje płaćiwa za parameter $2.', |
| 1133 | + 'validator_list_error_empty_argument' => 'Parameter $1 njeakceptuje prózdne hódnoty.', |
| 1134 | + 'validator_list_error_must_be_number' => 'Parameter $1 móže jenož ličby wobsahować.', |
| 1135 | + 'validator_list_error_must_be_integer' => 'Parameter $1 móže jenož cyłe ličby wobsahować.', |
| 1136 | + 'validator-list-error-must-be-float' => 'Parameter $1 móže jenož ličby z pohibliwej komu wobsahować.', |
| 1137 | + 'validator_list_error_invalid_range' => 'Wšě hódnoty parametra $1 dyrbja mjez $2 a $3 być.', |
| 1138 | + 'validator-list-error-invalid-regex' => 'Wšě hódnoty parametra $1 dyrbja tutomu regularnemu wurazej wotpowědować: $2', |
| 1139 | + 'validator_list_error_invalid_argument' => 'Jedna hódnota abo wjace hódnotow za parameter $1 su njepłaćiwe.', |
| 1140 | + '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', |
| 1141 | + '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}}).', |
| 1142 | + '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.', |
| 1143 | + '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}}).', |
| 1144 | + '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}}.', |
| 1145 | +); |
| 1146 | + |
| 1147 | +/** Hungarian (Magyar) |
| 1148 | + * @author Dani |
| 1149 | + * @author Glanthor Reviol |
| 1150 | + */ |
| 1151 | +$messages['hu'] = array( |
| 1152 | + '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.', |
| 1153 | + 'validator-warning' => 'Figyelmeztetés: $1', |
| 1154 | + 'validator-error' => 'Hiba: $1', |
| 1155 | + 'validator-fatal-error' => 'Végzetes hiba: $1', |
| 1156 | + 'validator_error_parameters' => 'A következő {{PLURAL:$1|hiba található|hibák találhatóak}} a szintaxisban:', |
| 1157 | + 'validator_warning_parameters' => '{{PLURAL:$1|Hiba van|Hibák vannak}} a szintaxisodban.', |
| 1158 | + 'validator_error_unknown_argument' => 'A(z) $1 nem érvényes paraméter.', |
| 1159 | + 'validator_error_required_missing' => 'A(z) $1 kötelező paraméter nem lett megadva.', |
| 1160 | + 'validator-type-string' => 'szöveg', |
| 1161 | + 'validator-type-number' => 'szám', |
| 1162 | + 'validator-type-integer' => 'egész szám', |
| 1163 | + 'validator-type-float' => 'szám', |
| 1164 | + 'validator-type-boolean' => 'igen/nem', |
| 1165 | + 'validator-type-char' => 'karakter', |
| 1166 | + 'validator-listerrors-errors' => 'Hibák', |
| 1167 | + 'validator-listerrors-minor' => 'Apró', |
| 1168 | + 'validator-listerrors-low' => 'Alacsony', |
| 1169 | + 'validator-listerrors-normal' => 'Normális', |
| 1170 | + 'validator-listerrors-high' => 'Komoly', |
| 1171 | + 'validator-listerrors-fatal' => 'Végzetes', |
| 1172 | + 'validator-describe-descriptionmsg' => "'''Leírás''': $1", |
| 1173 | + 'validator-describe-empty' => 'üres', |
| 1174 | + 'validator-describe-required' => 'kötelező', |
| 1175 | + 'validator-describe-header-parameter' => 'Paraméter', |
| 1176 | + 'validator-describe-header-aliases' => 'Álnevek', |
| 1177 | + 'validator-describe-header-type' => 'Típus', |
| 1178 | + 'validator-describe-header-default' => 'Alapértelmezett', |
| 1179 | + 'validator-describe-header-description' => 'Leírás', |
| 1180 | + 'validator-describe-parameters' => 'Paraméterek', |
| 1181 | + 'validator-describe-syntax' => 'Szintaxis', |
| 1182 | + 'validator_error_empty_argument' => 'A(z) $1 paraméter értéke nem lehet üres.', |
| 1183 | + 'validator_error_must_be_number' => 'A(z) $1 paraméter csak szám lehet.', |
| 1184 | + 'validator_error_must_be_integer' => 'A(z) $1 paraméter csak egész szám lehet.', |
| 1185 | + 'validator-error-must-be-float' => 'A(z) $1 paraméter csak lebegőpontos szám lehet.', |
| 1186 | + 'validator_error_invalid_range' => 'A(z) $1 paraméter értékének $2 és $3 között kell lennie.', |
| 1187 | + 'validator-error-invalid-regex' => 'A(z) $1 paraméternek illeszkednie kell a következő reguláris kifejezésre: $2.', |
| 1188 | + 'validator-error-invalid-length' => 'A(z) $1 paraméternek legalább $2 karakter hosszúnak kell lennie.', |
| 1189 | + 'validator-error-invalid-length-range' => 'A(z) $1 paraméternek $2 és $3 karakter közötti hosszúnak kell lennie.', |
| 1190 | + 'validator_error_invalid_argument' => 'A(z) $1 érték nem érvényes a(z) $2 paraméterhez.', |
| 1191 | + 'validator_list_error_empty_argument' => 'A(z) $1 paraméter nem fogad el üres értékeket.', |
| 1192 | + 'validator_list_error_must_be_number' => 'A(z) $1 paraméter csak számokat tartalmazhat.', |
| 1193 | + 'validator_list_error_must_be_integer' => 'A(z) $1 paraméter csak egész számokat tartalmazhat.', |
| 1194 | + 'validator-list-error-must-be-float' => 'A(z) $1 paraméter csak lebegőpontos számokat tartalmazhat.', |
| 1195 | + 'validator_list_error_invalid_range' => 'A(z) $1 paraméter összes értékének $2 és $3 közöttinek kell lennie.', |
| 1196 | + 'validator_list_error_invalid_argument' => 'A(z) $1 paraméter egy vagy több értéke érvénytelen.', |
| 1197 | + 'validator_error_accepts_only' => 'A(z) $1 paraméter csak a következő {{PLURAL:$3|értéket|értékeket}} fogadja el: $2', |
| 1198 | + 'validator_list_omitted' => 'A(z) $1 {{PLURAL:$2|érték mellőzve lett.|értékek mellőzve lettek.}}', |
| 1199 | +); |
| 1200 | + |
| 1201 | +/** Interlingua (Interlingua) |
| 1202 | + * @author McDutchie |
| 1203 | + */ |
| 1204 | +$messages['ia'] = array( |
| 1205 | + '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', |
| 1206 | + 'validator-warning' => 'Aviso: $1', |
| 1207 | + 'validator-error' => 'Error: $1', |
| 1208 | + 'validator-fatal-error' => 'Error fatal: $1', |
| 1209 | + 'validator_error_parameters' => 'Le sequente {{PLURAL:$1|error|errores}} ha essite detegite in tu syntaxe:', |
| 1210 | + 'validator_warning_parameters' => 'Il ha {{PLURAL:$1|un error|errores}} in tu syntaxe.', |
| 1211 | + 'validator-warning-adittional-errors' => '... e {{PLURAL:$1|un altere problema|plure altere problemas}}.', |
| 1212 | + 'validator-error-omitted' => 'Le {{PLURAL:$2|valor|valores}} "$1" ha essite omittite.', |
| 1213 | + 'validator-error-problem' => 'Il habeva un problema con le parametro $1.', |
| 1214 | + 'validator_error_unknown_argument' => '$1 non es un parametro valide.', |
| 1215 | + 'validator_error_required_missing' => 'Le parametro requisite $1 non ha essite fornite.', |
| 1216 | + 'validator-error-override-argument' => 'Tentava supplantar le parametro $1 (valor: $2) con le valor "$3"', |
| 1217 | + 'validator-type-string' => 'texto', |
| 1218 | + 'validator-type-number' => 'numero', |
| 1219 | + 'validator-type-integer' => 'numero integre', |
| 1220 | + 'validator-type-float' => 'numero', |
| 1221 | + 'validator-type-boolean' => 'si/no', |
| 1222 | + 'validator-type-char' => 'character', |
| 1223 | + 'validator-listerrors-errors' => 'Errores', |
| 1224 | + 'validator-listerrors-minor' => 'Minor', |
| 1225 | + 'validator-listerrors-low' => 'Basse', |
| 1226 | + 'validator-listerrors-normal' => 'Normal', |
| 1227 | + 'validator-listerrors-high' => 'Alte', |
| 1228 | + 'validator-listerrors-fatal' => 'Fatal', |
| 1229 | + 'validator-listerrors-description' => 'Lista errores (e advertimentos) que occurreva in uncinos analysator addite con Validator. |
| 1230 | +Isto face listas solmente pro le uncinos analysator addite supra le loco ubi "listerrors" es inserite; |
| 1231 | +mitte "listerrors" al fin del pagina, o proxime al fin, pro obtener tote le errores.', |
| 1232 | + 'validator-listerrors-par-minseverity' => 'Le severitate minime de un problema pro esser listate.', |
| 1233 | + 'validator-describe-description' => 'Genera documentation pro un o plus uncinos del analysator syntactic, definite via Validator.', |
| 1234 | + 'validator-describe-notfound' => 'Non existe un uncino del analysator syntactic que manea "$1".', |
| 1235 | + 'validator-describe-descriptionmsg' => "'''Description''': $1", |
| 1236 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Alias|Aliases}}''': $1", |
| 1237 | + 'validator-describe-parserfunction' => 'Implementate solmente como function del analysator syntactic.', |
| 1238 | + 'validator-describe-tagextension' => 'Implementate solmente como extension de etiquetta.', |
| 1239 | + 'validator-describe-bothhooks' => 'Implementate como function del analysator syntactic e como extension de etiquetta.', |
| 1240 | + 'validator-describe-par-hooks' => 'Le uncinos del analysator syntactic pro le quales presentar documentation.', |
| 1241 | + 'validator-describe-par-pre' => 'Permitte obtener le ver wikitexto pro le documentation, sin render lo in le pagina.', |
| 1242 | + 'validator-describe-listtype' => 'Lista de $1 elementos', |
| 1243 | + 'validator-describe-empty' => 'vacue', |
| 1244 | + 'validator-describe-required' => 'requirite', |
| 1245 | + 'validator-describe-header-parameter' => 'Parametro', |
| 1246 | + 'validator-describe-header-aliases' => 'Aliases', |
| 1247 | + 'validator-describe-header-type' => 'Typo', |
| 1248 | + 'validator-describe-header-default' => 'Predefinition', |
| 1249 | + 'validator-describe-header-description' => 'Description', |
| 1250 | + 'validator-describe-parameters' => 'Parametros', |
| 1251 | + 'validator-describe-syntax' => 'Syntaxe', |
| 1252 | + 'validator-describe-tagmin' => 'Extension de etiquetta con solmente le parametros obligatori.', |
| 1253 | + 'validator-describe-tagmax' => 'Extension de etiquetta con tote le parametros.', |
| 1254 | + 'validator-describe-tagdefault' => 'Extension de etiquetta con tote le parametros usante le notation predefinite de parametros.', |
| 1255 | + 'validator-describe-pfmin' => 'Function analysator con solmente le parametros obligatori.', |
| 1256 | + 'validator-describe-pfmax' => 'Function analysator con tote le parametros.', |
| 1257 | + 'validator-describe-pfdefault' => 'Function analysator con tote le parametros usante le notation predefinite de parametros.', |
| 1258 | + 'validator-describe-autogen' => 'Le contento de iste section esseva auto-generate per le uncino analysator "describe" del extension Validator.', |
| 1259 | + 'validator_error_empty_argument' => 'Le parametro $1 non pote haber un valor vacue.', |
| 1260 | + 'validator_error_must_be_number' => 'Le parametro $1 pote solmente esser un numero.', |
| 1261 | + 'validator_error_must_be_integer' => 'Le parametro $1 pote solmente esser un numero integre.', |
| 1262 | + 'validator-error-must-be-float' => 'Le parametro $1 pote solmente esser un numero con fraction decimal.', |
| 1263 | + 'validator_error_invalid_range' => 'Le parametro $1 debe esser inter $2 e $3.', |
| 1264 | + 'validator-error-invalid-regex' => 'Le parametro $1 debe corresponder a iste expression regular: $2.', |
| 1265 | + 'validator-error-invalid-length' => 'Le parametro $1 debe haber un longitude de $2.', |
| 1266 | + 'validator-error-invalid-length-range' => 'Le parametro $1 debe haber un longitude inter $2 e $3.', |
| 1267 | + 'validator_error_invalid_argument' => 'Le valor $1 non es valide pro le parametro $2.', |
| 1268 | + 'validator_list_error_empty_argument' => 'Le parametro $1 non accepta valores vacue.', |
| 1269 | + 'validator_list_error_must_be_number' => 'Le parametro $1 pote solmente continer numeros.', |
| 1270 | + 'validator_list_error_must_be_integer' => 'Le parametro $1 pote solmente continer numeros integre.', |
| 1271 | + 'validator-list-error-must-be-float' => 'Le parametro $1 pote solmente continer numeros a comma flottante.', |
| 1272 | + 'validator_list_error_invalid_range' => 'Tote le valores del parametro $1 debe esser inter $2 e $3.', |
| 1273 | + 'validator-list-error-invalid-regex' => 'Tote le valores del parametro $1 debe corresponder a iste expression regular: $2.', |
| 1274 | + 'validator_list_error_invalid_argument' => 'Un o plus valores pro le parametro $1 es invalide.', |
| 1275 | + 'validator-list-error-accepts-only' => 'Un o plus valores del parametro $1 es invalide. |
| 1276 | +Illo accepta solmente iste {{PLURAL:$3|valor|valores}}: $2.', |
| 1277 | + 'validator-list-error-accepts-only-omitted' => 'Un o plus valores del parametro $1 es invalide. |
| 1278 | +Illo accepta solmente iste {{PLURAL:$3|valor|valores}}: $2. (e $4 {{PLURAL:$4|valor|valores}} omittite).', |
| 1279 | + 'validator_error_accepts_only' => 'Le valor "$4" non es valide pro le parametro $1. Illo accepta solmente iste {{PLURAL:$3|valor|valores}}: $2.', |
| 1280 | + 'validator-error-accepts-only-omitted' => 'Le valor "$2" non es valide pro le parametro $1. |
| 1281 | +Illo accepta solmente iste {{PLURAL:$5|valor|valores}}: $3 (e $4 {{PLURAL:$4|valor|valores}} omittite).', |
| 1282 | + 'validator_list_omitted' => 'Le {{PLURAL:$2|valor|valores}} $1 ha essite omittite.', |
| 1283 | +); |
| 1284 | + |
| 1285 | +/** Indonesian (Bahasa Indonesia) |
| 1286 | + * @author Bennylin |
| 1287 | + * @author Farras |
| 1288 | + * @author Irwangatot |
| 1289 | + * @author IvanLanin |
| 1290 | + */ |
| 1291 | +$messages['id'] = array( |
| 1292 | + 'validator-desc' => 'Validator memberikan cara mudah untuk ekstensi lain untuk memvalidasi parameter ParserFunction dan ekstensi tag, mengatur nilai biasa dan membuat pesan kesalahan', |
| 1293 | + 'validator-warning' => 'Peringatan: $1', |
| 1294 | + 'validator-error' => 'Kesalahan: $1', |
| 1295 | + 'validator-fatal-error' => 'Kesalahan fatal: $1', |
| 1296 | + 'validator_error_parameters' => '{{PLURAL:$1|Kesalahan|Kesalahan}} berikut telah terdeteksi pada sintaks Anda:', |
| 1297 | + 'validator_warning_parameters' => 'Terdapat {{PLURAL:$1|kesalahan|kesalahan}} pada sintaks Anda.', |
| 1298 | + 'validator-warning-adittional-errors' => '... dan {{PLURAL:$1|satu|banyak}} masalah lain.', |
| 1299 | + 'validator-error-omitted' => 'Nilai {{PLURAL:$2|"$1"|"$1"}} telah diabaikan.', |
| 1300 | + 'validator-error-problem' => 'Ada masalah dengan parameter $1.', |
| 1301 | + 'validator_error_unknown_argument' => '$1 bukan parameter yang benar.', |
| 1302 | + 'validator_error_required_missing' => 'Parameter $1 yang diperlukan tidak diberikan.', |
| 1303 | + 'validator-error-override-argument' => 'Mencoba menimpa parameter $1 (nilai: $2) dengan nilai "$3"', |
| 1304 | + 'validator-type-string' => 'teks', |
| 1305 | + 'validator-type-number' => 'nomor', |
| 1306 | + 'validator-type-integer' => 'bilangan bulat', |
| 1307 | + 'validator-type-float' => 'nomor', |
| 1308 | + 'validator-type-boolean' => 'ya/tidak', |
| 1309 | + 'validator-type-char' => 'karakter', |
| 1310 | + 'validator-listerrors-errors' => 'Kesalahan', |
| 1311 | + 'validator-listerrors-minor' => 'Kecil', |
| 1312 | + 'validator-listerrors-low' => 'Rendah', |
| 1313 | + 'validator-listerrors-normal' => 'Normal', |
| 1314 | + 'validator-listerrors-high' => 'Tinggi', |
| 1315 | + 'validator-listerrors-fatal' => 'Fatal', |
| 1316 | + 'validator-listerrors-description' => 'Daftar galat (dan peringatan) yang terjadi pada pengait parser yang ditambahkan melalui Validator. |
| 1317 | +Hanya daftar untuk pengait parser yang ditambahkan di atas bagian tempat listerrors disisipkan; |
| 1318 | +tempatkan listerrors pada atau di dekat bagian bawah halaman untuk mendapatkan semua kesalahan.', |
| 1319 | + 'validator-listerrors-par-minseverity' => 'Tingkat keparahan minimum masalah yang didaftarkan.', |
| 1320 | + 'validator-describe-description' => 'Menghasilkan dokumentasi untuk satu atau beberapa pengait parser yang didefinisikan melalui Validator.', |
| 1321 | + 'validator-describe-notfound' => 'Tidak ada pengait parser yang menangani "$1".', |
| 1322 | + 'validator-describe-descriptionmsg' => "'''Deskripsi''': $1", |
| 1323 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Alias|Alias}}''': $1", |
| 1324 | + 'validator-describe-parserfunction' => 'Diterapkan hanya sebagai fungsi parser.', |
| 1325 | + 'validator-describe-tagextension' => 'Diterapkan hanya sebagai ekstensi tag.', |
| 1326 | + 'validator-describe-bothhooks' => 'Diterapkan sebagai fungsi parser dan ekstensi tag.', |
| 1327 | + 'validator-describe-par-hooks' => 'Pengait parser untuk menampilkan dokumentasi.', |
| 1328 | + 'validator-describe-par-pre' => 'Memungkinkan Anda mengambil tekswiki aktual untuk dokumentasi, tanpa ditampilkan pada halaman.', |
| 1329 | + 'validator-describe-listtype' => 'Daftar $1 butir', |
| 1330 | + 'validator-describe-empty' => 'kosong', |
| 1331 | + 'validator-describe-required' => 'wajib diisi', |
| 1332 | + 'validator-describe-header-parameter' => 'Parameter', |
| 1333 | + 'validator-describe-header-aliases' => 'Alias', |
| 1334 | + 'validator-describe-header-type' => 'Jenis', |
| 1335 | + 'validator-describe-header-default' => 'Bawaan', |
| 1336 | + 'validator-describe-header-description' => 'Deskripsi', |
| 1337 | + 'validator-describe-parameters' => 'Parameter', |
| 1338 | + 'validator-describe-syntax' => 'Sintaksis', |
| 1339 | + 'validator-describe-tagmin' => 'Ekstensi tag hanya dengan parameter wajib.', |
| 1340 | + 'validator-describe-tagmax' => 'Ekstensi tag dengan semua parameter.', |
| 1341 | + 'validator-describe-tagdefault' => 'Ekstensi tag dengan semua parameter menggunakan notasi parameter bawaan.', |
| 1342 | + 'validator-describe-pfmin' => 'Fungsi parser hanya dengan parameter wajib.', |
| 1343 | + 'validator-describe-pfmax' => 'Fungsi parser dengan semua parameter.', |
| 1344 | + 'validator-describe-pfdefault' => 'Fungsi parser dengan semua parameter menggunakan notasi parameter bawaan.', |
| 1345 | + 'validator-describe-autogen' => 'Isi bagian ini adalah dihasilkan otomatis oleh pengait parser "describe" dari ekstensi Validator.', |
| 1346 | + 'validator_error_empty_argument' => 'Parameter $1 tidak dapat bernilai kosong.', |
| 1347 | + 'validator_error_must_be_number' => 'Parameter $1 hanya dapat berupa angka.', |
| 1348 | + 'validator_error_must_be_integer' => 'Parameter $1 hanya dapat berupa integer.', |
| 1349 | + 'validator-error-must-be-float' => 'Parameter $1 hanya dapat berupa angka titik kambang.', |
| 1350 | + 'validator_error_invalid_range' => 'Parameter $1 harus antara $2 dan $3.', |
| 1351 | + 'validator-error-invalid-regex' => 'Parameter $1 harus sesuai dengan persamaan reguler: $2.', |
| 1352 | + 'validator-error-invalid-length' => 'Parameter $1 harus memiliki panjang $2.', |
| 1353 | + 'validator-error-invalid-length-range' => 'Parameter $1 harus memiliki panjang antara $2 dan $3.', |
| 1354 | + 'validator_error_invalid_argument' => 'Nilai $1 tidak valid untuk parameter $2.', |
| 1355 | + 'validator_list_error_empty_argument' => 'Parameter $1 tidak menerima nilai kosong.', |
| 1356 | + 'validator_list_error_must_be_number' => 'Parameter $1 hanya dapat berisi angka.', |
| 1357 | + 'validator_list_error_must_be_integer' => 'Parameter $1 hanya dapat berisi bilangan bulat.', |
| 1358 | + 'validator-list-error-must-be-float' => 'Parameter $1 hanya dapat berisi angka kambang.', |
| 1359 | + 'validator_list_error_invalid_range' => 'Semua nilai parameter $1 harus antara $2 dan $3.', |
| 1360 | + 'validator-list-error-invalid-regex' => 'Semua nilai parameter $1 harus sesuai dengan persamaan reguler: $2.', |
| 1361 | + 'validator_list_error_invalid_argument' => 'Satu nilai atau lebih untuk parameter $1 tidak sah.', |
| 1362 | + '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.', |
| 1363 | + '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).', |
| 1364 | + 'validator_error_accepts_only' => 'Nilai "$4" tidak sah untuk parameter $1. Nilai yang diterima hanyalah {{PLURAL:$3|nilai ini|nilai-nilai ini}}: $2.', |
| 1365 | + '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).', |
| 1366 | + 'validator_list_omitted' => '{{PLURAL:$2|Nilai|Nilai}} $1 {{PLURAL:$2|telah|telah}} dihapus.', |
| 1367 | +); |
| 1368 | + |
| 1369 | +/** Italian (Italiano) |
| 1370 | + * @author Civvì |
| 1371 | + * @author HalphaZ |
| 1372 | + */ |
| 1373 | +$messages['it'] = array( |
| 1374 | + '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.', |
| 1375 | + 'validator_error_parameters' => 'Nella tua sintassi {{PLURAL:$1|è stato individuato il seguente errore|sono stati individuati i seguenti errori}}:', |
| 1376 | + 'validator_warning_parameters' => "Nella tua sintassi {{PLURAL:$1|c'è un errore|ci sono errori}}.", |
| 1377 | + 'validator_error_unknown_argument' => '$1 non è un parametro valido.', |
| 1378 | + 'validator_error_required_missing' => 'Il parametro richiesto $1 non è stato fornito.', |
| 1379 | + 'validator_error_empty_argument' => 'Il parametro $1 non può avere un valore vuoto.', |
| 1380 | + 'validator_error_must_be_number' => 'Il parametro $1 può essere solo un numero.', |
| 1381 | + 'validator_error_must_be_integer' => 'Il parametro $1 può essere solo un intero.', |
| 1382 | + 'validator_error_invalid_range' => 'Il parametro $1 deve essere compreso tra $2 e $3.', |
| 1383 | + 'validator_error_invalid_argument' => 'Il valore $1 non è valido per il parametro $2.', |
| 1384 | + 'validator_list_error_empty_argument' => 'Il parametro $1 non accetta valori vuoti.', |
| 1385 | + 'validator_list_error_must_be_number' => 'Il parametro $1 può contenere solo numeri.', |
| 1386 | + 'validator_list_error_must_be_integer' => 'Il parametro $1 può contenere solo numeri interi.', |
| 1387 | + 'validator_list_error_invalid_range' => 'Tutti i valori del parametro $1 devono essere compresi tra $2 e $3.', |
| 1388 | + 'validator_list_error_invalid_argument' => 'Uno o più valori del parametro $1 non sono validi.', |
| 1389 | + 'validator_error_accepts_only' => 'Il parametro $1 accetta solo {{PLURAL:$3|questo valore|questi valori}}: $2.', |
| 1390 | + 'validator_list_omitted' => '{{PLURAL:$2|Il valore|I valori}} $1 {{PLURAL:$2|è stato omesso|sono stati omessi}}.', |
| 1391 | +); |
| 1392 | + |
| 1393 | +/** Japanese (日本語) |
| 1394 | + * @author Aotake |
| 1395 | + * @author Fryed-peach |
| 1396 | + * @author Marine-Blue |
| 1397 | + * @author Whym |
| 1398 | + * @author Yanajin66 |
| 1399 | + */ |
| 1400 | +$messages['ja'] = array( |
| 1401 | + 'validator-desc' => '妥当性評価器は他の拡張機能にパーサー関数やタグ拡張の引数の妥当性を確認したり、規定値を設定したり、エラーメッセージを生成する手段を提供する', |
| 1402 | + 'validator-warning' => '警告: $1', |
| 1403 | + 'validator-error' => 'エラー: $1', |
| 1404 | + 'validator-fatal-error' => '致命的なエラー: $1', |
| 1405 | + 'validator_error_parameters' => 'あなたの入力から以下の{{PLURAL:$1|エラー|エラー}}が検出されました:', |
| 1406 | + 'validator_warning_parameters' => 'あなたの入力した構文には{{PLURAL:$1|エラー}}があります。', |
| 1407 | + 'validator-warning-adittional-errors' => '...と{{PLURAL:$1|他の問題}}。', |
| 1408 | + 'validator-error-omitted' => '{{PLURAL:$2|$1 個の値}}が省略されました。', |
| 1409 | + 'validator-error-problem' => 'パラメータ $1 に問題が見つかりました。', |
| 1410 | + 'validator_error_unknown_argument' => '$1 は有効な引数ではありません。', |
| 1411 | + 'validator_error_required_missing' => '必須の引数「$1」が入力されていません。', |
| 1412 | + 'validator-error-override-argument' => '値"$3"とともにパラメータ$1 (値: $2)を無視してみてください', |
| 1413 | + 'validator-listerrors-errors' => 'エラー', |
| 1414 | + 'validator-listerrors-minor' => '非常に軽度', |
| 1415 | + 'validator-listerrors-low' => '軽度', |
| 1416 | + 'validator-listerrors-normal' => '普通', |
| 1417 | + 'validator-listerrors-high' => '重大', |
| 1418 | + 'validator-listerrors-fatal' => '非常に重大', |
| 1419 | + 'validator_error_empty_argument' => '引数「$1」は空の値をとることができません。', |
| 1420 | + 'validator_error_must_be_number' => '引数「$1」は数値でなければなりません。', |
| 1421 | + 'validator_error_must_be_integer' => '引数「$1」は整数でなければなりません。', |
| 1422 | + 'validator-error-must-be-float' => 'パラメータ$1は浮動小数点数になることだけができます。', |
| 1423 | + 'validator_error_invalid_range' => '引数「$1」は $2 と $3 の間の値でなければなりません。', |
| 1424 | + 'validator-error-invalid-regex' => 'パラメータ $1 は次の正規表現と一致する必要があります: $2', |
| 1425 | + 'validator-error-invalid-length' => 'パラメータ$1は$2の長さを保持していなければならない。', |
| 1426 | + 'validator-error-invalid-length-range' => 'パラメータ$1は$2と$3間の長さを保持していなければならない。', |
| 1427 | + 'validator_error_invalid_argument' => '値「$1」は引数「$2」として妥当ではありません。', |
| 1428 | + 'validator_list_error_empty_argument' => '引数「$1」は空の値をとりません。', |
| 1429 | + 'validator_list_error_must_be_number' => '引数「$1」は数値しかとることができません。', |
| 1430 | + 'validator_list_error_must_be_integer' => '引数「$1」は整数値しかとることができません。', |
| 1431 | + 'validator-list-error-must-be-float' => 'パラメータ $1 は整数値しか利用できません。', |
| 1432 | + 'validator_list_error_invalid_range' => '引数「$1」の値はすべて $2 と $3 の間のものでなくてはなりません。', |
| 1433 | + 'validator-list-error-invalid-regex' => 'パラメータ $1 の値は次の正規表現と一致する必要があります: $2', |
| 1434 | + 'validator_list_error_invalid_argument' => '引数「$1」の値に不正なものが1つ以上あります。', |
| 1435 | + 'validator-list-error-accepts-only' => 'パラメータ $1 に無効な値が含まれています。 |
| 1436 | +このパラメータは{{PLURAL:$3|次の値}}しか利用できません: $2', |
| 1437 | + 'validator-list-error-accepts-only-omitted' => 'パラメータ $1 に無効な値が含まれています。 |
| 1438 | +このパラメータは{{PLURAL:$3|次の値}}しか利用できません: $2 (と省略された $4 の値)', |
| 1439 | + 'validator_error_accepts_only' => '値"$4"はパラメーター$1にとって有効ではありません。{{PLURAL:$3|この値|これらの値}}のみ受け入れられます。: $2。', |
| 1440 | + 'validator-error-accepts-only-omitted' => 'パラメータ $1 の値 "$2" は有効ではありません。 |
| 1441 | +このパラメータは{{PLURAL:$5|次の値}}しか利用できません: $3 (と省略された $4 の値)', |
| 1442 | + 'validator_list_omitted' => '{{PLURAL:$2|値}} $1 は省かれました。', |
| 1443 | +); |
| 1444 | + |
| 1445 | +/** Colognian (Ripoarisch) |
| 1446 | + * @author Purodha |
| 1447 | + */ |
| 1448 | +$messages['ksh'] = array( |
| 1449 | + '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.', |
| 1450 | + 'validator-warning' => 'Opjepaß: $1', |
| 1451 | + 'validator-error' => 'Fähler: $1', |
| 1452 | + 'validator-fatal-error' => "'''Dä!''' $1", |
| 1453 | + 'validator_error_parameters' => '{{PLURAL:$1|Heh dä|Heh di|Keine}} Fähler {{PLURAL:$1|es|sin|es}} en Dinge Syntax opjevalle:', |
| 1454 | + 'validator_warning_parameters' => 'Et {{PLURAL:$1|es ene|sin|es keine}} Fähler en Dinge Süntax.', |
| 1455 | + 'validator-warning-adittional-errors' => '… un {{PLURAL:$1|noch e Probleem|söns Probleeme|söns kei Probleem}}.', |
| 1456 | + 'validator-error-omitted' => '{{PLURAL:$2|Dä Wert „$1“ fählt|De Wääte „$1“ fähle|Nix fählt}}.', |
| 1457 | + 'validator-error-problem' => 'Et johv e Probleem mem Parrameeter $1.', |
| 1458 | + 'validator_error_unknown_argument' => '„$1“ es keine jöltijje Parameeter.', |
| 1459 | + 'validator_error_required_missing' => 'Dä Parameeter $1 moß aanjejovve sin, un fählt.', |
| 1460 | + 'validator-error-override-argument' => 'Versooht, dä Parrameeter $1 (mem Wäät: $2) met „$3“ ze övverschriive.', |
| 1461 | + 'validator-type-string' => 'Täx', |
| 1462 | + 'validator-type-number' => 'Zahl', |
| 1463 | + 'validator-type-integer' => 'janze Zahl (ohne Komma!)', |
| 1464 | + 'validator-type-float' => 'Zahl (met Komma)', |
| 1465 | + 'validator-type-boolean' => 'Joh udder Nää', |
| 1466 | + 'validator-type-char' => 'Zeiche, Zeffer, Boochshtaabe, …', |
| 1467 | + 'validator-listerrors-errors' => 'Fähler', |
| 1468 | + 'validator-listerrors-minor' => 'Bahl ejaal', |
| 1469 | + 'validator-listerrors-low' => 'Kleineshkeit', |
| 1470 | + 'validator-listerrors-normal' => 'Nomaal', |
| 1471 | + 'validator-listerrors-high' => 'Huh', |
| 1472 | + 'validator-listerrors-fatal' => 'Schlemm', |
| 1473 | + 'validator-listerrors-par-minseverity' => 'Wi schlemm ene Fähler winnishßdens sin moß, domet_e aanjezeish weed.', |
| 1474 | + 'validator-describe-notfound' => 'Et jidd_er keine Paaserhooke, dä „$1“ afhandele deiht.', |
| 1475 | + 'validator-describe-parserfunction' => 'Bloß als ene Paaserfunxjuhn enjeresht.', |
| 1476 | + 'validator-describe-listtype' => 'Leß met {{PLURAL:$1|einem Endraach|$1 Endrääsh|keinem Endraach}}', |
| 1477 | + 'validator-describe-empty' => 'nix dren', |
| 1478 | + 'validator-describe-required' => 'nüüdesch', |
| 1479 | + 'validator-describe-header-parameter' => 'Parrameeter', |
| 1480 | + 'validator-describe-header-type' => 'Zoot', |
| 1481 | + 'validator-describe-header-default' => 'Shtandatt', |
| 1482 | + 'validator-describe-parameters' => 'Parrameetere', |
| 1483 | + 'validator-describe-syntax' => 'Süntax', |
| 1484 | + 'validator_error_empty_argument' => 'Dä Parameeter $1 kann keine Wäät met nix dren hann.', |
| 1485 | + 'validator_error_must_be_number' => 'Dä Parameeter $1 kann blohß en Zahl sin.', |
| 1486 | + 'validator_error_must_be_integer' => 'Dä Parrameeter $1 kann bloß en jannze Zahl sin.', |
| 1487 | + 'validator-error-must-be-float' => 'Dä Parameeter $1 kann blohß en Zahl met Komma sin.', |
| 1488 | + 'validator_error_invalid_range' => 'Dä Parameeter $1 moß zwesche $2 un $3 sin.', |
| 1489 | + 'validator-error-invalid-regex' => 'Dä Parrameeter $1 moß op di <i lang="en">regular expression</i> „<code>$2</code>“ paße.', |
| 1490 | + 'validator-error-invalid-length' => 'Dä Parameeter $1 moß $2 Zeijshe lang sin.', |
| 1491 | + 'validator-error-invalid-length-range' => 'Dä Parameeter $1 moß zwesche $2 un $3 Zeijshe lang sin.', |
| 1492 | + 'validator_error_invalid_argument' => 'Däm Parameeter $2 singe Wäät es $1, dat es ävver doför nit jöltesch.', |
| 1493 | + 'validator_list_error_empty_argument' => 'Dä Parameeter $1 kann nit läddesh sin.', |
| 1494 | + 'validator_list_error_must_be_number' => 'Dä Parameeter $1 kann blohß Zeffere enthallde.', |
| 1495 | + 'validator_list_error_must_be_integer' => 'Dä Parameeter $1 kann blohß janze Zahle enthallde.', |
| 1496 | + 'validator_list_error_invalid_range' => 'All de Wääte vum Parameeter $1 möße zwesche $2 un $3 lijje.', |
| 1497 | + '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', |
| 1498 | + 'validator_list_omitted' => '{{PLURAL:$2|Dä Wäät|De Wääte|Keine Wäät}} $1 {{PLURAL:$2|es|sen|se}} fottjelohße woode.', |
| 1499 | +); |
| 1500 | + |
| 1501 | +/** Kurdish (Latin) (Kurdî (Latin)) |
| 1502 | + * @author George Animal |
| 1503 | + */ |
| 1504 | +$messages['ku-latn'] = array( |
| 1505 | + 'validator-type-boolean' => 'erê/na', |
| 1506 | + 'validator-listerrors-high' => 'bilind', |
| 1507 | + 'validator-describe-header-type' => 'Cure', |
| 1508 | +); |
| 1509 | + |
| 1510 | +/** Luxembourgish (Lëtzebuergesch) |
| 1511 | + * @author Les Meloures |
| 1512 | + * @author Robby |
| 1513 | + */ |
| 1514 | +$messages['lb'] = array( |
| 1515 | + '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', |
| 1516 | + 'validator-warning' => 'Opgepasst: $1', |
| 1517 | + 'validator-error' => 'Feeler: $1', |
| 1518 | + 'validator-fatal-error' => 'Fatale Feeler: $1', |
| 1519 | + 'validator_error_parameters' => '{{PLURAL:$1|Dëse Feeler gouf|Dës Feeler goufen}} an Ärer Syntax fonnt:', |
| 1520 | + 'validator_warning_parameters' => 'Et {{PLURAL:$1|ass ee|si}} Feeler an Ärer Syntax.', |
| 1521 | + 'validator-error-omitted' => '{{PLURAL:$2|De Wäert|D\'Wäerter}} "$1" {{PLURAL:$2|gouf|goufe}} vergiess.', |
| 1522 | + 'validator-error-problem' => 'Et gouf e Problem mam Parameter $1.', |
| 1523 | + 'validator_error_unknown_argument' => '$1 ass kee valbele Parameter.', |
| 1524 | + 'validator_error_required_missing' => 'Den obligatoresche Parameter $1 war net derbäi.', |
| 1525 | + 'validator-error-override-argument' => 'huet versicht de Parameter $1 (Wäert: $2) mam Wäert "$3" z\'iwwerschreiwen', |
| 1526 | + 'validator-type-string' => 'Text', |
| 1527 | + 'validator-type-number' => 'Zuel', |
| 1528 | + 'validator-type-integer' => 'Ganz Zuel', |
| 1529 | + 'validator-type-float' => 'Zuel', |
| 1530 | + 'validator-type-boolean' => 'Jo/Neen', |
| 1531 | + 'validator-type-char' => 'Zeechen', |
| 1532 | + 'validator-listerrors-errors' => 'Feeler', |
| 1533 | + 'validator-listerrors-minor' => 'Marginal', |
| 1534 | + 'validator-listerrors-low' => 'Niddreg', |
| 1535 | + 'validator-listerrors-normal' => 'Normal', |
| 1536 | + 'validator-listerrors-high' => 'Héich', |
| 1537 | + 'validator-listerrors-fatal' => 'Fatal', |
| 1538 | + 'validator-describe-descriptionmsg' => "'''Beschreiwung''': $1", |
| 1539 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Alias|Aliasen}}:''' $1", |
| 1540 | + 'validator-describe-listtype' => 'Lëscht mat {{PLURAL:$1|engem Element|$1 Elementer}}', |
| 1541 | + 'validator-describe-empty' => 'eidel', |
| 1542 | + 'validator-describe-required' => 'obligatoresch', |
| 1543 | + 'validator-describe-header-parameter' => 'Parameter', |
| 1544 | + 'validator-describe-header-aliases' => 'Aliasen', |
| 1545 | + 'validator-describe-header-type' => 'Typ', |
| 1546 | + 'validator-describe-header-default' => 'Standard', |
| 1547 | + 'validator-describe-header-description' => 'Beschreiwung', |
| 1548 | + 'validator-describe-parameters' => 'Parameteren', |
| 1549 | + 'validator-describe-syntax' => 'Syntax', |
| 1550 | + 'validator-describe-pfmax' => 'Parserfonctioun mat alle Parameter.', |
| 1551 | + 'validator_error_empty_argument' => 'De Parameter $1 ka keen eidele Wäert hunn.', |
| 1552 | + 'validator_error_must_be_number' => 'De Parameter $1 ka just eng Zuel sinn', |
| 1553 | + 'validator_error_must_be_integer' => 'De Parameter $1 ka just eng ganz Zuel sinn.', |
| 1554 | + 'validator-error-must-be-float' => 'Parameter $1 kann nëmmen eng Féisskommazuel sinn.', |
| 1555 | + 'validator_error_invalid_range' => 'De Parameter $1 muss tëschent $2 an $3 leien.', |
| 1556 | + 'validator-error-invalid-regex' => 'De Parameter $1 muss esou ausgesinn: $2', |
| 1557 | + 'validator-error-invalid-length' => 'Parameter $1 muss eng Längt vu(n) $2 hunn.', |
| 1558 | + 'validator-error-invalid-length-range' => 'De Parameter $1 muss eng Längt tëschent $2 an $3 hunn.', |
| 1559 | + 'validator_error_invalid_argument' => 'De Wäert $1 ass net valabel fir de Parameter $2.', |
| 1560 | + 'validator_list_error_empty_argument' => 'De Parameter $1 hëlt keng eidel Wäerter un.', |
| 1561 | + 'validator_list_error_must_be_number' => 'Am Parameter $1 kënnen nëmmen Zuelen dra sinn.', |
| 1562 | + 'validator_list_error_must_be_integer' => 'Am Parameter $1 kënnen nëmme ganz Zuele sinn.', |
| 1563 | + 'validator-list-error-must-be-float' => 'Am Parameter $1 kënnen nëmme Kommazuelen dra sinn.', |
| 1564 | + 'validator_list_error_invalid_range' => 'All Wäerter vum Parameter $1 mussen tëschent $2 an $3 leien.', |
| 1565 | + 'validator-list-error-invalid-regex' => 'All Wäerter vum Parameter $1 mussen dësem regulären Ausdrock entspriechen: $2', |
| 1566 | + 'validator_list_error_invalid_argument' => 'Een oder méi Wäerter fir de Parameter $1 sinn net valabel.', |
| 1567 | + 'validator-list-error-accepts-only' => 'Een oder méi Wäerter vum Parameter $1 sinn net valabel. |
| 1568 | +En akzeptéiert nëmmen {{PLURAL:$3|dëse Wäert|dës Wäerter}}: $2.', |
| 1569 | + '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', |
| 1570 | + 'validator-error-accepts-only-omitted' => 'De Wäert "$2" ass net valabel fir de Parameter $1. |
| 1571 | +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}}).', |
| 1572 | + 'validator_list_omitted' => "{{PLURAL:$2|De Wäert|D'Wäerter}} $1 {{PLURAL:$2|gouf|goufe}} vergiess.", |
| 1573 | +); |
| 1574 | + |
| 1575 | +/** Latvian (Latviešu) |
| 1576 | + * @author GreenZeb |
| 1577 | + */ |
| 1578 | +$messages['lv'] = array( |
| 1579 | + 'validator-listerrors-errors' => 'Kļūdas', |
| 1580 | + 'validator-listerrors-minor' => 'Maznozīmīgas', |
| 1581 | + 'validator-listerrors-fatal' => 'Fatālas', |
| 1582 | +); |
| 1583 | + |
| 1584 | +/** Macedonian (Македонски) |
| 1585 | + * @author Bjankuloski06 |
| 1586 | + * @author McDutchie |
| 1587 | + */ |
| 1588 | +$messages['mk'] = array( |
| 1589 | + 'validator-desc' => 'Потврдувачот овозможува лесен начин другите додатоци да ги потврдат параметрите на парсерските функции и додатоците со ознаки, да поставаат основно зададени вредности и да создаваат пораки за грешки', |
| 1590 | + 'validator-warning' => 'Предупредување: $1', |
| 1591 | + 'validator-error' => 'Грешка: $1', |
| 1592 | + 'validator-fatal-error' => 'Фатална грешка: $1', |
| 1593 | + 'validator_error_parameters' => 'Во вашата синтакса {{PLURAL:$1|е откриена следнава грешка|се откриени следниве грешки}}:', |
| 1594 | + 'validator_warning_parameters' => 'Имате {{PLURAL:$1|грешка|грешки}} во синтаксата.', |
| 1595 | + 'validator-warning-adittional-errors' => '... и {{PLURAL:$1|уште еден проблем|повеќе други проблеми}}.', |
| 1596 | + 'validator-error-omitted' => '{{PLURAL:$2|Изоставена е вредноста „$1“|Изоставени се вредностите „$1“}}.', |
| 1597 | + 'validator-error-problem' => 'Се појави проблем со параметарот $1.', |
| 1598 | + 'validator_error_unknown_argument' => '$1 не е важечки параметар.', |
| 1599 | + 'validator_error_required_missing' => 'Бараниот параметар $1 не е наведен.', |
| 1600 | + 'validator-error-override-argument' => 'Се обидовте да презапишете врз параметарот $1 (вредност: $2) со вредност „$3“', |
| 1601 | + 'validator-type-string' => 'текст', |
| 1602 | + 'validator-type-number' => 'број', |
| 1603 | + 'validator-type-integer' => 'цел број', |
| 1604 | + 'validator-type-float' => 'број', |
| 1605 | + 'validator-type-boolean' => 'да/не', |
| 1606 | + 'validator-type-char' => 'знак', |
| 1607 | + 'validator-listerrors-errors' => 'Грешки', |
| 1608 | + 'validator-listerrors-minor' => 'Ситни', |
| 1609 | + 'validator-listerrors-low' => 'Малку', |
| 1610 | + 'validator-listerrors-normal' => 'Нормално', |
| 1611 | + 'validator-listerrors-high' => 'Многу', |
| 1612 | + 'validator-listerrors-fatal' => 'Фатални', |
| 1613 | + 'validator-listerrors-description' => 'Ги наведува грешките (и предупредувањата) што се јавиле кај парсерските куки додадени преки Потврдувачот (Validator). |
| 1614 | +Ги наведува само парсерските куки додадени погоре каде е вметнато „listerrors“; |
| 1615 | +ставете го „listerrors“ на или близу дното на страницата за да ви се прикажат сите грешки.', |
| 1616 | + 'validator-listerrors-par-minseverity' => 'Минималната сериозност на проблемот за да биде наведен.', |
| 1617 | + 'validator-describe-description' => 'Создава документација за една или повеќе парсерски куки определени преку Потврдувачот.', |
| 1618 | + 'validator-describe-notfound' => 'Нема парсерска кука што работи со „$1“.', |
| 1619 | + 'validator-describe-descriptionmsg' => "'''Опис''': $1", |
| 1620 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Алијас|Алијаси}}''': $1", |
| 1621 | + 'validator-describe-parserfunction' => 'Се применува само во својство на парсерска функција.', |
| 1622 | + 'validator-describe-tagextension' => 'Се применува само во својство на додаток за означување.', |
| 1623 | + 'validator-describe-bothhooks' => 'Се применува во својство на парсерска функција и додаток за означување (обете).', |
| 1624 | + 'validator-describe-par-hooks' => 'Парсерските куки за кои сакате да се прикаже документација.', |
| 1625 | + 'validator-describe-par-pre' => 'Ви овозможува да го добиете самиот викитекст за документацијата, без да се испише на страницата', |
| 1626 | + 'validator-describe-listtype' => 'Список на $1 ставки', |
| 1627 | + 'validator-describe-empty' => 'празно', |
| 1628 | + 'validator-describe-required' => 'задолжително', |
| 1629 | + 'validator-describe-header-parameter' => 'Параметар', |
| 1630 | + 'validator-describe-header-aliases' => 'Алијаси', |
| 1631 | + 'validator-describe-header-type' => 'Вид', |
| 1632 | + 'validator-describe-header-default' => 'По основно', |
| 1633 | + 'validator-describe-header-description' => 'Опис', |
| 1634 | + 'validator-describe-parameters' => 'Параметри', |
| 1635 | + 'validator-describe-syntax' => 'Синтакса', |
| 1636 | + 'validator-describe-tagmin' => 'Додаток за означување само со задолжителните параметри.', |
| 1637 | + 'validator-describe-tagmax' => 'Додаток за означување со сите параметри.', |
| 1638 | + 'validator-describe-tagdefault' => 'Додаток за означување кајшто сите параметри ја користат стандардната параметарска нотација.', |
| 1639 | + 'validator-describe-pfmin' => 'Парсерска функција само со задолжителните параметри.', |
| 1640 | + 'validator-describe-pfmax' => 'Парсерска функција со сите параметри.', |
| 1641 | + 'validator-describe-pfdefault' => 'Парсерска функција кајшто сите параметри ја користат стандардната параметарска нотација.', |
| 1642 | + 'validator-describe-autogen' => 'Содржината на овој поднаслов е создадена автоматски од парсерската кука „describe“ на додатокот Потврдувач (Validator).', |
| 1643 | + 'validator_error_empty_argument' => 'Параметарот $1 не може да има празна вредност.', |
| 1644 | + 'validator_error_must_be_number' => 'Параметарот $1 може да биде само број.', |
| 1645 | + 'validator_error_must_be_integer' => 'Параметарот $1 може да биде само цел број.', |
| 1646 | + 'validator-error-must-be-float' => 'Параметарот $1 може да биде само број со подвижна точка.', |
| 1647 | + 'validator_error_invalid_range' => 'Параметарот $1 мора да изнесува помеѓу $2 и $3.', |
| 1648 | + 'validator-error-invalid-regex' => 'Параметарот $1 мора да се совпаѓа со следниов регуларен израз: $2.', |
| 1649 | + 'validator-error-invalid-length' => 'Параметарот $1 мора да има должина од $2.', |
| 1650 | + 'validator-error-invalid-length-range' => 'Должината на параметарот параметарот $1 мора да изнесува помеѓу $2 и $3.', |
| 1651 | + 'validator_error_invalid_argument' => 'Вредноста $1 е неважечка за параметарот $2.', |
| 1652 | + 'validator_list_error_empty_argument' => 'Параметарот $1 не прифаќа празни вредности.', |
| 1653 | + 'validator_list_error_must_be_number' => 'Параметарот $1 може да содржи само бројки.', |
| 1654 | + 'validator_list_error_must_be_integer' => 'Параметарот $1 може да содржи само цели броеви.', |
| 1655 | + 'validator-list-error-must-be-float' => 'Параметарот $1 може да содржи само подвижни бинарни точки.', |
| 1656 | + 'validator_list_error_invalid_range' => 'Сите вредности на параметарот $1 мора да бидат помеѓу $2 и $3.', |
| 1657 | + 'validator-list-error-invalid-regex' => 'Сите вредности на параметарот $1 мора да се совпаднат со следниов регуларен израз: $2.', |
| 1658 | + 'validator_list_error_invalid_argument' => 'Една или повеќе вредности на параметарот $1 се неважечки.', |
| 1659 | + 'validator-list-error-accepts-only' => 'Параметарот $1 има една или повеќе неважечки вредности. |
| 1660 | +Се {{PLURAL:$3|прифаќа само следнава вредност|прифаќаат само следниве вредности}}: $2.', |
| 1661 | + 'validator-list-error-accepts-only-omitted' => 'Параметарот $1 има една или повеќе неважечки вредности. |
| 1662 | +Се {{PLURAL:$3|прифаќа само следнава вредност|прифаќаат само следниве вредности}}: $2 (и $4 {{PLURAL:$4|изоставена вредност|изоставени вредности}}).', |
| 1663 | + 'validator_error_accepts_only' => 'Вредноста „$4“ е неважечка за параметарот $1. Се {{PLURAL:$3|прифаќа само следнава вредност|прифаќаат само следниве вредности}}: $2.', |
| 1664 | + 'validator-error-accepts-only-omitted' => 'Вредноста „$2“ не е важечка за параметарот $1. Се прифаќаат само следниве вредности: $3 (и $4 изоставени вредности).', |
| 1665 | + 'validator_list_omitted' => '{{PLURAL:$2|Вредноста|Вредностите}} $1 {{PLURAL:$2|беше испуштена|беа испуштени}}.', |
| 1666 | +); |
| 1667 | + |
| 1668 | +/** Malay (Bahasa Melayu) |
| 1669 | + * @author Anakmalaysia |
| 1670 | + */ |
| 1671 | +$messages['ms'] = array( |
| 1672 | + 'validator-describe-descriptionmsg' => "'''Keterangan''': $1", |
| 1673 | + 'validator-describe-empty' => 'kosong', |
| 1674 | + 'validator-describe-required' => 'wajib', |
| 1675 | + 'validator-describe-header-default' => 'Tersedia', |
| 1676 | +); |
| 1677 | + |
| 1678 | +/** Dutch (Nederlands) |
| 1679 | + * @author Jeroen De Dauw |
| 1680 | + * @author Siebrand |
| 1681 | + */ |
| 1682 | +$messages['nl'] = array( |
| 1683 | + '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', |
| 1684 | + 'validator-warning' => 'Waarschuwing: $1', |
| 1685 | + 'validator-error' => 'Fout: $1', |
| 1686 | + 'validator-fatal-error' => 'Onherstelbare fout: $1', |
| 1687 | + 'validator_error_parameters' => 'In uw syntaxis {{PLURAL:$1|is de volgende fout|zijn de volgende fouten}} gedetecteerd:', |
| 1688 | + 'validator_warning_parameters' => 'Er {{PLURAL:$1|zit een fout|zitten $1 fouten}} in uw syntaxis.', |
| 1689 | + 'validator-warning-adittional-errors' => '... en nog {{PLURAL:$1|een ander probleem|$1 andere problemen}}.', |
| 1690 | + 'validator-error-omitted' => 'De {{PLURAL:$2|waarde "$1" mist|waarden "$1" missen}}.', |
| 1691 | + 'validator-error-problem' => 'Er was een probleem met de parameter $1.', |
| 1692 | + 'validator_error_unknown_argument' => '$1 is geen geldige parameter.', |
| 1693 | + 'validator_error_required_missing' => 'De verplichte parameter $1 is niet opgegeven.', |
| 1694 | + 'validator-error-override-argument' => 'Geprobeerd de parameter $1 (waarde: $2) te overschrijven met waarde "$3".', |
| 1695 | + 'validator-type-string' => 'tekst', |
| 1696 | + 'validator-type-number' => 'getal', |
| 1697 | + 'validator-type-integer' => 'geheel getal', |
| 1698 | + 'validator-type-float' => 'getal', |
| 1699 | + 'validator-type-boolean' => 'ja / nee', |
| 1700 | + 'validator-type-char' => 'teken', |
| 1701 | + 'validator-listerrors-errors' => 'Fouten', |
| 1702 | + 'validator-listerrors-minor' => 'Overkomelijk', |
| 1703 | + 'validator-listerrors-low' => 'Laag', |
| 1704 | + 'validator-listerrors-normal' => 'Gemiddeld', |
| 1705 | + 'validator-listerrors-high' => 'Groot', |
| 1706 | + 'validator-listerrors-fatal' => 'Fataal', |
| 1707 | + 'validator-listerrors-description' => "Fouten en waarschuwingen weergeven die zijn opgetreden in parserhooks die via Validator zijn toegevoegd. |
| 1708 | +Geeft alleen parserhooks weer die zijn toegevoegd voordat de fout is opgetreden; |
| 1709 | +plaats fouten onderaan of bijna onderaan pagina's om alle fouten weer te geven.", |
| 1710 | + 'validator-listerrors-par-minseverity' => 'De minimale ernst van een probleem voordat het wordt weergegeven.', |
| 1711 | + 'validator-describe-description' => 'Maakt documentatie aan voor een of meer parserhooks die via Validator zijn gedefinieerd.', |
| 1712 | + 'validator-describe-notfound' => 'Er is geen parserhook die "$1" afhandelt.', |
| 1713 | + 'validator-describe-descriptionmsg' => "'''Beschrijving''': $1", |
| 1714 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Alias|Aliassen}}''': $1", |
| 1715 | + 'validator-describe-parserfunction' => 'Alleen als parserfunctie geïmplementeerd.', |
| 1716 | + 'validator-describe-tagextension' => 'Alleen als labeluitbreiding geïmplementeerd.', |
| 1717 | + 'validator-describe-bothhooks' => 'Als parserfunctie en labeluitbreiding geïmplementeerd.', |
| 1718 | + 'validator-describe-par-hooks' => 'Parserhooks waarvoor documentatie weergegeven moet worden.', |
| 1719 | + 'validator-describe-par-pre' => 'Maakt het mogelijk de wikitekst voor de documentatie weer te geven zonder dat deze wordt verwerkt.', |
| 1720 | + 'validator-describe-listtype' => 'Lijst met $1 items', |
| 1721 | + 'validator-describe-empty' => 'leeg', |
| 1722 | + 'validator-describe-required' => 'verplicht', |
| 1723 | + 'validator-describe-header-parameter' => 'Parameter', |
| 1724 | + 'validator-describe-header-aliases' => 'Aliassen', |
| 1725 | + 'validator-describe-header-type' => 'Type', |
| 1726 | + 'validator-describe-header-default' => 'Standaard', |
| 1727 | + 'validator-describe-header-description' => 'Beschrijving', |
| 1728 | + 'validator-describe-parameters' => 'Parameters', |
| 1729 | + 'validator-describe-syntax' => 'Syntaxis', |
| 1730 | + 'validator-describe-tagmin' => 'Labeluitbreiding met alleen de verplichte parameters.', |
| 1731 | + 'validator-describe-tagmax' => 'Labeluitbreiding met alle parameters.', |
| 1732 | + 'validator-describe-tagdefault' => 'Labeluitbreiding met alle parameters die de standaard parameternotatie gebruiken.', |
| 1733 | + 'validator-describe-pfmin' => 'Parserfunctie met alleen de verplichte parameters.', |
| 1734 | + 'validator-describe-pfmax' => 'Parserfunctie met alle parameters.', |
| 1735 | + 'validator-describe-pfdefault' => 'Parserfunctie met alle parameters die de standaard parameternotatie gebruiken.', |
| 1736 | + 'validator-describe-autogen' => 'De inhoud van deze paragraaf is automatisch aangemaakt door de parserhook "beschrijven" (describe) van de uitbreiding Validator.', |
| 1737 | + 'validator_error_empty_argument' => 'De parameter $1 mag niet leeg zijn.', |
| 1738 | + 'validator_error_must_be_number' => 'De parameter $1 mag alleen een getal zijn.', |
| 1739 | + 'validator_error_must_be_integer' => 'De parameter $1 kan alleen een heel getal zijn.', |
| 1740 | + 'validator-error-must-be-float' => 'Parameter $1 kan alleen een getal met decimalen zijn.', |
| 1741 | + 'validator_error_invalid_range' => 'De parameter $1 moet tussen $2 en $3 liggen.', |
| 1742 | + 'validator-error-invalid-regex' => 'De parameter $1 moet voldoen aan deze reguliere expressie: $2.', |
| 1743 | + 'validator-error-invalid-length' => 'Parameter $1 moet een lengte hebben van $2.', |
| 1744 | + 'validator-error-invalid-length-range' => 'Parameter $1 moet een lengte hebben tussen $2 en $3.', |
| 1745 | + 'validator_error_invalid_argument' => 'De waarde $1 is niet geldig voor de parameter $2.', |
| 1746 | + 'validator_list_error_empty_argument' => 'Voor de parameter $1 zijn lege waarden niet toegestaan.', |
| 1747 | + 'validator_list_error_must_be_number' => 'Voor de parameter $1 zijn alleen getallen toegestaan.', |
| 1748 | + 'validator_list_error_must_be_integer' => 'Voor de parameter $1 zijn alleen hele getallen toegestaan.', |
| 1749 | + 'validator-list-error-must-be-float' => 'Voor de parameter $1 zijn alleen getallen met drijvende komma toegestaan.', |
| 1750 | + 'validator_list_error_invalid_range' => 'Alle waarden voor de parameter $1 moeten tussen $2 en $3 liggen.', |
| 1751 | + 'validator-list-error-invalid-regex' => 'Alle waarden voor de parameter $1 moeten voldoen aan deze reguliere expressie: $2.', |
| 1752 | + 'validator_list_error_invalid_argument' => 'Een of meerdere waarden voor de parameter $1 zijn ongeldig.', |
| 1753 | + 'validator-list-error-accepts-only' => 'Een of meer waarden voor de parameter $1 zijn ongeldig. |
| 1754 | +Alleen deze {{PLURAL:$3|waarde is|waarden zijn}} toegestaan: $2.', |
| 1755 | + 'validator-list-error-accepts-only-omitted' => 'Een of meer waarden voor de parameter $1 zijn ongeldig. |
| 1756 | +Alleen deze {{PLURAL:$3|waarde is|waarden zijn}} toegestaan: $2. |
| 1757 | +Als ook $4 weggelaten {{PLURAL:$4|waarde|waarden}}.', |
| 1758 | + 'validator_error_accepts_only' => 'De waarde "$4" is ongeldig voor parameter $1. Deze kan alleen de volgende {{PLURAL:$3|waarde|waarden}} hebben: $2.', |
| 1759 | + 'validator-error-accepts-only-omitted' => 'De waarde "$2" is niet geldig voor de parameter $1. |
| 1760 | +Alleen deze {{PLURAL:$5|waarde is|waarden zijn}} toegestaan: $3. |
| 1761 | +Als ook $4 weggelaten {{PLURAL:$4|waarde|waarden}}.', |
| 1762 | + 'validator_list_omitted' => 'De {{PLURAL:$2|waarde|waarden}} $1 {{PLURAL:$2|mist|missen}}.', |
| 1763 | +); |
| 1764 | + |
| 1765 | +/** Norwegian (bokmål) (Norsk (bokmål)) |
| 1766 | + * @author Jon Harald Søby |
| 1767 | + * @author Nghtwlkr |
| 1768 | + */ |
| 1769 | +$messages['no'] = array( |
| 1770 | + 'validator-desc' => 'Gir generisk støtte for parameterhåndtering for andre utvidelser', |
| 1771 | + 'validator-warning' => 'Advarsel: $1', |
| 1772 | + 'validator-error' => 'Feil: $1', |
| 1773 | + 'validator-fatal-error' => 'Kritisk feil: $1', |
| 1774 | + 'validator_error_parameters' => 'Følgende {{PLURAL:$1|feil|feil}} har blitt oppdaget i syntaksen din:', |
| 1775 | + 'validator_warning_parameters' => 'Det er {{PLURAL:$1|én feil|flere feil}} i syntaksen din.', |
| 1776 | + 'validator-warning-adittional-errors' => '... og {{PLURAL:$1|ett problem til|flere problem}}.', |
| 1777 | + 'validator-error-omitted' => '{{PLURAL:$2|Verdien|Verdiene}} «$1» har blitt utelatt.', |
| 1778 | + 'validator-error-problem' => 'Det var et problem med parameteren $1.', |
| 1779 | + 'validator_error_unknown_argument' => '$1 er ikke en gyldig parameter.', |
| 1780 | + 'validator_error_required_missing' => 'Den nødvendige parameteren «$1» er ikke angitt.', |
| 1781 | + 'validator-error-override-argument' => 'Prøvde å overkjøre parameter $1 (verdi: $2) med verdien «$3»', |
| 1782 | + 'validator-listerrors-errors' => 'Feil', |
| 1783 | + 'validator-listerrors-minor' => 'Mindre', |
| 1784 | + 'validator-listerrors-low' => 'Lav', |
| 1785 | + 'validator-listerrors-normal' => 'Normal', |
| 1786 | + 'validator-listerrors-high' => 'Høy', |
| 1787 | + 'validator-listerrors-fatal' => 'Kritisk', |
| 1788 | + 'validator_error_empty_argument' => 'Parameteren $1 kan ikke ha en tom verdi.', |
| 1789 | + 'validator_error_must_be_number' => 'Parameteren $1 må være et tall.', |
| 1790 | + 'validator_error_must_be_integer' => 'Parameteren $1 må være et heltall.', |
| 1791 | + 'validator-error-must-be-float' => 'Parameter $1 må være et flyttall.', |
| 1792 | + 'validator_error_invalid_range' => 'Parameter $1 må være mellom $2 og $3.', |
| 1793 | + 'validator-error-invalid-regex' => 'Parameteren $1 må samsvare med dette regulære uttrykket: $2.', |
| 1794 | + 'validator-error-invalid-length' => 'Parameter $1 må ha en lengde på $2.', |
| 1795 | + 'validator-error-invalid-length-range' => 'Parameter $1 må ha en lengde mellom $2 og $3.', |
| 1796 | + 'validator_error_invalid_argument' => 'Verdien $1 er ikke gyldig for parameter $2.', |
| 1797 | + 'validator_list_error_empty_argument' => 'Parameteren $1 godtar ikke tomme verdier.', |
| 1798 | + 'validator_list_error_must_be_number' => 'Parameteren $1 kan bare inneholde tall.', |
| 1799 | + 'validator_list_error_must_be_integer' => 'Parameteren $1 kan bare inneholde heltall.', |
| 1800 | + 'validator-list-error-must-be-float' => 'Parameteren $1 kan bare innholde flyttall.', |
| 1801 | + 'validator_list_error_invalid_range' => 'Alle verdier av parameteren $1 må være mellom $2 og $3.', |
| 1802 | + 'validator-list-error-invalid-regex' => 'Alle verdier av parameteren $1 må samsvare med dette regulære uttrykket: $2.', |
| 1803 | + 'validator_list_error_invalid_argument' => 'Parameteren $1 har en eller flere ugyldige verdier.', |
| 1804 | + 'validator-list-error-accepts-only' => 'En eller flere verdier for parameteren $1 er ugyldige. |
| 1805 | +Den godtar bare {{PLURAL:$3|denne verdien|disse verdiene}}: $2.', |
| 1806 | + 'validator-list-error-accepts-only-omitted' => 'En eller flere verdier for parameteren $1 er ugyldige. |
| 1807 | +Den godtar bare {{PLURAL:$3|denne verdien|disse verdiene}}: $2 (og $4 {{PLURAL:$4|utelatt verdi|utelatte verdier}}).', |
| 1808 | + 'validator_error_accepts_only' => 'Verdien «$4» er ikke gyldig for parameteren $1. Den aksepterer kun {{PLURAL:$3|denne verdien|disse verdiene}}: $2.', |
| 1809 | + 'validator-error-accepts-only-omitted' => 'Verdien «$2» er ikke gyldig for parameteren $1. |
| 1810 | +Den godtar bare {{PLURAL:$5|denne verdien|disse verdiene}}: $3 (og $4 {{PLURAL:$4|utelatt verdi|utelatte verdier}}).', |
| 1811 | + 'validator_list_omitted' => '{{PLURAL:$2|Verdien|Verdiene}} $1 har blitt utelatt.', |
| 1812 | +); |
| 1813 | + |
| 1814 | +/** Occitan (Occitan) |
| 1815 | + * @author Cedric31 |
| 1816 | + * @author Jfblanc |
| 1817 | + */ |
| 1818 | +$messages['oc'] = array( |
| 1819 | + '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", |
| 1820 | + 'validator_error_parameters' => '{{PLURAL:$1|Aquela error es estada detectada|Aquelas errors son estadas detectadas}} dins la sintaxi', |
| 1821 | + 'validator_error_unknown_argument' => '$1 es pas un paramètre valedor.', |
| 1822 | + 'validator_error_required_missing' => "Manca lo paramètre $1 qu'es obligatòri.", |
| 1823 | + 'validator_error_empty_argument' => 'Lo paramètre $1 pòt pas estar voide.', |
| 1824 | + 'validator_error_must_be_number' => 'Lo paramètre $1 deu èsser un nombre.', |
| 1825 | + 'validator_error_must_be_integer' => 'Lo paramètre $1 deu èsser un nombre entièr.', |
| 1826 | + 'validator_error_invalid_range' => 'Lo paramètre $1 deu èsser entre $2 e $3.', |
| 1827 | + 'validator_error_invalid_argument' => '$1 es pas valedor pel paramètre $2.', |
| 1828 | + 'validator_error_accepts_only' => 'Sonque {{PLURAL:$3|aquela valor es valedora|aquelas valors son valedoras}}pel paramètre $1 : $2.', |
| 1829 | +); |
| 1830 | + |
| 1831 | +/** Polish (Polski) |
| 1832 | + * @author Fizykaa |
| 1833 | + * @author Sp5uhe |
| 1834 | + */ |
| 1835 | +$messages['pl'] = array( |
| 1836 | + 'validator-desc' => 'Dostarcza innym rozszerzeniom ogólną obsługę parametrów', |
| 1837 | + 'validator-warning' => 'Uwaga – $1', |
| 1838 | + 'validator-error' => 'Błąd – $1', |
| 1839 | + 'validator-fatal-error' => 'Błąd krytyczny – $1', |
| 1840 | + '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:', |
| 1841 | + 'validator_warning_parameters' => 'W Twoim kodzie {{PLURAL:$1|wystąpił błąd|wystąpiły błędy}} składni.', |
| 1842 | + 'validator-warning-adittional-errors' => '... i {{PLURAL:$1|jeszcze jeden problem|wiele więcej problemów}}.', |
| 1843 | + 'validator-error-omitted' => '{{PLURAL:$2|Wartość „$1” została pominięta|Wartości „$1” zostały pominięte}}.', |
| 1844 | + 'validator-error-problem' => 'Wystąpił problem z parametrem $1.', |
| 1845 | + 'validator_error_unknown_argument' => '$1 jest niepoprawnym parametrem.', |
| 1846 | + 'validator_error_required_missing' => 'Obowiązkowy parametr $1 nie został przekazany.', |
| 1847 | + 'validator-error-override-argument' => 'Próba nadpisania parametru $1 o wartości „$2” nową wartością „$3”', |
| 1848 | + 'validator-type-string' => 'tekst', |
| 1849 | + 'validator-type-number' => 'liczba', |
| 1850 | + 'validator-type-integer' => 'liczba całkowita', |
| 1851 | + 'validator-type-float' => 'liczba rzeczywista', |
| 1852 | + 'validator-type-boolean' => 'tak lub nie', |
| 1853 | + 'validator-type-char' => 'znak', |
| 1854 | + 'validator-listerrors-errors' => 'Błędy', |
| 1855 | + 'validator-listerrors-minor' => 'Nieistotny', |
| 1856 | + 'validator-listerrors-low' => 'Mało istotny', |
| 1857 | + 'validator-listerrors-normal' => 'Typowy', |
| 1858 | + 'validator-listerrors-high' => 'Istotny', |
| 1859 | + 'validator-listerrors-fatal' => 'Krytyczny', |
| 1860 | + 'validator_error_empty_argument' => 'Parametr $1 nie może być pusty.', |
| 1861 | + 'validator_error_must_be_number' => 'Parametr $1 musi być liczbą.', |
| 1862 | + 'validator_error_must_be_integer' => 'Parametr $1 musi być liczbą całkowitą.', |
| 1863 | + 'validator-error-must-be-float' => 'Parametr $1 musi być liczbą rzeczywistą.', |
| 1864 | + 'validator_error_invalid_range' => 'Parametr $1 musi zawierać się w przedziale od $2 do $3.', |
| 1865 | + 'validator-error-invalid-regex' => 'Parametr $1 musi pasować do wyrażenia regularnego $2.', |
| 1866 | + 'validator-error-invalid-length' => 'Parametr $1 musi mieć długość $2.', |
| 1867 | + 'validator-error-invalid-length-range' => 'Długość parametru $1 musi zawierać się w przedziale od $2 do $3.', |
| 1868 | + 'validator_error_invalid_argument' => 'Nieprawidłowa wartość $1 parametru $2.', |
| 1869 | + 'validator_list_error_empty_argument' => 'Parametr $1 nie może być pusty.', |
| 1870 | + 'validator_list_error_must_be_number' => 'Parametrem $1 mogą być wyłącznie liczby.', |
| 1871 | + 'validator_list_error_must_be_integer' => 'Parametrem $1 mogą być wyłącznie liczby całkowite.', |
| 1872 | + 'validator-list-error-must-be-float' => 'Parametrem $1 mogą być wyłącznie liczby rzeczywiste.', |
| 1873 | + 'validator_list_error_invalid_range' => 'Wartości parametru $1 muszą zawierać się w przedziale od $2 do $3.', |
| 1874 | + 'validator-list-error-invalid-regex' => 'Wszystkie wartości parametru $1 muszą pasować do wyrażenia regularnego $2.', |
| 1875 | + 'validator_list_error_invalid_argument' => 'Przynajmniej jedna wartość parametru $1 jest nieprawidłowa.', |
| 1876 | + 'validator-list-error-accepts-only' => 'Jedna lub więcej wartości parametru $1 są nieprawidłowe. |
| 1877 | +Może przyjmować wyłącznie {{PLURAL:$3|wartość|wartości:}} $2.', |
| 1878 | + 'validator-list-error-accepts-only-omitted' => 'Jedna lub więcej wartości parametru $1 są nieprawidłowe. |
| 1879 | +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}}).', |
| 1880 | + '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.', |
| 1881 | + 'validator-error-accepts-only-omitted' => 'Wartość „$2” parametru $1 jest nieprawidłowa. |
| 1882 | +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}}).', |
| 1883 | + 'validator_list_omitted' => '{{PLURAL:$2|Parametr|Parametry}} $1 {{PLURAL:$2|został opuszczony|zostały opuszczone}}.', |
| 1884 | +); |
| 1885 | + |
| 1886 | +/** Piedmontese (Piemontèis) |
| 1887 | + * @author Borichèt |
| 1888 | + * @author Dragonòt |
| 1889 | + * @author McDutchie |
| 1890 | + */ |
| 1891 | +$messages['pms'] = array( |
| 1892 | + '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", |
| 1893 | + 'validator-warning' => 'Avis: $1', |
| 1894 | + 'validator-error' => 'Eror: $1', |
| 1895 | + 'validator-fatal-error' => 'Eror Fatal: $1', |
| 1896 | + '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:", |
| 1897 | + 'validator_warning_parameters' => "{{PLURAL:$1|A-i é n'|A-i son dj'}}eror ant soa sintassi.", |
| 1898 | + 'validator-warning-adittional-errors' => "... e {{PLURAL:$1|ëdcò n'àutr problema|vàire àutri problema}}.", |
| 1899 | + 'validator-error-omitted' => '{{PLURAL:$2|Ël valor "$1" a l\'é|Ij valor "$1" a son}} stàit sautà.', |
| 1900 | + 'validator-error-problem' => 'A-i é staje un problema con ël paràmetr $1.', |
| 1901 | + 'validator_error_unknown_argument' => "$1 a l'é un paràmetr pa bon.", |
| 1902 | + 'validator_error_required_missing' => "Ël paràmetr obligatòri $1 a l'é pa dàit.", |
| 1903 | + 'validator-error-override-argument' => 'Provà a coaté ël paràmetr $1 (valor: $2) con ël valor "$3"', |
| 1904 | + 'validator-type-string' => 'test', |
| 1905 | + 'validator-type-number' => 'nùmer', |
| 1906 | + 'validator-type-integer' => 'nùmer anter', |
| 1907 | + 'validator-type-float' => 'nùmer', |
| 1908 | + 'validator-type-boolean' => 'é!/nò', |
| 1909 | + 'validator-type-char' => 'caràter', |
| 1910 | + 'validator-listerrors-errors' => 'Eror', |
| 1911 | + 'validator-listerrors-minor' => 'Pi cit', |
| 1912 | + 'validator-listerrors-low' => 'Bass', |
| 1913 | + 'validator-listerrors-normal' => 'Normal', |
| 1914 | + 'validator-listerrors-high' => 'Àut', |
| 1915 | + 'validator-listerrors-fatal' => 'Fatal', |
| 1916 | + 'validator-listerrors-description' => "A lista eror (e avis) che a son capità ant ij gancio dël parser giontà via Validator. |
| 1917 | +A lista mach ij gancio ëd parser giontà dzora andoa listerrors a l'é anserì; |
| 1918 | +piassa listerrors dzora o davzin la sima dla pagina për pijé tùit j'eror.", |
| 1919 | + 'validator-listerrors-par-minseverity' => "La minima severità d'un eror përchè a sia listà.", |
| 1920 | + 'validator-describe-description' => 'A genera documentassion për un o pi gancio ëd parser definì via Validator.', |
| 1921 | + 'validator-describe-notfound' => 'A-i é pa gnun gancio ëd parser ch\'a gestissa "$1".', |
| 1922 | + 'validator-describe-descriptionmsg' => "'''Descrission''': $1", |
| 1923 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Alias|Alias}}''': $1", |
| 1924 | + 'validator-describe-parserfunction' => 'Amplementà mach com funsion dël parser.', |
| 1925 | + 'validator-describe-tagextension' => 'Amplementà mach com estension ëd tag.', |
| 1926 | + 'validator-describe-bothhooks' => 'Amplementà sia com funsion dël parser che com estension ëd tag.', |
| 1927 | + 'validator-describe-par-hooks' => 'Ël gancio dël parser për ël qual mosté la documentassion.', |
| 1928 | + '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.", |
| 1929 | + 'validator-describe-listtype' => 'Lista ëd $1 element', |
| 1930 | + 'validator-describe-empty' => 'veuid', |
| 1931 | + 'validator-describe-required' => 'ciamà', |
| 1932 | + 'validator-describe-header-parameter' => 'Paràmetr', |
| 1933 | + 'validator-describe-header-aliases' => 'Alias', |
| 1934 | + 'validator-describe-header-type' => 'Sòrt', |
| 1935 | + 'validator-describe-header-default' => 'Për sòlit', |
| 1936 | + 'validator-describe-header-description' => 'Descrission', |
| 1937 | + 'validator-describe-parameters' => 'Paràmetr', |
| 1938 | + 'validator-describe-syntax' => 'Sintassi', |
| 1939 | + 'validator-describe-tagmin' => 'Estension ëd tag con mach ij paràmetr ciamà.', |
| 1940 | + 'validator-describe-tagmax' => 'Estension ëd tag con tùit ij paràmetr.', |
| 1941 | + 'validator-describe-tagdefault' => 'Estension ëd tag con tùit ij paràmetr an dovrand la notassion ëd default dij paràmetr.', |
| 1942 | + 'validator-describe-pfmin' => 'Funsion dël parser con mach ij paràmetr ciamà.', |
| 1943 | + 'validator-describe-pfmax' => 'Funsion dël parser con tùit ij paràmetr.', |
| 1944 | + 'validator-describe-pfdefault' => 'Funsion dël parser con tùit ij paràmetr an dovrand la notassion ëd default dij paràmetr.', |
| 1945 | + 'validator-describe-autogen' => 'Ël contnù dë sta session a l\'era auto-generà dal gancio dël parser "descriv" ëd l\'estension ëd Validator.', |
| 1946 | + 'validator_error_empty_argument' => 'Ël paràmetr $1 a peul pa avèj un valor veuid.', |
| 1947 | + 'validator_error_must_be_number' => 'Ël paràmetr $1 a peul mach esse un nùmer.', |
| 1948 | + 'validator_error_must_be_integer' => "Ël paràmetr $1 a peul mach esse n'antregh.", |
| 1949 | + 'validator-error-must-be-float' => 'Ël paràmetr $1 a peul mach esse un nùmer an vìrgola mòbil.', |
| 1950 | + 'validator_error_invalid_range' => 'Ël paràmetr $1 a deuv esse an tra $2 e $3.', |
| 1951 | + 'validator-error-invalid-regex' => 'Ël paràmetr $1 a dev cobiesse con sta espression regolar: $2.', |
| 1952 | + 'validator-error-invalid-length' => 'Ël paràmetr $1 a dev avèj na longheur ëd $2.', |
| 1953 | + 'validator-error-invalid-length-range' => 'Ël paràmetr $1 a dev avèj na longheur antra $2 e $3.', |
| 1954 | + 'validator_error_invalid_argument' => "Ël valor $1 a l'é pa bon për ël paràmetr $2.", |
| 1955 | + 'validator_list_error_empty_argument' => 'Ël paràmetr $1 a aceta pa dij valor veuid.', |
| 1956 | + 'validator_list_error_must_be_number' => 'Ël paràmetr $1 a peul mach conten-e dij nùmer.', |
| 1957 | + 'validator_list_error_must_be_integer' => "Ël paràmetr $1 a peul mach conten-e dj'antegr.", |
| 1958 | + 'validator-list-error-must-be-float' => 'Ël paràmetr $1 a peul mach conten-e dij nùmer con vìrgola.', |
| 1959 | + 'validator_list_error_invalid_range' => 'Tùit ij valor dël paràmetr $1 a deuvo esse tra $2 e $3.', |
| 1960 | + 'validator-list-error-invalid-regex' => 'Tùit ij valor dël paràmetr $1 a devo cobiesse con sta espression regolar: $2.', |
| 1961 | + 'validator_list_error_invalid_argument' => 'Un o pi valor dël paràmetr $1 a son pa bon.', |
| 1962 | + 'validator-list-error-accepts-only' => 'Un o pi valor për ël paràmetr $1 a son pa bon. |
| 1963 | +A aceta mach {{PLURAL:$3|sto valor|sti valor}}: $2.', |
| 1964 | + 'validator-list-error-accepts-only-omitted' => 'Un o pi valor për ël paràmetr $1 a son pa bon. |
| 1965 | +A aceta mach {{PLURAL:$3|sto valor|sti valor}}: $2 (e $4 {{PLURAL:$4|valor|valor}} sautà).', |
| 1966 | + '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.', |
| 1967 | + '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).', |
| 1968 | + 'validator_list_omitted' => "{{PLURAL:$2|Ël valor|Ij valor}} $1 {{PLURAL:$2|a l'é|a son}} pa stàit butà.", |
| 1969 | +); |
| 1970 | + |
| 1971 | +/** Pashto (پښتو) |
| 1972 | + * @author Ahmed-Najib-Biabani-Ibrahimkhel |
| 1973 | + */ |
| 1974 | +$messages['ps'] = array( |
| 1975 | + 'validator-type-string' => 'متن', |
| 1976 | + 'validator-type-number' => 'شمېره', |
| 1977 | + 'validator-type-float' => 'شمېره', |
| 1978 | + 'validator-type-boolean' => 'هو/نه', |
| 1979 | + 'validator-type-char' => 'لوښه', |
| 1980 | + 'validator-listerrors-normal' => 'نورمال', |
| 1981 | + 'validator-describe-empty' => 'تش', |
| 1982 | + 'validator-describe-header-default' => 'تلواليز', |
| 1983 | +); |
| 1984 | + |
| 1985 | +/** Portuguese (Português) |
| 1986 | + * @author Giro720 |
| 1987 | + * @author Hamilton Abreu |
| 1988 | + * @author Lijealso |
| 1989 | + * @author Waldir |
| 1990 | + */ |
| 1991 | +$messages['pt'] = array( |
| 1992 | + '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', |
| 1993 | + 'validator-warning' => 'Aviso: $1', |
| 1994 | + 'validator-error' => 'Erro: $1', |
| 1995 | + 'validator-fatal-error' => 'Erro fatal: $1', |
| 1996 | + 'validator_error_parameters' => '{{PLURAL:$1|Foi detectado o seguinte erro sintáctico|Foram detectados os seguintes erros sintácticos}}:', |
| 1997 | + 'validator_warning_parameters' => '{{PLURAL:$1|Existe um erro sintáctico|Existem erros sintácticos}}.', |
| 1998 | + 'validator-warning-adittional-errors' => '... e {{PLURAL:$1|mais um problema|vários outros problemas}}.', |
| 1999 | + 'validator-error-omitted' => '{{PLURAL:$2|O valor "$1" foi omitido|Os valores "$1" foram omitidos}}.', |
| 2000 | + 'validator-error-problem' => 'Houve um problema com o parâmetro $1.', |
| 2001 | + 'validator_error_unknown_argument' => '$1 não é um parâmetro válido.', |
| 2002 | + 'validator_error_required_missing' => 'O parâmetro obrigatório $1 não foi fornecido.', |
| 2003 | + 'validator-error-override-argument' => 'Tentativa de sobrepor o parâmetro $1 (valor: $2) com o valor "$3"', |
| 2004 | + 'validator-type-string' => 'texto', |
| 2005 | + 'validator-type-number' => 'número', |
| 2006 | + 'validator-type-integer' => 'número inteiro', |
| 2007 | + 'validator-type-float' => 'número', |
| 2008 | + 'validator-type-boolean' => 'sim/não', |
| 2009 | + 'validator-type-char' => 'carácter', |
| 2010 | + 'validator-listerrors-errors' => 'Erros', |
| 2011 | + 'validator-listerrors-minor' => 'Menor', |
| 2012 | + 'validator-listerrors-low' => 'Baixo', |
| 2013 | + 'validator-listerrors-normal' => 'Normal', |
| 2014 | + 'validator-listerrors-high' => 'Alto', |
| 2015 | + 'validator-listerrors-fatal' => 'Fatal', |
| 2016 | + '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. |
| 2017 | +Da lista constarão apenas os hooks que apareçam acima do ponto na página onde está listerrors; |
| 2018 | +para obter todos os erros, coloque listerrors ao fundo da página.', |
| 2019 | + 'validator-listerrors-par-minseverity' => 'A gravidade mínima de um problema, para que este seja listado.', |
| 2020 | + 'validator-describe-description' => 'Gera documentação para um ou mais hooks do analisador sintáctico definidos através do Serviço de Validação.', |
| 2021 | + 'validator-describe-notfound' => 'Não existe nenhum hook para lidar com "$1".', |
| 2022 | + 'validator-describe-descriptionmsg' => "'''Descrição''': $1", |
| 2023 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Nome alternativo|Nomes alternativos}}''': $1", |
| 2024 | + 'validator-describe-parserfunction' => 'Implementada apenas como função do analisador sintáctico.', |
| 2025 | + 'validator-describe-tagextension' => 'Implementada apenas como extensão de tag.', |
| 2026 | + 'validator-describe-bothhooks' => 'Implementada como função do analisador sintáctico e como extensão de tag.', |
| 2027 | + 'validator-describe-par-hooks' => 'Os hooks do analisador sintáctico para os quais será mostrada documentação.', |
| 2028 | + 'validator-describe-par-pre' => 'Permite obter o texto wiki real da documentação, sem que este seja formatado na página.', |
| 2029 | + 'validator-describe-listtype' => 'Lista de $1 elementos', |
| 2030 | + 'validator-describe-empty' => 'vazio', |
| 2031 | + 'validator-describe-required' => 'necessário', |
| 2032 | + 'validator-describe-header-parameter' => 'Parâmetro', |
| 2033 | + 'validator-describe-header-aliases' => 'Nomes alternativos', |
| 2034 | + 'validator-describe-header-type' => 'Tipo', |
| 2035 | + 'validator-describe-header-default' => 'Por omissão', |
| 2036 | + 'validator-describe-header-description' => 'Descrição', |
| 2037 | + 'validator-describe-parameters' => 'Parâmetros', |
| 2038 | + 'validator-describe-syntax' => 'Sintaxe', |
| 2039 | + 'validator-describe-tagmin' => 'Extensão de tag só com os parâmetros obrigatórios.', |
| 2040 | + 'validator-describe-tagmax' => 'Extensão de tag com todos os parâmetros.', |
| 2041 | + 'validator-describe-tagdefault' => 'Extensão de tag com todos os parâmetros, usando a notação do parâmetro por omissão.', |
| 2042 | + 'validator-describe-pfmin' => 'Função do analisador sintáctico só com os parâmetros obrigatórios.', |
| 2043 | + 'validator-describe-pfmax' => 'Função do analisador sintáctico com todos os parâmetros.', |
| 2044 | + 'validator-describe-pfdefault' => 'Função do analisador sintáctico com todos os parâmetros, usando a notação do parâmetro por omissão.', |
| 2045 | + '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.', |
| 2046 | + 'validator_error_empty_argument' => 'O parâmetro $1 não pode estar vazio.', |
| 2047 | + 'validator_error_must_be_number' => 'O parâmetro $1 só pode ser numérico.', |
| 2048 | + 'validator_error_must_be_integer' => 'O parâmetro $1 só pode ser um número inteiro.', |
| 2049 | + 'validator-error-must-be-float' => 'O parâmetro $1 só pode ser um número de vírgula flutuante.', |
| 2050 | + 'validator_error_invalid_range' => 'O parâmetro $1 tem de ser entre $2 e $3.', |
| 2051 | + 'validator-error-invalid-regex' => 'O parâmetro $1 deve corresponder à expressão regular: $2.', |
| 2052 | + 'validator-error-invalid-length' => 'O parâmetro $1 tem de ter um comprimento de $2.', |
| 2053 | + 'validator-error-invalid-length-range' => 'O parâmetro $1 tem de ter um comprimento entre $2 e $3.', |
| 2054 | + 'validator_error_invalid_argument' => 'O valor $1 não é válido para o parâmetro $2.', |
| 2055 | + 'validator_list_error_empty_argument' => 'O parâmetro $1 não pode estar vazio.', |
| 2056 | + 'validator_list_error_must_be_number' => 'O parâmetro $1 só pode ser numérico.', |
| 2057 | + 'validator_list_error_must_be_integer' => 'O parâmetro $1 só pode ser um número inteiro.', |
| 2058 | + 'validator-list-error-must-be-float' => 'O parâmetro $1 só pode conter valores de vírgula flutuante.', |
| 2059 | + 'validator_list_error_invalid_range' => 'Todos os valores do parâmetro $1 têm de ser entre $2 e $3.', |
| 2060 | + 'validator-list-error-invalid-regex' => 'Todos os valores do parâmetro $1 devem corresponder à expressão regular: $2.', |
| 2061 | + 'validator_list_error_invalid_argument' => 'Um ou mais valores do parâmetro $1 são inválidos.', |
| 2062 | + 'validator-list-error-accepts-only' => 'Um ou mais valores para o parâmetro $1 são inválidos. |
| 2063 | +Só {{PLURAL:$3|é aceite este valor|são aceites estes valores}}: $2.', |
| 2064 | + 'validator-list-error-accepts-only-omitted' => 'Um ou mais valores para o parâmetro $1 são inválidos. |
| 2065 | +Só {{PLURAL:$3|é aceite este valor|são aceites estes valores}}: $2 (e $4 {{PLURAL:$4|valor omitido|valores omitidos}}).', |
| 2066 | + '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.', |
| 2067 | + 'validator-error-accepts-only-omitted' => 'O valor $2 não é válido para o parâmetro $1. |
| 2068 | +Só {{PLURAL:$5|é aceite este valor|são aceites estes valores}}: $3 (e $4 {{PLURAL:$4|valor omitido|valores omitidos}}).', |
| 2069 | + 'validator_list_omitted' => '{{PLURAL:$2|O valor $1 foi omitido|Os valores $1 foram omitidos}}.', |
| 2070 | +); |
| 2071 | + |
| 2072 | +/** Brazilian Portuguese (Português do Brasil) |
| 2073 | + * @author Giro720 |
| 2074 | + * @author Luckas Blade |
| 2075 | + */ |
| 2076 | +$messages['pt-br'] = array( |
| 2077 | + 'validator-desc' => 'Fornece suporte a manipulação de parâmetros genéricos para outras extensões', |
| 2078 | + 'validator-warning' => 'Atenção: $1', |
| 2079 | + 'validator-error' => 'Erro: $1', |
| 2080 | + 'validator-fatal-error' => 'Erro crítico: $1', |
| 2081 | + 'validator_error_parameters' => '{{PLURAL:$1|Foi detectado o seguinte erro sintáctico|Foram detectados os seguintes erros sintácticos}}:', |
| 2082 | + 'validator_warning_parameters' => '{{PLURAL:$1|Existe um erro|Existem erros}} em sua sintaxe.', |
| 2083 | + 'validator-warning-adittional-errors' => '... e {{PLURAL:$1|mais um problema|vários outros problemas}}.', |
| 2084 | + 'validator-error-omitted' => '{{PLURAL:$2|O valor "$1" foi omitido|Os valores "$1" foram omitidos}}.', |
| 2085 | + 'validator-error-problem' => 'Houve um problema com o parâmetro $1.', |
| 2086 | + 'validator_error_unknown_argument' => '$1 não é um parâmetro válido.', |
| 2087 | + 'validator_error_required_missing' => 'O parâmetro obrigatório $1 não foi fornecido.', |
| 2088 | + 'validator-error-override-argument' => 'Tentativa de sobrepor o parâmetro $1 (valor: $2) com o valor "$3"', |
| 2089 | + 'validator-type-string' => 'texto', |
| 2090 | + 'validator-type-number' => 'número', |
| 2091 | + 'validator-type-integer' => 'número inteiro', |
| 2092 | + 'validator-listerrors-errors' => 'Erros', |
| 2093 | + 'validator-listerrors-minor' => 'Menor', |
| 2094 | + 'validator-listerrors-low' => 'Baixo', |
| 2095 | + 'validator-listerrors-normal' => 'Normal', |
| 2096 | + 'validator-listerrors-high' => 'Alto', |
| 2097 | + 'validator-listerrors-fatal' => 'Fatal', |
| 2098 | + 'validator_error_empty_argument' => 'O parâmetro $1 não pode estar vazio.', |
| 2099 | + 'validator_error_must_be_number' => 'O parâmetro $1 só pode ser numérico.', |
| 2100 | + 'validator_error_must_be_integer' => 'O parâmetro $1 só pode ser um número inteiro.', |
| 2101 | + 'validator-error-must-be-float' => 'O parâmetro $1 deve ser um número de ponto flutuante.', |
| 2102 | + 'validator_error_invalid_range' => 'O parâmetro $1 tem de ser entre $2 e $3.', |
| 2103 | + 'validator-error-invalid-regex' => 'O parâmetro $1 deve corresponder à expressão regular: $2.', |
| 2104 | + 'validator-error-invalid-length' => 'O parâmetro $1 deve ter um comprimento de $2.', |
| 2105 | + 'validator-error-invalid-length-range' => 'O parâmetro $1 deve ter um comprimento entre $2 e $3.', |
| 2106 | + 'validator_error_invalid_argument' => 'O valor $1 não é válido para o parâmetro $2.', |
| 2107 | + 'validator_list_error_empty_argument' => 'O parâmetro $1 não pode estar vazio.', |
| 2108 | + 'validator_list_error_must_be_number' => 'O parâmetro $1 só pode ser numérico.', |
| 2109 | + 'validator_list_error_must_be_integer' => 'O parâmetro $1 só pode ser um número inteiro.', |
| 2110 | + 'validator-list-error-must-be-float' => 'O parâmetro $1 só pode conter valores de ponto flutuante.', |
| 2111 | + 'validator_list_error_invalid_range' => 'Todos os valores do parâmetro $1 têm de ser entre $2 e $3.', |
| 2112 | + 'validator-list-error-invalid-regex' => 'Todos os valores do parâmetro $1 devem corresponder à expressão regular: $2.', |
| 2113 | + 'validator_list_error_invalid_argument' => 'Um ou mais valores do parâmetro $1 são inválidos.', |
| 2114 | + 'validator-list-error-accepts-only' => 'Um ou mais valores para o parâmetro $1 são inválidos. |
| 2115 | +Só {{PLURAL:$3|é aceite este valor|são aceites estes valores}}: $2.', |
| 2116 | + 'validator-list-error-accepts-only-omitted' => 'Um ou mais valores para o parâmetro $1 são inválidos. |
| 2117 | +Só {{PLURAL:$3|é aceite este valor|são aceites estes valores}}: $2 (e $4 {{PLURAL:$4|valor omitido|valores omitidos}}).', |
| 2118 | + '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.', |
| 2119 | + 'validator-error-accepts-only-omitted' => 'O valor $2 não é válido para o parâmetro $1. |
| 2120 | +Só {{PLURAL:$5|é aceite este valor|são aceites estes valores}}: $3 (e $4 {{PLURAL:$4|valor omitido|valores omitidos}}).', |
| 2121 | + 'validator_list_omitted' => '{{PLURAL:$2|O valor $1 foi omitido|Os valores $1 foram omitidos}}.', |
| 2122 | +); |
| 2123 | + |
| 2124 | +/** Romanian (Română) |
| 2125 | + * @author Stelistcristi |
| 2126 | + */ |
| 2127 | +$messages['ro'] = array( |
| 2128 | + 'validator-warning' => 'Avertisment: $1', |
| 2129 | + 'validator-fatal-error' => 'Eroare fatală: $1', |
| 2130 | + 'validator_error_unknown_argument' => '$1 nu este un parametru valid.', |
| 2131 | + 'validator_error_required_missing' => 'Parametrul solicitat „$1” nu este furnizat.', |
| 2132 | + 'validator-listerrors-errors' => 'Erori', |
| 2133 | + 'validator_error_empty_argument' => 'Parametrul $1 nu poate avea o valoare goală.', |
| 2134 | + 'validator_error_must_be_number' => 'Parametrul $1 poate fi doar un număr.', |
| 2135 | + 'validator_error_must_be_integer' => 'Parametrul $1 poate fi doar un număr întreg.', |
| 2136 | +); |
| 2137 | + |
| 2138 | +/** Russian (Русский) |
| 2139 | + * @author Aleksandrit |
| 2140 | + * @author Eleferen |
| 2141 | + * @author Haffman |
| 2142 | + * @author Lockal |
| 2143 | + * @author MaxSem |
| 2144 | + * @author McDutchie |
| 2145 | + * @author Александр Сигачёв |
| 2146 | + */ |
| 2147 | +$messages['ru'] = array( |
| 2148 | + 'validator-desc' => 'Валидатор предоставляет другим расширениям возможности проверки параметров функций парсера и тегов, установки значения по умолчанию и создания сообщения об ошибках', |
| 2149 | + 'validator-warning' => 'Внимание: $1', |
| 2150 | + 'validator-error' => 'Ошибка: $1', |
| 2151 | + 'validator-fatal-error' => 'Критическая ошибка: $1', |
| 2152 | + 'validator_error_parameters' => 'В вашем синтаксисе {{PLURAL:$1|обнаружена следующая ошибка|обнаружены следующие ошибки}}:', |
| 2153 | + 'validator_warning_parameters' => 'В вашем синтаксисе {{PLURAL:$1|имеется ошибка|имеются ошибки}}.', |
| 2154 | + 'validator-warning-adittional-errors' => '… и {{PLURAL:$1|ещё одна проблема|ещё несколько проблем}}.', |
| 2155 | + 'validator-error-omitted' => '{{PLURAL:$2|Значение «$1» пропущено|Значения «$1» пропущены}}.', |
| 2156 | + 'validator-error-problem' => 'Обнаружена проблема с параметром «$1».', |
| 2157 | + 'validator_error_unknown_argument' => '$1 не является допустимым параметром.', |
| 2158 | + 'validator_error_required_missing' => 'Не указан обязательный параметр $1.', |
| 2159 | + 'validator-error-override-argument' => 'Попытка переопределения параметра $1 (значение: $2) значением «$3»', |
| 2160 | + 'validator-type-string' => 'текст', |
| 2161 | + 'validator-type-number' => 'число', |
| 2162 | + 'validator-type-integer' => 'целое число', |
| 2163 | + 'validator-type-float' => 'число', |
| 2164 | + 'validator-type-boolean' => 'да/нет', |
| 2165 | + 'validator-type-char' => 'символ', |
| 2166 | + 'validator-listerrors-errors' => 'Ошибки', |
| 2167 | + 'validator-listerrors-minor' => 'Незначительная', |
| 2168 | + 'validator-listerrors-low' => 'Низкая', |
| 2169 | + 'validator-listerrors-normal' => 'Обычная', |
| 2170 | + 'validator-listerrors-high' => 'Высокая', |
| 2171 | + 'validator-listerrors-fatal' => 'Фатальная', |
| 2172 | + 'validator-listerrors-description' => 'Перечисляет ошибки (и предупреждения), произошедшие в обработчиках парсера, добавленных с помощью Validator. |
| 2173 | +Выводятся только обработчики парсера, добавленные выше вставленно listerrors. |
| 2174 | +Поместите listerrors в самый конец страницы, чтобы получить все ошибки.', |
| 2175 | + 'validator-listerrors-par-minseverity' => 'Минимальная серьезность вопроса, для включения в список.', |
| 2176 | + 'validator-describe-description' => 'Создает документацию для одного или нескольких обработчиков парсера, по пределениям Validator.', |
| 2177 | + 'validator-describe-notfound' => 'Не существует обработчика парсера для «$1».', |
| 2178 | + 'validator-describe-descriptionmsg' => "'''Описание''': $1", |
| 2179 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Псевдоним|Псевдонимы}}''': $1", |
| 2180 | + 'validator-describe-parserfunction' => 'Реализована только функция парсера.', |
| 2181 | + 'validator-describe-tagextension' => 'Реализовано только как дополнительный тег.', |
| 2182 | + 'validator-describe-bothhooks' => 'Реализовано и функция парсера, и дополнительный тег.', |
| 2183 | + 'validator-describe-par-hooks' => 'Обработчик парсера, для которого отображать документацию.', |
| 2184 | + 'validator-describe-par-pre' => 'Позволяет получить фактический викитекст для документации, без показа на странице.', |
| 2185 | + 'validator-describe-listtype' => 'Перечень пунктов $1', |
| 2186 | + 'validator-describe-empty' => 'пусто', |
| 2187 | + 'validator-describe-required' => 'требуется', |
| 2188 | + 'validator-describe-header-parameter' => 'Параметр', |
| 2189 | + 'validator-describe-header-aliases' => 'Псевдонимы', |
| 2190 | + 'validator-describe-header-type' => 'Тип', |
| 2191 | + 'validator-describe-header-default' => 'По умолчанию', |
| 2192 | + 'validator-describe-header-description' => 'Описание', |
| 2193 | + 'validator-describe-parameters' => 'Параметры', |
| 2194 | + 'validator-describe-syntax' => 'Синтаксис', |
| 2195 | + 'validator-describe-tagmin' => 'Теговое расширение, имеющее только обязательные параметры.', |
| 2196 | + 'validator-describe-tagmax' => 'Теговое расширение со всеми параметрами.', |
| 2197 | + 'validator-describe-tagdefault' => 'Теговое расширение со всеми параметрами, использованием параметров по умолчанию.', |
| 2198 | + 'validator-describe-pfmin' => 'Парсерная функция, имеющая только обязательные параметры.', |
| 2199 | + 'validator-describe-pfmax' => 'Парсерная функция со всеми параметрами.', |
| 2200 | + 'validator-describe-pfdefault' => 'Парсерная функция со всеми параметрами, использованием параметров по умолчанию.', |
| 2201 | + 'validator-describe-autogen' => 'Содержимое этого раздела было автоматически создано парсерным обработчиком «describe» расширения Validator.', |
| 2202 | + 'validator_error_empty_argument' => 'Параметр $1 не может принимать пустое значение.', |
| 2203 | + 'validator_error_must_be_number' => 'Значением параметра $1 могут быть только числа.', |
| 2204 | + 'validator_error_must_be_integer' => 'Параметр $1 может быть только целым числом.', |
| 2205 | + 'validator-error-must-be-float' => 'Параметр $1 может быть числом с плавающей точкой.', |
| 2206 | + 'validator_error_invalid_range' => 'Параметр $1 должен быть от $2 до $3.', |
| 2207 | + 'validator-error-invalid-regex' => 'Параметр «$1» должен соответствовать регулярному выражению «$2».', |
| 2208 | + 'validator-error-invalid-length' => 'Параметр $1 должен иметь длину $2.', |
| 2209 | + 'validator-error-invalid-length-range' => 'Параметр $1 должен иметь длину от $2 до $3.', |
| 2210 | + 'validator_error_invalid_argument' => 'Значение $1 не является допустимым параметром $2', |
| 2211 | + 'validator_list_error_empty_argument' => 'Параметр $1 не может принимать пустые значения.', |
| 2212 | + 'validator_list_error_must_be_number' => 'Параметр $1 может содержать только цифры.', |
| 2213 | + 'validator_list_error_must_be_integer' => 'Параметр $1 может содержать только целые числа.', |
| 2214 | + 'validator-list-error-must-be-float' => 'Параметр «$1» может содержать только числа с плавающей точкой.', |
| 2215 | + 'validator_list_error_invalid_range' => 'Все значения параметра $1 должна находиться в диапазоне от $2 до $3.', |
| 2216 | + 'validator-list-error-invalid-regex' => 'Все значения параметра «$1» должны соответствовать регулярноve выражению «$2».', |
| 2217 | + 'validator_list_error_invalid_argument' => 'Одно или несколько значений параметра $1 ошибочны.', |
| 2218 | + 'validator-list-error-accepts-only' => 'Ошибочны один или несколько значений параметра $1. |
| 2219 | +{{PLURAL:$3|Допустимо только следующее значение|Допустимы только следующие значения}}: $2.', |
| 2220 | + 'validator-list-error-accepts-only-omitted' => 'Ошибочны один или несколько значений параметра $1. |
| 2221 | +{{PLURAL:$3|Допустимо только следующее значение|Допустимы только следующие значения}}: $2 (и $4 {{PLURAL:$4|опущенное значение|опущенных значения|опущенных значений}}).', |
| 2222 | + 'validator_error_accepts_only' => 'Значение «$4» не подходит для параметра $1. Оно может принимать только {{PLURAL:$3|следующее значение|следующие значения}}: $2.', |
| 2223 | + 'validator-error-accepts-only-omitted' => 'Значение «$2» не подходит для параметра $1. |
| 2224 | +{{PLURAL:$5|Допускается только значение|Допускаются только значения}}: $3 (и $4 {{PLURAL:$4|пропущенное значение|пропущенных значения|пропущенных значений}}).', |
| 2225 | + 'validator_list_omitted' => '{{PLURAL:$2|Значение $1 было пропущено|Значения $1 были пропущены}}.', |
| 2226 | +); |
| 2227 | + |
| 2228 | +/** Sinhala (සිංහල) |
| 2229 | + * @author Calcey |
| 2230 | + */ |
| 2231 | +$messages['si'] = array( |
| 2232 | + 'validator-desc' => 'තහවුරු කරන්නා ටැග් දිඟුවන් හා parser ශ්රිතවල පරාමිතීන් තහවුරු කිරීමට අනෙක් දිඟුවන් සඳහා පහසු ක්රමයක් සපයයි,පෙරනිමි අගයන් පිහිටුවීම හා දෝෂ පණිවුඩ ජනනය කිරීම ද සිදු කරයි', |
| 2233 | + 'validator_error_parameters' => 'ඔබේ වාග් රීතිය මඟින් පහත {{PLURAL:$1|දෝෂය|දෝෂයන්}} අනාවරණය කරනු ලැබ ඇත', |
| 2234 | + 'validator_error_unknown_argument' => '$1 වලංගු පරාමිතියක් නොවේ.', |
| 2235 | + 'validator_error_required_missing' => 'අවශ්ය වන $1 පරාමිතිය සපයා නොමැත.', |
| 2236 | + 'validator_error_empty_argument' => '$1 පරාමිතියට හිස් අගයක් තිබිය නොහැක.', |
| 2237 | + 'validator_error_must_be_number' => '$1 පරාමිතිය විය හැක්කේ ඉලක්කමක් පමණි.', |
| 2238 | + 'validator_error_invalid_range' => '$1 පරාමිතිය $2 හා $3 අතර විය යුතුය.', |
| 2239 | + 'validator_error_invalid_argument' => '$2 පරාමිතිය සඳහා $1 අගය වලංගු නොවේ.', |
| 2240 | + 'validator_error_accepts_only' => '$1 පරාමිතිය විසින් පිළිගනු ලබන්නේ {{PLURAL:$3|මෙම අගය|මෙම අගයන්}}: $2 පමණි.', |
| 2241 | +); |
| 2242 | + |
| 2243 | +/** Swedish (Svenska) |
| 2244 | + * @author Fluff |
| 2245 | + * @author Ozp |
| 2246 | + * @author Per |
| 2247 | + * @author Sertion |
| 2248 | + */ |
| 2249 | +$messages['sv'] = array( |
| 2250 | + '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', |
| 2251 | + 'validator_error_parameters' => 'Följande {{PLURAL:$1|fel|fel}} har upptäckts i din syntax:', |
| 2252 | + 'validator_warning_parameters' => 'Det finns {{PLURAL:$1|ett|flera}} fel i din syntax.', |
| 2253 | + 'validator_error_unknown_argument' => '$1 är inte en giltig paramter.', |
| 2254 | + 'validator_error_required_missing' => 'Den nödvändiga parametern $1 har inte angivits.', |
| 2255 | + 'validator_error_empty_argument' => 'Parametern $1 kan inte lämnas tom.', |
| 2256 | + 'validator_error_must_be_number' => 'Parameter $1 måste bestå av ett tal.', |
| 2257 | + 'validator_error_must_be_integer' => 'Parametern $1 måste vara ett heltal.', |
| 2258 | + 'validator_error_invalid_range' => 'Parameter $1 måste vara i mellan $2 och $3.', |
| 2259 | + 'validator_error_invalid_argument' => 'Värdet $1 är inte giltigt som parameter $2.', |
| 2260 | + 'validator_list_error_empty_argument' => 'Parameter $1 accepterar inte tomma värden.', |
| 2261 | + 'validator_list_error_must_be_number' => 'Parameter $1 får endast innehålla siffror.', |
| 2262 | + 'validator_list_error_must_be_integer' => 'Parameter $1 får endast innehålla heltal.', |
| 2263 | + 'validator_list_error_invalid_range' => 'Alla värden av parameter $1 måste vara mellan $2 och $3.', |
| 2264 | + 'validator_list_error_invalid_argument' => 'Ett eller flera värden av parameter $1 är ogiltiga.', |
| 2265 | + 'validator_error_accepts_only' => 'Parametern $1 måste ha {{PLURAL:$3|detta värde|ett av dessa värden}}: $2.', |
| 2266 | + 'validator_list_omitted' => '{{PLURAL:$2|Värdet|Värdena}} $1 har blivit {{PLURAL:$2|utelämnat|utelämnade}}.', |
| 2267 | +); |
| 2268 | + |
| 2269 | +/** Telugu (తెలుగు) |
| 2270 | + * @author Ravichandra |
| 2271 | + * @author Veeven |
| 2272 | + */ |
| 2273 | +$messages['te'] = array( |
| 2274 | + 'validator-warning' => 'హెచ్చరిక: $1', |
| 2275 | + 'validator-error' => 'పొరపాటు: $1', |
| 2276 | + 'validator_error_unknown_argument' => '$1 అనేది సరైన పరామితి కాదు.', |
| 2277 | + 'validator_error_required_missing' => 'తప్పకుండా కావాల్సిన $1 పరామితిని ఇవ్వలేదు.', |
| 2278 | + 'validator-type-string' => 'పాఠ్యం', |
| 2279 | + 'validator-type-number' => 'సంఖ్య', |
| 2280 | + 'validator-type-integer' => 'పూర్ణ సంఖ్య', |
| 2281 | + 'validator-type-float' => 'సంఖ్య', |
| 2282 | + 'validator-type-boolean' => 'అవును/కాదు', |
| 2283 | + 'validator-listerrors-errors' => 'పొరపాట్లు', |
| 2284 | + 'validator-describe-descriptionmsg' => "'''వివరణ''': $1", |
| 2285 | + 'validator-describe-required' => 'తప్పనిసరి', |
| 2286 | + 'validator-describe-header-aliases' => 'మారుపేర్లు', |
| 2287 | + 'validator-describe-header-type' => 'రకం', |
| 2288 | + 'validator-describe-header-default' => 'అప్రమేయం', |
| 2289 | + 'validator-describe-header-description' => 'వివరణ', |
| 2290 | + 'validator-describe-parameters' => 'పరామితులు', |
| 2291 | + 'validator_error_empty_argument' => '$1 పరామితి ఖాళీగా ఉండకూడదు', |
| 2292 | + 'validator_error_must_be_number' => '$1 పరామితి ఖచ్చితంగా ఓ సంఖ్య అయిఉండాలి', |
| 2293 | + 'validator_error_must_be_integer' => '$1 పరామితి ఒక పూర్ణసంఖ్య అయిఉండాలి', |
| 2294 | + 'validator_error_invalid_range' => '$1 పరామితి $2, $3 మద్యలో ఉండాలి.', |
| 2295 | + 'validator_error_invalid_argument' => '$2 పరామితి కోసం $1 విలువ సరైంది కాదు', |
| 2296 | + 'validator_list_error_must_be_number' => '$1 పరామితి ఖచ్చితంగా సంఖ్యలను మాత్రమే కలిగివుండాలి.', |
| 2297 | + 'validator_list_error_must_be_integer' => '$1 పరామితి పూర్ణసంఖ్యలను మాత్రమే కలిగివుండాలి.', |
| 2298 | +); |
| 2299 | + |
| 2300 | +/** Tagalog (Tagalog) |
| 2301 | + * @author AnakngAraw |
| 2302 | + */ |
| 2303 | +$messages['tl'] = array( |
| 2304 | + 'validator-desc' => 'Nagbibigay ng panlahatang magtangkilik na paghawak sa ibang mga dugtong', |
| 2305 | + 'validator-warning' => 'Babala: $1', |
| 2306 | + 'validator-error' => 'Kamalian: $1', |
| 2307 | + 'validator-fatal-error' => 'Masidhing kamalian: $1', |
| 2308 | + 'validator_error_parameters' => 'Ang sumusunod na {{PLURAL:$1|kamalian|mga kamalian}} ay napansin sa iyong sintaks:', |
| 2309 | + 'validator_warning_parameters' => 'May {{PLURAL:$1|mali|mga mali}} sa sintaks mo.', |
| 2310 | + 'validator-warning-adittional-errors' => '... at {{PLURAL:$1|isa pang paksa|maramihan pang mga paksa}}.', |
| 2311 | + 'validator-error-omitted' => 'Ang {{PLURAL:$2|halagang "$1" ay|mga halaga "$1" ay}} natanggal na.', |
| 2312 | + 'validator-error-problem' => 'Nagkaroon ng suliranin sa parametrong $1.', |
| 2313 | + 'validator_error_unknown_argument' => 'Ang $1 ay isang hindi tanggap na parametro.', |
| 2314 | + 'validator_error_required_missing' => 'Hindi ibinigay ang kailangang parametro na $1.', |
| 2315 | + 'validator-error-override-argument' => 'Sinubukang pangingibabawan ang parametrong $1 (halaga: $2) ng halagang "$3"', |
| 2316 | + 'validator-type-string' => 'teksto', |
| 2317 | + 'validator-type-number' => 'bilang', |
| 2318 | + 'validator-type-integer' => 'buong bilang', |
| 2319 | + 'validator-type-float' => 'bilang', |
| 2320 | + 'validator-type-boolean' => 'oo/hindi', |
| 2321 | + 'validator-type-char' => 'panitik', |
| 2322 | + 'validator-listerrors-errors' => 'Mga kamalian', |
| 2323 | + 'validator-listerrors-minor' => 'Munti', |
| 2324 | + 'validator-listerrors-low' => 'Mababa', |
| 2325 | + 'validator-listerrors-normal' => 'Karaniwan', |
| 2326 | + 'validator-listerrors-high' => 'Mataas', |
| 2327 | + 'validator-listerrors-fatal' => 'Nakamamatay', |
| 2328 | + 'validator-listerrors-par-minseverity' => 'Ang pinakamaliit na kalubhaan ng isang paksa para ito maitala.', |
| 2329 | + 'validator-describe-description' => 'Bumbuo ng dokumentasyon para sa isa o mahigit pang mga kalawit na pambanghay na binigyan ng kahulugan sa pamamagitan ng Tagapagpatunay.', |
| 2330 | + 'validator-describe-notfound' => 'Walang kawit ng pambanghay na humahawak sa "$1".', |
| 2331 | + 'validator-describe-descriptionmsg' => "'''Paglalarawan''': $1", |
| 2332 | + 'validator-describe-aliases' => "'''{{PLURAL:$2|Taguri|Mga taguri}}''': $1", |
| 2333 | + 'validator-describe-parserfunction' => 'Ipinatupad lamang bilang tungkuling pambanghay.', |
| 2334 | + 'validator-describe-tagextension' => 'Ipinatupad lamang bilang dugtong ng tatak.', |
| 2335 | + 'validator-describe-bothhooks' => 'Ipinatupad bilang kapwa tungkulin ng pambanghay at bilang dugtong ng tatak.', |
| 2336 | + 'validator-describe-par-hooks' => 'Ang mga kalawit ng pambanghay para kung saan ipapakita ang dokumentasyon.', |
| 2337 | + 'validator-describe-listtype' => 'Tala ng $1 mga bagay', |
| 2338 | + 'validator-describe-empty' => 'walang laman', |
| 2339 | + 'validator-describe-required' => 'kailangan', |
| 2340 | + 'validator-describe-header-parameter' => 'parametro', |
| 2341 | + 'validator-describe-header-aliases' => 'Mga taguri', |
| 2342 | + 'validator-describe-header-type' => 'Uri', |
| 2343 | + 'validator-describe-header-default' => 'Likas na nakatakda', |
| 2344 | + 'validator-describe-header-description' => 'Paglalarawan', |
| 2345 | + 'validator-describe-parameters' => 'Mga parametro', |
| 2346 | + 'validator-describe-syntax' => 'Palaugnayan', |
| 2347 | + 'validator-describe-tagmin' => 'Tatakan ang mga dugtong na may kinakailangang mga parametro lamang.', |
| 2348 | + 'validator-describe-tagmax' => 'Dugtong ng tatak na mayroon ng lahat ng mga parametro.', |
| 2349 | + 'validator-describe-tagdefault' => 'Dugtong ng tatak na mayroon ng lahat ng mga parametro na ginagamit ang likas na nakatakdang talihalat ng parametro.', |
| 2350 | + 'validator-describe-pfmin' => 'Tungkuling pambanghay na mayroon lamang ng kinakailangang mga parametro.', |
| 2351 | + 'validator-describe-pfmax' => 'Tungkulin ng pambanghay na mayroon ng lahat ng mga parametro.', |
| 2352 | + 'validator-describe-pfdefault' => 'Tungkulin ng pambanghay na mayroon ng lahat ng mga parametro na ginagamit ang likas na nakatakdang katalaan ng parametro.', |
| 2353 | + 'validator_error_empty_argument' => 'Hindi dapat na isang halagang walang laman ang parametrong $1.', |
| 2354 | + 'validator_error_must_be_number' => 'Dapat na bilang lang ang parametrong $1.', |
| 2355 | + 'validator_error_must_be_integer' => 'Dapat na tambilang lang ang parametrong $1.', |
| 2356 | + 'validator-error-must-be-float' => 'Ang parametrong $1 ay maaaring isang lumulutang na bilang ng punto lamang.', |
| 2357 | + 'validator_error_invalid_range' => 'Dapat na nasa pagitan ng $2 at $3 ang parametrong $1.', |
| 2358 | + 'validator-error-invalid-regex' => 'Ang parametrong $1 ay dapat tumugma sa ganitong pangkaraniwang pagsasaad: $2.', |
| 2359 | + 'validator-error-invalid-length' => 'Ang parametrong $1 ay dapat na may isang haba na $2.', |
| 2360 | + 'validator-error-invalid-length-range' => 'Ang parametrong $1 ay dapat na may isang haba na nasa pagitan ng $2 at $3.', |
| 2361 | + 'validator_error_invalid_argument' => 'Ang halagang $1 ay hindi tanggap para sa parametrong $2.', |
| 2362 | + 'validator_list_error_empty_argument' => 'Hindi tumatanggap ng halagang walang laman ang parametrong $1.', |
| 2363 | + 'validator_list_error_must_be_number' => 'Dapat na naglalaman lang ng mga bilang ang parametrong $1.', |
| 2364 | + 'validator_list_error_must_be_integer' => 'Dapat na naglalaman lang ng mga tambilang ang parametrong $1.', |
| 2365 | + 'validator-list-error-must-be-float' => 'Ang parametrong $1 ay maaaring maglaman lamang ng mga palutang.', |
| 2366 | + 'validator_list_error_invalid_range' => 'Dapat na nasa pagitan ng $2 at $3 ang lahat ng mga halaga ng parametrong $1.', |
| 2367 | + 'validator-list-error-invalid-regex' => 'Ang lahat ng mga halaga ng parametrong $1 ay dapat na tumugma sa pangkaraniwang pagsasaad na ito: $2.', |
| 2368 | + 'validator_list_error_invalid_argument' => 'Hindi tanggap ang isa o higit pang mga halaga para sa parametrong $1.', |
| 2369 | + 'validator_error_accepts_only' => 'Ang halagang "$4" ay hindi tanggap para sa parametrong $1. Tumatanggap lamang ito ng |
| 2370 | +{{PLURAL:$3|ganitong halaga|ganitong mga halaga}}: $2.', |
| 2371 | + 'validator_list_omitted' => 'Tinanggal {{PLURAL:$2|na ang|na ang mga}} {{PLURAL:$2|halaga|halaga}} ng $1.', |
| 2372 | +); |
| 2373 | + |
| 2374 | +/** Turkish (Türkçe) |
| 2375 | + * @author Vito Genovese |
| 2376 | + */ |
| 2377 | +$messages['tr'] = array( |
| 2378 | + 'validator_error_unknown_argument' => '$1, geçerli bir parametre değildir.', |
| 2379 | + 'validator_error_empty_argument' => '$1 parametresi boş bir değere sahip olamaz.', |
| 2380 | + 'validator_error_must_be_number' => '$1 parametresi sadece sayı olabilir.', |
| 2381 | + 'validator_error_must_be_integer' => '$1 parametresi sadece bir tamsayı olabilir', |
| 2382 | + 'validator_list_error_empty_argument' => '$1 parametresi boş değerleri kabul etmemektedir.', |
| 2383 | + 'validator_list_error_must_be_number' => '$1 parametresi sadece sayı içerebilir.', |
| 2384 | +); |
| 2385 | + |
| 2386 | +/** Ukrainian (Українська) |
| 2387 | + * @author NickK |
| 2388 | + * @author Prima klasy4na |
| 2389 | + */ |
| 2390 | +$messages['uk'] = array( |
| 2391 | + 'validator-desc' => 'Валідатор забезпечує іншим розширенням можливості перевірки параметрів функцій парсера і тегів, встановлення значень за умовчанням та створення повідомлень про помилки', |
| 2392 | + 'validator_error_parameters' => 'У вашому синтаксисі {{PLURAL:$1|виявлена така помилка|виявлені такі помилки}}:', |
| 2393 | +); |
| 2394 | + |
| 2395 | +/** Vietnamese (Tiếng Việt) |
| 2396 | + * @author Minh Nguyen |
| 2397 | + * @author Vinhtantran |
| 2398 | + */ |
| 2399 | +$messages['vi'] = array( |
| 2400 | + '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.', |
| 2401 | + 'validator-warning' => 'Cảnh báo: $1', |
| 2402 | + 'validator-error' => 'Lỗi: $1', |
| 2403 | + '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:', |
| 2404 | + 'validator_warning_parameters' => 'Có {{PLURAL:$1|lỗi|lỗi}} cú pháp trong mã của bạn.', |
| 2405 | + 'validator_error_unknown_argument' => '$1 không phải là tham số hợp lệ.', |
| 2406 | + 'validator_error_required_missing' => 'Không định rõ tham số bắt buộc “$1”.', |
| 2407 | + 'validator-listerrors-errors' => 'Lỗi', |
| 2408 | + 'validator-listerrors-low' => 'Thấp', |
| 2409 | + 'validator-listerrors-normal' => 'Thường', |
| 2410 | + 'validator-listerrors-high' => 'Cao', |
| 2411 | + 'validator_error_empty_argument' => 'Tham số “$1” không được để trống.', |
| 2412 | + 'validator_error_must_be_number' => 'Tham số “$1” phải là con số.', |
| 2413 | + 'validator_error_must_be_integer' => 'Tham số “$1” phải là số nguyên.', |
| 2414 | + 'validator_error_invalid_range' => 'Tham số “$1” phải nằm giữa $2 và $3.', |
| 2415 | + 'validator_error_invalid_argument' => 'Giá trị “$1” không hợp tham số “$2”.', |
| 2416 | + 'validator_list_error_empty_argument' => 'Không được để trống tham số “$1”.', |
| 2417 | + 'validator_list_error_must_be_number' => 'Tham số “$1” chỉ được phép bao gồm con số.', |
| 2418 | + 'validator_list_error_must_be_integer' => 'Tham số “$1” chỉ được phép bao gồm số nguyên.', |
| 2419 | + '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.', |
| 2420 | + 'validator_list_error_invalid_argument' => 'Ít nhất một giá trị của tham số “$1” không hợp lệ.', |
| 2421 | + '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.', |
| 2422 | + 'validator_list_omitted' => '{{PLURAL:$2|Giá trị|Các giá trị}} “$1” bị bỏ qua.', |
| 2423 | +); |
| 2424 | + |
| 2425 | +/** Simplified Chinese (中文(简体)) |
| 2426 | + * @author Hydra |
| 2427 | + * @author Richarddong |
| 2428 | + * @author Wilsonmess |
| 2429 | + * @author Xiaomingyan |
| 2430 | + */ |
| 2431 | +$messages['zh-hans'] = array( |
| 2432 | + 'validator-warning' => '警告:$1', |
| 2433 | + 'validator-error' => '错误:$1', |
| 2434 | + 'validator-fatal-error' => '致命错误:$1', |
| 2435 | + 'validator_error_parameters' => '从您的语法中检测到以下错误:', |
| 2436 | + 'validator_warning_parameters' => '您的语法中存在错误。', |
| 2437 | + 'validator-warning-adittional-errors' => '⋯⋯以及更多的问题。', |
| 2438 | + 'validator-error-omitted' => '"$1"等值被忽略。', |
| 2439 | + 'validator-error-problem' => '参数 $1 存在一个问题。', |
| 2440 | + 'validator_error_unknown_argument' => '$1 不是一个有效的参数。', |
| 2441 | + 'validator_error_required_missing' => '未能提供必要的参数 $1 。', |
| 2442 | + 'validator-error-override-argument' => '试图用 "$3" 覆盖参数 $1 的值($2)', |
| 2443 | + 'validator-type-string' => '文本', |
| 2444 | + 'validator-type-number' => '号码', |
| 2445 | + 'validator-type-float' => '浮点数', |
| 2446 | + 'validator-type-boolean' => '布尔值', |
| 2447 | + 'validator-type-char' => '字符', |
| 2448 | + 'validator-listerrors-errors' => '错误', |
| 2449 | + 'validator-listerrors-minor' => '很小', |
| 2450 | + 'validator-listerrors-low' => '小', |
| 2451 | + 'validator-listerrors-normal' => '中', |
| 2452 | + 'validator-listerrors-high' => '大', |
| 2453 | + 'validator-listerrors-fatal' => '致命', |
| 2454 | + 'validator-describe-descriptionmsg' => "'''说明''':$1", |
| 2455 | + 'validator-describe-empty' => '空白', |
| 2456 | + 'validator-describe-header-type' => '类型', |
| 2457 | + 'validator-describe-header-description' => '说明', |
| 2458 | + 'validator_error_empty_argument' => '参数 $1 不能为空。', |
| 2459 | + 'validator_error_must_be_number' => '参数 $1 只能为数字。', |
| 2460 | + 'validator_error_must_be_integer' => '参数 $1 只能为整数。', |
| 2461 | + 'validator_error_invalid_range' => '参数 $1 的范围必须介于 $2 与 $3 之间。', |
| 2462 | + 'validator_error_invalid_argument' => '值 $1 对于参数 $2 不合法。', |
| 2463 | + 'validator_list_error_empty_argument' => '参数 $1 不接受空值。', |
| 2464 | + 'validator_list_error_must_be_number' => '参数 $1 只能包含数字。', |
| 2465 | + 'validator_list_error_must_be_integer' => '参数 $1 只能包含整数。', |
| 2466 | + 'validator_list_error_invalid_range' => '参数 $1 所有合法的值都必须介于 $2 与 $3 之间。', |
| 2467 | + 'validator_list_error_invalid_argument' => '参数 $1 的一个或多个值不合法。', |
| 2468 | +); |
| 2469 | + |
| 2470 | +/** Traditional Chinese (中文(繁體)) |
| 2471 | + * @author Mark85296341 |
| 2472 | + * @author Wrightbus |
| 2473 | + */ |
| 2474 | +$messages['zh-hant'] = array( |
| 2475 | + 'validator-warning' => '警告:$1', |
| 2476 | + 'validator-error' => '錯誤:$1', |
| 2477 | + 'validator-fatal-error' => '致命錯誤:$1', |
| 2478 | + 'validator-describe-header-parameter' => '參數', |
| 2479 | + 'validator_list_error_empty_argument' => '參數 $1 不接受空值。', |
| 2480 | + 'validator_list_error_must_be_number' => '參數 $1 只能包含數字。', |
| 2481 | + 'validator_list_error_must_be_integer' => '參數 $1 只能包含整數。', |
| 2482 | + 'validator-list-error-must-be-float' => '參數 $1 只能包含浮點數。', |
| 2483 | +); |
| 2484 | + |
Property changes on: tags/extensions/Validator/REL_0_4_8/Validator.i18n.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 2485 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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.8' ); |
| 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_8/Validator.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 103 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/Validator_Settings.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 35 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/README |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 14 | + native |
Index: tags/extensions/Validator/REL_0_4_8/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_8/Validator.hooks.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 33 | + native |