[LON-CAPA-cvs] cvs: loncom /auth lonauth.pm
bisitz
lon-capa-cvs-allow@mail.lon-capa.org
Fri, 30 May 2008 19:09:51 -0000
bisitz Fri May 30 15:09:51 2008 EDT
Modified files:
/loncom/auth lonauth.pm
Log:
Localization:
- Added missing &mt() calls
- Changed "Problems?" to "Login problems?" to avoid translation conflicts
Index: loncom/auth/lonauth.pm
diff -u loncom/auth/lonauth.pm:1.91 loncom/auth/lonauth.pm:1.92
--- loncom/auth/lonauth.pm:1.91 Wed May 14 14:27:30 2008
+++ loncom/auth/lonauth.pm Fri May 30 15:09:50 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network
# User Authentication Module
#
-# $Id: lonauth.pm,v 1.91 2008/05/14 18:27:30 raeburn Exp $
+# $Id: lonauth.pm,v 1.92 2008/05/30 19:09:50 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -96,8 +96,8 @@
my %lt=&Apache::lonlocal::texthash(
'wel' => 'Welcome',
- 'mes' => 'Welcome to the Learning<i>Online</i> Network with CAPA. Please wait while your session is being set up',
- 'pro' => 'Problems',
+ 'mes' => 'Welcome to the Learning<i>Online</i> Network with CAPA. Please wait while your session is being set up.',
+ 'pro' => 'Login problems?',
'log' => 'loginproblems.html',
);
$r->print(<<ENDSUCCESS);
@@ -105,8 +105,8 @@
$setflags
$windowinfo
<h1>$lt{'wel'}</h1>
-$lt{'mes'}.<p>
-<a href="/adm/$lt{'log'}">$lt{'pro'}?</a></p>
+$lt{'mes'}<p>
+<a href="/adm/$lt{'log'}">$lt{'pro'}</a></p>
$remoteinfo
$maincall
$continuelink
@@ -121,29 +121,19 @@
my $start_page = &Apache::loncommon::start_page('Unsuccessful Login',undef,
{'no_inline_link' => 1,});
my $end_page = &Apache::loncommon::end_page();
-
- $message = &mt($message);
- my %lt=('sorry' => &mt('Sorry ...'),
- 'please' =>
- &mt('Please [_1]log in again[_2].',
- "<a href=\"/adm/login?username=$form->{'uname'}&domain=$form->{'udom'}\">",
- '</a>'),
- 'problemspage' => &mt('loginproblems.html'),
- 'problems' => 'Problems',
- );
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
-
- $r->print(<<ENDFAILED);
-$start_page
-<h1>$lt{'sorry'}</h1>
-<p><b>$message</b></p>
-<p>$lt{'please'}</p>
-<p>
-<a href="/adm/$lt{'problemspage'}">$lt{'problems'}</a></p>
-$end_page
-ENDFAILED
-}
+ $r->print(
+ $start_page
+ .'<h1>'.&mt('Sorry ...').'</h1>'
+ .'<p><b>'.&mt($message).'</b></p>'
+ .'<p>'.&mt('Please [_1]log in again[_2].'
+ ,"<a href=\"/adm/login?username=$form->{'uname'}&domain=$form->{'udom'}\">",'</a>')
+ .'</p>'
+ .'<p><a href="/adm/loginproblems.html">'.&mt('Login problems?').'</a></p>'
+ .$end_page
+ );
+ }
# ------------------------------------------------------------------ Rerouting!
@@ -151,8 +141,8 @@
my ($r) = @_;
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
- my $msg='<h1>Sorry ...</h1>
- Please <a href="/">log in again</a>.';
+ my $msg='<h1>'.&mt('Sorry ...').'</h1>'
+ .&mt('Please [_1]log in again[_2].');
&Apache::loncommon::simple_error_page($r,'Rerouting',$msg);
}
@@ -179,16 +169,16 @@
&Apache::loncommon::start_page('Already logged in');
my $end_page =
&Apache::loncommon::end_page();
- $r->print(<<ENDFAILED);
-$start_page
-<h1>You are already logged in</h1>
-<p>Please either <a href="/adm/roles">continue the current session</a> or
-<a href="/adm/logout">logout</a>.</p>
-<p>
-<a href="/adm/loginproblems.html">Problems?</a></p>
-$end_page
-ENDFAILED
- return OK;
+ $r->print(
+ $start_page
+ .'<h1>'.&mt('You are already logged in!').'</h1>'
+ .'<p>'.&mt('Please either [_1]continue the current session[_2] or [_3]logout[_4].'
+ ,'<a href="/adm/roles">','</a>','<a href="/adm/logout">','</a>')
+ .'</p>'
+ .'<p><a href="/adm/loginproblems.html">'.&mt('Login problems?').'</a></p>'
+ .$end_page
+ );
+ return OK;
}
# ---------------------------------------------------- No valid token, continue