[LON-CAPA-cvs] cvs: loncom /auth lonroles.pm

bisitz lon-capa-cvs-allow@mail.lon-capa.org
Fri, 22 Aug 2008 17:46:55 -0000


bisitz		Fri Aug 22 13:46:55 2008 EDT

  Modified files:              
    /loncom/auth	lonroles.pm 
  Log:
  Localization:
  - Added missing &mt() calls
  - Optimized &mt() calls
  
  
Index: loncom/auth/lonroles.pm
diff -u loncom/auth/lonroles.pm:1.203 loncom/auth/lonroles.pm:1.204
--- loncom/auth/lonroles.pm:1.203	Wed Jul 30 11:34:34 2008
+++ loncom/auth/lonroles.pm	Fri Aug 22 13:46:52 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # User Roles Screen
 #
-# $Id: lonroles.pm,v 1.203 2008/07/30 15:34:34 raeburn Exp $
+# $Id: lonroles.pm,v 1.204 2008/08/22 17:46:52 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -229,8 +229,11 @@
 						     $cdom,$cnum,
                                                      $env{'user.domain'},
 						     $env{'user.name'},
-	      'Assigned from '.$ENV{'REMOTE_ADDR'}.' at '.localtime().' for '.
-                                                     $trolecode);
+                                                     &mt('Assigned from [_1] at [_2] for [_3]'
+                                                        ,$ENV{'REMOTE_ADDR'}
+                                                        ,&Apache::lonlocal::locallocaltime()
+                                                        ,$trolecode)
+                                                     );
 				 unless ($assignresult eq 'ok') {
 				     $assignresult=~s/^error\:\s*//;
 				     $message=&mt($assignresult).
@@ -354,7 +357,7 @@
 					) {
 					my $startpage = &courseloadpage($courseid);
 					unless ($startpage eq 'firstres') {         
-					    $msg = &mt('Entering [_1] ....',
+					    $msg = &mt('Entering [_1] ...',
 						       $env{'course.'.$courseid.'.description'});
 					    &redirect_user($r,&mt('New in course'),
 							   '/adm/whatsnew?refpage=start',$msg,
@@ -554,7 +557,7 @@
                     $countfuture ++;
                 } elsif ($tstatus eq 'will') {
                     $tbg='#FFAA77';
-                    $tremark.=&mt('Active at next login. ');
+                    $tremark.=&mt('Active at next login.').' ';
                     $roles_nextlogin{$trolecode} = $tstart.':'.$tend;
                     $countwill ++;
                 } elsif ($tstatus eq 'expired') {
@@ -563,20 +566,19 @@
                     $button=0;
                 } elsif ($tstatus eq 'will_not') {
                     $tbg='#AAFF77';
-                    $tremark.=&mt('Expired after logout. ');
+                    $tremark.=&mt('Expired after logout.').' ';
                 } elsif ($tstatus eq 'selected') {
                     $tbg='#11CC55';
                     $tfont='#002200';
 		    $inrole=1;
 		    $countactive++;
-                    $tremark.=&mt('Currently selected. ');
+                    $tremark.=&mt('Currently selected.').' ';
                 }
                 my $trole;
                 if ($role =~ /^cr\//) {
                     my ($rdummy,$rdomain,$rauthor,$rrole)=split(/\//,$role);
 		    if ($tremark) { $tremark.='<br />'; }
-                    $tremark.=&mt('Defined by ').$rauthor.
-			&mt(' at ').$rdomain.'.';
+                    $tremark.=&mt('Defined by [_1] at [_2].',$rauthor,$rdomain);
 		}
 		$trole=Apache::lonnet::plaintext($role);
                 my $ttype;
@@ -704,7 +706,7 @@
             my $tfont='#003300';
             if ($env{'request.role'} eq 'cm') {
                 $r->print('<tr bgcolor="#11CC55">');
-                $tremark=&mt('Currently selected. ');
+                $tremark=&mt('Currently selected.').' ';
                 $tfont='#002200';
             } else {
                 $r->print('<tr bgcolor="#77FF77">');
@@ -782,7 +784,7 @@
         my $tfont='#003300';
         if ($env{'request.role'} eq 'cm') {
 	    $r->print('<tr bgcolor="#11CC55">');
-            $tremark=&mt('Currently selected. ');
+            $tremark=&mt('Currently selected.').' ';
             $tfont='#002200';
         } else {
             $r->print('<tr bgcolor="#77FF77">');
@@ -940,7 +942,7 @@
 	    $ttype='System';
 	    $twhere='/';
 	}
-	$output .= "\n<h3>".$ttype.': '.$twhere.'</h3>'."\n<ul>";
+	$output .= "\n<h3>".&mt($ttype).': '.$twhere.'</h3>'."\n<ul>";
 	foreach my $priv (sort(split(/:/,$env{$envkey}))) {
 	    next if (!$priv);