[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: New version of the coordination pages (pseudo-urls)



Hello,

On Wed, Mar 04, 2009 at 09:45:57PM +0300, Yuri Kozlov wrote:
> 
> pseudo-urls is worked, but only on the
> http://i18n.debian.net/debian-l10n/russian/ru.by_status.html
> 
> On the 
> http://www.debian.org/intl/l10n/po-debconf/ru.ru.html
> the table have a new columns (Status,Translator,Date,Bug)
> but rows is empty(e.g. for mserv). 

Sorry Yuri, I forgot one part.

Can you commit the attached patch?

Its goal is to avoid fixed list of languages.
%LanguageList is still needed and contains a fixed list of languages, but
at least there will be only a single place needing changes for new
languages.

Best Regards,
-- 
Nekral
Index: english/international/l10n/scripts/gen-files.pl
===================================================================
RCS file: /cvs/webwml/webwml/english/international/l10n/scripts/gen-files.pl,v
retrieving revision 1.68
diff -u -r1.68 gen-files.pl
--- english/international/l10n/scripts/gen-files.pl	1 Mar 2009 06:47:43 -0000	1.68
+++ english/international/l10n/scripts/gen-files.pl	4 Mar 2009 20:19:51 -0000
@@ -688,12 +688,22 @@
 	my $podebconf_errors_by_language = {};
 	# Load the coordination status databases
         my %status_db    = ();
-        for my $l (qw/ar ca de es fr nl pt_BR ro sv tr/) {
+        opendir (DATADIR, "$opt_l/data")
+                or die "Cannot open directory $opt_l/data: $!\n";
+        foreach (readdir (DATADIR)) {
+                # Only check the status files
+                next unless ($_ =~ m/^status\.(.*)$/);
+                my $l = $1;
+                # status.en is not used for the English translation, but
+                # for reviews
+                next if ($l eq "en");
+
                 if (-r "$opt_l/data/status.$l") {
                         $status_db{uc $l} = Debian::L10n::Db->new();
                         $status_db{uc $l}->read("$opt_l/data/status.$l", 0);
                 }
         }
+        closedir (DATADIR);
         foreach $pkg (sort pkgsort @{$packages}) {
                 next unless $data->has_podebconf($pkg);
 

Reply to: