diff options
author | Daniel Baumann <daniel@debian.org> | 2009-11-22 14:36:42 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2009-11-22 14:38:00 +0100 |
commit | a62f12110b19a52a58d7eae871012202cfa16055 (patch) | |
tree | 0bd188079c808ee8956fb5304c46ce8266b49f75 /po/Makefile | |
download | vyos-live-build-a62f12110b19a52a58d7eae871012202cfa16055.tar.gz vyos-live-build-a62f12110b19a52a58d7eae871012202cfa16055.zip |
Renaming categories to archive areas (Closes: #519690).
Diffstat (limited to 'po/Makefile')
-rw-r--r-- | po/Makefile | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/po/Makefile b/po/Makefile new file mode 100644 index 000000000..c77ddead4 --- /dev/null +++ b/po/Makefile @@ -0,0 +1,39 @@ +# Makefile to manage gettext files + +DOMAIN=live-helper +ECHO_FUNCTIONS="Echo_message Echo_verbose Echo_warning Echo_debug Echo_error Echo_breakage Echo" + +POFILES=$(wildcard *.po) +MOFILES=$(patsubst %.po,%.mo,$(POFILES)) +LINGUAS=$(basename $(POFILES)) +GETTEXTFILES=$(shell find ../helpers ../functions -type f) +POTFILE=$(DOMAIN).pot +DESTDIR=/ +XGETTEXT_KEYWORDS=$(shell echo $(ECHO_FUNCTIONS) |sed -e 's,\S\+,-k&,g') + +%.mo: %.po + msgfmt --statistics -o $@ $< + +%.po: $(DOMAIN).pot + msgmerge -U $*.po $(DOMAIN).pot + +$(DOMAIN).pot: $(GETTEXTFILES) + $(shell xgettext $(XGETTEXT_KEYWORDS) -L Shell -o $(DOMAIN).pot $(GETTEXTFILES)) + +update-po: live-helper.pot + -for lang in $(LINGUAS); do\ + msgmerge -U $$lang.po $(DOMAIN).pot; \ + done + +install: $(MOFILES) + -for lang in $(LINGUAS); do\ + install -d $(DESTDIR)/usr/share/locale/$$lang/LC_MESSAGES/; \ + install -m 644 $$lang.mo $(DESTDIR)/usr/share/locale/$$lang/LC_MESSAGES/$(DOMAIN).mo; \ + done + +all: update-po $(MOFILES) + +clean: + - rm *.mo *~ + +.PHONY: update-po |