3 FULLPATH=$(dirname $(readlink -f "$0"))
4 cd "$FULLPATH/../view/en/"
6 F9KVERSION=$(sed -n "s/.*'FRIENDICA_VERSION'.*'\([0-9.]*\)'.*/\1/p" ../../boot.php);
8 echo "Friendica version $F9KVERSION"
11 OUTFILE="$FULLPATH/messages.po"
14 OUTFILE="$(readlink -f ${FULLPATH}/$1)"
17 echo "join extracted strings"
22 KEYWORDS="-k -kt -ktt:1,2"
24 echo "extract strings to $OUTFILE.."
25 find ../../ -name "*.php" | xargs xgettext $KEYWORDS $OPTS -o "$OUTFILE" --from-code=UTF-8
27 echo "setup base info.."
28 sed -i "s/SOME DESCRIPTIVE TITLE./FRIENDICA Distributed Social Network/g" "$OUTFILE"
29 sed -i "s/YEAR THE PACKAGE'S COPYRIGHT HOLDER/2010, 2011 the Friendica Project/g" "$OUTFILE"
30 sed -i "s/FIRST AUTHOR <EMAIL@ADDRESS>, YEAR./Mike Macgirvin, 2010/g" "$OUTFILE"
31 sed -i "s/PACKAGE VERSION/$F9KVERSION/g" "$OUTFILE"
32 sed -i "s/PACKAGE/Friendica/g" "$OUTFILE"
33 sed -i "s/CHARSET/UTF-8/g" "$OUTFILE"
34 sed -i "s/^\"Plural-Forms/#\"Plural-Forms/g" "$OUTFILE"