Workaround buggy Opera by adding newlines. Thanks Sander Smeenk
[squirrelmail.git] / po / compilepo
CommitLineData
505ce759 1#!/bin/sh
2
3# **
4# ** This script compiles locale PO files
5# **
6# ** Usage: compilepo <locale id>
7# ** Example: compilepo es
8# **
9# ** Philipe Mingo <mingo@rotedic.com>
10# ** Konstantin Riabitsev <icon@duke.edu>
11# **
12# ** $Id$
13
14if [ -z "$1" ]; then
15 echo "USAGE: compilepo [localename]"
16 exit 1
17fi
18
19WORKDIR=../locale
20LOCALEDIR=$WORKDIR/$1
21
22if [ ! -d $LOCALEDIR ]; then
23 # lessee if it's been renamed.
24 DCOUNT=`find $WORKDIR/ -name $1* | wc -l`
25 if [ $DCOUNT -eq 1 ]; then
26 # aha
27 LOCALEDIR=`find $WORKDIR/ -name $1*`
28 elif [ $DCOUNT -gt 1 ]; then
29 # err out
30 echo "More than one locale matching this name found:"
31 find $WORKDIR/ -name $1*
32 echo "You have to be more specific."
33 exit 1
34 fi
35fi
36
37echo "Compiling $LOCALEDIR/LC_MESSAGES/squirrelmail.po"
38msgfmt -o $LOCALEDIR/LC_MESSAGES/squirrelmail.mo \
39 $LOCALEDIR/LC_MESSAGES/squirrelmail.po
40