[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Make translation status more verbose
Update of /home/or/cvsroot/website/en
In directory moria:/tmp/cvs-serv27442/en
Modified Files:
foot.wmi navigation.wmi tor-manual-cvs.wml tor-manual.wml
translation-status.wml
Log Message:
Make translation status more verbose
use 'use strict' in perl stuff.
Index: foot.wmi
===================================================================
RCS file: /home/or/cvsroot/website/en/foot.wmi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- foot.wmi 4 Oct 2005 19:19:20 -0000 1.2
+++ foot.wmi 8 Oct 2005 12:16:45 -0000 1.3
@@ -9,7 +9,7 @@
<div class="bottom" id="bottom">
<i><a href="mailto:tor-webmaster@xxxxxxxxxxxxx" class="smalllink">Webmaster</a></i> -
# Id: developers.html,v 1.41 2005/08/31 20:19:16 thomass Exp
- Last modified: <: @stat = stat($(LANG).'/'.$WML_SRC_FILENAME); print scalar localtime($stat[9]); :>
+ Last modified: <: my @stat = stat($(LANG).'/'.$WML_SRC_FILENAME); print scalar localtime($stat[9]); :>
-
Last compiled: <: print scalar localtime(); :>
Index: navigation.wmi
===================================================================
RCS file: /home/or/cvsroot/website/en/navigation.wmi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- navigation.wmi 4 Oct 2005 19:19:20 -0000 1.2
+++ navigation.wmi 8 Oct 2005 12:16:45 -0000 1.3
@@ -4,7 +4,7 @@
# Revision: $Revision$
<:
- @navigation = (
+ my @navigation = (
'index' , 'Home',
'overview' , 'Overview',
'download' , 'Download',
Index: tor-manual-cvs.wml
===================================================================
RCS file: /home/or/cvsroot/website/en/tor-manual-cvs.wml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- tor-manual-cvs.wml 4 Oct 2005 19:19:20 -0000 1.2
+++ tor-manual-cvs.wml 8 Oct 2005 12:16:45 -0000 1.3
@@ -6,7 +6,7 @@
<div class="main-column">
<:
- $man = `man2html -M '' $(TORCVSHEAD)/doc/tor.1.in`;
+ my $man = `man2html -M '' $(TORCVSHEAD)/doc/tor.1.in`;
die "No manpage" unless $man;
$man =~ s,.*<body>,,is;
Index: tor-manual.wml
===================================================================
RCS file: /home/or/cvsroot/website/en/tor-manual.wml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- tor-manual.wml 4 Oct 2005 19:19:20 -0000 1.2
+++ tor-manual.wml 8 Oct 2005 12:16:45 -0000 1.3
@@ -6,7 +6,7 @@
<div class="main-column">
<:
- $man = `man2html -M '' $(TORCVSSTABLE)/doc/tor.1.in`;
+ my $man = `man2html -M '' $(TORCVSSTABLE)/doc/tor.1.in`;
die "No manpage" unless $man;
$man =~ s,.*<body>,,is;
Index: translation-status.wml
===================================================================
RCS file: /home/or/cvsroot/website/en/translation-status.wml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- translation-status.wml 5 Oct 2005 02:13:04 -0000 1.2
+++ translation-status.wml 8 Oct 2005 12:16:45 -0000 1.3
@@ -10,16 +10,18 @@
<:
my %files;
+ my @warnings;
for my $lang (@LANGUAGES) {
opendir(DIR, $lang) or die ("Cannot opendir $lang: $!\n");
my @files = grep { $_ ne '.' && $_ ne '..' && $_ =~ m/^[^.]/ && -f $lang.'/'.$_} readdir(DIR);
closedir DIR;
for my $file (@files) {
+ $files{$lang}->{$file}->{'all'} = getMetadata($lang.'/'.$file);
if ($lang eq 'en') {
- $files{$lang}->{$file} = translation_get_masterrevision_file($file);
+ $files{$lang}->{$file}->{'rev'} = translation_get_masterrevision_file($file);
} else {
- $files{$lang}->{$file} = translation_get_basedonrevision_langfile($lang, $file);
+ $files{$lang}->{$file}->{'based'} = translation_get_basedonrevision_langfile($lang, $file);
};
};
};
@@ -27,25 +29,56 @@
print "<table border=1>\n";
print "<tr>\n";
print "<th>File</th>\n";
- printf("<th>%s</th>\n", $LANGUAGES{$_}) for (@LANGUAGES);
+ printf("<th>%s (%s)</th>\n", $_, $LANGUAGES{$_}) for (@LANGUAGES);
print "</tr>\n";
for my $file (sort {$a cmp $b} keys %{$files{'en'}}) {
my $obs = file_is_obsolete('en', $file);
print "<tr>";
printf "<th>%s</th>", $file;
- printf "<td%s>%s%s</td>", ($obs ? ' bgcolor="grey"' : ''), $files{'en'}->{$file}, ($obs ? ' (obsolete)' :'');
+ printf '<td%s>Revision %s%s<br>
+ <a href="http://cvs.seul.org/viewcvs/viewcvs.cgi/website/en/%s?root=tor&view=markup">HEAD</a></td>',
+ ($obs ? ' bgcolor="lightgrey"' : ''),
+ $files{'en'}->{$file}->{'rev'},
+ ($obs ? ' (obsolete)' :''),
+ $file;
for my $lang (@LANGUAGES) {
next if $lang eq 'en';
+ my $color;
+ my $status;
if (exists $files{$lang}->{$file}) {
- if ($files{$lang}->{$file} eq $files{'en'}->{$file}) {
- printf '<td bgcolor="lightgreen">current</td>';
+ my $all_info = '';
+ for my $key (sort {$a cmp $b} keys %{$files{$lang}->{$file}->{'all'}}) {
+ $all_info .= sprintf "%s: %s<br>", $key, $files{$lang}->{$file}->{'all'}->{$key};
+ };
+
+ my $difflink;
+ if ($files{$lang}->{$file}->{'based'} eq $files{'en'}->{$file}->{'rev'}) {
+ $color='lightgreen';
+ $status='current';
+ $difflink='';
} else {
- printf '<td bgcolor="yellow">%s</td>', $files{$lang}->{$file};
+ $color='yellow';
+ $status='not current';
+ if ($files{$lang}->{$file} ne 'unknown') {
+ $difflink=sprintf '<br><a href="http://cvs.seul.org/viewcvs/viewcvs.cgi/website/en/%s?root=tor&r1=%s&r2=%s">changes in original</a>',
+ $file, $files{$lang}->{$file}->{'based'}, $files{'en'}->{$file}->{'rev'};
+ };
};
- delete $files{$lang}->{$file};
+ printf '<td bgcolor="%s">%s<br>
+ <a href="http://cvs.seul.org/viewcvs/viewcvs.cgi/website/%s/%s?root=tor&view=markup">HEAD</a><br>
+ %s
+ %s</td>',
+ $color,
+ $status,
+ $lang, $file,
+ $all_info,
+ $difflink;
} else {
- printf '<td bgcolor="%s">missing</td>', ($obs ? 'lightgreen' : 'red')
+ $color=($obs ? 'lightgreen' : 'red');
+ $status='missing';
+ printf '<td bgcolor="%s">%s</td>', $color, $status;
};
+ delete $files{$lang}->{$file};
};
print "</tr>";
};
@@ -54,7 +87,8 @@
for my $lang (@LANGUAGES) {
next if $lang eq 'en';
if (keys %{$files{$lang}} > 0) {
- printf "<h2>Additional files in %s</h2>\n", $LANGUAGES{$lang};
+ print "<p>";
+ printf "<h2>Additional files in %s (%s)</h2>\n", $lang, $LANGUAGES{$lang};
print "<table border=1>\n";
print "<tr>\n";
@@ -63,8 +97,11 @@
print "</tr>\n";
for my $file (sort {$a cmp $b} keys %{$files{$lang}}) {
print "<tr>";
- printf "<th>%s</th>", $file;
- printf "<td>%s</td>", $files{$lang}->{$file};
+ printf "<th>%s</th><td>", $file;
+ for my $key (sort {$a cmp $b} keys %{$files{$lang}->{$file}->{'all'}}) {
+ printf "%s: %s<br>", $key, $files{$lang}->{$file}->{'all'}->{$key};
+ };
+ printf "</td>";
delete $files{$lang}->{$file};
};
print "</table>\n";