Add path to translation when run an app from install root.
This commit is contained in:
parent
31f63f8a32
commit
9f6697ab63
|
@ -217,6 +217,18 @@ auto VAbstractApplication::translationsPath(const QString &locale) -> QString
|
|||
return dir.absolutePath();
|
||||
}
|
||||
|
||||
#ifdef QBS_BUILD
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
dir.setPath(QCoreApplication::applicationDirPath() + "/../../.." + PKGDATADIR + trPath);
|
||||
#else
|
||||
dir = QDir(QCoreApplication::applicationDirPath() + "/../../.." + PKGDATADIR + trPath);
|
||||
#endif
|
||||
if (dir.exists())
|
||||
{
|
||||
return dir.absolutePath();
|
||||
}
|
||||
#endif // QBS_BUILD
|
||||
|
||||
#if defined(APPIMAGE) && defined(Q_OS_LINUX)
|
||||
/* Fix path to trasnaltions when run inside AppImage. */
|
||||
return AppImageRoot() + PKGDATADIR + trPath;
|
||||
|
|
Loading…
Reference in New Issue
Block a user