]> git.sesse.net Git - ccbs/commitdiff
Start gettextifying Perl scripts (and thus titles) as well.
authorSteinar H. Gunderson <sesse@samfundet.no>
Sun, 17 Jul 2005 13:16:50 +0000 (13:16 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Sun, 17 Jul 2005 13:16:50 +0000 (13:16 +0000)
html/add-tournament.pl
html/ccbs.pm
html/po/nb_NO.po
html/po/templates.pot
intl/make-all-pot.sh

index 44c05361e73b0ac88344cb12681f58c7a68596ed..471ce1f55dffcb441049105cf8fda60f6b8b4cb0 100755 (executable)
@@ -13,7 +13,7 @@ my $machines = ccbs::db_fetch_all($dbh, 'SELECT * FROM machines');
 my $scoringsystems = ccbs::db_fetch_all($dbh, 'SELECT * FROM scoringsystems');
 
 ccbs::print_header();
-ccbs::process_template('add-tournament.tmpl', 'Legg til turnering', {
+ccbs::process_template('add-tournament.tmpl', _('Add tournament'), {
                seasons => $seasons,
                countries => $countries,
                machines => $machines,
index 4431da40f249022c76d91d69f1a0f3aa0687399f..d3f07210ebec20c9a7432d99b4d5e2d953a2e29e 100755 (executable)
@@ -20,7 +20,12 @@ our $ccbs_dbdebug = 0;
 
 # Set this flag to disable any admin tasks -- it's quite crude, but hey :-)
 our $ccbs_noadmin = 0;
-       
+
+# Hack to get the non-templatized gettext stuff working
+*_ = sub {
+       return Locale::gettext::gettext(@_);
+};
+
 sub print_header {
        print CGI::header(-type=>'text/html; charset=utf-8');
 }
@@ -101,13 +106,13 @@ sub user_error {
        my $msg = shift;
 
        ccbs::print_header();
-       ccbs::process_template('user-error.tmpl', 'Feil',
+       ccbs::process_template('user-error.tmpl', _('Error'),
                { message => $msg });
 
        exit;
 }
 sub admin_only {
-       user_error("Beklager, databasen står i no-admin-mode.") if ($ccbs_noadmin);
+       user_error(_("Sorry, the database is in no-admin-mode.")) if ($ccbs_noadmin);
 }
 
 $SIG{__DIE__} = sub {
@@ -116,7 +121,7 @@ $SIG{__DIE__} = sub {
        return if $msg =~ m#Win32/Registry.pm#;
 
        ccbs::print_header();
-       ccbs::process_template('error.tmpl', 'Internal Server Error',
+       ccbs::process_template('error.tmpl', _('Internal Server Error'),
                { message => HTML::Entities::encode_entities($msg) });
 };
 
index ce249bb1633836e63b0af6301cdbb025bbb84912..d2c54b7d62884eb8f2d86dd5e0df70a0fed59961 100644 (file)
@@ -34,7 +34,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ccbs--mainline- 0.1\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-55-17 14:55+0200\n"
+"POT-Creation-Date: 2005-15-17 15:15+0200\n"
 "PO-Revision-Date: 2005-07-17 01:55+0200\n"
 "Last-Translator: Steinar H. Gunderson <sgunderson@bigfoot.com>\n"
 "Language-Team: Norwegian <no@translate.freefriends.org>\n"
@@ -136,6 +136,22 @@ msgstr "Turneringer"
 msgid "Song selector"
 msgstr "Sangvelger"
 
+#: ccbs.pm:109
+msgid "Error"
+msgstr "Feil"
+
+#: ccbs.pm:115
+msgid "Sorry, the database is in no-admin-mode."
+msgstr "Beklager, databasen står i no-admin-modus."
+
+#: ccbs.pm:124
+msgid "Internal Server Error"
+msgstr "Intern feil"
+
+#: add-tournament.pl:16
+msgid "Add tournament"
+msgstr "Legg til turnering"
+
 msgid "Nick"
 msgstr "Nick"
 
index d5d1116f33997644849e1a6e7cd5044f3581d38f..b29133a4f59001b1af873fea3aac0590fce1d43a 100644 (file)
@@ -8,6 +8,12 @@
 # ccbs template file for templates/index.tmpl
 # #-#-#-#-#  main.tmpl.pot (ccbs)  #-#-#-#-#
 # ccbs template file for templates/main.tmpl
+# #-#-#-#-#  messages.pot (PACKAGE VERSION)  #-#-#-#-#
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
 # #-#-#-#-#  players.tmpl.pot (ccbs)  #-#-#-#-#
 # ccbs template file for templates/players.tmpl
 # #-#-#-#-#  player.tmpl.pot (ccbs)  #-#-#-#-#
 # ccbs template file for templates/tournaments.tmpl
 # #-#-#-#-#  user-error.tmpl.pot (ccbs)  #-#-#-#-#
 # ccbs template file for templates/user-error.tmpl
+#, fuzzy
 msgid ""
 msgstr ""
+"#-#-#-#-#  add-tournament.tmpl.pot (ccbs)  #-#-#-#-#\n"
 "Project-Id-Version: ccbs\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-55-17 14:55+0200\n"
+"POT-Creation-Date: 2005-15-17 15:15+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"
+"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"
+"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"
+"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"
+"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"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"#-#-#-#-#  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"
+"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"
+"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"
+"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"
+"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"
+"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"
+"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"
+"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"
+"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"
+"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"
+"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"
+"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"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -129,6 +259,22 @@ msgstr ""
 msgid "Song selector"
 msgstr ""
 
+#: ccbs.pm:109
+msgid "Error"
+msgstr ""
+
+#: ccbs.pm:115
+msgid "Sorry, the database is in no-admin-mode."
+msgstr ""
+
+#: ccbs.pm:124
+msgid "Internal Server Error"
+msgstr ""
+
+#: add-tournament.pl:16
+msgid "Add tournament"
+msgstr ""
+
 msgid "Nick"
 msgstr ""
 
index 1d513bfb585ffea6eb3712e1e99fadb0dace9106..51e4eb38951663ebd8b0e0099a814a9590ce943c 100755 (executable)
@@ -3,6 +3,11 @@
 set -e
 
 rm -f templates/*.pot
+
+# Extract strings from all the Perl code
+xgettext --keyword=_ --from-code=utf-8 -o templates/messages.pot -L Perl *.{pm,pl} 
+
+# ...and from all the TT templates
 for FILE in templates/*.tmpl; do
        echo $FILE...
        perl -I../intl ../intl/make-pot.pl $FILE | msguniq > $FILE.pot