From: Steinar H. Gunderson Date: Sun, 17 Jul 2005 13:24:20 +0000 (+0000) Subject: Gettextify more (the rest?). X-Git-Url: https://git.sesse.net/?p=ccbs;a=commitdiff_plain;h=eef57263709c5dc7e1f361075e5ce8cb7b7b2367;ds=sidebyside Gettextify more (the rest?). --- diff --git a/html/do-add-tournament.pl b/html/do-add-tournament.pl index 50efd38..57df374 100755 --- a/html/do-add-tournament.pl +++ b/html/do-add-tournament.pl @@ -18,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å formen 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; diff --git a/html/do-edit-scores.pl b/html/do-edit-scores.pl index 898d5db..9dc81ff 100755 --- a/html/do-edit-scores.pl +++ b/html/do-edit-scores.pl @@ -47,8 +47,8 @@ for my $p ($cgi->param()) { # Fetch the name of the song if we can $ref = $dbh->selectrow_hashref('SELECT title FROM songs WHERE song=?', undef, $cgi->param("song$1-$2")); - ccbs::user_error("Sangen $ref->{'title'} har ikke steps for " . - $cgi->param("playmode$1-$2") . " " . $cgi->param("difficulty$1-$2") . " på ". + ccbs::user_error(_("The song") . $ref->{'title'} _("doesn't have steps for ") . + $cgi->param("playmode$1-$2") . " " . $cgi->param("difficulty$1-$2") . _(" on "). $tournamentdata->{'machinename'} . "."); } $checked_songs{"$1-$2"} = 1; @@ -57,7 +57,7 @@ for my $p ($cgi->param()) { if ($p =~ /^score(\d+)-(\d+)/) { if (defined($val) && ($val < 0 || $val > 10000)) { - ccbs::user_error("Alle poengsummer må være mellom 0 og 10000 (inklusive)."); + ccbs::user_error(_("All scores must be between 0 and 10000 (inclusive).")); } $dbh->do('UPDATE scores SET score=? WHERE tournament=? AND round=? AND parallel=? AND player=? AND songnumber=?', undef, diff --git a/html/do-start-round.pl b/html/do-start-round.pl index ff02c26..6a9738d 100755 --- a/html/do-start-round.pl +++ b/html/do-start-round.pl @@ -40,7 +40,7 @@ if ($round == 1) { # 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'}); diff --git a/html/index.pl b/html/index.pl index 76ec1e8..0d05ce4 100755 --- a/html/index.pl +++ b/html/index.pl @@ -5,4 +5,4 @@ use strict; use warnings; ccbs::print_header(); -ccbs::process_template('index.tmpl', 'Forside'); +ccbs::process_template('index.tmpl', _('Front page')); diff --git a/html/players.pl b/html/players.pl index 021b6ea..af37f9e 100755 --- a/html/players.pl +++ b/html/players.pl @@ -12,7 +12,7 @@ my $dbh = ccbs::db_connect(); my $players = ccbs::db_fetch_all($dbh, 'SELECT scores.player,nick,countryname,clubname,count(*) AS num_songs,COUNT(DISTINCT song) AS num_unique_songs,COUNT(DISTINCT tournament) AS num_tournaments,AVG(score)::integer AS avg_score,MAX(score) AS high_score FROM scores NATURAL JOIN tournaments JOIN players ON scores.player=players.player JOIN countries ON players.country=countries.country NATURAL LEFT JOIN clubs WHERE scoringsystem=1 GROUP BY scores.player,nick,countryname,clubname ORDER BY LOWER(nick)'); ccbs::print_header(); -ccbs::process_template('players.tmpl', 'Spillere', { +ccbs::process_template('players.tmpl', _('Players'), { players => $players, }); $dbh->disconnect; diff --git a/html/po/nb_NO.po b/html/po/nb_NO.po index d2c54b7..88ec465 100644 --- a/html/po/nb_NO.po +++ b/html/po/nb_NO.po @@ -34,7 +34,7 @@ msgid "" msgstr "" "Project-Id-Version: ccbs--mainline- 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-15-17 15:15+0200\n" +"POT-Creation-Date: 2005-22-17 15:22+0200\n" "PO-Revision-Date: 2005-07-17 01:55+0200\n" "Last-Translator: Steinar H. Gunderson \n" "Language-Team: Norwegian \n" @@ -127,12 +127,15 @@ msgstr "Storskjerm" msgid "Set active tournament" msgstr "Sett aktiv turnering" +#: index.pl:8 msgid "Front page" msgstr "Forside" +#: tournaments.pl:11 msgid "Tournaments" msgstr "Turneringer" +#: randomsongs.pl:12 msgid "Song selector" msgstr "Sangvelger" @@ -148,10 +151,58 @@ msgstr "Beklager, databasen står i no-admin-modus." msgid "Internal Server Error" msgstr "Intern feil" -#: add-tournament.pl:16 +#: add-tournament.pl:16 do-add-tournament.pl:28 msgid "Add tournament" msgstr "Legg til turnering" +#: do-add-tournament.pl:21 +msgid "Invalid date (must be of the form YYYY-MM-DD)" +msgstr "" + +#: do-edit-scores.pl:50 +msgid "The song" +msgstr "Sangen" + +#: do-edit-scores.pl:50 +msgid "doesn't have steps for " +msgstr "har ikke steps for" + +#: do-edit-scores.pl:51 +msgid " on " +msgstr " på " + +#: do-edit-scores.pl:60 +msgid "All scores must be between 0 and 10000 (inclusive)." +msgstr "Alle poengsummer må være mellom 0 og 10000 (inklusive)." + +#: do-start-round.pl:43 +msgid "There's still" +msgstr "Det er fortsatt" + +#: do-start-round.pl:43 +msgid "songs left in this round which don't have all data registered." +msgstr "sanger igjen i denne runden som ikke er fullt registrert." + +#: do-start-round.pl:121 +msgid "There aren't any songs left in the song selector!" +msgstr "Det er ikke flere sanger igjen i sangvelgeren!" + +#: players.pl:15 +msgid "Players" +msgstr "Spillere" + +#: set-active-tournament.pl:13 +msgid "Set active tournament" +msgstr "Sett aktiv turnering" + +#: shorttitles.pl:16 +msgid "Short titles" +msgstr "Korte titler" + +#: songs.pl:15 +msgid "Songs" +msgstr "Sanger" + msgid "Nick" msgstr "Nick" @@ -273,9 +324,6 @@ msgstr "Sett som betalt" msgid "Remove" msgstr "Fjern" -msgid "Set active tournament" -msgstr "Sett aktiv turnering" - msgid "" "This function sets what tournament is active (that is, what the big screen\n" " is to show information from)." diff --git a/html/po/templates.pot b/html/po/templates.pot index b29133a..bf9dc0f 100644 --- a/html/po/templates.pot +++ b/html/po/templates.pot @@ -44,42 +44,42 @@ msgstr "" "#-#-#-#-# add-tournament.tmpl.pot (ccbs) #-#-#-#-#\n" "Project-Id-Version: ccbs\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-15-17 15:15+0200\n" +"POT-Creation-Date: 2005-22-17 15:22+0200\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "#-#-#-#-# do-add-tournament.tmpl.pot (ccbs) #-#-#-#-#\n" "Project-Id-Version: ccbs\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-15-17 15:15+0200\n" +"POT-Creation-Date: 2005-22-17 15:22+0200\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "#-#-#-#-# error.tmpl.pot (ccbs) #-#-#-#-#\n" "Project-Id-Version: ccbs\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-15-17 15:15+0200\n" +"POT-Creation-Date: 2005-22-17 15:22+0200\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "#-#-#-#-# index.tmpl.pot (ccbs) #-#-#-#-#\n" "Project-Id-Version: ccbs\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-15-17 15:15+0200\n" +"POT-Creation-Date: 2005-22-17 15:22+0200\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "#-#-#-#-# main.tmpl.pot (ccbs) #-#-#-#-#\n" "Project-Id-Version: ccbs\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-15-17 15:15+0200\n" +"POT-Creation-Date: 2005-22-17 15:22+0200\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "#-#-#-#-# messages.pot (PACKAGE VERSION) #-#-#-#-#\n" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-07-17 15:15+0200\n" +"POT-Creation-Date: 2005-07-17 15:22+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -89,84 +89,84 @@ msgstr "" "#-#-#-#-# players.tmpl.pot (ccbs) #-#-#-#-#\n" "Project-Id-Version: ccbs\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-15-17 15:15+0200\n" +"POT-Creation-Date: 2005-22-17 15:22+0200\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "#-#-#-#-# player.tmpl.pot (ccbs) #-#-#-#-#\n" "Project-Id-Version: ccbs\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-15-17 15:15+0200\n" +"POT-Creation-Date: 2005-22-17 15:22+0200\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "#-#-#-#-# randomsongs.tmpl.pot (ccbs) #-#-#-#-#\n" "Project-Id-Version: ccbs\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-15-17 15:15+0200\n" +"POT-Creation-Date: 2005-22-17 15:22+0200\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "#-#-#-#-# registration.tmpl.pot (ccbs) #-#-#-#-#\n" "Project-Id-Version: ccbs\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-15-17 15:15+0200\n" +"POT-Creation-Date: 2005-22-17 15:22+0200\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "#-#-#-#-# set-active-tournament.tmpl.pot (ccbs) #-#-#-#-#\n" "Project-Id-Version: ccbs\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-15-17 15:15+0200\n" +"POT-Creation-Date: 2005-22-17 15:22+0200\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "#-#-#-#-# shorttitles.tmpl.pot (ccbs) #-#-#-#-#\n" "Project-Id-Version: ccbs\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-15-17 15:15+0200\n" +"POT-Creation-Date: 2005-22-17 15:22+0200\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "#-#-#-#-# show-tournament.tmpl.pot (ccbs) #-#-#-#-#\n" "Project-Id-Version: ccbs\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-15-17 15:15+0200\n" +"POT-Creation-Date: 2005-22-17 15:22+0200\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "#-#-#-#-# songratings.tmpl.pot (ccbs) #-#-#-#-#\n" "Project-Id-Version: ccbs\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-15-17 15:15+0200\n" +"POT-Creation-Date: 2005-22-17 15:22+0200\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "#-#-#-#-# songs.tmpl.pot (ccbs) #-#-#-#-#\n" "Project-Id-Version: ccbs\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-15-17 15:15+0200\n" +"POT-Creation-Date: 2005-22-17 15:22+0200\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "#-#-#-#-# song.tmpl.pot (ccbs) #-#-#-#-#\n" "Project-Id-Version: ccbs\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-15-17 15:15+0200\n" +"POT-Creation-Date: 2005-22-17 15:22+0200\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "#-#-#-#-# tournaments.tmpl.pot (ccbs) #-#-#-#-#\n" "Project-Id-Version: ccbs\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-15-17 15:15+0200\n" +"POT-Creation-Date: 2005-22-17 15:22+0200\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "#-#-#-#-# user-error.tmpl.pot (ccbs) #-#-#-#-#\n" "Project-Id-Version: ccbs\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-15-17 15:15+0200\n" +"POT-Creation-Date: 2005-22-17 15:22+0200\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -250,12 +250,15 @@ msgstr "" msgid "Set active tournament" msgstr "" +#: index.pl:8 msgid "Front page" msgstr "" +#: tournaments.pl:11 msgid "Tournaments" msgstr "" +#: randomsongs.pl:12 msgid "Song selector" msgstr "" @@ -271,10 +274,58 @@ msgstr "" msgid "Internal Server Error" msgstr "" -#: add-tournament.pl:16 +#: add-tournament.pl:16 do-add-tournament.pl:28 msgid "Add tournament" msgstr "" +#: do-add-tournament.pl:21 +msgid "Invalid date (must be of the form YYYY-MM-DD)" +msgstr "" + +#: do-edit-scores.pl:50 +msgid "The song" +msgstr "" + +#: do-edit-scores.pl:50 +msgid "doesn't have steps for " +msgstr "" + +#: do-edit-scores.pl:51 +msgid " on " +msgstr "" + +#: do-edit-scores.pl:60 +msgid "All scores must be between 0 and 10000 (inclusive)." +msgstr "" + +#: do-start-round.pl:43 +msgid "There's still" +msgstr "" + +#: do-start-round.pl:43 +msgid "songs left in this round which don't have all data registered." +msgstr "" + +#: do-start-round.pl:121 +msgid "There aren't any songs left in the song selector!" +msgstr "" + +#: players.pl:15 +msgid "Players" +msgstr "" + +#: set-active-tournament.pl:13 +msgid "Set active tournament" +msgstr "" + +#: shorttitles.pl:16 +msgid "Short titles" +msgstr "" + +#: songs.pl:15 +msgid "Songs" +msgstr "" + msgid "Nick" msgstr "" @@ -383,9 +434,6 @@ msgstr "" msgid "Remove" msgstr "" -msgid "Set active tournament" -msgstr "" - msgid "" "This function sets what tournament is active (that is, what the big screen\n" " is to show information from)." diff --git a/html/randomsongs.pl b/html/randomsongs.pl index daa36cb..6a3ec9c 100755 --- a/html/randomsongs.pl +++ b/html/randomsongs.pl @@ -9,7 +9,7 @@ my $dbh = ccbs::db_connect(); my $ref = $dbh->selectrow_hashref('SELECT COUNT(*) AS num_used FROM randomsongsused'); ccbs::print_header(); -ccbs::process_template('randomsongs.tmpl', 'Sangvelger', { +ccbs::process_template('randomsongs.tmpl', _('Song selector'), { num_used => $ref->{'num_used'} }); diff --git a/html/set-active-tournament.pl b/html/set-active-tournament.pl index 4a17ef2..f3e1a7b 100755 --- a/html/set-active-tournament.pl +++ b/html/set-active-tournament.pl @@ -10,7 +10,7 @@ my $ref = $dbh->selectrow_hashref('SELECT * FROM bigscreen.active_tournament'); my $active_tournament = (defined($ref)) ? $ref->{'tournament'} : -1; ccbs::print_header(); -ccbs::process_template('set-active-tournament.tmpl', 'Sett aktiv turnering', { +ccbs::process_template('set-active-tournament.tmpl', _('Set active tournament'), { tournaments => $tournaments, active_tournament => $active_tournament }); diff --git a/html/shorttitles.pl b/html/shorttitles.pl index c6b93c8..aab0766 100755 --- a/html/shorttitles.pl +++ b/html/shorttitles.pl @@ -13,7 +13,7 @@ my $dbh = ccbs::db_connect(); my $songs = ccbs::db_fetch_all($dbh, 'SELECT song,title,shorttitle FROM songs NATURAL LEFT JOIN songshorttitles ORDER BY LOWER(title)'); ccbs::print_header(); -ccbs::process_template('shorttitles.tmpl', 'Korte titler', { +ccbs::process_template('shorttitles.tmpl', _('Short titles'), { songs => $songs, }); $dbh->disconnect; diff --git a/html/songs.pl b/html/songs.pl index 2ac52a1..8d67cb6 100755 --- a/html/songs.pl +++ b/html/songs.pl @@ -12,7 +12,7 @@ my $dbh = ccbs::db_connect(); my $songs = ccbs::db_fetch_all($dbh, 'SELECT machine,machinename,song,title,artist,avg_score,stddev_score,high_score,high_score_player,high_score_nick FROM machinesongs NATURAL JOIN songs NATURAL JOIN machines NATURAL LEFT JOIN ( SELECT song,AVG(score)::integer AS avg_score,STDDEV(score)::integer AS stddev_score FROM scores JOIN tournaments ON scores.tournament=tournaments.tournament WHERE scoringsystem=1 GROUP BY song ) t1 NATURAL LEFT JOIN ( SELECT DISTINCT ON (song) song,player AS high_score_player,nick AS high_score_nick,score AS high_score FROM scores NATURAL JOIN players JOIN tournaments ON scores.tournament=tournaments.tournament WHERE scoringsystem=1 ORDER BY song,score DESC ) t2 ORDER BY machine,LOWER(title)'); ccbs::print_header(); -ccbs::process_template('songs.tmpl', 'Sanger', { +ccbs::process_template('songs.tmpl', _('Songs'), { songs => $songs, }); $dbh->disconnect; diff --git a/html/tournaments.pl b/html/tournaments.pl index 8417b3c..fce241e 100755 --- a/html/tournaments.pl +++ b/html/tournaments.pl @@ -8,5 +8,5 @@ my $dbh = ccbs::db_connect(); my $tournaments = ccbs::db_fetch_all($dbh, 'SELECT * FROM tournaments NATURAL JOIN seasons ORDER BY season, date'); ccbs::print_header(); -ccbs::process_template('tournaments.tmpl', 'Turneringer', { tournaments => $tournaments }); +ccbs::process_template('tournaments.tmpl', _('Tournaments'), { tournaments => $tournaments }); $dbh->disconnect;