]> git.donarmstrong.com Git - lilypond.git/commitdiff
Don't print warning for lp-book use outside Lily docs
authorJohn Mandereau <john.mandereau@gmail.com>
Tue, 22 Apr 2008 11:51:41 +0000 (13:51 +0200)
committerJohn Mandereau <john.mandereau@gmail.com>
Tue, 22 Apr 2008 11:51:41 +0000 (13:51 +0200)
python/langdefs.py

index d8bd17c286fd2b3fbe1c200c6e3a2b72cc7c5844..80a1c7f244e51b9175aced2480c3eda490b31169 100644 (file)
@@ -7,6 +7,7 @@ Documentation i18n module
 
 import re
 import sys
+import os
 
 def lang_file_name (p, langext, ext):
     if langext != '':
@@ -66,7 +67,6 @@ else:
 
     try:
         import gettext
-        import os
 
         translation = {}
         for l in LANGUAGES:
@@ -76,5 +76,6 @@ else:
                                         [l.code])
                 translation[l.code] = t.gettext
     except:
-        sys.stderr.write ('langdefs.py: warning: lilypond-doc gettext domain not found.\n')
+        if os.environ.has_key ('LYDOC_LOCALEDIR'):
+            sys.stderr.write ('langdefs.py: warning: lilypond-doc gettext domain not found.\n')
         translation = dict ([(l.code, lambda x: x) for l in LANGUAGES])