]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix documentation po-update
authorJohn Mandereau <john.mandereau@gmail.com>
Wed, 28 Jan 2009 20:17:24 +0000 (21:17 +0100)
committerJohn Mandereau <john.mandereau@gmail.com>
Wed, 28 Jan 2009 20:17:24 +0000 (21:17 +0100)
Documentation/po/GNUmakefile
scripts/auxiliar/texi-langutils.py

index eea2f247d13a7a200170cfb980662fe42fc1e732..dc3d16144c5936e6349cd5ff34b6a09f343be75b 100644 (file)
@@ -8,7 +8,8 @@ include $(depth)/make/stepmake.make
 doc-localedir=$(outdir)
 LANGS = $(shell $(PYTHON) $(top-src-dir)/python/langdefs.py)
 DOMAIN=lilypond-doc
-DOC_PO_SOURCES = postprocess_html.py texi-gettext.py translations-status.py
+DOC_PO_SOURCES = python/auxiliar/postprocess_html.py \
+ scripts/build/texi-gettext.py scripts/auxiliar/translations-status.py
 TELY_FILES = $(shell ls $(depth)/Documentation/user/lilypond*.tely)
 TELY_FILES += $(foreach l, $(LANGS), $(shell ls $(depth)/Documentation/$(l)/user/lilypond*.tely))
 LSR_LYS := $(shell ls $(depth)/input/lsr/*.ly)
@@ -24,10 +25,10 @@ $(outdir)/messages: $(MO_FILES)
        touch $@
 
 po-update:
-       $(PYTHON) $(buildscript-dir)/texi-langutils.py -d $(outdir) -o texi.pot --gettext $(TELY_FILES:%.tely=../%.tely)
-       $(foreach i, $(DOC_PO_SOURCES), cp $(buildscript-dir)/$(i) $(outdir) &&) true
-       cd $(outdir) && sed -i -e s/_doc/_/g $(DOC_PO_SOURCES)
-       cd $(outdir) && xgettext -cjn -L Python -o buildscripts.pot $(DOC_PO_SOURCES)
+       $(auxscript-dir)/texi-langutils.py -d $(outdir) -o texi.pot --gettext $(TELY_FILES:%.tely=../%.tely)
+       $(foreach i, $(DOC_PO_SOURCES), cp $(top-src-dir)/$(i) $(outdir) &&) true
+       cd $(outdir) && sed -i -e s/_doc/_/g $(foreach i, $(DOC_PO_SOURCES), $(notdir $(i)))
+       cd $(outdir) && xgettext -cjn -L Python -o buildscripts.pot $(foreach i, $(DOC_PO_SOURCES), $(notdir $(i)))
        msgcat -o $(outdir)/doc.pot $(outdir)/buildscripts.pot $(outdir)/texi.pot
        msgmerge -U lilypond-doc.pot $(outdir)/doc.pot
        for i in $(CATALOGS); do \
index 7c34ce4adbf7b67da6489ae81bf471cd5b3cf969..0c01d108d379157e803797a85e6f4b818dd9aa63 100755 (executable)
@@ -25,7 +25,7 @@ process_includes = not ('-n', '') in optlist # -n   don't process @include's in
 make_gettext = ('--gettext', '') in optlist   # --gettext    generate a node list from a Texinfo source
 make_skeleton = ('--skeleton', '') in optlist # --skeleton   extract the node tree from a Texinfo source
 
-output_file = 'doc.pot'
+output_name = 'doc.pot'
 
 # @untranslated should be defined as a macro in Texinfo source
 node_blurb = '''@untranslated
@@ -47,7 +47,7 @@ end_blurb = """
 
 for x in optlist:
     if x[0] == '-o': # -o NAME   set PO output file name to NAME
-        output_file = x[1]
+        output_name = x[1]
     elif x[0] == '-d': # -d DIR    set working directory to DIR
         os.chdir (x[1])
     elif x[0] == '-b': # -b BLURB  set blurb written at each node to BLURB
@@ -169,7 +169,7 @@ if make_gettext:
     for word in ('Up:', 'Next:', 'Previous:', 'Appendix ', 'Footnotes', 'Table of Contents'):
         node_list.write ('_(r"' + word + '")\n')
     node_list.close ()
-    os.system ('xgettext -c -L Python --no-location -o ' + output_file + ' ' + node_list_filename)
+    os.system ('xgettext -c -L Python --no-location -o ' + output_name + ' ' + node_list_filename)
 else:
     for texi_file in texi_files:
         process_texi (texi_file, intro_blurb, node_blurb, make_skeleton,