diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/populate-msgcat | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/bin/populate-msgcat b/bin/populate-msgcat index fa88732ce..51f04c10f 100755 --- a/bin/populate-msgcat +++ b/bin/populate-msgcat @@ -1,23 +1,26 @@ -#!/usr/bin/perl +#!/usr/bin/perl -Tw +use strict; use FS::UID qw(adminsuidsetup); +use FS::Record qw(qsearch); use FS::msgcat; my $user = shift or die &usage; adminsuidsetup $user; -foreach my $del_msgcat ( qsearchs('msgcat', {}) ) { +foreach my $del_msgcat ( qsearch('msgcat', {}) ) { my $error = $del_msgcat->delete; die $error if $error; } my %messages = messages(); -foreach $msgcode ( keys %messages ) { +foreach my $msgcode ( keys %messages ) { foreach my $locale ( keys %{$messages{$msgcode}} ) { my $msgcat = new FS::msgcat( { 'msgcode' => $msgcode, 'locale' => $locale, + 'msg' => $messages{$msgcode}{$locale}, }); my $error = $msgcat->insert; die $error if $error; @@ -32,8 +35,20 @@ sub messages { ( - 'msgcode' => { - 'en_US' => 'Message', + 'passwords_dont_match' => { + 'en_US' => "Passwords don't match", + }, + + 'invalid_card' => { + 'en_US' => 'Invalid credit card number', + }, + + 'unknown_card_type' => { + 'en_US' => 'Unknown card type', + }, + + 'not_a' => { + 'en_US' => 'Not a ', }, ); |