]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'master' of ssh://kainhofer@git.sv.gnu.org/srv/git/lilypond
authorReinhold Kainhofer <reinhold@kainhofer.com>
Sun, 10 Feb 2008 18:10:33 +0000 (19:10 +0100)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Sun, 10 Feb 2008 18:10:33 +0000 (19:10 +0100)
19 files changed:
.gitignore
Documentation/de/index.html.in
Documentation/user/GNUmakefile
Documentation/user/changing-defaults.itely
Documentation/user/fundamental.itely
Documentation/user/introduction.itely
Documentation/user/lilypond.tely
Documentation/user/macros.itexi
Documentation/user/tweaks.itely
buildscripts/www_post.py
make/lilypond-vars.make
python/convertrules.py
python/musicexp.py
python/musicxml.py
scripts/lilypond-book.py
scripts/musicxml2ly.py
stepmake/stepmake/metafont-rules.make
stepmake/stepmake/texinfo-rules.make
stepmake/stepmake/texinfo-vars.make

index 346f815f15ae53653e341ae799c5374f731183d2..78ddd2aade5ee09961d04eb11cc570b259b134f3 100644 (file)
@@ -70,3 +70,4 @@ out-test
 pats
 tags
 test-output-distance
+Documentation/user/lilypond
index 5e1565f95d5f0a15ae45e8806771db9894612a8b..7416fb4050899757c51d9af7815871b5af1dd8a6 100644 (file)
        <br>
        <strong>@DATE@</strong>
       </p>
+      
+      <p>
+      <strong>Achtung:</strong> Diese &Uuml;bersetzung befindet sich noch in der Entwicklung, <br>
+      die englische Version (Link unten auf der Seite) bietet die
+      vollst&auml;ndige Fassung der Dokumentation.
+      </p>
     </div>
 
     <table align="center">
index dfa4342c9ecffeb17db89991f15369ac5f278e80..a5b0b864b536cc70c6b3519c2839a68db7c7cee8 100644 (file)
@@ -21,12 +21,17 @@ HTML_FILES = $(TELY_FILES:%.tely=$(outdir)/%-big-page.html)\
 
 # todo: add latex.
 PDF_FILES = $(TELY_FILES:%.tely=$(outdir)/%.pdf)
+# this prevents aux files from being reused for translated docs
+TEXI2PDF_FLAGS = --tidy
 
 INFO_DOCS = lilypond lilypond-internals music-glossary lilypond-program lilypond-learning
 INFO_FILES = $(INFO_DOCS:%=$(outdir)/%.info)
 
+ifeq ($(out),www)
+INFO_IMAGES_DIR = lilypond
+endif
+
 STEPMAKE_TEMPLATES=tex texinfo omf documentation
-#TEXI2DVI_FLAGS = -E
 OMF_FILES += $(outdir)/lilypond-internals.html.omf
 
 LOCALSTEPMAKE_TEMPLATES=lilypond ly
@@ -48,13 +53,27 @@ xml: $(outdir)/lilypond/lilypond.xml $(outdir)/lilypond-internals/lilypond-inter
 ifeq ($(out),www)
 
 # This builds all .info targets with images, in out-www.
-# Viewawble with a recent Emacs, doing: M-x info out-www/lilypond.info
+# Viewable with a recent Emacs, doing: C-u C-h i out-www/lilypond.info
 
 # Cancel the special, non-image info generation rule that skips images:
 $(outdir)/%.info: $(outdir)/%.nexi
 
