[LON-CAPA-cvs] cvs: loncom /interface lonhelper.pm

sakharuk lon-capa-cvs@mail.lon-capa.org
Tue, 20 Apr 2004 15:08:27 -0000


sakharuk		Tue Apr 20 11:08:27 2004 EDT

  Modified files:              
    /loncom/interface	lonhelper.pm 
  Log:
  Some localization is done.
  
  
Index: loncom/interface/lonhelper.pm
diff -u loncom/interface/lonhelper.pm:1.68 loncom/interface/lonhelper.pm:1.69
--- loncom/interface/lonhelper.pm:1.68	Mon Apr 19 11:40:08 2004
+++ loncom/interface/lonhelper.pm	Tue Apr 20 11:08:26 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # .helper XML handler to implement the LON-CAPA helper
 #
-# $Id: lonhelper.pm,v 1.68 2004/04/19 15:40:08 sakharuk Exp $
+# $Id: lonhelper.pm,v 1.69 2004/04/20 15:08:26 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -263,21 +263,8 @@
 
 
     # Send header, don't cache this page
-    if ($r->header_only) {
-        if ($ENV{'browser.mathml'}) {
-            $r->content_type('text/xml; charset=UTF-8');
-        } else {
-            $r->content_type('text/html; charset=UTF-8');
-        }
-        $r->send_http_header;
-        return OK;
-    }
-    if ($ENV{'browser.mathml'}) {
-        $r->content_type('text/xml');
-    } else {
-        $r->content_type('text/html');
-    }
-    $r->send_http_header;
+
+    if (&Apache::lonhomework::setupheader($r)) { return OK; }
     $r->rflush();
 
     # Discard result, we just want the objects that get created by the
@@ -1022,8 +1009,8 @@
         return '';
     }
 
-    $paramHash->{MESSAGE_TEXT} = &Apache::lonxml::get_all_text('/message',
-                                                               $parser);
+    $paramHash->{MESSAGE_TEXT} = &mtn(&Apache::lonxml::get_all_text('/message',
+                                                               $parser));
 
     if (defined($token->[2]{'nextstate'})) {
         $paramHash->{NEXTSTATE} = $token->[2]{'nextstate'};
@@ -1193,8 +1180,8 @@
     }
 
     my $computer = $token->[2]{'computer'};
-    my $human = &Apache::lonxml::get_all_text('/choice',
-                                              $parser);
+    my $human = &mt(&Apache::lonxml::get_all_text('/choice',
+                                              $parser));
     my $nextstate = $token->[2]{'nextstate'};
     my $evalFlag = $token->[2]{'eval'};
     push @{$paramHash->{CHOICES}}, [$human, $computer, $nextstate, 
@@ -2450,7 +2437,7 @@
 <input type="button" onclick="checkall(false, '$var')" value="$lt{'uaf'}" />
 BUTTONS
 
-       my %lt=&Apache::lonlocal::texthash(
+       %lt=&Apache::lonlocal::texthash(
 			'sap'  => "Select All Published",
 		        'uap'  => "Unselect All Published");
         if ($helper->{VARS}->{'construction'}) {
@@ -3082,6 +3069,7 @@
 no strict;
 @ISA = ('Apache::lonhelper::element');
 use strict;
+use Apache::lonlocal;
 
 BEGIN {
     &Apache::lonhelper::register('Apache::lonhelper::parmwizfinal',
@@ -3161,7 +3149,7 @@
     }
 
     my $result = "<form name='helpform' method='get' action='/adm/parmset#$affectedResourceId&$parm_name&$level'>\n";
-    $result .= '<p>Confirm that this information is correct, then click &quot;Finish Helper&quot; to complete setting the parameter.<ul>';
+    $result .= '<p>'.&mt('Confirm that this information is correct, then click &quot;Finish Helper&quot; to complete setting the parameter.').'<ul>';
     
     # Print the type of manipulation:
     $result .= '<li>Setting the <b>' . $dateTypeHash{$vars->{ACTION_TYPE}} . '</b>';