summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-05-16 13:55:24 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-05-16 13:55:29 (GMT)
commitef8ac5ad5af699d87d876a546be43b7f6b744fac (patch)
tree4f4aa47986632d27d43394a2cc2e944be0212a13 /Modules
parent0789a8be08005d076568695ff3f85fb47f94620a (diff)
parent72ac7ad98da17f5f13dba9ab70ccddc18bd12ff5 (diff)
downloadCMake-ef8ac5ad5af699d87d876a546be43b7f6b744fac.zip
CMake-ef8ac5ad5af699d87d876a546be43b7f6b744fac.tar.gz
CMake-ef8ac5ad5af699d87d876a546be43b7f6b744fac.tar.bz2
Merge topic 'cpackifw-i18n'
72ac7ad9 CPackIFW: Internationalization Support Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !748
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CPackIFW.cmake46
1 files changed, 37 insertions, 9 deletions
diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake
index b4a6dc6..c1cb52f 100644
--- a/Modules/CPackIFW.cmake
+++ b/Modules/CPackIFW.cmake
@@ -55,6 +55,33 @@
# The :variable:`CPACK_IFW_ROOT` variable has a higher priority and overrides
# the value of the :variable:`QTIFWDIR` variable.
#
+# Internationalization
+# ^^^^^^^^^^^^^^^^^^^^
+#
+# Some variables and command arguments support internationalization via
+# CMake script. This is an optional feature.
+#
+# Installers created by QtIFW_ tools have built-in support for
+# internationalization and many phrases are localized to many languages,
+# but this does not apply to the description of the your components and groups
+# that will be distributed.
+#
+# Localization of the description of your components and groups is useful for
+# users of your installers.
+#
+# A localized variable or argument can contain a single default value, and a
+# set of pairs the name of the locale and the localized value.
+#
+# For example:
+#
+# .. code-block:: cmake
+#
+# set(LOCALIZABLE_VARIABLE "Default value"
+# en "English value"
+# en_US "American value"
+# en_GB "Great Britain value"
+# )
+#
# Variables
# ^^^^^^^^^
#
@@ -265,8 +292,8 @@
# cpack_ifw_configure_component(<compname> [COMMON] [ESSENTIAL] [VIRTUAL]
# [FORCED_INSTALLATION] [REQUIRES_ADMIN_RIGHTS]
# [NAME <name>]
-# [DISPLAY_NAME <display_name>]
-# [DESCRIPTION <description>]
+# [DISPLAY_NAME <display_name>] # Note: Internationalization supported
+# [DESCRIPTION <description>] # Note: Internationalization supported
# [UPDATE_TEXT <update_text>]
# [VERSION <version>]
# [RELEASE_DATE <release_date>]
@@ -368,8 +395,8 @@
# cpack_ifw_configure_component_group(<groupname> [VIRTUAL]
# [FORCED_INSTALLATION] [REQUIRES_ADMIN_RIGHTS]
# [NAME <name>]
-# [DISPLAY_NAME <display_name>]
-# [DESCRIPTION <description>]
+# [DISPLAY_NAME <display_name>] # Note: Internationalization supported
+# [DESCRIPTION <description>] # Note: Internationalization supported
# [UPDATE_TEXT <update_text>]
# [VERSION <version>]
# [RELEASE_DATE <release_date>]
@@ -546,8 +573,9 @@
#
# cpack_add_component(myapp
# DISPLAY_NAME "MyApp"
-# DESCRIPTION "My Application")
+# DESCRIPTION "My Application") # Default description
# cpack_ifw_configure_component(myapp
+# DESCRIPTION ru_RU "Мое Приложение" # Localized description
# VERSION "1.2.3" # Version of component
# SCRIPT "operations.qs")
# cpack_add_component(mybigplugin
@@ -835,8 +863,8 @@ macro(cpack_ifw_configure_component compname)
string(TOUPPER ${compname} _CPACK_IFWCOMP_UNAME)
set(_IFW_OPT COMMON ESSENTIAL VIRTUAL FORCED_INSTALLATION REQUIRES_ADMIN_RIGHTS)
- set(_IFW_ARGS NAME DISPLAY_NAME DESCRIPTION VERSION RELEASE_DATE SCRIPT PRIORITY SORTING_PRIORITY UPDATE_TEXT DEFAULT)
- set(_IFW_MULTI_ARGS DEPENDS DEPENDENCIES AUTO_DEPEND_ON LICENSES USER_INTERFACES TRANSLATIONS)
+ set(_IFW_ARGS NAME VERSION RELEASE_DATE SCRIPT PRIORITY SORTING_PRIORITY UPDATE_TEXT DEFAULT)
+ set(_IFW_MULTI_ARGS DISPLAY_NAME DESCRIPTION DEPENDS DEPENDENCIES AUTO_DEPEND_ON LICENSES USER_INTERFACES TRANSLATIONS)
cmake_parse_arguments(CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME} "${_IFW_OPT}" "${_IFW_ARGS}" "${_IFW_MULTI_ARGS}" ${ARGN})
_cpack_ifw_resolve_script(CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME}_SCRIPT)
@@ -876,8 +904,8 @@ macro(cpack_ifw_configure_component_group grpname)
string(TOUPPER ${grpname} _CPACK_IFWGRP_UNAME)
set(_IFW_OPT VIRTUAL FORCED_INSTALLATION REQUIRES_ADMIN_RIGHTS)
- set(_IFW_ARGS NAME DISPLAY_NAME DESCRIPTION VERSION RELEASE_DATE SCRIPT PRIORITY SORTING_PRIORITY UPDATE_TEXT DEFAULT)
- set(_IFW_MULTI_ARGS DEPENDS DEPENDENCIES AUTO_DEPEND_ON LICENSES USER_INTERFACES TRANSLATIONS)
+ set(_IFW_ARGS NAME VERSION RELEASE_DATE SCRIPT PRIORITY SORTING_PRIORITY UPDATE_TEXT DEFAULT)
+ set(_IFW_MULTI_ARGS DISPLAY_NAME DESCRIPTION DEPENDS DEPENDENCIES AUTO_DEPEND_ON LICENSES USER_INTERFACES TRANSLATIONS)
cmake_parse_arguments(CPACK_IFW_COMPONENT_GROUP_${_CPACK_IFWGRP_UNAME} "${_IFW_OPT}" "${_IFW_ARGS}" "${_IFW_MULTI_ARGS}" ${ARGN})
_cpack_ifw_resolve_script(CPACK_IFW_COMPONENT_GROUP_${_CPACK_IFWGRP_UNAME}_SCRIPT)