+# "makeinfo --info" MUST be able to read PNGs from CWD for info images
+# to work, hence lilypond/ -> $(outdir)/ symlink.
+# $(outdir)/lilypond/*.png symlinks are only needed to view
+# out-www/*.info with Emacs -- HTML docs no longer need these
+# symlinks, see replace_symlinks_urls in
+# buildscripts/add_html_footer.py.
+$(outdir)/%.info: lilypond
+lilypond: $(OUT_PNG_IMAGES)
+       rm -f lilypond
+       ln -s $(outdir) lilypond
+       mkdir -p $(outdir)/lilypond
+       find $(outdir)/lilypond/ -name '*'.png | xargs rm -f
+       (cd $(outdir)/lilypond/ ; ln -sf ../*.png . )
+
 local-install-info: info
-       -$(INSTALL) -d $(DESTDIR)$(package_infodir)
+       -$(INSTALL) -d $(DESTDIR)$(infodir)
 ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
 ## Can not have absolute symlinks because some binary packages build schemes
 ## install files in nonstandard root.  Best we can do is to notify the
@@ -67,25 +86,27 @@ ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
        @echo
        @echo "For images in the INFO docs to work, do: "
        @echo
-       @echo "    (cd $(package_infodir) && ln -sf ../../doc/lilypond/Documentation/user/*png .)"
+       @echo "    (cd $(infodir) && ln -sfT ../doc/lilypond/html/Documentation/user lilypond)"
        @echo "or add something like that to the postinstall script."
        @echo
 else # installing directly into standard /usr/...
-       -$(INSTALL) -d $(DESTDIR)$(package_infodir)
+       -$(INSTALL) -d $(DESTDIR)$(infodir)
        -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond.info
        -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-program.info
        -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-learning.info
+       -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-internals.info
+       -install-info --remove --info-dir=$(infodir) $(outdir)/music-glossary.info
        install-info --info-dir=$(infodir) $(outdir)/lilypond.info
-       (cd $(package_infodir) && ln -sf $(webdir)/Documentation/user/*png .)
+       cd $(infodir) && ln -sfT $(webdir)/Documentation/user lilypond
 endif # installing directly into standard /usr/...
 
 local-uninstall-WWW:
-       rm -f $(package_infodir)/*.png
+       rm -f $(infodir)/lilypond
 
 else # out!=www
 
 # Cancel the default info generation rule that generates images:
-$(outdir)/%.info: $(outdir)/%.texi
+$(outdir)/%.info: $(outdir)/%.texi
 
 local-install-info: info
        -$(INSTALL) -d $(DESTDIR)$(package_infodir)
@@ -106,10 +127,12 @@ ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
        @echo "and read the extra instructions."
        @echo
 else # installing directly into standard /usr/...
-       -$(INSTALL) -d $(DESTDIR)$(package_infodir)
+       -$(INSTALL) -d $(DESTDIR)$(infodir)
        -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond.info
        -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-program.info
        -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-learning.info
+       -install-info --remove --info-dir=$(infodir) $(outdir)/lilypond-internals.info
+       -install-info --remove --info-dir=$(infodir) $(outdir)/music-glossary.info
        install-info --info-dir=$(infodir) $(outdir)/lilypond.info
        @echo
        @echo "***************************************************************"
@@ -128,12 +151,13 @@ local-uninstall-WWW: local-uninstall-info
 
 default:
 
+local-clean:
+       rm -f lilypond
 
 local-help: extra-local-help
 
 extra-local-help:
        @echo -e "\
-  dvi         update dvi documents\n\
   info        update info pages\n\
   ps          update PostScript documents\n\
   xml        update Docbook xml documentation\n\
@@ -145,82 +169,20 @@ $(outdir)/lilypond.texi: $(outdir)/lilypond-internals.texi
 $(outdir)/lilypond.nexi: $(outdir)/lilypond-internals.texi
 
 #
-# The split user manual
+# Split manuals in HTML
 #
-$(outdir)/lilypond/index.html: $(outdir)/lilypond.texi $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
-       mkdir -p $(dir $@)
-       $(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
-# we /might/ switch to texi2html if it can be fixed:
-#      echo "*************************************"
-#      echo $<
-#      cd $(outdir)
-#      texi2html --output=$(outdir)/lilypond --css-include=$(top-src-dir)/Documentation/texinfo.css $<
-       find $(outdir)/lilypond/ -name '*'.png -o -name '*'.ly | xargs rm -f
-# symbolic links to save space
-       (cd $(outdir)/lilypond/ ; ln -sf ../*.png ../*.ly . )
+$(outdir)/lilypond/index.html: $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
+$(outdir)/lilypond-program/index.html: $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
+$(outdir)/lilypond-learning/index.html: $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
+$(outdir)/music-glossary/index.html: $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
 
-#
-# One big page user manual
-#
-$(outdir)/lilypond-big-page.html: $(outdir)/lilypond.texi $(OUT_PNG_IMAGES)
-       $(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split -D bigpage --no-headers $<
 
 #
-# The split program usage
+# Manuals in one big HTML page
 #
-$(outdir)/lilypond-program/index.html: $(outdir)/lilypond-program.texi $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
-       mkdir -p $(dir $@)
-       $(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond-program --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
-       find $(outdir)/lilypond-program/ -name '*'.png -o -name '*'.ly | xargs rm -f
-# symbolic links to save space
-       (cd $(outdir)/lilypond-program/ ; ln -sf ../*.png ../*.ly . )
-
-#
-# The Learning Manual
-#
-$(outdir)/lilypond-learning/index.html: $(outdir)/lilypond-learning.texi $(OUT_PNG_IMAGES) $(OUT_EPS_IMAGES)
-       mkdir -p $(dir $@)
-       $(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond-learning --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
-       find $(outdir)/lilypond-learning/ -name '*'.png -o -name '*'.ly | xargs rm -f
-# symbolic links to save space
-       (cd $(outdir)/lilypond-learning/ ; ln -sf ../*.png ../*.ly . )
-
-
-#
-# One big page program usage
-#
-$(outdir)/lilypond-program-big-page.html: $(outdir)/lilypond-program.texi $(OUT_PNG_IMAGES)
-       $(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split -D bigpage --no-headers $<
-
-#
-# One big page learning manual
-#
-$(outdir)/lilypond-learning-big-page.html: $(outdir)/lilypond-learning.texi $(OUT_PNG_IMAGES)
-       $(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split -D bigpage --no-headers $<
-
-
-#
-# The split internals reference
-#
-$(outdir)/lilypond-internals/index.html: $(outdir)/lilypond-internals.texi
-       mkdir -p $(dir $@)
-       $(MAKEINFO) --output=$(outdir)/lilypond-internals --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
-
-#
-# One big page internals reference
-#
-$(outdir)/lilypond-internals-big-page.html: $(outdir)/lilypond-internals.texi
-       $(MAKEINFO) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split -D bigpage --no-headers $<
-
-#
-# The split glossary
-#
-$(outdir)/music-glossary/index.html: $(outdir)/music-glossary.texi
-       mkdir -p $(dir $@)
-       $(MAKEINFO) --output=$(outdir)/music-glossary --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
-       find $(outdir)/music-glossary/ -name '*'.png -o -name '*'.ly | xargs rm -f
-# symbolic links to save space
-       (cd $(outdir)/music-glossary/ ; ln -sf ../*.png ../*.ly . )
+$(outdir)/lilypond-big-page.html: $(OUT_PNG_IMAGES)
+$(outdir)/lilypond-program-big-page.html: $(OUT_PNG_IMAGES)
+$(outdir)/lilypond-learning-big-page.html: $(OUT_PNG_IMAGES)
 
 $(outdir)/lilypond.xml: $(outdir)/lilypond.texi
        mkdir -p $(dir $@)
@@ -230,11 +192,8 @@ $(outdir)/lilypond-internals/lilypond-internals.xml: $(outdir)/lilypond-internal
        mkdir -p $(dir $@)
        $(MAKEINFO) --output=$(outdir)/lilypond-internals --docbook $<
 
-$(outdir)/lilypond.pdf: $(OUT_PDF_IMAGES) $(OUT_PNG_IMAGES)
-
-$(outdir)/lilypond-program.pdf: $(OUT_PDF_IMAGES) $(OUT_PNG_IMAGES)
-
-$(outdir)/lilypond-learning.pdf: $(OUT_PDF_IMAGES) $(OUT_PNG_IMAGES)
+$(outdir)/lilypond.pdf $(outdir)/lilypond-program.pdf: $(OUT_PDF_IMAGES) $(OUT_PNG_IMAGES)
+$(outdir)/lilypond-learning.pdf $(outdir)/music-glossary.pdf: $(OUT_PDF_IMAGES) $(OUT_PNG_IMAGES)
 
 $(outdir)/%.png: %.png
        convert -depth 8 -geometry 50x50% $< $@
@@ -263,32 +222,13 @@ $(outdir)/source:
        @rm -f $(@)
        ln -sf ../../ $(@)
 
-$(outdir)/lilypond/source:
-       @rm -f $(@)
-       mkdir -p $(outdir)/lilypond
-       ln -sf ../../../ $(@)
-
-$(outdir)/music-glossary/source:
-       @rm -f $(@)
-       mkdir -p $(outdir)/music-glossary
-       ln -sf ../../../ $(@)
-
-$(outdir)/lilypond-program/source:
+$(outdir)/%/source:
        @rm -f $(@)
-       mkdir -p $(outdir)/lilypond-program
-       ln -sf ../../../ $(@)
-
-$(outdir)/lilypond-learning/source:
-       @rm -f $(@)
-       mkdir -p $(outdir)/lilypond-learning
+       mkdir -p $(dir $@)
        ln -sf ../../../ $(@)
 
 local-WWW: $(HTML_FILES) $(DEEP_HTML_FILES)\
- $(datafiles) $(PDF_FILES) $(source-links) info info-dir
-
-info-dir:
-       $(SHELL) $(buildscript-dir)/install-info-html.sh --dir=$(outdir) lilypond lilypond-internals music-glossary lilypond-program lilypond-learning
-
+ $(datafiles) $(PDF_FILES) $(source-links) info
 
 $(outdir)/%.bib: %.bib
        ln -f $< $@
@@ -298,11 +238,9 @@ $(outdir)/%.bib: %.bib
 $(top-build-dir)/mf/$(outconfbase)/feta16list.ly:
        $(MAKE) -C $(top-src-dir)/mf
 
-$(outdir)/lilypond.texi: $(ITELY_FILES) $(ITEXI_FILES)
-$(outdir)/lilypond.nexi: $(ITELY_FILES) $(ITEXI_FILES)
+$(outdir)/lilypond.texi $(outdir)/lilypond-program.texi $(outdir)/lilypond-learning.texi: $(ITELY_FILES) $(ITEXI_FILES)
+$(outdir)/lilypond.nexi $(outdir)/lilypond-program.nexi $(outdir)/lilypond-learning.nexi: $(ITELY_FILES) $(ITEXI_FILES)
 
-# Prevent building music-glossary.texi from default target
-$(outdir)/music-glossary.nexi:
 
 # Rules for the automatically generated documentation
 
index 9e379f688a1f99ffa63426ef77033c8579ef62e2..d69c86d1c7a1675c21da22fc1996664906820f4a 100644 (file)
@@ -118,7 +118,7 @@ example: a @code{Staff} can contain many @code{Voice}s, and a
 @code{Score} can contain many @code{Staff} contexts.
 
 @quotation
-@image{context-example,5cm,,}
+@sourceimage{context-example,5cm,,}
 @end quotation
 
 Each context has the responsibility for enforcing some notation rules,
index d25e7ffe4e4a0ff888978c803a5add5903731a4e..1e56b0e4f250f3d2d11292d75891b65d8fdbf93f 100644 (file)
@@ -1195,7 +1195,7 @@ For example: a @code{Staff} context can contain many
 contain many @code{Staff} contexts.
 
 @quotation
-@image{context-example,5cm,,}
+@sourceimage{context-example,5cm,,}
 @end quotation
 
 Each context has the responsibility for enforcing some notation rules,
index bf0dcb70b70d2351d8854bbd06ee3740e77185b0..c6761089033ce9623a1d49e7c83cd751a981aa55 100644 (file)
@@ -87,9 +87,8 @@ computer edition.
 @end ifnottex
 @end ifnotinfo
 @ifinfo
-@c workaround for makeinfo-4.6: line breaks and multi-column cookies
-@image{henle-flat-bw,,,png} @image{baer-flat-bw,,,png}
-@image{lily-flat-bw,,,png}
+@image{lilypond/henle-flat-bw,,,png} @image{lilypond/baer-flat-bw,,,png}
+@image{lilypond/lily-flat-bw,,,png}
 @end ifinfo
 
 @item @tab
index dc8a5298337e7680cbb3085a36d011719214fe2c..0631951f5ae237ab2a5e22c3f9c1008e4eea1073 100644 (file)
@@ -23,7 +23,7 @@
 @ignore
 Distributions will want to install lilypond.info in postinstall, doing:
 
-    install-info --info-dir=/usr/share/info out/lilypond.info
+    install-info --info-dir=/usr/share/info out[-www]/lilypond.info
 
   * Prepend GNU for dir, must be unique.
 
@@ -38,16 +38,21 @@ Distributions will want to install lilypond.info in postinstall, doing:
 
 
 @c
-@c Info files are installed in subdirectories to allow images to be present. 
-@c 
-@dircategory LilyPond
+@c Info files are no longer installed in a subdirectory, images are
+@c expected to be found in lilypond/ subdirectory.
+@dircategory GNU LilyPond --- the music typesetter
 @direntry
-* LilyPond: (lilypond/lilypond).           The GNU music typesetter.
-* abc2ly: (lilypond/lilypond-program)Invoking abc2ly.          Importing ABC.      
-* convert-ly: (lilypond/lilypond-program)Invoking convert-ly.  Older LilyPond versions.
-* etf2ly: (lilypond/lilypond-program)Invoking etf2ly.          Importing Finale.
-* lilypond-book: (lilypond/lilypond-program)LilyPond-book.     Integrating text and music.
-* midi2ly: (lilypond/lilypond-program)Invoking midi2ly.        Importing MIDI.
+* LilyPond Learning Manual: (lilypond-learning).  Start here.
+* Music Glossary: (music-glossary).               For non-English users.
+* LilyPond: (lilypond).                           LilyPond Notation Reference.
+* LilyPond Internals Reference: (lilypond-internals).  Definitions for tweaking.
+* LilyPond Application Usage: (lilypond-program). Installing and running applications.
+* abc2ly: (lilypond-program)Invoking abc2ly.      Importing ABC.      
+* convert-ly: (lilypond-program)Updating files with convert-ly. Older LilyPond versions.
+* etf2ly: (lilypond-program)Invoking etf2ly.      Importing Finale.
+* lilypond-book: (lilypond-program)LilyPond-book. Integrating text and music.
+* midi2ly: (lilypond-program)Invoking midi2ly.    Importing MIDI.
+* musicxml2ly: (lilypond-program)Invoking musicxml2ly.  Importing MusicXML.
 @end direntry
 
 @c don't remove this comment.
@@ -203,11 +208,15 @@ Appendices
 @node LilyPond command index
 @appendix LilyPond command index
 
+This index does blah blah blah.
+
 @printindex ky
 
 @node LilyPond index
 @appendix LilyPond index
 
+In contrast, this index does blaz blaz blaz.
+
 @printindex cp
 
 @bye
index c29ba57026d1fe43c8a4cf04491eff529595b2e7..aff1155e74373a6045b365b6e7e2fa293e06a77d 100644 (file)
 @end quotation
 @end macro
 
-@c TODO: define different output for info
+@ifnotinfo
 @macro notation{TEXT}
 @var{\TEXT\}
 @end macro
+@end ifnotinfo
 
+@ifinfo
+@macro notation{TEXT}
+\TEXT\
+@end macro
+@end ifinfo
 
-
-@c   **** Headings in a doc subsection ****
-
-@c not really a heading, but...
 @macro smallspace
 @sp 1
 @end macro
 
+
+@c   **** Displaying images not generated by lilypond-book
+
+@c current installation setup of Info docs requires that all images are
+@c expected to be found in lilypond/ subdirectory.  lilypond-book already
+@c generates proper @image commands for images of music; these macros
+@c definitions do the same for other images.
+
+@ifnotinfo
+@macro sourceimage{FILENAME,WIDTH,HEIGHT,ALTTEXT}
+@image{\FILENAME\,\WIDTH\,\HEIGHT\,\ALTTEXT\}
+@end macro
+@end ifnotinfo
+
+@ifinfo
+@macro sourceimage{FILENAME,WIDTH,HEIGHT,ALTTEXT}
+@image{lilypond/\FILENAME\,\WIDTH\,\HEIGHT\,\ALTTEXT\}
+@end macro
+@end ifinfo
+
+
+@c   **** Headings in a doc subsection ****
+
 @c obsolete; being removed.
 @macro refcommands
 @noindent
 @ifhtml
 @c ***** HTML *****
 
-@c makeinfo-4.7 encodes html names, which means that nodes that
-@c contain nonalphanum characters will be broken links on the website.
-@c @uref{../lilypond-internals/\TEXT\.html,\TEXT\}@c
-@c @inforef{} adds ``See'' to the sentence, which is annoying, but
-@c better than a broken link.
-@c @inforef{\TEXT\,,lilypond-internals}@c
-@c using @ref without punctuation is OK without for formats other than info
-
 @ifset bigpage
 
 @macro internalsref{TEXT}
index 19eb1ef6f5ea77331f5a1934f4b10bd393bdf2ee..7698e32f74beec66a2de099a7658c1f7474f291c 100644 (file)
@@ -2082,7 +2082,8 @@ should be used to move them.
 Let's now see how the properties in the previous section can
 help to resolve overlapping notation.
 
-@subheading @code{padding} property
+@c FIXME: formatting
+@subheading @code{padding}
 @cindex padding property
 
 The @code{padding} property can be set to increase
@@ -2119,7 +2120,7 @@ their @code{outside-staff-priority}, then that object and all
 objects outside it are moved.
  
 
-@subheading left-padding and right-padding properties
+@subheading @code{left-padding} and @code{right-padding}
 @cindex left-padding property
 @cindex right-padding property
 
index 8d7899ef0ebf7de524234f0c27d235919101d5e7..26cd613e4cdad36764c976bb424b124bc1638b08 100644 (file)
@@ -17,19 +17,23 @@ outdir = os.path.normpath (outdir)
 doc_dirs = ['input', 'Documentation', outdir]
 target_pattern = os.path.join (outdir, '%s-root')
 
+# these redirection pages allow to go back to the documentation index
+# from HTML manuals/snippets page
 static_files = {
     os.path.join (outdir, 'index.html'):
-    '''<META HTTP-EQUIV="refresh" content="0;URL=Documentation/index.html">
+        '''<META HTTP-EQUIV="refresh" content="0;URL=Documentation/index.html">
 <html><body>Redirecting to the documentation index...</body></html>\n''',
     os.path.join (outdir, 'VERSION'):
-    package_version + '\n' }
+        package_version + '\n',
+    os.path.join ('input', 'lsr', outdir, 'index.html'):
+        '''<META HTTP-EQUIV="refresh" content="0;URL=../../index.html">
+<html><body>Redirecting to the documentation index...</body></html>\n'''
+    }
 
 import langdefs
 
-# ugly hack: the following overwrites HTML Info dir with a link to
-# the (more useful) documentation index
 for l in langdefs.LANGUAGES:
-    static_files[os.path.join ('Documentation/user', outdir, l.file_name ('index', '.html'))] = \
+    static_files[os.path.join ('Documentation', 'user', outdir, l.file_name ('index', '.html'))] = \
                                   '<META HTTP-EQUIV="refresh" content="0;URL=../' + l.file_name ('index', '.html') + \
                                   '">\n<html><body>Redirecting to the documentation index...</body></html>\n'
 
@@ -45,9 +49,9 @@ sys.stderr.write ("Mirrorring...\n")
 dirs, symlinks, files = mirrortree.walk_tree (
     tree_roots = doc_dirs,
     process_dirs = outdir,
-    exclude_dirs = '(^|/)(' + '|'.join ([l.code for l in langdefs.LANGUAGES]) + r'|po|out|\w*?-root)(/|$)',
+    exclude_dirs = '(^|/)(' + '|'.join ([l.code for l in langdefs.LANGUAGES]) + r'|po|out|.*?[.]t2d|\w*?-root)(/|$)',
     find_files = r'.*?\.(?:midi|html|pdf|png|txt|ly|signature)$|VERSION',
-    exclude_files = r'lily-[0-9a-f]+.*\.pdf')
+    exclude_files = r'lily-[0-9a-f]+.*\.(pdf|txt)')
 
 # actual mirrorring stuff
 html_files = []
index b9f509dc862c9f77aadc8480a1a930f6c212daaa..e7abca9b7c4755571e6d68a69ca4663cedd04954 100644 (file)
@@ -31,7 +31,8 @@ ANTI_ALIAS_FACTOR=2
 LILYPOND_JOBS=$(if $(CPU_COUNT),-djob-count=$(CPU_COUNT),)
 LILYPOND_BOOK_LILYPOND_FLAGS=-dbackend=eps --formats=ps,png,pdf $(LILYPOND_JOBS) -dinclude-eps-fonts -dgs-load-fonts --header=texidoc -I $(top-src-dir)/input/manual -dcheck-internal-types -ddump-signatures -danti-alias-factor=$(ANTI_ALIAS_FACTOR)
 LILYPOND_BOOK_VERBOSE = --verbose
-LILYPOND_BOOK_FLAGS = --process="$(LILYPOND_BINARY) $(LILYPOND_BOOK_LILYPOND_FLAGS)" $(LILYPOND_BOOK_VERBOSE)
+LILYPOND_BOOK_INFO_IMAGES_DIR = $(if $(INFO_IMAGES_DIR),--info-images-dir=$(INFO_IMAGES_DIR),)
+LILYPOND_BOOK_FLAGS = --process="$(LILYPOND_BINARY) $(LILYPOND_BOOK_LILYPOND_FLAGS)" $(LILYPOND_BOOK_VERBOSE) $(LILYPOND_BOOK_INFO_IMAGES_DIR)
 TEXINPUTS=$(top-src-dir)/tex/::
 export TEXINPUTS
 
index 88ae549d0bc8bcce3158c77573d291fb8f529ba9..8c29dc99cfc928de5dc8cc1052e8ecaef7ddb244 100644 (file)
@@ -18,31 +18,34 @@ class FatalConversionError:
     pass
 
 conversions = []
-error_file = sys.stderr 
+stderr_write = lilylib.stderr_write
+
+def warning (str):
+    stderr_write (_ ("warning: %s") % str)
 
 def conv(str):
     if re.search ('\\\\multi', str):
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % "\\multi")
-       error_file.write ('\n')
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % "\\multi")
+       stderr_write ('\n')
     return str
 
-conversions.append (((0,1,9), conv, '\\header { key = concat + with + operator }'))
+conversions.append (((0,1,9), conv, _ ('\\header { key = concat + with + operator }')))
 
 
 def conv (str):
     if re.search ('\\\\octave', str):
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % "\\octave")
-       error_file.write ('\n')
-       error_file.write (UPDATE_MANUALLY)
-       error_file.write ('\n')
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % "\\octave")
+       stderr_write ('\n')
+       stderr_write (UPDATE_MANUALLY)
+       stderr_write ('\n')
     #  raise FatalConversionError ()
 
     return str
 
 conversions.append ((
-       ((0,1,19), conv, 'deprecated \\octave; cannot convert automatically')))
+       ((0,1,19), conv, _ ('deprecated %s') % '\\octave')))
 
 
 
@@ -55,7 +58,7 @@ def conv (str):
     return str
 
 conversions.append ((
-       ((0,1,20), conv, 'deprecated \\textstyle, new \\key syntax')))
+       ((0,1,20), conv, _ ('deprecated \\textstyle, new \\key syntax'))))
 
 
 
@@ -74,7 +77,7 @@ def conv (str):
     return str
 
 conversions.append ((
-       ((1,0,0), conv, '0.1.21 -> 1.0.0 ')))
+       ((1,0,0), conv, _ ("bump version for release"))))
 
 
 
@@ -92,12 +95,12 @@ conversions.append ((
 
 def conv(str):
     if re.search ('\\\\header', str):
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % _ ("new \\header format"))
-       error_file.write ('\n')
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % _ ("new \\header format"))
+       stderr_write ('\n')
     return str
 
-conversions.append (((1,0,2), conv, '\\header { key = concat + with + operator }'))
+conversions.append (((1,0,2), conv, _ ('\\header { key = concat + with + operator }')))
 
 
 def conv(str):
@@ -126,9 +129,9 @@ conversions.append (((1,0,5), conv, 'ChoireStaff -> ChoirStaff'))
 
 def conv(str):
     if re.search ('[a-zA-Z]+ = *\\translator',str):
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % _ ("\\translator syntax"))
-       error_file.write ('\n')
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % _ ("\\translator syntax"))
+       stderr_write ('\n')
     #  raise FatalConversionError ()
     return str
 
@@ -198,14 +201,14 @@ conversions.append (((1,0,16), conv, '\\type -> \\context, textstyle -> textStyl
 
 def conv(str):
     if re.search ('\\\\repeat',str):
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % "\\repeat")
-       error_file.write ('\n')
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % "\\repeat")
+       stderr_write ('\n')
     #  raise FatalConversionError ()
     return str
 
 conversions.append (((1,0,18), conv,
-                    '\\repeat NUM Music Alternative -> \\repeat FOLDSTR Music Alternative'))
+                    _ ('\\repeat NUM Music Alternative -> \\repeat FOLDSTR Music Alternative')))
 
 
 def conv(str):
@@ -248,7 +251,7 @@ def conv(str):
     return str
 
 conversions.append (((1,1,52), conv,
-       'deprecate \\grouping'))
+       _ ('deprecate %s') % '\\grouping'))
 
 
 
@@ -348,14 +351,14 @@ conversions.append (((1,3,18), conv, 'staffLineLeading -> staffSpace'))
 
 def conv(str):
     if re.search ('\\\\repetitions',str):
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % "\\repetitions")
-       error_file.write ('\n')
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % "\\repetitions")
+       stderr_write ('\n')
     #  raise FatalConversionError ()
     return str
 
 conversions.append (((1,3,23), conv,
-       '\\\\repetitions feature dropped'))
+       _ ('deprecate %s ') % '\\repetitions'))
 
 
 
@@ -377,9 +380,9 @@ def conv (str):
     str = re.sub ("\\\\musicalpitch *{([0-9 -]+)}",
                  "\\\\musicalpitch #'(\\1)", str)
     if re.search ('\\\\notenames',str):
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % _ ("new \\notenames format"))
-       error_file.write ('\n')
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % _ ("new \\notenames format"))
+       stderr_write ('\n')
     return str
 
 conversions.append (((1,3,38), conv, '\musicalpitch { a b c } -> #\'(a b c)'))
@@ -397,9 +400,9 @@ conversions.append (((1,3,39), conv, '\\key A ;  ->\\key a;'))
 
 def conv (str):
     if re.search ('\\[:',str):
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % _ ("new tremolo format"))
-       error_file.write ('\n')
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % _ ("new tremolo format"))
+       stderr_write ('\n')
     return str
 
 conversions.append (((1,3,41), conv,
@@ -411,7 +414,7 @@ def conv (str):
     return str
 
 conversions.append (((1,3,42), conv,
-       'Staff_margin_engraver deprecated, use Instrument_name_engraver'))
+       _ ('Staff_margin_engraver deprecated, use Instrument_name_engraver')))
 
 
 def conv (str):
@@ -424,9 +427,9 @@ conversions.append (((1,3,49), conv,
 
 def conv (str):
     if re.search ('\\\\keysignature', str):
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % _ ("new tremolo format"))
-       error_file.write ('\n')
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % '\\keysignature')
+       stderr_write ('\n')
     return str
 
 
@@ -530,16 +533,16 @@ def conv (str):
     return str
 
 conversions.append (((1,3,93), conv,
-       'property definiton case (eg. onevoice -> oneVoice)'))
+       _ ('change property definiton case (eg. onevoice -> oneVoice)')))
 
 
 
 def conv (str):
     str = re.sub ('ChordNames*', 'ChordNames', str)
     if re.search ('\\\\textscript "[^"]* *"[^"]*"', str):
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % _ ("new \\textscript markup text"))
-       error_file.write ('\n')
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % _ ("new \\textscript markup text"))
+       stderr_write ('\n')
 
     str = re.sub ('\\textscript +("[^"]*")', '\\textscript #\\1', str)
 
@@ -632,7 +635,7 @@ def conv (str):
     str = re.sub ('\n([^ \t\n]+)[ \t]*= *', regularize_assignment, str)
     return str
 
-conversions.append (((1,3,117), conv, 'identifier names: $!foo_bar_123 -> xfooBarABC'))
+conversions.append (((1,3,117), conv, _ ('identifier names: %s') % '$!foo_bar_123 -> xfooBarABC'))
 
 
 
@@ -673,7 +676,7 @@ def conv (str):
     str = re.sub ('point-and-click +#t', 'point-and-click line-column-location', str)
     return str
 
-conversions.append (((1,3,138), conv, 'point-and-click argument changed to procedure.'))
+conversions.append (((1,3,138), conv, _ ('point-and-click argument changed to procedure.')))
 
 
 def conv (str):
@@ -733,7 +736,7 @@ def conv (str):
     str = re.sub ("([^ \t;#]);", "\\1", str)
 
     return str
-conversions.append (((1,3,146), conv, 'semicolons removed'))
+conversions.append (((1,3,146), conv, _('semicolons removed')))
 
 
 def conv (str):
@@ -789,7 +792,7 @@ def conv (str):
     return str
 
 # 40 ?
-conversions.append (((1,5,40), conv, 'breakAlignOrder property names'))
+conversions.append (((1,5,40), conv, _ ('%s property names') % 'breakAlignOrder'))
 
 
 
@@ -822,7 +825,7 @@ def conv (str):
     str = re.sub ('textNonEmpty *= *##f', "TextScript \\set #'no-spacing-rods = ##t", str)
     return str
 
-conversions.append (((1,5,58), conv, 'deprecate textNonEmpty'))
+conversions.append (((1,5,58), conv, _ ('deprecate %s') % 'textNonEmpty'))
 
 
 
@@ -852,14 +855,14 @@ conversions.append (((1,5,62), conv,
 def conv (str):
     if re.search (r'\addlyrics',str) \
           and re.search ('automaticMelismata', str)  == None:
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % "automaticMelismata; turned on by default since 1.5.67.")
-       error_file.write ('\n')
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % "automaticMelismata; turned on by default since 1.5.67.")
+       stderr_write ('\n')
        raise FatalConversionError ()
     return str
 
 conversions.append (((1,5,67), conv,
-                    'automaticMelismata turned on by default'))
+                    _ ('automaticMelismata turned on by default')))
 
 
 def conv (str):
@@ -1113,19 +1116,19 @@ conversions.append (((1,7,18), conv,
 
 def conv(str):
     if re.search( r'\\GraceContext', str):
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % "GraceContext")
-       error_file.write (FROM_TO \
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % "GraceContext")
+       stderr_write (FROM_TO \
                          % ("GraceContext", "#(add-to-grace-init .. )"))
-       error_file.write ('\n')
-       error_file.write (UPDATE_MANUALLY)
-       error_file.write ('\n')
+       stderr_write ('\n')
+       stderr_write (UPDATE_MANUALLY)
+       stderr_write ('\n')
        raise FatalConversionError ()
 
     str = re.sub ('HaraKiriStaffContext', 'RemoveEmptyStaffContext', str)
     return str
 
-conversions.append (((1,7,19), conv,"remove GraceContext"))
+conversions.append (((1,7,19), conv, _ ("remove %s") % "GraceContext"))
 
 
 
@@ -1157,17 +1160,17 @@ conversions.append (((1,7,23), conv,"barNonAuto -> automaticBars"))
 
 def conv(str):
     if re.search( r'-(start|stop)Cluster', str):
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % _ ("cluster syntax"))
-       error_file.write ('\n')
-       error_file.write (UPDATE_MANUALLY)
-       error_file.write ('\n')
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % _ ("cluster syntax"))
+       stderr_write ('\n')
+       stderr_write (UPDATE_MANUALLY)
+       stderr_write ('\n')
 
        raise FatalConversionError ()
 
     return str
 
-conversions.append (((1,7,24), conv,"cluster syntax"))
+conversions.append (((1,7,24), conv, _ ("cluster syntax")))
 
 
 def conv(str):
@@ -1176,7 +1179,7 @@ def conv(str):
     str = re.sub (r"\\property *Staff\.(Sustain|Sostenuto|UnaCorda)Pedal *\\revert *#'pedal-type", '', str)
     return str
 
-conversions.append (((1,7,28), conv,"new Pedal style syntax"))
+conversions.append (((1,7,28), conv, _ ("new Pedal style syntax")))
 
 
 
@@ -1445,17 +1448,17 @@ def conv (str):
 
     return str
 
-conversions.append (((1,9,0), conv, """New relative mode,
-Postfix articulations, new text markup syntax, new chord syntax."""))
+conversions.append (((1,9,0), conv, _ ("""New relative mode,
+Postfix articulations, new text markup syntax, new chord syntax.""")))
 
 
 def conv (str):
     if re.search ("font-style",str):
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % "font-style")
-       error_file.write ('\n')
-       error_file.write (UPDATE_MANUALLY)
-       error_file.write ('\n')
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % "font-style")
+       stderr_write ('\n')
+       stderr_write (UPDATE_MANUALLY)
+       stderr_write ('\n')
 
        raise FatalConversionError ()
 
@@ -1469,7 +1472,7 @@ def conv (str):
     str = re.sub (r'@\\markup', r'-\\markup', str)
     return str
 
-conversions.append (((1,9,1), conv, """Remove - before articulation"""))
+conversions.append (((1,9,1), conv, _ ("""Remove - before articulation""")))
 
 def conv (str):
     str = re.sub ('ly:set-context-property',
@@ -1493,11 +1496,11 @@ def conv (str):
                  'acciaccatura', str)
 
     if re.search ("context-spec-music", str):
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % "context-spec-music")
-       error_file.write ('\n')
-       error_file.write (UPDATE_MANUALLY)
-       error_file.write ('\n')
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % "context-spec-music")
+       stderr_write ('\n')
+       stderr_write (UPDATE_MANUALLY)
+       stderr_write ('\n')
 
        raise FatalConversionError ()
 
@@ -1509,12 +1512,13 @@ def conv (str):
     return str
 
 conversions.append (((1,9,3), conv,
-                    """\\acciaccatura misspelling, fingerHorizontalDirection -> fingeringOrientations"""))
+                    (_ ("%s misspelling") % "\\acciaccatura") + \
+                         ", fingerHorizontalDirection -> fingeringOrientations"))
 
 
 def conv (str):
     if re.search ('\\figures', str):
-       error_file.write ("Warning: attempting automatic \\figures conversion.  Check results!");
+       warning (_ ("attempting automatic \\figures conversion.  Check results!"));
 
 
     def figures_replace (m):
@@ -1543,7 +1547,7 @@ def conv (str):
 
     return str
 
-conversions.append (((1,9,4), conv, 'Swap < > and << >>'))
+conversions.append (((1,9,4), conv, _ ('Swap < > and << >>')))
 
 
 def conv (str):
@@ -1555,29 +1559,29 @@ conversions.append (((1,9,5), conv, 'HaraKiriVerticalGroup -> RemoveEmptyVertica
 
 def conv (str):
     if re.search ("ly:get-font", str) :
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % "(ly:-get-font")
-       error_file.write ('\n')
-       error_file.write (FROM_TO \
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % "(ly:-get-font")
+       stderr_write ('\n')
+       stderr_write (FROM_TO \
                          % ("(ly:paper-get-font (ly:grob-get-paper foo) .. )",
                             "(ly:paper-get-font (ly:grob-get-paper foo) .. )"))
-       error_file.write (UPDATE_MANUALLY)
-       error_file.write ('\n')
+       stderr_write (UPDATE_MANUALLY)
+       stderr_write ('\n')
        raise FatalConversionError ()
 
     if re.search ("\\pitch *#", str) :
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % "\\pitch")
-       error_file.write ('\n')
-       error_file.write ("Use Scheme code to construct arbitrary note events.")
-       error_file.write ('\n')
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % "\\pitch")
+       stderr_write ('\n')
+       stderr_write (_ ("Use Scheme code to construct arbitrary note events."))
+       stderr_write ('\n')
 
        raise FatalConversionError ()
 
     return str
 
 
-conversions.append (((1,9,6), conv, 'ly:get-font deprecated.'))
+conversions.append (((1,9,6), conv, _ ('deprecate %s') % 'ly:get-font'))
 
 def conv (str):
     def sub_alteration (m):
@@ -1601,44 +1605,44 @@ def conv (str):
 
     m= re.search ("\\\\outputproperty #([^#]+)[\t\n ]*#'([^ ]+)", str)
     if m:
-       error_file.write (\
+       stderr_write (_ (\
                r"""\outputproperty found,
 Please hand-edit, using
 
   \applyoutput #(outputproperty-compatibility %s '%s <GROB PROPERTY VALUE>)
 
-as a substitution text.""" % (m.group (1), m.group (2)) )
+as a substitution text.""") % (m.group (1), m.group (2)) )
        raise FatalConversionError ()
 
     if re.search ("ly:(make-pitch|pitch-alteration)", str) \
           or re.search ("keySignature", str):
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % "pitches")
-       error_file.write ('\n')
-       error_file.write (
-           """The alteration field of Scheme pitches was multiplied by 2
-to support quarter tone accidentals.  You must update the following constructs by manually:
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % "pitches")
+       stderr_write ('\n')
+       stderr_write (
+           _ ("""The alteration field of Scheme pitches was multiplied by 2
+to support quarter tone accidentals.  You must update the following constructs manually:
 
 * calls of ly:make-pitch and ly:pitch-alteration
 * keySignature settings made with \property
-""")
+"""))
        raise FatalConversionError ()
 
     return str
 conversions.append (((1,9,7), conv,
-                    '''use symbolic constants for alterations,
-remove \\outputproperty, move ly:verbose into ly:get-option'''))
+                    _ ('''use symbolic constants for alterations,
+remove \\outputproperty, move ly:verbose into ly:get-option''')))
 
 
 def conv (str):
     if re.search ("dash-length",str):
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % "dash-length")
-       error_file.write ('\n')
-       error_file.write (FROM_TO % ("dash-length", "dash-fraction"))
-       error_file.write ('\n')
-       error_file.write (UPDATE_MANUALLY)
-       error_file.write ('\n')
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % "dash-length")
+       stderr_write ('\n')
+       stderr_write (FROM_TO % ("dash-length", "dash-fraction"))
+       stderr_write ('\n')
+       stderr_write (UPDATE_MANUALLY)
+       stderr_write ('\n')
        raise FatalConversionError ()
     return str
 
@@ -1685,7 +1689,7 @@ def conv (str):
     str = re.sub (r"\\property ([a-zA-Z]+)\s*\.\s*automaticMelismata\s*=\s*##([ft])", func, str)
     return str
 
-conversions.append (((2,1,4), conv, """removal of automaticMelismata; use melismaBusyProperties instead."""))
+conversions.append (((2,1,4), conv, _ ("""removal of automaticMelismata; use melismaBusyProperties instead.""")))
 
 
 
@@ -1784,11 +1788,11 @@ conversions.append (((2,1,16), conv, """\\musicglyph #"accidentals-NUM" -> \\sha
 def conv (str):
 
     if re.search (r'\\partcombine', str):
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % "\\partcombine")
-       error_file.write ('\n')
-       error_file.write (UPDATE_MANUALLY)
-       error_file.write ('\n')
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % "\\partcombine")
+       stderr_write ('\n')
+       stderr_write (UPDATE_MANUALLY)
+       stderr_write ('\n')
        raise FatalConversionError ()
 
     # this rule doesn't really work,
@@ -1800,7 +1804,7 @@ def conv (str):
 
     return str
 
-conversions.append (((2,1,17), conv, """\\partcombine syntax change to \\newpartcombine"""))
+conversions.append (((2,1,17), conv, _ ("\\partcombine syntax change to \\newpartcombine")))
 
 
 def conv (str):
@@ -1817,7 +1821,7 @@ conversions.append (((2,1,18), conv, """\\newpartcombine -> \\partcombine,
 
 def conv (str):
     if re.search ('include "drumpitch', str):
-       error_file.write ("Drums found. Enclose drum notes in \\drummode")
+       stderr_write (_ ("Drums found. Enclose drum notes in \\drummode"))
 
     str = re.sub (r'\\include "drumpitch-init.ly"','', str)
 
@@ -1828,14 +1832,14 @@ def conv (str):
 
 
     if re.search ('drums->paper', str):
-       error_file.write ("\nDrum notation found. Check file manually!")
+       stderr_write (_ ("\n%s found. Check file manually!\n") % _("Drum notation"))
 
     str = re.sub (r"""\\apply\s+#\(drums->paper\s+'([a-z]+)\)""",
                  r"""\property DrumStaff.drumStyleTable = #\1-style""",
                  str)
 
     if re.search ('Thread', str):
-       error_file.write ("\nThread found. Check file manually!\n");
+       stderr_write (_ ("\n%s found. Check file manually!\n") % "Thread");
 
     str = re.sub (r"""(\\once\s*)?\\property\s+Thread\s*\.\s*NoteHead\s*"""
                  + r"""\\(set|override)\s*#'style\s*=\s*#'harmonic"""
@@ -1846,7 +1850,7 @@ def conv (str):
     str = re.sub (r"""Thread""", """Voice""", str)
 
     if re.search ('\bLyrics\b', str):
-       error_file.write ("\nLyrics found. Check file manually!\n");
+       stderr_write (_ ("\n%s found. Check file manually!\n") % "Lyrics");
 
     str = re.sub (r"""LyricsVoice""", r"""L@ricsVoice""", str)
     str = re.sub (r"""\bLyrics\b""", r"""LyricsVoice""", str)
@@ -1856,8 +1860,8 @@ def conv (str):
 
     return str
 
-conversions.append (((2,1,19), conv, """Drum notation changes, Removing \\chordmodifiers, \\notenames.
-Harmonic notes. Thread context removed. Lyrics context removed."""))
+conversions.append (((2,1,19), conv, _ ("""Drum notation changes, Removing \\chordmodifiers, \\notenames.
+Harmonic notes. Thread context removed. Lyrics context removed.""")))
 
 def conv (str):
     str = re.sub (r'nonevent-skip', 'skip-music', str)
@@ -1885,8 +1889,8 @@ brew_molecule -> print
 brew-new-markup-molecule -> Text_item::print
 LyricsVoice -> Lyrics
 tupletInvisible -> TupletBracket \set #'transparent
-Grob::preset_extent removed.
-""" ))
+%s.
+""" % (_ ("remove %s") % "Grob::preset_extent")))
 
 
 def conv (str):
@@ -1913,11 +1917,11 @@ def conv (str):
     str = re.sub ('Molecule', 'Stencil', str)
     return str
 
-conversions.append (((2,1,22), conv, """new syntax for property settings:
+conversions.append (((2,1,22), conv, """%s
        \\set A.B = #C , \\unset A.B
        \\override A.B #C = #D, \\revert A.B #C
 
-"""))
+""" % _ ("new syntax for property settings:")))
 
 def conv (str):
     def subst_in_trans (match):
@@ -1950,7 +1954,8 @@ def conv (str):
 
     return str
 
-conversions.append (((2,1,23), conv, """Property setting syntax in \\translator{ }"""))
+conversions.append (((2,1,23), conv, _ ("Property setting syntax in \\translator{ }")))
+
 def conv (str):
     str = re.sub (r'music-list\?', 'ly:music-list?', str)
     str = re.sub (r'\|\s*~', '~ |', str)
@@ -1967,11 +1972,11 @@ def conv (str):
     str = re.sub (r'ly:get-broken-into', 'ly:spanner-broken-into', str)
     str = re.sub (r'Melisma_engraver', 'Melisma_translator', str)
     if re.search ("ly:get-paper-variable", str):
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % "ly:paper-get-variable")
-       error_file.write ('\n')
-       error_file.write ('use (ly:paper-lookup (ly:grob-paper ))')
-       error_file.write ('\n')
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % "ly:paper-get-variable")
+       stderr_write ('\n')
+       stderr_write (_ ('use %s') % '(ly:paper-lookup (ly:grob-paper ))')
+       stderr_write ('\n')
        raise FatalConversionError ()
 
     str = re.sub (r'\\defaultAccidentals', "#(set-accidental-style 'default)", str)
@@ -1987,7 +1992,7 @@ def conv (str):
 
     return str
 
-conversions.append (((2,1,25), conv, """Scheme grob function renaming"""))
+conversions.append (((2,1,25), conv, _ ("Scheme grob function renaming")))
 
 
 def conv (str):
@@ -2000,11 +2005,11 @@ def conv (str):
 
     return str
 
-conversions.append (((2,1,26), conv, """More Scheme function renaming"""))
+conversions.append (((2,1,26), conv, _ ("More Scheme function renaming")))
 
 def conv (str):
     def subst (m):
-       g = string.atoi (m.group (2))
+       g = int (m.group (2))
        o = g / 12
        g -= o * 12
        if g <  0:
@@ -2116,7 +2121,7 @@ def conv (str):
     return str
 
 conversions.append (((2, 2, 0), conv,
-                    '''clean up version. '''))
+                    _ ("bump version for release")))
 
 def conv (str):
     return re.sub (r'\\apply\b', r'\\applymusic', str)
@@ -2126,15 +2131,15 @@ conversions.append (((2, 3, 1), conv,
 
 def conv (str):
     if re.search ('textheight', str):
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % "textheight")
-       error_file.write ('\n')
-       error_file.write (UPDATE_MANUALLY)
-       error_file.write ('\n')
-       error_file.write (
-"""Page layout has been changed, using paper size and margins.
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % "textheight")
+       stderr_write ('\n')
+       stderr_write (UPDATE_MANUALLY)
+       stderr_write ('\n')
+       stderr_write (
+_ ("""Page layout has been changed, using paper size and margins.
 textheight is no longer used.
-""")
+"""))
     str = re.sub (r'\\OrchestralScoreContext', '\\Score', str)
     def func(m):
        if m.group(1) not in ['RemoveEmptyStaff',
@@ -2158,7 +2163,7 @@ def conv (str):
     return str
 
 conversions.append (((2, 3, 4), conv,
-                    '''remove \\notes'''))
+                    _ ('remove %s') % '\\notes'))
 
 
 
@@ -2194,7 +2199,7 @@ def conv (str):
     str = re.sub (r'\\addlyrics', r'\\oldaddlyrics', str)
     str = re.sub (r'\\newlyrics', r'\\addlyrics', str)
     if re.search (r"\\override\s*TextSpanner", str):
-       error_file.write ("\nWarning: TextSpanner has been split into DynamicTextSpanner and TextSpanner\n")
+       stderr_write ("\nWarning: TextSpanner has been split into DynamicTextSpanner and TextSpanner\n")
     return str
 
 conversions.append (((2, 3, 10), conv,
@@ -2251,8 +2256,8 @@ def conv (str):
     return str
 
 conversions.append (((2, 3, 16), conv,
-                    '''\\foo -> \\foomode (for chords, notes, etc.)
-fold \\new FooContext \\foomode into \\foo.'''))
+                    _ ('''\\foo -> \\foomode (for chords, notes, etc.)
+fold \\new FooContext \\foomode into \\foo.''')))
 
 def conv (str):
     str = re.sub (r'(slur|stem|phrasingSlur|tie|dynamic|dots|tuplet|arpeggio|)Both', r'\1Neutral', str)
@@ -2261,8 +2266,8 @@ def conv (str):
     return str
 
 conversions.append (((2, 3, 17), conv,
-                    '''\\foo -> \\foomode (for chords, notes, etc.)
-fold \\new FooContext \\foomode into \\foo.'''))
+                    '''slurBoth -> slurNeutral, stemBoth -> stemNeutral, etc.
+\\applymusic #(remove-tag 'foo) -> \\removeWithTag 'foo'''))
 
 
 def conv (str):
@@ -2277,12 +2282,12 @@ def conv (str):
     str = re.sub (r'\\paper', r'\\layout', str)
     str = re.sub (r'\\bookpaper', r'\\paper', str)
     if re.search ('paper-set-staff-size', str):
-       error_file.write ('''\nWarning: staff size should be changed at top-level
+       warning (_ ('''staff size should be changed at top-level
 with
 
   #(set-global-staff-size <STAFF-HEIGHT-IN-POINT>)
 
-''')
+'''))
 
 
     str = re.sub (r'#\(paper-set-staff-size', '%Use set-global-staff-size at toplevel\n% #(layout-set-staff-size', str)
@@ -2290,8 +2295,7 @@ with
     
 conversions.append (((2, 3, 22),
                     conv,
-                    '''paper -> layout
- bookpaper -> paper''' ))
+                    '''paper -> layout, bookpaper -> paper''' ))
 
 
 def conv (str):
@@ -2313,7 +2317,7 @@ def conv (str):
 
 conversions.append (((2, 3, 24),
                     conv,
-                    '''regularize other identifiers.'''))
+                    _ ('''regularize other identifiers''')))
 
 def conv (str):
     str = re.sub ('petrucci_c1', 'petrucci-c1', str)
@@ -2330,19 +2334,18 @@ def conv (str):
 
 conversions.append (((2, 4, 0),
                     conv,
-                    ''))
+                    _ ("bump version for release")))
 
 
 def conv (str):
     str = re.sub (r'\\quote\s+"?([a-zA-Z0-9]+)"?\s+([0-9.*/]+)',
                  r'\\quoteDuring #"\1" { \skip \2 }',
