update/add some serbian translations
[vuplus_dvbapp-plugin] / autotimer / 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=AutoTimer
9 installdir = /usr/lib/enigma2/python/Plugins/Extensions/$(DOMAIN)
10 #GETTEXT=./pygettext.py
11 GETTEXT=xgettext
12
13 #MSGFMT = ./msgfmt.py
14 MSGFMT = msgfmt
15
16 LANGS := de es fy it nl tr sr
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
32 # the TRANSLATORS: allows putting translation comments before the to-be-translated line.
33 $(DOMAIN).pot:
34         $(GETTEXT) -L python --add-comments="TRANSLATORS:" -d $(DOMAIN) -s -o $(DOMAIN).pot ../src/*.py
35
36         ../../xml2po.py ../src/ >> $(DOMAIN).pot
37
38         msguniq -o $(DOMAIN)uniq.pot $(DOMAIN).pot
39         $(RM) $(DOMAIN).pot
40         mv $(DOMAIN)uniq.pot $(DOMAIN).pot
41
42 .PHONY: $(DOMAIN).pot
43
44
45 %.mo: %.po
46         $(MSGFMT) -o $@ $<
47
48 %.po:
49         msginit -l $@ -o $@ -i $(DOMAIN).pot --no-translator
50
51 CLEANFILES = $(foreach LANG, $(LANGS),$(LANG).mo)
52
53 clean-local:
54         $(RM) -r $(LANGS)
55
56 install-data-am: default
57         for lang in $(LANGS); do \
58                 mkdir -p $(DESTDIR)$(installdir)/locale/$$lang/LC_MESSAGES; \
59                 cp $$lang.mo $(DESTDIR)$(installdir)/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo; \
60         done