4709c938db
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> |
||
---|---|---|
.. | ||
aix-g++ | ||
aix-g++-64 | ||
android-clang | ||
common | ||
cygwin-g++ | ||
darwin-g++ | ||
devices | ||
dummy | ||
features | ||
freebsd-clang | ||
freebsd-g++ | ||
haiku-g++ | ||
hpuxi-g++-64 | ||
hurd-g++ | ||
integrity-armv7 | ||
integrity-armv7-imx6 | ||
integrity-armv8-rcar | ||
integrity-x86 | ||
linux-aarch64-gnu-g++ | ||
linux-arm-gnueabi-g++ | ||
linux-clang | ||
linux-clang-32 | ||
linux-clang-libc++ | ||
linux-clang-libc++-32 | ||
linux-g++ | ||
linux-g++-32 | ||
linux-g++-64 | ||
linux-icc | ||
linux-icc-32 | ||
linux-icc-64 | ||
linux-icc-k1om | ||
linux-llvm | ||
linux-lsb-g++ | ||
lynxos-g++ | ||
macx-clang | ||
macx-g++ | ||
macx-icc | ||
macx-ios-clang | ||
macx-xcode | ||
modules | ||
netbsd-g++ | ||
openbsd-g++ | ||
qnx-aarch64le-qcc | ||
qnx-armle-v7-qcc | ||
qnx-x86-64-qcc | ||
qnx-x86-qcc | ||
solaris-cc | ||
solaris-cc-64 | ||
solaris-cc-64-stlport | ||
solaris-cc-stlport | ||
solaris-g++ | ||
solaris-g++-64 | ||
unsupported | ||
wasm-emscripten | ||
win32-arm64-msvc | ||
win32-clang-g++ | ||
win32-clang-msvc | ||
win32-g++ | ||
win32-icc | ||
win32-icc-k1om | ||
win32-msvc |