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

Bug#82852: www.debian.org: Some automatic indexes not being properly generated in Spanish translations



On Fri, Jan 19, 2001 at 03:08:22PM +0100, Jesus M. Gonzalez-Barahona wrote:
> For instance, in http://www.debian.org/News/weekly/2001/index.es.html only 
> entries in English are available (although the corresponding Spanish pages 
> are available)

The attached patch should fix this problem.  The $trans_dir
variable was not being set correctly in the $year/ subdirectories.
As a result, it was falling back to the English pages and their
titles.  The appended patch against
webwml/english/template/debian/weeklynews/index.wml should fix
this.

> In http://www.debian.org/News/weekly/index.es.html, only some of the 2001
> issues are referneced, and only in English.

As far as I know, this is a different problem.  I'll keep looking.

Matt

P.S. The patch also removes the manipulation of the now-unused
$num variable.

--- index.wml.orig	Fri Jan 19 07:46:37 2001
+++ index.wml	Fri Jan 19 08:01:29 2001
@@ -6,8 +6,13 @@
 sub get_weeklynews_list {
 	my ($year, $eng_dir, $match, $noyear, $count, $stopat, $reccount, $trans_dir) = @_;
 
-	$trans_dir ||= '.'; # trans_dir should point to dir above the year dir
-	
+	# trans_dir should point to dir above the year dir
+	if ($noyear) {
+		$trans_dir ||= '..'; 
+	} else {
+		$trans_dir ||= '.';
+	}
+
 	my $str="";
 
 	open(CURRENT, "CURRENT-ISSUE-IS") or open(CURRENT, "$eng_dir/CURRENT-ISSUE-IS") or return '';
@@ -23,7 +28,6 @@
 
 	foreach (sort {$b <=> $a} @files) {
 		next if $year == $currentyear && $_ > $currentissue; # skip issues in preparation.
-		my $num=$_;
 		$_="$_/index.wml";
 		$trans_title = $_;
 		$trans_title =~ s/wml/title/;
@@ -39,9 +43,6 @@
 			$summary=$1;
 		}
 		if ($title) {
-			if (length $num == 1) {
-				$num="&nbsp;$num";
-			}
 			$str.="<a href=\"". ($noyear ? "" : "$year/" )."$base\">$title</a> $summary<br>\n";
 		}
 		close FILE;



Reply to: