diff options
Diffstat (limited to 'lib/CatDap')
-rw-r--r-- | lib/CatDap/Controller/admin.pm | 75 | ||||
-rw-r--r-- | lib/CatDap/Controller/register.pm | 40 | ||||
-rw-r--r-- | lib/CatDap/Controller/user.pm | 47 | ||||
-rw-r--r-- | lib/CatDap/I18N/af.po | 172 | ||||
-rw-r--r-- | lib/CatDap/I18N/fr.po | 160 | ||||
-rw-r--r-- | lib/CatDap/I18N/messages.pot | 133 | ||||
-rw-r--r-- | lib/CatDap/View/TT.pm | 2 | ||||
-rw-r--r-- | lib/CatDap/View/Web.pm | 38 |
8 files changed, 481 insertions, 186 deletions
diff --git a/lib/CatDap/Controller/admin.pm b/lib/CatDap/Controller/admin.pm index 19fa15f..7632df4 100644 --- a/lib/CatDap/Controller/admin.pm +++ b/lib/CatDap/Controller/admin.pm @@ -48,11 +48,11 @@ sub auto : Private { my $mesg; my $dn; my $keyprefix = sprintf( "%02x%02x%02x", split /\./, $c->req->address ); - if ( !defined $c->user ) { + if ( !defined $c->user or not $c->req->cookie('key') ) { $c->detach('/user/login') if ( not $c->req->param('username') or not $c->req->param('password') ); - $c->log->info("No session, logging user in"); + $c->log->debug("No session, logging user in"); if ( !$c->authenticate( { @@ -67,7 +67,7 @@ sub auto : Private { #TODO: ppolicy .... $c->stash( errors => ['Incorrect username or password'] ); $c->stash( template => 'index.tt' ); - $c->log->info("Logging user in failed, forwarding to login page"); + $c->log->debug("Logging user in failed, forwarding to login page"); $c->visit('/user/login'); $c->detach; return 1; @@ -78,7 +78,7 @@ sub auto : Private { # $c->res->redirect('/user'); #} #$c->persist_user; - $c->log->info('Logging user in to LDAP'); + $c->log->debug('Logging user in to LDAP'); my $ug = Data::UUID->new; my $key = $ug->create_str(); $cipher = Crypt::CBC->new( @@ -103,7 +103,7 @@ sub auto : Private { -cipher => 'Blowfish' ) or die $!; $password = $cipher->decrypt( $c->session->{enc_password} ); - $c->log->info( "Re-authenticating user " . $c->session->{user} ); + $c->log->debug( "Re-authenticating user " . $c->session->{user} ); $c->authenticate( { username => $c->session->{user}, password => $password } ) or $c->view('/user/login'); @@ -126,7 +126,7 @@ sub account : Local { #my $attribute =~ m/^([\w\d]*)/,$c->req->param('attribute'); my $attribute = $c->req->param('attribute'); - $c->log->info("Searching for account using attribute $attribute"); + $c->log->debug("Searching for account using attribute $attribute"); #my $value =~ /^[\w\d]*/,$c->req->param('attribute'); my $value = $c->req->param('value'); @@ -180,13 +180,14 @@ sub account_promote : Local { $idpool->replace( uidNumber => $newuidnum ); $idpool->update; - $mesg = $entry->update or $c->log->info("LDAP update failed: $!"); + $mesg = $entry->update; if ($mesg->code) { + $c->log->info('LDAP update failed: ' . $mesg->error); push @errors, $mesg->error; #reverse idpool update $idpool->replace( uidNumber => $uidnum ); $mesg = $idpool->update; - $c->log->info("ERROR IdPool could not be reset to $uidnum"); + $c->log->info("ERROR IdPool could not be reset to $uidnum: ", $mesg->error) if $mesg->code; } } } @@ -221,7 +222,7 @@ sub account_modify : Local { my $attrdef; my $entry; - $c->log->info("Searching for user $user"); + $c->log->debug("Searching for user $user"); $mesg = $c->model('User')->search("(&(objectclass=inetOrgPerson)(uid=$user))"); $entry = $mesg->entry; @@ -241,7 +242,7 @@ sub account_modify : Local { next if $req !~ /(.+)_new/; my $attrname = $1; next if $params{ $attrname . '_new' } eq $params{ $attrname . '_old' }; - $c->log->info("Received update request for attribute $attrname"); + $c->log->debug("Received update request for attribute $attrname"); $update = 1; $attrdef = $schema->attribute($attrname) or die("getting schema failed: $!"); @@ -261,9 +262,9 @@ sub account_modify : Local { $mesg = $c->model('User')->search("(&(objectclass=inetOrgPerson)(uid=$user))"); - $c->log->info( $mesg->error ) if $mesg->code; + $c->log->debug( $mesg->error ) if $mesg->code; $entry = $mesg->entry; - $c->log->info( $mesg->error ) if $mesg->code; + $c->log->debug( $mesg->error ) if $mesg->code; my @values; my @attributes = $entry->attributes; @@ -421,9 +422,9 @@ sub account_addoc : Local { my $schema = $schemaldap->schema or die("Searching schema failed: $!"); $mesg = $c->model('user')->search("(&(objectclass=inetOrgPerson)(uid=$uid))"); - $c->log->info( $mesg->error ) if $mesg->code; + $c->log->debug( $mesg->error ) if $mesg->code; my $entry = $mesg->entry; - $c->log->info( $mesg->error ) if $mesg->code; + $c->log->debug( $mesg->error ) if $mesg->code; foreach my $attr ( $schema->must($objectclass) ) { push @must, $$attr{name} if not $entry->get_value( $$attr{name} ); @@ -439,14 +440,14 @@ sub account_addoc : Local { $entry->add( $addattr => $c->req->param($addattr) ); } else { - $c->log->info("Missing attribute $addattr"); + $c->log->debug("Missing attribute $addattr"); $haveall = 0; } } if ($haveall) { $entry->add( objectClass => [$objectclass] ); - $c->log->info("About to push updates to $dn"); - $c->log->info( Dumper( \$entry->changes ) ); + $c->log->debug("About to push updates to $dn"); + $c->log->debug( Dumper( \$entry->changes ) ); $mesg = $entry->update; push @errors, $mesg->error if $mesg->code; $c->stash( template => 'admin/account.tt', errors => @errors ); @@ -490,7 +491,7 @@ sub password : Local { $c->stash( uid => $uid, txnid => $txnid, mails => @mail); return 1; } - if ($c->req->param('txnid') != $c->session->{txnid}) { + if ($c->req->param('txnid') ne $c->session->{txnid}) { push @errors,'Transaction ID mismatch'; $c->detach; } @@ -501,13 +502,35 @@ sub password : Local { push @errors,"Password reset failed: " . $mesg->error; $c->detach; } - $c->stash->{email} = { - to => join ',',@mail, - subject => $c->config->{apptitle} . " - " . $c->loc('password reset'), - from => $c->config->{emailfrom}, - template => 'admin/password.tt', - }; - $c->forward( $c->view('Email::Template') ); + my $email = join(',',@mail); + # send the mail in the users preferred language + my @oldlang = $c->languages; + if ($entry->preferredLanguage) { + $c->log->debug("Setting languages to: " . Dumper($entry->preferredLanguage)); + $c->languages([$entry->preferredLanguage]); + } + $c->stash( + email => { + 'to' => $email, + 'subject' => $c->config->{apptitle} . " - " + . $c->loc('password reset'), + 'from' => $c->config->{emailfrom}, + 'template' => 'admin/password.tt', + 'content_type' => 'text/plain', + }, + entry => $entry, + url => $c->uri_for('/user/firstlogin') . "/?username=$uid&key=$newpass", + ); + $c->forward( $c->view('Email::Template') ); + $c->languages(@oldlang); + if ( @{ $c->error } ) { + my $errors = join "\n",@{ $c->error }; + $c->log->info("Sending reset mail to $email failed: $errors"); + $c->response->body($c->loc('An error occured sending the email, but your account was created. Please try the password recovery process f you entered the correct email address: [_1]', $errors)); + $c->error(0); # Reset the error condition if you need to + } + push @errors,$c->loc('Password reset and email sent'); + $c->res->redirect($c->uri_for('/admin/account_modify') . "/$uid"); } @@ -560,6 +583,8 @@ sub group_modify : Local { sub index : Path : Args(0) { my ( $self, $c ) = @_; + $c->detach('/index') if not $c->user; + $c->assert_user_roles('Account Admins'); $c->stash( pages => roles2pages( $c->user->roles ) ); #$c->response->body("Matched CatDap::Controller::admin in admin, roles $rolelist"); diff --git a/lib/CatDap/Controller/register.pm b/lib/CatDap/Controller/register.pm index 3838f26..5ad8e19 100644 --- a/lib/CatDap/Controller/register.pm +++ b/lib/CatDap/Controller/register.pm @@ -91,6 +91,8 @@ sub check : Local { my $password = $ug->create_str(); my $cn = $c->request->params->{gn} . " " . $c->request->params->{sn}; $c->log->info("Creating account for user $username"); + $c->log->debug("Preferred language(s)"); + $c->log->debug(Dumper($c->languages)); $mesg = $c->model('Proxy')->add($dn, attr => [ objectclass => [ 'inetOrgPerson' ], @@ -100,48 +102,36 @@ sub check : Local { mail => $email, pwdReset => 'TRUE', userPassword => $password, + preferredLanguage => $c->{languages}[0], ] ); - if ($mesg) { + if ($mesg->code) { push @errors,$mesg->error; $c->log->info( sprintf("Creating DN $dn failed: %s", $mesg->error) ); $c->stash(errors => \@errors); #$c->stash(template => 'register/index.tt'); } - my $text = <<EOF; -Dear %s, -Your Mageia indentity has been successfully created, but requires activation. -To activate your account, please follow the link below. -%s?username=%s&key=%s -EOF - my $body = $c->loc( - sprintf( - $text, - $c->request->params->{gn}, - $c->uri_for('/user/firstlogin'), - $username, - $password - ) + $c->stash( + email => { + 'to' => $email, + 'from' => ${$c->config}{'emailfrom'}, + 'subject' => ${$c->config}{'apptitle'} . " - " . $c->loc('Activation'), + 'template' => 'activation.tt', + }, + cn => $cn, + url => $c->uri_for('/user/firstlogin') . "?username=$username&key=$password", ); - $c->stash->{email} = { - to => $email, - from => ${$c->config}{emailfrom}, - subject => ${$c->config}{apptitle} . " - " . $c->loc('Activation'), - body => $body, - }; $c->log->info("Sending activation mail for user $username to $email"); - $c->forward( $c->view('Email') ); + $c->forward( $c->view('Email::Template') ); if ( @{ $c->error } ) { my $errors = join "\n",@{ $c->error }; $c->log->info("Sending activation mail to $email failed: $errors"); - $c->response->body($c->loc('An error occured sending the email, but your account was created. Please try the password recovery process f you entered the correct email address: [_1]', $errors)); + $c->response->body($c->loc('An error occured sending the email, but your account was created. Please try the password recovery process if you entered the correct email address. Errors [_1]', $errors)); $c->error(0); # Reset the error condition if you need to } - $c->stash(template => 'register/complete.tt'); - $c->stash(message => 'Check your email'); } sub captcha : Local { diff --git a/lib/CatDap/Controller/user.pm b/lib/CatDap/Controller/user.pm index e2ce800..f0220f2 100644 --- a/lib/CatDap/Controller/user.pm +++ b/lib/CatDap/Controller/user.pm @@ -47,8 +47,6 @@ it (we need to handle failure to decrypt it better) sub auto : Private { my ( $self, $c ) = @_; - $c->log->info("Request path is currently: " . $c->req->path); - $c->log->info(Dumper($c->req->path)); if ($c->req->path eq 'user/firstlogin') { return 1; } @@ -56,9 +54,16 @@ sub auto : Private { my $password; my $mesg; my $dn; + my @errors; my $keyprefix = sprintf("%02x%02x%02x",split /\./,$c->req->address); - if (! defined $c->user) { - $c->log->info("No session, logging user in"); + if (! defined $c->user or not $c->req->cookie('key')) { + if (not $c->req->param('password')) { + push @errors,$c->loc('Your session has expired'); + $c->stash(template => 'index.tt',errors => \@errors); + $c->detach; + } + + $c->log->debug("No session, logging user in"); if (! $c->authenticate({ username => $c->req->param('username'), password => $c->req->param('password') || $c->req->param('key')}) ) { @@ -74,7 +79,7 @@ sub auto : Private { # $c->res->redirect('/user'); #} #$c->persist_user; - $c->log->info('Logging user in to LDAP'); + $c->log->debug('Logging user in to LDAP'); my $ug = Data::UUID->new; my $key = $ug->create_str(); @@ -96,7 +101,7 @@ sub auto : Private { -cipher => 'Blowfish' ) or die $!; $password = $cipher->decrypt($c->session->{enc_password}); - $c->log->info("Re-authenticating user " . $c->user->username); + $c->log->debug("Re-authenticating user " . $c->user->username); $c->authenticate({username => $c->user->username,password => $password}); $c->res->cookies->{'key'} = {value => $key, expires => '+10m'}; @@ -131,7 +136,7 @@ sub index :Path :Args(0) { my $user = $c->user->username; my $entry; - $c->log->info("Searching for user $user"); + $c->log->debug("Searching for user $user"); $mesg = $c->model('User')->search("(&(objectclass=inetOrgPerson)(uid=$user))"); $entry = $mesg->entry; my %mods; @@ -157,9 +162,9 @@ sub index :Path :Args(0) { } $mesg = $c->model('User')->search("(&(objectclass=inetOrgPerson)(uid=$user))"); - $c->log->info($mesg->error) if $mesg->code; + $c->log->debug($mesg->error) if $mesg->code; $entry = $mesg->entry; - $c->log->info($mesg->error) if $mesg->code; + $c->log->debug($mesg->error) if $mesg->code; my @values; my @attributes = $entry->attributes; @@ -217,7 +222,7 @@ sub add : Local { $attr = $c->req->param('attribute'); $value = $c->req->param('value'); $user = $c->user->username; - $c->log->info("Searching for user $user"); + $c->log->debug("Searching for user $user"); $mesg = $c->model('User')->search("(&(objectclass=inetOrgPerson)(uid=$user))"); $entry = $mesg->entry; $entry->add( $attr => $value); @@ -232,7 +237,7 @@ sub delete : Local : Args(2) { my ( $self, $c, $attrname,$attrvalue) = @_; my ($mesg,$entry,$user); $user = $c->user->username; - $c->log->info("Searching for user $user"); + $c->log->debug("Searching for user $user"); $mesg = $c->model('User')->search("(&(objectclass=inetOrgPerson)(uid=$user))"); $entry = $mesg->entry; $c->log->info("Deleting $attrname = $attrvalue from user $user"); @@ -253,14 +258,24 @@ sub password : Local { $c->detach; } + # Re-authenticate to check the user has the right password + if (not $c->authenticate({ + 'username' => $c->user->username, + 'password' => $c->req->param('password'), + }) + ) { + $c->stash(errors => [ $c->loc('Password incorrect') ]); + $c->detach; + } if ($c->req->param('newpassword1') eq $c->req->param('newpassword2')) { $newpass = $c->req->param('newpassword1'); } else { - push @{${$c->stash}{'errors'}},"New passwords dont match"; + push @{${$c->stash}{'errors'}},$c->loc('New passwords dont match'); + $c->detach; } my $pp = Net::LDAP::Control::PasswordPolicy->new; $mesg = $c->model('User')->set_password( - oldpasswd => $c->req->param('password'), + #oldpasswd => $c->req->param('password'), newpasswd => $newpass, control => [ $pp ], ); @@ -278,7 +293,7 @@ sub password : Local { ) or die $!; $c->session->{enc_password} = $cipher->encrypt($newpass); push @{${$c->stash}{'errors'}},"Password change succeeded"; - $c->res->redirect('/user'); + #$c->res->redirect('/user'); } } @@ -386,8 +401,8 @@ sub gensubpages : Private { my ($type) = @_; my @subpagenames; @subpagenames = ( - { page => './', title => "Edit"}, - { page => 'password', title => "Change password"}, + { page => './', title => 'Edit'}, + { page => 'password', title => 'Change password'}, ); return \@subpagenames; } diff --git a/lib/CatDap/I18N/af.po b/lib/CatDap/I18N/af.po index 7181fbe..f1c4fcf 100644 --- a/lib/CatDap/I18N/af.po +++ b/lib/CatDap/I18N/af.po @@ -1,36 +1,77 @@ -#: lib/CatDap/Controller/register.pm:51 +#: lib/CatDap/Controller/register.pm:119 +msgid "Activation" +msgstr "Aktivering" + +#: root/user/index.tt:28 root/user/index.tt:8 +msgid "Add" +msgstr "Voeg by" + +#: lib/CatDap/Controller/register.pm:49 msgid "Addresses do not match" msgstr "Die addresse verskil" -#: lib/CatDap/Controller/register.pm:71 +#: lib/CatDap/Controller/register.pm:75 msgid "An account already exists with this email address" msgstr "'n Rekening met hierde epos adres bestaan reeds" -#: lib/CatDap/Controller/register.pm:76 +#: lib/CatDap/Controller/register.pm:80 msgid "An account already exists with this username" msgstr "'n Rekening met hierdie gebruikersnaam bestaan reeds" #. ($errors) -#: lib/CatDap/Controller/register.pm:120 +#: lib/CatDap/Controller/admin.pm:529 msgid "" "An error occured sending the email, but your account was created. Please try " "the password recovery process f you entered the correct email address: %1" msgstr "" "Daar was 'n fout met die stuur van die aktiverings epos, maar jou rekening " "is geskep. Probeer die wagwoord herwinnings proses as die epos adres korrek " -"was" +"was: %1" + +#. ($errors) +#: lib/CatDap/Controller/register.pm:131 +msgid "" +"An error occured sending the email, but your account was created. Please try " +"the password recovery process if you entered the correct email address. " +"Errors %1" +msgstr "" +"Daar was 'n fout met die stuur van die aktiverings epos, maar jou rekening " +"is geskep. Probeer die wagwoord herwinnings proses as die epos adres korrek " +"was. Foute: %1" + +#: root/user/firstlogin.tt:14 root/user/password.tt:18 +msgid "Change" +msgstr "Verander" -#: root/register/complete.tt:16 -msgid "Check your mail for activation instructions" -msgstr "Kyk jou epos vir aktiverings instruksies" +#: root/user/fake.tt:2 +msgid "Change password" +msgstr "Verander wagwoord" + +#: root/register/complete.tt:5 +msgid "Check your mail for activation instructions." +msgstr "Kyk jou epos vir aktiverings instruksies." #: root/register/index.tt:34 msgid "Confirm Email address" msgstr "Bevestig epos adres" -#: lib/CatDap/Controller/register.pm:106 -msgid "Dear" -msgstr "Liewe" +#: root/user/password.tt:5 +msgid "Current password" +msgstr "Huidige wagwoord" + +#. (cn) +#. (entry.cn) +#: root/email/activation.tt:1 root/email/admin/password.tt:1 +msgid "Dear %1," +msgstr "Liewe %1," + +#: root/user/index.tt:9 +msgid "Delete" +msgstr "Vee uit" + +#: root/user/fake.tt:1 +msgid "Edit" +msgstr "Wysig" #: root/register/index.tt:30 msgid "Email address" @@ -40,51 +81,71 @@ msgstr "Epos adres" msgid "First name" msgstr "Voornaam" -#: lib/CatDap/Controller/register.pm:54 +#: lib/CatDap/Controller/register.pm:52 msgid "Incorrect validation text, please try again" msgstr "Inkorrekte teks van die prentjie, probeer weer" -#: lib/CatDap/Controller/register.pm:48 +#: lib/CatDap/Controller/register.pm:46 msgid "Invalid email address" msgstr "Ongeldige epos adres" -#: lib/CatDap/Controller/register.pm:44 +#: lib/CatDap/Controller/register.pm:42 msgid "Invalid username" msgstr "Ongeldige gebruikersnaam" -#: root/index.tt:28 root/index.tt:6 +#: root/template/header:12 root/user/fake.tt:3 +msgid "Log out" +msgstr "Teken uit" + +#: root/index.tt:1 root/index.tt:17 msgid "Login" msgstr "Teken in" -#: lib/CatDap/Controller/register.pm:113 -msgid "Mageia Identity Activation" -msgstr "Mageia Identiteit Aktivering" +#: root/user/firstlogin.tt:5 root/user/password.tt:9 +msgid "New Password" +msgstr "Nuwe Wagwoord" + +#: lib/CatDap/Controller/user.pm:273 +msgid "New passwords dont match" +msgstr "Nuwe wagwoorde verskil" -#: root/index.tt:22 +#: root/index.tt:11 msgid "Password" msgstr "Wagwoord" -#: root/index.tt:29 root/register/index.tt:43 root/register/index.tt:6 +#: lib/CatDap/Controller/user.pm:267 +msgid "Password incorrect" +msgstr "Wagwoord inkorrek" + +#: lib/CatDap/Controller/admin.pm:532 +msgid "Password reset and email sent" +msgstr "Wagwoord is herstel en epos gestuur" + +#: root/email/admin/password.tt:5 +msgid "Please click below to change your password" +msgstr "Volg die skakel onder en verander jou wagwoord" + +#: root/index.tt:18 root/register/index.tt:43 root/register/index.tt:6 msgid "Register" msgstr "Registreer" -#: root/register/complete.tt:6 +#: root/register/complete.tt:1 msgid "Registration completed" msgstr "Registrasie voltooi" -#: root/register/complete.tt:15 +#: root/register/complete.tt:4 msgid "Registration was successful." -msgstr "Registrasie was suksesvol" +msgstr "Registrasie was suksesvol." + +#: root/user/firstlogin.tt:9 root/user/password.tt:13 +msgid "Repeat New Password" +msgstr "Herhaal Nuwe Wagwoord" #: root/register/index.tt:26 msgid "Surname" msgstr "Van" -#: lib/CatDap/Controller/register.pm:60 -msgid "The" -msgstr "Die" - -#: lib/CatDap/Controller/register.pm:57 +#: lib/CatDap/Controller/register.pm:56 msgid "The first name supplied contains illegal characters" msgstr "Die verskafte noemnaam sluit ongeldige karakters in" @@ -92,28 +153,51 @@ msgstr "Die verskafte noemnaam sluit ongeldige karakters in" msgid "The surname supplied contains illegal characters" msgstr "Die verskafte van sluit ondeldige karakters in" -#: lib/CatDap/Controller/register.pm:107 -msgid "To activate your account, please follow the link below.\n" -msgstr "Om U rekening te aktiveer, volg asseblief die volgende skakel.\n" +#: root/email/activation.tt:3 +msgid "To activate your account, please follow the link below." +msgstr "Om U rekening te aktiveer, volg asseblief die volgende skakel." + +#: root/user/index.tt:13 +msgid "Update" +msgstr "Opdateer" -#: root/index.tt:18 root/register/index.tt:18 +#: root/index.tt:7 root/register/index.tt:18 msgid "Username" msgstr "Gebruikersnaam" -#: lib/CatDap/Controller/register.pm:106 -msgid "" -"Your Mageia indentity has been successfully created, but requires " -"activation.\n" -msgstr "" +#. (c.config.organisation) +#: root/email/activation.tt:2 +msgid "Your %1 account has been successfully created, but requires activation." +msgstr "Jou %1 rekening is suksesvol geskep, maar aktivering is benodig" -#: root/index.tt:28 +#. (c.user.username) +#: root/email/admin/password.tt:3 +msgid "Your password was reset by %1" +msgstr "Jou wagwoord is herstel deur %1" + +#: lib/CatDap/Controller/user.pm:61 +msgid "Your session has expired" +msgstr "Jou sessie het verstrek" + +#: root/index.tt:17 msgid "or" msgstr "of" -#: lib/CatDap/Controller/register.pm:60 -msgid "supplied contains unprintable characters" -msgstr "verskaf sluit in ongeldige karakters" +#: lib/CatDap/Controller/admin.pm:516 +msgid "password reset" +msgstr "Wagwoord herstelling" -#: lib/CatDap/Controller/register.pm:60 -msgid "surname" -msgstr "Van" +#~ msgid "Repeat" +#~ msgstr "Herhaal" + +#~ msgid "Mageia Identity Activation" +#~ msgstr "Mageia Identiteit Aktivering" + +#~ msgid "The" +#~ msgstr "Die" + +#~ msgid "supplied contains unprintable characters" +#~ msgstr "verskaf sluit in ongeldige karakters" + +#~ msgid "surname" +#~ msgstr "Van" diff --git a/lib/CatDap/I18N/fr.po b/lib/CatDap/I18N/fr.po index eff12d1..3f13b16 100644 --- a/lib/CatDap/I18N/fr.po +++ b/lib/CatDap/I18N/fr.po @@ -14,35 +14,77 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: lib/CatDap/Controller/register.pm:51 +#: lib/CatDap/Controller/register.pm:119 +msgid "Activation" +msgstr "" + +#: root/user/index.tt:28 root/user/index.tt:8 +msgid "Add" +msgstr "" + +#: lib/CatDap/Controller/register.pm:49 msgid "Addresses do not match" msgstr "Les adresses ne correspondent pas" -#: lib/CatDap/Controller/register.pm:71 +#: lib/CatDap/Controller/register.pm:75 msgid "An account already exists with this email address" msgstr "" -#: lib/CatDap/Controller/register.pm:76 +#: lib/CatDap/Controller/register.pm:80 msgid "An account already exists with this username" msgstr "Un compte existe déjà pour ce nom d'utilisateur" #. ($errors) -#: lib/CatDap/Controller/register.pm:120 -msgid "An error occured sending the email, but your account was created. Please try the password recovery process f you entered the correct email address: %1" +#: lib/CatDap/Controller/admin.pm:529 +msgid "" +"An error occured sending the email, but your account was created. Please try " +"the password recovery process f you entered the correct email address: %1" msgstr "" -#: root/register/complete.tt:16 -msgid "Check your mail for activation instructions" +#. ($errors) +#: lib/CatDap/Controller/register.pm:131 +msgid "" +"An error occured sending the email, but your account was created. Please try " +"the password recovery process if you entered the correct email address. " +"Errors %1" +msgstr "" + +#: root/user/firstlogin.tt:14 root/user/password.tt:18 +msgid "Change" +msgstr "" + +#: root/user/fake.tt:2 +#, fuzzy +msgid "Change password" +msgstr "Mot de passe" + +#: root/register/complete.tt:5 +msgid "Check your mail for activation instructions." msgstr "" #: root/register/index.tt:34 msgid "Confirm Email address" msgstr "" -#: lib/CatDap/Controller/register.pm:106 -msgid "Dear" +#: root/user/password.tt:5 +msgid "Current password" +msgstr "" + +#. (cn) +#. (entry.cn) +#: root/email/activation.tt:1 root/email/admin/password.tt:1 +#, fuzzy +msgid "Dear %1," msgstr "Cher(e)" +#: root/user/index.tt:9 +msgid "Delete" +msgstr "" + +#: root/user/fake.tt:1 +msgid "Edit" +msgstr "" + #: root/register/index.tt:30 msgid "Email address" msgstr "Adresse de messagerie" @@ -51,54 +93,74 @@ msgstr "Adresse de messagerie" msgid "First name" msgstr "Prénom" -#: lib/CatDap/Controller/register.pm:54 +#: lib/CatDap/Controller/register.pm:52 msgid "Incorrect validation text, please try again" msgstr "" -#: lib/CatDap/Controller/register.pm:48 +#: lib/CatDap/Controller/register.pm:46 msgid "Invalid email address" msgstr "Adresse mail invalide" -#: lib/CatDap/Controller/register.pm:44 +#: lib/CatDap/Controller/register.pm:42 msgid "Invalid username" msgstr "Nom d'utilisateur invalide" -#: root/index.tt:33 -#: root/index.tt:6 +#: root/template/header:12 root/user/fake.tt:3 +msgid "Log out" +msgstr "" + +#: root/index.tt:1 root/index.tt:17 msgid "Login" msgstr "Login" -#: lib/CatDap/Controller/register.pm:113 -msgid "Mageia Identity Activation" -msgstr "Activation de l'identité Mageia" +#: root/user/firstlogin.tt:5 root/user/password.tt:9 +#, fuzzy +msgid "New Password" +msgstr "Mot de passe" + +#: lib/CatDap/Controller/user.pm:273 +#, fuzzy +msgid "New passwords dont match" +msgstr "Les adresses ne correspondent pas" -#: root/index.tt:27 +#: root/index.tt:11 msgid "Password" msgstr "Mot de passe" -#: root/index.tt:34 -#: root/register/index.tt:43 -#: root/register/index.tt:6 +#: lib/CatDap/Controller/user.pm:267 +#, fuzzy +msgid "Password incorrect" +msgstr "Mot de passe" + +#: lib/CatDap/Controller/admin.pm:532 +msgid "Password reset and email sent" +msgstr "" + +#: root/email/admin/password.tt:5 +msgid "Please click below to change your password" +msgstr "" + +#: root/index.tt:18 root/register/index.tt:43 root/register/index.tt:6 msgid "Register" msgstr "S'enregistrer" -#: root/register/complete.tt:6 +#: root/register/complete.tt:1 msgid "Registration completed" msgstr "" -#: root/register/complete.tt:15 +#: root/register/complete.tt:4 msgid "Registration was successful." msgstr "" +#: root/user/firstlogin.tt:9 root/user/password.tt:13 +msgid "Repeat New Password" +msgstr "" + #: root/register/index.tt:26 msgid "Surname" msgstr "Surnom" -#: lib/CatDap/Controller/register.pm:60 -msgid "The" -msgstr "" - -#: lib/CatDap/Controller/register.pm:57 +#: lib/CatDap/Controller/register.pm:56 msgid "The first name supplied contains illegal characters" msgstr "" @@ -106,28 +168,44 @@ msgstr "" msgid "The surname supplied contains illegal characters" msgstr "" -#: lib/CatDap/Controller/register.pm:107 -msgid "To activate your account, please follow the link below.\n" +#: root/email/activation.tt:3 +#, fuzzy +msgid "To activate your account, please follow the link below." msgstr "Pour activer votre compte, merci de suivre le lien ci dessous." -#: root/index.tt:23 -#: root/register/index.tt:18 +#: root/user/index.tt:13 +msgid "Update" +msgstr "" + +#: root/index.tt:7 root/register/index.tt:18 msgid "Username" msgstr "Nom d'utilisateur" -#: lib/CatDap/Controller/register.pm:106 -msgid "Your Mageia indentity has been successfully created, but requires activation.\n" +#. (c.config.organisation) +#: root/email/activation.tt:2 +msgid "Your %1 account has been successfully created, but requires activation." +msgstr "" + +#. (c.user.username) +#: root/email/admin/password.tt:3 +msgid "Your password was reset by %1" +msgstr "" + +#: lib/CatDap/Controller/user.pm:61 +msgid "Your session has expired" msgstr "" -#: root/index.tt:33 +#: root/index.tt:17 msgid "or" msgstr "ou" -#: lib/CatDap/Controller/register.pm:60 -msgid "supplied contains unprintable characters" -msgstr "" +#: lib/CatDap/Controller/admin.pm:516 +#, fuzzy +msgid "password reset" +msgstr "Mot de passe" -#: lib/CatDap/Controller/register.pm:60 -msgid "surname" -msgstr "surnom" +#~ msgid "Mageia Identity Activation" +#~ msgstr "Activation de l'identité Mageia" +#~ msgid "surname" +#~ msgstr "surnom" diff --git a/lib/CatDap/I18N/messages.pot b/lib/CatDap/I18N/messages.pot index d4bddea..c463fc2 100644 --- a/lib/CatDap/I18N/messages.pot +++ b/lib/CatDap/I18N/messages.pot @@ -15,33 +15,68 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: lib/CatDap/Controller/register.pm:51 +#: lib/CatDap/Controller/register.pm:119 +msgid "Activation" +msgstr "" + +#: root/user/index.tt:28 root/user/index.tt:8 +msgid "Add" +msgstr "" + +#: lib/CatDap/Controller/register.pm:49 msgid "Addresses do not match" msgstr "" -#: lib/CatDap/Controller/register.pm:71 +#: lib/CatDap/Controller/register.pm:75 msgid "An account already exists with this email address" msgstr "" -#: lib/CatDap/Controller/register.pm:76 +#: lib/CatDap/Controller/register.pm:80 msgid "An account already exists with this username" msgstr "" #. ($errors) -#: lib/CatDap/Controller/register.pm:120 +#: lib/CatDap/Controller/admin.pm:529 msgid "An error occured sending the email, but your account was created. Please try the password recovery process f you entered the correct email address: %1" msgstr "" -#: root/register/complete.tt:16 -msgid "Check your mail for activation instructions" +#. ($errors) +#: lib/CatDap/Controller/register.pm:131 +msgid "An error occured sending the email, but your account was created. Please try the password recovery process if you entered the correct email address. Errors %1" +msgstr "" + +#: root/user/firstlogin.tt:14 root/user/password.tt:18 +msgid "Change" +msgstr "" + +#: root/user/fake.tt:2 +msgid "Change password" +msgstr "" + +#: root/register/complete.tt:5 +msgid "Check your mail for activation instructions." msgstr "" #: root/register/index.tt:34 msgid "Confirm Email address" msgstr "" -#: lib/CatDap/Controller/register.pm:106 -msgid "Dear" +#: root/user/password.tt:5 +msgid "Current password" +msgstr "" + +#. (cn) +#. (entry.cn) +#: root/email/activation.tt:1 root/email/admin/password.tt:1 +msgid "Dear %1," +msgstr "" + +#: root/user/index.tt:9 +msgid "Delete" +msgstr "" + +#: root/user/fake.tt:1 +msgid "Edit" msgstr "" #: root/register/index.tt:30 @@ -52,51 +87,71 @@ msgstr "" msgid "First name" msgstr "" -#: lib/CatDap/Controller/register.pm:54 +#: lib/CatDap/Controller/register.pm:52 msgid "Incorrect validation text, please try again" msgstr "" -#: lib/CatDap/Controller/register.pm:48 +#: lib/CatDap/Controller/register.pm:46 msgid "Invalid email address" msgstr "" -#: lib/CatDap/Controller/register.pm:44 +#: lib/CatDap/Controller/register.pm:42 msgid "Invalid username" msgstr "" -#: root/index.tt:28 root/index.tt:6 +#: root/template/header:12 root/user/fake.tt:3 +msgid "Log out" +msgstr "" + +#: root/index.tt:1 root/index.tt:17 msgid "Login" msgstr "" -#: lib/CatDap/Controller/register.pm:113 -msgid "Mageia Identity Activation" +#: root/user/firstlogin.tt:5 root/user/password.tt:9 +msgid "New Password" msgstr "" -#: root/index.tt:22 +#: lib/CatDap/Controller/user.pm:273 +msgid "New passwords dont match" +msgstr "" + +#: root/index.tt:11 msgid "Password" msgstr "" -#: root/index.tt:29 root/register/index.tt:43 root/register/index.tt:6 +#: lib/CatDap/Controller/user.pm:267 +msgid "Password incorrect" +msgstr "" + +#: lib/CatDap/Controller/admin.pm:532 +msgid "Password reset and email sent" +msgstr "" + +#: root/email/admin/password.tt:5 +msgid "Please click below to change your password" +msgstr "" + +#: root/index.tt:18 root/register/index.tt:43 root/register/index.tt:6 msgid "Register" msgstr "" -#: root/register/complete.tt:6 +#: root/register/complete.tt:1 msgid "Registration completed" msgstr "" -#: root/register/complete.tt:15 +#: root/register/complete.tt:4 msgid "Registration was successful." msgstr "" -#: root/register/index.tt:26 -msgid "Surname" +#: root/user/firstlogin.tt:9 root/user/password.tt:13 +msgid "Repeat New Password" msgstr "" -#: lib/CatDap/Controller/register.pm:60 -msgid "The" +#: root/register/index.tt:26 +msgid "Surname" msgstr "" -#: lib/CatDap/Controller/register.pm:57 +#: lib/CatDap/Controller/register.pm:56 msgid "The first name supplied contains illegal characters" msgstr "" @@ -104,26 +159,36 @@ msgstr "" msgid "The surname supplied contains illegal characters" msgstr "" -#: lib/CatDap/Controller/register.pm:107 -msgid "To activate your account, please follow the link below.\n" +#: root/email/activation.tt:3 +msgid "To activate your account, please follow the link below." +msgstr "" + +#: root/user/index.tt:13 +msgid "Update" msgstr "" -#: root/index.tt:18 root/register/index.tt:18 +#: root/index.tt:7 root/register/index.tt:18 msgid "Username" msgstr "" -#: lib/CatDap/Controller/register.pm:106 -msgid "Your Mageia indentity has been successfully created, but requires activation.\n" +#. (c.config.organisation) +#: root/email/activation.tt:2 +msgid "Your %1 account has been successfully created, but requires activation." msgstr "" -#: root/index.tt:28 -msgid "or" +#. (c.user.username) +#: root/email/admin/password.tt:3 +msgid "Your password was reset by %1" +msgstr "" + +#: lib/CatDap/Controller/user.pm:61 +msgid "Your session has expired" msgstr "" -#: lib/CatDap/Controller/register.pm:60 -msgid "supplied contains unprintable characters" +#: root/index.tt:17 +msgid "or" msgstr "" -#: lib/CatDap/Controller/register.pm:60 -msgid "surname" +#: lib/CatDap/Controller/admin.pm:516 +msgid "password reset" msgstr "" diff --git a/lib/CatDap/View/TT.pm b/lib/CatDap/View/TT.pm index f63d775..873b7e1 100644 --- a/lib/CatDap/View/TT.pm +++ b/lib/CatDap/View/TT.pm @@ -8,7 +8,7 @@ use base 'Catalyst::View::TT'; __PACKAGE__->config( TEMPLATE_EXTENSION => '.tt', render_die => 1, - WRAPPER => 'template/wrapper', + #WRAPPER => 'template/wrapper', PRE_PROCESS => 'template/pre', ); diff --git a/lib/CatDap/View/Web.pm b/lib/CatDap/View/Web.pm new file mode 100644 index 0000000..f327443 --- /dev/null +++ b/lib/CatDap/View/Web.pm @@ -0,0 +1,38 @@ +package CatDap::View::Web; + +use strict; +use warnings; + +use base 'Catalyst::View::TT'; + +__PACKAGE__->config( + TEMPLATE_EXTENSION => '.tt', + render_die => 1, + WRAPPER => 'template/wrapper', + PRE_PROCESS => 'template/pre', +); + +=head1 NAME + +CatDap::View::Web - Web View for CatDap + +=head1 DESCRIPTION + +Web View for CatDap. + +=head1 SEE ALSO + +L<CatDap> + +=head1 AUTHOR + +Buchan Milne + +=head1 LICENSE + +This library is free software. You can redistribute it and/or modify +it under the same terms as Perl itself. + +=cut + +1; |