-                 str
-                 )
+                 str)
     return str
 
 conversions.append (((2, 5, 0),
                     conv,
-                    ''))
+                    '\\quote -> \\quoteDuring'))
 
 
 def conv (str):
@@ -2402,20 +2405,20 @@ def conv (str):
        if encoding == 'latin1':
            return match.group (2)
 
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % ("\\encoding: %s" % encoding))
-       error_file.write ('\n')
-       error_file.write (_ ("LilyPond source must be UTF-8"))
-       error_file.write ('\n')
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % ("\\encoding: %s" % encoding))
+       stderr_write ('\n')
+       stderr_write (_ ("LilyPond source must be UTF-8"))
+       stderr_write ('\n')
        if encoding == 'TeX':
-           error_file.write (_ ("Try the texstrings backend"))
-           error_file.write ('\n')
+           stderr_write (_ ("Try the texstrings backend"))
+           stderr_write ('\n')
        else:
-           error_file.write ( _("Do something like: %s") % \
+           stderr_write ( _("Do something like: %s") % \
                               ("recode %s..utf-8 FILE" % encoding))
-           error_file.write ('\n')
-       error_file.write (_ ("Or save as UTF-8 in your editor"))
-       error_file.write ('\n')
+           stderr_write ('\n')
+       stderr_write (_ ("Or save as UTF-8 in your editor"))
+       stderr_write ('\n')
        raise FatalConversionError ()
 
        return match.group (0)
@@ -2446,27 +2449,27 @@ def conv (str):
 
 conversions.append (((2, 5, 13),
                     conv,
-                    '\\encoding: smart recode latin1..utf-8. Remove ly:point-and-click'))
+                    _ ('\\encoding: smart recode latin1..utf-8. Remove ly:point-and-click')))
 
 
 def conv (str):
     if re.search ("ly:stencil-set-extent!", str):
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % "ly:stencil-set-extent!")
-       error_file.write ('\n')
-       error_file.write ('use (set! VAR (ly:make-stencil (ly:stencil-expr VAR) X-EXT Y-EXT))\n')
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % "ly:stencil-set-extent!")
+       stderr_write ('\n')
+       stderr_write ('use (set! VAR (ly:make-stencil (ly:stencil-expr VAR) X-EXT Y-EXT))\n')
        raise FatalConversionError ()
     if re.search ("ly:stencil-align-to!", str):
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % "ly:stencil-align-to!")
-       error_file.write ('\n')
-       error_file.write ('use (set! VAR (ly:stencil-aligned-to VAR AXIS DIR))\n')
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % "ly:stencil-align-to!")
+       stderr_write ('\n')
+       stderr_write ('use (set! VAR (ly:stencil-aligned-to VAR AXIS DIR))\n')
        raise FatalConversionError ()
     return str
 
 conversions.append (((2, 5, 17),
                     conv,
-                    'ly:stencil-set-extent! removed'))
+                    _ ('remove %s') % 'ly:stencil-set-extent!'))
 
 def conv (str):
     str = re.sub (r"ly:warn\b", 'ly:warning', str)
