openspades/update-pot.sh

24 lines
815 B
Bash
Raw Normal View History

2014-02-14 16:20:42 +09:00
#!/bin/sh
# This file should be run from the repository root (e.g. ~/openspades)
# TODO: Optimize and error-checking
2014-02-14 16:20:42 +09:00
FILES_H=`find . -iname *.h`
FILES_CPP=`find . -iname *.cpp`
FILES_C=`find . -iname *.c`
FILES_AS=`find . -iname *.as`
2014-02-14 16:20:42 +09:00
FILES="${FILES_H} ${FILES_CPP} ${FILES_C} ${FILES_AS}"
echo $FILES| tr " " "\n" > .translate.this # Convert spaces to newlines
2014-02-14 16:20:42 +09:00
OPTIONS_OUTPUT="-o Resources/Locales/pot/openspades.pot"
OPTIONS_CPP="--c++"
OPTIONS_KEYWORD="-k_Tr:2,1c -k_TrN:2,1c,3" # Have no idea how this works
OPTIONS="-j ${OPTIONS_OUTPUT} ${OPTIONS_CPP} ${OPTIONS_KEYWORD}"
2014-02-14 16:20:42 +09:00
META_PKG="--package-name=OpenSpades"
META_COPYRIGHT="--copyright-holder=yvt"
META_BUGS="--msgid-bugs-address=i@yvt.jp"
METADATA="$META_PKG $META_COPYRIGHT $META_BUGS --omit-header"
xgettext $OPTIONS $METADATA -f .translate.this