Skip to content

Commit

Permalink
translate english resource
Browse files Browse the repository at this point in the history
  • Loading branch information
tokuhirom committed Mar 25, 2011
1 parent 8640c6c commit 5c481e0
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
21 changes: 21 additions & 0 deletions lib/FormValidator/Lite/Messages/en.pm
Expand Up @@ -7,7 +7,28 @@ use utf8;
our $MESSAGES = {
not_null => 'please input [_1]',
int => 'please input [_1] as integer',
ascii => 'Please input [_1] as ASCII',
date => '[_1] is not valid date',
duplication => 'Please same [_1] twice',
length => '[_1] have bad length',
regex => '[_1] is not good',
uint => 'Please input [_1] as unsigned int',

# http-url
http_url => 'please input [_1] as url',

# email
email_loose => 'Please input [_1] as E-mail address',

# japanese
hiragana => 'Please input [_1] as Hiragana',
jtel => 'Please input [_1] as telephone number',
jzip => 'Please input [_1] as zip number',
katakana => 'Please input [_1] as Katakana',

# file
file_size => '[_1] have bad file size',
file_mime => '[_1] have bad mime type',
};

1;
Expand Down
16 changes: 16 additions & 0 deletions t/010_core/011_messages.t
@@ -0,0 +1,16 @@
#!/usr/bin/env perl -I lib
use strict;
use warnings;
use utf8;
use Test::More 0.96;
use FormValidator::Lite::Messages::en;
use FormValidator::Lite::Messages::ja;

is_deeply(
[keys %$FormValidator::Lite::Messages::en::MESSAGES],
[keys %$FormValidator::Lite::Messages::ja::MESSAGES],
'translated'
);

done_testing;

0 comments on commit 5c481e0

Please sign in to comment.