From ab93af0fad57f412fe17d876bbdc043dd35646b6 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 28 Dec 2018 04:23:52 +0100 Subject: adapt to QTranslator aka compile to .qm files and install them into the proper place --- po/Makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'po') diff --git a/po/Makefile b/po/Makefile index f8baee1..5d26007 100644 --- a/po/Makefile +++ b/po/Makefile @@ -2,7 +2,7 @@ LANGUAGES=$(basename $(wildcard *.po)) PACKAGE_NAME=mageiawelcome DESTDIR=$(RPM_BUILD_ROOT) -all: gmo +all: qm clean: @@ -41,11 +41,19 @@ gmo: msgfmt --verbose -o $$lang/LC_MESSAGES/$(PACKAGE_NAME).mo $$lang.po; \ done +qm: + @echo " **COMPILING** languages: $(LANGUAGES)" + @for lang in $(LANGUAGES); do \ + echo " **COMPILEMO** $$lang" ; \ + lconvert -o $$lang.ts $$lang.po ; \ + lrelease $$lang.ts ; \ + done + install: @echo " **INSTALL** languages: $(LANGUAGES)" + mkdir -p $(DESTDIR)/share/mageiawelcome/translations/ @for lang in $(LANGUAGES); do \ echo " **INSTALLMO** $$lang" ; \ - mkdir -p $(DESTDIR)/share/locale/$$lang/LC_MESSAGES/; \ - msgfmt -o $(DESTDIR)/share/locale/$$lang/LC_MESSAGES/$(PACKAGE_NAME).mo -f $$lang.po; \ + cp $$lang.qm $(DESTDIR)/share/mageiawelcome/translations/mageiawelcome_$$lang.qm; \ done -- cgit v1.2.1