summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2018-12-28 04:23:52 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2018-12-28 04:53:02 +0100
commitab93af0fad57f412fe17d876bbdc043dd35646b6 (patch)
treeb8d5f07c83ded332d848d229aeb5fb0839a4aeb8
parentb1696f2e6216039390314baf58ea2c2a14587347 (diff)
downloadmageiawelcome-ab93af0fad57f412fe17d876bbdc043dd35646b6.tar
mageiawelcome-ab93af0fad57f412fe17d876bbdc043dd35646b6.tar.gz
mageiawelcome-ab93af0fad57f412fe17d876bbdc043dd35646b6.tar.bz2
mageiawelcome-ab93af0fad57f412fe17d876bbdc043dd35646b6.tar.xz
mageiawelcome-ab93af0fad57f412fe17d876bbdc043dd35646b6.zip
adapt to QTranslator
aka compile to .qm files and install them into the proper place
-rw-r--r--po/Makefile14
1 files changed, 11 insertions, 3 deletions
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