- 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.
35 lines
1.9 KiB
Plaintext
35 lines
1.9 KiB
Plaintext
<%@page contentType="text/html"%>
|
|
<%@page pageEncoding="UTF-8"%>
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
|
|
<html><head>
|
|
<%@include file="css.jsp" %>
|
|
<title>I2P Router Console - home</title>
|
|
</head><body>
|
|
<%
|
|
if (System.getProperty("router.consoleNonce") == null) {
|
|
System.setProperty("router.consoleNonce", new java.util.Random().nextLong() + "");
|
|
}
|
|
%>
|
|
|
|
<%@include file="summary.jsp" %><h1>I2P Router Console</h1>
|
|
<div class="news" id="news">
|
|
<jsp:useBean class="net.i2p.router.web.ContentHelper" id="newshelper" scope="request" />
|
|
<% java.io.File fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getRouterDir(), "docs/news.xml"); %>
|
|
<jsp:setProperty name="newshelper" property="page" value="<%=fpath.getAbsolutePath()%>" />
|
|
<jsp:setProperty name="newshelper" property="maxLines" value="300" />
|
|
<jsp:getProperty name="newshelper" property="content" />
|
|
|
|
<jsp:useBean class="net.i2p.router.web.ConfigUpdateHelper" id="updatehelper" scope="request" />
|
|
<jsp:setProperty name="updatehelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
|
|
<hr><i><jsp:getProperty name="updatehelper" property="newsStatus" /></i><br>
|
|
</div><div class="main" id="main">
|
|
<jsp:useBean class="net.i2p.router.web.ContentHelper" id="contenthelper" scope="request" />
|
|
<% fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getBaseDir(), "docs/readme.html"); %>
|
|
<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>
|