]> git.sesse.net Git - ccbs/blobdiff - html/do-add-tournament.pl
Shape text using Pango and HarfBuzz; gives us nice ligatures and exotic scripts.
[ccbs] / html / do-add-tournament.pl
index 02d5e167b7713d946bfac3787ba6a8a4c8bef004..57df3742460ad235d640c2c1223ce3ae5bea6d2a 100755 (executable)
@@ -4,6 +4,8 @@ use ccbs;
 use strict;
 use warnings;
 
+ccbs::admin_only();
+
 my $dbh = ccbs::db_connect();
 my $cgi = new CGI;
 
@@ -16,13 +18,13 @@ my $machine = $cgi->param('machine');
 my $scoringsystem = $cgi->param('scoringsystem');
 
 if ($date !~ /^ ( \d{4} - \d\d - \d\d ) $/x) {
-       ccbs::user_error("Ugyldig dato (må være på YYYY-MM-DD).");
+       ccbs::user_error(_("Invalid date (must be of the form YYYY-MM-DD)"));
 }
 
 $dbh->do('INSERT INTO tournaments (season, tournamentname, country, location, date, machine, scoringsystem) VALUES (?,?,?,?,?,?,?)',
        undef, $season, $name, $country, $place, $date, $machine, $scoringsystem);
 
 ccbs::print_header();
-ccbs::process_template('do-add-tournament.tmpl', 'Legg til turnering', {});
+ccbs::process_template('do-add-tournament.tmpl', _('Add tournament'), {});
 
 $dbh->disconnect;