Eichhoernchen/SiriServer — Issue #110: British English kludge
Author: autobuck
Created: 2012-02-06 16:58:05+00:00
State: open

Although it would be more elegant to have some way to combine en-* languages for responses, I put together a quick-and-dirty bash script that'll convert your plugins from en-US to en-GB after an update:

```
OLD="en-US"
NEW="en-GB"
DPATH="./*.py"
BPATH="./bak"
TFILE="/tmp/out.tmp.$$"
[ ! -d $BPATH ] && mkdir -p $BPATH || :
for f in $DPATH
do
if [ -f $f -a -r $f ]; then
/bin/cp -f $f $BPATH
sed "s/$OLD/$NEW/g" "$f" > $TFILE && mv $TFILE "$f"
else
echo "Error: Cannot read $f"
fi
done
/bin/rm $TFILE
```

Credit: modified from script at http://www.cyberciti.biz/faq/unix-linux-replace-string-words-in-many-files/