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

bisitz lon-capa-cvs-allow@mail.lon-capa.org
Tue, 22 Apr 2008 17:08:52 -0000


bisitz		Tue Apr 22 13:08:52 2008 EDT

  Modified files:              
    /loncom/interface	grouproster.pm 
  Log:
  - Added cvs Id
  - Localization: Optimized some mt calls (seems to be still more to do)
  
  
Index: loncom/interface/grouproster.pm
diff -u loncom/interface/grouproster.pm:1.4 loncom/interface/grouproster.pm:1.5
--- loncom/interface/grouproster.pm:1.4	Thu Aug 17 19:36:05 2006
+++ loncom/interface/grouproster.pm	Tue Apr 22 13:08:52 2008
@@ -1,5 +1,7 @@
 # The LearningOnline Network with CAPA
 #
+# $Id 
+#
 # Copyright Michigan State University Board of Trustees
 #
 # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
@@ -65,14 +67,14 @@
     # Validating group input.
     my $badinput; 
     if ((!defined($env{'form.group'})) || ($env{'form.group'} eq '')) {
-        $r->print(&mt('No group name provided.<br />'));
+        $r->print(&mt('No group name provided.').'<br />');
         $badinput = 1;
     } else {
         $group = $env{'form.group'};
         $group =~ s/\W//g;
     }
     if (!$badinput && $group eq '') {
-        $r->print(&mt('Invalid group name provided.<br />'));
+        $r->print(&mt('Invalid group name provided.').'<br />');
         $badinput = 1;
     }
 
@@ -80,7 +82,7 @@
     my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
 
     if ($cdom eq '' || $cnum eq '') {
-        $r->print(&mt('Invalid [_1]<br />',$crstype));
+        $r->print(&mt('Invalid [_1]',$crstype).'<br />');
         $badinput = 1;
     }
 
@@ -106,7 +108,7 @@
     my $editgrps = &Apache::lonnet::allowed('mdg',$env{'request.course.id'});
 
     if ((!$can_view) && (!$view_details) && (!$viewgrps) && (!$editgrps)) {
-        $r->print(&mt('You do not have privileges to view the membership roster in this [_1]',$gpterm));
+        $r->print(&mt('You do not have privileges to view the membership roster in this '.$gpterm.'.'));
         return OK;
     }
     my %content = &Apache::longroup::get_group_settings($curr_groups{$group});
@@ -165,7 +167,7 @@
              {href=>'/adm/grouproster?group='.$group.'&amp;'.$refarg,
               text=>"Membership roster",
               title=>"Display group membership"},);
-        $output .= &Apache::lonhtmlcommon::breadcrumbs(&mt('[_1] membership status - [_2]',$gpterm,$description));
+        $output .= &Apache::lonhtmlcommon::breadcrumbs(&mt($gpterm.' membership status - [_1]',$description));
     }
     return $output;
 }
@@ -212,8 +214,7 @@
     if (($viewgrps) || ($editgrps) || 
         (&Apache::lonnet::allowed('vmd',$env{'request.course.id'}.'/'.$group))) {
         if (keys(%{$memberinfo}) == 0) {
-            $r->print(&mt('There are no membership data to display for this [_1]',
-                      $gpterm));  
+            $r->print(&mt('There are no membership data to display for this '.$gpterm.'.'));  
             return;  
         }  
         $r->print('<br /><form name="rosterstatus" method="post" action="/adm/grouproster">'.&mt('Membership status: ').'<select name="status">');
@@ -240,8 +241,8 @@
     if (ref($numitems) eq 'HASH') {
         foreach my $key (keys(%{$numitems})) {
             if ($status eq $key && !$$numitems{$key}) {
-                $r->print(&mt('There are no [_1]s to display in this [_2].',
-                              lc($lt{$key}),$gpterm));
+                $r->print(&mt('There are no '.$gpterm.'s to display in this [_1].',
+                              lc($lt{$key})));
                 return;
             }
         }