3
# modified version of file from http://websvn.kde.org/trunk/l10n-kde4/scripts/extract-messages.sh
7
dirs="krusader krArc tar iso"
8
EXTRACTRC="${EXTRACTRC:-${PWD}/extractrc}"
9
EXTRACTATTR=${EXTRACTATTR:-extractattr}
10
PREPARETIPS=${PREPARETIPS:-preparetips}
11
export EXTRACTRC EXTRACTATTR PREPARETIPS
12
XGETTEXT_FLAGS="--copyright-holder=This_file_is_part_of_the_Krusader --from-code=UTF-8 -C --kde -ci18n -ki18n -ki18nc:1c,2 -ki18np:1,2 -ki18ncp:1c,2,3 -ktr2i18n:1 -kI18N_NOOP:1 -kI18N_NOOP2:1c,2 -kaliasLocale -kki18n:1 -kki18nc:1c,2 -kki18np:1,2 -kki18ncp:1c,2,3 --flag=i18n:1:kde-format --flag=i18nc:2:kde-format --flag=i18np:2:kde-format --flag=i18ncp:3:kde-format --msgid-bugs-address=krusader-i18n@googlegroups.com"
15
> ${podir}/krusader.pot
17
for subdir in $dirs; do
18
echo "Making messages in $subdir"
21
find . -name .svn -prune -o -regex '.*[.]\(rc\|ui[34]?\|kcfg\)' -print 2> /dev/null | xargs --no-run-if-empty $EXTRACTRC > rc.cpp
23
if find . -name \*.c\* -o -name \*.h\* | fgrep -v ".svn" | xargs fgrep -s -q KAboutData
25
echo 'i18nc("NAME OF TRANSLATORS","Your names");' >> rc.cpp
26
echo 'i18nc("EMAIL OF TRANSLATORS","Your emails");' >> rc.cpp
30
for i in $srcdir/$subdir
32
test -d $i || continue
34
find . -name \*.c\* -o -name \*.h\* | fgrep -v ".svn" \
35
| xargs "${XGETTEXT:-xgettext}" $XGETTEXT_FLAGS -j -o ${podir}/krusader.pot
37
if test "$exit_code" -ne 0; then
38
echo "Bash exit code: $exit_code"