From c3ac8525105a2d9bbf697eb910e1e9eba67c9610 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Sun, 17 Jul 2011 21:43:32 +0000 Subject: more string to translate --- lib/CatDap/Controller/admin.pm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/CatDap/Controller') diff --git a/lib/CatDap/Controller/admin.pm b/lib/CatDap/Controller/admin.pm index 89a0da0..fd74650 100644 --- a/lib/CatDap/Controller/admin.pm +++ b/lib/CatDap/Controller/admin.pm @@ -182,7 +182,7 @@ sub account_promote : Local { my $entry = $mesg->entry; $mesg = $c->model('user')->search("(objectclass=sambaUnixIdPool)"); if ( $mesg->entries gt 1 ) { - push @errors, "More than one ID Pool"; + push @errors, $c->loc("More than one ID Pool"); #TODO forward to error page } @@ -512,7 +512,7 @@ sub password : Local { $mesg = $c->model('user')->search("uid=$uid"); push @errors,$mesg->error if $mesg->code; if ($mesg->entries gt 1) { - push @errors,'More than one entry matched'; + push @errors, $c->loc('More than one entry matched'); $c->detach; } $entry = $mesg->entry; @@ -525,14 +525,14 @@ sub password : Local { return 1; } if ($c->req->param('txnid') ne $c->session->{txnid}) { - push @errors,'Transaction ID mismatch'; + push @errors, $c->loc('Transaction ID mismatch'); $c->detach; } $newpass = Data::UUID->new->create_str(); my $pp = Net::LDAP::Control::PasswordPolicy->new; $mesg = $entry->replace( userPassword => $newpass,pwdReset => 'TRUE' )->update; if ($mesg->code) { - push @errors,"Password reset failed: " . $mesg->error; + push @errors, $c->loc("Password reset failed: ") . $mesg->error; $c->detach; } my $email = join(',',@mail); @@ -588,14 +588,14 @@ sub group : Local { if ( not $c->req->param('attribute') and not $c->req->param('value') ) { $attribute = 'owner'; $value = $c->user->ldap_entry->dn; - $c->stash( heading => 'Groups you manage'); + $c->stash( heading => $c->loc('Groups you manage')); } else { $attribute = $c->req->param('attribute'); $attribute =~ s/[^\w\d]//g; $value = $c->req->param('value'); $value =~ s/[^\w\d\* ]//g; - $c->stash( heading => 'Groups matching search criteria'); + $c->stash( heading => $c->loc('Groups matching search criteria')); } my $mesg = $c->model('user') @@ -621,7 +621,7 @@ sub group_modify : Local { my $mesg; $c->detach('/admin/group') if $group eq ''; if ( $group !~ /^[\w\d ]*$/ ) { - push @errors, "Group contains illegal characters"; + push @errors, $c->loc('Group contains illegal characters'); $c->detach('/admin/group'); } if (defined $op and $op eq 'delete') { @@ -649,7 +649,7 @@ sub group_modify : Local { } $mesg = $c->model('user')->search("(&(objectClass=groupOfNames)(cn=$group))"); if ( $mesg->entries gt 1 ) { - push @errors, 'More than one entry matched'; + push @errors, $c->loc('More than one entry matched'); $c->detach('/admin/group'); } $c->stash( group => $mesg->entry ); -- cgit v1.2.1