2 if [ "$1" = "" -o "$2" = "" ]; then
3 echo usage: $0 path/to/oldplugin/po/ ../src/plugins/newplugin
7 #Check if new files are in POTFILES
9 sources=`find $2 -name '*.[ch]'`
10 translatedfiles=`grep -rwl '_(' $sources`
11 for file in $translatedfiles; do
12 file=`echo $file|sed "s/^\.\.\///"`
13 inPOTFILESin=`grep $file POTFILES.in`
14 inPOTFILES=`grep $file POTFILES`
15 if [ "$inPOTFILESin" = "" ]; then
16 echo "$file not in POTFILES.in, please add it"
18 elif [ "$inPOTFILES" = "" ]; then
19 echo "$file not in POTFILES, please autogen.sh"
23 if [ "$err" = "1" ]; then
27 #update all with new files
30 #Merge with old plugin po files
31 for pluginpo in $1/*.po; do
32 corepo=`basename $pluginpo`
33 msgcat --use-first $corepo $pluginpo > $corepo.new && mv $corepo.new $corepo