From e99416456afd4aa8bde42016826f9a345291cbf3 Mon Sep 17 00:00:00 2001 From: Matthew Poletiek Date: Tue, 8 Dec 2020 21:03:16 -0600 Subject: Initial Commit --- locale/Makefile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 locale/Makefile (limited to 'locale/Makefile') diff --git a/locale/Makefile b/locale/Makefile new file mode 100644 index 0000000..5271862 --- /dev/null +++ b/locale/Makefile @@ -0,0 +1,28 @@ +LOCALES = en_US pl it nl de hu ru pt_BR fr uk_UA es_ES +MOFILES = $(patsubst %,%/LC_MESSAGES/CHIRP.mo,$(LOCALES)) + +COPY="Dan Smith " +PKG=CHIRP +XGT_OPTS=--copyright-holder=$(COPY) --package-name=$(PKG) + +all: $(MOFILES) + +clean: + rm -f $(MOFILES) *~ *.orig + find . -name '*.mo' -exec rm -f "{}" \; + find * -depth -type d -exec rmdir "{}" \; + +chirpui.pot: + /usr/bin/find ../chirp/ui -name '*.py' > .files + 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=$@ $^ -- cgit v1.2.3