summaryrefslogtreecommitdiff
path: root/make/po4a.mk
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2008-08-30 05:58:13 +0200
committerJonas Smedegaard <dr@jones.dk>2008-08-30 05:58:13 +0200
commit5ba88b00c0febd310764960fb1c9f2349940c04f (patch)
tree0e6b3f77ac8f31eb8bb8d296a5a5cf654d5d8485 /make/po4a.mk
parent5372326f884ddb654cf47edf9333eb9deed0b155 (diff)
parentf2ddf72b26f2f6d318f41264573787f505339b8e (diff)
Merge branch 'master' into _clean
Diffstat (limited to 'make/po4a.mk')
-rw-r--r--make/po4a.mk13
1 files changed, 13 insertions, 0 deletions
diff --git a/make/po4a.mk b/make/po4a.mk
index 9a09320..508935c 100644
--- a/make/po4a.mk
+++ b/make/po4a.mk
@@ -1,3 +1,8 @@
+package = PACKAGE
+module = MODULE
+version = VERSION
+locale = LOCALE
+
# override with e.g. htmltemplate when handling non-Markdown files
fileformat = text
@@ -10,6 +15,14 @@ threshold = 100
# potfile: path to POT file
mkpot:
po4a-gettextize -M UTF-8 -L UTF-8 -f "$(fileformat)" -o markdown $(patsubst %,-m %,$(l10nfiles)) -p "$(potfile)"
+ sed -i \
+ -e 's/^# SOME DESCRIPTIVE TITLE/# $(locale) translation of $(module) pages for $(package)./' \
+ -e '/^# This file/ s/PACKAGE/$(package)/' \
+ -e '/^"Project-Id-Version:/ s/PACKAGE/$(package) $(module)/' \
+ -e '/^"Project-Id-Version:/ s/VERSION/$(version)/' \
+ -e '/^"Content-Type:/ s/CHARSET/UTF-8/' \
+ -e '/^"Content-Transfer-Encoding:/ s/ENCODING/8bit/' \
+ "$(potfile)"
# Invoke from root dir of translated files
# masterdir: path to dir containing untranslated files