diff options
author | ivan <ivan> | 2002-04-05 23:51:18 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-04-05 23:51:18 +0000 |
commit | 87af741da0dd5f6a76bbb566b4d6c54cd5b15315 (patch) | |
tree | d7c594b3e74bcea1e78beef56150ddf51ba24934 /bin/populate-msgcat | |
parent | ee037398ef051cca986f799c52e52c0114f897c9 (diff) |
- add message catalog table & beginning of web interface
- add security_phrase and conf option to svc_acct.pm
- random other stuff
Diffstat (limited to 'bin/populate-msgcat')
-rwxr-xr-x | bin/populate-msgcat | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/bin/populate-msgcat b/bin/populate-msgcat new file mode 100755 index 000000000..fa88732ce --- /dev/null +++ b/bin/populate-msgcat @@ -0,0 +1,45 @@ +#!/usr/bin/perl + +use FS::UID qw(adminsuidsetup); +use FS::msgcat; + +my $user = shift or die &usage; +adminsuidsetup $user; + +foreach my $del_msgcat ( qsearchs('msgcat', {}) ) { + my $error = $del_msgcat->delete; + die $error if $error; +} + +my %messages = messages(); + +foreach $msgcode ( keys %messages ) { + foreach my $locale ( keys %{$messages{$msgcode}} ) { + my $msgcat = new FS::msgcat( { + 'msgcode' => $msgcode, + 'locale' => $locale, + }); + my $error = $msgcat->insert; + die $error if $error; + } +} + +sub messages { + + # 'msgcode' => { + # 'en_US' => 'Message', + # }, + + ( + + 'msgcode' => { + 'en_US' => 'Message', + }, + + ); +} + +sub usage { + die "Usage:\n\n populate-msgcat user\n"; +} + |