~inkscape.dev/inkscape/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#! /bin/sh

set -e

echo "Generating updated POTFILES list..."
mydir=`dirname "$0"`
cd "$mydir"
if [ . = "$mydir" ]; then
  prog="$0"
else
  prog=`basename "$0"`
fi

rm -f po/POTFILES.in.new

(
 echo "# List of source files containing translatable strings."
 echo "# Please keep this file sorted alphabetically."
 echo "# Generated by $prog at `date`"
 echo "[encoding: UTF-8]"
 echo "inkscape.desktop.in"
 echo "share/filters/filters.svg.h"

 find src \( -name '*.cpp' -o -name '*.[ch]' \) -type f -print0 | xargs -0 egrep -l '(\<[QNC]?_|gettext) *\(' | sort
 find share/extensions -name '*.py' -type f -print0 | xargs -0 egrep -l '(\<[QNC]?_|gettext) *\(' | sort
 find share/extensions -name '*.inx' -type f -print | sort | sed 's%^%[type: gettext/xml] %'
) > po/POTFILES.in.new

diff -q po/POTFILES.in po/POTFILES.in.new ||:
mv po/POTFILES.in.new po/POTFILES.in
echo "Done."
echo ""
echo "Now you need to run 'make distcheck' to find all the"
echo "places that get broken because of this script."