forked from I2P_Developers/i2p.i2p
Build: Compile resource bundles from ant, not msgfmt,
speeding up builds with translations by 20x
This commit is contained in:
@@ -149,6 +149,11 @@
|
||||
<exec executable="sh" osfamily="windows" failifexecutionfails="false" >
|
||||
<arg value="./bundle-messages.sh" />
|
||||
</exec>
|
||||
<javac source="${javac.version}" target="${javac.version}"
|
||||
includeAntRuntime="false"
|
||||
srcdir="build/messages-src" destdir="${bin}">
|
||||
<compilerarg line="${javac.compilerargs}" />
|
||||
</javac>
|
||||
</target>
|
||||
|
||||
<target name="poupdate" depends="compile, precompilejsp">
|
||||
@@ -171,7 +176,7 @@
|
||||
<delete file="susidns.war" />
|
||||
<delete>
|
||||
<fileset dir="." includes="**/*.class" />
|
||||
<fileset dir="." includes="tmp" />
|
||||
<fileset dir="." includes="tmp, build" />
|
||||
<fileset dir="WEB-INF" includes="web-fragment.xml, web-out.xml" />
|
||||
</delete>
|
||||
<delete dir="${bin}" />
|
||||
|
@@ -99,7 +99,13 @@ do
|
||||
echo "Generating ${CLASS}_$LG ResourceBundle..."
|
||||
|
||||
# convert to class files in build/obj
|
||||
msgfmt --java --statistics -r $CLASS -l $LG -d WEB-INF/classes $i
|
||||
TD=build/messages-src-tmp
|
||||
TDX=$TD/i2p/susi/dns
|
||||
TD2=build/messages-src
|
||||
TDY=$TD2/i2p/susi/dns
|
||||
rm -rf $TD
|
||||
mkdir -p $TD $TDY
|
||||
msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "ERROR - msgfmt failed on ${i}, not updating translations"
|
||||
@@ -108,6 +114,8 @@ do
|
||||
RC=1
|
||||
break
|
||||
fi
|
||||
mv $TDX/messages_$LG.java $TDY
|
||||
rm -rf $TD
|
||||
fi
|
||||
done
|
||||
rm -f $TMPFILE
|
||||
|
Reference in New Issue
Block a user