[Top][All Lists]

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

Re: Documentation translation: first patch

From: Han-Wen Nienhuys
Subject: Re: Documentation translation: first patch
Date: Sun, 26 Nov 2006 16:31:17 +0100
User-agent: Thunderbird (X11/20061107)

Jan Nieuwenhuizen escreveu:
>> this has to be done, because output distance computations need
>> information from previous versions.
> Hmm, then I misread  To bad, I checked-in something
> that produces a plain doc ball, and an extension-stripped
> target/<native>/build/out/web-root into GUB.

The name is misleading, I agree.

>>> The extension stripping is a bit tricky to move out
>>> of add-html-footer, as I have documented there.
>> I missed that, I think; which commit is this?
> No idea.  I also only see commits on master on my rss feed?

Yes, IIRC this is fixed in a recent git update. hopefully, savannah
will update soon.

> It's just this snippet from that is needed for
> content negotiation.
>     # Strip .html, .png suffix for auto language selection (content
>     # negotiation).  The menu must keep the full extension, so do
>     # this before adding the menu.
>     if content_negotiation:
>         page = re.sub 
> ('''(href|src)=[\'"]([^/][.]*[^.:\'"]*)(.html|.png)(#[^"\']*|)[\'"]''',
>                        '\\1="\\2\\4"', page)
>     # Add menu after stripping: must not have autoselection for language menu.

> Problem is that if this is moved out of, we'd have
> to do something ugly or clever (probably both) to avoid stripping the
> extension in the language menu (the menu will not direct to another
> language page if the file name url is not fully specified).

> Clever/ugly things could be: do re.sub only on part until some footer
> mark, or add some sort of do-not-strip-me attribute to an url...

Quickest hack I can think of:

enclose the menu in <!--language_selection>

(or probable <div id="langselect"></div id="langselect">) and use that
to make the stripper ignore the language menu.

Alternatively, we could move the language menu entirely out of
add-html-footer, and provide (en,fr) links in

I think most people use the web interface to the docs anyway.

> We'd still have to build the .html's twice.



Han-Wen Nienhuys - address@hidden -

LilyPond Software Design
 -- Code for Music Notation

reply via email to

[Prev in Thread] Current Thread [Next in Thread]