From ae96b35bdd53bf78ddff62e8221481fd2402e8a2 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Thu, 4 Jan 2024 17:33:47 +0100 Subject: [PATCH] get the appimage path to translations instead of looking at the host Signed-off-by: Matthieu Gallien --- src/gui/application.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/application.cpp b/src/gui/application.cpp index 177dc5dcfe672..a692cb6b7903d 100644 --- a/src/gui/application.cpp +++ b/src/gui/application.cpp @@ -113,7 +113,11 @@ namespace { #elif defined(Q_OS_MAC) return QApplication::applicationDirPath() + QLatin1String("/../Resources/Translations"); // path defaults to app dir. #elif defined(Q_OS_UNIX) - return QString::fromLatin1(SHAREDIR "/" APPLICATION_EXECUTABLE "/i18n/"); + if (qEnvironmentVariableIsSet("APPIMAGE")) { + return QApplication::applicationDirPath() + QLatin1String("/../share/" APPLICATION_EXECUTABLE "/i18n/"); + } else { + return QString::fromLatin1(SHAREDIR "/" APPLICATION_EXECUTABLE "/i18n/"); + } #endif } }