From 45dbc4ce525a5b0567e2732ff84c1b8b79d9a644 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 3357e870064be..937d1efb00760 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("/i18n/"); + } else { + return QString::fromLatin1(SHAREDIR "/" APPLICATION_EXECUTABLE "/i18n/"); + } #endif } }