diff options
author | Dave Whiteland <dave@mysociety.org> | 2012-09-30 20:53:09 +0100 |
---|---|---|
committer | Dave Whiteland <dave@mysociety.org> | 2012-09-30 20:53:09 +0100 |
commit | 5657b851489339e33d60798b42f3d075260cac59 (patch) | |
tree | 9c966778e573e6118ea33ef50043718da7f1a1c9 /bin/gettext-extract | |
parent | 0806021813b2244a3359da633e83974b232dbd25 (diff) | |
parent | adb1f3b7e36b4ef0fea0439ef4be1186d36b377f (diff) |
Merge branch 'fmb-read-only' of ssh://git.mysociety.org/data/git/public/fixmystreet into fmb-read-only
Conflicts:
web/cobrands/fixmybarangay/message_manager.scss
Diffstat (limited to 'bin/gettext-extract')
-rwxr-xr-x | bin/gettext-extract | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/bin/gettext-extract b/bin/gettext-extract index 55623e86c..6bae8aa36 100755 --- a/bin/gettext-extract +++ b/bin/gettext-extract @@ -31,23 +31,27 @@ rm -f $PO xgettext.pl --gnu-gettext --verbose --output $PO --plugin perl=* --plugin tt2 --directory perllib --directory templates/web --directory db --directory bin # Fix headers -TEMP=`tempfile` +# no such thing as tempfile on OS X +TEMP=`tempfile 2>/dev/null || mktemp /tmp/gettext-extract.XXXXXX` NOW=`date +"%Y-%m-%d %H:%M%z"` +# strictly POSIX sed on e.g. OS X doesn't let you used \n in replacements so we do this +nl=$'\n'; cat $PO | sed " s/SOME DESCRIPTIVE TITLE/FixMyStreet original .po file, autogenerated by gettext-extract/; s/YEAR THE PACKAGE'S COPYRIGHT HOLDER/2011 UK Citizens Online Democracy/; s/PACKAGE package/main FixMyStreet code/; s/FIRST AUTHOR <EMAIL@ADDRESS>, YEAR./Matthew Somerville <matthew@mysociety.org>, 2011-06-03./; - s/PACKAGE VERSION/1.0\\\n\"\n\"Report-Msgid-Bugs-To: matthew@mysociety.org/; + s/PACKAGE VERSION/1.0\\\n\"\\$nl\"Report-Msgid-Bugs-To: matthew@mysociety.org/; s/POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE/POT-Creation-Date: $NOW/; s/LL@li.org/team@fixmystreet.com/; s/charset=CHARSET/charset=UTF-8/; - s/8bit/8bit\\\n\"\n\"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;/; + s/8bit/8bit\\\n\"\\$nl\"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;/; " >> $TEMP mv $TEMP $PO echo "$( bin/gettext-nget-patch )" >> $PO -bin/make_emptyhomes_po +bin/make_po FixMyStreet-EmptyHomes +bin/make_po FixMyBarangay |