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

www lon-capa-cvs@mail.lon-capa.org
Fri, 24 Feb 2006 22:35:13 -0000


www		Fri Feb 24 17:35:13 2006 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  Accessibility:
  * tell which folder to open/close
  * tell what's a problem
  Some i18n
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.361 loncom/interface/lonnavmaps.pm:1.362
--- loncom/interface/lonnavmaps.pm:1.361	Thu Feb 16 14:38:27 2006
+++ loncom/interface/lonnavmaps.pm	Fri Feb 24 17:35:12 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.361 2006/02/16 19:38:27 albertel Exp $
+# $Id: lonnavmaps.pm,v 1.362 2006/02/24 22:35:12 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1095,7 +1095,7 @@
     
     if ($resource->is_problem()) {
         if ($part eq '0' || $params->{'condensed'}) {
-            $icon ='<img src="'.$location.'/problem.gif" alt="&nbsp;&nbsp;" border="0" />';
+            $icon ='<img src="'.$location.'/problem.gif" alt="'.&mt('Problem').'" border="0" />';
         } else {
             $icon = $params->{'indentString'};
         }
@@ -1112,11 +1112,12 @@
         }
 
 	my $folderType = $resource->is_sequence() ? 'folder' : 'page';
-
+        my $title=$resource->title;
+        $title=~s/\'/ /g;
         if (!$params->{'resource_no_folder_link'}) {
             $icon = "navmap.$folderType." . ($nowOpen ? 'closed' : 'open') . '.gif';
 	    $icon = "<img src='$location/$icon' alt='".
-		($nowOpen ? 'Open Folder' : 'Close Folder')."' border='0' />";
+		($nowOpen ? &mt('Open Folder') : &mt('Close Folder')).' '.$title."' border='0' />";
 
             $linkopen = "<a href=\"" . $params->{'url'} . '?' . 
                 $params->{'queryString'} . '&filter=';
@@ -1135,7 +1136,7 @@
             $icon = "navmap.$folderType." . ($nowOpen ? 'closed' : 'open') .
                 '.nomanip.gif';
             $icon = "<img src='$location/$icon' alt='".
-		($nowOpen ? 'Open Folder' : 'Close Folder')."' border='0' />";
+		($nowOpen ? &mt('Open Folder') : &mt('Close Folder')).' '.$title."' border='0' />";
 
             $linkopen = "";
             $linkclose = "";
@@ -1143,10 +1144,10 @@
     }
 
     if ($resource->randomout()) {
-        $nonLinkedText .= ' <i>(hidden)</i> ';
+        $nonLinkedText .= ' <i>('.&mt('hidden').')</i> ';
     }
     if (!$resource->condval()) {
-        $nonLinkedText .= ' <i>(conditionally hidden)</i> ';
+        $nonLinkedText .= ' <i>('.&mt('conditionally hidden').')</i> ';
     }
     
     # We're done preparing and finally ready to start the rendering
@@ -1178,13 +1179,13 @@
     if ($resource->is_problem() && $part ne '0' && 
         !$params->{'condensed'}) {
 	my $displaypart=$resource->part_display($part);
-        $partLabel = " (Part: $displaypart)";
+        $partLabel = " (".&mt('Part').": $displaypart)";
 	if ($link!~/\#/) { $link.='#'.&Apache::lonnet::escape($part); }
         $title = "";
     }
 
     if ($params->{'condensed'} && $resource->countParts() > 1) {
-        $nonLinkedText .= ' (' . $resource->countParts() . ' parts)';
+        $nonLinkedText .= ' (' . $resource->countParts() . ' '.&mt('parts').')';
     }
 
     my $target;
@@ -1472,8 +1473,8 @@
             $navmap = Apache::lonnavmaps::navmap->new();
 	    if (!defined($navmap)) {
 		# no londer in course
-		return '<font color="red">No course selected</font><br />
-                        <a href="/adm/roles">Select a course</a><br />';
+		return '<font color="red">'.&mt('No course selected').'</font><br />
+                        <a href="/adm/roles">'.&mt('Select a course').'</a><br />';
 	    }
 	}