[debian-edu-commits] debian-edu/ 01/01: Create build rule to create translated moin files.
Petter Reinholdtsen
pere at moszumanska.debian.org
Thu Mar 26 19:27:06 UTC 2015
This is an automated email from the git hooks/post-receive script.
pere pushed a commit to branch master
in repository debian-edu-itil-doc-nb.
commit fe26bad4a41ca216d50f2434103572cba5da95c3
Author: Petter Reinholdtsen <pere at hungry.com>
Date: Thu Mar 26 20:26:44 2015 +0100
Create build rule to create translated moin files.
---
documentation/itil/Makefile | 12 +++++++++---
documentation/itil/dotranslation | 9 +++++++--
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/documentation/itil/Makefile b/documentation/itil/Makefile
index a96db4e..bd22279 100644
--- a/documentation/itil/Makefile
+++ b/documentation/itil/Makefile
@@ -16,6 +16,12 @@ include ../common/Makefile.common
translate:
./dotranslation
-moin: itil.xml
- pandoc -f docbook -t mediawiki -o itil.mediawiki itil.xml
- ./convert.pl itil.mediawiki > itil.moin
+moin-en: fetch-pages translate
+ for f in $$(cat id) ; do $(MAKE) $$f.en.moin; done
+
+.xml.mediawiki:
+ pandoc -f docbook -t mediawiki -o $@ $^
+.mediawiki.moin:
+ ./convert.pl $^ > $@
+
+.SUFFIXES: .xml .moin .mediawiki
diff --git a/documentation/itil/dotranslation b/documentation/itil/dotranslation
index 89c1c45..6a936f2 100755
--- a/documentation/itil/dotranslation
+++ b/documentation/itil/dotranslation
@@ -14,6 +14,7 @@ cat <<EOF >tmp.cfg
EOF
for f in *.xml ; do
+ base=$(basename $f .xml)
[ $f = "${name}.xml" ] && continue
if echo $f | grep -q "${i}\..*\.xml"; then
continue
@@ -21,9 +22,13 @@ for f in *.xml ; do
echo $f
ln -s ${f} tmp.xml
- po4a tmp.cfg
-
+ po4a --translate-only itil.en.xml tmp.cfg
rm tmp.xml
+ if [ -e itil.en.xml ] ; then
+ mv itil.en.xml ${base}.en.xml
+ else
+ echo translation failed
+ fi
done
rm tmp.cfg
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/upstream/debian-edu-itil-doc-nb.git
More information about the debian-edu-commits
mailing list