refactor: macos move bundle resources to Deskflow.app/Resources/translations

This commit is contained in:
sithlord48
2025-11-19 20:43:15 -05:00
committed by Chris Rizzitello
parent 6eadba1ab2
commit 37177f8e45
2 changed files with 3 additions and 1 deletions

View File

@ -27,6 +27,7 @@ I18N::I18N(QObject *parent) : QObject{parent}
const QList<QDir> appTrDirs{
{QStringLiteral("%1/%2").arg(QCoreApplication::applicationDirPath(), QStringLiteral("translations"))},
{QStringLiteral("%1/../translations").arg(QCoreApplication::applicationDirPath())},
{QStringLiteral("%1/../Resources/translations").arg(QCoreApplication::applicationDirPath())},
{QStringLiteral("%1/../share/%2/translations").arg(QCoreApplication::applicationDirPath(), kAppId)},
{QStringLiteral("%1/.local/share/%2/translations").arg(QDir::homePath(), kAppId)},
{QStringLiteral("/usr/local/share/%1/translations").arg(kAppId)},
@ -47,6 +48,7 @@ I18N::I18N(QObject *parent) : QObject{parent}
const QList<QDir> qtTrDirs{
{QStringLiteral("%1/%2").arg(QCoreApplication::applicationDirPath(), QStringLiteral("translations"))},
{QStringLiteral("%1/../Resources/translations").arg(QCoreApplication::applicationDirPath())},
{QStringLiteral("%1/../qt-depends/translations").arg(QCoreApplication::applicationDirPath())},
{QStringLiteral("%1/../share/qt/translations").arg(QCoreApplication::applicationDirPath())},
{QStringLiteral("%1/.local/share/%2/translations").arg(QDir::homePath(), QStringLiteral("qt"))},

View File

@ -32,7 +32,7 @@ if (NOT BUILD_OSX_BUNDLE)
install(FILES ${TRS} DESTINATION ${CMAKE_INSTALL_I18N_DIR})
else()
#when making the bundle copy our translation into the bundle
set(BUNDLE_TR_DIR $<TARGET_BUNDLE_CONTENT_DIR:${CMAKE_PROJECT_PROPER_NAME}>/MacOS/translations)
set(BUNDLE_TR_DIR $<TARGET_BUNDLE_CONTENT_DIR:${CMAKE_PROJECT_PROPER_NAME}>/Resources/translations)
# find the qt translation files needed to copy into the bundle
get_target_property(lupdate_executable Qt6::lupdate IMPORTED_LOCATION)