From cd7e60ca11d54526eb699e99e63af72bc72b4551 Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen Date: Thu, 16 Nov 2023 22:11:01 +0100 Subject: [PATCH] Added build rules for se and sma translations. --- Makefile | 40 +++++++++++++++++++++++++++++++++------- po4a.cfg | 4 +++- 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 5f52b7d..54396c0 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,9 @@ DBLATEX_OPTS = \ all: $(SOURCE).pdf $(SOURCE).epub $(SOURCE).html \ $(SOURCE).en.pdf $(SOURCE).en.epub $(SOURCE).en.html \ - $(SOURCE).nb.pdf $(SOURCE).nb.epub $(SOURCE).nb.html + $(SOURCE).nb.pdf $(SOURCE).nb.epub $(SOURCE).nb.html \ + $(SOURCE).se.pdf $(SOURCE).se.epub $(SOURCE).se.html \ + $(SOURCE).sma.pdf $(SOURCE).sma.epub $(SOURCE).sma.html \ $(SOURCE).xml: *.adoc $(SOURCE)-docinfo*.xml asciidoctor -b docbook5 -d book $(SOURCE).adoc --out-file=$@ @@ -45,6 +47,18 @@ po/$(SOURCE).pot: $(SOURCE).xml po/%.po: po/$(SOURCE).pot po4a --no-translations --msgmerge-opt --no-location po4a.cfg +$(SOURCE).en.xml: po/$(SOURCE).en.po $(SOURCE).xml + po4a --translate-only $(SOURCE).en.xml po4a.cfg +$(SOURCE).en.pdf: $(SOURCE).en.xml Makefile data/pdf.xsl + dblatex $(DBLATEX_OPTS) $(SOURCE).en.xml -o $@ +$(SOURCE).en.epub: $(SOURCE).en.xml + dbtoepub $^ +$(SOURCE).en.html: $(SOURCE).xml + xsltproc --encoding UTF-8 \ + --output $@ \ + data/stylesheet-html.xsl \ + $< + $(SOURCE).nb.xml: po/$(SOURCE).nb.po $(SOURCE).xml po4a --translate-only $(SOURCE).nb.xml po4a.cfg $(SOURCE).nb.pdf: $(SOURCE).nb.xml Makefile data/pdf.xsl @@ -57,13 +71,25 @@ $(SOURCE).nb.html: $(SOURCE).xml data/stylesheet-html.xsl \ $< -$(SOURCE).en.xml: po/$(SOURCE).en.po $(SOURCE).xml - po4a --translate-only $(SOURCE).en.xml po4a.cfg -$(SOURCE).en.pdf: $(SOURCE).en.xml Makefile data/pdf.xsl - dblatex $(DBLATEX_OPTS) $(SOURCE).en.xml -o $@ -$(SOURCE).en.epub: $(SOURCE).en.xml +$(SOURCE).se.xml: po/$(SOURCE).se.po $(SOURCE).xml + po4a --translate-only $(SOURCE).se.xml po4a.cfg +$(SOURCE).se.pdf: $(SOURCE).se.xml Makefile data/pdf.xsl + dblatex $(DBLATEX_OPTS) $(SOURCE).se.xml -o $@ +$(SOURCE).se.epub: $(SOURCE).se.xml dbtoepub $^ -$(SOURCE).en.html: $(SOURCE).xml +$(SOURCE).se.html: $(SOURCE).xml + xsltproc --encoding UTF-8 \ + --output $@ \ + data/stylesheet-html.xsl \ + $< + +$(SOURCE).sma.xml: po/$(SOURCE).sma.po $(SOURCE).xml + po4a --translate-only $(SOURCE).sma.xml po4a.cfg +$(SOURCE).sma.pdf: $(SOURCE).sma.xml Makefile data/pdf.xsl + dblatex $(DBLATEX_OPTS) $(SOURCE).sma.xml -o $@ +$(SOURCE).sma.epub: $(SOURCE).sma.xml + dbtoepub $^ +$(SOURCE).sma.html: $(SOURCE).xml xsltproc --encoding UTF-8 \ --output $@ \ data/stylesheet-html.xsl \ diff --git a/po4a.cfg b/po4a.cfg index 3c70aa2..caf6be4 100644 --- a/po4a.cfg +++ b/po4a.cfg @@ -1,4 +1,6 @@ [po_directory] po [type: docbook] manuscript.xml $lang:manuscript.$lang.xml \ - opt:"-M UTF-8 -k 20" + opt:"-M UTF-8 -k 20" \ + opt_sma:"-M UTF-8 -k 5" \ + opt_se:"-M UTF-8 -k 5" -- 2.47.2