sub _gettext {
my $msgcode = shift;
+ return '' unless defined($msgcode) && length($msgcode) > 0;
+
my $locale = (@_ && shift)
- || $FS::CurrentUser::CurrentUser->option('locale')
+ || $FS::CurrentUser::CurrentUser->locale
|| $def_locale;
return $cache{$locale}->{$msgcode} if exists $cache{$locale}->{$msgcode};
warn "WARNING: auto-inserting message for msgcode $msgcode in locale $locale";
$newmsgcat->insert;
}
+ return $msgcode;
}
}