Changeset 294

Show
Ignore:
Timestamp:
04/21/08 23:02:08 (9 months ago)
Author:
shupp
Message:

Updated update_lang.sh script

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/scripts/update_lang.sh

    r275 r294  
    11#!/bin/sh 
    22 
    3 LCDIR='../Framework/Site/Default/locale/en/LC_MESSAGES' 
     3LANGS='it  nl  pt  tr' 
     4LCBASE='../Framework/Site/Default/locale' 
     5LCDIR="$LCBASE/en/LC_MESSAGES" 
    46PHPFILE="$LCDIR/PHPmessages.po" 
    57SMARTYFILE="$LCDIR/SMARTYmessages.po" 
     
    2426# cleanup 
    2527rm $PHPFILE 
     28rm $LCBASE/en/LC_MESSAGES/messages.po-e 
     29rm $LCBASE/en/LC_MESSAGES/SMARTYmessages.po-e 
     30rm $LCBASE/en/LC_MESSAGES/PHPmessages.po-e 
    2631rm $SMARTYFILE 
    2732rm $TEMPFILE.php 
    2833rm $TEMPFILE.tpl 
    2934rm $TEMPFILE.smarty 
     35 
     36# update the non-en files 
     37for i in $LANGS; do 
     38    echo "merging $i ... " 
     39    LANGDIR="$LCBASE/$i/LC_MESSAGES" 
     40    mv $LANGDIR/messages.po $LANGDIR/messages.po.old 
     41    msgmerge -o $LANGDIR/messages.po \ 
     42        $LANGDIR/messages.po.old \ 
     43        $LCBASE/en/LC_MESSAGES/messages.po 
     44    echo "compiling $i ... " 
     45    (cd $LANGDIR ; msgfmt -v --check messages.po) 
     46    rm $LANGDIR/messages.po.old 
     47done