@@ -2478,21 +2481,21 @@ conversions.append (((2, 5, 18),
 def conv (str):
     if re.search ("(override-|revert-)auto-beam-setting", str)\
        or re.search ("autoBeamSettings", str):
-       error_file.write ('\n')
-       error_file.write (NOT_SMART % _ ("auto beam settings"))
-       error_file.write ('\n')
-       error_file.write ('''
+       stderr_write ('\n')
+       stderr_write (NOT_SMART % _ ("auto beam settings"))
+       stderr_write ('\n')
+       stderr_write (_ ('''
 Auto beam settings must now specify each interesting moment in a measure
 explicitely; 1/4 is no longer multiplied to cover moments 1/2 and 3/4 too.
-''')
-       error_file.write (UPDATE_MANUALLY)
-       error_file.write ('\n')
+'''))
+       stderr_write (UPDATE_MANUALLY)
+       stderr_write ('\n')
        raise FatalConversionError ()
     return str
 
 conversions.append (((2, 5, 21),
                     conv,
-                    'warn about auto beam settings'))
+                    _ ('warn about auto beam settings')))
 
 def conv (str):
     str = re.sub (r"unfoldrepeats", 'unfoldRepeats', str)
@@ -2500,16 +2503,13 @@ def conv (str):
     return str
 
 conversions.append (((2, 5, 25), conv,
-
-                    'unfoldrepeats -> unfoldRepeats,'
-                    + 'compressmusic -> compressMusic'))
+            'unfoldrepeats -> unfoldRepeats, compressmusic -> compressMusic'))
 
 def conv (str):
     return str
 
 conversions.append (((2, 6, 0), conv,
-
-                    'dummy rule for 2.6')) 
+                    _ ("bump version for release")))
 
 
 
