qt5base-lts/mkspecs
Tor Arne Vestbø 4709c938db Apple: Add CFBundleAllowMixedLocalizations=YES to Info.plist files
We currently don't have any machinery for qmake or CMake to map
translations declared via TRANSLATIONS += or qt_add_translations
to the Info.plist CFBundleLocalizations key.

This results in macOS and iOS falling back to the development region,
CFBundleDevelopmentRegion, as the only supported localization of the
app, which is in most cases set to 'en'.

Unfortunately this doesn't work well with the behavior of iOS 11+
and macOS 10.13+ where the OS will set the locale of the app to
the best match between the app's supported localizations and the
user's preferred language.

https://developer.apple.com/library/archive/qa/qa1828/

Since we only support a single localization, the development region,
the locale always ends up as 'en_<REGION>', which after QTBUG-104930
is also reflected in the QLocale's uiLanguages(), resulting in the
QTranslator machinery always picking English translation for the app.

As long as we don't explicitly declare CFBundleLocalizations we need
to opt out of the system's behavior of finding the best match between
the app's declared localizations and the user's preferences, which we
can do via the CFBundleAllowMixedLocalizations key.

Fixes: QTBUG-63324
Pick-to: 6.4
Change-Id: If7586d342148cbbb1d2a152cef039aad4448b13c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-10-25 10:06:59 +00:00
..
aix-g++ Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
aix-g++-64 Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
android-clang Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
common Bump supported macOS SDK version for qmake to macOS 13 2022-10-14 21:05:51 +02:00
cygwin-g++ Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
darwin-g++ Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
devices Add new mkspecs device for Raspberry Pi 4 (64-bit) 2022-07-14 15:09:34 +03:00
dummy move all target spec handling to qmake-based configure system 2016-12-13 18:56:34 +00:00
features Guard some qmake 'simulator' conditions with iOS scope 2022-10-05 09:07:03 +02:00
freebsd-clang Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
freebsd-g++ Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
haiku-g++ Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
hpuxi-g++-64 Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
hurd-g++ Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
integrity-armv7 Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
integrity-armv7-imx6 Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
integrity-armv8-rcar Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
integrity-x86 Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
linux-aarch64-gnu-g++ Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
linux-arm-gnueabi-g++ Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
linux-clang Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
linux-clang-32 Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
linux-clang-libc++ Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
linux-clang-libc++-32 Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
linux-g++ Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
linux-g++-32 Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
linux-g++-64 Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
linux-icc Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
linux-icc-32 Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
linux-icc-64 Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
linux-icc-k1om Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
linux-llvm Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
linux-lsb-g++ Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
lynxos-g++ Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
macx-clang Apple: Add CFBundleAllowMixedLocalizations=YES to Info.plist files 2022-10-25 10:06:59 +00:00
macx-g++ Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
macx-icc Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
macx-ios-clang Apple: Add CFBundleAllowMixedLocalizations=YES to Info.plist files 2022-10-25 10:06:59 +00:00
macx-xcode Apple: Add CFBundleAllowMixedLocalizations=YES to Info.plist files 2022-10-25 10:06:59 +00:00
modules Adjust wiki links to the new redirect 2015-03-04 15:36:12 +00:00
netbsd-g++ Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
openbsd-g++ Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qnx-aarch64le-qcc Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qnx-armle-v7-qcc Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qnx-x86-64-qcc Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qnx-x86-qcc Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
solaris-cc Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
solaris-cc-64 Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
solaris-cc-64-stlport Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
solaris-cc-stlport Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
solaris-g++ Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
solaris-g++-64 Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
unsupported Apple: Add CFBundleAllowMixedLocalizations=YES to Info.plist files 2022-10-25 10:06:59 +00:00
wasm-emscripten wasm: don't set GL_DEBUG 2022-09-08 12:15:24 +00:00
win32-arm64-msvc Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
win32-clang-g++ Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
win32-clang-msvc Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
win32-g++ Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
win32-icc Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
win32-icc-k1om Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
win32-msvc Use SPDX license identifiers 2022-05-16 16:37:38 +02:00