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>
This is consistent with what $(DEVELOPMENT_LANGUAGE) reports, as well as
the Apple Locales Programming Guide which states that "Locale names such
as “English”, “French”, and “Japanese” are deprecated in OS X and are
supported solely for backward compatibility."
Pick-to: 6.4
Change-Id: I99779d678ef9d4ea90249572f2f977e9b4df6c62
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Aligns with what our CMake Info.plist has for macOS, what we do for
both qmake and CMake on iOS, and what Xcode generates for new projects.
The value is hard-coded to English instead of using $(DEVELOPMENT_LANGUAGE)
as the file will be used by both the Makefile and Xcode generator, and
only the latter does variable replacements for $(FOO).
Task-number: QTBUG-63324
Pick-to: 6.4
Change-Id: I87e1cb14b14a9746b3603016c2ac69c252d37ff6
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Is't been deprecated since Mac OS X 10.5.
Task-number: QTBUG-74872
Change-Id: I8b1ad7aca6448883cb164fd0c4b329592ca60548
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This ensures that the same set of variables can be successfully replaced
in both the Makefile and Xcode generators. It also switches the default
templates to use the Xcode-style ${var} syntax instead of the @var@
syntax for better Info.plist compatibility across generators.
Change-Id: Iff330bafd152773aafac9143c4a34e34f92f0ce6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This will allow Qt Quick applications to use the integrated GPU on
compatible Apple hardware, which helps preserve battery life.
Change-Id: I9224bd408930e2ed3dd8a022432512e78d69c195
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This makes editing the templates easier since they can be read
alphabetically.
Change-Id: I6af5e4f13718ba1145c2dec1f8a05bc600ea937a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
But still fall back to 'com.yourcompany', just like Xcode does for the
initial launch.
Change-Id: I89afadefafc254a0014aca197741d42a0199943e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Change the version number to 1.0, and use the public doctype.
Change-Id: I9b071c80c410c31c38813c4447edd7b186226fab
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
The plan is to make it the default mkspec for Qt 5 on Mac OS X.
Change-Id: I49cf619a06fd7155dfbddc377558327b4be09cef
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>