Changeset View
Changeset View
Standalone View
Standalone View
src/Messages.sh
1 | #!/bin/sh | 1 | #!/bin/sh | ||
---|---|---|---|---|---|
2 | 2 | | |||
3 | # Extract strings from all source files. | 3 | # Extract strings from all source files. | ||
4 | # EXTRACT_TR_STRINGS extracts strings with lupdate and convert them to .pot with | 4 | # EXTRACT_TR_STRINGS extracts strings with lupdate and convert them to .pot with | ||
5 | # lconvert. | 5 | # lconvert. | ||
6 | $EXTRACT_TR_STRINGS `find . -name \*.cpp -o -name \*.h -o -name \*.ui -o -name \*.qml` -o $podir/kproperty_qt.pot | 6 | | ||
7 | function find_files() | ||||
8 | { | ||||
9 | while IFS='' read -r line ; do | ||||
10 | if echo "$line" | grep -q "${1}_LIB_SRCS" > /dev/null; then | ||||
11 | while IFS=' ' read -a file ; do | ||||
12 | if [ "$file" == ")" ]; then | ||||
13 | break | ||||
14 | elif echo "$file" | grep -q "^\w*#" > /dev/null || [ ! -f "$file" ] || \ | ||||
15 | echo "$file" | grep -qv "\.cpp\w*$" > /dev/null; then | ||||
16 | continue | ||||
17 | fi | ||||
18 | echo $file | ||||
19 | done | ||||
20 | fi | ||||
21 | done < CMakeLists.txt | ||||
22 | } | ||||
23 | | ||||
24 | function extract() | ||||
25 | { | ||||
26 | $EXTRACT_TR_STRINGS `find_files ${1}` -o $podir/${1}_qt.pot | ||||
27 | } | ||||
28 | | ||||
29 | extract kpropertycore | ||||
30 | extract kpropertywidgets |