aboutsummaryrefslogtreecommitdiffstats
path: root/bin/gettext-merge
blob: fe44f6ae4730643edb5d59ad77d5a3e84a8d7298 (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
35
36
37
38
39
40
#!/bin/bash
#
# bin/gettext-merge
# Update all .po files from new .pot
#
# Copyright (c) 2013 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org; WWW: http://www.mysociety.org/

# Yuck
if [ -e ../../locale ]
then
    cd ../../
else if [ -e ../locale ]
then
    cd ../
else if [ -e locale ]
then
    cd .
else 
    echo "Please run with current directory fixmystreet"
    exit 1
fi
fi
fi

for X in locale/*.UTF-8
do
    if [ -d $X ]
    then
        cd $X/LC_MESSAGES
        echo $X
        if [ -e FixMyStreetMobileApp.po ]
        then
            msgmerge --no-wrap -o New.po FixMyStreetMobileApp.po ../../FixMyStreetMobileApp.po
            mv New.po FixMyStreetMobileApp.po
        fi
        cd - >/dev/null
    fi
done