[LON-CAPA-cvs] cvs: loncom /homework bridgetask.pm chemresponse.pm grades.pm

bisitz bisitz at source.lon-capa.org
Thu Feb 13 13:13:23 EST 2014


bisitz		Thu Feb 13 18:13:23 2014 EDT

  Modified files:              
    /loncom/homework	bridgetask.pm chemresponse.pm grades.pm 
  Log:
  Internationalization: Added missing &mt() calls
  
  
  
Index: loncom/homework/bridgetask.pm
diff -u loncom/homework/bridgetask.pm:1.262 loncom/homework/bridgetask.pm:1.263
--- loncom/homework/bridgetask.pm:1.262	Mon Jul 15 16:13:12 2013
+++ loncom/homework/bridgetask.pm	Thu Feb 13 18:13:22 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: bridgetask.pm,v 1.262 2013/07/15 16:13:12 bisitz Exp $
+# $Id: bridgetask.pm,v 1.263 2014/02/13 18:13:22 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -252,11 +252,11 @@
 	$size=scalar(keys(%sections))+2;
     }
     my $sec_select = "\n".'<select multiple="multiple" name="chosensections" size="'.$size.'">'."\n";
-    $sec_select .= "\t<option value='all' selected='selected'>all</option>\n";
+    $sec_select .= "\t".'<option value="all" selected="selected">'.&mt('all')."</option>\n";
     foreach my $sec (sort {lc($a) cmp lc($b)} (keys(%sections))) {
 	$sec_select .= "\t<option value=\"$sec\">$sec</option>\n";
     }
-    $sec_select .= "\t<option value='none'>none</option>\n</select>\n";
+    $sec_select .= "\t".'<option value="none">'.&mt('none')."</option>\n</select>\n";
 
     my $uri=$env{'request.uri'};
     if ($env{'request.enc'}) { $uri=&Apache::lonenc::encrypted($uri); }
Index: loncom/homework/chemresponse.pm
diff -u loncom/homework/chemresponse.pm:1.92 loncom/homework/chemresponse.pm:1.93
--- loncom/homework/chemresponse.pm:1.92	Fri May  3 16:29:40 2013
+++ loncom/homework/chemresponse.pm	Thu Feb 13 18:13:22 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # chemical equation style response
 #
-# $Id: chemresponse.pm,v 1.92 2013/05/03 16:29:40 bisitz Exp $
+# $Id: chemresponse.pm,v 1.93 2014/02/13 18:13:22 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -87,7 +87,7 @@
     my $insert_answer;
     if ($shown_text eq '') { 
 	$insert_answer=
-	    '<input type="button" name="submit" value="Insert Answer" onclick="javascript:submitSmiles();" />';
+	    '<input type="button" name="submit" value="'.&mt('Insert Answer').'" onclick="javascript:submitSmiles();" />';
     }
 
     my $js = <<CHEMJS;
@@ -117,6 +117,11 @@
     my $end_page =
  	&Apache::loncommon::end_page({'js_ready' => 1,});
     my $java_not_enabled=&Apache::lonhtmlcommon::java_not_enabled();
+    my %lt = &Apache::lonlocal::texthash(
+        'seltext' => 'Select substituent...',
+        'close'   => 'Close',
+        'help'    => 'Help',
+       );
     my $body=<<CHEMPAGE;
 $js
 <center>
@@ -125,7 +130,7 @@
     <td></td>
     <td align="right">
       <select onchange="javascript:substituent(options[selectedIndex].text)">
-        <option>Select substituent</option>
+        <option>$lt{'seltext'}</option>
         <option>-C(=O)OH</option>
         <option>-C(=O)OMe</option>
         <option>-OC(=O)Me</option>
@@ -151,9 +156,9 @@
 <br />
 $insert_answer
 <br />
-<input type="button" value="  Close  " onclick = "javascript:window.close()" />
+<input type="button" value="$lt{'close'}" onclick="javascript:window.close()" />
   
-<input type="button" value="  Help  " onclick = "javascript:openHelpWindow()" />
+<input type="button" value="$lt{'help'}" onclick="javascript:openHelpWindow()" />
 </form>
 </center>
 CHEMPAGE
