From 4436fd3f3d4e3b145eb11fe7287948047286d5a2 Mon Sep 17 00:00:00 2001 From: dpage Date: Mon, 8 Sep 2008 13:39:42 +0000 Subject: [PATCH] String management scripts --- stringextract | 17 +++++++++++++++++ stringmerge | 29 +++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100755 stringextract create mode 100755 stringmerge diff --git a/stringextract b/stringextract new file mode 100755 index 0000000..46ed3c9 --- /dev/null +++ b/stringextract @@ -0,0 +1,17 @@ +#!/bin/sh + +########################################################################## +# Name: stringextract +# Purpose: Extract strings for translation +# Author: Dave Page +# Created: 2007-02-13 +# RCS-ID: $Id: stringextract,v 1.1 2008/09/08 13:39:42 dpage Exp $ +# Copyright: (c) EnterpriseDB +# Licence: BSD Licence +########################################################################## + +cp StackBuilder-release.pot StackBuilder.pot + +xgettext -k_ -k__ -j -s -o StackBuilder.pot *.cpp +xgettext -k_ -k__ -j -s -o StackBuilder.pot include/*.h + diff --git a/stringmerge b/stringmerge new file mode 100755 index 0000000..772dd6b --- /dev/null +++ b/stringmerge @@ -0,0 +1,29 @@ +#!/bin/sh +set -x +########################################################################## +# Name: stringmerge +# Purpose: Merge translations +# Author: Dave Page +# Created: 2007-02-13 +# RCS-ID: $Id: stringmerge,v 1.1 2008/09/08 13:39:42 dpage Exp $ +# Copyright: (c) EnterpriseDB +# Licence: BSD Licence +########################################################################## + +if test -f StackBuilder.pot; then + + echo "Updating from CVS." + cvs update -dP + + for GETTEXTDIR in i18n/??_?? ; do + echo "Entering $GETTEXTDIR." + cd $GETTEXTDIR + echo "Merging StackBuilder.pot into StackBuilder.po" + msgmerge --backup=none --update StackBuilder.po ../../StackBuilder.pot + cd ../.. + done + + cd i18n + echo "Committing changes to CVS." +# svn commit -m "Automatic merge using stringmerge script." +fi