Changeset 682
- Timestamp:
- 09/23/08 15:34:00 (5 years ago)
- File:
-
- 1 edited
-
trunk/i18n.sh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/i18n.sh
r679 r682 3 3 TMP_DIR="tmp" 4 4 POT_FILE="papywizard.pot" 5 PO_FILE="papywizard.po" 5 6 MO_FILE="papywizard.mo" 6 7 LOCALE_DIR="locale" 8 9 mkdir -p $TMP_DIR 7 10 8 11 # Extract strings from python files … … 18 21 xgettext --language=Python --from-code=utf-8 --keyword=_ --keyword=N_ --no-wrap --output=$TMP_DIR/$POT_FILE $python_files $TMP_DIR/*.h 19 22 20 # Generate PO files23 # Generate PO and MO files 21 24 for lang in 'en' 'fr'; do 22 25 mkdir -p $LOCALE_DIR/$lang/LC_MESSAGES 23 if [ -e $ TMP_DIR/$lang.po]; then24 msgmerge -U $ TMP_DIR/$lang.po$TMP_DIR/$POT_FILE26 if [ -e $LOCALE_DIR/$lang/LC_MESSAGES/$PO_FILE ]; then 27 msgmerge -U $LOCALE_DIR/$lang/LC_MESSAGES/$PO_FILE $TMP_DIR/$POT_FILE 25 28 else 26 msginit --input=$TMP_DIR/$POT_FILE --locale=$lang --no-translator --no-wrap --output=$ TMP_DIR/$lang.po29 msginit --input=$TMP_DIR/$POT_FILE --locale=$lang --no-translator --no-wrap --output=$LOCALE_DIR/$lang/LC_MESSAGES/$PO_FILE 27 30 fi 28 msgfmt -v --output-file=$LOCALE_DIR/$lang/LC_MESSAGES/$MO_FILE $ TMP_DIR/$lang.po31 msgfmt -v --output-file=$LOCALE_DIR/$lang/LC_MESSAGES/$MO_FILE $LOCALE_DIR/$lang/LC_MESSAGES/$PO_FILE 29 32 done
Note: See TracChangeset
for help on using the changeset viewer.
