X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=html%2Fdo-start-round.pl;h=fe4139a47275680feb39a96f539b669b7b07d827;hb=a317762dab2b775334cc85a43b6fe2e3c2097eab;hp=36844233cc019663b6f8b06cfb813345e09a6371;hpb=416d3d469d9ce4c15a860f61e24aee79da12402d;p=ccbs diff --git a/html/do-start-round.pl b/html/do-start-round.pl index 3684423..fe4139a 100755 --- a/html/do-start-round.pl +++ b/html/do-start-round.pl @@ -34,13 +34,13 @@ if ($num_groups == 1) { # Seed people into groups (quite preliminary for now) my $people; if ($round == 1) { - $people = ccbs::db_fetch_all($dbh, 'SELECT * FROM players WHERE player IN ( SELECT player FROM tournamentparticipation WHERE tournament=? ) ORDER BY lower(nick)', + $people = ccbs::db_fetch_all($dbh, 'SELECT * FROM players WHERE player IN ( SELECT player FROM tournamentparticipation WHERE tournament=? ) ORDER BY random()', $tournament); } else { # First of all, check that there are no null values! my $ref = $dbh->selectrow_hashref('SELECT COUNT(*) AS num_incomplete FROM scores WHERE tournament=? AND round=? AND (song IS NULL OR playmode IS NULL OR difficulty IS NULL OR chosen IS NULL or score IS NULL)', undef, $tournament, $round-1); if ($ref->{'num_incomplete'} != 0) { - ccbs::user_error("Det er fortsatt $ref->{'num_incomplete'} sanger igjen i denne runden som ikke har alle data registrert."); + ccbs::user_error(_("There's still") . $ref->{'num_incomplete'} . _("songs left in this round which don't have all data registered.")); } # Find out how many people will go on from the _current_ group (ie. the one @@ -118,7 +118,7 @@ for my $g (1..$num_groups) { my $ref = $dbh->selectrow_hashref('SELECT * FROM machinesongs NATURAL JOIN songratings WHERE song NOT IN ( SELECT song FROM randomsongsused ) AND machine=( SELECT machine FROM tournaments WHERE tournament=? ) AND playmode=\'single\' AND difficulty=\'expert\' ORDER BY random() LIMIT 1', undef, $tournament); if (!defined($ref)) { - ccbs::user_error('Det er ikke flere sanger igjen i sangvelgeren!'); + ccbs::user_error(_("There aren't any songs left in the song selector!")); } $dbh->do('INSERT INTO randomsongsused (song) VALUES (?)', undef, $ref->{'song'});