X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FMsgcat.pm;fp=FS%2FFS%2FMsgcat.pm;h=2406e8db089b8ef3bbc51cb52b687f72be32f186;hb=9c2dce75b3bf6b222de4257c1ef59c6d407ba3b1;hp=2429805158fd4f432e33591d89ded6fc264c84dd;hpb=c17319bacfdcd2fceb7348e5f96fb89a39baff4d;p=freeside.git diff --git a/FS/FS/Msgcat.pm b/FS/FS/Msgcat.pm index 242980515..2406e8db0 100644 --- a/FS/FS/Msgcat.pm +++ b/FS/FS/Msgcat.pm @@ -58,6 +58,8 @@ our %cache; sub _gettext { my $msgcode = shift; + return '' unless defined($msgcode) && length($msgcode) > 0; + my $locale = (@_ && shift) || $FS::CurrentUser::CurrentUser->option('locale') || $def_locale; @@ -85,6 +87,7 @@ sub _gettext { }); warn "WARNING: auto-inserting message for msgcode $msgcode in locale $locale"; $newmsgcat->insert; + return $msgcode; # or maybe this should be below the next bracket? } }