blib/lib/CGI/FormBuilder/Messages/_example.pm untested

filter: Statementstmt 0.0% 0 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod n/a totaltotal 0.0% 0 / 20 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 ###########################################################################
3 # Copyright (c) Nate Wiger http://nateware.com. All Rights Reserved.
4 # Please visit http://formbuilder.org for tutorials, support, and examples.
5 ###########################################################################
6  
7 #
8 # This is an example of how to create a Messages module. If you
9 # create one for a language that FormBuilder does not include,
10 # please post it to the mailing list, so that it is included in
11 # future releases.
12 #
13 # To create one, simply replace __LANG__ with your language, for
14 # example, "uk_UA". Then, change all the values on the right side
15 # of the define_messages hash to the correct strings for your language.
16 #
17 # Save the file as __LANG__.pm, for example, "uk_UA.pm". You can
18 # then use this in FormBuilder as:
19 #
20 # my $form = CGI::FormBuilder->new(messages => ':uk_UA');
21 #
22 # That's it!
23 #
24  
25 package CGI::FormBuilder::Messages::locale;
26  
27 use strict;
28 use utf8;
29  
30 use CGI::FormBuilder::Messages::default;
31 use base 'CGI::FormBuilder::Messages::default';
32  
33 our $VERSION = '3.10';
34  
35 # Define messages for this language
36 __PACKAGE__->define_messages({
37 lang => '__LANG__',
38 charset => 'utf-8',
39  
40 js_invalid_start => '%s error(s) were encountered with your submission:',
41 js_invalid_end => 'Please correct these fields and try again.',
42  
43 js_invalid_input => '- Invalid entry for the "%s" field',
44 js_invalid_select => '- Select an option from the "%s" list',
45 js_invalid_multiple => '- Select one or more options from the "%s" list',
46 js_invalid_checkbox => '- Check one or more of the "%s" options',
47 js_invalid_radio => '- Choose one of the "%s" options',
48 js_invalid_password => '- Invalid entry for the "%s" field',
49 js_invalid_textarea => '- Please fill in the "%s" field',
50 js_invalid_file => '- Invalid filename for the "%s" field',
51 js_invalid_default => '- Invalid entry for the "%s" field',
52  
53 js_noscript => 'Please enable Javascript or use a newer browser.',
54  
55 form_required_text => 'Fields that are %shighlighted%s are required.',
56  
57 form_invalid_text => '%s error(s) were encountered with your submission. '
58 . 'Please correct the fields %shighlighted%s below.',
59  
60 form_invalid_input => 'Invalid entry',
61 form_invalid_hidden => 'Invalid entry',
62 form_invalid_select => 'Select an option from this list',
63 form_invalid_checkbox => 'Check one or more options',
64 form_invalid_radio => 'Choose an option',
65 form_invalid_password => 'Invalid entry',
66 form_invalid_textarea => 'Please fill this in',
67 form_invalid_file => 'Invalid filename',
68 form_invalid_default => 'Invalid entry',
69  
70 form_grow_default => 'Additional %s',
71 form_select_default => '-select-',
72 form_other_default => 'Other:',
73 form_submit_default => 'Submit',
74 form_reset_default => 'Reset',
75
76 form_confirm_text => 'Success! Your submission has been received %s.',
77  
78 mail_confirm_subject => '%s Submission Confirmation',
79 mail_confirm_text => <<EOT,
80 Your submission has been received %s,
81 and will be processed shortly.
82  
83 If you have any questions, please contact our staff by replying
84 to this email.
85 EOT
86 mail_results_subject => '%s Submission Results',
87 });
88  
89 1;
90 __END__