----- Original Message -----
From: <percival.music...@gmail.com>
To: <philehol...@googlemail.com>; <jan.nieuwenhui...@gmail.com>
Cc: <lilypond-devel@gnu.org>; <re...@codereview.appspotmail.com>
Sent: Monday, September 05, 2011 7:10 PM
Subject: Re: Uses langdefs.py to create language list for
create-weblinks-itexi.py (issue 4951047)
LTGM, not tested, but I'm willing to put it up and just see if anything
breaks.
My only qualm is that this takes lang.LANGAUGES, instead of defining a
WEB_LANGUAGES. At the moment they're the same, but somebody might come
in to do a new translation, and we don't want to enable that on the
website until it's complete.
But I'm content to cross that bridge when we come to it.
http://codereview.appspot.com/4951047/
I've reduced the reply-to list, because this is not really a review comment
but a request for suggestions.
I've got a patch that does this. However, there is an issue I want to check
about how it can be done. At present, langdefs is called in 2 ways: from
python, by including langdefs.py, and then by using the objects created in
the module; and from make, simply by saying something like LANGS = python
langdefs.py. The latter syntax is provided for in langdefs because of these
lines:
if __name__ == '__main__':
print ' '.join ([l.code for l in LANGUAGES if l.enabled and l.code !=
'en'])
The problem is - how to return WEB_LANGS for the web-build, but LANGUAGES
for the doc build? My patch does this by using something like this in
website.make:
WEB_LANGS = python langdefs.py web
In other words, using an argument to langdefs. langdefs is modified to
check whether it has an argument, and that argument is "web" and if so it
returns WEB_LANGS. I can't think of a better way of doing this, but it
seems a bit hacky. Can anyone else propose a better way?
Thanks.
--
Phil Holmes
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel