~inkscape.dev/inkscape/trunk

5745 by pjrm
generate_POTFILES.sh: Include files that use *gettext functions; exclude files that contain the string ‘_(’ when it's merely part of the string ‘a_(’ etc. (but allow N_, Q_, C_).
1
#! /bin/sh
2
3
set -e
5494 by mfloryan
Updated the po/POTFILES.in to reflect the new set of translatable files in source - closes bug #220739. Added a script to generate the POTFILES.in automatically.
4
5
echo "Generating updated POTFILES list..."
5745 by pjrm
generate_POTFILES.sh: Include files that use *gettext functions; exclude files that contain the string ‘_(’ when it's merely part of the string ‘a_(’ etc. (but allow N_, Q_, C_).
6
mydir=`dirname "$0"`
7
cd "$mydir"
8
if [ . = "$mydir" ]; then
9
  prog="$0"
10
else
11
  prog=`basename "$0"`
12
fi
13
14
rm -f po/POTFILES.in.new
15
16
(
13278 by Krzysztof Kosiński
Exclude files in POTFILES.skip from the POTFILES.in generated
17
 # enforce consistent sort order and date format
18
 export LC_ALL=C
19
5745 by pjrm
generate_POTFILES.sh: Include files that use *gettext functions; exclude files that contain the string ‘_(’ when it's merely part of the string ‘a_(’ etc. (but allow N_, Q_, C_).
20
 echo "# List of source files containing translatable strings."
21
 echo "# Please keep this file sorted alphabetically."
22
 echo "# Generated by $prog at `date`"
23
 echo "[encoding: UTF-8]"
14843 by su_v
Fix for make check
24
 echo "inkscape.appdata.xml.in"
5745 by pjrm
generate_POTFILES.sh: Include files that use *gettext functions; exclude files that contain the string ‘_(’ when it's merely part of the string ‘a_(’ etc. (but allow N_, Q_, C_).
25
 echo "inkscape.desktop.in"
6984 by Ted Gould
* Removing the bitmap files that aren't being used.
26
 echo "share/filters/filters.svg.h"
12494 by Krzysztof Kosiński
Update the generate_POTFILES.sh script and POTFILES.in
27
 echo "share/palettes/palettes.h"
28
 echo "share/patterns/patterns.svg.h"
12946 by JazzyNico
i18n. Symbols are now translatable (see Bug #1261198); POT file and French translation updated.
29
 echo "share/symbols/symbols.h"
30
 echo "share/templates/templates.h"
31
5745 by pjrm
generate_POTFILES.sh: Include files that use *gettext functions; exclude files that contain the string ‘_(’ when it's merely part of the string ‘a_(’ etc. (but allow N_, Q_, C_).
32
33
 find src \( -name '*.cpp' -o -name '*.[ch]' \) -type f -print0 | xargs -0 egrep -l '(\<[QNC]?_|gettext) *\(' | sort
34
 find share/extensions -name '*.py' -type f -print0 | xargs -0 egrep -l '(\<[QNC]?_|gettext) *\(' | sort
35
 find share/extensions -name '*.inx' -type f -print | sort | sed 's%^%[type: gettext/xml] %'
13278 by Krzysztof Kosiński
Exclude files in POTFILES.skip from the POTFILES.in generated
36
37
 #do not include files from POTFILES.skip in the generated list
38
) | grep -vx -f po/POTFILES.skip > po/POTFILES.in.new
39
5745 by pjrm
generate_POTFILES.sh: Include files that use *gettext functions; exclude files that contain the string ‘_(’ when it's merely part of the string ‘a_(’ etc. (but allow N_, Q_, C_).
40
41
diff -q po/POTFILES.in po/POTFILES.in.new ||:
5494 by mfloryan
Updated the po/POTFILES.in to reflect the new set of translatable files in source - closes bug #220739. Added a script to generate the POTFILES.in automatically.
42
mv po/POTFILES.in.new po/POTFILES.in
43
echo "Done."
6984 by Ted Gould
* Removing the bitmap files that aren't being used.
44
echo ""
45
echo "Now you need to run 'make distcheck' to find all the"
46
echo "places that get broken because of this script."