]> git.donarmstrong.com Git - lilypond.git/commitdiff
Use top-build-dir for docs gettext usage
authorJohn Mandereau <john.mandereau@gmail.com>
Tue, 13 Mar 2007 17:19:28 +0000 (18:19 +0100)
committerJohn Mandereau <john.mandereau@gmail.com>
Tue, 13 Mar 2007 17:19:28 +0000 (18:19 +0100)
This will hopefully fix non-translated strings in translated docs
footer when building with GUB.

www_post.py is also no longer tolerant with gettext loading errors.

GNUmakefile.in
buildscripts/www_post.py

index 13e0f75b71b1d242eed3cb6fad83b7da06ee462d..c9879725c8b6504c1237dea72e1fb82a98f7e7e1 100644 (file)
@@ -98,7 +98,7 @@ local-WWW-post:
        $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(outdir)/examples.html input/
        rm -rf $(outdir)/online-root
        rm -rf $(outdir)/offline-root
-       $(PYTHON) $(buildscript-dir)/www_post.py $(PACKAGE_NAME) $(TOPLEVEL_VERSION) $(buildscript-dir) $(outdir) "$(WEB_TARGETS)"
+       $(PYTHON) $(buildscript-dir)/www_post.py $(PACKAGE_NAME) $(TOPLEVEL_VERSION) $(buildscript-dir) $(top-build-dir)/Documentation/po/$(outdir) $(outdir) "$(WEB_TARGETS)"
 
 
 tree-prefix = $(outdir)
index cc38c392be222f499df629bc3a1d4ebe0a3e5584..39c0747d7e309ad19185765f1f823ddf6ae36e64 100644 (file)
@@ -11,7 +11,7 @@ import os
 import re
 import gettext
 
-package_name, package_version, buildscript_dir, outdir, targets = sys.argv[1:]
+package_name, package_version, buildscript_dir, localedir, outdir, targets = sys.argv[1:]
 targets = targets.split (' ')
 outdir = os.path.normpath (outdir)
 doc_dirs = ['input', 'Documentation', outdir]
@@ -81,13 +81,9 @@ if 'online' in targets:
 
 # load gettext messages catalogs
 translation = {}
-localedir = os.path.join (buildscript_dir, '../Documentation/po', outdir)
 for l in langdefs.LANGUAGES:
     if l.enabled and l.code != 'en':
-        try:
-            translation[l.code] = gettext.translation('lilypond-doc', localedir, [l.code]).gettext
-        except:
-            translation[l.code] = lambda s: s
+        translation[l.code] = gettext.translation('lilypond-doc', localedir, [l.code]).gettext
 
 add_html_footer.build_pages_dict (html_files)
 for t in targets: