From: Kirrily R. <sk...@us...> - 2002-03-13 21:05:45
|
Update of /cvsroot/formmagick/formmagick/lib/CGI/FormMagick In directory usw-pr-cvs1:/tmp/cvs-serv16677 Modified Files: HTML.pm Validator.pm Log Message: Ugh. validating a field was adding a dot on the end of the error message returned. Ewww. Messed up l10n of those error messages. Note to self: need to return error messages as an array, not as a joined string, so that they're easier to l10n. Index: HTML.pm =================================================================== RCS file: /cvsroot/formmagick/formmagick/lib/CGI/FormMagick/HTML.pm,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -r1.54 -r1.55 *** HTML.pm 22 Feb 2002 19:44:09 -0000 1.54 --- HTML.pm 13 Mar 2002 21:05:42 -0000 1.55 *************** *** 221,224 **** --- 221,232 ---- prints any errors related to a field + =begin testing + + $fm->print_field_error("FOO"); + like($_STDOUT_, qr/FOO/, "Output of print_field_error should say FOO"); + ok($_STDOUT_ !~ /FOO\./, "Output of print_field_error shouldn't have a dot on the end"); + + =end testing + =cut Index: Validator.pm =================================================================== RCS file: /cvsroot/formmagick/formmagick/lib/CGI/FormMagick/Validator.pm,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -r1.42 -r1.43 *** Validator.pm 19 Feb 2002 20:30:17 -0000 1.42 --- Validator.pm 13 Mar 2002 21:05:42 -0000 1.43 *************** *** 303,308 **** if (@results) { ! my $formatted_result = join("; ", @results) . "." ; ! return $formatted_result if ($formatted_result ne "."); } --- 303,308 ---- if (@results) { ! my $formatted_result = join("; ", @results); ! return $formatted_result if $formatted_result; } |