aboutsummaryrefslogtreecommitdiffstats
path: root/util/run_xgettext.sh
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-10-18 16:26:54 -0700
committerzotlabs <mike@macgirvin.com>2016-10-18 16:26:54 -0700
commit9e3032e919e4778aff99c2fac7b1bb102aa6c934 (patch)
treee87a28f93283018e4756b9a68486402ca7cc0398 /util/run_xgettext.sh
parent2abea94f8ed835a24fcceb520cb50d3527583b99 (diff)
downloadvolse-hubzilla-9e3032e919e4778aff99c2fac7b1bb102aa6c934.tar.gz
volse-hubzilla-9e3032e919e4778aff99c2fac7b1bb102aa6c934.tar.bz2
volse-hubzilla-9e3032e919e4778aff99c2fac7b1bb102aa6c934.zip
more fixes to addons doc, include project addons in string extraction for translations, fix the string extractor which was looking in the old places for version info
Diffstat (limited to 'util/run_xgettext.sh')
-rwxr-xr-xutil/run_xgettext.sh20
1 files changed, 13 insertions, 7 deletions
diff --git a/util/run_xgettext.sh b/util/run_xgettext.sh
index 9402546a8..918597882 100755
--- a/util/run_xgettext.sh
+++ b/util/run_xgettext.sh
@@ -2,6 +2,12 @@
FULLPATH=$(dirname $(readlink -f "$0"))
+VINFO=`echo "<?php include 'boot.php'; echo PLATFORM_NAME . \" \" . STD_VERSION . \"\\n\";" | php`
+
+PROJECTNAME=`echo $VINFO | awk '{print $1;}'`
+F9KVERSION=`echo $VINFO | awk '{print $2;}'`
+
+
ADDONMODE=
ADDONNAME=
if [ "$1" == "--addon" -o "$1" == "-a" ]
@@ -24,13 +30,13 @@ else
OUTFILE="$FULLPATH/hmessages.po"
FINDSTARTDIR="../../"
# skip addon folder
- FINDOPTS="-wholename */addon -prune -o"
+ FINDOPTS=
+ RRIT="-wholename */extend -prune -o"
fi
-F9KVERSION=$(cat ../../version.inc);
-echo "Red version $F9KVERSION"
+echo "$PROJECTNAME version $F9KVERSION"
OPTS=
@@ -65,15 +71,15 @@ then
sed -i "s/YEAR THE PACKAGE'S COPYRIGHT HOLDER//g" "$OUTFILE"
sed -i "s/FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.//g" "$OUTFILE"
sed -i "s/PACKAGE VERSION//g" "$OUTFILE"
- sed -i "s/PACKAGE/Hubzilla $ADDONNAME addon/g" "$OUTFILE"
+ sed -i "s/PACKAGE/$PROJECTNAME $ADDONNAME addon/g" "$OUTFILE"
sed -i "s/CHARSET/UTF-8/g" "$OUTFILE"
sed -i '/^\"Plural-Forms/d' "$OUTFILE"
else
- sed -i "s/SOME DESCRIPTIVE TITLE./Hubzilla Project/g" "$OUTFILE"
- sed -i "s/YEAR THE PACKAGE'S COPYRIGHT HOLDER/2012-2014 the Hubzilla Project/g" "$OUTFILE"
+ sed -i "s/SOME DESCRIPTIVE TITLE./$PROJECTNAME/g" "$OUTFILE"
+ sed -i "s/YEAR THE PACKAGE'S COPYRIGHT HOLDER/2012-2016 $PROJECTNAME/g" "$OUTFILE"
sed -i "s/FIRST AUTHOR <EMAIL@ADDRESS>, YEAR./Mike Macgirvin, 2012/g" "$OUTFILE"
sed -i "s/PACKAGE VERSION/$F9KVERSION/g" "$OUTFILE"
- sed -i "s/PACKAGE/Red/g" "$OUTFILE"
+ sed -i "s/PACKAGE/$PROJECTNAME/g" "$OUTFILE"
sed -i "s/CHARSET/UTF-8/g" "$OUTFILE"
sed -i '/^\"Plural-Forms/d' "$OUTFILE"
fi