summaryrefslogtreecommitdiffstats
path: root/po/create_placeholder
diff options
context:
space:
mode:
Diffstat (limited to 'po/create_placeholder')
-rwxr-xr-xpo/create_placeholder26
1 files changed, 26 insertions, 0 deletions
diff --git a/po/create_placeholder b/po/create_placeholder
new file mode 100755
index 00000000..be7ed316
--- /dev/null
+++ b/po/create_placeholder
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+cd ..
+echo -e "\
+/* this is a placeholder so that xgettext can find the translatable
+ * strings. This file is automatically generated, look at
+ * po/create_placeholder
+ */
+char *foobar[] = { " > placeholder.h.$$
+cat `grep -v placeholder.h po/POTFILES.in` | \
+ grep '$ECHO ".*"' | \
+ sed 's/^.*$ECHO \(".*"\)/N_(\1),/g' >> placeholder.h.$$
+
+for i in `grep -v placeholder.h po/POTFILES.in`
+do
+ po/pl_create_placeholder $i >> placeholder.h.$$
+done
+
+echo "};" >> placeholder.h.$$
+
+# diff returns true if files are equal
+if ! diff placeholder.h.$$ placeholder.h > /dev/null 2> /dev/null
+then
+ cat placeholder.h.$$ > placeholder.h
+fi
+rm -f placeholder.h.$$