--- loncom/xml/lonxml.pm 2008/06/10 16:20:39 1.480 +++ loncom/xml/lonxml.pm 2008/08/08 16:50:39 1.484 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.480 2008/06/10 16:20:39 www Exp $ +# $Id: lonxml.pm,v 1.484 2008/08/08 16:50:39 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -361,8 +361,8 @@ sub xmlparse { $safeeval,\%style_for_target,1); if (@stack) { - &warning("At end of file some tags were still left unclosed, ". - '<'.join('>, <',reverse(@stack)). + &warning(&mt('At end of file some tags were still left unclosed:'). + ' <'.join('>, <',reverse(@stack)). '>'); } if ($env{'request.uri'}) { @@ -486,10 +486,10 @@ sub inner_xmlparse { while ($token->[1] ne $$stack['-1'] && ($#$stack > -1)) { my $lasttag=$$stack[-1]; if ($token->[1] =~ /^\Q$lasttag\E$/i) { - &Apache::lonxml::warning('Using tag </'.$token->[1].'> on line '.$token->[3].' as end tag to <'.$$stack[-1].'>'); + &Apache::lonxml::warning(&mt('Using tag [_1] on line [_2] as end tag to [_3]','</'.$token->[1].'>','.$token->[3].','<'.$$stack[-1].'>')); last; } else { - &Apache::lonxml::warning('Found tag </'.$token->[1].'> on line '.$token->[3].' when looking for </'.$$stack[-1].'> in file'); + &Apache::lonxml::warning(&mt('Found tag [_1] on line [_2] when looking for [_3] in file.','</'.$token->[1].'>',$token->[3],'</'.$$stack[-1].'>')); &end_tag($stack,$parstack,$token); } } @@ -1084,7 +1084,7 @@ Optional Arguments: sub increment_counter { my ($increment, $part_response) = @_; - if ($env{'form.grade_target'} eq 'analyze') { return; } + if ($env{'form.grade_noincrement'}) { return; } if (!defined($increment) || $increment le 0) { $increment = 1; } @@ -1451,7 +1451,7 @@ sub storefile { $fh->close(); return 1; } else { - &warning("Unable to save file $file"); + &warning(&mt('Unable to save file [_1]',''.$file.'')); return 0; } } @@ -1519,7 +1519,7 @@ sub renderingoptions { &mt('Math Rendering:').' '. &Apache::loncommon::select_form($env{'form.texengine'},'texengine', ('' => '', - 'tth' => 'tth (Tex-to-HTML)', + 'tth' => 'tth (TeX to HTML)', 'jsMath' => 'jsMath', 'mimetex' => 'mimetex (Convert to Images)')).' '; @@ -1844,8 +1844,10 @@ sub error { if ( &show_error_warn_msg() ) { # If printing in construction space, put the error inside

 	push(@Apache::lonxml::error_messages,
-	     $Apache::lonxml::warnings_error_header.
-             "".&mt('ERROR:')."".join("
\n",@errors)."
\n"); + $Apache::lonxml::warnings_error_header + .'
' + .''.&mt('ERROR:').' '.join("
\n",@errors) + ."
\n"); $Apache::lonxml::warnings_error_header=''; } else { my $errormsg; @@ -1906,8 +1908,11 @@ sub warning { if ($env{'form.grade_target'} ne 'tex') { if ( &show_error_warn_msg() ) { push(@Apache::lonxml::warning_messages, - $Apache::lonxml::warnings_error_header. - "WARNING:".join('
',@_)."
\n"); + $Apache::lonxml::warnings_error_header + .'
' + .&mt('[_1]W[_2]ARNING','','').": ".join('
',@_) + ."
\n" + ); $Apache::lonxml::warnings_error_header=''; } }