From da43f3dfb43085f9c58cef7d94f1a6ef962a582d Mon Sep 17 00:00:00 2001 From: Jyrki Gadinger Date: Wed, 26 Mar 2025 10:24:16 +0100 Subject: [PATCH] set CFBundleDevelopmentRegion to "en" and set CFBundleAllowMixedLocalizations according to [1] the value should be a ISO 639-1 code, so let's correct it `CFBundleAllowMixedLocalizations` is the most interesting one: with this being set the reported QLocale will no longer be English as well (this also bumps the version info to 2025 :D) [1]: https://developer.apple.com/documentation/bundleresources/information-property-list/cfbundledevelopmentregion Signed-off-by: Jyrki Gadinger --- cmake/modules/MacOSXBundleInfo.plist.in | 16 +++++++++------- src/gui/application.cpp | 2 ++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/cmake/modules/MacOSXBundleInfo.plist.in b/cmake/modules/MacOSXBundleInfo.plist.in index 4e79cc7401..5705f344d6 100644 --- a/cmake/modules/MacOSXBundleInfo.plist.in +++ b/cmake/modules/MacOSXBundleInfo.plist.in @@ -3,13 +3,15 @@ NSPrincipalClass - NSApplication - LSMinimumSystemVersion + NSApplication + LSMinimumSystemVersion 11.0 - LSUIElement - - CFBundleDevelopmentRegion - English + LSUIElement + + CFBundleDevelopmentRegion + en + CFBundleAllowMixedLocalizations + CFBundleExecutable @APPLICATION_NAME@ CFBundleIconFile @@ -29,7 +31,7 @@ CFBundleShortVersionString @MIRALL_VERSION_STRING@ NSHumanReadableCopyright - (C) 2014-2024 @APPLICATION_VENDOR_XML_ESCAPED@ + (C) 2014-2025 @APPLICATION_VENDOR_XML_ESCAPED@ NSSupportsAutomaticGraphicsSwitching NSRequiresAquaSystemAppearance diff --git a/src/gui/application.cpp b/src/gui/application.cpp index 6c00e6b6d7..53c85e4b21 100644 --- a/src/gui/application.cpp +++ b/src/gui/application.cpp @@ -1003,8 +1003,10 @@ QString substLang(const QString &lang) void Application::setupTranslations() { + qCInfo(lcApplication) << "System UI languages are:" << QLocale::system().uiLanguages(); const auto enforcedLocale = Theme::instance()->enforcedLocale(); const auto lang = substLang(!enforcedLocale.isEmpty() ? enforcedLocale : QLocale::system().uiLanguages(QLocale::TagSeparator::Underscore).first()); + qCInfo(lcApplication) << "selected application language:" << lang; auto *translator = new QTranslator(this); auto *qtTranslator = new QTranslator(this);