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

bisitz bisitz at source.lon-capa.org
Tue Feb 11 12:09:31 EST 2014


bisitz		Tue Feb 11 17:09:31 2014 EDT

  Modified files:              
    /loncom/interface	loncoursegroups.pm 
  Log:
  - Internationalization:
      - Added missing &mt() calls
      - Proper compilation of translation phrases
  - Standard style
  
  
  
Index: loncom/interface/loncoursegroups.pm
diff -u loncom/interface/loncoursegroups.pm:1.122 loncom/interface/loncoursegroups.pm:1.123
--- loncom/interface/loncoursegroups.pm:1.122	Wed Dec 18 01:31:43 2013
+++ loncom/interface/loncoursegroups.pm	Tue Feb 11 17:09:30 2014
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: loncoursegroups.pm,v 1.122 2013/12/18 01:31:43 raeburn Exp $
+# $Id: loncoursegroups.pm,v 1.123 2014/02/11 17:09:30 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2549,6 +2549,7 @@
                                           'actn' => 'Action?',
                                           'name' => 'Name',
                                           'usnm' => 'Username',
+                                          'stid' => 'ID',
                                           'doma' => 'Domain',
                                           'stda' => 'Start Date',
                                           'enda' => 'End Date',
@@ -2610,7 +2611,7 @@
      <th><a href="javascript:changeSort('fullname')">$lt{'name'}</a></th>
      <th><a href="javascript:changeSort('username')">$lt{'usnm'}</a></th>
      <th><a href="javascript:changeSort('domain')">$lt{'doma'}</a></th>
-     <th><a href="javascript:changeSort('id')">ID</a></th>
+     <th><a href="javascript:changeSort('id')">$lt{'ID'}</a></th>
      <th><a href="javascript:changeSort('start')">$lt{'stda'}</a></th>
      <th><a href="javascript:changeSort('end')">$lt{'enda'}</a></th>
 END
@@ -2734,7 +2735,10 @@
         }
         $r->print(&Apache::loncommon::end_data_table());
     } else {
-        $r->print(&mt('There are no active, future or previous group members to modify.'));
+        $r->print(
+            '<p class="LC_info">'
+           .&mt('There are no active, future or previous group members to modify.')
+           .'</p>');
     }
     return $numcurrent;
 }
@@ -2802,7 +2806,7 @@
         }
     }
     if (!$exp_or_del) {
-        $r->print($lt{'nome'}.'<br />');
+        $r->print('<p class="LC_info">'.$lt{'nome'}.'</p>');
     }
     
     $r->print(&Apache::lonhtmlcommon::topic_bar(4,&mt('Setting optional privileges for specific group members')));
@@ -3365,10 +3369,10 @@
         &Apache::lonnet::logthis("Failed to store $gpterm $groupname ".
                                  'in '.lc($crstype).': '.$cnum.
                                  ' in domain: '.$cdom);
-        $r->print('<div class="LC_error">'
-                 .&mt('An error occurred when [_1] the '.$gpterm.'. '
-                 .'Please try again.',$actiontype{$action})
-                 .'</div>');
+        $r->print('<p class="LC_error">'
+                 .&mt('An error occurred when '.$actiontype{$action}.' the '.$gpterm.'. '
+                 .'Please try again.')
+                 .'</p');
     }
     return $result;
 }
@@ -3535,11 +3539,14 @@
     if ($num_ok) {
         my $msgall ='';
         foreach my $type (sort(keys(%added))) {
-            my $message = &mt("The following users were successfully $type"); 
+            my $message;
+            my $tmsg = "The following users were successfully $type"; 
             if (!($type eq 'deleted' || $type eq 'expired')) {   
-                $message .= &mt(' with the following privileges');
+                $tmsg .= ' with the following privileges';
+            } else {
+                $tmsg .= ' with the following privileges';
             }
-            $message .= ':<br/>';
+            $message .= &mt($tmsg.':').'<br/>';
             foreach my $user (@{$added{$type}}) {
                 my $privlist = '';
                 if (!($type eq 'deleted' ||  $type eq 'expired')) {




More information about the LON-CAPA-cvs mailing list