[LON-CAPA-cvs] cvs: loncom /localize lonlocal.pm

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Fri, 16 May 2008 16:11:56 -0000


raeburn		Fri May 16 12:11:56 2008 EDT

  Modified files:              
    /loncom/localize	lonlocal.pm 
  Log:
  - maketext() in Locale::Maketext 1.12 (used with perl 5.10) includes: 
  added line - Carp::confess('No handle/phrase') unless (defined($handle) && defined($phrase));
   -so don't call maketext() if there's no text to localize. 
  
  
Index: loncom/localize/lonlocal.pm
diff -u loncom/localize/lonlocal.pm:1.43 loncom/localize/lonlocal.pm:1.44
--- loncom/localize/lonlocal.pm:1.43	Tue Jan 29 08:26:09 2008
+++ loncom/localize/lonlocal.pm	Fri May 16 12:11:56 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Localization routines
 #
-# $Id: lonlocal.pm,v 1.43 2008/01/29 13:26:09 www Exp $
+# $Id: lonlocal.pm,v 1.44 2008/05/16 16:11:56 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -182,7 +182,15 @@
 #    print LOG (@_[0]."\n");
 #    close(LOG);
     if ($lh) {
-	return $lh->maketext(@_);
+        if ($_[0] eq '') {
+            if (wantarray) {
+                return @_;
+            } else {
+                return $_[0];
+            }
+        } else {
+            return $lh->maketext(@_);
+        }
     } else {
 	if (wantarray) {
 	    return @_;