[LON-CAPA-cvs] cvs: loncom /auth lonroles.pm /homework grades.pm lonhomework.pm lonsimpleproblemedit.pm /interface lonaboutme.pm lonbulletin.pm loncreatecourse.pm loncreateuser.pm londocs.pm lonmanagekeys.pm lonmenu.pm lonparmset.pm lonsyllabus.pm /xml lonxml.pm

www lon-capa-cvs@mail.lon-capa.org
Sun, 21 Sep 2003 21:40:07 -0000


This is a MIME encoded message

--www1064180407
Content-Type: text/plain

www		Sun Sep 21 17:40:07 2003 EDT

  Modified files:              
    /loncom/auth	lonroles.pm 
    /loncom/homework	grades.pm lonhomework.pm lonsimpleproblemedit.pm 
    /loncom/interface	lonaboutme.pm lonbulletin.pm loncreatecourse.pm 
                     	loncreateuser.pm londocs.pm lonmanagekeys.pm 
                     	lonmenu.pm lonparmset.pm lonsyllabus.pm 
    /loncom/xml	lonxml.pm 
  Log:
  Internationalizing.
  
  
--www1064180407
Content-Type: text/plain
Content-Disposition: attachment; filename="www-20030921174007.txt"

Index: loncom/auth/lonroles.pm
diff -u loncom/auth/lonroles.pm:1.72 loncom/auth/lonroles.pm:1.73
--- loncom/auth/lonroles.pm:1.72	Thu Sep 18 16:10:18 2003
+++ loncom/auth/lonroles.pm	Sun Sep 21 17:40:06 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # User Roles Screen
 #
