i18n: enable Qt6 build of lang/ and libcalamares translations
This commit is contained in:
parent
ad8c87e5d3
commit
49d449c211
@ -453,9 +453,7 @@ endif()
|
|||||||
set(CALAMARES_TRANSLATION_LANGUAGES en ${_tx_complete} ${_tx_good} ${_tx_ok})
|
set(CALAMARES_TRANSLATION_LANGUAGES en ${_tx_complete} ${_tx_good} ${_tx_ok})
|
||||||
list(SORT CALAMARES_TRANSLATION_LANGUAGES)
|
list(SORT CALAMARES_TRANSLATION_LANGUAGES)
|
||||||
|
|
||||||
if(NOT WITH_QT6) # TODO: Qt6
|
|
||||||
add_subdirectory(lang) # i18n tools
|
add_subdirectory(lang) # i18n tools
|
||||||
endif()
|
|
||||||
|
|
||||||
### Example Distro
|
### Example Distro
|
||||||
#
|
#
|
||||||
|
@ -101,7 +101,7 @@ function( calamares_add_branding_translations NAME )
|
|||||||
|
|
||||||
file( GLOB BRANDING_TRANSLATION_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${SUBDIRECTORY}/lang/calamares-${NAME}_*.ts" )
|
file( GLOB BRANDING_TRANSLATION_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${SUBDIRECTORY}/lang/calamares-${NAME}_*.ts" )
|
||||||
if ( BRANDING_TRANSLATION_FILES )
|
if ( BRANDING_TRANSLATION_FILES )
|
||||||
qt5_add_translation( QM_FILES ${BRANDING_TRANSLATION_FILES} )
|
qt_add_translation( QM_FILES ${BRANDING_TRANSLATION_FILES} )
|
||||||
add_custom_target( branding-translation-${NAME} ALL DEPENDS ${QM_FILES}
|
add_custom_target( branding-translation-${NAME} ALL DEPENDS ${QM_FILES}
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/lang/
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/lang/
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${QM_FILES} ${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/lang/
|
COMMAND ${CMAKE_COMMAND} -E copy ${QM_FILES} ${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/lang/
|
||||||
|
@ -15,10 +15,10 @@
|
|||||||
|
|
||||||
include(CalamaresAddTranslations)
|
include(CalamaresAddTranslations)
|
||||||
|
|
||||||
find_package(Qt5 COMPONENTS Xml)
|
find_package(${qtname} COMPONENTS Xml)
|
||||||
if(Qt5Xml_FOUND)
|
if(TARGET ${qtname}::Xml)
|
||||||
add_executable(txload txload.cpp)
|
add_executable(txload txload.cpp)
|
||||||
target_link_libraries(txload Qt5::Xml)
|
target_link_libraries(txload ${qtname}::Xml)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install_calamares_gettext_translations(python
|
install_calamares_gettext_translations(python
|
||||||
@ -50,7 +50,7 @@ set(CALAMARES_TRANSLATIONS_SOURCE ${trans_outfile})
|
|||||||
|
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/lang/calamares_i18n.qrc.in ${trans_infile} @ONLY)
|
configure_file(${CMAKE_SOURCE_DIR}/lang/calamares_i18n.qrc.in ${trans_infile} @ONLY)
|
||||||
|
|
||||||
qt5_add_translation(QM_FILES ${TS_FILES})
|
qt_add_translation(QM_FILES ${TS_FILES})
|
||||||
|
|
||||||
# Run the resource compiler (rcc_options should already be set)
|
# Run the resource compiler (rcc_options should already be set)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
|
@ -222,7 +222,7 @@ function(calamares_qrc_translations basename)
|
|||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/lang/calamares_i18n.qrc.in ${translations_qrc_infile} @ONLY)
|
configure_file(${CMAKE_SOURCE_DIR}/lang/calamares_i18n.qrc.in ${translations_qrc_infile} @ONLY)
|
||||||
qt5_add_translation(QM_FILES ${calamares_i18n_ts_filelist})
|
qt_add_translation(QM_FILES ${calamares_i18n_ts_filelist})
|
||||||
|
|
||||||
# Run the resource compiler (rcc_options should already be set)
|
# Run the resource compiler (rcc_options should already be set)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
|
Loading…
Reference in New Issue
Block a user