From a911b136cf2d0354bb1e94f08bd421ad1304d6c0 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Wed, 20 Jul 2005 17:57:16 +0000 Subject: [PATCH] Actually do the season name translation as well --- html/tournaments.pl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/html/tournaments.pl b/html/tournaments.pl index fce241e..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; -- 2.39.2