From aa0ea18356ca2435aac7fd0d2ae8f9e638bdaa46 Mon Sep 17 00:00:00 2001 From: Ilya Kitaev Date: Thu, 21 Jul 2016 16:29:37 +0300 Subject: [PATCH] translation files moved to resources --- TranslationManager.cpp | 4 ++-- monero-core.pro | 7 ++++--- qml.qrc | 6 ++++++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/TranslationManager.cpp b/TranslationManager.cpp index 69448ce2..afd04ef6 100644 --- a/TranslationManager.cpp +++ b/TranslationManager.cpp @@ -25,8 +25,8 @@ bool TranslationManager::setLanguage(const QString &language) return true; } - // we expecting to have translation files in "i18n" directory - QString dir = qApp->applicationDirPath() + QDir::separator() + "i18n"; + // translations are compiled into app binary + QString dir = ":/translations"; QString filename = "monero-core_" + language; diff --git a/monero-core.pro b/monero-core.pro index 877019d0..0c24ea0d 100644 --- a/monero-core.pro +++ b/monero-core.pro @@ -90,8 +90,9 @@ linux { macx { LIBS+= \ - -lboost_serialization \ - -lboost_thread \ + -L/usr/local/lib \ + -lboost_serialization \ + -lboost_thread-mt \ -lboost_system \ -lboost_date_time \ -lboost_filesystem \ @@ -123,7 +124,7 @@ trans_update.depends = $$_PRO_FILE_ trans_release.commands = lrelease $$_PRO_FILE_ trans_release.depends = trans_update $$TRANSLATIONS -translate.commands = $(MKDIR) ${DESTDIR}/i18n && $(COPY) $$PWD/translations/*.qm ${DESTDIR}/i18n +#translate.commands = $(MKDIR) ${DESTDIR}/i18n && $(COPY) $$PWD/translations/*.qm ${DESTDIR}/i18n translate.depends = trans_release QMAKE_EXTRA_TARGETS += trans_update trans_release translate diff --git a/qml.qrc b/qml.qrc index eca9f561..152ea8f2 100644 --- a/qml.qrc +++ b/qml.qrc @@ -114,5 +114,11 @@ pages/Receive.qml components/IconButton.qml lang/flags/italy.png + translations/monero-core_de.qm + translations/monero-core_en.qm + translations/monero-core_it.qm + translations/monero-core_pl.qm + translations/monero-core_ru.qm + translations/monero-core_zh.qm