]> git.sesse.net Git - kdenlive/blob - Messages.sh
Messages.sh updated, error message if extractrc is missing
[kdenlive] / Messages.sh
1 #! /bin/sh
2 EXTRACTRC=`which extractrc`
3 # XGETTEXT="`which xgettext` --kde -ki18n --no-location -s "
4 XGETTEXT="`which xgettext` -s "
5 podir=`pwd`/po
6 kdenlive_subdirs="src src/widgets renderer plugins"
7
8
9 if [ $(expr length "${EXTRACTRC}") -eq 0 ]
10 then
11     echo "extractrc not found. Please install it (it is maybe in the kdesdk-scripts package)."
12     exit 1
13 fi
14
15
16 kde_inc=${includedir:-${KDEDIR:-@CMAKE_INSTALL_PREFIX@}/include/kde}/kde.pot
17
18 if [ -f ${kde_inc} ]; then
19    kde_inc=" -x ${kde_inc} "
20 else
21    kde_inc=""
22 fi
23
24 $EXTRACTRC --tag=name --tag=description --tag=label --tag=comment --tag=paramlistdisplay effects/*.xml data/*.rc >> rc.cpp || exit 11
25
26 $EXTRACTRC `find $kdenlive_subdirs -name \*.ui` >> rc.cpp || exit 11
27 $EXTRACTRC `find $kdenlive_subdirs -name \*.rc` >> rc.cpp || exit 11
28
29 $XGETTEXT --from-code=utf-8 -C -kde -ci18n -ki18n:1 -ki18nc:1c,2 -ki18np:1,2 -ki18ncp:1c,2,3 -ktr2i18n:1 \
30         -kI18N_NOOP:1 -kI18N_NOOP2:1c,2 -ktranslate -kaliasLocale -kki18n:1 -kki18nc:1c,2 -kki18np:1,2 -kki18ncp:1c,2,3 --add-comments=\"TRANSLATORS:\" ${kde_inc} `find $kdenlive_subdirs -name \*.cpp -o -name \*.h` *.cpp -o $podir/kdenlive.pot
31
32 #$XGETTEXT -C -kki18n -ki18n -ktr2i18n -kI18N_NOOP -ktr `find $kdenlive_subdirs -name \*.cpp -o -name \*.h` *.cpp -o $podir/kdenlive.pot
33 rm -f rc.cpp