[LON-CAPA-cvs] cvs: loncom /publisher lonunauthorized.pm
bisitz
lon-capa-cvs-allow@mail.lon-capa.org
Mon, 11 Aug 2008 10:18:32 -0000
bisitz Mon Aug 11 06:18:32 2008 EDT
Modified files:
/loncom/publisher lonunauthorized.pm
Log:
Localization:
- Added missing &mt() calls
- Optimized &mt() calls and code
- typo
Index: loncom/publisher/lonunauthorized.pm
diff -u loncom/publisher/lonunauthorized.pm:1.7 loncom/publisher/lonunauthorized.pm:1.8
--- loncom/publisher/lonunauthorized.pm:1.7 Fri Mar 2 18:18:19 2007
+++ loncom/publisher/lonunauthorized.pm Mon Aug 11 06:18:31 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Unauthorized to access construction space
#
-# $Id: lonunauthorized.pm,v 1.7 2007/03/02 23:18:19 albertel Exp $
+# $Id: lonunauthorized.pm,v 1.8 2008/08/11 10:18:31 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -54,33 +54,35 @@
# figure out what went wrong
if ($ownerdomain) {
- $r->print('<h1>'.&mt('Choose another server').'</h1><p>'.
-&mt('The constuction space for this resource is located on another server.').
-'</p>');
+ $r->print('<h1>'.&mt('Choose another server').'</h1><p>'
+ .&mt('The construction space for this resource is located on another server.')
+ .'</p>');
my $ownerhome=&Apache::lonnet::homeserver($ownername,$ownerdomain);
unless ($ownerhome eq 'no_host') {
- $r->print(
- "<p>".&mt('Please log into')." <tt>".&Apache::lonnet::hostname($ownerhome).
- "</tt> ".&mt('to edit.')."</p>");
+ $r->print('<p>'
+ .&mt('Please log into [_1] to edit.'
+ ,'<tt>'.&Apache::lonnet::hostname($ownerhome).'</tt>')
+ .'</p>');
}
} else {
- $r->print(
- "<h1>".
- &mt("You do not have authoring privileges for this resource")."</h1>");
+ $r->print('<h1>'
+ .&mt('You do not have authoring privileges for this resource')
+ .'</h1>');
my ($realownername)=
($env{'request.editurl'}=~m{/(?:~|priv/|home/)($LONCAPA::username_re)});
my $realownerhome=
&Apache::lonnet::homeserver($realownername,
$r->dir_config('lonDefDomain'));
unless ($realownerhome eq 'no_host') {
- $r->print("<p>".&mt('Contact')." ".
- &Apache::loncommon::aboutmewrapper(
- &Apache::loncommon::plainname($realownername,
- $r->dir_config('lonDefDomain')).' ('.
- $realownername.&mt(' at ').
- $r->dir_config('lonDefDomain').')',
- $realownername,$r->dir_config('lonDefDomain')).
- ' for access.</p>');
+ my $plainname=&Apache::loncommon::plainname($realownername,$r->dir_config('lonDefDomain'));
+ my $user=&mt('[_1] at [_2]',$realownername,$r->dir_config('lonDefDomain'));
+ my $userlink=&Apache::loncommon::aboutmewrapper(
+ $plainname.' ('.$user.')'
+ ,$realownername
+ ,$r->dir_config('lonDefDomain'));
+ $r->print('<p>'
+ .&mt('Contact [_1] for access.',$userlink)
+ .'</p>');
}
}