]> pere.pagekite.me Git - text-madewithcc.git/blobdiff - Makefile
Add XML tranformation rule for zh_Hans translation.
[text-madewithcc.git] / Makefile
index f3e5ee1962a70b486b85e9a91b805881bb45364f..e4122cfb89df06ce2b7595aa8a864df4aebee904 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -75,6 +75,12 @@ po/*/mwcc.po: po/mwcc.pot
        msgmerge --previous $@ po/mwcc.pot -U
        touch $@
 
+$(SOURCE).az.xml: $(SOURCE).xml po/az/mwcc.po
+       TEMP=`tempfile -p mwcc` && \
+         po4a-translate -f docbook -m $(SOURCE).xml -p po/az/mwcc.po -l $$TEMP -l $$TEMP -L utf-8 -M utf-8 $(PO4AOPTS) -k 0 && \
+         ruby fixup-docbook-translated.rb az $$TEMP $@ && \
+         rm -f $$TEMP
+
 $(SOURCE).de.xml: $(SOURCE).xml po/de/mwcc.po
        TEMP=`tempfile -p mwcc` && \
          po4a-translate -f docbook -m $(SOURCE).xml -p po/de/mwcc.po -l $$TEMP -l $$TEMP -L utf-8 -M utf-8 $(PO4AOPTS) -k 0 && \
@@ -123,12 +129,24 @@ $(SOURCE).sv.xml: $(SOURCE).xml po/sv/mwcc.po
          ruby fixup-docbook-translated.rb sv $$TEMP $@ && \
          rm -f $$TEMP
 
+$(SOURCE).th.xml: $(SOURCE).xml po/th/mwcc.po
+       TEMP=`tempfile -p mwcc` && \
+         po4a-translate -f docbook -m $(SOURCE).xml -p po/th/mwcc.po -l $$TEMP -l $$TEMP -L utf-8 -M utf-8 $(PO4AOPTS) -k 0 && \
+         ruby fixup-docbook-translated.rb th $$TEMP $@ && \
+         rm -f $$TEMP
+
 $(SOURCE).uk.xml: $(SOURCE).xml po/uk/mwcc.po
        TEMP=`tempfile -p mwcc` && \
          po4a-translate -f docbook -m $(SOURCE).xml -p po/uk/mwcc.po -l $$TEMP -l $$TEMP -L utf-8 -M utf-8 $(PO4AOPTS) -k 0 && \
          ruby fixup-docbook-translated.rb uk $$TEMP $@ && \
          rm -f $$TEMP
 
+$(SOURCE).zh_Hans.xml: $(SOURCE).xml po/zh_Hans/mwcc.po
+       TEMP=`tempfile -p mwcc` && \
+         po4a-translate -f docbook -m $(SOURCE).xml -p po/zh_Hans/mwcc.po -l $$TEMP -l $$TEMP -L utf-8 -M utf-8 $(PO4AOPTS) -k 0 && \
+         ruby fixup-docbook-translated.rb zh_Hans $$TEMP $@ && \
+         rm -f $$TEMP
+
 $(SOURCE).xml: $(SOURCE).md fixup-docbook.rb
        TEMP=`tempfile -p mwcc` && \
          pandoc -s -o $$TEMP $(PANDOC_OPTS) $(SOURCE).md && \
@@ -155,10 +173,10 @@ DBLATEX_OPTS = -T simple -t pdf -b xetex
 epub: $(SOURCE).epub
        for LANG in $(LANGS); do \
            $(MAKE) $(SOURCE).$$LANG.epub ; \
-           flightcrew-cli $(SOURCE).$$LANG.epub || exit 1 ; \
        done
 %.epub: %.xml
        dbtoepub $^
+       flightcrew-cli $@ || exit 1
 
 html: $(SOURCE).html
        for LANG in $(LANGS); do \
@@ -166,7 +184,7 @@ html: $(SOURCE).html
        done
 
 %.html: %.xml
-       xmlto -m extra/pdf.xsl html-nochunks $^
+       xmlto -x extra/docbook-utf8.xsl -m extra/pdf.xsl html-nochunks $^
 
 # Useful for spell checking the text
 %.txt: %.xml