--- loncom/interface/spreadsheet/Spreadsheet.pm 2013/08/09 17:58:15 1.82 +++ loncom/interface/spreadsheet/Spreadsheet.pm 2014/02/12 16:54:21 1.83 @@ -1,5 +1,5 @@ # -# $Id: Spreadsheet.pm,v 1.82 2013/08/09 17:58:15 raeburn Exp $ +# $Id: Spreadsheet.pm,v 1.83 2014/02/12 16:54:21 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -774,7 +774,7 @@ sub calc { $depth++; if ($depth>100) { undef %sheet_values; - return $lastcalc.': Maximum calculation depth exceeded'; + return $lastcalc.': '.&mt('Maximum calculation depth exceeded'); } } return 'okay'; @@ -873,7 +873,7 @@ sub expandnamed { $returnvalue = $values[0]; } elsif (scalar(@matches) > 0) { # more than one match. Look for a concise one - $returnvalue = "'non-unique parameter name : $expression'"; + $returnvalue = "'".&mt('non-unique parameter name: [_1]',$expression).'"'; for (my $i=0; $i<=$#matches;$i++) { if ($matches[$i] =~ /^$expression$/) { # why do we not do this lookup here? @@ -883,7 +883,7 @@ sub expandnamed { } else { # There was a negative number of matches, which indicates # something is wrong with reality. Better warn the user. - $returnvalue = '"bizzare parameter: '.$expression.'"'; + $returnvalue = "'".&mt('bizzare parameter: [_1]',$expression)."'"; } return $returnvalue; } @@ -1267,9 +1267,9 @@ sub html_report_error { my $self = shift(); my $Str = ''; if ($self->badcalc()) { - $Str = '

'. + $Str = '

'. &mt('An error occurred while calculating this spreadsheet'). - "

\n". + "

\n". '
'.$self->calcerror()."
\n"; } return $Str; @@ -1432,7 +1432,7 @@ sub output_selector { foreach ($self->output_options()) { $output_selector.='\n"; } @@ -1509,7 +1509,7 @@ sub outsheet_excel { # # Write a link to allow them to download it $r->print('
'. - 'Your Excel spreadsheet.'."\n"); + ''.&mt('Your Excel spreadsheet').''."\n"); return; } @@ -1695,8 +1695,10 @@ sub load { my $sheetxml=&Apache::lonnet::getfile (&Apache::lonnet::filelocation('',$filename)); if ($sheetxml == -1) { - $sheetxml='"Error loading spreadsheet ' - .$self->filename().'"'; + $sheetxml=''. + &mt('Error loading spreadsheet [_1]', + '"'.$self->filename().'"'). + ''; } ($formulas,undef) = &parse_sheet(\$sheetxml); # Get just the filename and set the sheets filename