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 authored and backportbot-nextcloud[bot] committed Jan 5, 2024
1 parent ac7e225 commit 6f4a3e3
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 6f4a3e3

Please sign in to comment.