CMake: Default QT_I18N_SOURCE_LANGUAGE to "en"

Pick-to: 6.7
Task-number: QTBUG-122396
Change-Id: I36c76211529e685aa1c85a7fb1b15667ad479185
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
bb10
Joerg Bornemann 2024-02-19 12:10:35 +01:00
parent 1d55864607
commit 974d791f36
3 changed files with 8 additions and 2 deletions

View File

@ -3318,7 +3318,10 @@ macro(qt6_standard_project_setup)
AND NOT DEFINED QT_I18N_TRANSLATED_LANGUAGES)
set(QT_I18N_TRANSLATED_LANGUAGES ${__qt_sps_arg_I18N_TRANSLATED_LANGUAGES})
endif()
if(DEFINED __qt_sps_arg_I18N_SOURCE_LANGUAGE AND NOT DEFINED QT_I18N_SOURCE_LANGUAGE)
if(NOT DEFINED __qt_sps_arg_I18N_SOURCE_LANGUAGE)
set(__qt_sps_arg_I18N_SOURCE_LANGUAGE en)
endif()
if(NOT DEFINED QT_I18N_SOURCE_LANGUAGE)
set(QT_I18N_SOURCE_LANGUAGE ${__qt_sps_arg_I18N_SOURCE_LANGUAGE})
endif()
endif()

View File

@ -537,6 +537,8 @@ The languages in \c QT_I18N_TRANSLATED_LANGUAGES are used to:
This variable can be conveniently set with the
\l {qt6_standard_project_setup}{qt_standard_project_setup()} command.
By default, translatable strings are considered to be written in \c{en}.
\sa {qt6_standard_project_setup}{qt_standard_project_setup()}
\sa {qt6_add_translations}{qt_add_translations()}
*/

View File

@ -90,7 +90,8 @@ internationalization with the \c I18N_TRANSLATED_LANGUAGES argument. See \l
QT_I18N_TRANSLATED_LANGUAGES for details.
Use I18N_SOURCE_LANGUAGE to specify the language that translatable strings are
written in. See \l QT_I18N_SOURCE_LANGUAGE for details.
written in. By default, \c en is used. See \l QT_I18N_SOURCE_LANGUAGE for
details.
\section1 Example