[LON-CAPA-cvs] cvs: rat / lonratparms.pm
www
lon-capa-cvs@mail.lon-capa.org
Mon, 29 Sep 2003 14:31:00 -0000
www Mon Sep 29 10:31:00 2003 EDT
Modified files:
/rat lonratparms.pm
Log:
Internationalize
Index: rat/lonratparms.pm
diff -u rat/lonratparms.pm:1.15 rat/lonratparms.pm:1.16
--- rat/lonratparms.pm:1.15 Wed Apr 30 12:08:30 2003
+++ rat/lonratparms.pm Mon Sep 29 10:31:00 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Set parameters inside of the RAT
#
-# $Id: lonratparms.pm,v 1.15 2003/04/30 16:08:30 matthew Exp $
+# $Id: lonratparms.pm,v 1.16 2003/09/29 14:31:00 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -45,10 +45,11 @@
use strict;
use Apache::Constants qw(:common);
use Apache::lonhtmlcommon();
+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;
@@ -106,6 +107,12 @@
# --------------------------------------------------- Print input screen header
my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition();
+ my $bodytag=&Apache::loncommon::bodytag('Set Resource Parameters in Map');
+ my %lt=&Apache::loncommon::texthash('pa' => 'Parameter',
+ 'de' => 'Default',
+ 'va' => 'Value',
+ 'se' => 'Set');
+
$r->print(<<ENDHEADER);
<html>
<head>
@@ -142,15 +149,16 @@
}
</script>
</head>
-<body bgcolor="#FFFFFF">
-<h1>Set Resource Parameters in Map</h1>
+$bodytag
<form action="javascript:setparms();" method="post" name="parameters">
<input type="hidden" value='' name="pres_value">
<input type="hidden" value='' name="pres_type">
<input type="hidden" value='' name="pres_marker">
<table border=2>
-<tr><th>Parameter</th><th>Default</th><th>Value</th><th>Set?</th></tr>
+<tr><th>$lt{'pa'}</th><th>$lt{'de'}</th><th>$lt{'va'}</th><th>$lt{'se'}?</th></tr>
ENDDOCUMENT
+ %display=&Apache::lonlocal::texthash(%display);
+ my $enter=&mt('Enter');
foreach (keys(%content)) {
my $cur=$content{$_};
# Should if(defined($value{$_})) be if(exists($value{$_})) ?
@@ -159,14 +167,14 @@
<tr><td><b>$display{$_}</b><br><tt>$_</tt></td>
<td> $content{$_}</td>
<td><input type="text" size="10" name="$_" value="$cur">
-<a href='javascript:pjump("$type{$_}","$display{$_}",document.parameters.$_.value,"$_","parameters.pres","stpr");'>Enter</a></td>
+<a href='javascript:pjump("$type{$_}","$display{$_}",document.parameters.$_.value,"$_","parameters.pres","stpr");'>$enter</a></td>
<td><input type="checkbox" name="def_$_"
END
if ($value{$_}) { $r->print(' checked'); }
$r->print('></td></tr>');
}
$r->print(
- '</table><br><input type="submit" value="Set"></form></body></html>');
+ '</table><br><input type="submit" value="'.&mt('Set').'"></form></body></html>');
return OK;
}