← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-documenters/dhis2/dhis2-docbook-docs] Rev 223: Two shellscripts used for translation of docbook files

 

------------------------------------------------------------
revno: 223
committer: root <root@li149-200>
branch nick: dhis2-docbook-docs
timestamp: Sun 2010-09-05 19:44:20 +0000
message:
  Two shellscripts used for translation of docbook files
added:
  src/docbkx/autoTranslateDocbook.sh
  src/docbkx/trans2docbook.sh


--
lp:~dhis2-documenters/dhis2/dhis2-docbook-docs
https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docs

Your team DHIS 2 developers is subscribed to branch lp:~dhis2-documenters/dhis2/dhis2-docbook-docs.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docs/+edit-subscription
=== added file 'src/docbkx/autoTranslateDocbook.sh'
--- src/docbkx/autoTranslateDocbook.sh	1970-01-01 00:00:00 +0000
+++ src/docbkx/autoTranslateDocbook.sh	2010-09-05 19:44:20 +0000
@@ -0,0 +1,15 @@
+#!/bin/bash
+echo
+echo "****************** Google translation of Docbook ************************************"
+echo "Language codes: http://code.google.com/apis/ajaxlanguage/documentation/reference.html";
+echo Translating to $1
+echo
+cd en
+for f in *.xml ; do
+  base=`basename $f .xml`
+  if [ "$base" != "dhis2_database" ]; then
+    echo "Processing $f"
+    xml2po -o $base.pot $f
+    curl -F pofile=@$base.pot -F language=$1 -F output=pofile http://pepipopum.dixo.net --output ../$1/$base.$1.po
+  fi
+done

=== added file 'src/docbkx/trans2docbook.sh'
--- src/docbkx/trans2docbook.sh	1970-01-01 00:00:00 +0000
+++ src/docbkx/trans2docbook.sh	2010-09-05 19:44:20 +0000
@@ -0,0 +1,11 @@
+#!/bin/bash
+echo
+echo "****************** Google translation of Docbook ************************************"
+echo "Language codes: http://code.google.com/apis/ajaxlanguage/documentation/reference.html";
+echo Translating to $1
+echo
+cd en
+for f in *.xml ; do
+base=`basename $f .xml`
+echo "xml2po -p ../$1/$base.$1.po $f > ../$1/$base.$1.xml"
+done