2 # to use this for the localisation of other plugins,
3 # just change the DOMAIN to the name of the Plugin.
4 # It is assumed, that the domain ist the same as
5 # the directory name of the plugin.
9 installdir = /usr/lib/enigma2/python/Plugins/Extensions/$(DOMAIN)
10 #GETTEXT=./pygettext.py
17 LANGPO := $(foreach LANG, $(LANGS),$(LANG).po)
18 LANGMO := $(foreach LANG, $(LANGS),$(LANG).mo)
20 default: $(DOMAIN).pot $(LANGPO) merge $(LANGMO)
21 for lang in $(LANGS); do \
22 mkdir -p $$lang/LC_MESSAGES; \
23 cp $$lang.mo $$lang/LC_MESSAGES/$(DOMAIN).mo; \
27 for lang in $(LANGS); do \
28 msgmerge --no-location -s -N -U $$lang.po $(DOMAIN).pot; \
32 # the TRANSLATORS: allows putting translation comments before the to-be-translated line.
34 $(GETTEXT) -L python --add-comments="TRANSLATORS:" -d $(DOMAIN) -s -o $(DOMAIN).pot ../src/*.py
35 msguniq -o $(DOMAIN)uniq.pot $(DOMAIN).pot
37 mv $(DOMAIN)uniq.pot $(DOMAIN).pot
46 msginit -l $@ -o $@ -i $(DOMAIN).pot --no-translator
48 CLEANFILES = $(foreach LANG, $(LANGS),$(LANG).mo)
53 install-data-am: default
54 for lang in $(LANGS); do \
55 mkdir -p $(DESTDIR)$(installdir)/locale/$$lang/LC_MESSAGES; \
56 cp $$lang.mo $(DESTDIR)$(installdir)/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo; \