aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorfabrixxm <fabrix.xm@gmail.com>2011-03-11 01:23:24 +0100
committerfabrixxm <fabrix.xm@gmail.com>2011-03-11 01:23:24 +0100
commitee065da57abda84a4f52610796e63f6629753011 (patch)
tree5d805fe6febc8f188ea43523cff451209e626430 /util
parente1766b829f059e6e6a288178ee5b72dbd454dbae (diff)
downloadvolse-hubzilla-ee065da57abda84a4f52610796e63f6629753011.tar.gz
volse-hubzilla-ee065da57abda84a4f52610796e63f6629753011.tar.bz2
volse-hubzilla-ee065da57abda84a4f52610796e63f6629753011.zip
update sh script
Diffstat (limited to 'util')
-rwxr-xr-x[-rw-r--r--]util/run_xgettext.sh38
1 files changed, 24 insertions, 14 deletions
diff --git a/util/run_xgettext.sh b/util/run_xgettext.sh
index 2cfaca487..9d38e4da9 100644..100755
--- a/util/run_xgettext.sh
+++ b/util/run_xgettext.sh
@@ -1,26 +1,36 @@
#!/bin/bash
-cd $(dirname $0)
+FULLPATH=$(dirname $(readlink -f "$0"))
+cd "$FULLPATH/../view/en/"
-OPTS=
+F9KVERSION=$(sed -n "s/.*'FRIENDIKA_VERSION'.*'\([0-9.]*\)'.*/\1/p" ../../boot.php);
+
+echo "Friendika version $F9KVERSION"
-if [ -e "$1" ]
+OPTS=
+OUTFILE="$FULLPATH/messages.po"
+if [ "" != "$1" ]
then
- OPTS="-j -o $1"
+ OUTFILE="$(readlink -f ${FULLPATH}/$1)"
+ if [ -e "$OUTFILE" ]
+ then
+ echo "join extracted strings"
+ OPTS="-j"
+ fi
fi
KEYWORDS="-k -kt -ktt:1,2"
-find .. -name "*.php" | xargs xgettext $KEYWORDS $OPTS --from-code=UTF-8
-
-F9KVERSION=$(sed -n "s/.*'FRIENDIKA_VERSION'.*'\([0-9.]*\)'.*/\1/p" ../boot.php);
+echo "extract strings to $OUTFILE.."
+find ../../ -name "*.php" | xargs xgettext $KEYWORDS $OPTS -o "$OUTFILE" --from-code=UTF-8
+echo "setup base info.."
+sed -i "s/SOME DESCRIPTIVE TITLE./FRIENDIKA Distribuited Social Network/g" "$OUTFILE"
+sed -i "s/YEAR THE PACKAGE'S COPYRIGHT HOLDER/2010, 2011 Mike Macgirvin/g" "$OUTFILE"
+sed -i "s/FIRST AUTHOR <EMAIL@ADDRESS>, YEAR./Mike Macgirvin, 2010/g" "$OUTFILE"
+sed -i "s/PACKAGE VERSION/$F9KVERSION/g" "$OUTFILE"
+sed -i "s/PACKAGE/Friendika/g" "$OUTFILE"
+sed -i "s/CHARSET/UTF-8/g" "$OUTFILE"
-sed -i "s/SOME DESCRIPTIVE TITLE./FRIENDIKA Distribuited Social Network/g" messages.po
-sed -i "s/YEAR THE PACKAGE'S COPYRIGHT HOLDER/2010, 2011 Mike Macgirvin/g" messages.po
-sed -i "s/FIRST AUTHOR <EMAIL@ADDRESS>, YEAR./Mike Macgirvin, 2010/g" messages.po
-sed -i "s/PACKAGE VERSION/$F9KVERSION/g" messages.po
-sed -i "s/PACKAGE/Friendika/g" messages.po
-sed -i "s/CHARSET/UTF-8/g" messages.po
-sed -i "s|#: \.\./|#: ../../|g" messages.po
+echo "done." \ No newline at end of file