Changeset 682


Ignore:
Timestamp:
09/23/08 15:34:00 (5 years ago)
Author:
fma
Message:

Updated with new PO file path

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/i18n.sh

    r679 r682  
    33TMP_DIR="tmp" 
    44POT_FILE="papywizard.pot" 
     5PO_FILE="papywizard.po" 
    56MO_FILE="papywizard.mo" 
    67LOCALE_DIR="locale" 
     8 
     9mkdir -p $TMP_DIR 
    710 
    811# Extract strings from python files 
     
    1821xgettext --language=Python --from-code=utf-8 --keyword=_ --keyword=N_ --no-wrap --output=$TMP_DIR/$POT_FILE $python_files $TMP_DIR/*.h 
    1922 
    20 # Generate PO files 
     23# Generate PO and MO files 
    2124for lang in 'en' 'fr'; do 
    2225    mkdir -p $LOCALE_DIR/$lang/LC_MESSAGES 
    23     if [ -e $TMP_DIR/$lang.po ]; then 
    24         msgmerge -U $TMP_DIR/$lang.po $TMP_DIR/$POT_FILE 
     26    if [ -e $LOCALE_DIR/$lang/LC_MESSAGES/$PO_FILE ]; then 
     27        msgmerge -U $LOCALE_DIR/$lang/LC_MESSAGES/$PO_FILE $TMP_DIR/$POT_FILE 
    2528    else 
    26         msginit --input=$TMP_DIR/$POT_FILE --locale=$lang --no-translator --no-wrap --output=$TMP_DIR/$lang.po 
     29        msginit --input=$TMP_DIR/$POT_FILE --locale=$lang --no-translator --no-wrap --output=$LOCALE_DIR/$lang/LC_MESSAGES/$PO_FILE 
    2730    fi 
    28     msgfmt -v --output-file=$LOCALE_DIR/$lang/LC_MESSAGES/$MO_FILE $TMP_DIR/$lang.po 
     31    msgfmt -v --output-file=$LOCALE_DIR/$lang/LC_MESSAGES/$MO_FILE $LOCALE_DIR/$lang/LC_MESSAGES/$PO_FILE 
    2932done 
Note: See TracChangeset for help on using the changeset viewer.