diff --git a/kcms/touchpad/CMakeLists.txt b/kcms/touchpad/CMakeLists.txt --- a/kcms/touchpad/CMakeLists.txt +++ b/kcms/touchpad/CMakeLists.txt @@ -11,5 +11,3 @@ add_subdirectory(src) add_subdirectory(icon) - -include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/l10n.cmake) diff --git a/kcms/touchpad/README.md b/kcms/touchpad/README.md --- a/kcms/touchpad/README.md +++ b/kcms/touchpad/README.md @@ -34,13 +34,6 @@ * [Arch Linux][3] - [AUR (from git master)][4] -Translations ------------- -Translations live in KDE's svn repository. -If they aren't shipped as part of KDE l10n packages, translations could be built and installed by adding -DTRANSLATIONS="lang1 lang2 ..." to cmake command line. -Language names are the same as in .desktop files. -.po files are fetched from svn repository automatically. -If downloading isn't possible, .po files could be placed in source directory under names "kcm_touchpad_lang1.po" and "plasma_applet_touchpad_lang1.po", where "lang1" is replaced with proper language name. Bugs ---- diff --git a/kcms/touchpad/cmake/l10n-download.cmake b/kcms/touchpad/cmake/l10n-download.cmake deleted file mode 100644 --- a/kcms/touchpad/cmake/l10n-download.cmake +++ /dev/null @@ -1,29 +0,0 @@ -# -# Copyright (C) 2013 Alexander Mezin -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -set(poFile ${CMAKE_CURRENT_BINARY_DIR}/${CATALOG}_${LANG_CODE}.po) -set(srcPoFile ${CMAKE_CURRENT_SOURCE_DIR}/${CATALOG}_${LANG_CODE}.po) - -if(EXISTS ${srcPoFile}) - copy_if_different(${srcPoFile} ${poFile}) -else() - file(DOWNLOAD - http://websvn.kde.org/*checkout*/trunk/l10n-kde4/${LANG_CODE}/messages/playground-utils/${CATALOG}.po - ${poFile} - SHOW_PROGRESS - ) -endif() diff --git a/kcms/touchpad/cmake/l10n.cmake b/kcms/touchpad/cmake/l10n.cmake deleted file mode 100644 --- a/kcms/touchpad/cmake/l10n.cmake +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (C) 2013 Alexander Mezin -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -set(TRANSLATIONS "" CACHE STRING "") - -if(NOT "${TRANSLATIONS}" STREQUAL "") - find_program(GETTEXT_MSGFMT_COMMAND msgfmt REQUIRED) - add_custom_target(translations ALL) - - set(translationList ${TRANSLATIONS}) - separate_arguments(translationList) - foreach(langCode ${translationList}) - message("Building translation ${langCode}") - - foreach(catalog kcm_touchpad plasma_applet_touchpad) - set(poFile ${CMAKE_CURRENT_BINARY_DIR}/${catalog}_${langCode}.po) - add_custom_command(OUTPUT ${poFile} - COMMAND ${CMAKE_COMMAND} ARGS - -DLANG_CODE=${langCode} - -DCATALOG=${catalog} - -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/l10n-download.cmake - ) - set(gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${catalog}_${langCode}.gmo) - add_custom_command(OUTPUT ${gmoFile} - COMMAND ${GETTEXT_MSGFMT_COMMAND} - ARGS --check -o ${gmoFile} ${poFile} - MAIN_DEPENDENCY ${poFile} - ) - install(FILES ${gmoFile} - DESTINATION ${LOCALE_INSTALL_DIR}/${langCode}/LC_MESSAGES/ - RENAME ${catalog}.mo - ) - list(APPEND gmoFiles ${gmoFile}) - endforeach() - - add_custom_target(translation_${langCode} SOURCES ${gmoFiles}) - add_dependencies(translations translation_${langCode}) - endforeach() -endif()