Skip to content

Commit

Permalink
get the appimage path to translations instead of looking at the host
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu Gallien <[email protected]>
  • Loading branch information
mgallien committed Jan 5, 2024
1 parent 2861c19 commit ae96b35
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gui/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit ae96b35

Please sign in to comment.