[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Update translation status



Update of /home/or/cvsroot/website/en
In directory moria:/tmp/cvs-serv21710/en

Modified Files:
	translation-status.wml 
Log Message:
Update translation status

Index: translation-status.wml
===================================================================
RCS file: /home/or/cvsroot/website/en/translation-status.wml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -d -r1.4 -r1.5
--- translation-status.wml	8 Oct 2005 12:34:51 -0000	1.4
+++ translation-status.wml	27 Jan 2006 00:03:01 -0000	1.5
@@ -10,30 +10,36 @@
 <hr />
 
 <:
+sub do_status($$) {
+	my ($dir, $may_miss_dir) = @_;
+
 	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);
+		opendir(DIR, "$dir/$lang") or
+			$may_miss_dir or die ("Cannot opendir $dir/$lang: $!\n");
+		my @files = grep { $_ ne '.' && $_ ne '..' && $_ =~ m/^[^.]/ && -f "$dir/$lang/$_"} readdir(DIR);
 		closedir DIR;
 
 		for my $file (@files) {
-			$files{$lang}->{$file}->{'all'} = getMetadata($lang.'/'.$file);
+			$files{$lang}->{$file}->{'all'} = getMetadata("$dir/$lang/$file");
 			if ($lang eq 'en') {
-				$files{$lang}->{$file}->{'rev'} = translation_get_masterrevision_file($file);
+				$files{$lang}->{$file}->{'rev'} = translation_get_masterrevision_file($dir, $file);
 			} else {
-				$files{$lang}->{$file}->{'based'} = translation_get_basedonrevision_langfile($lang, $file);
+				$files{$lang}->{$file}->{'based'} = translation_get_basedonrevision_langfile($dir, $lang, $file);
 			};
 		};
 	};
 
+	print "<h1>$dir</h1>\n";
+
 	print "<table border=1>\n";
 	print "<tr>\n";
 	print "<th>File</th>\n";
 	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);
+		my $obs = file_is_obsolete($dir, 'en', $file);
 		print "<tr>";
 		printf "<th>%s</th>", $file;
 		printf '<td%s>Revision %s%s<br>
@@ -108,6 +114,12 @@
 			print "</table>\n";
 		};
 	};
+};
+
+do_status('.', 0);
+do_status('eff', 1);
+do_status('gui', 1);
+
 :>
 
 </div><!-- #main -->