[LON-CAPA-cvs] cvs: loncom /homework essayresponse.pm /localize/localize newphrases.txt
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 05 Mar 2004 20:18:26 -0000
albertel Fri Mar 5 15:18:26 2004 EDT
Modified files:
/loncom/homework essayresponse.pm
/loncom/localize/localize newphrases.txt
Log:
- BUG#2788, localizing essayresponse
Index: loncom/homework/essayresponse.pm
diff -u loncom/homework/essayresponse.pm:1.32 loncom/homework/essayresponse.pm:1.33
--- loncom/homework/essayresponse.pm:1.32 Tue Apr 29 16:32:21 2003
+++ loncom/homework/essayresponse.pm Fri Mar 5 15:18:26 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# essay (ungraded) style responses
#
-# $Id: essayresponse.pm,v 1.32 2003/04/29 20:32:21 www Exp $
+# $Id: essayresponse.pm,v 1.33 2004/03/05 20:18:26 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -25,13 +25,12 @@
#
# http://www.lon-capa.org/
#
-# 4/3 Guy
-# July, 2002, H. K. Ng
-#
+
package Apache::essayresponse;
use strict;
-use Apache::lonxml;
-use Apache::lonnet;
+use Apache::lonxml();
+use Apache::lonnet();
+use Apache::lonlocal;
BEGIN {
&Apache::lonxml::register('Apache::essayresponse',('essayresponse'));
@@ -53,30 +52,33 @@
my $uploadedfile= &HTML::Entities::encode($Apache::lonhomework::history{"resource.$part.$id.uploadedfile"});
$result='<br /><table border="1">';
$result.='<tr><td>'.
- '<input type="radio" name="HWDRAFT'.$part.'_'.$id.'" value="yes" checked>'.
- ' Submit entries below as answer to receive credit <br />'.
- '<input type="radio" name="HWDRAFT'.$part.'_'.$id.'" value="no">'.
- ' Save entries below as a draft answer (not submitting them for credit yet) '.
- '</td></tr>';
+ '<input type="radio" name="HWDRAFT'.$part.'_'.$id.'" value="yes" checked> '.
+ &mt('Submit entries below as answer to receive credit').' <br />'.
+ '<input type="radio" name="HWDRAFT'.$part.'_'.$id.'" value="no"> '.
+ &mt('Save entries below as a draft answer (not submitting them for credit yet)').
+ ' </td></tr>';
if ($ncol > 0) {
$result .='<tr><td>'.
'Collaborators: <input type="text" size="70" max="80" name="HWCOL'.
$part.'_'.$id.'" value="'.$coll.'" /><br />'.
- '(Enter maximum '.$ncol.' collaborators using username or username@domain, e.g. '.
- 'smithje or smithje@'.$ENV{'user.domain'}.'.)<br />';
+ &mt('(Enter maximum [_1] collaborators using username or username@domain, e.g. smithje or smithje@[_2].)',$ncol,$ENV{'user.domain'}).'<br />';
$result .= &check_collaborators($ncol,$coll) if ($coll =~ /\w+/);
$result .='</td></tr>';
}
if ($uploadedfiletypes) {
- $result.=
-'<tr><td>Submit a file: <input type="file" size="50" name="HWFILE'.
+ $result.='<tr><td>'.&mt('Submit a file:').
+ ' <input type="file" size="50" name="HWFILE'.
$part.'_'.$id.'" onFocus="this.form.enctype='.
-"'multipart/form-data'".';" /><br />Allowed filetypes: <b>'.$uploadedfiletypes.'</b><br />';
+ "'multipart/form-data'".';" /><br />'.
+ &mt('Allowed filetypes: <b>[_1]</b>',$uploadedfiletypes).
+ '<br />';
if ($uploadedfile) {
- $result.='Currently submitted: <tt><a href="'.
- &Apache::lonnet::tokenwrapper($Apache::lonhomework::history{"resource.$part.$id.uploadedurl"}).'"><img src="/adm/lonIcons/unknown.gif" border=0"> '.$uploadedfile.'</a></tt>';
+ my $curfile='<a href="'.&Apache::lonnet::tokenwrapper($Apache::lonhomework::history{"resource.$part.$id.uploadedurl"}).
+ '"><img src="/adm/lonIcons/unknown.gif" border=0" /> '.
+ $uploadedfile.'</a>';
+ $result.=&mt('Currently submitted: <tt>[_1]</tt>',$curfile);
} else {
- $result.='(Hand in a file you have prepared on your computer)';
+ $result.=&mt('(Hand in a file you have prepared on your computer)');
}
$result.='</td></tr>';
}
@@ -158,7 +160,8 @@
$result.='\begin{enumerate}';
for (my $i=0;$i<$repetition;$i++) {
$result.='\item[\textbf{'.($Apache::lonxml::counter+$i).
- '}.]\textit{Leave blank on scoring form}\vskip 0 mm';
+ '}.]\textit{'.&mt('Leave blank on scoring form').
+ '}\vskip 0 mm';
}
$result.= '\end{enumerate}';
}
Index: loncom/localize/localize/newphrases.txt
diff -u loncom/localize/localize/newphrases.txt:1.40 loncom/localize/localize/newphrases.txt:1.41
--- loncom/localize/localize/newphrases.txt:1.40 Thu Mar 4 10:46:43 2004
+++ loncom/localize/localize/newphrases.txt Fri Mar 5 15:18:26 2004
@@ -67,3 +67,13 @@
[UNDISPLAYABLE]
[TeX Unconverted Due To Previous Errors]
Evaluation Error
+Submit entries below as answer to receive credit
+Save entries below as a draft answer (not submitting them for credit yet)
+# [_1] is a number [_2] is the current domain
+(Enter maximum [_1] collaborators using username or username@domain, e.g. smithje or smithje@[_2].)
+# [_1] is a comma seperated list of file extensions
+Allowed filetypes: <b>[_1]</b>
+# [_1] is an html link to the current file
+Currently submitted: <tt>[_1]</tt>
+(Hand in a file you have prepared on your computer)
+Leave blank on scoring form
\ No newline at end of file