]> git.donarmstrong.com Git - lilypond.git/commitdiff
Docs: add support for translated NEWS
authorJohn Mandereau <john.mandereau@gmail.com>
Sat, 10 Jan 2009 17:24:42 +0000 (18:24 +0100)
committerJohn Mandereau <john.mandereau@gmail.com>
Sat, 10 Jan 2009 17:25:00 +0000 (18:25 +0100)
Documentation/es/GNUmakefile
Documentation/es/index.html.in
make/doc-i18n-topdocs-rules.make [new file with mode: 0644]
make/doc-i18n-topdocs-targets.make [new file with mode: 0644]
make/doc-i18n-topdocs-vars.make [new file with mode: 0644]
python/auxiliar/postprocess_html.py

index 90e3f678e975d77fd8f8f875023d7e2452c96b31..ed20093b3ddfe79cb5d4897d76121490a9342486 100644 (file)
@@ -1,6 +1,6 @@
 ISOLANG = es
 depth = ../..
-SUBDIRS = user
+SUBDIRS = topdocs user
 STEPMAKE_TEMPLATES = documentation
 LOCALSTEPMAKE_TEMPLATES = doc-i18n-root
 
index 5c987014e9eea984d75d7caf8624fa17a922d575..a35ebe0976f5a028c5382fa2521e033ebce1ea74 100644 (file)
@@ -49,7 +49,7 @@
          <td class="right-column">
          <ul>
             <li>
-             <a class="title" href="topdocs/NEWS.html">Noticias</a><br>
+             <a class="title" href="topdocs/NEWS.es.html">Noticias</a><br>
               (cambios producidos desde el Ășltimo<br>lanzamiento importante)</li>
            <li>
              <a class="title" href="../examples.html">Ejemplos</a><br>
diff --git a/make/doc-i18n-topdocs-rules.make b/make/doc-i18n-topdocs-rules.make
new file mode 100644 (file)
index 0000000..55997b4
--- /dev/null
@@ -0,0 +1,19 @@
+ifeq (,$(findstring texi2html,$(MISSING_OPTIONAL)))
+$(outdir)/%.html: $(outdir)/%.texi
+       $(TEXI2HTML) --I=$(src-dir) --I=$(outdir) $(TEXI2HTML_FLAGS) --output=$@ $(TEXI2HTML_INIT) $<
+       cp $(top-src-dir)/Documentation/lilypond*.css $(dir $@)
+else # Rules using makeinfo follow
+$(outdir)/%.html: $(outdir)/%.texi
+       $(MAKEINFO) -I$(src-dir) -I$(outdir) -P $(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split --no-headers $< 
+endif
+
+$(outdir)/%.pdf: $(outdir)/%.texi
+       cd $(outdir); texi2pdf $(TEXI2PDF_FLAGS) $(TEXINFO_PAPERSIZE_OPTION) $(notdir $*).texi
+
+$(outdir)/version.%: $(top-src-dir)/VERSION
+       echo '@macro version'> $@
+       echo $(TOPLEVEL_VERSION)>> $@
+       echo '@end macro'>> $@
+
+$(outdir)/%.txt: $(outdir)/%.texi
+       $(MAKEINFO) -I$(src-dir) -I$(outdir) -P $(outdir) --output=$@ --no-split --no-headers $< 
diff --git a/make/doc-i18n-topdocs-targets.make b/make/doc-i18n-topdocs-targets.make
new file mode 100644 (file)
index 0000000..0c0a018
--- /dev/null
@@ -0,0 +1,5 @@
+local-WWW-1: $(MASTER_TEXI_FILES) $(PDF_FILES)
+
+local-WWW-2: $(HTML_FILES)
+       find $(outdir) -name '*.html' | sed 's!$(outdir)/!!g' | xargs $(buildscript-dir)/mass-link --prepend-suffix .$(ISOLANG) hard $(outdir) $(top-build-dir)/Documentation/topdocs/$(outdir) NEWS.pdf
+       find $(outdir) \( -name 'lily-*.png' -o -name 'lily-*.ly' \) | sed 's!$(outdir)/!!g' | xargs $(buildscript-dir)/mass-link hard $(outdir) $(top-build-dir)/Documentation/topdocs/$(outdir)
diff --git a/make/doc-i18n-topdocs-vars.make b/make/doc-i18n-topdocs-vars.make
new file mode 100644 (file)
index 0000000..456f79d
--- /dev/null
@@ -0,0 +1,26 @@
+OUTTXT_FILES= $(outdir)/NEWS.txt
+
+TELY_FILES := $(call src-wildcard,*.tely)
+MASTER_TEXI_FILES := $(TELY_FILES:%.tely=$(outdir)/%.texi)
+HTML_FILES := $(TELY_FILES:%.tely=$(outdir)/%.html)
+PDF_FILES := $(TELY_FILES:%.tely=$(outdir)/%.pdf)
+
+DOCUMENTATION_INCLUDES = \
+  -I $(top-src-dir)/Documentation/user \
+  -I $(top-build-dir)/Documentation/user/$(outdir)
+
+LILYPOND_BOOK_INCLUDES += $(DOCUMENTATION_INCLUDES)
+MAKEINFO_FLAGS += --force --enable-encoding $(DOCUMENTATION_INCLUDES)
+MAKEINFO = LANG= $(MAKEINFO_PROGRAM) $(MAKEINFO_FLAGS)
+
+# texi2html flags
+TEXI2HTML_INIT= --init-file=$(top-src-dir)/lilypond-texi2html.init
+TEXI2HTML_LANG=--lang=$(ISOLANG)
+TEXI2HTML_FLAGS += $(TEXI2HTML_LANG) $(DOCUMENTATION_INCLUDES)
+TEXI2HTML = LANG= $(TEXI2HTML_PROGRAM)
+
+TEXI2PDF_FLAGS += --batch $(DOCUMENTATION_INCLUDES)
+
+ifdef QUIET_BUILD
+TEXI2PDF_FLAGS += -q
+endif
index e94da797559b224694a7caae817408310f9b0d4d..2f8b532321e6c8c75acd82fda5b4ece92e751ce7 100644 (file)
@@ -242,7 +242,8 @@ def process_links (s, prefix, lang_ext, file_name, missing, target):
         # in LANG doc index: don't rewrite .html suffixes
         # as not all .LANG.html pages exist;
         # the doc index should be translated and contain links with the right suffixes
-        if prefix == 'Documentation/out-www/index':
+        # idem for NEWS
+        if prefix in ('Documentation/out-www/index', 'Documentation/topdocs/out-www/NEWS'):
             page_flavors[file_name] = [lang_ext, s]
         elif lang_ext == '':
             page_flavors[file_name] = [lang_ext, s]