more tag and more translate

This commit is contained in:
walking
2009-10-27 11:11:51 +00:00
parent a2d90eebea
commit 2b469567bb
9 changed files with 1465 additions and 728 deletions

View File

@ -31,16 +31,16 @@ public class ConfigKeyringHandler extends FormHandler {
} catch (DataFormatException dfe) {}
if (h != null && h.getData() != null && sk.getData() != null) {
_context.keyRing().put(h, sk);
addFormNotice("Key for " + h.toBase64() + " added to keyring");
addFormNotice(_("Key for") + " " + h.toBase64() + " " + _("added to keyring"));
} else {
addFormError(_("Invalid destination or key"));
}
} else { // Delete
if (h != null && h.getData() != null) {
if (_context.keyRing().remove(h) != null)
addFormNotice("Key for " + h.toBase64() + " removed from keyring");
addFormNotice(_("Key for") + " " + h.toBase64() + " " + _("removed from keyring"));
else
addFormNotice("Key for " + h.toBase64() + " not found in keyring");
addFormNotice(_("Key for") + " " + h.toBase64() + " " + _("not found in keyring"));
} else {
addFormError(_("Invalid destination"));
}

View File

@ -32,7 +32,7 @@ public class ConfigTunnelsHandler extends FormHandler {
}
public void setShouldsave(String moo) {
if ( (moo != null) && (moo.equals("Save changes")) )
if ( (moo != null) && (moo.equals(_("Save changes"))) )
_shouldSave = true;
}

View File

@ -104,15 +104,15 @@ public class GraphHelper extends HelperBase {
}
public String getForm() {
try {
_out.write("<br><h3>Configure Graph Display [<a href=\"configstats.jsp\">Select Stats</a>]</h3>");
_out.write("<br><h3>" + _("Configure Graph Display") + " [<a href=\"configstats.jsp\">" + _("Select Stats") + "</a>]</h3>");
_out.write("<form action=\"graphs.jsp\" method=\"GET\">");
_out.write("Periods: <input size=\"3\" type=\"text\" name=\"periodCount\" value=\"" + _periodCount + "\"><br>\n");
_out.write("Plot averages: <input type=\"radio\" class=\"optbox\" name=\"showEvents\" value=\"false\" " + (_showEvents ? "" : "checked=\"true\" ") + "> ");
_out.write("or plot events: <input type=\"radio\" class=\"optbox\" name=\"showEvents\" value=\"true\" "+ (_showEvents ? "checked=\"true\" " : "") + "><br>\n");
_out.write("Image sizes: width: <input size=\"4\" type=\"text\" name=\"width\" value=\"" + _width
+ "\"> pixels, height: <input size=\"4\" type=\"text\" name=\"height\" value=\"" + _height
+ "\"><br>\n");
_out.write("Refresh delay: <select name=\"refreshDelay\"><option value=\"60\">1 minute</option><option value=\"120\">2 minutes</option><option value=\"300\">5 minutes</option><option value=\"600\">10 minutes</option><option value=\"1800\">30 minutes</option><option value=\"3600\">1 hour</option><option value=\"-1\">Never</option></select><br>\n");
_out.write(_("Periods") + ": <input size=\"3\" type=\"text\" name=\"periodCount\" value=\"" + _periodCount + "\"><br>\n");
_out.write(_("Plot averages") + ": <input type=\"radio\" class=\"optbox\" name=\"showEvents\" value=\"false\" " + (_showEvents ? "" : "checked=\"true\" ") + "> ");
_out.write(_("or")+ " " +_("plot events") + ": <input type=\"radio\" class=\"optbox\" name=\"showEvents\" value=\"true\" "+ (_showEvents ? "checked=\"true\" " : "") + "><br>\n");
_out.write(_("Image sizes") + ": " + _("width") + ": <input size=\"4\" type=\"text\" name=\"width\" value=\"" + _width
+ "\"> " + _("pixels") + ", " + _("height") + ": <input size=\"4\" type=\"text\" name=\"height\" value=\"" + _height
+ "\"> " + _("pixels") + "<br>\n");
_out.write(_("Refresh delay") + ": <select name=\"refreshDelay\"><option value=\"60\">1 " + _("minute") + "</option><option value=\"120\">2 " + _("minutes") + "</option><option value=\"300\">5 " + _("minutes") + "</option><option value=\"600\">10 " + _("minutes") + "</option><option value=\"1800\">30 " + _("minutes") + "</option><option value=\"3600\">1 " + _("hour") + "</option><option value=\"-1\">" + _("Never") + "</option></select><br>\n");
_out.write("<hr><div class=\"formaction\"><input type=\"submit\" value=\"Redraw\"></div></form>");
} catch (IOException ioe) {
ioe.printStackTrace();

View File

@ -55,10 +55,10 @@ public class StatsGenerator {
buf.append("</select> <input type=\"submit\" value=\"GO\" />");
buf.append("</form>");
buf.append("Statistics gathered during this router's uptime (");
buf.append(_("Statistics gathered during this router's uptime")).append(" (");
long uptime = _context.router().getUptime();
buf.append(DataHelper.formatDuration(uptime));
buf.append("). The data gathered is quantized over a 1 minute period, so should just be used as an estimate.");
buf.append("). ").append( _("The data gathered is quantized over a 1 minute period, so should just be used as an estimate."));
out.write(buf.toString());
buf.setLength(0);

View File

@ -212,8 +212,8 @@ public class TunnelRenderer {
}
if (live <= 0)
out.write("<div class=\"statusnotes\"><center><b>" + _("No tunnels; waiting for the grace period to end.") + "</center></b></div>\n");
out.write("<div class=\"statusnotes\"><center><b>Lifetime bandwidth usage: " + DataHelper.formatSize(processedIn*1024) + "B in, " +
DataHelper.formatSize(processedOut*1024) + "B out</b></center></div>");
out.write("<div class=\"statusnotes\"><center><b>" + _("Lifetime bandwidth usage") + ": " + DataHelper.formatSize(processedIn*1024) + "B " + _("in") + ", " +
DataHelper.formatSize(processedOut*1024) + "B " + _("out") + "</b></center></div>");
}
private void renderPeers(Writer out) throws IOException {
@ -231,7 +231,7 @@ public class TunnelRenderer {
Collections.sort(peerList, new HashComparator());
out.write("<h2><a name=\"peers\"></a>" + _("Tunnel Counts By Peer") + ":</h2>\n");
out.write("<table><tr><th>Peer</th><th>Expl. + Client</th><th>% of total</th><th>Part. from + to</th><th>% of total</th></tr>\n");
out.write("<table><tr><th>" + _("Peer") + "</th><th>" + _("Expl. + Client") + "</th><th>" + _("% of total") + "</th><th>" + _("Part. from + to") + "</th><th>" + _("% of total") + "</th></tr>\n");
for (Hash h : peerList) {
out.write("<tr> <td class=\"cells\" align=\"center\">");
out.write(netDbLink(h));

View File

@ -32,7 +32,7 @@
<input type="hidden" name="nonce" value="<%=System.getProperty("net.i2p.router.web.ConfigKeyringHandler.nonce")%>" />
<h3><%=intl._("Manual Keyring Addition")%></h3><p>
<%=intl._("Enter keys for encrypted remote destinations here.")%>
Keys for local destinations must be entered on the <a href="i2ptunnel/index.jsp">I2PTunnel page</a>.
<%=intl._("Keys for local destinations must be entered on the")%> <a href="i2ptunnel/index.jsp"><%=intl._("I2PTunnel page")%></a>.
</p>
<div class="wideload">
<p><table><tr>

View File

@ -39,5 +39,5 @@
<%=intl._("Note")%>: <%=intl._("Exploratory tunnel setting changes are stored in the router.config file.")%>
<%=intl._("Client tunnel changes are temporary and are not saved.")%>
<%=intl._("To make permanent client tunnel changes see the")%> <a href="i2ptunnel/index.jsp"><%=intl._("i2ptunnel page")%></a>.
<hr><div class="formaction"><input type="submit" name="shouldsave" value="Save changes" /> <input type="reset" value="Cancel" /></div>
<hr><div class="formaction"><input type="submit" name="shouldsave" value="<%=intl._("Save changes")%>" /> <input type="reset" value="<%=intl._("Cancel")%>" /></div>
</form></p></div></div></div></body></html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff