90bed4e047
* po/POTFILES.in Add vcalendar files * po/merge-po-from-plugin.sh Add helper script to merge external plugins translations * po/bg.po * po/ca.po * po/cs.po * po/de.po * po/en_GB.po * po/es.po * po/fi.po * po/fr.po * po/hu.po * po/id_ID.po * po/it.po * po/ja.po * po/lt.po * po/nl.po * po/pl.po * po/pt_BR.po * po/pt_PT.po * po/ru.po * po/sk.po * po/sr.po * po/sv.po * po/uk.po * po/zh_CN.po * po/zh_TW.po Merge translations from fancy and vcalendar
34 lines
826 B
Bash
34 lines
826 B
Bash
#!/bin/bash
|
|
if [ "$1" = "" -o "$2" = "" ]; then
|
|
echo usage: $0 path/to/oldplugin/po/ ../src/plugins/newplugin
|
|
exit 1
|
|
fi
|
|
|
|
#Check if new files are in POTFILES
|
|
|
|
sources=`find $2 -name '*.[ch]'`
|
|
translatedfiles=`grep -rwl '_(' $sources`
|
|
for file in $translatedfiles; do
|
|
file=`echo $file|sed "s/^\.\.\///"`
|
|
inPOTFILESin=`grep $file POTFILES.in`
|
|
inPOTFILES=`grep $file POTFILES`
|
|
if [ "$inPOTFILESin" = "" ]; then
|
|
echo "$file not in POTFILES.in, please add it"
|
|
err=1
|
|
elif [ "$inPOTFILES" = "" ]; then
|
|
echo "$file not in POTFILES, please autogen.sh"
|
|
err=1
|
|
fi
|
|
done
|
|
if [ "$err" = "1" ]; then
|
|
exit 1
|
|
fi
|
|
|
|
#update all with new files
|
|
make update-po
|
|
|
|
#Merge with old plugin po files
|
|
for pluginpo in $1/*.po; do
|
|
corepo=`basename $pluginpo`
|
|
msgcat --use-first $corepo $pluginpo > $corepo.new && mv $corepo.new $corepo
|
|
done;
|