[LON-CAPA-cvs] cvs: loncom /homework edit.pm optionresponse.pm
bisitz
bisitz at source.lon-capa.org
Tue Dec 3 12:22:08 EST 2013
bisitz Tue Dec 3 17:22:08 2013 EDT
Modified files:
/loncom/homework optionresponse.pm edit.pm
Log:
Internationalization of colorful editor - added missing &mt() calls
Index: loncom/homework/optionresponse.pm
diff -u loncom/homework/optionresponse.pm:1.192 loncom/homework/optionresponse.pm:1.193
--- loncom/homework/optionresponse.pm:1.192 Tue Dec 3 14:54:29 2013
+++ loncom/homework/optionresponse.pm Tue Dec 3 17:22:08 2013
@@ -1,7 +1,7 @@
# LearningOnline Network with CAPA
# option list style responses
#
-# $Id: optionresponse.pm,v 1.192 2013/12/03 14:54:29 bisitz Exp $
+# $Id: optionresponse.pm,v 1.193 2013/12/03 17:22:08 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -120,17 +120,22 @@
}
my $insertlist=&Apache::edit::insertlist($target,$token);
$result.=&Apache::edit::start_table($token);
+ my %lt = &Apache::lonlocal::texthash(
+ sel => 'Select Options',
+ add => 'Add new Option:',
+ del => 'Delete an Option:',
+ );
$result.= (<<ENDTABLE);
- <tr><td>Select Options</td>
+ <tr><td>$lt{'sel'}</td>
<td>
- Add new Option: <input type="text" name="$Apache::lonxml::curdepth.options" />
+ $lt{'add'} <input type="text" name="$Apache::lonxml::curdepth.options" />
</td>
- <td>Delete an Option:
+ <td>$lt{'del'}
<select name="$Apache::lonxml::curdepth.deleteopt">$optionlist</select>
</td>
ENDTABLE
$result.= '<td>'.&Apache::edit::checked_arg('Print options:','texoptions',
- [ ['nochoice','Don\'t show option list'] ]
+ [ ['nochoice',"Don't show option list"] ]
,$token).'</td>';
$result.= '<td><label>'.&mt('Two-option checkboxes for:').
'<select name="checkboxvalue_'.$Apache::lonxml::curdepth.'">';
@@ -143,7 +148,7 @@
}
$result.='</select></label>';
$result.=&Apache::edit::checked_arg('Checkbox options:','checkboxoptions',
- [ ['nochoice','Don\'t show option list'] ]
+ [ ['nochoice',"Don't show option list"] ]
,$token).'</td>';
$result.= &Apache::edit::end_row();
$result.= &Apache::edit::start_spanning_row();
Index: loncom/homework/edit.pm
diff -u loncom/homework/edit.pm:1.149 loncom/homework/edit.pm:1.150
--- loncom/homework/edit.pm:1.149 Tue Dec 3 16:39:45 2013
+++ loncom/homework/edit.pm Tue Dec 3 17:22:08 2013
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# edit mode helpers
#
-# $Id: edit.pm,v 1.149 2013/12/03 16:39:45 bisitz Exp $
+# $Id: edit.pm,v 1.150 2013/12/03 17:22:08 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -950,10 +950,10 @@
my ($value,$text);
if ( ref($option) eq 'ARRAY') {
$value='value="'.$$option[0].'"';
- $text=$$option[1];
+ $text=&mt($$option[1]);
$option=$$option[0];
} else {
- $text=$option;
+ $text=&mt($option);
$value='value="'.$option.'"';
}
$result.=' <span class="LC_edit_opt"><label><input type="checkbox" '.$value.' name="'.
More information about the LON-CAPA-cvs
mailing list