[Jifty-commit] r1907 - in jifty/trunk: lib/Jifty

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Thu Aug 31 14:58:36 EDT 2006


Author: jesse
Date: Thu Aug 31 14:58:35 2006
New Revision: 1907

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/I18N.pm

Log:
 r23166 at pinglin:  jesse | 2006-08-31 14:58:22 -0400
 * Locale::Maketext doesn't always do the right thing with user-generated strings. So let's do that for it.
 


Modified: jifty/trunk/lib/Jifty/I18N.pm
==============================================================================
--- jifty/trunk/lib/Jifty/I18N.pm	(original)
+++ jifty/trunk/lib/Jifty/I18N.pm	Thu Aug 31 14:58:35 2006
@@ -60,7 +60,9 @@
         # Retain compatibility with people using "-e _" etc.
         return \*_ unless @_;
         return undef unless (defined $_[0]);
-        $lh->maketext(@_);
+        # Sometimes Locale::Maketext fails to localize a string. Catastropically
+        # In that case just return the input
+        return eval { $lh->maketext(@_)} || join(' ', at _);
     };
 
     {


More information about the Jifty-commit mailing list