summaryrefslogtreecommitdiffstats
path: root/po/generate_POTFILES.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
commitcca66b9ec4e494c1d919bff0f71a820d8afab1fa (patch)
tree146f39ded1c938019e1ed42d30923c2ac9e86789 /po/generate_POTFILES.sh
parentInitial commit. (diff)
downloadinkscape-cca66b9ec4e494c1d919bff0f71a820d8afab1fa.tar.xz
inkscape-cca66b9ec4e494c1d919bff0f71a820d8afab1fa.zip
Adding upstream version 1.2.2.upstream/1.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xpo/generate_POTFILES.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/po/generate_POTFILES.sh b/po/generate_POTFILES.sh
new file mode 100755
index 0000000..e153715
--- /dev/null
+++ b/po/generate_POTFILES.sh
@@ -0,0 +1,31 @@
+#! /bin/sh
+
+set -e
+
+echo "Generating updated POTFILES list..."
+mydir=`dirname "$0"`
+cd "$mydir"
+
+# enforce consistent sort order and date format
+export LC_ALL=C
+
+(
+ echo "../share/filters/filters.svg.h"
+ echo "../share/palettes/palettes.h"
+ echo "../share/paint/patterns.svg.h"
+ echo "../share/symbols/symbols.h"
+ echo "../share/templates/templates.h"
+
+ find ../src \( -name '*.cpp' -o -name '*.[ch]' \) -type f -print0 | xargs -0 egrep -l '(\<[QNC]?_|gettext) *\(' | sort
+
+) | grep -vx -f POTFILES.skip > POTFILES.src.in
+
+
+find ../share/extensions -name '*.py' -type f -print0 | xargs -0 egrep -l '(\<[QNC]?_|gettext) *\(' | grep -vx -f POTFILES.skip | sort > POTFILES.py.in
+find ../share/extensions -name '*.inx' -type f -print | grep -vx -f POTFILES.skip | sort > POTFILES.inx.in
+
+# Keep .glade files and .ui files separated.
+(
+ find ../share/ui -name '*.glade' -type f -print0 | xargs -0 egrep -l 'translatable' | sort
+ find ../share/ui -name '*.ui' -type f -print0 | xargs -0 egrep -l 'translatable' | sort
+) | grep -vx -f POTFILES.skip > POTFILES.ui.in