blob: b645f57dc26c3f3ed45d4c754695dec7f7bb5367 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#!/bin/bash
#
# fixmystreet/bin/gettext-extract
# Generate English language .po files from the source code and email templates,
# for FixMyStreet. Writes the output to appropriate .po files in locale/.
#
# Copyright (c) 2011 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org; WWW: http://www.mysociety.org/
cd "$(dirname $(readlink -f $BASH_SOURCE))/.."
# File to write to, clear it to start with
PO=locale/FixMyStreet.po
rm -f $PO
# we don't want to extract strings from all the cobrand templates so list
# the ones we care about
find templates/web/base templates/web/fixmystreet templates/web/zurich templates/web/fiksgatami -name '*.html' > template_list
# Extract from Perl
xgettext.pl --gnu-gettext --verbose --output $PO --plugin perl=* --plugin tt2 --directory perllib -f template_list --directory db --directory bin
# remove temporary list of templates
rm template_list
# Fix headers
# no such thing as tempfile on OS X
bin/update_po_header.bash $PO
echo "$( bin/gettext-nget-patch )" >> $PO
#bin/make_po FixMyStreet-EmptyHomes
#bin/make_po FixMyBarangay
|