[LON-CAPA-cvs] cvs: loncom /xml lonxml.pm

bisitz lon-capa-cvs-allow@mail.lon-capa.org
Fri, 01 Aug 2008 16:31:26 -0000


bisitz		Fri Aug  1 12:31:26 2008 EDT

  Modified files:              
    /loncom/xml	lonxml.pm 
  Log:
  Localized, optimized and standarized warning messages
  
  
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.481 loncom/xml/lonxml.pm:1.482
--- loncom/xml/lonxml.pm:1.481	Wed Jun 25 08:00:37 2008
+++ loncom/xml/lonxml.pm	Fri Aug  1 12:31:26 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.481 2008/06/25 12:00:37 raeburn Exp $
+# $Id: lonxml.pm,v 1.482 2008/08/01 16:31:26 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -361,8 +361,8 @@
 				   $safeeval,\%style_for_target,1);
 
  if (@stack) {
-     &warning("At end of file some tags were still left unclosed, ".
-	      '<tt>&lt;'.join('&gt;</tt>, <tt>&lt;',reverse(@stack)).
+     &warning(&mt('At end of file some tags were still left unclosed:').
+	      ' <tt>&lt;'.join('&gt;</tt>, <tt>&lt;',reverse(@stack)).
 	      '&gt;</tt>');
  }
  if ($env{'request.uri'}) {
@@ -1451,7 +1451,7 @@
         $fh->close();
         return 1;
     } else {
-	&warning("Unable to save file $file");
+	&warning(&mt('Unable to save file [_1]','<tt>'.$file.'</tt>'));
 	return 0;
     }
 }
@@ -1907,7 +1907,10 @@
 	if ( &show_error_warn_msg() ) {
 	    push(@Apache::lonxml::warning_messages,
 		 $Apache::lonxml::warnings_error_header.
-		 "<b>W</b>ARNING<b>:</b>".join('<br />',@_)."<br />\n");
+                 '<span class="LC_warning">'.
+                 &mt('[_1]W[_2]ARNING','<b>','</b>')."<b>:</b> ".join('<br />',@_)."<br />\n".
+                 '</span>'
+                );
 	    $Apache::lonxml::warnings_error_header='';
 	}
     }