diff --git a/CMakeModules/CalamaresAddTranslations.cmake b/CMakeModules/CalamaresAddTranslations.cmake index 4d2fa265c..f53426e18 100644 --- a/CMakeModules/CalamaresAddTranslations.cmake +++ b/CMakeModules/CalamaresAddTranslations.cmake @@ -48,22 +48,6 @@ macro(add_calamares_translations language) ) endmacro() -# Internal macro for Python translations -# -# Translations of the Python modules that don't have their own -# lang/ subdirectories -- these are collected in top-level -# lang/python//LC_MESSAGES/python.mo -macro(add_calamares_python_translations language) - set( CALAMARES_LANGUAGES "" ) - list( APPEND CALAMARES_LANGUAGES ${ARGV} ) - - install_calamares_gettext_translations( python - SOURCE_DIR ${CMAKE_SOURCE_DIR}/lang/python - FILENAME python.mo - RENAME calamares-python.mo - ) -endmacro() - # Installs a directory containing language-code-labeled subdirectories with # gettext data into the appropriate system directory. Allows renaming the # .mo files during install to avoid namespace clashes. diff --git a/lang/CMakeLists.txt b/lang/CMakeLists.txt index 790d6098a..8658653ab 100644 --- a/lang/CMakeLists.txt +++ b/lang/CMakeLists.txt @@ -5,8 +5,16 @@ # ### +include( CalamaresAddTranslations ) + find_package(Qt5 COMPONENTS Xml) if( Qt5Xml_FOUND ) add_executable(txload txload.cpp) target_link_libraries(txload Qt5::Xml) endif() + +install_calamares_gettext_translations( python + SOURCE_DIR ${CMAKE_SOURCE_DIR}/lang/python + FILENAME python.mo + RENAME calamares-python.mo +) diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt index c7bd2755a..8e8c67848 100644 --- a/src/modules/CMakeLists.txt +++ b/src/modules/CMakeLists.txt @@ -73,8 +73,6 @@ foreach( _category ${_use_categories} ) endif() endforeach() -add_calamares_python_translations( ${CALAMARES_TRANSLATION_LANGUAGES} ) - # TODO:3.3: Use FindPython3 if ( BUILD_TESTING AND BUILD_SCHEMA_TESTING AND PYTHONINTERP_FOUND AND PYTHON_EXECUTABLE ) # The tests for each config file are independent of whether the