-# $Id: lonroles.pm,v 1.72 2003/09/18 20:10:18 www Exp $
+# $Id: lonroles.pm,v 1.73 2003/09/21 21:40:06 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -56,7 +56,7 @@
 sub redirect_user {
     my ($r,$title,$url,$msg) = @_;
     $msg = $title if (! defined($msg));
-    $r->content_type('text/html');
+    &Apache::loncommon::content_type($r,'text/html');
     &Apache::loncommon::no_cache($r);
     $r->send_http_header;
     my $swinfo=&Apache::lonmenu::rawconfig();
@@ -131,7 +131,7 @@
 # student attempts to register a new key
 			     } else {
 # print form to enter a new key
-				 $r->content_type('text/html');
+				 &Apache::loncommon::content_type($r,'text/html');
 				 &Apache::loncommon::no_cache($r);
 				 $r->send_http_header;
 				 my $swinfo=&Apache::lonmenu::rawconfig();
@@ -230,7 +230,7 @@
 
 # =============================================================== No Roles Init
 
-    $r->content_type('text/html');
+    &Apache::loncommon::content_type($r,'text/html');
     &Apache::loncommon::no_cache($r);
     $r->send_http_header;
     return OK if $r->header_only;
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.140 loncom/homework/grades.pm:1.141
--- loncom/homework/grades.pm:1.140	Fri Sep 19 17:54:07 2003
+++ loncom/homework/grades.pm	Sun Sep 21 17:40:06 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.140 2003/09/19 21:54:07 albertel Exp $
+# $Id: grades.pm,v 1.141 2003/09/21 21:40:06 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3624,9 +3624,9 @@
 
     undef(%perm);
     if ($ENV{'browser.mathml'}) {
-	$request->content_type('text/xml');
+	&Apache::loncommon::content_type($request,'text/xml');
     } else {
-	$request->content_type('text/html');
+	&Apache::loncommon::content_type($request,'text/html');
     }
     $request->send_http_header;
     return '' if $request->header_only;
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.150 loncom/homework/lonhomework.pm:1.151
--- loncom/homework/lonhomework.pm:1.150	Fri Sep 19 16:29:29 2003
+++ loncom/homework/lonhomework.pm	Sun Sep 21 17:40:06 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Homework handler
 #
-# $Id: lonhomework.pm,v 1.150 2003/09/19 20:29:29 albertel Exp $
+# $Id: lonhomework.pm,v 1.151 2003/09/21 21:40:06 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -307,11 +307,10 @@
 sub setupheader {
     my $request=$_[0];
     if ($ENV{'browser.mathml'}) {
-	$request->content_type('text/xml');
+	&Apache::loncommon::content_type($request,'text/xml');
     } else {
-	$request->content_type('text/html');
+	&Apache::loncommon::content_type($request,'text/html');
     }
-    $request->content_encoding('UTF-8');
     if (!$Apache::lonxml::debug && ($ENV{'REQUEST_METHOD'} eq 'GET')) {
 	&Apache::loncommon::no_cache($request);
     }
Index: loncom/homework/lonsimpleproblemedit.pm
diff -u loncom/homework/lonsimpleproblemedit.pm:1.5 loncom/homework/lonsimpleproblemedit.pm:1.6
--- loncom/homework/lonsimpleproblemedit.pm:1.5	Tue Sep  9 15:39:04 2003
+++ loncom/homework/lonsimpleproblemedit.pm	Sun Sep 21 17:40:06 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Simple Problem Parameter Setting "Editor"
 #
-# $Id: lonsimpleproblemedit.pm,v 1.5 2003/09/09 19:39:04 www Exp $
+# $Id: lonsimpleproblemedit.pm,v 1.6 2003/09/21 21:40:06 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -32,6 +32,7 @@
 use Apache::Constants qw(:common :http);
 use Apache::loncommon;
 use Apache::lonnet;
+use Apache::lonlocal;
 
 my %qparms;
 my $prefix;
@@ -132,7 +133,7 @@
     my $r = shift;
 
     if ($r->header_only) {
-        $r->content_type('text/html');
+        &Apache::loncommon::content_type($r,'text/html');
         $r->send_http_header;
         return OK;
     }
@@ -142,7 +143,7 @@
 	return HTTP_NOT_ACCEPTABLE; 
     }
 # ----------------------------------------------------------------- Send header
-    $r->content_type('text/html');
+    &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;
 # ----------------------------------------------------- Figure out where we are
     my $uri=$r->uri;
@@ -212,7 +213,8 @@
         unless ($questiontypes{$qtype}) { $qtype='radio'; }
         $r->print('<b>Question Type: '.&Apache::loncommon::select_form
 	                               ($qtype,'questiontype',%questiontypes).
-'</b><br /><input type="submit" value="Store Changes" /><p>&nbsp;</p>');
+  '</b><br /><input type="submit" value="'.&mt('Store Changes').
+  '" /><p>&nbsp;</p>');
 # Question Text
         $r->print(&questiontext());
 # Radio, Option ===
@@ -229,7 +231,8 @@
             unless ($randomizes{$randomize}) { $randomize='yes'; }
 	    $r->print(
 		  '<table bgcolor="#00ee44" cellspacing="4" cellpadding="2">'.
-	          '<tr><td>Max number of foils displayed: <input type="text" size="3" name="maxfoils" value="'.$maxfoils.'" />&nbsp;&nbsp;'.
+	          '<tr><td>'.&mt('Max number of foils displayed').
+': <input type="text" size="3" name="maxfoils" value="'.$maxfoils.'" />&nbsp;&nbsp;'.
 		      &Apache::loncommon::select_form
 		      ($randomize,'randomize',%randomizes).
 		  '</td></tr><tr><td bgcolor="#AAAAAA">');
@@ -242,7 +245,8 @@
 		  '<table bgcolor="#ffcc22" cellspacing="4" cellpadding="2">'.
 		  '<tr><td><input type="hidden" name="options" value="'.
                   $options.'" />Add new option: '.
-          '<input type="text" name="newopt" size="15" />Delete an option: '.
+          '<input type="text" name="newopt" size="15" />'.
+          &mt('Delete an option').': '.
           &Apache::loncommon::select_form('','delopt',('' => '',%optionshash)).
           '</td></tr><tr><td>');
 	    }
