
PO_FILES := $(wildcard *.po)

update-po: webboard.pot $(patsubst %.po,%.mo,$(wildcard *.po))
	# update the po files 
	for f in $(PO_FILES); do \
		intltool-update -r $${f%.po}  -g webboard ; \
	done

webboard.pot:
	intltool-update -p -g webboard

%.mo : %.po
	mkdir -p mo/$(subst .po,,$<)/LC_MESSAGES/ 
	msgfmt $< -o mo/$(subst .po,,$<)/LC_MESSAGES/webboard.mo 
