Do not mark missing translations as bad if the original itself is obsolete
Peter Palfrader

Peter Palfrader commited on 2005-10-05 04:13:04
Zeige 4 geänderte Dateien mit 12 Einfügungen und 3 Löschungen.

... ...
@@ -1,5 +1,6 @@
1 1
 ## translation metadata
2 2
 # Revision: $Revision$
3
+# Status: obsolete
3 4
 
4 5
 #include "head.wmi" TITLE="Redirecting" REDIRECT="overview.en"
5 6
 
... ...
@@ -30,20 +30,21 @@
30 30
 	printf("<th>%s</th>\n", $LANGUAGES{$_}) for (@LANGUAGES);
31 31
 	print "</tr>\n";
32 32
 	for my $file (sort {$a cmp $b} keys %{$files{'en'}}) {
33
+		my $obs = file_is_obsolete('en', $file);
33 34
 		print "<tr>";
34 35
 		printf "<th>%s</th>", $file;
35
-		printf "<td>%s</td>", $files{'en'}->{$file};
36
+		printf "<td%s>%s%s</td>", ($obs ? ' bgcolor="grey"' : ''), $files{'en'}->{$file}, ($obs ? ' (obsolete)' :'');
36 37
 		for my $lang (@LANGUAGES) {
37 38
 			next if $lang eq 'en';
38 39
 			if (exists $files{$lang}->{$file}) {
39 40
 				if ($files{$lang}->{$file}  eq  $files{'en'}->{$file}) {
40
-					printf '<td bgcolor="green">current</td>';
41
+					printf '<td bgcolor="lightgreen">current</td>';
41 42
 				} else {
42 43
 					printf '<td bgcolor="yellow">%s</td>', $files{$lang}->{$file};
43 44
 				};
44 45
 				delete $files{$lang}->{$file};
45 46
 			} else {
46
-				printf '<td bgcolor="red">missing</td>'
47
+				printf '<td bgcolor="%s">missing</td>', ($obs ? 'lightgreen' : 'red')
47 48
 			};
48 49
 		};
49 50
 		print "</tr>";
... ...
@@ -1,5 +1,6 @@
1 1
 ## translation metadata
2 2
 # Revision: $Revision$
3
+# Status: obsolete
3 4
 
4 5
 #include "head.wmi" TITLE="Redirecting" REDIRECT="support.en"
5 6
 
... ...
@@ -62,4 +62,10 @@ sub translation_current() {
62 62
 	return (translation_get_masterrevision() eq translation_get_basedonrevision());
63 63
 };
64 64
 
65
+sub file_is_obsolete($$) {
66
+	my ($lang, $page) = @_;
67
+	%translation = getMetadata("$lang/$page");
68
+	return (exists $translation{'Status'} && ($translation{'Status'} eq 'obsolete'))
69
+};
70
+
65 71
 :>
66 72