From b83c723e3ff36a1390c1bd5b5ecfe26262ebdda1 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Thu, 10 Sep 2015 01:25:16 +0200 Subject: [PATCH] Allow (partial) translations even when run from build dir Makes it easier to catch translation issues earlier --- src/gui/application.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/application.cpp b/src/gui/application.cpp index 2bcafee6e..b8839d691 100644 --- a/src/gui/application.cpp +++ b/src/gui/application.cpp @@ -71,6 +71,12 @@ static const char optionsC[] = QString applicationTrPath() { + QString devTrPath = qApp->applicationDirPath() + QString::fromLatin1("/../src/gui/"); + if (QDir(devTrPath).exists()) { + // might miss Qt, QtKeyChain, etc. + qDebug() << "Running from build location! Translations may be incomplete!"; + return devTrPath; + } #if defined(Q_OS_WIN) return QApplication::applicationDirPath(); #elif defined(Q_OS_MAC) -- 2.30.2