@@ -2547,7 +2547,7 @@ def conv (str):
     return str
 
 conversions.append (((2, 7, 4), conv,
-                    '''keyAccidentalOrder->keyAlterationOrder'''))
+                    '''keyAccidentalOrder -> keyAlterationOrder'''))
 
 
 
@@ -2563,7 +2563,7 @@ def conv (str):
     return str
 
 conversions.append (((2, 7, 6), conv,
-                    '''Performer_group_performer -> Performer_group, Engraver_group_engraver -> Engraver_group
+                    '''Performer_group_performer -> Performer_group, Engraver_group_engraver -> Engraver_group,
 inside-slur -> avoid-slur'''))
 
 
@@ -2617,15 +2617,15 @@ def conv (str):
                subber, str)
 
     if re.search ('bar-size-procedure', str):
-       error_file.write (NOT_SMART % "bar-size-procedure")
+       stderr_write (NOT_SMART % "bar-size-procedure")
     if re.search ('space-function', str):
-       error_file.write (NOT_SMART % "space-function")
+       stderr_write (NOT_SMART % "space-function")
     if re.search ('verticalAlignmentChildCallback', str):
-       error_file.write ('verticalAlignmentChildCallback has been deprecated') 
+       stderr_write (_ ('verticalAlignmentChildCallback has been deprecated'))
     return str
 
 conversions.append (((2, 7, 13), conv,
-                    '''layout engine refactoring. [FIXME] '''))
+                    '''layout engine refactoring [FIXME]'''))
 
 
 
@@ -2649,18 +2649,18 @@ def conv (str):
     return str
 
 conversions.append (((2, 7, 14), conv,
-                    '''Remove callbacks property, deprecate XY-extent-callback. '''))
+                    _ ('Remove callbacks property, deprecate XY-extent-callback.')))
 
 
 def conv (str):
     if re.search ('[XY]-offset-callbacks', str):
-       error_file.write (NOT_SMART % "[XY]-offset-callbacks")
+       stderr_write (NOT_SMART % "[XY]-offset-callbacks")
     if re.search ('position-callbacks', str):
-       error_file.write (NOT_SMART % "position-callbacks")
+       stderr_write (NOT_SMART % "position-callbacks")
     return str
 
 conversions.append (((2, 7, 15), conv,
-                    '''Use grob closures iso. XY-offset-callbacks.'''))
+                    _ ('Use grob closures iso. XY-offset-callbacks.')))
 
 
 def conv (str):
@@ -2682,7 +2682,7 @@ def conv (str):
     return str
 
 conversions.append (((2, 7, 24), conv,
-                    """deprecate number-visibility""")) 
+                    _ ('deprecate %s') % 'number-visibility')) 
 
 def conv (str):
     str = re.sub (r"ly:spanner-get-bound", "ly:spanner-bound", str)
@@ -2767,7 +2767,7 @@ def conv (str):
     return str
 
 conversions.append (((2, 7, 32), conv,
-                    """foobar -> foo-bar for \paper, \layout"""))
+                    _ ("foobar -> foo-bar for \paper, \layout")))
 
 def conv (str):
     str = re.sub ('debug-beam-quanting', 'debug-beam-scoring', str)
@@ -2828,9 +2828,9 @@ def conv (str):
                   r"""\\override \g<context>TupletNumber #'text = #tuplet-number::calc-fraction-text""", str)
 
     if re.search ('tupletNumberFormatFunction', str):
-        error_file.write ("\n")
-       error_file.write ("tupletNumberFormatFunction has been removed. Use #'text property on TupletNumber")
-        error_file.write ("\n")
+        stderr_write ("\n")
+       stderr_write ("tupletNumberFormatFunction has been removed. Use #'text property on TupletNumber")
+        stderr_write ("\n")
         
     return str
 
@@ -2874,7 +2874,7 @@ def conv (str):
     str = re.sub (r'\\midi\s*{\s*\\tempo ([0-9]+)\s*([.]*)\s*=\s*([0-9]+)\s*}', sub_tempo, str)
     return str
 
-conversions.append (((2, 9, 16), conv, """deprecate \\tempo in \\midi"""))
+conversions.append (((2, 9, 16), conv, _ ("deprecate \\tempo in \\midi")))
 
 def conv (str):
     str = re.sub ('printfirst-page-number', 'print-first-page-number', str)
@@ -2886,7 +2886,7 @@ conversions.append (((2, 9, 19), conv, """printfirst-page-number -> print-first-
 def conv (str):
     return str
 
-conversions.append (((2, 10, 0), conv, """bump version for release"""))
+conversions.append (((2, 10, 0), conv, _ ("bump version for release")))
 
 
 def conv (str):
@@ -2909,7 +2909,7 @@ def conv (str):
     
     return str
 
-conversions.append (((2, 11, 5), conv, """deprecate cautionary-style. Use AccidentalCautionary properties"""))
+conversions.append (((2, 11, 5), conv, _ ("deprecate cautionary-style. Use AccidentalCautionary properties")))
 
                     
 
@@ -2938,7 +2938,7 @@ def conv (str):
                        'standard-alteration-glyph-name-alist')
     return str
 
-conversions.append (((2, 11, 6), conv, """Rename accidental glyphs, use glyph-name-alist."""))
+conversions.append (((2, 11, 6), conv, _ ("Rename accidental glyphs, use glyph-name-alist.")))
 
 
 def conv (str):
@@ -2948,13 +2948,12 @@ def conv (str):
                   r"\override Beam #'breakable", str)
     str = re.sub (r'addquote' , 'addQuote', str)
     if re.search ("Span_dynamic_performer", str):
-        error_file.write ("Span_dynamic_performer has been merged into Dynamic_performer")
+        stderr_write ("Span_dynamic_performer has been merged into Dynamic_performer")
 
     return str
 
 conversions.append (((2, 11, 10), conv, """allowBeamBreak -> Beam #'breakable = ##t
 addquote -> addQuote
-
 """))
 
 def conv (str):
@@ -2971,8 +2970,8 @@ def conv (str):
                   str)
 
     if re.search ('edge-text', str):
-       error_file.write (NOT_SMART % _ ("edge-text settings for TextSpanner."))
-       error_file.write (_ ("Use\n\n%s") %
+       stderr_write (NOT_SMART % _ ("edge-text settings for TextSpanner."))
+       stderr_write (_ ("Use\n\n%s") %
                           "\t\\override TextSpanner #'bound-details #'right #'text = <right-text>\n"
                           "\t\\override TextSpanner #'bound-details #'left #'text = <left-text>\n")
 
@@ -3018,13 +3017,14 @@ def conv (str):
                   r"scripts.caesura.curved", str)
 
     if re.search ('dash-fraction', str):
-       error_file.write (NOT_SMART % _ ("all settings related to dashed lines.\n"))
-       error_file.write (_ ("Use \\override ... #'style = #'line for solid lines and\n"))
-       error_file.write (_ ("\t\\override ... #'style = #'dashed-line for dashed lines."))
+       stderr_write (NOT_SMART % _ ("all settings related to dashed lines.\n"))
+       stderr_write (_ ("Use \\override ... #'style = #'line for solid lines and\n"))
+       stderr_write (_ ("\t\\override ... #'style = #'dashed-line for dashed lines."))
 
     return str
 
-conversions.append (((2, 11, 35), conv, """scripts.caesura -> scripts.caesura.curved. Use #'style not #'dash-fraction to select solid/dashed lines."""))
+conversions.append (((2, 11, 35), conv, """scripts.caesura -> scripts.caesura.curved.
+""" + _ ("Use #'style not #'dash-fraction to select solid/dashed lines.")))
 
 def conv (str):
     str = re.sub (r"setEasyHeads", r"easyHeadsOn", str)
index 7aa45b1a9949edf57d88acbf0c59158175dc9aec..f68c17ce193a91964fb2749cba8e8c4dc9fa4579 100644 (file)
@@ -567,7 +567,7 @@ class RepeatedMusic:
             self.music = SequentialMusic ()
             self.music.elements = music
         else:
-            sys.stderr.write ("WARNING: Unable to set the music %s for the repeat %s" % (music, self))
+            sys.stderr.write (_ ("WARNING: Unable to set the music %s for the repeat %s" % (music, self)))
     def add_ending (self, music):
         self.endings.append (music)
     def print_ly (self, printer):
@@ -575,7 +575,7 @@ class RepeatedMusic:
         if self.music:
             self.music.print_ly (printer)
         else:
-            sys.stderr.write ("WARNING: Encountered repeat without body\n")
+            sys.stderr.write (_ ("WARNING: Encountered repeat without body\n"))
             printer.dump ('{}')
         if self.endings:
             printer.dump ('\\alternative {')
index 53fc9ffb54bb1724411df754d8a4e36d78d3004c..a08afb081435c6146cff3cd1b173cc98ae4d6ee8 100644 (file)
@@ -262,7 +262,7 @@ class Attributes (Measure_element):
             else:
                 return (4, 4)
         except KeyError:
-            sys.stderr.write ('error: requested time signature, but time sig unknown\n')
+            sys.stderr.write (_ ("error: requested time signature, but time sig is unknown\n"))
             return (4, 4)
 
     # returns clef information in the form ("cleftype", position, octave-shift)
@@ -328,7 +328,7 @@ class Note (Measure_element):
            # FIXME: is it ok to default to eight note for grace notes?
            return 3
         else:
-            self.message ("Encountered note at %s with %s duration (no <type> element):" % (self.start, self.duration) )
+            self.message (_ ("Encountered note at %s with %s duration (no <type> element):") % (self.start, self.duration) )
             return 0
 
     def get_factor (self):
@@ -362,7 +362,7 @@ class Part_list (Music_xml_node):
         if instrument_name:
             return instrument_name
         else:
-            sys.stderr.write ("Opps, couldn't find instrument for ID=%s\n" % id)
+            sys.stderr.write (_ ("Unable to find find instrument for ID=%s\n") % id)
             return "Grand Piano"
 
 class Part_group (Music_xml_node):
index dd8e00d1929e692f81214c0f5d6104dbd4c6ef9e..bdb0637d17ee418424e1d1e83eb5fc91f96315e7 100644 (file)
@@ -124,10 +124,16 @@ def get_option_parser ():
                   action='append', dest='include_path',
                   default=[os.path.abspath (os.getcwd ())])
 
+    p.add_option ('--info-images-dir', help=_ ("format Texinfo output so that Info will "
+                                               "look for images of music in DIR"),
+                  metavar=_ ("DIR"),
+                  action='store', dest='info_images_dir',
+                  default='')
+
     p.add_option ('--left-padding', 
-                  metavar=_("PAD"),
+                  metavar=_ ("PAD"),
                   dest="padding_mm",
-                  help="Pad left side of music to align music inspite of uneven bar numbers. (in mm)",
+                  help=_ ("pad left side of music to align music inspite of uneven bar numbers (in mm)"),
                   type="float",
                   default=3.0)
     
@@ -143,7 +149,7 @@ def get_option_parser ():
     p.add_option ('--pdf',
                   action="store_true",
                   dest="create_pdf",
-                  help=_ ("Create PDF files for use with PDFTeX"),
+                  help=_ ("create PDF files for use with PDFTeX"),
                   default=False)
     p.add_option ('', '--psfonts', action="store_true", dest="psfonts",
                   help=_ ('''extract all PostScript fonts into INPUT.psfonts for LaTeX
@@ -156,7 +162,7 @@ must use this with dvips -h INPUT.psfonts'''),
     p.add_option ('-w', '--warranty',
                   help=_ ("show warranty and copyright"),
                   action='store_true')
-    p.add_option_group ('bugs',
+    p.add_option_group (_ ('Bugs'),
                         description=(_ ("Report bugs via")
                                      + ''' http://post.gmane.org/post.php'''
                                      '''?group=gmane.comp.gnu.lilypond.bugs\n'''))
