fix path in two places,
[vuplus_dvbapp-plugin] / ac3lipsync / po / Makefile.am
1 #
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.
6 #
7
8 DOMAIN=AC3LipSync
9 installdir = /usr/lib/enigma2/python/Plugins/SystemPlugins/$(DOMAIN)
10 #GETTEXT=./pygettext.py
11 GETTEXT=xgettext
12
13 #MSGFMT = ./msgfmt.py
14 MSGFMT = msgfmt
15
16 LANGS := de
17 LANGPO := $(foreach LANG, $(LANGS),$(LANG).po)
18 LANGMO := $(foreach LANG, $(LANGS),$(LANG).mo)
19
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; \
24         done
25
26 merge:
27         for lang in $(LANGS); do \
28                 msgmerge --no-location -s -N -U $$lang.po $(DOMAIN).pot; \
29         done
30
31 # the TRANSLATORS: allows putting translation comments before the to-be-translated line.
32 $(DOMAIN).pot:
33         $(GETTEXT) -L python --add-comments="TRANSLATORS:" -d $(DOMAIN) -s -o $(DOMAIN).pot ../src/*.py
34
35         #../../xml2po.py ../src/ >> $(DOMAIN).pot
36
37         msguniq -o $(DOMAIN)uniq.pot $(DOMAIN).pot
38         $(RM) $(DOMAIN).pot
39         mv $(DOMAIN)uniq.pot $(DOMAIN).pot
40
41 .PHONY: $(DOMAIN).pot
42
43
44 %.mo: %.po
45         $(MSGFMT) -o $@ $<
46
47 %.po:
48         msginit -l $@ -o $@ -i $(DOMAIN).pot --no-translator
49
50 CLEANFILES = $(foreach LANG, $(LANGS),$(LANG).mo)
51
52 clean-local:
53         $(RM) -r $(LANGS)
54
55 install-data-am: default
56         for lang in $(LANGS); do \
57                 mkdir -p $(DESTDIR)$(installdir)/locale/$$lang/LC_MESSAGES; \
58                 cp $$lang.mo $(DESTDIR)$(installdir)/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo; \
59         done