diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -15,8 +15,7 @@ ${CMAKE_CURRENT_SOURCE_DIR} ) -# TODO: see T3992, Split kproperty_qt into kpropertycore_qt & kpropertywidgets_qt -ecm_create_qm_loader(kpropertycore_LIB_SRCS kproperty_qt) +ecm_create_qm_loader(kpropertycore_LIB_SRCS kpropertycore_qt) add_library(KPropertyCore SHARED ${kpropertycore_LIB_SRCS}) set_coinstallable_lib_version(KPropertyCore) @@ -86,8 +85,7 @@ Messages.sh ) - # TODO: reenable once kproperty_qt has been split - # ecm_create_qm_loader(kpropertywidgets_LIB_SRCS kpropertywidgets_qt) + ecm_create_qm_loader(kpropertywidgets_LIB_SRCS kpropertywidgets_qt) set(kpropertywidgets_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/editors diff --git a/src/Messages.sh b/src/Messages.sh --- a/src/Messages.sh +++ b/src/Messages.sh @@ -3,4 +3,28 @@ # Extract strings from all source files. # EXTRACT_TR_STRINGS extracts strings with lupdate and convert them to .pot with # lconvert. -$EXTRACT_TR_STRINGS `find . -name \*.cpp -o -name \*.h -o -name \*.ui -o -name \*.qml` -o $podir/kproperty_qt.pot + +function find_files() +{ + while IFS='' read -r line ; do + if echo "$line" | grep -q "${1}_LIB_SRCS" > /dev/null; then + while IFS=' ' read -a file ; do + if [ "$file" == ")" ]; then + break + elif echo "$file" | grep -q "^\w*#" > /dev/null || [ ! -f "$file" ] || \ + echo "$file" | grep -qv "\.cpp\w*$" > /dev/null; then + continue + fi + echo $file + done + fi + done < CMakeLists.txt +} + +function extract() +{ + $EXTRACT_TR_STRINGS `find_files ${1}` -o $podir/${1}_qt.pot +} + +extract kpropertycore +extract kpropertywidgets