4 use FS::UID qw(adminsuidsetup);
5 use FS::Record qw(qsearch);
8 my $user = shift or die &usage;
11 foreach my $del_msgcat ( qsearch('msgcat', {}) ) {
12 my $error = $del_msgcat->delete;
16 my %messages = messages();
18 foreach my $msgcode ( keys %messages ) {
19 foreach my $locale ( keys %{$messages{$msgcode}} ) {
20 my $msgcat = new FS::msgcat( {
21 'msgcode' => $msgcode,
23 'msg' => $messages{$msgcode}{$locale},
25 my $error = $msgcat->insert;
30 #print "Message catalog initialized sucessfully\n";
35 # 'en_US' => 'Message',
40 'passwords_dont_match' => {
41 'en_US' => "Passwords don't match",
45 'en_US' => 'Invalid credit card number',
48 'unknown_card_type' => {
49 'en_US' => 'Unknown card type',
57 'en_US' => 'Empty password',
60 'no_access_number_selected' => {
61 'en_US' => 'No access number selected',
65 'en_US' => 'Illegal (text)',
66 #'en_US' => 'Only letters, numbers, spaces, and the following punctuation symbols are permitted: ! @ # $ % & ( ) - + ; : \' " , . ? / in field',
69 'illegal_or_empty_text' => {
70 'en_US' => 'Illegal or empty (text)',
71 #'en_US' => 'Only letters, numbers, spaces, and the following punctuation symbols are permitted: ! @ # $ % & ( ) - + ; : \' " , . ? / in required field',
74 'illegal_username' => {
75 'en_US' => 'Illegal username',
78 'illegal_password' => {
79 'en_US' => 'Illegal password (',
82 'illegal_password_characters' => {
83 'en_US' => ' characters)',
86 'username_in_use' => {
87 'en_US' => 'Username in use',
90 'illegal_email_invoice_address' => {
91 'en_US' => 'Illegal email invoice address',
95 'en_US' => 'Illegal (name)',
96 #'en_US' => 'Only letters, numbers, spaces and the following punctuation symbols are permitted: , . - \' in field',
100 'en_US' => 'Illegal (phone)',
105 'en_US' => 'Illegal (zip)',
110 'en_US' => 'Expired card',
114 'en_US' => 'Day Phone',
118 'en_US' => 'Night Phone',
125 die "Usage:\n\n populate-msgcat user\n";