summaryrefslogtreecommitdiffstats
path: root/po/create_placeholder
diff options
context:
space:
mode:
authorPablo Saratxaga <pablo@mandriva.com>2001-02-14 17:22:34 +0000
committerPablo Saratxaga <pablo@mandriva.com>2001-02-14 17:22:34 +0000
commit217226efe1f63f3b9383e22a6c2616a118d1e6de (patch)
treed3e026a2307be35f057d5fbc398df27a262c1590 /po/create_placeholder
parent2a2de4e6275563b1d974f695ef87fa7748df6520 (diff)
downloadurpmi-217226efe1f63f3b9383e22a6c2616a118d1e6de.tar
urpmi-217226efe1f63f3b9383e22a6c2616a118d1e6de.tar.gz
urpmi-217226efe1f63f3b9383e22a6c2616a118d1e6de.tar.bz2
urpmi-217226efe1f63f3b9383e22a6c2616a118d1e6de.tar.xz
urpmi-217226efe1f63f3b9383e22a6c2616a118d1e6de.zip
i18n improvements
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.$$