~ubuntu-branches/ubuntu/intrepid/kdesdk/intrepid-updates

« back to all changes in this revision

Viewing changes to kate/Messages.sh

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2008-05-28 10:11:43 UTC
  • mto: This revision was merged to the branch mainline in revision 37.
  • Revision ID: james.westby@ubuntu.com-20080528101143-gzc3styjz1b70zxu
Tags: upstream-4.0.80
ImportĀ upstreamĀ versionĀ 4.0.80

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
(cd data && $PREPARETIPS > ../tips.cpp)
 
3
 
 
4
find . -type d | fgrep -v '.svn' | sed -e 's,$,/,' > dirs
 
5
msh=`find . -name Messages.sh`
 
6
for dir in $msh; do
 
7
  dir=`dirname $dir`
 
8
  if test "$dir" != "."; then
 
9
    egrep -v "^$dir" dirs > dirs.new && mv dirs.new dirs
 
10
  fi
 
11
done
 
12
dirs=`cat dirs`
 
13
 
 
14
for fname in `find -iname '*.katetemplate'`; do
 
15
  for compound in template@item:inmenu \
 
16
                  group@item:inmenu \
 
17
                  description@info:whatsthis \
 
18
                  author@info:credit \
 
19
               ; do
 
20
    field=`echo $compound | sed 's/\(.*\)@.*/\1/'`
 
21
    ctxmark=`echo $compound | sed 's/.*\(@.*\)/\1/'`
 
22
      grep -inH "^katetemplate:.*$field=" $fname \
 
23
    | sed "s/\\([^:]*\\):\\([^:]*\\):.*$field= *\\([^=]*\\)\\( .*\\)\\?\$/\
 
24
           \/\/i18n: file \1 line \2\n\
 
25
           i18nc(\"$ctxmark\", \"\3\");\
 
26
           /i" \
 
27
    >> rc.cpp
 
28
  done
 
29
done
 
30
 
 
31
echo "rc.cpp" > files
 
32
find $dirs -maxdepth 1 -name "*.cpp" -print >> files
 
33
find $dirs -maxdepth 1 -name "*.cc" -print >> files
 
34
find $dirs -maxdepth 1 -name "*.h" -print >> files
 
35
$EXTRACTRC `find $dirs -maxdepth 1 \( -name \*.rc -o -name \*.ui -o -name \*.kcfg \) ` >> rc.cpp || exit 11
 
36
$XGETTEXT --files-from=files -o $podir/kate.pot
 
37
rm -f tips.cpp dirs files rc.cpp