Index: trunk/extensions/Validator/includes/criteria/CriterionHasLength.php |
— | — | @@ -43,7 +43,12 @@ |
44 | 44 | * @see ItemParameterCriterion::getItemErrorMessage |
45 | 45 | */ |
46 | 46 | protected function getItemErrorMessage( Parameter $parameter ) { |
47 | | - return wfMsgExt( 'validator_error_invalid_argument', 'parsemag', $parameter->value ); |
| 47 | + if ( $this->lowerBound == $this->upperBound ) { |
| 48 | + return wfMsgExt( 'validator-error-invalid-length', 'parsemag', $parameter->getOriginalName(), $this->lowerBound ); |
| 49 | + } |
| 50 | + else { |
| 51 | + return wfMsgExt( 'validator-error-invalid-length-range', 'parsemag', $parameter->getOriginalName(), $this->lowerBound, $this->upperBound ); |
| 52 | + } |
48 | 53 | } |
49 | 54 | |
50 | 55 | /** |
Index: trunk/extensions/Validator/includes/criteria/CriterionIsNumeric.php |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | * @see ItemParameterCriterion::getItemErrorMessage |
35 | 35 | */ |
36 | 36 | protected function getItemErrorMessage( Parameter $parameter ) { |
37 | | - return wfMsgExt( 'validator_error_must_be_number', 'parsemag', $parameter->value ); |
| 37 | + return wfMsgExt( 'validator_error_must_be_number', 'parsemag', $parameter->getOriginalName() ); |
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
Index: trunk/extensions/Validator/includes/criteria/CriterionMatchesRegex.php |
— | — | @@ -46,7 +46,7 @@ |
47 | 47 | * @see ItemParameterCriterion::getItemErrorMessage |
48 | 48 | */ |
49 | 49 | protected function getItemErrorMessage( Parameter $parameter ) { |
50 | | - return wfMsgExt( 'validator_error_invalid_argument', 'parsemag', $parameter->value ); |
| 50 | + return wfMsgExt( 'validator_error_invalid_argument', 'parsemag', $parameter->value, $parameter->getOriginalName() ); |
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |
Index: trunk/extensions/Validator/includes/criteria/CriterionNotEmpty.php |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | * @see ItemParameterCriterion::getItemErrorMessage |
35 | 35 | */ |
36 | 36 | protected function getItemErrorMessage( Parameter $parameter ) { |
37 | | - return wfMsgExt( 'validator_error_empty_argument', 'parsemag', $parameter->value ); |
| 37 | + return wfMsgExt( 'validator_error_empty_argument', 'parsemag', $parameter->getOriginalName() ); |
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
Index: trunk/extensions/Validator/includes/criteria/CriterionIsFloat.php |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | * @see ItemParameterCriterion::getItemErrorMessage |
35 | 35 | */ |
36 | 36 | protected function getItemErrorMessage( Parameter $parameter ) { |
37 | | - return wfMsgExt( 'validator_error_invalid_argument', 'parsemag', $parameter->value ); |
| 37 | + return wfMsgExt( 'validator-error-must-be-float', 'parsemag', $parameter->getOriginalName() ); |
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
Index: trunk/extensions/Validator/includes/criteria/CriterionInRange.php |
— | — | @@ -48,7 +48,7 @@ |
49 | 49 | * @see ItemParameterCriterion::getItemErrorMessage |
50 | 50 | */ |
51 | 51 | protected function getItemErrorMessage( Parameter $parameter ) { |
52 | | - return wfMsgExt( 'validator_error_invalid_range', 'parsemag', $parameter->value ); |
| 52 | + return wfMsgExt( 'validator_error_invalid_range', 'parsemag', $parameter->getOriginalName(), $this->lowerBound, $this->upperBound ); |
53 | 53 | } |
54 | 54 | |
55 | 55 | /** |
Index: trunk/extensions/Validator/includes/criteria/CriterionIsInteger.php |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | * @see ItemParameterCriterion::getItemErrorMessage |
35 | 35 | */ |
36 | 36 | protected function getItemErrorMessage( Parameter $parameter ) { |
37 | | - return wfMsgExt( 'validator_error_must_be_integer', 'parsemag', $parameter->value ); |
| 37 | + return wfMsgExt( 'validator_error_must_be_integer', 'parsemag', $parameter->getOriginalName() ); |
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |