diff options
author | ivan <ivan> | 2002-04-07 05:56:09 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-04-07 05:56:09 +0000 |
commit | 44e3eff0aa6e7bdb7f4ecd9ee1ddf141e1b68af3 (patch) | |
tree | 6a636ec1d2984f18a97515ef54969c4c9a641e8c /bin | |
parent | fca110eff969104793774ed717985e91c53f5318 (diff) |
working message catalogs (not used for enough yet)
- almost (but not quite) closes Bug#385 - still have to catalog the
backend things triggered by signup server.
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 ', }, ); |