From e26dac76bc82ba7888726cc0b2eb5103b50ef17e Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Mon, 20 Nov 2017 17:19:14 +0900 Subject: I18N: add basic functionality and a few translations Added very first i18n support in the simple application. Placed language buttons at the bottom to change current language. They should be removed once current language comes from somewhere. Laying out issues should be fixed later. Change-Id: Ib5d646784820cb2753edd5a588a8826ad7d20539 Signed-off-by: Tasuku Suzuki Signed-off-by: Tadao Tanikawa (cherry picked from commit 464e6c7f6056cec8a1d150216338d58a827307e6) --- app/translations.pri | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 app/translations.pri (limited to 'app/translations.pri') diff --git a/app/translations.pri b/app/translations.pri new file mode 100644 index 0000000..d5616ef --- /dev/null +++ b/app/translations.pri @@ -0,0 +1,16 @@ +defineReplace(prependAll) { + for(a,$$1):result += $$2$${a}$$3 + return($$result) +} + +LRELEASE = lrelease +TRANSLATIONS = $$prependAll(LANGUAGES, $$PWD/translations/$${TARGET}_,.ts) + +qm.depends = $${TRANSLATIONS} +qm.input = TRANSLATIONS +qm.output = $$OUT_PWD/../package/root/translations/${QMAKE_FILE_BASE}.qm +qm.commands = $$LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT} +qm.name = LRELEASE ${QMAKE_FILE_IN} +qm.CONFIG += no_link +QMAKE_EXTRA_COMPILERS += qm +PRE_TARGETDEPS += compiler_qm_make_all -- cgit 1.2.3-korg