Changeset 366


Ignore:
Timestamp:
10/06/10 04:00:45 (14 years ago)
Author:
nanardon
Message:
  • fix localize function name
Location:
trunk/lib/Epoll/Controller
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Epoll/Controller/Admin.pm

    r364 r366  
    6060                if ($poll->check_date_max($c->req->param('start'))) { 
    6161                    if (! $poll->check_date_max($c->req->param('end'), $c->req->param('start'))) { 
    62                         $c->stash->{dateerror} = $c->l('The vote finish before starting'); 
     62                        $c->stash->{dateerror} = $c->localize('The vote finish before starting'); 
    6363                        next; 
    6464                    } 
     
    6868                } 
    6969            } elsif ($c->req->param('end') || $c->req->param('start')) { 
    70                 $c->stash->{dateerror} =  $c->l('You must define a start and a end date'); 
     70                $c->stash->{dateerror} =  $c->localize('You must define a start and a end date'); 
    7171                next; 
    7272            } 
     
    161161    if (!$poll->auth_poll($password)) { 
    162162        $c->stash->{page}{title} = $poll->info('label') . 
    163             $c->l(': Administrator login'); 
     163            $c->localize(': Administrator login'); 
    164164        $c->session->{'vpass' . $c->stash->{voteid}} = undef; 
    165165        $c->stash->{template} = 'admin/login.tt'; 
     
    184184    $c->forward('auth') or return; 
    185185    $c->forward('modify_poll'); 
    186     $c->stash->{page}{title} = $poll->info('label') . ': ' . $c->l('Administration'); 
     186    $c->stash->{page}{title} = $poll->info('label') . ': ' . $c->localize('Administration'); 
    187187} 
    188188 
     
    218218                            From => $poll->info->{owner}, 
    219219                            To => $voting->info->{mail}, 
    220                             Subject => $c->l("Voting invitation"), 
     220                            Subject => $c->localize("Voting invitation"), 
    221221                            mail => { 
    222222                                voteid => $id, 
     
    231231    } 
    232232 
    233     $c->stash->{page}{title} = $poll->info('label') . ': ' . $c->l('Administration') . ', ' . $c->l('voters list'); 
     233    $c->stash->{page}{title} = $poll->info('label') . ': ' . $c->localize('Administration') . ', ' . $c->localize('voters list'); 
    234234} 
    235235 
     
    281281    $c->forward('auth') or return; 
    282282    $c->forward('modify_poll'); 
    283     $c->stash->{page}{title} = $poll->info('label') . ': ' . $c->l('Administration') . ', '. $->l('ballots'); 
     283    $c->stash->{page}{title} = $poll->info('label') . ': ' . $c->localize('Administration') . ', '. $->l('ballots'); 
    284284} 
    285285 
     
    296296    $c->forward('auth') or return; 
    297297    $c->forward('modify_poll'); 
    298     $c->stash->{page}{title} = $poll->info('label') . ': ' . $c->l('Administration') . ', '. $c->l('Date'); 
     298    $c->stash->{page}{title} = $poll->info('label') . ': ' . $c->localize('Administration') . ', '. $c->localize('Date'); 
    299299} 
    300300 
     
    323323    $c->forward('auth') or return; 
    324324    $c->forward('modify_poll'); 
    325     $c->stash->{page}{title} = $poll->info('label') . ': ' . $c->l('Administration') . ', ' . $c->l('Validation'); 
     325    $c->stash->{page}{title} = $poll->info('label') . ': ' . $c->localize('Administration') . ', ' . $c->localize('Validation'); 
    326326 
    327327    $c->forward('ballotfilter'); 
  • trunk/lib/Epoll/Controller/Ajax.pm

    r364 r366  
    3939        if ($poll->check_date_max($start)) { 
    4040            if ($poll->check_date_max($end, $start)) { 
    41                 $c->response->body('<input type="submit" name="polldate" value="' . $c->l('Enregistrer') . '">'); 
     41                $c->response->body('<input type="submit" name="polldate" value="' . $c->localize('Enregistrer') . '">'); 
    4242            } else { 
    4343 
    44                 $c->response->body( $c->l('The vote finish before starting')); 
     44                $c->response->body( $c->localize('The vote finish before starting')); 
    4545            } 
    4646        } else { 
    47             $c->response->body( $c->('The start of the vote must be in the future')); 
     47            $c->response->body( $c->localize('The start of the vote must be in the future')); 
    4848        } 
    4949    } else { 
    50         $c->response->body( $c->l('You must define a start and a end date')); 
     50        $c->response->body( $c->localize('You must define a start and a end date')); 
    5151    } 
    5252} 
  • trunk/lib/Epoll/Controller/Ballot.pm

    r364 r366  
    4949 
    5050    if (!$c->model('Vote')->poll($id)->auth_voting($mail, $password)) { 
    51         $c->stash->{page}{title} = $poll->info('label') . ': ' . $c->l('Login'); 
     51        $c->stash->{page}{title} = $poll->info('label') . ': ' . $c->localize('Login'); 
    5252        $c->session->{$puid} = undef; 
    5353        $c->stash->{template} = 'ballot/login.tt'; 
     
    6464    $c->session->{mypoll}{$puid} ||= 0; 
    6565 
    66     $c->stash->{page}{title} = $poll->info('label') . ': ' . $c->l('Bulletin'); 
     66    $c->stash->{page}{title} = $poll->info('label') . ': ' . $c->localize('Bulletin'); 
    6767 
    6868    # login succeed, but those this user has already voted 
     
    101101    if (scalar(@ballot) > $poll->info('choice_count')) { 
    102102        $c->req->parameters->{'ballot'} = ''; 
    103         $c->stash->{vote_error} = $c->l('Only ') . 
    104             $poll->info('choice_count') . ' ' . $c->l('possible choices'); 
     103        $c->stash->{vote_error} = $c->localize('Only ') . 
     104            $poll->info('choice_count') . ' ' . $c->localize('possible choices'); 
    105105        return; 
    106106    } 
     
    114114        if (scalar(@twices)) { 
    115115            $c->req->parameters->{'ballot'} = ''; 
    116             $c->stash->{vote_error} = $c->l('One or more values are duplicated:') . 
     116            $c->stash->{vote_error} = $c->localize('One or more values are duplicated:') . 
    117117                join(' ,', map { qq'"$_"' } @twices); 
    118118            return; 
     
    131131                From => $mail, 
    132132                To => $mail, 
    133                 Subject => $c->l('Vote confirmation:') . $poll->info('label'), 
     133                Subject => $c->localize('Vote confirmation:') . $poll->info('label'), 
    134134                mail => { 
    135135                    ballotid => $c->stash->{ballotid}, 
  • trunk/lib/Epoll/Controller/Newpoll.pm

    r364 r366  
    3131    my ( $self, $c ) = @_; 
    3232 
    33     $c->stash->{page}{title} = $c->l('Create a new vote'); 
     33    $c->stash->{page}{title} = $c->localize('Create a new vote'); 
    3434    if ($c->req->param('mail')) { 
    3535        if ($c->config->{newpollpasswd}) { 
     
    5959                [ 'poll_request.tt', { 
    6060                    To => $c->req->param('mail'), 
    61                     Subject => $c->l("New poll request"), 
     61                    Subject => $c->localize("New poll request"), 
    6262                    mail => { 
    6363                        label => $c->req->param('label'), 
     
    7979 
    8080    if (!$c->model('Vote')->poll_request_info($id)) { 
    81         $c->stash->{page}{title} = $c->l("No vote creation request"); 
     81        $c->stash->{page}{title} = $c->localize("No vote creation request"); 
    8282        $c->stash->{template} = 'newpoll/norequest.tt'; 
    8383        return; 
    8484    } 
    8585 
    86     $c->stash->{page}{title} = $c->l('Confirm new vote creation'); 
     86    $c->stash->{page}{title} = $c->localize('Confirm new vote creation'); 
    8787    if ($c->req->param('passwd')) { 
    8888        my $pid = $c->model('Vote')->poll_from_request($id, $c->req->param('passwd')); 
  • trunk/lib/Epoll/Controller/Root.pm

    r364 r366  
    4848                [ 'poll_reminder_voting.tt', { 
    4949                    To => $c->req->param('mailvoting'), 
    50                     Subject => $c->l('Poll request reminder'), 
     50                    Subject => $c->localize('Poll request reminder'), 
    5151                    mail => { 
    52                         label => $c->l('Poll request reminder'), 
     52                        label => $c->localize('Poll request reminder'), 
    5353                        polls_owner => \@polls_owner, 
    5454                        polls_voting => \@polls_voting, 
Note: See TracChangeset for help on using the changeset viewer.