@@ -627,7 +633,7 @@ output = {
 
         OUTPUTIMAGE: r'''@noindent
 @ifinfo
-@image{%(base)s,,,%(alt)s,%(ext)s}
+@image{%(info_image_path)s,,,%(alt)s,%(ext)s}
 @end ifinfo
 @html
 <p>
@@ -1203,6 +1209,7 @@ class Lilypond_snippet (Snippet):
             # Specifying no extension is most robust.
             ext = ''
             alt = self.option_dict[ALT]
+            info_image_path = os.path.join (global_options.info_images_dir, base)
             str += output[TEXINFO][OUTPUTIMAGE] % vars ()
 
         base = self.basename ()
index 4ae771e37b208ba36d854385e293482a5044f1d3..6d7389fb5284eed6dc5537b7b7c8b7f05bdcacc4 100644 (file)
@@ -423,8 +423,8 @@ def rational_to_lily_duration (rational_len):
     d.duration_log = {1: 0, 2: 1, 4:2, 8:3, 16:4, 32:5, 64:6, 128:7, 256:8, 512:9}.get (rational_len.denominator (), -1)
     d.factor = Rational (rational_len.numerator ())
     if d.duration_log < 0:
-        error_message ("Encountered rational duration with denominator %s, "
-                       "unable to convert to lilypond duration" %
+        error_message (_ ("Encountered rational duration with denominator %s, "
+                       "unable to convert to lilypond duration") %
                        rational_len.denominator ())
         # TODO: Test the above error message
         return None
@@ -644,7 +644,7 @@ class Marker (musicexp.Music):
         self.direction = 0
         self.event = None
     def print_ly (self, printer):
-        sys.stderr.write ("Encountered unprocessed marker %s\n" % self)
+        ly.stderr_write (_ ("Encountered unprocessed marker %s\n") % self)
         pass
     def ly_expression (self):
         return ""
@@ -737,7 +737,7 @@ def musicxml_spanner_to_lily_event (mxl_event):
     if func:
         ev = func()
     else:
-        error_message ('unknown span event %s' % mxl_event)
+        error_message (_ ('unknown span event %s') % mxl_event)
 
 
     type = mxl_event.get_type ()
@@ -747,7 +747,7 @@ def musicxml_spanner_to_lily_event (mxl_event):
     if span_direction != None:
         ev.span_direction = span_direction
     else:
-        error_message ('unknown span type %s for %s' % (type, name))
+        error_message (_ ('unknown span type %s for %s') % (type, name))
 
     ev.set_span_type (type)
     ev.line_type = getattr (mxl_event, 'line-type', 'solid')
@@ -1495,7 +1495,7 @@ def musicxml_voice_to_lily_voice (voice):
             continue
 
         if not n.__class__.__name__ == 'Note':
-            error_message ('not a Note or Attributes? %s' % n)
+            error_message (_ ('unexpected %s; expected %s or %s or %s') % (n, 'Note', 'Attributes', 'Barline'))
             continue
 
         rest = n.get_maybe_exist_typed_child (musicxml.Rest)
@@ -1573,7 +1573,7 @@ def musicxml_voice_to_lily_voice (voice):
                 if s.get_type () in ('start','stop')]
             if slurs:
                 if len (slurs) > 1:
-                    error_message ('more than 1 slur?')
+                    error_message (_ ('cannot have two simultaneous slurs'))
                 # record the slur status for the next note in the loop
                 if not grace:
                     if slurs[0].get_type () == 'start':
@@ -1694,7 +1694,7 @@ def musicxml_voice_to_lily_voice (voice):
     
     
     if len (modes_found) > 1:
-       error_message ('Too many modes found %s' % modes_found.keys ())
+       error_message (_ ('cannot simultaneously have more than one mode: %s') % modes_found.keys ())
        
     if options.relative:
         v = musicexp.RelativeMusic ()
@@ -1774,7 +1774,7 @@ def get_all_voices (parts):
 
         part_ly_voices = {}
         for n, v in name_voice.items ():
-            progress ("Converting to LilyPond expressions...")
+            progress (_ ("Converting to LilyPond expressions..."))
             # musicxml_voice_to_lily_voice returns (lily_voice, {nr->lyrics, nr->lyrics})
             part_ly_voices[n] = musicxml_voice_to_lily_voice (v)
 
@@ -1844,7 +1844,7 @@ Copyright (c) 2005--2008 by
                   type='string',
                   dest='output_name',
                   help=_ ("set output filename to FILE"))
-    p.add_option_group ('bugs',
+    p.add_option_group ( _('Bugs'),
                         description=(_ ("Report bugs via")
                                      + ''' http://post.gmane.org/post.php'''
                                      '''?group=gmane.comp.gnu.lilypond.bugs\n'''))
