--- loncom/interface/slotrequest.pm 2009/01/23 21:34:47 1.86 +++ loncom/interface/slotrequest.pm 2009/02/02 18:20:15 1.88 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler for requesting to have slots added to a students record # -# $Id: slotrequest.pm,v 1.86 2009/01/23 21:34:47 raeburn Exp $ +# $Id: slotrequest.pm,v 1.88 2009/02/02 18:20:15 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -345,8 +345,8 @@ sub remove_registration { return; } if (!%consumed) { - $r->print("
".&mt('Slot [_1] has no reservations.', - $slot_name)."
"); + $r->print(''.&mt('Slot [_1] has no reservations.', + ''.$slot_name.'').'
'); return; } @@ -557,15 +557,15 @@ sub delete_slot { my $ret = &Apache::lonnet::cput('slots', {$slot_name => \%slot}, $cdom, $cnum); if ($ret eq 'ok') { - $r->print("Slot $slot_name marked as deleted.
"); + $r->print(''.&mt('Slot [_1] marked as deleted.',''.$slot_name.'').'
'); } else { - $r->print("An error ($ret) occurse when attempting to delete Slot $slot_name.
"); + $r->print(''.&mt('An error occurred when attempting to delete slot: [_1]',''.$slot_name.'')." ($ret)
"); } } else { if (%consumed) { - $r->print("Slot $slot_name has active reservations.
"); + $r->print(''.&mt('Slot [_1] has active reservations.',''.$slot_name.'').'
'); } else { - $r->print("Slot $slot_name does not exist.
"); + $r->print(''.&mt('Slot [_1] does not exist.',''.$slot_name.'').'
'); } } $r->print(''); } elsif ($reserved > -1) { - $r->print("Success: $description
"); + $r->print(''.&mt('Success: [_1]',$description).'
'); $retvalue = 1; } elsif ($reserved < 0) { - $r->print("Already reserved: $description
"); + $r->print(''.&mt('Already reserved: [_1]',$description).'
'); } if (!$inhibit_return_link) { &return_link($r); } return 1; } my %lt=('request'=>"Availibility list", - 'try' =>'Try again'); + 'try' =>'Try again?', + 'or' => 'or'); %lt=&Apache::lonlocal::texthash(%lt); my $extra_input; @@ -651,8 +653,8 @@ STUFF $extra_input=''; } + $r->print(''.&mt('[_1]Failed[_2] to reserve a slot for [_3].','','',$description).'
'); $r->print(<-?
-or +$lt{'or'}
- -or STUFF - if (!$inhibit_return_link) { &return_link($r); } + if (!$inhibit_return_link) { + $r->print(&mt('or').'').&return_link($r); + } else { + $r->print(''); + } return 0; } @@ -859,7 +862,8 @@ STUFF } if (!$available) { - $r->print('Created $countdone slots\n
"); + $r->print(''.&mt('Created [quant,_1,slot]',$countdone)."\n".'
'); foreach my $error (@errors) { - $r->print("$error
\n"); + $r->print(''.$error.'
'."\n"); } &show_table($r,$mgr); return ''; @@ -1699,7 +1704,7 @@ sub handler { &release_slot($r,$symb,$env{'form.releaseslot'}); } } else { - $r->print("Unknown command: ".$env{'form.command'}."
"); + $r->print(''.&mt('Unknown command: [_1]',$env{'form.command'}).'
'); } } &end_page($r);