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

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 24 May 2005 15:54:19 -0000


albertel		Tue May 24 11:54:19 2005 EDT

  Modified files:              
    /loncom/interface	lonwhatsnew.pm 
  Log:
  - correcting some invalid html
  - making the &mt() easier to translate
  
  
Index: loncom/interface/lonwhatsnew.pm
diff -u loncom/interface/lonwhatsnew.pm:1.13 loncom/interface/lonwhatsnew.pm:1.14
--- loncom/interface/lonwhatsnew.pm:1.13	Mon May 23 19:06:23 2005
+++ loncom/interface/lonwhatsnew.pm	Tue May 24 11:54:19 2005
@@ -1,5 +1,5 @@
 #
-# $Id: lonwhatsnew.pm,v 1.13 2005/05/23 23:06:23 raeburn Exp $
+# $Id: lonwhatsnew.pm,v 1.14 2005/05/24 15:54:19 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -85,6 +85,7 @@
             (undef,'Course Action Items','Course_Action_Items_Display'));
     }
     &display_main_box($r,$command);
+    return OK;
 }
 
 #------------------------------
@@ -288,7 +289,7 @@
     if (@warnings > 0) {
 #        @warnings = sort { &cmp_title($a,$b) } @warnings;
         $r->print('<form name="reset_tracking" method="post">'.
-                 '  <input type="hidden" name="action" value="reset"'."\n");
+                 '  <input type="hidden" name="action" value="reset" />'."\n");
         $r->print('<tr bgcolor="#cccccc"><td><b><small>Resource</small></b></td><td align="right"><b><small>Part</small></b></td><td align="right"><b><small>Num. students</small></b></td><td align="right"><b><small>Av. Attempts</small></b></td><td align="right"><b><small>Deg. Diff</small></b></td><td align="right"><b><small>Last Reset</small></b></td><td align="right"><b><small>Reset Count?</small></b></td></tr>');
         foreach my $res (@warnings) {
             if ($warningnum %2 == 1) {
@@ -728,7 +729,7 @@
             $result =~ s/; $//;
             $result .= '<br />';
         } else {
-            $result = $title.' -part '.$part.': '.&mt('Unable to reset counters to zero due to ').$putresult.'.<br />'."\n";
+            $result = $title.' -part '.$part.': '.&mt('Unable to reset counters to zero due to [_1]',$putresult).'.<br />'."\n";
         }
     }
     return $result;
@@ -747,10 +748,13 @@
            
             my ($shortname) = ($name =~ /^internal\.threshold_(.+)$/); 
             if ($put_result eq 'ok') {
-                $setoutput.=&mt('Set threshold for').' <b>'.$$threshold_titles{$shortname}.'</b> '.&mt('to').' <b>'.$value.'</b>.<br />';
-            } else {
-                $setoutput.=&mt('Unable to set threshold for').' <b>'.$name.'</b> '.&mt('to').
-                    ' <b>'.$value.'</b> '.&mt('due to').' '.$put_result.'.<br />';
+                $setoutput.=&mt('Set threshold for [_1] to [_2]',
+				'<b>'.$$threshold_titles{$shortname}.'</b>',
+				'<b>'.$value.'</b>').'<br />';
+	    } else {
+                $setoutput.=&mt('Unable to set threshold for [_1] to [_2] due to [_3].',
+				'<b>'.$name.'</b>','<b>'.$value.'</b>',
+				'<tt>'.$put_result.'</tt>').'<br />';
             }
         }
     }