1
0
forked from blue/squawk

Compare commits

...

1 Commits

Author SHA1 Message Date
Benson Muite
bfd9e55934 Put translations in locale directory 2024-10-07 08:05:36 +03:00

View File

@ -7,6 +7,15 @@ set(TS_FILES
) )
qt_add_translation(QM_FILES ${TS_FILES}) qt_add_translation(QM_FILES ${TS_FILES})
add_custom_target(translations ALL DEPENDS ${QM_FILES}) add_custom_target(translations ALL DEPENDS ${QM_FILES})
install(FILES ${QM_FILES} DESTINATION ${CMAKE_INSTALL_DATADIR}/macaw.me/squawk/l10n)
# Modified from https://techbase.kde.org/Development/Tutorials/Localization/i18n_Build_Systems/Outside_KDE_repositories
foreach(_qmFile ${QM_FILES})
get_filename_component(_qmFileName ${_qmFile} NAME)
string(REGEX MATCH "\\.[_A-Za-z]+\\." _langCode ${_qmFileName} )
string(REGEX REPLACE "\\." "" _langCode ${_langCode})
if( _langCode )
install(FILES ${_qmFile} DESTINATION ${CMAKE_INSTALL_DATADIR}/locale/${_langCode}/LC_MESSAGES RENAME squawk.qm)
endif( _langCode )
endforeach(_qmFile ${QM_FILES})
add_dependencies(${CMAKE_PROJECT_NAME} translations) add_dependencies(${CMAKE_PROJECT_NAME} translations)