Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Makefile « po « set_location - dev.gajim.org/gajim/gajim-plugins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4acc40b15cce4567b7b599e18ed5c00d20d114be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
PYFILES = $(shell find ../ -type f -name "*.py")
GLADEFILES = $(wildcard ../*.ui)
POFILES = $(wildcard *.po)

GLADEHFILES := $(GLADEFILES:.ui=.ui.h)

help:
	@echo "USAGE:"
	@echo "make update - updates messages.pot and .po files"
	@echo "make sr.po  - updates sr.po file OR creates new one"
	@echo "              (replace 'sr' with your language code)"

%.h: %
	intltool-extract --type="gettext/glade" $*


messages.pot: $(GLADEHFILES) $(PYFILES)
	xgettext -k_ -kN_ -o setlocation.pot $(PYFILES) $(GLADEHFILES) --from-code=utf-8

%.po: messages.pot
	@if test -f $@; then \
		echo -n "Updating '$*' language ";\
		msgmerge -U $@ setlocation.pot;\
	else \
		msginit -l $*.UTF8 -o $@; \
	fi
	$(RM) $(GLADEHFILES)

update: $(POFILES)

clean:
	$(RM) $(GLADEHFILES)

.PHONY:  update