@@ -272,7 +276,7 @@
             unless ($stringtypes{$stringtype}) { $stringtype='cs'; }
 	    $r->print(
 		  '<table bgcolor="#00ee44" cellspacing="4" cellpadding="2">'.
-	          '<tr><td>Correct answer: <input type="text" size="20" name="stringanswer" value="'.$stringanswer.'" />&nbsp;&nbsp;'.
+	          '<tr><td>'.&mt('Correct answer').': <input type="text" size="20" name="stringanswer" value="'.$stringanswer.'" />&nbsp;&nbsp;'.
 		      &Apache::loncommon::select_form
 		      ($stringtype,'stringtype',%stringtypes).
 		  '</td></tr></table><br />');
@@ -281,9 +285,9 @@
 	}
 # Store Button
 	$r->print(
-  '<input type="submit" value="Store Changes" /></form>');
+  '<input type="submit" value="'.&mt('Store Changes').'" /></form>');
     } else {
-	$r->print('Could not identify problem.');
+	$r->print(&mt('Could not identify problem.'));
     }
     $r->print('</body></html>');
     return OK;
Index: loncom/interface/lonaboutme.pm
diff -u loncom/interface/lonaboutme.pm:1.16 loncom/interface/lonaboutme.pm:1.17
--- loncom/interface/lonaboutme.pm:1.16	Sat Apr 12 11:57:30 2003
+++ loncom/interface/lonaboutme.pm	Sun Sep 21 17:40:06 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # "About Me" Personal Information
 #
-# $Id: lonaboutme.pm,v 1.16 2003/04/12 15:57:30 www Exp $
+# $Id: lonaboutme.pm,v 1.17 2003/09/21 21:40:06 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -34,10 +34,11 @@
 use Apache::lonnet;
 use Apache::lontexconvert;
 use Apache::lonfeedback;
