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
|
|
|
|
|
2018-09-12 16:53:58 -04:00
|
|
|
CPP_FILE_LIST="`find ./src \
|
|
|
|
-name '*.cpp' -or \
|
|
|
|
-name '*.c' -or \
|
|
|
|
-name '*.hpp' -or \
|
2018-08-21 01:34:27 -04:00
|
|
|
-name "*.h" | sort -n \
|
2014-12-27 16:11:31 -05:00
|
|
|
`"
|
2018-09-12 16:53:58 -04:00
|
|
|
XML_FILE_LIST="`find ./data \
|
|
|
|
../stk-assets/tracks \
|
|
|
|
../stk-assets/karts \
|
|
|
|
../supertuxkart-assets/tracks \
|
|
|
|
../supertuxkart-assets/karts \
|
|
|
|
-name 'achievements.xml' -or \
|
|
|
|
-name 'kart.xml' -or \
|
|
|
|
-name 'track.xml' -or \
|
|
|
|
-name 'scene.xml' -or \
|
|
|
|
-name '*.challenge' -or \
|
|
|
|
-name '*.grandprix' -or \
|
|
|
|
-name '*.stkgui' | sort -n \
|
2014-12-27 16:11:31 -05:00
|
|
|
`"
|
2018-09-12 16:53:58 -04:00
|
|
|
ANGELSCRIPT_FILE_LIST="`find ./data \
|
|
|
|
../stk-assets/tracks \
|
|
|
|
../supertuxkart-assets/tracks \
|
|
|
|
-name '*.as' | sort -n \
|
|
|
|
`"
|
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
|
2015-04-30 19:03:54 -04:00
|
|
|
echo $ANGELSCRIPT_FILE_LIST
|
2009-08-29 17:16:51 -04:00
|
|
|
|
2008-05-10 10:48:57 -04:00
|
|
|
echo "--------------------"
|
2010-09-01 12:01:19 -04:00
|
|
|
echo " XML Files :"
|
2008-05-10 10:48:57 -04:00
|
|
|
echo "--------------------"
|
2011-01-10 18:04:27 -05:00
|
|
|
echo $XML_FILE_LIST
|
2009-08-29 21:28:46 -04:00
|
|
|
|
|
|
|
# XML Files
|
2014-12-27 16:11:31 -05:00
|
|
|
python ./data/po/extract_strings_from_XML.py $XML_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
|
|
|
|
2015-02-08 18:16:08 -05:00
|
|
|
# XML Files
|
2015-05-10 06:09:01 -04:00
|
|
|
xgettext -d supertuxkart --keyword=_ --add-comments="I18N:" \
|
2015-02-08 18:16:08 -05:00
|
|
|
-p ./data/po -o supertuxkart.pot \
|
|
|
|
--no-location --from-code=UTF-8 ./data/po/gui_strings.h \
|
|
|
|
--package-name=supertuxkart
|
|
|
|
|
2009-08-29 17:16:51 -04:00
|
|
|
# C++ Files
|
2015-05-10 06:09:01 -04:00
|
|
|
xgettext -j -d supertuxkart --keyword=_ --keyword=N_ --keyword=_LTR \
|
2015-01-02 15:19:44 -05:00
|
|
|
--keyword=_C:1c,2 --keyword=_P:1,2 \
|
|
|
|
--keyword=_CP:1c,2,3 --add-comments="I18N:" \
|
2014-12-27 16:11:31 -05:00
|
|
|
-p ./data/po -o supertuxkart.pot $CPP_FILE_LIST \
|
|
|
|
--package-name=supertuxkart
|
2009-08-29 17:16:51 -04:00
|
|
|
|
2015-04-30 19:03:54 -04:00
|
|
|
# Angelscript files (xgettext doesn't support AS so pretend it's c++)
|
2015-09-25 04:31:04 -04:00
|
|
|
xgettext -j -d supertuxkart --keyword="translate" --add-comments="I18N:" \
|
2015-04-30 19:03:54 -04:00
|
|
|
-p ./data/po -o supertuxkart.pot $ANGELSCRIPT_FILE_LIST \
|
|
|
|
--package-name=supertuxkart --language=c++
|
2015-02-08 18:16:08 -05:00
|
|
|
|
2009-08-29 17:16:51 -04:00
|
|
|
|
2008-05-09 14:39:48 -04:00
|
|
|
echo " Done"
|
2010-05-25 14:47:38 -04:00
|
|
|
echo "---------------------------"
|