33c269d7d472ad3dfacbcd8f35dae3081b3c13e8
4 # ** This script merges global PO to locale PO files.
5 # ** It creates a squirrelmail.po.new that have to
6 # ** be renamed to squirrelmail.po once before to
9 # ** Usage: mergepo <locale id>
10 # ** Example: mergepo es
12 # ** Philipe Mingo <mingo@rotedic.com>
13 # ** Konstantin Riabitsev <icon@duke.edu>
18 echo "USAGE: mergepo [localename]"
25 if [ ! -d $LOCALEDIR ]; then
26 # lessee if it's been renamed.
27 DCOUNT
=`find $WORKDIR/ -name $1* | wc -l`
28 if [ $DCOUNT -eq 1 ]; then
30 LOCALEDIR
=`find $WORKDIR/ -name $1*`
31 elif [ $DCOUNT -gt 1 ]; then
33 echo "More than one locale matching this name found:"
34 find $WORKDIR/ -name $1*
35 echo "You have to be more specific."
40 echo "Merging $LOCALEDIR/LC_MESSAGES/squirrelmail.po"
41 mv $LOCALEDIR/LC_MESSAGES
/squirrelmail.po \
42 $LOCALEDIR/LC_MESSAGES
/squirrelmail.po.bak
43 msgmerge
$LOCALEDIR/LC_MESSAGES
/squirrelmail.po.bak ..
/po
/squirrelmail.po
> \
44 $LOCALEDIR/LC_MESSAGES
/squirrelmail.po
45 echo "Old po file renamed to squirrelmail.po.bak "