* 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:
@ -36,7 +36,7 @@
|
||||
<td><input type="text" size="60" name="newsURL" value="<jsp:getProperty name="updatehelper" property="newsURL" />"></td>
|
||||
</tr><tr><td class= "mediumtags" align="right"><b>Refresh frequency:</b>
|
||||
<td><jsp:getProperty name="updatehelper" property="refreshFrequencySelectBox" /></td><tr>
|
||||
<td class= "mediumtags" align="right"><b>Update policy:</b></td>
|
||||
<td class= "mediumtags" align="right"><b><%=formhandler._("Update policy")%>:</b></td>
|
||||
<td><jsp:getProperty name="updatehelper" property="updatePolicySelectBox" /></td>
|
||||
<tr><td class= "mediumtags" align="right"><b>Update through the eepProxy?</b></td>
|
||||
<td><jsp:getProperty name="updatehelper" property="updateThroughProxy" /></td>
|
||||
|
@ -25,5 +25,8 @@
|
||||
<link rel="shortcut icon" href="/themes/console/images/favicon.ico">
|
||||
<jsp:useBean class="net.i2p.router.web.CSSHelper" id="cssHelper" scope="request" />
|
||||
<jsp:setProperty name="cssHelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
|
||||
<%
|
||||
cssHelper.setLang(request.getParameter("lang"));
|
||||
%>
|
||||
<link href="<%=cssHelper.getTheme(request.getHeader("User-Agent"))%>console.css" rel="stylesheet" type="text/css">
|
||||
<!--[if IE]><link href="/themes/console/classic/ieshim.css" rel="stylesheet" type="text/css" /><![endif]-->
|
||||
|
@ -29,5 +29,6 @@ if (System.getProperty("router.consoleNonce") == null) {
|
||||
<jsp:setProperty name="contenthelper" property="page" value="<%=fpath.getAbsolutePath()%>" />
|
||||
<jsp:setProperty name="contenthelper" property="maxLines" value="300" />
|
||||
<jsp:setProperty name="contenthelper" property="lang" value="<%=request.getParameter("lang")%>" />
|
||||
<jsp:setProperty name="contenthelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
|
||||
<jsp:getProperty name="contenthelper" property="content" />
|
||||
</div></body></html>
|
||||
|
Reference in New Issue
Block a user