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

Re: Site map



On Tue, May 22, 2001 at 04:40:57PM +0200, Javier Fdz-Sanguino Pen~a wrote:
> 	I have just done 'make sitemap.es.html' in the spanish dir and I've
> found that it (mostly) works ok. There do appear to be some problems,
> mainly due to translators not translating correctly wml headers (for
> example in the spanish Bugs/ wml files) and due to pages not being
> translated.

That's not a problem, it's a feature :)

> 	Maybe we should add some kind of tag so that unstranslated pages are
> marked as such and the user does not get confused by mixed languages (both
> the original one and the translated version)...

> 	How about this (quick and ugly) patch:
> 
> --- english/sitemap.wml Tue May 22 01:01:20 2001
> +++ spanish/sitemap.wml Tue May 22 16:38:10 2001
> @@ -7,6 +7,7 @@

Nonono. That's not how it's supposed to work. You don't copy the file, you
compile it in your directory with your options.

I see I'm going to have to commit the Makefile changes :)

>  <perl>
>  sub title_of {
>    my ($page) = @_;
> +  my $untranslated = 0;
> 
>  # special cases
>    if ($page eq "http://lists.debian.org/";) { return "<mailarchives>" }
> @@ -25,9 +26,13 @@
>    $page =~ s,/testing/,/woody/,; # kludges...
>    if ($page =~ /\/$/) { $page .= "index.wml" } else { $page .= ".wml" };
>  #  print STDERR "page: $page\n"; return;
> -  $page = "$ENGLISHDIR/$page" unless (-f $page);
> +  if ( ! -f $page ) {
> +         $page = "$ENGLISHDIR/$page";
> +         $untranslated = 1;
> +   }
>    my $title = grep '^#use .* title=' $page; chomp $title;
>    $title =~ s/^#use .* title="([^"]+)".*$/$1/;
> +  $title = "[untranslated] ".$title if $untranslated;
>    return $title;
>  }
>  </perl>
> 
> 	Of course the "[untranslated]" should be changed to <untranslated>
> and be a tag in the wml templates :)

Yeah, I guess that would be acceptable, though it would fuck up the table
width. We would have to add this to all of the special cases, too.

BTW if you change it, make it $title." <nottranslated>", since the title's
more important than the fact it's not translated. :)

-- 
Digital Electronic Being Intended for Assassination and Nullification



Reply to: