summaryrefslogtreecommitdiffstats
path: root/po/generate_POTFILES.sh
diff options
context:
space:
mode:
Diffstat (limited to 'po/generate_POTFILES.sh')
-rwxr-xr-xpo/generate_POTFILES.sh63
1 files changed, 10 insertions, 53 deletions
diff --git a/po/generate_POTFILES.sh b/po/generate_POTFILES.sh
index 7c3a17bec..e8fa85ab2 100755
--- a/po/generate_POTFILES.sh
+++ b/po/generate_POTFILES.sh
@@ -5,66 +5,23 @@ set -e
echo "Generating updated POTFILES list..."
mydir=`dirname "$0"`
cd "$mydir"
-if [ . = "$mydir" ]; then
- prog="$0"
-else
- prog=`basename "$0"`
-fi
-
-rm -f POTFILES.in.new
-
-(
- # enforce consistent sort order and date format
- export LC_ALL=C
-
- echo "# List of source files containing translatable strings."
- echo "# Please keep this file sorted alphabetically."
- echo "# Generated by $prog at `date`"
- echo "org.inkscape.Inkscape.appdata.xml.in"
- echo "org.inkscape.Inkscape.desktop.in"
- echo "share/filters/filters.svg.h"
- echo "share/palettes/palettes.h"
- echo "share/patterns/patterns.svg.h"
- echo "share/symbols/symbols.h"
- echo "share/templates/templates.h"
-
- cd ..
- 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] %'
- cd po
-
- #do not include files from POTFILES.skip in the generated list
-) | grep -vx -f POTFILES.skip > POTFILES.in.new
-
-
-diff -q POTFILES.in POTFILES.in.new ||:
-mv POTFILES.in.new POTFILES.in
-
-rm -f POTFILES.ui.in.new
(
# enforce consistent sort order and date format
export LC_ALL=C
+ echo "../share/filters/filters.svg.h"
+ echo "../share/palettes/palettes.h"
+ echo "../share/patterns/patterns.svg.h"
+ echo "../share/symbols/symbols.h"
+ echo "../share/templates/templates.h"
- echo "# List of source files containing translatable strings."
- echo "# Please keep this file sorted alphabetically."
- echo "# Generated by $prog at `date`"
+ find ../src \( -name '*.cpp' -o -name '*.[ch]' \) -type f -print0 | xargs -0 egrep -l '(\<[QNC]?_|gettext) *\(' | sort
- cd ..
- find share/ui -name '*.ui' -type f -print | sort | sed 's%^%../%'
- find share/ui -name '*.glade' -type f -print | sort | sed 's%^%../%'
- find share/ui -name '*.xml' -type f -print | sort | sed 's%^%../%'
+) | grep -vx -f POTFILES.skip > POTFILES.src.in
- cd po
- #do not include files from POTFILES.skip in the generated list
-) | grep -vx -f POTFILES.skip > POTFILES.ui.in.new
+find ../share/extensions -name '*.py' -type f -print0 | xargs -0 egrep -l '(\<[QNC]?_|gettext) *\(' | sort > POTFILES.py.in
+find ../share/extensions -name '*.inx' -type f -print | sort > POTFILES.inx.in
+find ../share/ui -name '*.glade' -type f -print0 | sort > POTFILES.ui.in
-diff -q POTFILES.ui.in.new POTFILES.ui.in ||:
-mv POTFILES.ui.in.new POTFILES.ui.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."