@@ -1957,7 +1957,7 @@ def read_xml (io_object, use_lxml):
 def read_musicxml (filename, compressed, use_lxml):
     raw_string = None
     if compressed:
-        progress ("Input file %s is compressed, extracting raw MusicXML data" % filename)
+        progress (_ ("Input file %s is compressed, extracting raw MusicXML data") % filename)
         z = zipfile.ZipFile (filename, "r")
         container_xml = z.read ("META-INF/container.xml")
         if not container_xml:
@@ -1983,7 +1983,7 @@ def read_musicxml (filename, compressed, use_lxml):
 
 
 def convert (filename, options):
-    progress ("Reading MusicXML from %s ..." % filename)
+    progress (_ ("Reading MusicXML from %s ...") % filename)
     
     tree = read_musicxml (filename, options.compressed, options.use_lxml)
     parts = tree.get_typed_children (musicxml.Part)
@@ -2011,7 +2011,7 @@ def convert (filename, options):
     driver_ly_name = options.output_name + '.ly'
 
     printer = musicexp.Output_printer()
-    progress ("Output to `%s'" % defs_ly_name)
+    progress (_ ("Output to `%s'") % defs_ly_name)
     printer.set_file (codecs.open (defs_ly_name, 'wb', encoding='utf-8'))
 
     print_ly_preamble (printer, filename)
