diff options
author | Frans Pop <elendil@planet.nl> | 2005-11-21 18:10:38 +0000 |
---|---|---|
committer | Frans Pop <elendil@planet.nl> | 2005-11-21 18:10:38 +0000 |
commit | dbdb07552d0b78032aa079a9b0a08295e69afe2a (patch) | |
tree | 63596c3ebc2d7dc0b077774e28d3d062ddf7e8fb /scripts/create_xml | |
parent | 72aeb7747f486a8b301d6ad180f1d2445d359d0f (diff) | |
download | installation-guide-dbdb07552d0b78032aa079a9b0a08295e69afe2a.zip |
Make sure po files are utf-8 encoded before running po2xml
Diffstat (limited to 'scripts/create_xml')
-rwxr-xr-x | scripts/create_xml | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/create_xml b/scripts/create_xml index 2b12dc5a4..7ed3ca1eb 100755 --- a/scripts/create_xml +++ b/scripts/create_xml @@ -42,11 +42,20 @@ for ORIGXML in `find $SOURCEDIR -name "*.xml"` ; do if [ -f $PO ] ; then echo "- creating $BASENAME.xml" - po2xml $ORIGXML $PO > $XML + # Make sure po file is UTF8 encoded; po2xml does no conversion + msgconv -t utf-8 $PO >/tmp/tmp.po.$$ + RC=$? + if [ $RC -ne 0 ] ; then + RET=$RC + echo "Error: error $RC while executing msgconv" + continue + fi + po2xml $ORIGXML /tmp/tmp.po.$$ > $XML RC=$? if [ $RC -ne 0 ] ; then RET=$RC echo "Error: error $RC while executing po2xml" + continue fi else echo "Warning: no PO file found for '$BASENAME'; copying English original" @@ -54,4 +63,5 @@ for ORIGXML in `find $SOURCEDIR -name "*.xml"` ; do fi done +rm -f /tmp/tmp.po.$$ exit $RET |