[LON-CAPA-cvs] cvs: loncom /homework imageresponse.pm matchresponse.pm optionresponse.pm radiobuttonresponse.pm rankresponse.pm
bisitz
lon-capa-cvs-allow@mail.lon-capa.org
Fri, 08 Aug 2008 16:37:18 -0000
This is a MIME encoded message
--bisitz1218213438
Content-Type: text/plain
bisitz Fri Aug 8 12:37:18 2008 EDT
Modified files:
/loncom/homework imageresponse.pm matchresponse.pm
optionresponse.pm radiobuttonresponse.pm
rankresponse.pm
Log:
Localization:
- Added missing &mt() call to "Foils without names" warning
- Optimized &mt() call for "Foil name ... appears more than once" warning
- Added some other missing &mt() calls
--bisitz1218213438
Content-Type: text/plain
Content-Disposition: attachment; filename="bisitz-20080808123718.txt"
Index: loncom/homework/imageresponse.pm
diff -u loncom/homework/imageresponse.pm:1.93 loncom/homework/imageresponse.pm:1.94
--- loncom/homework/imageresponse.pm:1.93 Tue Mar 11 22:46:53 2008
+++ loncom/homework/imageresponse.pm Fri Aug 8 12:37:13 2008
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# image click response style
#
-# $Id: imageresponse.pm,v 1.93 2008/03/12 02:46:53 raeburn Exp $
+# $Id: imageresponse.pm,v 1.94 2008/08/08 16:37:13 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -367,7 +367,7 @@
} elsif ($1 eq 'polygon') {
$grade=&grade_polygon($area,$x,$y);
} else {
- &Apache::lonxml::error("Unknown area style $area");
+ &Apache::lonxml::error(&mt('Unknown area style [_1]',$area));
}
&Apache::lonxml::debug("Area said $grade");
if ($grade eq 'APPROX_ANS') { last; }
@@ -494,11 +494,12 @@
$target eq 'analyze' || $target eq 'answer') {
my $name = &Apache::lonxml::get_param('name',$parstack,$safeeval);
if ($name eq "") {
- &Apache::lonxml::warning("Foils without names exist. This can cause problems to malfunction.");
+ &Apache::lonxml::warning(&mt('Foils without names exist. This can cause problems to malfunction.'));
$name=$Apache::lonxml::curdepth;
}
if (defined($Apache::response::foilnames{$name})) {
- &Apache::lonxml::error(&mt("Foil name <b><tt>[_1]</tt></b> appears more than once. Foil names need to be unique.",$name));
+ &Apache::lonxml::error(&mt("Foil name [_1] appears more than once. Foil names need to be unique."
+ ,'<b><tt>'.$name.'</tt></b>'));
}
$Apache::response::foilnames{$name}++;
if ( $Apache::imageresponse::conceptgroup
Index: loncom/homework/matchresponse.pm
diff -u loncom/homework/matchresponse.pm:1.69 loncom/homework/matchresponse.pm:1.70
--- loncom/homework/matchresponse.pm:1.69 Fri Feb 1 17:05:45 2008
+++ loncom/homework/matchresponse.pm Fri Aug 8 12:37:13 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Full matching style response
#
-# $Id: matchresponse.pm,v 1.69 2008/02/01 22:05:45 raeburn Exp $
+# $Id: matchresponse.pm,v 1.70 2008/08/08 16:37:13 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -719,12 +719,12 @@
my $name = &Apache::lonxml::get_param('name',$parstack,$safeeval);
&Apache::lonxml::debug("Got a name of :$name:");
if (!$name) {
- &Apache::lonxml::warning("Foils without names exist. This can cause problems to malfunction.");
+ &Apache::lonxml::warning(&mt('Foils without names exist. This can cause problems to malfunction.'));
$name=$Apache::lonxml::curdepth;
}
&Apache::lonxml::debug("Using a name of :$name:");
if (defined($Apache::response::foilnames{$name})) {
- &Apache::lonxml::error(&mt("Foil name <b><tt>[_1]</tt></b> appears more than once. Foil names need to be unique.",$name));
+ &Apache::lonxml::error(&mt("Foil name [_1] appears more than once. Foil names need to be unique.",'<b><tt>'.$name.'</tt></b>'));
}
$Apache::response::foilnames{$name}++;
my $location =&Apache::lonxml::get_param('location',$parstack,
Index: loncom/homework/optionresponse.pm
diff -u loncom/homework/optionresponse.pm:1.150 loncom/homework/optionresponse.pm:1.151
--- loncom/homework/optionresponse.pm:1.150 Mon Jun 23 07:27:44 2008
+++ loncom/homework/optionresponse.pm Fri Aug 8 12:37:13 2008
@@ -1,7 +1,7 @@
# LearningOnline Network with CAPA
# option list style responses
#
-# $Id: optionresponse.pm,v 1.150 2008/06/23 11:27:44 bisitz Exp $
+# $Id: optionresponse.pm,v 1.151 2008/08/08 16:37:13 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -684,12 +684,12 @@
my $name = &Apache::lonxml::get_param('name',$parstack,$safeeval);
&Apache::lonxml::debug("Got a name of :$name:");
if ($name eq "") {
- &Apache::lonxml::warning("Foils without names exist. This can cause problems to malfunction.");
+ &Apache::lonxml::warning(&mt('Foils without names exist. This can cause problems to malfunction.'));
$name=$Apache::lonxml::curdepth;
}
&Apache::lonxml::debug("Using a name of :$name:");
if (defined($Apache::response::foilnames{$name})) {
- &Apache::lonxml::error(&mt("Foil name <b><tt>[_1]</tt></b> appears more than once. Foil names need to be unique.",$name));
+ &Apache::lonxml::error(&mt("Foil name [_1] appears more than once. Foil names need to be unique.",'<b><tt>'.$name.'</tt></b>'));
}
$Apache::response::foilnames{$name}++;
my $location =&Apache::lonxml::get_param('location',$parstack,$safeeval);
Index: loncom/homework/radiobuttonresponse.pm
diff -u loncom/homework/radiobuttonresponse.pm:1.133 loncom/homework/radiobuttonresponse.pm:1.134
--- loncom/homework/radiobuttonresponse.pm:1.133 Fri Mar 21 20:36:57 2008
+++ loncom/homework/radiobuttonresponse.pm Fri Aug 8 12:37:13 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# mutliple choice style responses
#
-# $Id: radiobuttonresponse.pm,v 1.133 2008/03/22 00:36:57 raeburn Exp $
+# $Id: radiobuttonresponse.pm,v 1.134 2008/08/08 16:37:13 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -442,7 +442,7 @@
}
}
if (!$havetrue && $Apache::lonhomework::type ne 'survey') {
- &Apache::lonxml::error("There are no true statements available.<br />");
+ &Apache::lonxml::error(&mt('There are no true statements available.').'<br />');
}
} else {
my $current=0;
@@ -503,7 +503,7 @@
my $dosplice=1;
if ($notrue && $Apache::lonhomework::type ne 'survey') {
$dosplice=0;
- &Apache::lonxml::error("There are no true statements available.<br />");
+ &Apache::lonxml::error(&mt('There are no true statements available.').'<br />');
}
#insert the true statement, keeping track of where it wants to be
if ($Apache::response::foilgroup{$truename.'.location'} eq 'top' && $dosplice) {
@@ -764,11 +764,11 @@
if ($value ne 'unused') {
my $name = &Apache::lonxml::get_param('name',$parstack,$safeeval);
if ($name eq "") {
- &Apache::lonxml::warning("Foils without names exist. This can cause problems to malfunction.");
+ &Apache::lonxml::warning(&mt('Foils without names exist. This can cause problems to malfunction.'));
$name=$Apache::lonxml::curdepth;
}
if (defined($Apache::response::foilnames{$name})) {
- &Apache::lonxml::error(&mt("Foil name <b><tt>[_1]</tt></b> appears more than once. Foil names need to be unique.",$name));
+ &Apache::lonxml::error(&mt('Foil name [_1] appears more than once. Foil names need to be unique.','<b><tt>'.$name.'</tt></b>'));
}
$Apache::response::foilnames{$name}++;
my $location =&Apache::lonxml::get_param('location',$parstack,
Index: loncom/homework/rankresponse.pm
diff -u loncom/homework/rankresponse.pm:1.56 loncom/homework/rankresponse.pm:1.57
--- loncom/homework/rankresponse.pm:1.56 Fri Feb 1 17:05:45 2008
+++ loncom/homework/rankresponse.pm Fri Aug 8 12:37:13 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# rank style response
#
-# $Id: rankresponse.pm,v 1.56 2008/02/01 22:05:45 raeburn Exp $
+# $Id: rankresponse.pm,v 1.57 2008/08/08 16:37:13 bisitz Exp $
# Copyright Michigan State University Board of Trustees
#
# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
@@ -474,12 +474,12 @@
my $name = &Apache::lonxml::get_param('name',$parstack,$safeeval);
&Apache::lonxml::debug("Got a name of :$name:");
if ($name eq "") {
- &Apache::lonxml::warning("Foils without names exist. This can cause problems to malfunction.");
+ &Apache::lonxml::warning(&mt('Foils without names exist. This can cause problems to malfunction.'));
$name=$Apache::lonxml::curdepth;
}
&Apache::lonxml::debug("Using a name of :$name:");
if (defined($Apache::response::foilnames{$name})) {
- &Apache::lonxml::error(&mt("Foil name <b><tt>[_1]</tt></b> appears more than once. Foil names need to be unique.",$name));
+ &Apache::lonxml::error(&mt('Foil name [_1] appears more than once. Foil names need to be unique.','<b><tt>'.$name.'</tt></b>'));
}
$Apache::response::foilnames{$name}++;
my $location =&Apache::lonxml::get_param('location',$parstack,
--bisitz1218213438--