File indexing completed on 2022-12-06 19:13:02

0001 #!/bin/sh
0002 
0003 # Invoke the extractrc script on all .ui, .rc, and .kcfg files in the sources.
0004 # The results are stored in a pseudo .cpp file to be picked up by xgettext.
0005 lst=`find . -name \*.rc -o -name \*.ui -o -name \*.kcfg`
0006 if [ -n "$lst" ] ; then
0007     $EXTRACTRC $lst >> rc.cpp
0008 fi
0009 
0010 # The extracted strings will be used by KColorTable::readNamedColor(),
0011 # see src/kdeui/kcolordialog.cpp. Here we extract from rgb.txt
0012 # the same subset of color names as in KColorTable::readNamedColor(),
0013 # i.e. we throw away
0014 #  - color names containing spaces,
0015 #  - color names containing "gray" or "grey" as substrings.
0016 #
0017 # This filtering was introduced long before KDE Frameworks 5.0,
0018 # probably for early versions of KDE SC 4.x or earlier. The rationale
0019 # for this filtering and the reason why we keep it is the following:
0020 #   1. Most colors names containing spaces in rgb.txt have also their
0021 #        versions written without spaces but with exactly same RGB
0022 #        components.
0023 #   2. There are too many "gray/grey" colors, keeping them in the list
0024 #        would add only mess.
0025 awk '$1 ~ "[0-9]+" && $4 !~ "gr[ae]y" && NF == 4 { print $4 }' kdeui/rgb.txt | LC_ALL=C sort -u | while read i ; do
0026     echo "i18nc(\"color\", \"$i\");" | sed -e "s#!# #g" >> rc.cpp
0027 done
0028 
0029 # Run xgettext to extract strings from all source files.
0030 $XGETTEXT `find . -name \*.cpp -o -name \*.h -o -name \*.qml` kdecore/TIMEZONES -o $podir/kdelibs4support.pot