translation files moved to resources

This commit is contained in:
Ilya Kitaev 2016-07-21 16:29:37 +03:00
parent e5d5a6082f
commit aa0ea18356
3 changed files with 12 additions and 5 deletions

View file

@ -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;

View file

@ -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

View file

@ -114,5 +114,11 @@
<file>pages/Receive.qml</file>
<file>components/IconButton.qml</file>
<file>lang/flags/italy.png</file>
<file>translations/monero-core_de.qm</file>
<file>translations/monero-core_en.qm</file>
<file>translations/monero-core_it.qm</file>
<file>translations/monero-core_pl.qm</file>
<file>translations/monero-core_ru.qm</file>
<file>translations/monero-core_zh.qm</file>
</qresource>
</RCC>