]> pere.pagekite.me Git - text-madewithcc.git/commitdiff
Add XML tranformation rule for zh_Hans translation.
authorPetter Reinholdtsen <pere@hungry.com>
Mon, 26 Apr 2021 04:17:03 +0000 (06:17 +0200)
committerPetter Reinholdtsen <pere@hungry.com>
Mon, 26 Apr 2021 04:17:03 +0000 (06:17 +0200)
Makefile

index e68e50e87108a19c2b25ca2684ba3430b62b1237..e4122cfb89df06ce2b7595aa8a864df4aebee904 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -141,6 +141,12 @@ $(SOURCE).uk.xml: $(SOURCE).xml po/uk/mwcc.po
          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 && \