update translation install path

This commit is contained in:
Simon Stürz 2016-08-17 18:25:00 +02:00 committed by Michael Zanetti
parent 5a7a5d2112
commit 1a74e9c1fe
2 changed files with 3 additions and 2 deletions

View File

@ -451,7 +451,7 @@ QTranslator *DevicePlugin::translator()
bool DevicePlugin::setLocale(const QLocale &locale) bool DevicePlugin::setLocale(const QLocale &locale)
{ {
// check if there are local translations // check if there are local translations
if (m_translator->load(locale, m_metaData.value("id").toString(), "-", QDir(QCoreApplication::applicationDirPath() + "../../translations/").absolutePath(), ".qm")) { if (m_translator->load(locale, m_metaData.value("id").toString(), "-", QDir(QCoreApplication::applicationDirPath() + "../../plugins/translations/").absolutePath(), ".qm")) {
qCDebug(dcDeviceManager()) << "* Load translation" << locale.name() << "for" << pluginName() << "from" << QDir(QCoreApplication::applicationDirPath() + "../../translations/").absolutePath(); qCDebug(dcDeviceManager()) << "* Load translation" << locale.name() << "for" << pluginName() << "from" << QDir(QCoreApplication::applicationDirPath() + "../../translations/").absolutePath();
return true; return true;
} }

View File

@ -23,9 +23,10 @@ infofile.commands = $$top_srcdir/plugins/guh-generateplugininfo -j ${QMAKE_FILE_
-o ${QMAKE_FILE_OUT} \ -o ${QMAKE_FILE_OUT} \
-b $$OUT_PWD \ -b $$OUT_PWD \
-t $$TRANSLATIONS; \ -t $$TRANSLATIONS; \
rsync -a "$$OUT_PWD"/translations/*.qm $$top_builddir/translations/; rsync -a "$$OUT_PWD"/translations/*.qm $$top_builddir/plugins/translations/;
QMAKE_EXTRA_COMPILERS += infofile QMAKE_EXTRA_COMPILERS += infofile
PRE_TARGETDEPS += compiler_infofile_make_all
# Install translation files # Install translation files
translations.path = /usr/share/guh/translations translations.path = /usr/share/guh/translations