+use Apache::lonlocal;
 
 sub handler {
     my $r = shift;
-    $r->content_type('text/html');
+    &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;
     return OK if $r->header_only;
 
@@ -50,11 +51,12 @@
     my (undef,undef,$cdom,$cnum)=split(/\//,$r->uri);
 # Is this even a user?
     if (&Apache::lonnet::homeserver($cnum,$cdom) eq 'no_host') {
-	$r->print('</head><body>No user information available</body></html>');
+	$r->print('</head><body>'.
+		  &mt('No user information available').'</body></html>');
         return OK;
     }
 # --------------------------------------------------------- The syllabus fields
-    my %syllabusfields=(
+    my %syllabusfields=&Apache::lonlocal::texthash(
        'aaa_contactinfo'   => 'Contact Information',
        'bbb_aboutme'       => 'About Me',
        'ccc_webreferences' => 'Web References');
@@ -97,7 +99,9 @@
        if ($forcestudent) { $allowed=0; }
  
        if ($allowed) {
-          $r->print('<p><b>Privacy Note:</b> The information you submit can be viewed by anybody who is logged into LON-CAPA. Do not provide information that you are not ready to share publicly.</p>'.
+          $r->print('<p><b>'.&mt('Privacy Note').':</b> '.
+&mt('The information you submit can be viewed by anybody who is logged into LON-CAPA. Do not provide information that you are not ready to share publicly.').
+'</p>'.
 &Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes','Help with filling in text boxes').'</p><p><a href="'.$r->uri.'?forcestudent=1">Show Public View</a>'.
  &Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView').'</p>');
       }
@@ -152,7 +156,8 @@
               if ($allowed) {
                  $r->print('<br /><textarea cols="80" rows="6" name="'.$_.'">'.
 			   $syllabus{$_}.
-           '</textarea><input type="submit" name="storesyl" value="Store" />');
+           '</textarea><input type="submit" name="storesyl" value="'.
+			   &mt('Store').'" />');
 	      }
 	  }
        }
@@ -161,11 +166,13 @@
        }
        $r->print('</p>');
     } else {
-       $r->print('<p>No personal information provided.</p>');
+       $r->print('<p>'.&mt('No personal information provided').'.</p>');
     }
     if ($ENV{'request.course.id'}) {
 	if (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'})) {
-            $r->print('<hr /><h3>User Notes, Records of Face-To-Face Discussions, and Critical Messages in Course</h3>Shared by course faculty and staff<br />');
+            $r->print('<hr /><h3>'.
+&mt('User Notes, Records of Face-To-Face Discussions, and Critical Messages in Course').'</h3>'.
+&mt('Shared by course faculty and staff').'<br />');
 	    &Apache::lonmsg::disfacetoface($r,$cnum,$cdom);
             $r->print(&Apache::loncommon::noteswrapper('Add Records',$cnum,$cdom));
         }
Index: loncom/interface/lonbulletin.pm
diff -u loncom/interface/lonbulletin.pm:1.15 loncom/interface/lonbulletin.pm:1.16
--- loncom/interface/lonbulletin.pm:1.15	Wed Sep 17 15:45:39 2003
+++ loncom/interface/lonbulletin.pm	Sun Sep 21 17:40:06 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Bulletin Board Handler
 #
-# $Id: lonbulletin.pm,v 1.15 2003/09/17 19:45:39 www Exp $
+# $Id: lonbulletin.pm,v 1.16 2003/09/21 21:40:06 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -38,7 +38,7 @@
 
 sub handler {
     my $r = shift;
-    $r->content_type('text/html');
+    &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;
     return OK if $r->header_only;
 
Index: loncom/interface/loncreatecourse.pm
diff -u loncom/interface/loncreatecourse.pm:1.37 loncom/interface/loncreatecourse.pm:1.38
--- loncom/interface/loncreatecourse.pm:1.37	Tue Sep  9 13:26:03 2003
+++ loncom/interface/loncreatecourse.pm	Sun Sep 21 17:40:06 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Create a course
 #
-# $Id: loncreatecourse.pm,v 1.37 2003/09/09 17:26:03 www Exp $
+# $Id: loncreatecourse.pm,v 1.38 2003/09/21 21:40:06 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -47,6 +47,7 @@
 use Apache::loncommon;
 use Apache::lonratedt;
 use Apache::londocs;
+use Apache::lonlocal;
 
 # -------------------------------------------- Return path to profile directory
 
@@ -542,13 +543,13 @@
     my $r = shift;
 
     if ($r->header_only) {
-       $r->content_type('text/html');
+       &Apache::loncommon::content_type($r,'text/html');
        $r->send_http_header;
        return OK;
     }
 
     if (&Apache::lonnet::allowed('ccc',$ENV{'request.role.domain'})) {
-       $r->content_type('text/html');
+       &Apache::loncommon::content_type($r,'text/html');
        $r->send_http_header;
 
        if ($ENV{'form.phase'} eq 'two') {
Index: loncom/interface/loncreateuser.pm
diff -u loncom/interface/loncreateuser.pm:1.67 loncom/interface/loncreateuser.pm:1.68
--- loncom/interface/loncreateuser.pm:1.67	Wed Sep 17 13:30:10 2003
+++ loncom/interface/loncreateuser.pm	Sun Sep 21 17:40:06 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Create a user
 #
-# $Id: loncreateuser.pm,v 1.67 2003/09/17 17:30:10 albertel Exp $
+# $Id: loncreateuser.pm,v 1.68 2003/09/21 21:40:06 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -63,6 +63,7 @@
 use Apache::Constants qw(:common :http);
 use Apache::lonnet;
 use Apache::loncommon;
+use Apache::lonlocal;
 
 my $loginscript; # piece of javascript used in two separate instances
 my $generalrule;
@@ -1082,7 +1083,7 @@
     my $r = shift;
 
     if ($r->header_only) {
-       $r->content_type('text/html');
+       &Apache::loncommon::content_type($r,'text/html');
        $r->send_http_header;
        return OK;
     }
@@ -1093,7 +1094,7 @@
         (&Apache::lonnet::allowed('cep',$ENV{'request.course.id'})) ||
         (&Apache::lonnet::allowed('cca',$ENV{'request.role.domain'})) ||
         (&Apache::lonnet::allowed('mau',$ENV{'request.role.domain'}))) {
-       $r->content_type('text/html');
+       &Apache::loncommon::content_type($r,'text/html');
        $r->send_http_header;
        unless ($ENV{'form.phase'}) {
 	   &print_username_entry_form($r);
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.81 loncom/interface/londocs.pm:1.82
--- loncom/interface/londocs.pm:1.81	Wed Sep 17 19:40:25 2003
+++ loncom/interface/londocs.pm	Sun Sep 21 17:40:06 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.81 2003/09/17 23:40:25 www Exp $
+# $Id: londocs.pm,v 1.82 2003/09/21 21:40:06 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -664,7 +664,7 @@
 # ================================================================ Main Handler
 sub handler {
     my $r = shift;
-    $r->content_type('text/html');
+    &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;
     return OK if $r->header_only;
 
Index: loncom/interface/lonmanagekeys.pm
diff -u loncom/interface/lonmanagekeys.pm:1.11 loncom/interface/lonmanagekeys.pm:1.12
--- loncom/interface/lonmanagekeys.pm:1.11	Fri May  2 15:00:29 2003
+++ loncom/interface/lonmanagekeys.pm	Sun Sep 21 17:40:06 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to manage course access keys 
 #
-# $Id: lonmanagekeys.pm,v 1.11 2003/05/02 19:00:29 www Exp $
+# $Id: lonmanagekeys.pm,v 1.12 2003/09/21 21:40:06 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -36,6 +36,7 @@
 use Apache::lonhtmlcommon();
 use Apache::Constants qw(:common :http REDIRECT);
 use Spreadsheet::WriteExcel;
+use Apache::lonlocal;
 
 ###############################################################
 ###############################################################
@@ -174,7 +175,7 @@
 sub handler {
     my $r=shift;
     if ($r->header_only) {
-        $r->content_type('text/html');
+        &Apache::loncommon::content_type($r,'text/html');
         $r->send_http_header;
         return OK;
     }
@@ -207,7 +208,7 @@
 #
 # Normal web stuff
 #
-	    $r->content_type('text/html');
+	    &Apache::loncommon::content_type($r,'text/html');
 	    $r->send_http_header;
 	    $r->print(&header());
 	
@@ -232,11 +233,12 @@
 		&addcom(%cenv);
             }
 # --- Menu
-	    $r->print('<h3>Key Access</h3>');
+	    $r->print('<h3>'.&mt('Key Access').'</h3>');
 	    if ($cenv{'keyaccess'} eq 'yes') {
-		$r->print('Access to this course is key controlled.<br /><input type="submit" name="toggle" value="Open Access" />')
+		$r->print(&mt('Access to this course is key controlled.').
+'<br /><input type="submit" name="toggle" value="'.&mt('Open Access').'" />')
 		} else {
-		    $r->print('Access to this course is open, no access keys.<br /><input type="submit" name="toggle" value="Control Access" />');
+		    $r->print(&mt('Access to this course is open, no access keys').'<br /><input type="submit" name="toggle" value="'.&mt('Control Access').'" />');
 	    }
 	    $r->print(<<ENDKEYMENU);
 <hr /><h3>Generate New Keys</h3>
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.92 loncom/interface/lonmenu.pm:1.93
--- loncom/interface/lonmenu.pm:1.92	Fri Sep 19 11:45:14 2003
+++ loncom/interface/lonmenu.pm	Sun Sep 21 17:40:06 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.92 2003/09/19 15:45:14 bowersj2 Exp $
+# $Id: lonmenu.pm,v 1.93 2003/09/21 21:40:06 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -874,7 +874,7 @@
 
 sub handler {
     my $r = shift;
-    $r->content_type('text/html');
+    &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;
     return OK if $r->header_only;
 
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.125 loncom/interface/lonparmset.pm:1.126
--- loncom/interface/lonparmset.pm:1.125	Tue Sep  9 14:46:28 2003
+++ loncom/interface/lonparmset.pm	Sun Sep 21 17:40:06 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.125 2003/09/09 18:46:28 www Exp $
+# $Id: lonparmset.pm,v 1.126 2003/09/21 21:40:06 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1809,7 +1809,7 @@
     my $r=shift;
 
     if ($r->header_only) {
-	$r->content_type('text/html');
+	&Apache::loncommon::content_type($r,'text/html');
 	$r->send_http_header;
 	return OK;
     }
@@ -1820,7 +1820,7 @@
     if (($ENV{'request.course.id'}) && 
 	(&Apache::lonnet::allowed('opa',$ENV{'request.course.id'}))) {
 
-        $r->content_type('text/html');
+        &Apache::loncommon::content_type($r,'text/html');
         $r->send_http_header;
  
         $coursename=$ENV{'course.'.$ENV{'request.course.id'}.'.description'};
Index: loncom/interface/lonsyllabus.pm
diff -u loncom/interface/lonsyllabus.pm:1.23 loncom/interface/lonsyllabus.pm:1.24
--- loncom/interface/lonsyllabus.pm:1.23	Wed Sep 17 15:45:39 2003
+++ loncom/interface/lonsyllabus.pm	Sun Sep 21 17:40:06 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Syllabus
 #
-# $Id: lonsyllabus.pm,v 1.23 2003/09/17 19:45:39 www Exp $
+# $Id: lonsyllabus.pm,v 1.24 2003/09/21 21:40:06 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -39,7 +39,7 @@
 
 sub handler {
     my $r = shift;
-    $r->content_type('text/html');
+    &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;
     return OK if $r->header_only;
 
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.279 loncom/xml/lonxml.pm:1.280
--- loncom/xml/lonxml.pm:1.279	Fri Sep 19 16:29:29 2003
+++ loncom/xml/lonxml.pm	Sun Sep 21 17:40:06 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.279 2003/09/19 20:29:29 albertel Exp $
+# $Id: lonxml.pm,v 1.280 2003/09/21 21:40:06 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -105,6 +105,7 @@
 use Apache::lonfeedback();
 use Apache::lonmsg();
 use Apache::loncacc();
+use Apache::lonlocal;
 
 #==================================================   Main subroutine: xmlparse  
 #debugging control, to turn on debugging modify the correct handler
@@ -792,7 +793,7 @@
     $Apache::lonxml::olddepth=$Apache::lonxml::depth+1;
   }
   if (  $Apache::lonxml::depth < -1) {
-    &Apache::lonxml::warning("Missing tags, unable to properly run file.");
+    &Apache::lonxml::warning(&mt("Missing tags, unable to properly run file."));
     $Apache::lonxml::depth='-1';
   }
   my $curdepth=join('_',@Apache::lonxml::depthcounter);
@@ -1087,21 +1088,24 @@
       }
       my $cleanbut = '';
       if ($filetype eq 'html') {
-	  $cleanbut='<input type="submit" name="attemptclean" 
-                       value="Save and then attempt to clean HTML" />';
+	  $cleanbut='<input type="submit" name="attemptclean" value="'.
+	      &mt('Save and then attempt to clean HTML').'" />';
       }
       my $titledisplay=&display_title();
+      my %lt=&Apache::lonlocal::texthash('st' => 'Save this',
+					 'vi' => 'View',
+					 'ed' => 'Edit');
       my $buttons=(<<BUTTONS);
 $cleanbut
-<input type="submit" name="savethisfile" value="Save this" />
-<input type="submit" name="viewmode" value="View" />
+<input type="submit" name="savethisfile" value="$lt{'st'}" />
+<input type="submit" name="viewmode" value="$lt{'vi'}" />
 BUTTONS
       my $editfooter=(<<ENDFOOTER);
 <hr />
 <a name="editsection" />
 <form method="post">
 $xml_help
-<input type="hidden" name="editmode" value="Edit" />
+<input type="hidden" name="editmode" value="$lt{'ed'}" />
 $buttons<br />
 <textarea cols="80" rows="40" name="filecont">$filecontents</textarea>
 <br />$buttons
@@ -1149,9 +1153,9 @@
     $Apache::lonxml::debug=$ENV{'user.debug'};
     
     if ($ENV{'browser.mathml'}) {
-	$request->content_type('text/xml');
+	&Apache::loncommon::content_type($request,'text/xml');
     } else {
-	$request->content_type('text/html');
+	&Apache::loncommon::content_type($request,'text/html');
     }
     &Apache::loncommon::no_cache($request);
     $request->send_http_header;

--www1064180407--