4 use FS::UID qw(adminsuidsetup);
6 use FS::Record qw(qsearchs);
11 translate-insert-cdr-headers <user> <locale>
15 my $user = shift or die usage();
16 adminsuidsetup($user);
17 my $locale = shift or die usage();
19 $FS::UID::AutoCommit = 1;
21 my %formats = FS::cdr::invoice_formats();
22 my @strings = map { FS::cdr::invoice_header($_) } keys %formats;
23 foreach my $string (@strings) {
25 if ( qsearchs('msgcat', {
29 print "already exists.\n";
31 my $newmsgcat = FS::msgcat->new(
37 my $error = $newmsgcat->insert;
38 print (($error || "inserted."). "\n");