From 25eb83b1a1d09de22bffdeae5d55c5cf3aeadf93 Mon Sep 17 00:00:00 2001 From: Samir Aguiar Date: Tue, 27 Jan 2015 23:03:30 +0100 Subject: [PATCH] qmake: Copy generated translations files into app bundle The translations were not being added to the bundle when deploying the Mac app and thus no language other than English could be loaded. --- src/i18n.pri | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/i18n.pri b/src/i18n.pri index ef821177..5f201e5f 100644 --- a/src/i18n.pri +++ b/src/i18n.pri @@ -37,4 +37,12 @@ updateqm.input = TRANSLATIONS updateqm.output = ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.qm updateqm.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.qm updateqm.CONFIG += no_link no_clean target_predeps +updateqm.variable_out = copytranslations.files QMAKE_EXTRA_COMPILERS += updateqm + +# Copy translations into the bundle when one is created +mac:contains(CONFIG, "app_bundle") { + copytranslations.path = Contents/MacOS/translations + copytranslations.depends = updateqm + QMAKE_BUNDLE_DATA += copytranslations +}