diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2021-06-17 22:00:00 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-06-18 21:00:01 +0000 |
commit | 32bd657920476720b4e033ff2fe3743d83ace5b8 (patch) | |
tree | af30636921ecfd7070fbb5a3b028f473ba229cea /tests | |
parent | 4e3a8ad1cda4eba70ae3135b2afba17fbae99c48 (diff) |
qt6_add_translations: Add a way to create a resource with .qm files
When RESOURCE_PREFIX is specified, a resource is created that contains
all .qm files. The resource uses the specified prefix.
Typical usage of the function is:
qt6_add_translations(my_app
TS_FILES my_app_de.ts my_app_no.ts
RESOURCE_PREFIX "/translations")
Change-Id: I79aa5bb37514c18c75bfba7a3173f2cf5ab047c9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit f7766a3ab3b3ed3b1d29ea9ff9f5c48b42099ead)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/cmake/test_translation_api/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/cmake/test_translation_api/CMakeLists.txt b/tests/auto/cmake/test_translation_api/CMakeLists.txt index 3c0f4f968..09887264f 100644 --- a/tests/auto/cmake/test_translation_api/CMakeLists.txt +++ b/tests/auto/cmake/test_translation_api/CMakeLists.txt @@ -97,6 +97,12 @@ expect_target(app4_lrelease) expect_target(release_translations) expect_files_in_list(qm_files myobject_no.qm myobject_fi.qm) +# Typical usage of qt_add_translations with a generated resource. +create_app(app5) +qt6_add_translations(app5 + TS_FILES myobject_ru.ts + RESOURCE_PREFIX "/tränslehschns") + # Build the update_translations target add_custom_target(my_all_target ALL |