1 #! /bin/sh
3 set -e
5 echo "Generating updated POTFILES list..."
6 mydir=`dirname "$0"`
7 cd "$mydir"
8 if [ . = "$mydir" ]; then
9 prog="$0"
10 else
11 prog=`basename "$0"`
12 fi
14 rm -f po/POTFILES.in.new
16 (
17 echo "# List of source files containing translatable strings."
18 echo "# Please keep this file sorted alphabetically."
19 echo "# Generated by $prog at `date`"
20 echo "[encoding: UTF-8]"
21 echo "inkscape.desktop.in"
23 find src \( -name '*.cpp' -o -name '*.[ch]' \) -type f -print0 | xargs -0 egrep -l '(\<[QNC]?_|gettext) *\(' | sort
24 find share/extensions -name '*.py' -type f -print0 | xargs -0 egrep -l '(\<[QNC]?_|gettext) *\(' | sort
25 find share/extensions -name '*.inx' -type f -print | sort | sed 's%^%[type: gettext/xml] %'
26 ) > po/POTFILES.in.new
28 diff -q po/POTFILES.in po/POTFILES.in.new ||:
29 mv po/POTFILES.in.new po/POTFILES.in
30 echo "Done."