summaryrefslogtreecommitdiff
path: root/src/lib/Makefile
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-09-11 10:19:02 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-09-11 15:43:36 -0400
commit8443cad920a59918069dbee3891b4b9595c528a3 (patch)
tree944abe452a5db85b045d422a39088bca7094a5cb /src/lib/Makefile
parent4b9f4323abfaa0f4030cc29aed97e0716f9c5852 (diff)
librelib: Internationalize (actually use the internationalization stuff)
Diffstat (limited to 'src/lib/Makefile')
-rw-r--r--src/lib/Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/Makefile b/src/lib/Makefile
index 255bc05..45fd330 100644
--- a/src/lib/Makefile
+++ b/src/lib/Makefile
@@ -16,3 +16,15 @@ common.sh: %: %.in %.top Makefile
echo && \
cat '$*.bottom' && \
:; } > '$@'
+
+# Translate ##########################################################
+
+pot: libreblacklist.pot common.sh.pot librelib.pot
+
+libreblacklist.pot: libreblacklist
+ { \
+ sed -n '/^# Usage:/,/()/{ /^#/ { =; p; } }' $< | sed -r -e 's/^# (.*)/msgid "\1"/' -e 's/^[0-9]*$$/#. embedded usage text\n#: $<:&/'; \
+ sed -rn '/print /{ =; s/\s*print "([^"]*)".*/msgid "\1"/p; }' $< | sed 's/^[0-9]*$$/#. print\n#: $<:&/' ; \
+ } | sed 's/^msgid .*/&\nmsgstr ""\n/' > $@
+common.sh.pot: common.sh
+ xgettext --omit-header -i --from-code=UTF-8 -L shell -o $@ $<