@@ -2025,7 +2025,7 @@ def convert (filename, options):
     printer.close ()
     
     
-    progress ("Output to `%s'" % driver_ly_name)
+    progress (_ ("Output to `%s'") % driver_ly_name)
     printer = musicexp.Output_printer()
     printer.set_file (codecs.open (driver_ly_name, 'wb', encoding='utf-8'))
     print_ly_preamble (printer, filename)
@@ -2068,7 +2068,7 @@ def main ():
     if filename and os.path.exists (filename):
         voices = convert (filename, options)
     else:
-        progress ("Unable to find input file %s" % args[0])
+        progress (_ ("Unable to find input file %s") % args[0])
 
 if __name__ == '__main__':
     main()
index dfae13f1b454ff224607918e2637b4cd7538de9d..64bdecf6775fcc8df561ad3313ac573251aa677f 100644 (file)
@@ -19,7 +19,7 @@ $(outdir)/%.pfb: %.mf $(outdir)/mf2pt1.mem
        TMP=`mktemp -d $(outdir)/pfbtemp.XXXXXXXXX` \
        && ( cd $$TMP \
                && ln -s ../mf2pt1.mem . \
-               && MFINPUTS=$(src-dir):..:: $(PERL) $(top-src-dir)/buildscripts/mf2pt1.pl $(MF2PT1_OPTIONS) $< ) \
+               && MFINPUTS=$(top-src-dir)/mf:..:: $(PERL) $(top-src-dir)/buildscripts/mf2pt1.pl $(MF2PT1_OPTIONS) $< ) \
        && mv $$TMP/*pfb $(outdir); \
        rm -rf $$TMP
 
index 48a6f7e9000599800be7eb2b6d78a715b88722a8..c37356207988e2de87157ad08f13d22a70e23872 100644 (file)
@@ -3,7 +3,7 @@
 
 $(outdir)/%.info: $(outdir)/%.texi
 # makeinfo MUST have PNGs in cwd for info images to work
-       cd $(outdir) && $(MAKEINFO) -I$(srcdir) --output=$(@F) $(<F)
+       $(MAKEINFO) -I$(outdir) --output=$@ $<
 
 $(outdir)/%-big-page.html: $(outdir)/%.texi
        $(MAKEINFO) -I $(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split -D bigpage --no-headers $<
@@ -20,9 +20,9 @@ $(outdir)/%.pdf.omf: %.texi
 $(outdir)/%.ps.gz.omf: %.texi
        $(call GENERATE_OMF,ps.gz)
 
-# Generic rule not possible?
-$(outdir)/%/%.html: $(outdir)/%.texi
-       $(MAKEINFO) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
+$(outdir)/%/index.html: $(outdir)/%.texi
+       mkdir -p $(dir $@)
+       $(MAKEINFO) -I $(outdir) --output=$(dir $@) --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
 
 $(outdir)/%.pdf: $(outdir)/%.texi
        cd $(outdir); texi2pdf $(TEXI2PDF_FLAGS) --batch $(TEXINFO_PAPERSIZE_OPTION) $(<F)
index 534e591ae42a844baecd28e7e1131b038a0b57a2..d36ff83b81db972664de69f49987e9341cab6a6c 100644 (file)
@@ -18,7 +18,7 @@ MAKEINFO = LANG= $(MAKEINFO_PROGRAM) $(MAKEINFO_FLAGS)
 # info stuff
 INFO_INSTALL_FILES = $(wildcard $(addsuffix *, $(INFO_FILES)))
 INFO_INSTALL_COMMAND =$(if $(INFO_INSTALL_FILES),\
-       $(INSTALLPY) -d $(DESTDIR)$(package_infodir) ; \
-       $(MAKE) INSTALLATION_OUT_DIR=$(package_infodir) \
+       $(INSTALLPY) -d $(DESTDIR)$(infodir) ; \
+       $(MAKE) INSTALLATION_OUT_DIR=$(infodir) \
                depth=$(depth) INSTALLATION_OUT_FILES="$(INFO_INSTALL_FILES)" \
                -f $(stepdir)/install-out.sub.make,true)