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) {
- my $key = $s;
- mkpath ( "$wwwdir/$key" );
- mkpath ( "$wwwdir/source/$key" );
- foreach my $lang (@LANGUAGES) {
- my $charset = 'UTF-8';
- my $cat = Packages::I18N::Locale->get_handle($lang)
- or die "get_handle failed for $lang";
- print "writing $key/index (lang=$lang)...\n";
-
- my %content = ( subsections => [], suite => $s,
- lang => $lang, charset => $charset, cat => $cat,
- used_langs => \@LANGUAGES, suites => \@SUITES );
- foreach my $ssec ((keys %{$subsections->{$s}}, 'virtual')) {
- next if $ssec eq '-';
- if ($sections_descs{$ssec}) {
- push @{$content{subsections}}, {
- id => $ssec,
- name => $cat->g($sections_descs{$ssec}[0]),
- desc => $cat->g($sections_descs{$ssec}[1]),
- };
- }
- }
-
- $template->page( 'suite_index', \%content,
- "$wwwdir/$key/index.$lang.html.new");
- rename( "$wwwdir/$key/index.$lang.html.new",
- "$wwwdir/$key/index.$lang.html" );
-
- $content{source} = 'source';
- $template->page( 'suite_index', \%content,
- "$wwwdir/source/$key/index.$lang.html.new");
- rename( "$wwwdir/source/$key/index.$lang.html.new",
- "$wwwdir/source/$key/index.$lang.html" );
-
- }
-}
-
print "collecting package info ...\n";
my %allpkgs;
while (my ($pkg, $data) = each %packages) {
my $cat = Packages::I18N::Locale->get_handle($lang)
or die "get_handle failed for $lang";
- my %lang_vars = ( lang => $lang, charset => $charset,
+ my %lang_vars = ( po_lang => $lang, ddtp_lang => $lang,
+ charset => $charset,
cat => $cat, used_langs => \@LANGUAGES );
print "writing $source$s/allpackages (lang=$lang)...\n";
$template->page( 'index', { %lang_vars, packages => $pkgs->{$key},