add czech language, thanks to ws79
[enigma2.git] / po / Makefile.am
1 DOMAIN=enigma2
2 #GETTEXT=./pygettext.py
3 GETTEXT=xgettext
4
5 #MSGFMT = ./msgfmt.py
6 MSGFMT = msgfmt
7
8 LANGS := de en ar nl es is it da sv no fr fi tr ca cs
9 LANGPO := $(foreach LANG, $(LANGS),$(LANG).po)
10 LANGMO := $(foreach LANG, $(LANGS),$(LANG).mo)
11
12 default: enigma2.pot $(LANGPO) merge $(LANGMO)
13         for lang in $(LANGS); do \
14                 mkdir -p $$lang/LC_MESSAGES; \
15                 cp $$lang.mo $$lang/LC_MESSAGES/enigma2.mo; \
16         done
17
18 merge:
19         for lang in $(LANGS); do \
20                 msgmerge -s -N -U $$lang.po enigma2.pot; \
21         done
22
23 enigma2.pot:
24         $(GETTEXT)      -d enigma2 -s -o enigma2.pot ../lib/python/Screens/*.py ../lib/python/Components/*.py \
25                         ../lib/python/Tools/*.py \
26                         ../*.py \
27                         ../lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py \
28                         ../lib/python/Plugins/SystemPlugins/SoftwareUpdate/plugin.py \
29                         ../lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/plugin.py \
30                         ../lib/python/Plugins/SystemPlugins/ConfigurationBackup/plugin.py 
31
32         ./xml2po.py     ../data/ >> enigma2.pot
33         msguniq -o enigma2uniq.pot enigma2.pot
34         $(RM) enigma2.pot
35         mv enigma2uniq.pot enigma2.pot
36
37 .PHONY: enigma2.pot
38
39
40 %.mo: %.po
41         $(MSGFMT) -o $@ $<
42
43 %.po:
44         msginit -l $@ -o $@ -i enigma2.pot --no-translator
45
46 clean:
47         $(RM) *.mo *.pot
48
49 install-data-am: default
50         for lang in $(LANGS); do \
51                 mkdir -p $(DESTDIR)$(DATADIR)/enigma2/po/$$lang/LC_MESSAGES; \
52                 cp $$lang.mo $(DESTDIR)$(DATADIR)/enigma2/po/$$lang/LC_MESSAGES/$(DOMAIN).mo; \
53         done