macOS DMG ships without translation files - UI always English regardless of system language
Flameshot Version: v14.0.0 official macOS DMG (packaging on current master is affected)
Operating System: macOS (packaging issue, not OS-version specific)
Description
The macOS DMG always shows an English UI, regardless of the system language, and selecting a language in Settings → Interface → UI language has no effect either. The compiled translation files (Internationalization_*.qm) are never shipped inside Flameshot.app, so all 40+ shipped translations (including fully-translated ones like zh_CN) are unreachable on macOS.
Root cause
configureTranslation()insrc/main.cpploadsInternationalization_*.qmfrom the paths returned byPathInfo::translationsPaths().- On macOS (the
Q_OS_UNIXbranch insrc/utils/pathinfo.cpp) those paths are:APP_PREFIX/share/flameshot/translations— a compile-time prefix baked in on the CI machine, which does not exist on end-user Macs;<binaryDir>/translations→Flameshot.app/Contents/MacOS/translations— this directory does not exist in the DMG;/usr/share/flameshot/translationsand/usr/local/share/flameshot/translations— do not exist.
- The DMG is built via
ninja create_dmg(.github/workflows/MacOS-pack.yml). Its custom target insrc/CMakeLists.txtpackages the build-treeFlameshot.appdirectly. Theinstall(FILES ${QM_FILES} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/flameshot/translations)rule that normally deploys the.qmfiles is never executed for the DMG, and nothing copies them intoFlameshot.app/Contents/MacOS/translations/. - Result: every candidate path fails,
translator.load()returns false, and the UI silently falls back to English (it only logsNo Flameshot translation found for ...).
Workaround (verified)
Compile a translation with lrelease and drop it where the app actually looks:
brew install qt@6
curl -LO https://raw.githubusercontent.com/flameshot-org/flameshot/v14.0.0/data/translations/Internationalization_zh_CN.ts
LRELEASE=$(find "$(brew --prefix qt@6)" -name lrelease -type f | head -1)
"$LRELEASE" Internationalization_zh_CN.ts
mkdir -p "/Applications/Flameshot.app/Contents/MacOS/translations"
cp Internationalization_zh_CN.qm "/Applications/Flameshot.app/Contents/MacOS/translations/"
codesign --force --deep --sign - /Applications/Flameshot.appAfter restarting Flameshot, the UI follows the system language / the language selected in settings.
Suggested fix
Copy ${QM_FILES} into the app bundle during packaging — e.g. a POST_BUILD step copying them to $<TARGET_BUNDLE_DIR:flameshot>/Contents/MacOS/translations/ (which matches the trPath already searched by PathInfo::translationsPaths()), or run the install step and include share/flameshot/translations alongside the bundle in the DMG.
Source: flameshot-org/flameshot