aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile19
-rw-r--r--README7
2 files changed, 18 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
diff --git a/README b/README
index 0c1cb1d..6913aa6 100644
--- a/README
+++ b/README
@@ -47,3 +47,10 @@ License:
cd $DUDLE_HOME_FOLDER/dudle/extensions/
bzr branch https://dudle.inf.tu-dresden.de/unstable/extensions/10_participate/
bzr branch https://dudle.inf.tu-dresden.de/unstable/extensions/symcrypt/
+
+=== Translators ===
+If you set $DUDLE_POEDIT_AUTO to your lang, poedit will launch automatically when building the application.
+E.g.:
+ export DUDLE_POEDIT_AUTO=fr
+ bzr pull
+ make # will launch poedit if new french strings are to be translated