Improved update_pot script

- added stk-assets path
 - restored karts and tracks
 - added achevements
 - better formatting and faster executing
Updated supertuxkart.pot
This commit is contained in:
Deve 2014-12-27 22:11:31 +01:00
parent df12714f49
commit a80d449aaf
2 changed files with 732 additions and 445 deletions

File diff suppressed because it is too large Load Diff

View File

@ -2,9 +2,21 @@
#
# ./data/po/update_pot.sh
CPP_FILE_LIST="`find ./src -name '*.cpp' -print` `find ./src -name '*.hpp' -print`"
XML_FILE_LIST="`find ./data -name 'track.xml' -print` `find ./data -name 'scene.xml' -print` `find ./data -name '*.challenge' -print` `find ./data -name '*.grandprix' -print`"
OTHER_XML_FILES=`find ./data -name '*.stkgui' -print && find ./data -name '*.challenge' -print && find ./data -name '*.grandprix' -print && find ./data -name 'kart.xml' -print`
CPP_FILE_LIST="`find ./src \
-name '*.cpp' -or \
-name '*.c' -or \
-name '*.hpp' -or \
-name "*.h" \
`"
XML_FILE_LIST="`find ./data ../stk-assets ../supertuxkart-assets \
-name 'achievements.xml' -or \
-name 'kart.xml' -or \
-name 'track.xml' -or \
-name 'scene.xml' -or \
-name '*.challenge' -or \
-name '*.grandprix' -or \
-name '*.stkgui' \
`"
echo "--------------------"
echo " Source Files :"
@ -15,10 +27,9 @@ echo "--------------------"
echo " XML Files :"
echo "--------------------"
echo $XML_FILE_LIST
echo $OTHER_XML_FILES
# XML Files
python ./data/po/extract_strings_from_XML.py $XML_FILE_LIST $OTHER_XML_FILES
python ./data/po/extract_strings_from_XML.py $XML_FILE_LIST
@ -26,10 +37,16 @@ echo "---------------------------"
echo " Generating .pot file..."
# C++ Files
xgettext -d supertuxkart -s --keyword=_ --keyword=N_ --keyword=_LTR --keyword=_C:1c,2 --add-comments="I18N:" -p ./data/po -o supertuxkart.pot $CPP_FILE_LIST --package-name=supertuxkart
xgettext -d supertuxkart -s --keyword=_ --keyword=N_ --keyword=_LTR \
--keyword=_C:1c,2 --add-comments="I18N:" \
-p ./data/po -o supertuxkart.pot $CPP_FILE_LIST \
--package-name=supertuxkart
# XML Files
xgettext -j -d supertuxkart -s --keyword=_ --add-comments="I18N:" -p ./data/po -o supertuxkart.pot --from-code=UTF-8 ./data/po/gui_strings.h --package-name=supertuxkart
xgettext -j -d supertuxkart -s --keyword=_ --add-comments="I18N:" \
-p ./data/po -o supertuxkart.pot \
--from-code=UTF-8 ./data/po/gui_strings.h \
--package-name=supertuxkart
echo " Done"
echo "---------------------------"