modify trnas path

This commit is contained in:
jiegeaiai 2025-01-21 08:27:44 +08:00
parent 0be84e9717
commit 155324ea2f

View File

@ -84,7 +84,8 @@ void RecourceHelper::Init() {
#ifndef NDEBUG #ifndef NDEBUG
const QString transName = QString("./%1_%2.qm").arg(appName, QLocale().name()); const QString transName = QString("./%1_%2.qm").arg(appName, QLocale().name());
#else #else
const QString transName = QString("./translations/%1_%2.qm").arg(appName, QLocale().name()); const QString appDirPath = QApplication::applicationDirPath();
const QString transName = QString("%1/translations/%2_%3.qm").arg(appDirPath, appName, QLocale().name());
#endif #endif
qDebug() << transName; qDebug() << transName;
bool success = trans_.load(transName); bool success = trans_.load(transName);