edit translations build

translation update
This commit is contained in:
arcan1s
2015-08-02 00:40:23 +03:00
parent 6173b60806
commit 5f7c35a37c
23 changed files with 2142 additions and 4550 deletions

View File

@ -1,4 +1,29 @@
find_package(Gettext REQUIRED)
set(MO_NAME plasma_applet_org.kde.plasma.awesomewidget.mo)
set(SND_MO_NAME plasma_applet_org.kde.plasma.desktoppanel.mo)
add_subdirectory (awesome-widget)
add_subdirectory (desktop-panel)
file(GLOB _po_files *.po)
set(_gmoFiles)
foreach(_current_PO_FILE ${_po_files})
get_filename_component(_lang ${_current_PO_FILE} NAME_WE)
set(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo)
add_custom_command(
OUTPUT ${_gmoFile}
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_current_PO_FILE}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
DEPENDS ${_current_PO_FILE}
)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo
DESTINATION ${LOCALE_INSTALL_DIR}/${_lang}/LC_MESSAGES/
RENAME ${MO_NAME}
)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo
DESTINATION ${LOCALE_INSTALL_DIR}/${_lang}/LC_MESSAGES/
RENAME ${SND_MO_NAME}
)
list(APPEND _gmoFiles ${_gmoFile})
endforeach(_current_PO_FILE)
add_custom_target(aw_pofiles ALL DEPENDS ${_gmoFiles})