forked from blue/squawk
Compare commits
1 Commits
master
...
translatio
Author | SHA1 | Date | |
---|---|---|---|
|
bfd9e55934 |
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user