CMake: Set CFBundleDevelopmentRegion from QT_I18N_SOURCE_LANGUAGE
The value of QT_I18N_TRANSLATED_LANGUAGES is reflected in generated Info.plist files. We should do the same for QT_I18N_SOURCE_LANGUAGE. Pick-to: 6.7 Fixes: QTBUG-126790 Change-Id: Id9d680a183047942585e00f5d8cf1ac3c2352c9f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit ea435bb12766fea1a20cfdf67b8433593d20aeae) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
38ce3c67be
commit
2e58e04c75
@ -628,19 +628,31 @@ function(_qt_internal_set_apple_localizations target)
|
||||
COMMANDS "print CFBundleLocalizations"
|
||||
OUTPUT_VARIABLE existing_localizations
|
||||
)
|
||||
if(existing_localizations)
|
||||
return()
|
||||
if(NOT existing_localizations)
|
||||
list(TRANSFORM supported_languages PREPEND
|
||||
"Add CFBundleLocalizations: string ")
|
||||
|
||||
_qt_internal_plist_buddy("${plist_file}"
|
||||
COMMANDS
|
||||
"Add CFBundleLocalizations array"
|
||||
${supported_languages}
|
||||
"Delete CFBundleAllowMixedLocalizations"
|
||||
)
|
||||
endif()
|
||||
|
||||
list(TRANSFORM supported_languages PREPEND
|
||||
"Add CFBundleLocalizations: string ")
|
||||
|
||||
_qt_internal_plist_buddy("${plist_file}"
|
||||
COMMANDS
|
||||
"Add CFBundleLocalizations array"
|
||||
${supported_languages}
|
||||
"Delete CFBundleAllowMixedLocalizations"
|
||||
)
|
||||
if(NOT "${QT_I18N_SOURCE_LANGUAGE}" STREQUAL "")
|
||||
_qt_internal_plist_buddy("${plist_file}"
|
||||
COMMANDS "print CFBundleDevelopmentRegion"
|
||||
OUTPUT_VARIABLE existing_dev_region
|
||||
)
|
||||
if(NOT existing_dev_region)
|
||||
_qt_internal_plist_buddy("${plist_file}"
|
||||
COMMANDS
|
||||
"Add CFBundleDevelopmentRegion string"
|
||||
"Set CFBundleDevelopmentRegion ${QT_I18N_SOURCE_LANGUAGE}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(_qt_internal_set_ios_simulator_arch target)
|
||||
|
Loading…
x
Reference in New Issue
Block a user