forked from I2P_Developers/i2p.i2p
* Router Console translation infrastructure:
- Persistent lang setting with routerconsole.lang=xx
- Loading any page with ?lang=xx changes the persistent setting
- Add a custom Jetty handler to load foo_xx.jsp if it
exists for language xx. This is for jsp files with lots
of text in them. Otherwise use inline translate methods.
Not for included jsps.
- Add a script to create and update messages_xx.po translation
files, and create ResourceBundles from them
- Add class to translate strings from cached ResourceBundles
- Add translate wrappers to HelperBase, FormHandler, and *Renderer,
so calls can be made from both jsp and java files
- Add two example translations on configupdate.jsp - one in
the jsp itself and one in the helper.
- This is for strings in routerconsole only. Will be expanded
to other webapps and the router later.
This commit is contained in:
@@ -73,6 +73,15 @@
|
||||
<delete dir="./tmpextract" />
|
||||
|
||||
<ant target="war" />
|
||||
|
||||
<!-- Update the messages_*.po files.
|
||||
We need to supply something for windows, and then change the fail property to true,
|
||||
or else not run this on windows -->
|
||||
<exec executable="sh" failifexecutionfails="false" >
|
||||
<arg value="./bundle-messages.sh" />
|
||||
</exec>
|
||||
<!-- jar again to get the latest messages_*.class files -->
|
||||
<jar destfile="./build/routerconsole.jar" basedir="./build/obj" includes="**/*.class" update="true" />
|
||||
</target>
|
||||
<target name="war" depends="precompilejsp">
|
||||
<!-- Don't include the css in the war, the main build.xml will copy it to docs/themes/console/ -->
|
||||
@@ -115,6 +124,7 @@
|
||||
</java>
|
||||
|
||||
<javac debug="true" deprecation="on" source="1.5" target="1.5"
|
||||
encoding="UTF-8"
|
||||
destdir="../jsp/WEB-INF/classes/"
|
||||
srcdir="../jsp/WEB-INF/classes" includes="**/*.java">
|
||||
<compilerarg line="${javac.compilerargs}" />
|
||||
@@ -133,10 +143,13 @@
|
||||
<pathelement location="../../../core/java/build/i2p.jar" />
|
||||
</classpath>
|
||||
</javac>
|
||||
|
||||
<!-- save these so we can run gettext on the generated java files later
|
||||
<delete>
|
||||
<fileset dir="../jsp/WEB-INF/" includes="**/*.java" />
|
||||
<fileset dir="../jsp/WEB-INF/" includes="**/*.jsp" />
|
||||
</delete>
|
||||
-->
|
||||
<copy file="../jsp/web.xml" tofile="../jsp/web-out.xml" />
|
||||
<loadfile property="jspc.web.fragment" srcfile="../jsp/web-fragment.xml" />
|
||||
<replace file="../jsp/web-out.xml">
|
||||
|
||||
Reference in New Issue
Block a user