2008-04-21 09:34:39 -04:00
|
|
|
# run this script from the root directory to re-generate the .pot file
|
|
|
|
#
|
|
|
|
# ./data/po/update_pot.sh
|
|
|
|
|
2008-05-09 14:39:48 -04:00
|
|
|
CPP_FILE_LIST=`find ./src -name '*.cpp' -print`
|
2008-09-01 20:35:28 -04:00
|
|
|
PERL_FILE_LIST="`find ./data -name '*.track' -print` `find ./data -name '*.challenge' -print` `find ./data -name '*.grandprix' -print`"
|
2009-08-29 17:16:51 -04:00
|
|
|
XML_FILE_LIST=`find ./data -name '*.xml' -print`
|
|
|
|
STKGUI_FILE_LIST=`find ./data -name '*.stkgui' -print`
|
2008-05-09 14:39:48 -04:00
|
|
|
|
|
|
|
echo "--------------------"
|
2008-05-10 10:48:57 -04:00
|
|
|
echo " Source Files :"
|
2008-05-09 14:39:48 -04:00
|
|
|
echo "--------------------"
|
|
|
|
echo $CPP_FILE_LIST
|
2009-08-29 17:16:51 -04:00
|
|
|
|
2008-05-10 10:48:57 -04:00
|
|
|
echo "--------------------"
|
|
|
|
echo " Data Files :"
|
|
|
|
echo "--------------------"
|
|
|
|
echo $PERL_FILE_LIST
|
2008-05-09 14:39:48 -04:00
|
|
|
|
2009-08-29 17:16:51 -04:00
|
|
|
echo "--------------------"
|
|
|
|
echo " XMl Files :"
|
|
|
|
echo "--------------------"
|
2009-08-29 21:28:46 -04:00
|
|
|
echo $STKGUI_FILE_LIST # $XML_FILE_LIST
|
|
|
|
|
|
|
|
# XML Files
|
|
|
|
# (Since xgettext cannot read XML directly, strings are extracted using 'grep' and 'sed' first
|
|
|
|
#grep -ho 'text=\"[^\"]*' $XML_FILE_LIST $STKGUI_FILE_LIST | sed 's/text=\"\(.*\)/_(\"\1\")/' > ./data/po/gui_strings.txt
|
|
|
|
# nothing in .xml files atm. If there ever is, add $XML_FILE_LIST below
|
|
|
|
python ./data/po/extract_strings_from_XML.py $STKGUI_FILE_LIST
|
2009-08-29 17:16:51 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-09 14:39:48 -04:00
|
|
|
echo "---------------------------"
|
|
|
|
echo " Generating .pot file..."
|
2009-08-29 17:16:51 -04:00
|
|
|
|
|
|
|
# C++ Files
|
2008-09-01 20:35:28 -04:00
|
|
|
xgettext -d supertuxkart -s --keyword=_ --add-comments="I18N:" -p ./data/po -o supertuxkart.pot $CPP_FILE_LIST
|
2009-08-29 17:16:51 -04:00
|
|
|
|
|
|
|
# Lisp files
|
2008-09-01 20:35:28 -04:00
|
|
|
xgettext -j -L perl -d supertuxkart -s --keyword=_ --add-comments="I18N:" -p ./data/po -o supertuxkart.pot $PERL_FILE_LIST
|
2009-08-29 17:16:51 -04:00
|
|
|
|
|
|
|
# XML Files
|
2009-08-29 21:28:46 -04:00
|
|
|
xgettext -j -d supertuxkart -s --keyword=_ --add-comments="I18N:" -p ./data/po -o supertuxkart.pot ./data/po/gui_strings.h
|
2009-08-29 17:16:51 -04:00
|
|
|
|
2008-05-09 14:39:48 -04:00
|
|
|
echo " Done"
|
|
|
|
echo "---------------------------"
|