| 87 |
my %original; |
my %original; |
| 88 |
my %transversion; |
my %transversion; |
| 89 |
my %version; |
my %version; |
| 90 |
|
my %files; |
| 91 |
|
|
| 92 |
# Count wml files in given directory |
# Count wml files in given directory |
| 93 |
# |
# |
| 114 |
$file = substr ($f, $cutfrom); |
$file = substr ($f, $cutfrom); |
| 115 |
next if $transignore->is_global($file); |
next if $transignore->is_global($file); |
| 116 |
$file =~ s/\.wml$//; |
$file =~ s/\.wml$//; |
| 117 |
|
$files{$file} = 1; |
| 118 |
$wmlfiles{$lang} .= " " . $file; |
$wmlfiles{$lang} .= " " . $file; |
| 119 |
my $transcheck = Webwml::TransCheck->new("$dir/$file.wml"); |
my $transcheck = Webwml::TransCheck->new("$dir/$file.wml"); |
| 120 |
if ($transcheck->revision()) { |
if ($transcheck->revision()) { |
| 201 |
# =============== Create HTML files =============== |
# =============== Create HTML files =============== |
| 202 |
mkdir ($config{'htmldir'}, 02775) if (! -d $config{'htmldir'}); |
mkdir ($config{'htmldir'}, 02775) if (! -d $config{'htmldir'}); |
| 203 |
|
|
| 204 |
@sorted_english = sort (split (/ /, $wmlfiles{'english'})); |
my @filenames = sort keys %files; |
| 205 |
|
my $nfiles = scalar @filenames; |
| 206 |
|
|
| 207 |
print "Creating files: " if ($config{'verbose'}); |
print "Creating files: " if ($config{'verbose'}); |
| 208 |
my @search_in; |
my @search_in; |
| 218 |
|
|
| 219 |
$t_body = $u_body = $o_body = ""; |
$t_body = $u_body = $o_body = ""; |
| 220 |
|
|
| 221 |
foreach $file (@sorted_english) { |
foreach $file (@filenames) { |
| 222 |
next if ($file eq ""); |
next if ($file eq ""); |
| 223 |
# Translated pages |
# Translated pages |
| 224 |
if (index ($wmlfiles{$lang}, " $file ") >= 0) { |
if (index ($wmlfiles{$lang}, " $file ") >= 0) { |
| 263 |
$wml{$lang} = $translated{$lang}; |
$wml{$lang} = $translated{$lang}; |
| 264 |
$translated{$lang} = $translated{$lang} - $outdated{$lang}; |
$translated{$lang} = $translated{$lang} - $outdated{$lang}; |
| 265 |
|
|
| 266 |
$percent_a{$lang} = $wml{$lang}/$wml{english} * 100; |
$percent_a{$lang} = $wml{$lang}/$nfiles * 100; |
| 267 |
$percent_t{$lang} = $translated{$lang}/$wml{english} * 100; |
$percent_t{$lang} = $translated{$lang}/$nfiles * 100; |
| 268 |
$percent_o{$lang} = $outdated{$lang}/$wml{english} * 100; |
$percent_o{$lang} = $outdated{$lang}/$nfiles * 100; |
| 269 |
$percent_u{$lang} = $untranslated{$lang}/$wml{english} * 100; |
$percent_u{$lang} = $untranslated{$lang}/$nfiles * 100; |
| 270 |
|
|
| 271 |
if (open (HTML, ">$config{'htmldir'}/$l.html")) { |
if (open (HTML, ">$config{'htmldir'}/$l.html")) { |
| 272 |
printf HTML "<html><head><title>%s: %s</title></head><body bgcolor=#ffffff>\n", $config{'title'}, ucfirst $lang; |
printf HTML "<html><head><title>%s: %s</title></head><body bgcolor=#ffffff>\n", $config{'title'}, ucfirst $lang; |