Ignore:
Timestamp:
Oct 19, 2009 1:37:13 PM (11 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
83cacaa
Parents:
4497463
Message:

po script update, dont include java files in war

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/bundle-messages.sh

    r4497463 rcf10451d  
    22# Update messages_xx.po and messages_xx.class files,
    33# from both java and jsp sources.
    4 # Requires installed programs xgettext, msgfmt, and find.
     4# Requires installed programs xgettext, msgfmt, msgmerge, and find.
    55# zzz - public domain
    66#
    77CLASS=net.i2p.router.web.messages
    88TMPFILE=build/javafiles.txt
     9export TZ=UTC
    910
    1011for i in ../locale/messages_*.po
     
    3233        # To start a new translation, copy the header from an old translation to the new .po file,
    3334        # then ant distclean updater.
    34         xgettext -f build/javafiles.txt -F -L java --keyword=_ --keyword=cssHelper._ --keyword=handler._ --keyword=formhandler._ -o $i -j
     35        find src ../jsp/WEB-INF -name *.java > $TMPFILE
     36        xgettext -f $TMPFILE -F -L java --keyword=_ --keyword=cssHelper._ --keyword=handler._ --keyword=formhandler._ -o ${i}t
    3537        if [ $? -ne 0 ]
    3638        then
    3739                echo 'Warning - xgettext failed, not updating translations'
     40                rm -f ${i}t
    3841                break
    3942        fi
     43        msgmerge -U --backup=none $i ${i}t
     44        if [ $? -ne 0 ]
     45        then
     46                echo 'Warning - msgmerge failed, not updating translations'
     47                rm -f ${i}t
     48                break
     49        fi
     50        rm -f ${i}t
     51        # so we don't do this again
     52        touch $i
    4053
    4154        # convert to class files in build/obj
Note: See TracChangeset for help on using the changeset viewer.