Changeset 1268 for trunk/dopo.sh

Show
Ignore:
Timestamp:
09/15/04 11:37:19 (4 years ago)
Author:
anonymous
Message:

bugtrack

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dopo.sh

    r1262 r1268  
    11#!/bin/sh 
    22 
    3 MO="`echo $1|sed -e 's/po$/mo/'`" 
    4 msgfmt -v -v $1 -o $MO 
    5 rm $1 
     3# AlternC Language file builder 
     4# $id$ 
     5
     6# This script build one "alternc.mo" file per language in /var/alternc/bureau/locales/ 
     7# Each alternc.mo file is build with msgfmt from a alternc.po file. 
     8# Each alternc.po file is build from a serie of .po files located in  
     9# /var/alternc/bureau/locales/<lang>/LC_MESSAGES/*.po 
     10# main.txt is included before all others .po to construct a complete alternc.po file. 
     11 
     12#  - Advantages :  
     13#    * allow to add or remove standalone modules to an existing AlternC fluently 
     14#    * only one textdomain is used in all the sources (no need to change it from module to module) 
     15#  - Drawbacks :  
     16#    * AlternC now requires gettext package to work properly 
     17#    * .mo file must be compiled at each upgrade/install 
     18 
     19function dolangs { 
     20    read A 
     21    while [ "$A" ] 
     22    do 
     23        B="$A/LC_MESSAGES" 
     24        rm -f "$B/procmail_builder.mo" 
     25        msgfmt "$B/procmail_builder.po" -o "$B/procmail_builder.mo" 
     26        read A 
     27    done 
     28
     29 
     30# Apply the function to each language 
     31find locales -type d -maxdepth 1 -mindepth 1 -name "*_*" | dolangs 
     32exit 0