summaryrefslogtreecommitdiff
path: root/i18n-to-gettext.pl
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2007-11-04 11:00:16 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2007-11-04 11:00:16 +0100
commit7823790beb2f16d93b59dd4dbc6c8112fb3bc97d (patch)
tree24861d45f0e39f5e689ccd42d5b29a507d12f849 /i18n-to-gettext.pl
parent993235bdcc83a11f704e32d60b7dfe3f387eb036 (diff)
downloadvdr-7823790beb2f16d93b59dd4dbc6c8112fb3bc97d.tar.gz
vdr-7823790beb2f16d93b59dd4dbc6c8112fb3bc97d.tar.bz2
Improved the 'i18n' target in plugin Makefiles
Diffstat (limited to 'i18n-to-gettext.pl')
-rwxr-xr-xi18n-to-gettext.pl24
1 files changed, 12 insertions, 12 deletions
diff --git a/i18n-to-gettext.pl b/i18n-to-gettext.pl
index b17f7d63..309a4720 100755
--- a/i18n-to-gettext.pl
+++ b/i18n-to-gettext.pl
@@ -10,7 +10,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
-# $Id: i18n-to-gettext.pl 1.5 2007/10/14 09:29:59 kls Exp $
+# $Id: i18n-to-gettext.pl 1.6 2007/11/04 10:57:36 kls Exp $
# How to convert an actual plugin:
#
@@ -306,25 +306,25 @@ $MAKEI18N = q{### Internationalization (I18N):
PODIR = po
LOCALEDIR = $(VDRDIR)/locale
I18Npo = $(wildcard $(PODIR)/*.po)
-I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
-I18Ndirs = $(notdir $(foreach file, $(I18Npo), $(basename $(file))))
+I18Nmsgs = $(addprefix $(LOCALEDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
I18Npot = $(PODIR)/$(PLUGIN).pot
%.mo: %.po
msgfmt -c -o $@ $<
$(I18Npot): $(wildcard *.c)
- xgettext -C -cTRANSLATORS --no-wrap -F -k -ktr -ktrNOOP --msgid-bugs-address='<} . $MSGIDBUGS . q{>' -o $@ $(wildcard *.c)
+ xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --msgid-bugs-address='<} . $MSGIDBUGS . q{>' -o $@ $^
-$(I18Npo): $(I18Npot)
- msgmerge -U --no-wrap -F --backup=none -q $@ $<
+%.po: $(I18Npot)
+ msgmerge -U --no-wrap --no-location --backup=none -q $@ $<
+ @touch $@
-i18n: $(I18Npot) $(I18Nmo)
- @mkdir -p $(LOCALEDIR)
- for i in $(I18Ndirs); do\
- mkdir -p $(LOCALEDIR)/$$i/LC_MESSAGES;\
- cp $(PODIR)/$$i.mo $(LOCALEDIR)/$$i/LC_MESSAGES/vdr-$(PLUGIN).mo;\
- done
+$(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
+ @mkdir -p $(dir $@)
+ cp $< $@
+
+.PHONY: i18n
+i18n: $(I18Nmsgs)
};