[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonmenu.pm
www
lon-capa-cvs@mail.lon-capa.org
Wed, 17 Sep 2003 16:50:58 -0000
www Wed Sep 17 12:50:58 2003 EDT
Modified files:
/loncom/interface loncommon.pm lonmenu.pm
Log:
Better translation
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.118 loncom/interface/loncommon.pm:1.119
--- loncom/interface/loncommon.pm:1.118 Wed Sep 17 10:30:13 2003
+++ loncom/interface/loncommon.pm Wed Sep 17 12:50:58 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.118 2003/09/17 14:30:13 www Exp $
+# $Id: loncommon.pm,v 1.119 2003/09/17 16:50:58 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -348,11 +348,11 @@
return '';
}
return "<a href='".'javascript:openstdbrowser("'.$form.'","'.$unameele.
- '","'.$udomele.'");'."'>Select User</a>";
+ '","'.$udomele.'");'."'>".&mt('Select User')."</a>";
}
if ($ENV{'request.role'}=~/^(au|dc|su)/) {
return "<a href='".'javascript:openstdbrowser("'.$form.'","'.$unameele.
- '","'.$udomele.'",1);'."'>Select User</a>";
+ '","'.$udomele.'",1);'."'>".&mt('Select User')."</a>";
}
return '';
}
@@ -384,7 +384,7 @@
sub selectcourse_link {
my ($form,$unameele,$udomele)=@_;
return "<a href='".'javascript:opencrsbrowser("'.$form.'","'.$unameele.
- '","'.$udomele.'");'."'>Select Course</a>";
+ '","'.$udomele.'");'."'>".&mt('Select Course')."</a>";
}
=pod
@@ -516,7 +516,7 @@
foreach my $value (sort(keys(%$hashref))) {
$result.=" <option value=\"$value\" ";
$result.=" selected=\"true\" " if ($value eq $firstdefault);
- $result.=">$hashref->{$value}->{'text'}</option>\n";
+ $result.=">".&mt($hashref->{$value}->{'text'})."</option>\n";
}
$result .= "</select>\n";
my %select2 = %{$hashref->{$firstdefault}->{'select2'}};
@@ -526,7 +526,7 @@
foreach my $value (sort(keys(%select2))) {
$result.=" <option value=\"$value\" ";
$result.=" selected=\"true\" " if ($value eq $seconddefault);
- $result.=">$select2{$value}</option>\n";
+ $result.=">".&mt($select2{$value})."</option>\n";
}
$result .= "</select>\n";
# return $debug;
@@ -767,7 +767,7 @@
foreach (sort keys %hash) {
$selectform.="<option value=\"$_\" ".
($_ eq $def ? 'selected' : '').
- ">".$hash{$_}."</option>\n";
+ ">".&mt($hash{$_})."</option>\n";
}
$selectform.="</select>";
return $selectform;
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.88 loncom/interface/lonmenu.pm:1.89
--- loncom/interface/lonmenu.pm:1.88 Tue Sep 16 21:45:14 2003
+++ loncom/interface/lonmenu.pm Wed Sep 17 12:50:58 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.88 2003/09/17 01:45:14 www Exp $
+# $Id: lonmenu.pm,v 1.89 2003/09/17 16:50:58 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -145,7 +145,6 @@
if ($registration) {
$reg=&innerregister($forcereg,$target);
}
- my $trans=&Apache::lonlocal::endreroutetrans();
return (<<ENDINLINEMENU);
<script>
// BEGIN LON-CAPA Internal
@@ -165,7 +164,6 @@
<b>LON-CAPA</b></td>
</tr>
</table>
-$trans
<script>
// END LON-CAPA Internal
</script>
@@ -179,6 +177,7 @@
# ====================================== This gets called in the header section
sub registerurl {
+ &Apache::lonlocal::reroutetrans();
my $forcereg=shift;
my $target = shift;
my $result = '';
@@ -212,6 +211,7 @@
# =========== and in the body of the document
sub innerregister {
+ &Apache::lonlocal::reroutetrans();
my $forcereg=shift;
my $target = shift;
my $result = '';
@@ -879,6 +879,8 @@
$r->send_http_header;
return OK if $r->header_only;
+ &Apache::lonlocal::clearreroutetrans();
+
my $form=&serverform();
my $bodytag=&Apache::loncommon::bodytag('Main Menu');
my $function='student';
@@ -911,6 +913,7 @@
$bodytag
ENDHEADER
$r->print('<table>'.&inlinemenu().'</table>'.$form);
+ $r->print(&Apache::lonlocal::endreroutetrans());
$r->print('</body></html>');
return OK;
}