po script update, dont include java files in war
This commit is contained in:
@ -86,7 +86,7 @@
|
|||||||
<target name="war" depends="precompilejsp">
|
<target name="war" depends="precompilejsp">
|
||||||
<!-- Don't include the css in the war, the main build.xml will copy it to docs/themes/console/ -->
|
<!-- Don't include the css in the war, the main build.xml will copy it to docs/themes/console/ -->
|
||||||
<war destfile="build/routerconsole.war" webxml="../jsp/web-out.xml"
|
<war destfile="build/routerconsole.war" webxml="../jsp/web-out.xml"
|
||||||
basedir="../jsp/" excludes="web.xml, *.css, *.java, *.jsp, web-fragment.xml">
|
basedir="../jsp/" excludes="web.xml, *.css, **/*.java, *.jsp, web-fragment.xml">
|
||||||
</war>
|
</war>
|
||||||
</target>
|
</target>
|
||||||
<target name="precompilejsp" unless="precompilejsp.uptodate">
|
<target name="precompilejsp" unless="precompilejsp.uptodate">
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
#
|
#
|
||||||
# Update messages_xx.po and messages_xx.class files,
|
# Update messages_xx.po and messages_xx.class files,
|
||||||
# from both java and jsp sources.
|
# from both java and jsp sources.
|
||||||
# Requires installed programs xgettext, msgfmt, and find.
|
# Requires installed programs xgettext, msgfmt, msgmerge, and find.
|
||||||
# zzz - public domain
|
# zzz - public domain
|
||||||
#
|
#
|
||||||
CLASS=net.i2p.router.web.messages
|
CLASS=net.i2p.router.web.messages
|
||||||
TMPFILE=build/javafiles.txt
|
TMPFILE=build/javafiles.txt
|
||||||
|
export TZ=UTC
|
||||||
|
|
||||||
for i in ../locale/messages_*.po
|
for i in ../locale/messages_*.po
|
||||||
do
|
do
|
||||||
@ -31,12 +32,24 @@ do
|
|||||||
# In a jsp, you must use a helper or handler that has the context set.
|
# In a jsp, you must use a helper or handler that has the context set.
|
||||||
# To start a new translation, copy the header from an old translation to the new .po file,
|
# To start a new translation, copy the header from an old translation to the new .po file,
|
||||||
# then ant distclean updater.
|
# then ant distclean updater.
|
||||||
xgettext -f build/javafiles.txt -F -L java --keyword=_ --keyword=cssHelper._ --keyword=handler._ --keyword=formhandler._ -o $i -j
|
find src ../jsp/WEB-INF -name *.java > $TMPFILE
|
||||||
|
xgettext -f $TMPFILE -F -L java --keyword=_ --keyword=cssHelper._ --keyword=handler._ --keyword=formhandler._ -o ${i}t
|
||||||
if [ $? -ne 0 ]
|
if [ $? -ne 0 ]
|
||||||
then
|
then
|
||||||
echo 'Warning - xgettext failed, not updating translations'
|
echo 'Warning - xgettext failed, not updating translations'
|
||||||
|
rm -f ${i}t
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
msgmerge -U --backup=none $i ${i}t
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
echo 'Warning - msgmerge failed, not updating translations'
|
||||||
|
rm -f ${i}t
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
rm -f ${i}t
|
||||||
|
# so we don't do this again
|
||||||
|
touch $i
|
||||||
|
|
||||||
# convert to class files in build/obj
|
# convert to class files in build/obj
|
||||||
msgfmt --java -r $CLASS -l $LG -d build/obj $i
|
msgfmt --java -r $CLASS -l $LG -d build/obj $i
|
||||||
|
Reference in New Issue
Block a user