Added Elektro - Please check
[vuplus_dvbapp-plugin] / elektro / po / Makefile.am
diff --git a/elektro/po/Makefile.am b/elektro/po/Makefile.am
new file mode 100644 (file)
index 0000000..00e7998
--- /dev/null
@@ -0,0 +1,57 @@
+#\r
+# to use this for the localisation of other plugins,\r
+# just change the DOMAIN to the name of the Plugin.\r
+# It is assumed, that the domain ist the same as\r
+# the directory name of the plugin.\r
+#\r
+\r
+DOMAIN=EPGSearch\r
+installdir = /usr/lib/enigma2/python/Plugins/Extensions/$(DOMAIN)\r
+#GETTEXT=./pygettext.py\r
+GETTEXT=xgettext\r
+\r
+#MSGFMT = ./msgfmt.py\r
+MSGFMT = msgfmt\r
+\r
+LANGS := de it\r
+LANGPO := $(foreach LANG, $(LANGS),$(LANG).po)\r
+LANGMO := $(foreach LANG, $(LANGS),$(LANG).mo)\r
+\r
+default: $(DOMAIN).pot $(LANGPO) merge $(LANGMO)\r
+       for lang in $(LANGS); do \\r
+               mkdir -p $$lang/LC_MESSAGES; \\r
+               cp $$lang.mo $$lang/LC_MESSAGES/$(DOMAIN).mo; \\r
+       done\r
+\r
+merge:\r
+       for lang in $(LANGS); do \\r
+               msgmerge --no-location -s -N -U $$lang.po $(DOMAIN).pot; \\r
+       done\r
+\r
+\r
+# the TRANSLATORS: allows putting translation comments before the to-be-translated line.\r
+$(DOMAIN).pot:\r
+       $(GETTEXT) -L python --add-comments="TRANSLATORS:" -d $(DOMAIN) -s -o $(DOMAIN).pot ../src/*.py\r
+       msguniq -o $(DOMAIN)uniq.pot $(DOMAIN).pot\r
+       $(RM) $(DOMAIN).pot\r
+       mv $(DOMAIN)uniq.pot $(DOMAIN).pot\r
+\r
+.PHONY: $(DOMAIN).pot\r
+\r
+\r
+%.mo: %.po\r
+       $(MSGFMT) -o $@ $<\r
+\r
+%.po:\r
+       msginit -l $@ -o $@ -i $(DOMAIN).pot --no-translator\r
+\r
+CLEANFILES = $(foreach LANG, $(LANGS),$(LANG).mo)\r
+\r
+clean-local:\r
+       $(RM) -r $(LANGS)\r
+\r
+install-data-am: default\r
+       for lang in $(LANGS); do \\r
+               mkdir -p $(DESTDIR)$(installdir)/locale/$$lang/LC_MESSAGES; \\r
+               cp $$lang.mo $(DESTDIR)$(installdir)/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo; \\r
+       done\r