BASENAME=ipypbx TRANSLATION_LANGUAGES=ru fi TRANSLATIONS_PATH=src/ipypbx/locale PROJECT=$(BASENAME).pro all: ui translation ui: pyuic4 $(PROJECT) translation: po2ts transupdate ts2po transrelease po2ts: # Convert translation strings from PO format to TS. $(foreach lang, $(TRANSLATION_LANGUAGES), \ lconvert -i $(TRANSLATIONS_PATH)/$(BASENAME)_$(lang).po \ -o $(TRANSLATIONS_PATH)/$(BASENAME)_$(lang).ts;\ ) transupdate: # Update translation from GUI. pylupdate4 $(PROJECT) ts2po: # Convert translation strings to TS format from PO. $(foreach lang, $(TRANSLATION_LANGUAGES), \ lconvert -i $(TRANSLATIONS_PATH)/$(BASENAME)_$(lang).ts \ -o $(TRANSLATIONS_PATH)/$(BASENAME)_$(lang).po;\ ) transrelease: lrelease $(PROJECT)