X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=html%2Ftournaments.pl;h=debc2781d0263a86e0af3f7d59ec970210030392;hb=a317762dab2b775334cc85a43b6fe2e3c2097eab;hp=3fc353172d2f23f5b46b6869ecc6d453dca79062;hpb=f968c8b90cb9b15473e7648758afc3f341d9f560;p=ccbs diff --git a/html/tournaments.pl b/html/tournaments.pl index 3fc3531..debc278 100755 --- a/html/tournaments.pl +++ b/html/tournaments.pl @@ -7,6 +7,14 @@ use warnings; my $dbh = ccbs::db_connect(); my $tournaments = ccbs::db_fetch_all($dbh, 'SELECT * FROM tournaments NATURAL JOIN seasons ORDER BY season, date'); +# Translate the season names +my @t_trans = (); +for my $t (@$tournaments) { + my %tt = %$t; + $tt{'seasonname'} = Locale::gettext::gettext($t->{'seasonname'}); + push @t_trans, \%tt; +} + ccbs::print_header(); -ccbs::process_template('tournaments.tmpl', 'Tournaments', { tournaments => $tournaments }); +ccbs::process_template('tournaments.tmpl', _('Tournaments'), { tournaments => \@t_trans }); $dbh->disconnect;