aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Konno <joe.konno@intel.com>2016-08-03 16:50:02 -0700
committerJoe Konno <joe.konno@intel.com>2016-08-04 08:52:49 -0700
commit49fbc68887ea565b6c0421d919673e9ea696442a (patch)
treeb82e3770edfe7134e2f0817bcede4a668ac9f6cb
parent6d56120e04f25a7c756a3ea4756bbfc63b36cd5a (diff)
scripts: add regenerate-potfiles-in script
This is a convenience script for maintainers or translators. POTFILES.in is input into gettext for string translation. Signed-off-by: Joe Konno <joe.konno@intel.com>
-rw-r--r--scripts/regenerate-potfiles-in15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/regenerate-potfiles-in b/scripts/regenerate-potfiles-in
new file mode 100644
index 0000000..a178fa0
--- /dev/null
+++ b/scripts/regenerate-potfiles-in
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+echo "INFO: checking for git ..."
+git --version > /dev/null 2>&1 || exit 1
+
+echo "INFO: priming ./POTFILES.in.new ..."
+touch POTFILES.in.new || exit 2
+echo "# List of source files which contain translatable strings." > POTFILES.in.new || exit 3
+echo "" >> POTFILES.in.new || exit 4
+
+echo "INFO: populating ./POTFILES.in.new ..."
+git grep -l -e "__(" -e "_(" | sort >> POTFILES.in.new || exit 5
+
+echo "INFO: contents of ./POTFILES.in.new ..."
+cat POTFILES.in.new