--- loncom/interface/lonmenu.pm 2013/08/06 16:02:31 1.418
+++ loncom/interface/lonmenu.pm 2013/08/13 11:26:38 1.419
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.418 2013/08/06 16:02:31 raeburn Exp $
+# $Id: lonmenu.pm,v 1.419 2013/08/13 11:26:38 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -261,7 +261,7 @@ sub primary_menu {
push(@primsub,$item);
}
if (@primsub > 0) {
- $menu{$position} .= &create_submenu($link,$target,$title,\@primsub);
+ $menu{$position} .= &create_submenu($link,$target,$title,\@primsub,1);
} elsif ($link) {
$menu{$position} .= '
'.&mt($title).'';
}
@@ -469,7 +469,7 @@ sub secondary_menu {
}
sub create_submenu {
- my ($link,$target,$title,$submenu) = @_;
+ my ($link,$target,$title,$submenu,$translate) = @_;
return unless (ref($submenu) eq 'ARRAY');
my $disptarget;
if ($target ne '') {
@@ -507,8 +507,13 @@ sub create_submenu {
$borderbot = 'border-bottom:1px solid black;';
}
$menu .= ''.
- &mt($item->[1]).'';
+ $borderbot.'">';
+ if ($translate) {
+ $menu .= &mt($item->[1]);
+ } else {
+ $menu .= $item->[1];
+ }
+ $menu .= '';
}
}
$menu .= '';
@@ -1745,7 +1750,7 @@ sub roles_selector {
}
}
}
- $switchtext = &mt('Switch role');
+ $switchtext = 'Switch role'; # do not translate here
my @roles_order = ($ccrole,'in','ta','ep','ad','st');
my $numdiffsec;
if (keys(%seccount) == 1) {