X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=bin%2Fcreate_index_pages;h=d76bebab3f58e4cf04b65174a6c26e7ec3353f02;hb=994eceb69bd5a8865a51e00b3cfb1c7a1f03f78e;hp=7f35b31a4ffe57f0dcdb8d8388d24f75b37de86b;hpb=1bae1b743532d7d100015b751fe1f7be52198b8b;p=deb%2Fpackages.git diff --git a/bin/create_index_pages b/bin/create_index_pages index 7f35b31..d76beba 100755 --- a/bin/create_index_pages +++ b/bin/create_index_pages @@ -27,8 +27,9 @@ delete $ENV{'LANG'}; delete $ENV{'LC_ALL'}; delete $ENV{'LC_MESSAGES'}; bindtextdomain ( 'pdo', $LOCALES ); -bindtextdomain ( 'sections', $LOCALES ); bindtextdomain ( 'templates', $LOCALES ); +bindtextdomain ( 'sections', $LOCALES ); +bindtextdomain ( 'langs', $LOCALES ); textdomain( 'pdo' ); my $wwwdir = "$TOPDIR/www"; @@ -50,18 +51,10 @@ my $priorities = retrieve "$DBDIR/priorities.info"; #use Data::Dumper; #print STDERR Dumper($sections, $subsections, $priorities); -my (%pages, %tt_vars); - -$tt_vars{make_search_url} = sub { return &Packages::CGI::make_search_url(@_) }; -$tt_vars{make_url} = sub { return &Packages::CGI::make_url(@_) }; -$tt_vars{g} = sub { return &Packages::I18N::Locale::tt_gettext(@_) }; -# needed to work around the limitations of the the FILTER syntax -$tt_vars{html_encode} = sub { return HTML::Entities::encode_entities(@_,'<>&"') }; -$tt_vars{uri_escape} = sub { return URI::Escape::uri_escape(@_) }; -$tt_vars{quotemeta} = sub { return quotemeta($_[0]) }; +my (%pages); -my $template = new Packages::Template( "$TOPDIR/templates", 'html', \%tt_vars ); -my $txt_template = new Packages::Template( "$TOPDIR/templates", 'txt', \%tt_vars ); +my $template = new Packages::Template( "$TOPDIR/templates", 'html'); +my $txt_template = new Packages::Template( "$TOPDIR/templates", 'txt'); print "write suite index files ...\n"; foreach my $s (@SUITES) {