2009-11-12 17:54:55 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
2011-10-28 08:17:54 +02:00
|
|
|
LIBREPLAN_WEBAPP="../libreplan-webapp";
|
|
|
|
|
LIBREPLAN_GANTTZK="../ganttzk";
|
|
|
|
|
LIBREPLAN_BUSINESS="../libreplan-business";
|
2009-11-12 17:54:55 +01:00
|
|
|
|
2011-10-28 08:17:54 +02:00
|
|
|
WEBAPP_KEYS="$LIBREPLAN_WEBAPP/src/main/resources/i18n/keys.pot"
|
|
|
|
|
GANTTZK_KEYS="$LIBREPLAN_GANTTZK/src/main/resources/i18n/keys.pot"
|
2009-11-12 17:54:55 +01:00
|
|
|
|
|
|
|
|
# Parse webapp java and zul and ganttzk validation messages
|
|
|
|
|
WKDIR=`pwd`
|
2011-10-28 08:17:54 +02:00
|
|
|
cd $LIBREPLAN_WEBAPP
|
2009-11-12 17:54:55 +01:00
|
|
|
mvn gettext:gettext 2> /dev/null
|
|
|
|
|
cd "${WKDIR}"
|
|
|
|
|
|
|
|
|
|
if [ ! -f $WEBAPP_KEYS ]
|
|
|
|
|
then touch $WEBAPP_KEYS
|
|
|
|
|
fi
|
2011-10-28 08:17:54 +02:00
|
|
|
./gettext-keys-generator.pl -d $LIBREPLAN_WEBAPP -k $WEBAPP_KEYS 2> /dev/null
|
|
|
|
|
./gettext-keys-generator.pl --java -d $LIBREPLAN_BUSINESS -k $WEBAPP_KEYS 2> /dev/null
|
|
|
|
|
find $LIBREPLAN_BUSINESS/src -name "*.java" -exec xgettext -j --from-code=utf-8 -k_ -o $WEBAPP_KEYS '{}' \;
|
2009-11-12 17:54:55 +01:00
|
|
|
|
|
|
|
|
# Parse ganttzk java and zul
|
2011-10-28 08:17:54 +02:00
|
|
|
cd $LIBREPLAN_GANTTZK
|
2009-11-12 17:54:55 +01:00
|
|
|
mvn gettext:gettext 2> /dev/null
|
|
|
|
|
cd "${WKDIR}"
|
|
|
|
|
|
|
|
|
|
if [ ! -f $GANTTZK_KEYS ]
|
|
|
|
|
then touch $GANTTZK_KEYS
|
|
|
|
|
fi
|
2011-10-28 08:17:54 +02:00
|
|
|
./gettext-keys-generator.pl -d $LIBREPLAN_GANTTZK -k $GANTTZK_KEYS 2> /dev/null
|
2010-12-23 13:24:39 +01:00
|
|
|
|
|
|
|
|
# Convert absolute paths to relative
|
2011-10-28 08:17:54 +02:00
|
|
|
sed -i 's/\(#: \)\(.*\)\/\(ganttzk\|libreplan-business\|libreplan-webapp\)\/\(.*\)/\1\3\/\4/' $WEBAPP_KEYS
|
|
|
|
|
sed -i 's/\(#: \)\(.*\)\/\(ganttzk\|libreplan-business\|libreplan-webapp\)\/\(.*\)/\1\3\/\4/' $GANTTZK_KEYS
|