Index: scripts/lilypond-book.py |
diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py |
index 175247b567af3f4b1efff913093a4d4d78f5d707..4ffb4b5f6fc73a505007de36e525d9b88fbe2a24 100644 |
--- a/scripts/lilypond-book.py |
+++ b/scripts/lilypond-book.py |
@@ -47,6 +47,7 @@ TODO: |
import codecs |
import fcntl |
+import gettext |
import glob |
import hashlib |
import os |
@@ -62,6 +63,9 @@ from functools import reduce |
@relocate-preamble@ |
""" |
+# Load translation and install _() into Python's builtins namespace. |
+gettext.install ('lilypond', '@localedir@') |
+ |
import lilylib as ly |
import fontextract |
import langdefs |
@@ -100,8 +104,13 @@ progress = ly.progress |
warning = ly.warning |
error = ly.error |
+program_version = '@TOPLEVEL_VERSION@' |
+if program_version.startswith("@"): |
+ # '@' in lilypond-book output confuses texinfo |
+ program_version = "dev" |
+ |
def identify (): |
- progress('%s (GNU LilyPond) %s' % (ly.program_name, ly.program_version)) |
+ progress('%s (GNU LilyPond) %s' % (ly.program_name, program_version)) |
def warranty (): |
identify () |
@@ -609,7 +618,7 @@ def do_options (): |
opt_parser = get_option_parser() |
(global_options, args) = opt_parser.parse_args () |
- global_options.information = {'program_version': ly.program_version, 'program_name': ly.program_name } |
+ global_options.information = {'program_version': program_version, 'program_name': ly.program_name } |
global_options.original_dir = original_dir |
if global_options.lily_output_dir: |