aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2011-05-19 11:50:07 +0200
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2011-05-19 11:50:07 +0200
commitbd0e9396784689e2c5bd55361bf33e402a2009c0 (patch)
tree6a297c7ab1663e5af23ba49091f48b3e19095ce3 /Makefile
parentfc5efe2d6a79caffb810ab11070710e29b217409 (diff)
do not launch poedit by default
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 11 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 9c22b60..25f4335 100644
--- a/Makefile
+++ b/Makefile
@@ -19,22 +19,25 @@
DOMAIN=dudle
-default: $(foreach p,$(wildcard locale/*/$(DOMAIN).po), $(addsuffix .mo,$(basename $p)))
+locale: $(foreach p,$(wildcard locale/*/$(DOMAIN).po), $(addsuffix .mo,$(basename $p)))
locale/$(DOMAIN).pot: *.rb *.cgi
rm -f $@
rgettext *.cgi *.rb -o $@
%.mo: %.po
- rmsgfmt $*.po -o $*.mo
+ msgfmt $*.po -o $*.mo
locale/%/$(DOMAIN).po: locale/$(DOMAIN).pot
- msgmerge locale/$*/$(DOMAIN).po locale/$(DOMAIN).pot >/tmp/$(DOMAIN)_$*_tmp.po
- if [ "`msgcomm -u /tmp/$(DOMAIN)_$*_tmp.po locale/$*/$(DOMAIN).po`" ];then\
- mv /tmp/$(DOMAIN)_$*_tmp.po locale/$*/$(DOMAIN).po;\
+ msgmerge $@ $? >/tmp/$(DOMAIN)_$*_tmp.po
+ if [ "`msgcomm -u /tmp/$(DOMAIN)_$*_tmp.po $@`" ];then\
+ mv /tmp/$(DOMAIN)_$*_tmp.po $@;\
else\
- touch locale/$*/$(DOMAIN).po;\
+ touch $@;\
fi
- if [ "`postats -f locale/$*/$(DOMAIN).po|tail -n1 |cut -d"(" -f3|cut -d")" -f1`" = "100%\n" ];\
- then poedit locale/$*/$(DOMAIN).po;\
+ @if [ "`potool -fnt $@ -s`" != "0" -o "`potool -ff $@ -s`" != "0" ];then\
+ echo "WARNING: There are untranslated Strings in $@";\
+ if [ "X:$$DUDLE_POEDIT_AUTO" = "X:$*" ]; then\
+ poedit $@;\
+ fi;\
fi