kdelibs/kdeui/preparetips

27 lines
673 B
Text
Raw Permalink Normal View History

#!/bin/sh
2014-11-13 01:04:59 +02:00
# little script to extract the text from the tips file
# and output it, so xgettext can add the tips to the po file
#
# 2021 by Ivailo Monev <xakepa10@gmail.com>
2014-11-13 01:04:59 +02:00
# IMPORTANT NOTE: Do not change the output without checking if
# translations still work!
intip="no"
while read line;do
if echo "$line" | grep -q '<html>';then
intip="yes"
echo "// i18n: ectx: @info:tipoftheday";
printf "i18n(";
continue
elif echo "$line" | grep -q '</html>';then
intip="no"
echo ");";
fi
if [ "$intip" = "yes" ];then
echo "\""$(echo "$line" | sed -e 's|"|\\"|g' -e 's|\\|\\\\|g')"\\\n\""
fi
done < tips