aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortg(x) <*@tg-x.net>2016-02-23 19:29:01 +0100
committertg(x) <*@tg-x.net>2016-02-23 19:29:01 +0100
commited203cbec3901ff10ea400ad2fabd6a2538890a7 (patch)
treea7e96452a3328c7c2b1a09e472138dd77aaed761
parentbc7cfc07ed351d4dd002ff74eea6fe396b437459 (diff)
Makefile: msguniq, i18n-clean, poname
-rw-r--r--extension/Makefile19
1 files changed, 15 insertions, 4 deletions
diff --git a/extension/Makefile b/extension/Makefile
index 968f8d98c..55a83c4f6 100644
--- a/extension/Makefile
+++ b/extension/Makefile
@@ -1,6 +1,7 @@
src = lib background content_scripts pages popup
ts = $(shell git ls-files $(src) | grep '\.tsx\?$$')
langs = en-US de-DE
+poname = taler-wallet
gulp = node_modules/gulp/bin/gulp.js
tsc = node_modules/typescript/bin/tsc
@@ -36,18 +37,28 @@ pogen: $(ts) pogen/pogen.js node_modules
for lang in $(langs); do \
echo $$lang; \
- test -e taler-$$lang.po || cp header.po taler-$$lang.po; \
- msgcat `find $(src) -name '*.po'` | msgmerge -o taler-$$lang.po taler-$$lang.po -; \
+ test -e $(poname)-$$lang.po || cp header.po $(poname)-$$lang.po; \
+ pos=`find $(src) -name '*.po'`; \
+ for po in $$pos; do \
+ msguniq -o $$po $$po; \
+ done; \
+ msgcat $$pos | msgmerge -o $(poname)-$$lang.po $(poname)-$$lang.po -; \
done
lib/i18n-strings.js: $(ts) pogen node_modules
for lang in $(langs); do \
- $(po2json) -f jed1.x -d $$lang taler-$$lang.po taler-$$lang.json; \
+ $(po2json) -f jed1.x -d $$lang $(poname)-$$lang.po $(poname)-$$lang.json; \
done
truncate -s0 $@
for lang in $(langs); do \
- (echo -n "i18n.strings['$$lang'] = "; cat taler-$$lang.json; echo ';') >> $@; \
+ (echo -n "i18n.strings['$$lang'] = "; cat $(poname)-$$lang.json; echo ';') >> $@; \
+ done
+
+i18n-clean:
+ find $(src) -name '*.po' -delete
+ for lang in $(langs); do \
+ rm -f $(poname)-$$lang.po $(poname)-$$lang.json; \
done
node_modules: