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

Re: Debian WWW CVS: joey



On Thu, May 17, 2001 at 06:56:13PM +0200, Martin Schulze wrote:
> peter karlsson wrote:
> > Martin Schulze:
> > 
> > > Why?
> > 
> > Well, mostly because the include files are used to include language
> > independent data, and since this is supposed to be auto-generated
> > indices, I thought that this was one of those occurances. Also, the
> > include files aren't covered by translation-check, so it's harder to
> > keep track of when they are updated.
> 
> Do you know a solution for this problem?  I've thought about using
> slices again and came back that it's not usable, even if it would
> work.
> 
> Take a look at the code:
> 
> [ <ifneq <get-var WML_SRC_BASENAME> "index"
>   "<a href="index">Debian for PA-RISC</a>"
>   "<b>Debian for PA-RISC</b>"
> > ]
> 
> Using slices this would end up in one of the following
> 
> [EN:
> [ <ifneq <get-var WML_SRC_BASENAME> "index"
>   "<a href="index">Debian for PA-RISC</a>"
>   "<b>Debian for PA-RISC</b>"
> > ]
> :]
> [SV:
> [ <ifneq <get-var WML_SRC_BASENAME> "index"
>   "<a href="index">Debian for PA-RISC</a>"
>   "<b>Debian for PA-RISC</b>"
> > ]
> :]
> 
> Or even worse:
> 
> [ <ifneq <get-var WML_SRC_BASENAME> "index"
>   "[EN:<a href="index">Debian for PA-RISC</a>:]
>   [SV:<a href="index">Debian for PA-RISC</a>:]"
>   "[EN:<b>Debian for PA-RISC</b>:]
>   [SV:<b>Debian for PA-RISC</b>:]"
> > ]

Why not do the following (or something similar):

[ <ifneq <get-var WML_SRC_BASENAME> "index" "<a href=\"index\">" "<b>">
   [EN:Debian for PA-RISC:]
   [SV:Debian for PA-RISC:]
  <ifneq <get-var WML_SRC_BASENAME> "index" "</a>" "</b>"> ]

Actually, we should probably define a new tag similar to the
following (I don't know wml too well and don't have a way to test
this):

<define-tag menu-item endtag=required whitespace=delete>
[ <ifneq <get-var WML_SRC_BASENAME> %basename <a href="%basename"> <b>>
%body
<ifneq <get-var WML_SRC_BASENAME> %basename </a> </b>> ]
</define-tag>

and just use

<menu-item basename="index">
   [EN:Debian for PA-RISC:]
   [SV:Debian for PA-RISC:]
</menu-item>

Matt



Reply to: