2022-09-16 08:52:35 +00:00
|
|
|
LOCALES = en_US pl it nl de hu ru pt_BR fr uk_UA es_ES zh_CN tr_TR
|
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
|
2013-11-16 02:40:01 +00:00
|
|
|
find . -name '*.mo' -exec rm -f "{}" \;
|
|
|
|
find * -depth -type d -exec rmdir "{}" \;
|
2011-11-30 00:18:21 +00:00
|
|
|
|
|
|
|
chirpui.pot:
|
2015-03-03 15:15:38 +00:00
|
|
|
/usr/bin/find ../chirp/ui -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=$@ $^
|