Index: trunk/extensions/TradeTrack/TradeTrack.i18n.php |
— | — | @@ -74,10 +74,10 @@ |
75 | 75 | 'tradetrack-errors-other-set-but-not-checked' => 'You have entered a value for "other" but did not select it.', |
76 | 76 | 'tradetrack-errors-missing-other-value' => 'You selected "other" but did not provide a value for it.', |
77 | 77 | 'tradetrack-errors-other-too-long' => 'The value supplied for "other" is too long. |
78 | | -The maximum length for this field is $1 characters.', |
| 78 | +The maximum length for this field is {{PLURAL:$1|$1 character|$1 characters}}.', |
79 | 79 | 'tradetrack-errors-generic-empty' => 'This field is required.', |
80 | 80 | 'tradetrack-errors-generic-too-long' => 'The value supplied for this field is too long. |
81 | | -The maximum length allowed is $1 characters.', |
| 81 | +The maximum length allowed is {{PLURAL:$1|$1 character|$1 characters}}.', |
82 | 82 | 'tradetrack-errors-e-mails-do-not-match' => 'The e-mail addresses supplied do not match.', |
83 | 83 | 'tradetrack-errors-e-mail-fails-regex' => 'The e-mail address supplied is invalid. |
84 | 84 | Please provide a valid e-mail address.', |
Index: trunk/extensions/TradeTrack/SpecialTradeTrack.php |
— | — | @@ -472,7 +472,7 @@ |
473 | 473 | * @param $request the $wgRequest object. |
474 | 474 | */ |
475 | 475 | function validateField( $fieldName, $request ) { |
476 | | - |
| 476 | + global $wgLang; |
477 | 477 | $value = $request->getVal( self::$VARIABLE_PREFIX . $fieldName ); |
478 | 478 | |
479 | 479 | // No need to validate. This field has no tests. |
— | — | @@ -486,7 +486,7 @@ |
487 | 487 | case 'max': |
488 | 488 | // Tests that the value does not exceed a threshold, defined in the array (max => threshold) |
489 | 489 | if ( ( isset( $value ) ) && ( strlen( $value ) > $vThreshold ) ) { |
490 | | - $this->addError( "tradetrack-elements-$fieldName", wfMsg( self::$VALIDATION_FIELDS[$fieldName]['errmsgs'][$vType], array( $vThreshold ) ) ); |
| 490 | + $this->addError( "tradetrack-elements-$fieldName", wfMsgExt( self::$VALIDATION_FIELDS[$fieldName]['errmsgs'][$vType], 'parsemag', $wgLang->formatNum( $vThreshold ) ) ); |
491 | 491 | } |
492 | 492 | break; |
493 | 493 | case 'required': |