#! /bin/bash

#setopt shwordsplit
# List all the languages
langs=`ls *.po`
KDEDIR=`kde-config --prefix`
KDEPOT=$KDEDIR/include/kde.pot

# Make the yzis.pot file.
$EXTRACTRC `find $SRCDIR -iname *.rc` >> rc.cpp
$EXTRACTRC `find $SRCDIR -iname *.ui` >> rc.cpp
#cpp_files=$(ls ../opale/*.cpp ../opale/src/*.h  | grep -v .moc)
cpp_files=$(find .. -name '*.cpp' -o -name '*.h' | grep -v moc)
xgettext -C -ki18n -kI18N_NOOP -ktr2i18n -ktranslate -kaliasLocale -k_ -x $KDEPOT $cpp_files

rm -rf opale.pot
mv -f messages.po opale.pot 

echo "Done."
echo
