]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/lilypond-book.py
Fix code spacing
[lilypond.git] / scripts / lilypond-book.py
index a0ee6fb0ada7e4370d4911728859dcb32e114a9e..e851a40662c134302f7e5bb9508e1a103fd6e83f 100644 (file)
@@ -108,12 +108,12 @@ def warranty ():
     ly.encoded_write (sys.stdout, '''
 %s
 
-%s
+  %s
 
 %s
 %s
-''' % ( _ ('Copyright (c) %s by') % '2001--2008',
-        ' '.join (authors),
+''' % ( _ ('Copyright (c) %s by') % '2001--2009',
+        '\n  '.join (authors),
         _ ("Distributed under terms of the GNU General Public License."),
         _ ("It comes with NO WARRANTY.")))
 
@@ -936,14 +936,15 @@ def verb_ly_gettext (s):
 
     s = ly_comment_re.sub (lambda m: ly_comment_gettext (t, m), s)
 
-    for v in ly_var_def_re.findall (s):
-        s = re.sub (r"(?m)(^|[' \\#])%s([^a-zA-Z])" % v,
-                    "\\1" + t (v) + "\\2",
-                    s)
-    for id in ly_context_id_re.findall (s):
-        s = re.sub (r'(\s+|")%s(\s+|")' % id,
-                    "\\1" + t (id) + "\\2",
-                    s)
+    if langdefs.LANGDICT[document_language].enable_ly_identifier_l10n:
+        for v in ly_var_def_re.findall (s):
+            s = re.sub (r"(?m)(^|[' \\#])%s([^a-zA-Z])" % v,
+                        "\\1" + t (v) + "\\2",
+                        s)
+        for id in ly_context_id_re.findall (s):
+            s = re.sub (r'(\s+|")%s(\s+|")' % id,
+                        "\\1" + t (id) + "\\2",
+                        s)
     return s
 
 texinfo_lang_re = re.compile ('(?m)^@documentlanguage (.*?)( |$)')
@@ -1475,9 +1476,9 @@ class LilypondSnippet (Snippet):
             doctitle = base + '.doctitle'
             translated_doctitle = doctitle + document_language
             if os.path.exists (translated_doctitle):
-                str += '@lydoctitle %s\n' % open (translated_doctitle).read ()
+                str += '@lydoctitle %s\n\n' % open (translated_doctitle).read ()
             elif os.path.exists (doctitle):
-                str += '@lydoctitle %s\n' % open (doctitle).read ()
+                str += '@lydoctitle %s\n\n' % open (doctitle).read ()
         if TEXIDOC in self.option_dict:
             texidoc = base + '.texidoc'
             translated_texidoc = texidoc + document_language