--- loncom/publisher/lonunauthorized.pm 2002/09/10 14:41:05 1.1 +++ loncom/publisher/lonunauthorized.pm 2003/09/22 15:39:53 1.2 @@ -1,7 +1,7 @@ # The LearningOnline Network # Unauthorized to access construction space # -# $Id: lonunauthorized.pm,v 1.1 2002/09/10 14:41:05 www Exp $ +# $Id: lonunauthorized.pm,v 1.2 2003/09/22 15:39:53 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -33,10 +33,11 @@ use Apache::Constants qw(:common); use Apache::loncommon; use Apache::lonnet; use Apache::loncacc; +use Apache::lonlocal; sub handler { my $r = shift; - $r->content_type('text/html'); + &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; return OK if $r->header_only; @@ -57,28 +58,29 @@ ENDDOCUMENT # figure out what went wrong if ($ownerdomain) { - $r->print('

Choose another server

'. - "

The constuction space for this resource is located on another server.

" - ); + $r->print('

'.&mt('Choose another server').'

'. +&mt('The constuction space for this resource is located on another server.'). +'

'); my $ownerhome=&Apache::lonnet::homeserver($ownername,$ownerdomain); unless ($ownerhome eq 'no_host') { $r->print( - "

Please log into ".$Apache::lonnet::hostname{$ownerhome}. - " to edit.

"); + "

".&mt('Please log into')." ".$Apache::lonnet::hostname{$ownerhome}. + " ".&mt('to edit.')."

"); } } else { $r->print( - "

You do not have authoring privileges for this resource

"); + "

". + &mt("You do not have authoring privileges for this resource")."

"); my ($realownername)=($ENV{'request.editurl'}=~/\/(?:\~|priv\/|home\/)(\w+)/); my $realownerhome= &Apache::lonnet::homeserver( $realownername,$r->dir_config('lonDefDomain')); unless ($realownerhome eq 'no_host') { - $r->print("

Contact ". + $r->print("

".&mt('Contact')." ". &Apache::loncommon::aboutmewrapper( &Apache::loncommon::plainname($realownername, $r->dir_config('lonDefDomain')).'('. - $realownername.' at '. + $realownername.&mt(' at '). $r->dir_config('lonDefDomain').')', $realownername,$r->dir_config('lonDefDomain')). ' for access.');