@@ -377,7 +382,7 @@
 
 sub format_prior_answer_organic {
     my ($mode,$answer,$other_data) = @_;
-    my $result=&mt('Smile representation: "[_1]"','<tt>'.$answer.'</tt>');
+    my $result=&mt('Smile representation: [_1]','"<tt>'.$answer.'</tt>"');
     my $jme=$other_data->[0];
     $result.=&jme_img($jme,$answer,400);
     return $result;
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.720 loncom/homework/grades.pm:1.721
--- loncom/homework/grades.pm:1.720	Tue Feb 11 14:29:10 2014
+++ loncom/homework/grades.pm	Thu Feb 13 18:13:22 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.720 2014/02/11 14:29:10 kruse Exp $
+# $Id: grades.pm,v 1.721 2014/02/13 18:13:22 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -410,7 +410,8 @@
 	return '<br /><br /><blockquote><tt>'.&keywords_highlight(&HTML::Entities::encode($answer, '"<>&')).'</tt></blockquote>';
 
     } elsif ( $response eq 'organic') {
-	my $result='Smile representation: "<tt>'.HTML::Entities::encode($answer, '"<>&').'</tt>"';
+        my $result=&mt('Smile representation: [_1]',
+                           '"<tt>'.&HTML::Entities::encode($answer, '"<>&').'</tt>"');
 	my $jme=$record->{$version."resource.$partid.$respid.molecule"};
 	$result.=&Apache::chemresponse::jme_img($jme,$answer,400);
 	return $result;
@@ -2774,7 +2775,10 @@
 		next;
 	    }
 	    if ($errorflag eq 'not_allowed') {
-		$request->print("<span class=\"LC_warning\">Not allowed to modify grades for $uname:$udom</span>");
+		$request->print(
+                    '<span class="LC_error">'
+                   .&mt('Not allowed to modify grades for [_1]',"$uname:$udom")
+                   .'</span>');
 		$ctr++;
 		next;
 	    }
@@ -6614,7 +6618,7 @@
 	$scantron_config{'CODEstart'} &&
 	$scantron_config{'CODElength'}) {
 	$CODElist=$env{'form.scantron_CODElist'};
-	if ($env{'form.scantron_CODElist'} eq '') { $CODElist='<span class="LC_warning">None</span>'; }
+	if ($env{'form.scantron_CODElist'} eq '') { $CODElist='<span class="LC_warning">'.&mt('None').'</span>'; }
 	$CODElist=
 	    '<tr><td><b>'.&mt('List of CODES to validate against:').'</b></td><td><tt>'.
 	    $env{'form.scantron_CODElist'}.'</tt></td></tr>';
@@ -8247,7 +8251,7 @@
         return &mt('The sequence to be graded contains response types which are handgraded.').'<p>'.
                &mt('If you have already graded these by bubbling sheets to indicate points awarded, [_1]what point value is assigned to a filled last bubble in each row?','<br />').
                '<label><input type="radio" name="scantron_lastbubblepoints" value="'.$bubbles_per_row.'" checked="checked" />'.&mt('[quant,_1,point]',$bubbles_per_row).'</label> '.&mt('or').' '.
-               '<label><input type="radio" name="scantron_lastbubblepoints" value="0"/>0 points</label></p>';
+               '<label><input type="radio" name="scantron_lastbubblepoints" value="0"/>'.&mt('0 points').'</label></p>';
     }
     return;
 }
@@ -9081,14 +9085,14 @@
 '<td>'.&mt('Bubblesheet').'</td><td>'.$showscandata.'</td><td rowspan="2">'.$last.'</td><td rowspan="2">'.$pid.'</td>'."\n".
 '</tr>'."\n".
 '<tr class="'.$css_class.'">'."\n".
-'<td>Submissions</td><td>'.$showrecord.'</td></tr>'."\n";
+'<td>'.&mt('Submissions').'</td><td>'.$showrecord.'</td></tr>'."\n";
                     $passed ++;
                 } else {
                     my $css_class = ($failed % 2)?'LC_odd_row':'LC_even_row';
                     $badstudents .= '<tr class="'.$css_class.'"><td>'.&mt('Bubblesheet').'</td><td><span class="LC_nobreak">'.$scandata{$pid}.'</span></td><td rowspan="2">'.$last.'</td><td rowspan="2">'.$pid.'</td>'."\n".
 '</tr>'."\n".
 '<tr class="'.$css_class.'">'."\n".
-'<td>Submissions</td><td><span class="LC_nobreak">'.$record{$pid}.'</span></td>'."\n".
+'<td>'.&mt('Submissions').'</td><td><span class="LC_nobreak">'.$record{$pid}.'</span></td>'."\n".
 '</tr>'."\n";
                     $failed ++;
                 }




More information about the LON-CAPA-cvs mailing list