lilypond-devel
[Top][All Lists]
Advanced

[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 1.5.0.8 (X11/20061107)

Jan Nieuwenhuizen escreveu:
>> this has to be done, because output distance computations need
>> information from previous versions.
> 
> Hmm, then I misread lilypond.org.py.  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 rsync-lily-doc.py 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 add-html-footer.py 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 add-html-footer.py, 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
Documentation/index.html.in

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

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

Why?

-- 

Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com





reply via email to

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