[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonmenu.pm /localize/localize de.pm

droeschl droeschl@source.lon-capa.org
Tue, 21 Jul 2009 14:36:13 -0000


droeschl		Tue Jul 21 14:36:13 2009 EDT

  Modified files:              
    /loncom/interface	loncommon.pm lonmenu.pm 
    /loncom/localize/localize	de.pm 
  Log:
  - refactoring
  - removed obsolete parameter $registration from sub menubuttons
  - added translations
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.862 loncom/interface/loncommon.pm:1.863
--- loncom/interface/loncommon.pm:1.862	Tue Jul 14 17:56:13 2009
+++ loncom/interface/loncommon.pm	Tue Jul 21 14:36:07 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.862 2009/07/14 17:56:13 bisitz Exp $
+# $Id: loncommon.pm,v 1.863 2009/07/21 14:36:07 droeschl Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4451,11 +4451,9 @@
             <em>$realm</em> $dc_info</div>| unless $env{'form.inhibitmenu'};
 
 	    if ($env{'request.state'} eq 'construct') {
-                $bodytag .= &Apache::lonmenu::menubuttons($forcereg,$forcereg,
-							  $titletable);
+                $bodytag .= &Apache::lonmenu::menubuttons($forcereg,$titletable);
             } else {
-                $bodytag .= &Apache::lonmenu::menubuttons($forcereg,$forcereg).
-		    $titletable;
+                $bodytag .= &Apache::lonmenu::menubuttons($forcereg).$titletable;
             }
         }
         return $bodytag;
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.275 loncom/interface/lonmenu.pm:1.276
--- loncom/interface/lonmenu.pm:1.275	Mon Jul 13 08:24:21 2009
+++ loncom/interface/lonmenu.pm	Tue Jul 21 14:36:08 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.275 2009/07/13 08:24:21 www Exp $
+# $Id: lonmenu.pm,v 1.276 2009/07/21 14:36:08 droeschl Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -165,7 +165,6 @@
 
 sub menubuttons {
     my $forcereg=shift;
-    my $registration=shift;
     my $titletable=shift;
 #
 # Early-out for pages that should not have a menu, triggered by query string "inhibitmenu=yes"
@@ -288,20 +287,16 @@
 <li><a href="/adm/flip?postdata=$escreload" target="_top">$lt{'ret'}</a></li>
 ENDCRELOAD
         }
-        my $reg='';
-        if ($registration) {
-           $reg=&innerregister($forcereg,$titletable);
-        }
-        my $form=&serverform();
-	my $utility=&utilityfunctions();
-
-	my $messagelink = "";
-	if(&Apache::lonmsg::mynewmail()){
-		$messagelink = '<a href="javascript:go(\'/adm/communicate\');">Message(new)</a>'
-	}else{
-		$messagelink = '<a href="javascript:go(\'/adm/communicate\');">Message</a>'
-	}
-        my $helplink=&Apache::loncommon::top_nav_help('Help');
+    my $reg     = $forcereg ? &innerregister($forcereg,$titletable) : '';
+    my $form    = &serverform();
+    my $utility = &utilityfunctions();
+
+    #Prepare the message link that indicates the arrival of new mail
+    my $messagelink = Apache::lonmsg::mynewmail() ? "Message (new)" : "Message";
+       $messagelink = '<a href="javascript:go(\'/adm/communicate\');">'
+                      . mt($messagelink) .'</a>';
+
+    my $helplink = &Apache::loncommon::top_nav_help('Help');
 	return (<<ENDINLINEMENU);
 <script type="text/javascript">
 // BEGIN LON-CAPA Internal
@@ -389,12 +384,13 @@
     my $reopen=&Apache::lonmenu::reopenmenu();
 
     my $newmail='';
-    my $breadcrumb;
 
     if (&Apache::lonmsg::newmail() && !$noremote) { 
         # We have new mail and remote is up
         $newmail= 'swmenu.setstatus("you have","messages");';
     } 
+
+    my $breadcrumb;
     if ($noremote
 	     && ($env{'request.symb'}) 
 	     && ($env{'request.course.id'})) {
Index: loncom/localize/localize/de.pm
diff -u loncom/localize/localize/de.pm:1.316 loncom/localize/localize/de.pm:1.317
--- loncom/localize/localize/de.pm:1.316	Fri Jul 17 22:24:12 2009
+++ loncom/localize/localize/de.pm	Tue Jul 21 14:36:12 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # German Localization Lexicon
 #
-# $Id: de.pm,v 1.316 2009/07/17 22:24:12 droeschl Exp $
+# $Id: de.pm,v 1.317 2009/07/21 14:36:12 droeschl Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -14752,6 +14752,9 @@
    'Message'
 => 'Nachricht',
 
+   'Message (new)'
+=> '(neue) Nachricht',
+
    'Time of change'
 => 'Ă„nderungszeit',