2013-03-31 01:14:01 +00:00
|
|
|
LOCALES = en_US pl it nl de hu ru pt_BR
|
2011-11-30 00:18:21 +00:00
|
|
|
MOFILES = $(patsubst %,%/LC_MESSAGES/CHIRP.mo,$(LOCALES))
|
|
|
|
|
|
|
|
COPY="Dan Smith <dsmith@danplanet.com>"
|
|
|
|
PKG=CHIRP
|
|
|
|
XGT_OPTS=--copyright-holder=$(COPY) --package-name=$(PKG)
|
|
|
|
|
|
|
|
all: $(MOFILES)
|
|
|
|
|
|
|
|
clean:
|
2012-03-23 18:48:57 +00:00
|
|
|
rm -f $(MOFILES) *~ *.orig
|
|
|
|
rm -f `find . -name '*.mo'`
|
|
|
|
rmdir `find * -depth -type d`
|
2011-11-30 00:18:21 +00:00
|
|
|
|
|
|
|
chirpui.pot:
|
2012-02-16 01:54:50 +00:00
|
|
|
/usr/bin/find ../chirpui -name '*.py' > .files
|
2011-11-30 00:18:21 +00:00
|
|
|
xgettext -L Python -k_ -o chirpui.pot -f .files $(XGT_OPTS)
|
|
|
|
|
|
|
|
%.po: chirpui.pot
|
|
|
|
if [ -f $@ ]; then \
|
|
|
|
msgmerge -U $@ chirpui.pot; \
|
|
|
|
else \
|
|
|
|
msginit --input=chirpui.pot --locale=$(@:%.po=%); \
|
|
|
|
fi
|
|
|
|
|
|
|
|
%/LC_MESSAGES/CHIRP.mo: %.po
|
|
|
|
mkdir -p $(shell dirname $@)
|
|
|
|
msgfmt --output-file=$@ $^
|