From: Phil Holmes Date: Wed, 14 Sep 2011 15:57:41 +0000 (+0100) Subject: Uses langdefs.py for make website X-Git-Tag: release/2.15.12-1~47 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a04d1cb5153717523cdafe23faeb2166571603da;p=lilypond.git Uses langdefs.py for make website --- diff --git a/make/website.make b/make/website.make index 62ca4b803d..e84a216486 100644 --- a/make/website.make +++ b/make/website.make @@ -19,6 +19,7 @@ ifeq ($(WEBSITE_ONLY_BUILD),1) TEXI2HTML_PROGRAM=$(HOME)/usr/bin/texi2html EXAMPLES=$(HOME)/lilypond/media/ly-examples PICTURES=$(HOME)/lilypond/media/pictures + PYTHON=python else ### for normal git script-dir=$(top-src-dir)/scripts/build @@ -49,15 +50,10 @@ ifeq ($(quiet-run),true) quiet-flag=-q endif - - ################################################################ OUT=out-website -### only update this when the language compiles correctly! -# LANGUAGES = (site, cs, de, es, fr, hu, it, ja, nl, zh) -#WEB_LANGS = de es fr hu it ja nl zh cs -WEB_LANGS = cs de es fr hu it ja nl zh +WEB_LANGS = $(shell MAKEWEB=1 $(PYTHON) $(top-src-dir)/python/langdefs.py) TEXI2HTML=ONLY_WEB=1 TOP_SRC_DIR=$(top-src-dir) DEPTH=$(depth) PERL_UNICODE=SD $(TEXI2HTML_PROGRAM) diff --git a/python/langdefs.py b/python/langdefs.py index 983fe3bb30..d3d6c07813 100644 --- a/python/langdefs.py +++ b/python/langdefs.py @@ -73,8 +73,11 @@ zh = LanguageDef ('zh', '中文', enable_ly_identifier_l10n=False) # (please run 'make doc-clean' before doing that): #fr.enabled = False -# LANGUAGES = (site, cs, de, es, fr, hu, it, ja, nl, zh) LANGUAGES = (site, cs, de, es, fr, hu, it, ja, nl, zh) +WEB_LANGUAGES = (site, cs, de, es, fr, hu, it, ja, nl, zh) + +if os.getenv("MAKEWEB") == '1': + LANGUAGES=WEB_LANGUAGES if __name__ == '__main__': print ' '.join ([l.code for l in LANGUAGES if l.enabled and l.code != 'en']) diff --git a/scripts/build/create-weblinks-itexi.py b/scripts/build/create-weblinks-itexi.py index d799925909..106dcee657 100644 --- a/scripts/build/create-weblinks-itexi.py +++ b/scripts/build/create-weblinks-itexi.py @@ -9,14 +9,14 @@ import sys import os import glob -# these links are relative from /website/ on lilypond.org -depth = "../" - ### translation data -- shouldn't be here; see issue ### http://code.google.com/p/lilypond/issues/detail?id=1050 -#langs = ['', 'cs', 'de', 'es', 'fr', 'hu', 'it', 'ja', 'nl', 'zh'] -langs = ['', 'cs', 'de', 'es', 'fr', 'hu', 'it', 'ja', 'nl', 'zh'] +import langdefs +langs = [i.code if i.code != 'en' else '' for i in langdefs.WEB_LANGUAGES] + +# these links are relative from /website/ on lilypond.org +depth = "../" # Get/update node translations '''