[freeside-commits] freeside/FS/FS Msgcat.pm,1.5,1.6
Erik Levinson
levinse at wavetail.420.am
Tue Jun 14 11:53:42 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv19497/FS/FS
Modified Files:
Msgcat.pm
Log Message:
Msgcat.pm: return untranslated strings properly when no translation is found
Index: Msgcat.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Msgcat.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -d -r1.5 -r1.6
--- Msgcat.pm 3 Jun 2011 22:47:20 -0000 1.5
+++ Msgcat.pm 14 Jun 2011 18:53:40 -0000 1.6
@@ -58,6 +58,8 @@
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 @@
});
warn "WARNING: auto-inserting message for msgcode $msgcode in locale $locale";
$newmsgcat->insert;
+ return $msgcode; # or maybe this should be below the next bracket?
}
}
More information about the freeside-commits
mailing list