On Wed Jul 18 17:00:38 2012, PHRED wrote:
Show quoted text> I found two more instances of quant calls that needed the plural
> message added. Currently we
> cannot completely translate these error messages for when the plural
> case is executed.
The point of the %Lexicon is for mapping.
%Lexicon => (
'limit to [quant,_1,character]' => 'limit to [quant,_1,letter,letters]',
);
Won't that work?
Show quoted text>
> --- lib/Form/Processor/Field.pm 2012-07-11 21:43:14.000000000 -0700
> +++ Field.pm 2012-07-18 13:57:19.062574455 -0700
> @@ -461,7 +461,7 @@
> my $value = $field->input;
>
> if ( length( $value ) > $size ) {
> - $field->add_error( 'Please limit to [quant,_1,character].
> You submitted [_2]', $size,
> length $value );
> + $field->add_error( 'Please limit to
> [quant,_1,character,characters]. You submitted
> [_2]', $size, length $value );
> return;
> }
> }
> --- lib/Form/Processor/Field/Text.pm 2011-05-19 07:54:23.000000000
> -0700
> +++ Text.pm 2012-07-18 13:56:50.944099709 -0700
> @@ -31,7 +31,7 @@
>
> my $value = $field->input;
>
> - return $field->add_error( 'Please limit to
> [quant,_1,character]. You submitted [_2]', $size,
> length $value )
> + return $field->add_error( 'Please limit to
> [quant,_1,character,characters]. You submitted
> [_2]', $size, length $value )
> if length $value > $size;
>
> }
> @@ -39,7 +39,7 @@
> # Check for min length
> if ( my $size = $field->min_length ) {
>
> - return $field->add_error( 'Input must be at least
> [quant,_1,character]. You submitted
> [_2]', $size, length $value )
> + return $field->add_error( 'Input must be at least
> [quant,_1,character,characters]. You
> submitted [_2]', $size, length $value )
> if length $value < $size;
>
> }