forked from I2P_Developers/i2p.i2p
Rename _() for translation to _t() for Java 9 compatibility (ticket #1456)
This commit is contained in:
@ -917,7 +917,7 @@ public class Blocklist {
|
||||
singles.addAll(_singleIPBlocklist);
|
||||
if (!(singles.isEmpty() && _singleIPv6Blocklist.isEmpty())) {
|
||||
out.write("<table><tr><th align=\"center\" colspan=\"2\"><b>");
|
||||
out.write(_("IPs Banned Until Restart"));
|
||||
out.write(_t("IPs Banned Until Restart"));
|
||||
out.write("</b></td></tr>");
|
||||
// first 0 - 127
|
||||
for (Integer ii : singles) {
|
||||
@ -954,11 +954,11 @@ public class Blocklist {
|
||||
}
|
||||
if (_blocklistSize > 0) {
|
||||
out.write("<table><tr><th align=\"center\" colspan=\"2\"><b>");
|
||||
out.write(_("IPs Permanently Banned"));
|
||||
out.write(_t("IPs Permanently Banned"));
|
||||
out.write("</b></th></tr><tr><td align=\"center\" width=\"50%\"><b>");
|
||||
out.write(_("From"));
|
||||
out.write(_t("From"));
|
||||
out.write("</b></td><td align=\"center\" width=\"50%\"><b>");
|
||||
out.write(_("To"));
|
||||
out.write(_t("To"));
|
||||
out.write("</b></td></tr>");
|
||||
int max = Math.min(_blocklistSize, MAX_DISPLAY);
|
||||
int displayed = 0;
|
||||
@ -994,7 +994,7 @@ public class Blocklist {
|
||||
out.write("</table>");
|
||||
} else {
|
||||
out.write("<br><i>");
|
||||
out.write(_("none"));
|
||||
out.write(_t("none"));
|
||||
out.write("</i>");
|
||||
}
|
||||
out.flush();
|
||||
@ -1030,7 +1030,7 @@ public class Blocklist {
|
||||
private static final String BUNDLE_NAME = "net.i2p.router.web.messages";
|
||||
|
||||
/** translate */
|
||||
private String _(String key) {
|
||||
private String _t(String key) {
|
||||
return Translate.getString(key, _context, BUNDLE_NAME);
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 8;
|
||||
public final static long BUILD = 9;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
|
@ -209,7 +209,7 @@ public class Reseeder {
|
||||
if (fetched <= 0)
|
||||
throw new IOException("No seeds extracted");
|
||||
_checker.setStatus(
|
||||
_("Reseeding: got router info from file ({0} successful, {1} errors).", fetched, errors));
|
||||
_t("Reseeding: got router info from file ({0} successful, {1} errors).", fetched, errors));
|
||||
System.err.println("Reseed got " + fetched + " router infos from file with " + errors + " errors");
|
||||
_context.router().eventLog().addEvent(EventLog.RESEED, fetched + " from file");
|
||||
return fetched;
|
||||
@ -281,7 +281,7 @@ public class Reseeder {
|
||||
private void run2() {
|
||||
_isRunning = true;
|
||||
_checker.setError("");
|
||||
_checker.setStatus(_("Reseeding"));
|
||||
_checker.setStatus(_t("Reseeding"));
|
||||
if (_context.getBooleanProperty(PROP_PROXY_ENABLE)) {
|
||||
_proxyHost = _context.getProperty(PROP_PROXY_HOST);
|
||||
_proxyPort = _context.getProperty(PROP_PROXY_PORT, -1);
|
||||
@ -313,9 +313,9 @@ public class Reseeder {
|
||||
"and if nothing helps, read the FAQ about reseeding manually.");
|
||||
} // else < 0, no valid URLs
|
||||
String old = _checker.getError();
|
||||
_checker.setError(_("Reseed failed.") + ' ' +
|
||||
_("See {0} for help.",
|
||||
"<a target=\"_top\" href=\"/configreseed\">" + _("reseed configuration page") + "</a>") +
|
||||
_checker.setError(_t("Reseed failed.") + ' ' +
|
||||
_t("See {0} for help.",
|
||||
"<a target=\"_top\" href=\"/configreseed\">" + _t("reseed configuration page") + "</a>") +
|
||||
"<br>" + old);
|
||||
}
|
||||
_isRunning = false;
|
||||
@ -563,7 +563,7 @@ public class Reseeder {
|
||||
try {
|
||||
// Don't use context clock as we may be adjusting the time
|
||||
final long timeLimit = System.currentTimeMillis() + MAX_TIME_PER_HOST;
|
||||
_checker.setStatus(_("Reseeding: fetching seed URL."));
|
||||
_checker.setStatus(_t("Reseeding: fetching seed URL."));
|
||||
System.err.println("Reseeding from " + seedURL);
|
||||
byte contentRaw[] = readURL(seedURL);
|
||||
if (contentRaw == null) {
|
||||
@ -620,7 +620,7 @@ public class Reseeder {
|
||||
iter.hasNext() && fetched < 200 && System.currentTimeMillis() < timeLimit; ) {
|
||||
try {
|
||||
_checker.setStatus(
|
||||
_("Reseeding: fetching router info from seed URL ({0} successful, {1} errors).", fetched, errors));
|
||||
_t("Reseeding: fetching router info from seed URL ({0} successful, {1} errors).", fetched, errors));
|
||||
|
||||
if (!fetchSeed(seedURL.toString(), iter.next()))
|
||||
continue;
|
||||
@ -694,7 +694,7 @@ public class Reseeder {
|
||||
int errors = 0;
|
||||
File contentRaw = null;
|
||||
try {
|
||||
_checker.setStatus(_("Reseeding: fetching seed URL."));
|
||||
_checker.setStatus(_t("Reseeding: fetching seed URL."));
|
||||
System.err.println("Reseeding from " + seedURL);
|
||||
// don't use context time, as we may be step-changing it
|
||||
// from the server header
|
||||
@ -730,7 +730,7 @@ public class Reseeder {
|
||||
contentRaw.delete();
|
||||
}
|
||||
_checker.setStatus(
|
||||
_("Reseeding: fetching router info from seed URL ({0} successful, {1} errors).", fetched, errors));
|
||||
_t("Reseeding: fetching router info from seed URL ({0} successful, {1} errors).", fetched, errors));
|
||||
System.err.println("Reseed got " + fetched + " router infos from " + seedURL + " with " + errors + " errors");
|
||||
return fetched;
|
||||
}
|
||||
@ -1002,17 +1002,17 @@ public class Reseeder {
|
||||
private static final String BUNDLE_NAME = "net.i2p.router.web.messages";
|
||||
|
||||
/** translate */
|
||||
private String _(String key) {
|
||||
private String _t(String key) {
|
||||
return Translate.getString(key, _context, BUNDLE_NAME);
|
||||
}
|
||||
|
||||
/** translate */
|
||||
private String _(String s, Object o) {
|
||||
private String _t(String s, Object o) {
|
||||
return Translate.getString(s, o, _context, BUNDLE_NAME);
|
||||
}
|
||||
|
||||
/** translate */
|
||||
private String _(String s, Object o, Object o2) {
|
||||
private String _t(String s, Object o, Object o2) {
|
||||
return Translate.getString(s, o, o2, _context, BUNDLE_NAME);
|
||||
}
|
||||
|
||||
|
@ -499,7 +499,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade {
|
||||
buf.append("<tt>");
|
||||
boolean found = _context.netDb().lookupRouterInfoLocally(peer) != null;
|
||||
if (found)
|
||||
buf.append("<a title=\"").append(_("NetDb entry")).append("\" href=\"netdb?r=").append(h).append("\">");
|
||||
buf.append("<a title=\"").append(_t("NetDb entry")).append("\" href=\"netdb?r=").append(h).append("\">");
|
||||
buf.append(h);
|
||||
if (found)
|
||||
buf.append("</a>");
|
||||
@ -519,7 +519,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade {
|
||||
/**
|
||||
* Translate
|
||||
*/
|
||||
private final String _(String s) {
|
||||
private final String _t(String s) {
|
||||
return Translate.getString(s, _context, BUNDLE_NAME);
|
||||
}
|
||||
|
||||
|
@ -983,7 +983,7 @@ public abstract class TransportImpl implements Transport {
|
||||
* Translate
|
||||
* @since 0.9.8 moved from transports
|
||||
*/
|
||||
protected String _(String s) {
|
||||
protected String _t(String s) {
|
||||
return Translate.getString(s, _context, BUNDLE_NAME);
|
||||
}
|
||||
|
||||
@ -991,7 +991,7 @@ public abstract class TransportImpl implements Transport {
|
||||
* Translate
|
||||
* @since 0.9.8 moved from transports
|
||||
*/
|
||||
protected String _(String s, Object o) {
|
||||
protected String _t(String s, Object o) {
|
||||
return Translate.getString(s, o, _context, BUNDLE_NAME);
|
||||
}
|
||||
|
||||
|
@ -671,9 +671,9 @@ public class TransportManager implements TransportEventListener {
|
||||
public void renderStatusHTML(Writer out, String urlBase, int sortFlags) throws IOException {
|
||||
if (_context.getBooleanProperty(PROP_ADVANCED)) {
|
||||
out.write("<p><b>");
|
||||
out.write(_("Status"));
|
||||
out.write(_t("Status"));
|
||||
out.write(": ");
|
||||
out.write(_(getReachabilityStatus().toStatusString()));
|
||||
out.write(_t(getReachabilityStatus().toStatusString()));
|
||||
out.write("</b></p>");
|
||||
}
|
||||
TreeMap<String, Transport> transports = new TreeMap<String, Transport>();
|
||||
@ -689,7 +689,7 @@ public class TransportManager implements TransportEventListener {
|
||||
}
|
||||
|
||||
StringBuilder buf = new StringBuilder(4*1024);
|
||||
buf.append("<h3>").append(_("Router Transport Addresses")).append("</h3><pre>\n");
|
||||
buf.append("<h3>").append(_t("Router Transport Addresses")).append("</h3><pre>\n");
|
||||
for (Transport t : _transports.values()) {
|
||||
if (t.hasCurrentAddress()) {
|
||||
for (RouterAddress ra : t.getCurrentAddresses()) {
|
||||
@ -697,7 +697,7 @@ public class TransportManager implements TransportEventListener {
|
||||
buf.append("\n\n");
|
||||
}
|
||||
} else {
|
||||
buf.append(_("{0} is used for outbound connections only", t.getStyle()));
|
||||
buf.append(_t("{0} is used for outbound connections only", t.getStyle()));
|
||||
buf.append("\n\n");
|
||||
}
|
||||
}
|
||||
@ -708,7 +708,7 @@ public class TransportManager implements TransportEventListener {
|
||||
} else if (_upnpManager != null) {
|
||||
out.write(_upnpManager.renderStatusHTML());
|
||||
} else {
|
||||
out.write("<h3><a name=\"upnp\"></a>" + _("UPnP is not enabled") + "</h3>\n");
|
||||
out.write("<h3><a name=\"upnp\"></a>" + _t("UPnP is not enabled") + "</h3>\n");
|
||||
}
|
||||
out.write("</p>\n");
|
||||
out.flush();
|
||||
@ -717,38 +717,38 @@ public class TransportManager implements TransportEventListener {
|
||||
|
||||
private final String getTransportsLegend() {
|
||||
StringBuilder buf = new StringBuilder(1024);
|
||||
buf.append("<h3 id=\"help\">").append(_("Help")).append("</h3><div class=\"configure\"><p>")
|
||||
.append(_("Your transport connection limits are automatically set based on your configured bandwidth."))
|
||||
buf.append("<h3 id=\"help\">").append(_t("Help")).append("</h3><div class=\"configure\"><p>")
|
||||
.append(_t("Your transport connection limits are automatically set based on your configured bandwidth."))
|
||||
.append('\n')
|
||||
.append(_("To override these limits, add the settings i2np.ntcp.maxConnections=nnn and i2np.udp.maxConnections=nnn on the advanced configuration page."))
|
||||
.append(_t("To override these limits, add the settings i2np.ntcp.maxConnections=nnn and i2np.udp.maxConnections=nnn on the advanced configuration page."))
|
||||
.append("</p></div>\n");
|
||||
buf.append("<h3>").append(_("Definitions")).append("</h3><div class=\"configure\">" +
|
||||
"<p><b id=\"def.peer\">").append(_("Peer")).append("</b>: ").append(_("The remote peer, identified by router hash")).append("<br>\n" +
|
||||
"<b id=\"def.dir\">").append(_("Dir")).append("</b>: " +
|
||||
"<img alt=\"Inbound\" src=\"/themes/console/images/inbound.png\"> ").append(_("Inbound connection")).append("<br>\n" +
|
||||
buf.append("<h3>").append(_t("Definitions")).append("</h3><div class=\"configure\">" +
|
||||
"<p><b id=\"def.peer\">").append(_t("Peer")).append("</b>: ").append(_t("The remote peer, identified by router hash")).append("<br>\n" +
|
||||
"<b id=\"def.dir\">").append(_t("Dir")).append("</b>: " +
|
||||
"<img alt=\"Inbound\" src=\"/themes/console/images/inbound.png\"> ").append(_t("Inbound connection")).append("<br>\n" +
|
||||
" " +
|
||||
"<img alt=\"Outbound\" src=\"/themes/console/images/outbound.png\"> ").append(_("Outbound connection")).append("<br>\n" +
|
||||
"<img alt=\"Outbound\" src=\"/themes/console/images/outbound.png\"> ").append(_t("Outbound connection")).append("<br>\n" +
|
||||
" " +
|
||||
"<img src=\"/themes/console/images/inbound.png\" alt=\"V\" height=\"8\" width=\"12\"> ").append(_("They offered to introduce us (help other peers traverse our firewall)")).append("<br>\n" +
|
||||
"<img src=\"/themes/console/images/inbound.png\" alt=\"V\" height=\"8\" width=\"12\"> ").append(_t("They offered to introduce us (help other peers traverse our firewall)")).append("<br>\n" +
|
||||
" " +
|
||||
"<img src=\"/themes/console/images/outbound.png\" alt=\"^\" height=\"8\" width=\"12\"> ").append(_("We offered to introduce them (help other peers traverse their firewall)")).append("<br>\n" +
|
||||
"<b id=\"def.idle\">").append(_("Idle")).append("</b>: ").append(_("How long since a packet has been received / sent")).append("<br>\n" +
|
||||
"<b id=\"def.rate\">").append(_("In/Out")).append("</b>: ").append(_("The smoothed inbound / outbound transfer rate (KBytes per second)")).append("<br>\n" +
|
||||
"<b id=\"def.up\">").append(_("Up")).append("</b>: ").append(_("How long ago this connection was established")).append("<br>\n" +
|
||||
"<b id=\"def.skew\">").append(_("Skew")).append("</b>: ").append(_("The difference between the peer's clock and your own")).append("<br>\n" +
|
||||
"<b id=\"def.cwnd\">CWND</b>: ").append(_("The congestion window, which is how many bytes can be sent without an acknowledgement")).append(" / <br>\n" +
|
||||
" ").append(_("The number of sent messages awaiting acknowledgement")).append(" /<br>\n" +
|
||||
" ").append(_("The maximum number of concurrent messages to send")).append(" /<br>\n"+
|
||||
" ").append(_("The number of pending sends which exceed congestion window")).append("<br>\n" +
|
||||
"<b id=\"def.ssthresh\">SST</b>: ").append(_("The slow start threshold")).append("<br>\n" +
|
||||
"<b id=\"def.rtt\">RTT</b>: ").append(_("The round trip time in milliseconds")).append("<br>\n" +
|
||||
//"<b id=\"def.dev\">").append(_("Dev")).append("</b>: ").append(_("The standard deviation of the round trip time in milliseconds")).append("<br>\n" +
|
||||
"<b id=\"def.rto\">RTO</b>: ").append(_("The retransmit timeout in milliseconds")).append("<br>\n" +
|
||||
"<b id=\"def.mtu\">MTU</b>: ").append(_("Current maximum send packet size / estimated maximum receive packet size (bytes)")).append("<br>\n" +
|
||||
"<b id=\"def.send\">").append(_("TX")).append("</b>: ").append(_("The total number of packets sent to the peer")).append("<br>\n" +
|
||||
"<b id=\"def.recv\">").append(_("RX")).append("</b>: ").append(_("The total number of packets received from the peer")).append("<br>\n" +
|
||||
"<b id=\"def.resent\">").append(_("Dup TX")).append("</b>: ").append(_("The total number of packets retransmitted to the peer")).append("<br>\n" +
|
||||
"<b id=\"def.dupRecv\">").append(_("Dup RX")).append("</b>: ").append(_("The total number of duplicate packets received from the peer")).append("</p>" +
|
||||
"<img src=\"/themes/console/images/outbound.png\" alt=\"^\" height=\"8\" width=\"12\"> ").append(_t("We offered to introduce them (help other peers traverse their firewall)")).append("<br>\n" +
|
||||
"<b id=\"def.idle\">").append(_t("Idle")).append("</b>: ").append(_t("How long since a packet has been received / sent")).append("<br>\n" +
|
||||
"<b id=\"def.rate\">").append(_t("In/Out")).append("</b>: ").append(_t("The smoothed inbound / outbound transfer rate (KBytes per second)")).append("<br>\n" +
|
||||
"<b id=\"def.up\">").append(_t("Up")).append("</b>: ").append(_t("How long ago this connection was established")).append("<br>\n" +
|
||||
"<b id=\"def.skew\">").append(_t("Skew")).append("</b>: ").append(_t("The difference between the peer's clock and your own")).append("<br>\n" +
|
||||
"<b id=\"def.cwnd\">CWND</b>: ").append(_t("The congestion window, which is how many bytes can be sent without an acknowledgement")).append(" / <br>\n" +
|
||||
" ").append(_t("The number of sent messages awaiting acknowledgement")).append(" /<br>\n" +
|
||||
" ").append(_t("The maximum number of concurrent messages to send")).append(" /<br>\n"+
|
||||
" ").append(_t("The number of pending sends which exceed congestion window")).append("<br>\n" +
|
||||
"<b id=\"def.ssthresh\">SST</b>: ").append(_t("The slow start threshold")).append("<br>\n" +
|
||||
"<b id=\"def.rtt\">RTT</b>: ").append(_t("The round trip time in milliseconds")).append("<br>\n" +
|
||||
//"<b id=\"def.dev\">").append(_t("Dev")).append("</b>: ").append(_t("The standard deviation of the round trip time in milliseconds")).append("<br>\n" +
|
||||
"<b id=\"def.rto\">RTO</b>: ").append(_t("The retransmit timeout in milliseconds")).append("<br>\n" +
|
||||
"<b id=\"def.mtu\">MTU</b>: ").append(_t("Current maximum send packet size / estimated maximum receive packet size (bytes)")).append("<br>\n" +
|
||||
"<b id=\"def.send\">").append(_t("TX")).append("</b>: ").append(_t("The total number of packets sent to the peer")).append("<br>\n" +
|
||||
"<b id=\"def.recv\">").append(_t("RX")).append("</b>: ").append(_t("The total number of packets received from the peer")).append("<br>\n" +
|
||||
"<b id=\"def.resent\">").append(_t("Dup TX")).append("</b>: ").append(_t("The total number of packets retransmitted to the peer")).append("<br>\n" +
|
||||
"<b id=\"def.dupRecv\">").append(_t("Dup RX")).append("</b>: ").append(_t("The total number of duplicate packets received from the peer")).append("</p>" +
|
||||
"</div>\n");
|
||||
return buf.toString();
|
||||
}
|
||||
@ -770,14 +770,14 @@ public class TransportManager implements TransportEventListener {
|
||||
/**
|
||||
* Translate
|
||||
*/
|
||||
private final String _(String s) {
|
||||
private final String _t(String s) {
|
||||
return Translate.getString(s, _context, BUNDLE_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
* Translate
|
||||
*/
|
||||
private final String _(String s, Object o) {
|
||||
private final String _t(String s, Object o) {
|
||||
return Translate.getString(s, o, _context, BUNDLE_NAME);
|
||||
}
|
||||
}
|
||||
|
@ -557,68 +557,68 @@ class UPnP extends ControlPoint implements DeviceChangeListener, EventListener {
|
||||
for(int i=0; i<sl.size(); i++) {
|
||||
Service serv = sl.getService(i);
|
||||
if(serv == null) continue;
|
||||
sb.append("<li>").append(_("Service")).append(": ");
|
||||
sb.append("<li>").append(_t("Service")).append(": ");
|
||||
// NOTE: Group all toString() of common actions together
|
||||
// to avoid excess fetches, since toString() caches.
|
||||
if("urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1".equals(serv.getServiceType())){
|
||||
sb.append(_("WAN Common Interface Configuration"));
|
||||
sb.append("<ul><li>").append(_("Status")).append(": ")
|
||||
sb.append(_t("WAN Common Interface Configuration"));
|
||||
sb.append("<ul><li>").append(_t("Status")).append(": ")
|
||||
.append(toString("GetCommonLinkProperties", "NewPhysicalLinkStatus", serv));
|
||||
sb.append("<li>").append(_("Type")).append(": ")
|
||||
sb.append("<li>").append(_t("Type")).append(": ")
|
||||
.append(toString("GetCommonLinkProperties", "NewWANAccessType", serv));
|
||||
sb.append("<li>").append(_("Upstream")).append(": ")
|
||||
sb.append("<li>").append(_t("Upstream")).append(": ")
|
||||
.append(toString("GetCommonLinkProperties", "NewLayer1UpstreamMaxBitRate", serv));
|
||||
sb.append("<li>").append(_("Downstream")).append(": ")
|
||||
sb.append("<li>").append(_t("Downstream")).append(": ")
|
||||
.append(toString("GetCommonLinkProperties", "NewLayer1DownstreamMaxBitRate", serv))
|
||||
.append("</li>");
|
||||
}else if("urn:schemas-upnp-org:service:WANPPPConnection:1".equals(serv.getServiceType())){
|
||||
sb.append(_("WAN PPP Connection"));
|
||||
sb.append("<ul><li>").append(_("Status")).append(": ")
|
||||
sb.append(_t("WAN PPP Connection"));
|
||||
sb.append("<ul><li>").append(_t("Status")).append(": ")
|
||||
.append(toString("GetStatusInfo", "NewConnectionStatus", serv));
|
||||
String up = toString("GetStatusInfo", "NewUptime", serv);
|
||||
if (up != null) {
|
||||
try {
|
||||
long uptime = Long.parseLong(up);
|
||||
uptime *= 1000;
|
||||
sb.append("<li>").append(_("Uptime")).append(": ")
|
||||
sb.append("<li>").append(_t("Uptime")).append(": ")
|
||||
.append(DataHelper.formatDuration2(uptime));
|
||||
} catch (NumberFormatException nfe) {}
|
||||
}
|
||||
sb.append("<li>").append(_("Type")).append(": ")
|
||||
sb.append("<li>").append(_t("Type")).append(": ")
|
||||
.append(toString("GetConnectionTypeInfo", "NewConnectionType", serv));
|
||||
sb.append("<li>").append(_("Upstream")).append(": ")
|
||||
sb.append("<li>").append(_t("Upstream")).append(": ")
|
||||
.append(toString("GetLinkLayerMaxBitRates", "NewUpstreamMaxBitRate", serv));
|
||||
sb.append("<li>").append(_("Downstream")).append(": ")
|
||||
sb.append("<li>").append(_t("Downstream")).append(": ")
|
||||
.append(toString("GetLinkLayerMaxBitRates", "NewDownstreamMaxBitRate", serv) + "<br>");
|
||||
sb.append("<li>").append(_("External IP")).append(": ")
|
||||
sb.append("<li>").append(_t("External IP")).append(": ")
|
||||
.append(toString("GetExternalIPAddress", "NewExternalIPAddress", serv))
|
||||
.append("</li>");
|
||||
}else if("urn:schemas-upnp-org:service:Layer3Forwarding:1".equals(serv.getServiceType())){
|
||||
sb.append(_("Layer 3 Forwarding"));
|
||||
sb.append("<ul><li>").append(_("Default Connection Service")).append(": ")
|
||||
sb.append(_t("Layer 3 Forwarding"));
|
||||
sb.append("<ul><li>").append(_t("Default Connection Service")).append(": ")
|
||||
.append(toString("GetDefaultConnectionService", "NewDefaultConnectionService", serv))
|
||||
.append("</li>");
|
||||
}else if(WAN_IP_CONNECTION.equals(serv.getServiceType())){
|
||||
sb.append(_("WAN IP Connection"));
|
||||
sb.append("<ul><li>").append(_("Status")).append(": ")
|
||||
sb.append(_t("WAN IP Connection"));
|
||||
sb.append("<ul><li>").append(_t("Status")).append(": ")
|
||||
.append(toString("GetStatusInfo", "NewConnectionStatus", serv));
|
||||
String up = toString("GetStatusInfo", "NewUptime", serv);
|
||||
if (up != null) {
|
||||
try {
|
||||
long uptime = Long.parseLong(up);
|
||||
uptime *= 1000;
|
||||
sb.append("<li>").append(_("Uptime")).append(": ")
|
||||
sb.append("<li>").append(_t("Uptime")).append(": ")
|
||||
.append(DataHelper.formatDuration2(uptime));
|
||||
} catch (NumberFormatException nfe) {}
|
||||
}
|
||||
sb.append("<li>").append(_("Type")).append(": ")
|
||||
sb.append("<li>").append(_t("Type")).append(": ")
|
||||
.append(toString("GetConnectionTypeInfo", "NewConnectionType", serv));
|
||||
sb.append("<li>").append(_("External IP")).append(": ")
|
||||
sb.append("<li>").append(_t("External IP")).append(": ")
|
||||
.append(toString("GetExternalIPAddress", "NewExternalIPAddress", serv))
|
||||
.append("</li>");
|
||||
}else if("urn:schemas-upnp-org:service:WANEthernetLinkConfig:1".equals(serv.getServiceType())){
|
||||
sb.append(_("WAN Ethernet Link Configuration"));
|
||||
sb.append("<ul><li>").append(_("Status")).append(": ")
|
||||
sb.append(_t("WAN Ethernet Link Configuration"));
|
||||
sb.append("<ul><li>").append(_t("Status")).append(": ")
|
||||
.append(toString("GetEthernetLinkStatus", "NewEthernetLinkStatus", serv))
|
||||
.append("</li>");
|
||||
} else {
|
||||
@ -638,9 +638,9 @@ class UPnP extends ControlPoint implements DeviceChangeListener, EventListener {
|
||||
|
||||
private void listSubDev(String prefix, Device dev, StringBuilder sb){
|
||||
if (prefix == null)
|
||||
sb.append("<p>").append(_("Found Device")).append(": ");
|
||||
sb.append("<p>").append(_t("Found Device")).append(": ");
|
||||
else
|
||||
sb.append("<li>").append(_("Subdevice")).append(": ");
|
||||
sb.append("<li>").append(_t("Subdevice")).append(": ");
|
||||
sb.append(DataHelper.escapeHTML(dev.getFriendlyName()));
|
||||
if (prefix == null)
|
||||
sb.append("</p>");
|
||||
@ -661,11 +661,11 @@ class UPnP extends ControlPoint implements DeviceChangeListener, EventListener {
|
||||
/** warning - slow */
|
||||
public String renderStatusHTML() {
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
sb.append("<h3><a name=\"upnp\"></a>").append(_("UPnP Status")).append("</h3>");
|
||||
sb.append("<h3><a name=\"upnp\"></a>").append(_t("UPnP Status")).append("</h3>");
|
||||
|
||||
synchronized(_otherUDNs) {
|
||||
if (!_otherUDNs.isEmpty()) {
|
||||
sb.append(_("Disabled UPnP Devices"));
|
||||
sb.append(_t("Disabled UPnP Devices"));
|
||||
sb.append("<ul>");
|
||||
for (Map.Entry<String, String> e : _otherUDNs.entrySet()) {
|
||||
String udn = e.getKey();
|
||||
@ -679,10 +679,10 @@ class UPnP extends ControlPoint implements DeviceChangeListener, EventListener {
|
||||
}
|
||||
|
||||
if(isDisabled) {
|
||||
sb.append(_("UPnP has been disabled; Do you have more than one UPnP Internet Gateway Device on your LAN ?"));
|
||||
sb.append(_t("UPnP has been disabled; Do you have more than one UPnP Internet Gateway Device on your LAN ?"));
|
||||
return sb.toString();
|
||||
} else if(!isNATPresent()) {
|
||||
sb.append(_("UPnP has not found any UPnP-aware, compatible device on your LAN."));
|
||||
sb.append(_t("UPnP has not found any UPnP-aware, compatible device on your LAN."));
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@ -690,15 +690,15 @@ class UPnP extends ControlPoint implements DeviceChangeListener, EventListener {
|
||||
String addr = getNATAddress();
|
||||
sb.append("<p>");
|
||||
if (addr != null)
|
||||
sb.append(_("The current external IP address reported by UPnP is {0}", DataHelper.escapeHTML(addr)));
|
||||
sb.append(_t("The current external IP address reported by UPnP is {0}", DataHelper.escapeHTML(addr)));
|
||||
else
|
||||
sb.append(_("The current external IP address is not available."));
|
||||
sb.append(_t("The current external IP address is not available."));
|
||||
int downstreamMaxBitRate = getDownstreamMaxBitRate();
|
||||
int upstreamMaxBitRate = getUpstreamMaxBitRate();
|
||||
if(downstreamMaxBitRate > 0)
|
||||
sb.append("<br>").append(_("UPnP reports the maximum downstream bit rate is {0}bits/sec", DataHelper.formatSize2(downstreamMaxBitRate)));
|
||||
sb.append("<br>").append(_t("UPnP reports the maximum downstream bit rate is {0}bits/sec", DataHelper.formatSize2(downstreamMaxBitRate)));
|
||||
if(upstreamMaxBitRate > 0)
|
||||
sb.append("<br>").append(_("UPnP reports the maximum upstream bit rate is {0}bits/sec", DataHelper.formatSize2(upstreamMaxBitRate)));
|
||||
sb.append("<br>").append(_t("UPnP reports the maximum upstream bit rate is {0}bits/sec", DataHelper.formatSize2(upstreamMaxBitRate)));
|
||||
synchronized(lock) {
|
||||
for(ForwardPort port : portsToForward) {
|
||||
sb.append("<br>");
|
||||
@ -706,9 +706,9 @@ class UPnP extends ControlPoint implements DeviceChangeListener, EventListener {
|
||||
// {0} is TCP or UDP
|
||||
// {1,number,#####} prevents 12345 from being output as 12,345 in the English locale.
|
||||
// If you want the digit separator in your locale, translate as {1}.
|
||||
sb.append(_("{0} port {1,number,#####} was successfully forwarded by UPnP.", protoToString(port.protocol), port.portNumber));
|
||||
sb.append(_t("{0} port {1,number,#####} was successfully forwarded by UPnP.", protoToString(port.protocol), port.portNumber));
|
||||
else
|
||||
sb.append(_("{0} port {1,number,#####} was not forwarded by UPnP.", protoToString(port.protocol), port.portNumber));
|
||||
sb.append(_t("{0} port {1,number,#####} was not forwarded by UPnP.", protoToString(port.protocol), port.portNumber));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1101,21 +1101,21 @@ class UPnP extends ControlPoint implements DeviceChangeListener, EventListener {
|
||||
/**
|
||||
* Translate
|
||||
*/
|
||||
private final String _(String s) {
|
||||
private final String _t(String s) {
|
||||
return Translate.getString(s, _context, BUNDLE_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
* Translate
|
||||
*/
|
||||
private final String _(String s, Object o) {
|
||||
private final String _t(String s, Object o) {
|
||||
return Translate.getString(s, o, _context, BUNDLE_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
* Translate
|
||||
*/
|
||||
private final String _(String s, Object o, Object o2) {
|
||||
private final String _t(String s, Object o, Object o2) {
|
||||
return Translate.getString(s, o, o2, _context, BUNDLE_NAME);
|
||||
}
|
||||
}
|
||||
|
@ -280,7 +280,7 @@ class UPnPManager {
|
||||
*/
|
||||
public String renderStatusHTML() {
|
||||
if (!_isRunning)
|
||||
return "<h3><a name=\"upnp\"></a>" + _("UPnP is not enabled") + "</h3>\n";
|
||||
return "<h3><a name=\"upnp\"></a>" + _t("UPnP is not enabled") + "</h3>\n";
|
||||
return _upnp.renderStatusHTML();
|
||||
}
|
||||
|
||||
@ -289,7 +289,7 @@ class UPnPManager {
|
||||
/**
|
||||
* Translate
|
||||
*/
|
||||
private final String _(String s) {
|
||||
private final String _t(String s) {
|
||||
return Translate.getString(s, _context, BUNDLE_NAME);
|
||||
}
|
||||
|
||||
|
@ -1341,26 +1341,26 @@ public class NTCPTransport extends TransportImpl {
|
||||
}
|
||||
|
||||
StringBuilder buf = new StringBuilder(512);
|
||||
buf.append("<h3 id=\"ntcpcon\">").append(_("NTCP connections")).append(": ").append(peers.size());
|
||||
buf.append(". ").append(_("Limit")).append(": ").append(getMaxConnections());
|
||||
buf.append(". ").append(_("Timeout")).append(": ").append(DataHelper.formatDuration2(_pumper.getIdleTimeout()));
|
||||
buf.append("<h3 id=\"ntcpcon\">").append(_t("NTCP connections")).append(": ").append(peers.size());
|
||||
buf.append(". ").append(_t("Limit")).append(": ").append(getMaxConnections());
|
||||
buf.append(". ").append(_t("Timeout")).append(": ").append(DataHelper.formatDuration2(_pumper.getIdleTimeout()));
|
||||
if (_context.getBooleanProperty(PROP_ADVANCED)) {
|
||||
buf.append(". ").append(_("Status")).append(": ").append(_(getReachabilityStatus().toStatusString()));
|
||||
buf.append(". ").append(_t("Status")).append(": ").append(_t(getReachabilityStatus().toStatusString()));
|
||||
}
|
||||
buf.append(".</h3>\n" +
|
||||
"<table>\n" +
|
||||
"<tr><th><a href=\"#def.peer\">").append(_("Peer")).append("</a></th>" +
|
||||
"<th>").append(_("Dir")).append("</th>" +
|
||||
"<th>").append(_("IPv6")).append("</th>" +
|
||||
"<th align=\"right\"><a href=\"#def.idle\">").append(_("Idle")).append("</a></th>" +
|
||||
"<th align=\"right\"><a href=\"#def.rate\">").append(_("In/Out")).append("</a></th>" +
|
||||
"<th align=\"right\"><a href=\"#def.up\">").append(_("Up")).append("</a></th>" +
|
||||
"<th align=\"right\"><a href=\"#def.skew\">").append(_("Skew")).append("</a></th>" +
|
||||
"<th align=\"right\"><a href=\"#def.send\">").append(_("TX")).append("</a></th>" +
|
||||
"<th align=\"right\"><a href=\"#def.recv\">").append(_("RX")).append("</a></th>" +
|
||||
"<th>").append(_("Out Queue")).append("</th>" +
|
||||
"<th>").append(_("Backlogged?")).append("</th>" +
|
||||
//"<th>").append(_("Reading?")).append("</th>" +
|
||||
"<tr><th><a href=\"#def.peer\">").append(_t("Peer")).append("</a></th>" +
|
||||
"<th>").append(_t("Dir")).append("</th>" +
|
||||
"<th>").append(_t("IPv6")).append("</th>" +
|
||||
"<th align=\"right\"><a href=\"#def.idle\">").append(_t("Idle")).append("</a></th>" +
|
||||
"<th align=\"right\"><a href=\"#def.rate\">").append(_t("In/Out")).append("</a></th>" +
|
||||
"<th align=\"right\"><a href=\"#def.up\">").append(_t("Up")).append("</a></th>" +
|
||||
"<th align=\"right\"><a href=\"#def.skew\">").append(_t("Skew")).append("</a></th>" +
|
||||
"<th align=\"right\"><a href=\"#def.send\">").append(_t("TX")).append("</a></th>" +
|
||||
"<th align=\"right\"><a href=\"#def.recv\">").append(_t("RX")).append("</a></th>" +
|
||||
"<th>").append(_t("Out Queue")).append("</th>" +
|
||||
"<th>").append(_t("Backlogged?")).append("</th>" +
|
||||
//"<th>").append(_t("Reading?")).append("</th>" +
|
||||
" </tr>\n");
|
||||
out.write(buf.toString());
|
||||
buf.setLength(0);
|
||||
@ -1372,9 +1372,9 @@ public class NTCPTransport extends TransportImpl {
|
||||
// buf.append(' ').append(_context.blocklist().toStr(ip));
|
||||
buf.append("</td><td class=\"cells\" align=\"center\">");
|
||||
if (con.isInbound())
|
||||
buf.append("<img src=\"/themes/console/images/inbound.png\" alt=\"Inbound\" title=\"").append(_("Inbound")).append("\"/>");
|
||||
buf.append("<img src=\"/themes/console/images/inbound.png\" alt=\"Inbound\" title=\"").append(_t("Inbound")).append("\"/>");
|
||||
else
|
||||
buf.append("<img src=\"/themes/console/images/outbound.png\" alt=\"Outbound\" title=\"").append(_("Outbound")).append("\"/>");
|
||||
buf.append("<img src=\"/themes/console/images/outbound.png\" alt=\"Outbound\" title=\"").append(_t("Outbound")).append("\"/>");
|
||||
buf.append("</td><td class=\"cells\" align=\"center\">");
|
||||
if (con.isIPv6())
|
||||
buf.append("✓");
|
||||
|
@ -2465,58 +2465,58 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
int numPeers = 0;
|
||||
|
||||
StringBuilder buf = new StringBuilder(512);
|
||||
buf.append("<h3 id=\"udpcon\">").append(_("UDP connections")).append(": ").append(peers.size());
|
||||
buf.append(". ").append(_("Limit")).append(": ").append(getMaxConnections());
|
||||
buf.append(". ").append(_("Timeout")).append(": ").append(DataHelper.formatDuration2(_expireTimeout));
|
||||
buf.append("<h3 id=\"udpcon\">").append(_t("UDP connections")).append(": ").append(peers.size());
|
||||
buf.append(". ").append(_t("Limit")).append(": ").append(getMaxConnections());
|
||||
buf.append(". ").append(_t("Timeout")).append(": ").append(DataHelper.formatDuration2(_expireTimeout));
|
||||
if (_context.getBooleanProperty(PROP_ADVANCED)) {
|
||||
buf.append(". ").append(_("Status")).append(": ").append(_(_reachabilityStatus.toStatusString()));
|
||||
buf.append(". ").append(_t("Status")).append(": ").append(_t(_reachabilityStatus.toStatusString()));
|
||||
}
|
||||
buf.append(".</h3>\n");
|
||||
buf.append("<table>\n");
|
||||
buf.append("<tr><th class=\"smallhead\" nowrap><a href=\"#def.peer\">").append(_("Peer")).append("</a><br>");
|
||||
buf.append("<tr><th class=\"smallhead\" nowrap><a href=\"#def.peer\">").append(_t("Peer")).append("</a><br>");
|
||||
if (sortFlags != FLAG_ALPHA)
|
||||
appendSortLinks(buf, urlBase, sortFlags, _("Sort by peer hash"), FLAG_ALPHA);
|
||||
appendSortLinks(buf, urlBase, sortFlags, _t("Sort by peer hash"), FLAG_ALPHA);
|
||||
buf.append("</th><th class=\"smallhead\" nowrap><a href=\"#def.dir\" title=\"")
|
||||
.append(_("Direction/Introduction")).append("\">").append(_("Dir"))
|
||||
.append("</a></th><th class=\"smallhead\" nowrap><a href=\"#def.ipv6\">").append(_("IPv6"))
|
||||
.append("</a></th><th class=\"smallhead\" nowrap><a href=\"#def.idle\">").append(_("Idle")).append("</a><br>");
|
||||
appendSortLinks(buf, urlBase, sortFlags, _("Sort by idle inbound"), FLAG_IDLE_IN);
|
||||
.append(_t("Direction/Introduction")).append("\">").append(_t("Dir"))
|
||||
.append("</a></th><th class=\"smallhead\" nowrap><a href=\"#def.ipv6\">").append(_t("IPv6"))
|
||||
.append("</a></th><th class=\"smallhead\" nowrap><a href=\"#def.idle\">").append(_t("Idle")).append("</a><br>");
|
||||
appendSortLinks(buf, urlBase, sortFlags, _t("Sort by idle inbound"), FLAG_IDLE_IN);
|
||||
buf.append(" / ");
|
||||
appendSortLinks(buf, urlBase, sortFlags, _("Sort by idle outbound"), FLAG_IDLE_OUT);
|
||||
appendSortLinks(buf, urlBase, sortFlags, _t("Sort by idle outbound"), FLAG_IDLE_OUT);
|
||||
buf.append("</th>");
|
||||
buf.append("<th class=\"smallhead\" nowrap><a href=\"#def.rate\">").append(_("In/Out")).append("</a><br>");
|
||||
appendSortLinks(buf, urlBase, sortFlags, _("Sort by inbound rate"), FLAG_RATE_IN);
|
||||
buf.append("<th class=\"smallhead\" nowrap><a href=\"#def.rate\">").append(_t("In/Out")).append("</a><br>");
|
||||
appendSortLinks(buf, urlBase, sortFlags, _t("Sort by inbound rate"), FLAG_RATE_IN);
|
||||
buf.append(" / ");
|
||||
appendSortLinks(buf, urlBase, sortFlags, _("Sort by outbound rate"), FLAG_RATE_OUT);
|
||||
appendSortLinks(buf, urlBase, sortFlags, _t("Sort by outbound rate"), FLAG_RATE_OUT);
|
||||
buf.append("</th>\n");
|
||||
buf.append("<th class=\"smallhead\" nowrap><a href=\"#def.up\">").append(_("Up")).append("</a><br>");
|
||||
appendSortLinks(buf, urlBase, sortFlags, _("Sort by connection uptime"), FLAG_UPTIME);
|
||||
buf.append("</th><th class=\"smallhead\" nowrap><a href=\"#def.skew\">").append(_("Skew")).append("</a><br>");
|
||||
appendSortLinks(buf, urlBase, sortFlags, _("Sort by clock skew"), FLAG_SKEW);
|
||||
buf.append("<th class=\"smallhead\" nowrap><a href=\"#def.up\">").append(_t("Up")).append("</a><br>");
|
||||
appendSortLinks(buf, urlBase, sortFlags, _t("Sort by connection uptime"), FLAG_UPTIME);
|
||||
buf.append("</th><th class=\"smallhead\" nowrap><a href=\"#def.skew\">").append(_t("Skew")).append("</a><br>");
|
||||
appendSortLinks(buf, urlBase, sortFlags, _t("Sort by clock skew"), FLAG_SKEW);
|
||||
buf.append("</th>\n");
|
||||
buf.append("<th class=\"smallhead\" nowrap><a href=\"#def.cwnd\">CWND</a><br>");
|
||||
appendSortLinks(buf, urlBase, sortFlags, _("Sort by congestion window"), FLAG_CWND);
|
||||
appendSortLinks(buf, urlBase, sortFlags, _t("Sort by congestion window"), FLAG_CWND);
|
||||
buf.append("</th><th class=\"smallhead\" nowrap><a href=\"#def.ssthresh\">SST</a><br>");
|
||||
appendSortLinks(buf, urlBase, sortFlags, _("Sort by slow start threshold"), FLAG_SSTHRESH);
|
||||
appendSortLinks(buf, urlBase, sortFlags, _t("Sort by slow start threshold"), FLAG_SSTHRESH);
|
||||
buf.append("</th>\n");
|
||||
buf.append("<th class=\"smallhead\" nowrap><a href=\"#def.rtt\">RTT</a><br>");
|
||||
appendSortLinks(buf, urlBase, sortFlags, _("Sort by round trip time"), FLAG_RTT);
|
||||
//buf.append("</th><th class=\"smallhead\" nowrap><a href=\"#def.dev\">").append(_("Dev")).append("</a><br>");
|
||||
//appendSortLinks(buf, urlBase, sortFlags, _("Sort by round trip time deviation"), FLAG_DEV);
|
||||
appendSortLinks(buf, urlBase, sortFlags, _t("Sort by round trip time"), FLAG_RTT);
|
||||
//buf.append("</th><th class=\"smallhead\" nowrap><a href=\"#def.dev\">").append(_t("Dev")).append("</a><br>");
|
||||
//appendSortLinks(buf, urlBase, sortFlags, _t("Sort by round trip time deviation"), FLAG_DEV);
|
||||
buf.append("</th><th class=\"smallhead\" nowrap><a href=\"#def.rto\">RTO</a><br>");
|
||||
appendSortLinks(buf, urlBase, sortFlags, _("Sort by retransmission timeout"), FLAG_RTO);
|
||||
appendSortLinks(buf, urlBase, sortFlags, _t("Sort by retransmission timeout"), FLAG_RTO);
|
||||
buf.append("</th>\n");
|
||||
buf.append("<th class=\"smallhead\" nowrap><a href=\"#def.mtu\">MTU</a><br>");
|
||||
appendSortLinks(buf, urlBase, sortFlags, _("Sort by outbound maximum transmit unit"), FLAG_MTU);
|
||||
buf.append("</th><th class=\"smallhead\" nowrap><a href=\"#def.send\">").append(_("TX")).append("</a><br>");
|
||||
appendSortLinks(buf, urlBase, sortFlags, _("Sort by packets sent"), FLAG_SEND);
|
||||
buf.append("</th><th class=\"smallhead\" nowrap><a href=\"#def.recv\">").append(_("RX")).append("</a><br>");
|
||||
appendSortLinks(buf, urlBase, sortFlags, _("Sort by packets received"), FLAG_RECV);
|
||||
appendSortLinks(buf, urlBase, sortFlags, _t("Sort by outbound maximum transmit unit"), FLAG_MTU);
|
||||
buf.append("</th><th class=\"smallhead\" nowrap><a href=\"#def.send\">").append(_t("TX")).append("</a><br>");
|
||||
appendSortLinks(buf, urlBase, sortFlags, _t("Sort by packets sent"), FLAG_SEND);
|
||||
buf.append("</th><th class=\"smallhead\" nowrap><a href=\"#def.recv\">").append(_t("RX")).append("</a><br>");
|
||||
appendSortLinks(buf, urlBase, sortFlags, _t("Sort by packets received"), FLAG_RECV);
|
||||
buf.append("</th>\n");
|
||||
buf.append("<th class=\"smallhead\" nowrap><a href=\"#def.resent\">").append(_("Dup TX")).append("</a><br>");
|
||||
appendSortLinks(buf, urlBase, sortFlags, _("Sort by packets retransmitted"), FLAG_RESEND);
|
||||
buf.append("</th><th class=\"smallhead\" nowrap><a href=\"#def.dupRecv\">").append(_("Dup RX")).append("</a><br>");
|
||||
appendSortLinks(buf, urlBase, sortFlags, _("Sort by packets received more than once"), FLAG_DUP);
|
||||
buf.append("<th class=\"smallhead\" nowrap><a href=\"#def.resent\">").append(_t("Dup TX")).append("</a><br>");
|
||||
appendSortLinks(buf, urlBase, sortFlags, _t("Sort by packets retransmitted"), FLAG_RESEND);
|
||||
buf.append("</th><th class=\"smallhead\" nowrap><a href=\"#def.dupRecv\">").append(_t("Dup RX")).append("</a><br>");
|
||||
appendSortLinks(buf, urlBase, sortFlags, _t("Sort by packets received more than once"), FLAG_DUP);
|
||||
buf.append("</th></tr>\n");
|
||||
out.write(buf.toString());
|
||||
buf.setLength(0);
|
||||
@ -2532,17 +2532,17 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
// buf.append(' ').append(_context.blocklist().toStr(ip));
|
||||
buf.append("</td><td class=\"cells\" nowrap align=\"left\">");
|
||||
if (peer.isInbound())
|
||||
buf.append("<img src=\"/themes/console/images/inbound.png\" alt=\"Inbound\" title=\"").append(_("Inbound")).append("\">");
|
||||
buf.append("<img src=\"/themes/console/images/inbound.png\" alt=\"Inbound\" title=\"").append(_t("Inbound")).append("\">");
|
||||
else
|
||||
buf.append("<img src=\"/themes/console/images/outbound.png\" alt=\"Outbound\" title=\"").append(_("Outbound")).append("\">");
|
||||
buf.append("<img src=\"/themes/console/images/outbound.png\" alt=\"Outbound\" title=\"").append(_t("Outbound")).append("\">");
|
||||
if (peer.getWeRelayToThemAs() > 0)
|
||||
buf.append(" <img src=\"/themes/console/images/outbound.png\" height=\"8\" width=\"12\" alt=\"^\" title=\"").append(_("We offered to introduce them")).append("\">");
|
||||
buf.append(" <img src=\"/themes/console/images/outbound.png\" height=\"8\" width=\"12\" alt=\"^\" title=\"").append(_t("We offered to introduce them")).append("\">");
|
||||
if (peer.getTheyRelayToUsAs() > 0)
|
||||
buf.append(" <img src=\"/themes/console/images/inbound.png\" height=\"8\" width=\"12\" alt=\"V\" title=\"").append(_("They offered to introduce us")).append("\">");
|
||||
buf.append(" <img src=\"/themes/console/images/inbound.png\" height=\"8\" width=\"12\" alt=\"V\" title=\"").append(_t("They offered to introduce us")).append("\">");
|
||||
|
||||
boolean appended = false;
|
||||
if (_activeThrottle.isChoked(peer.getRemotePeer())) {
|
||||
buf.append("<br><i>").append(_("Choked")).append("</i>");
|
||||
buf.append("<br><i>").append(_t("Choked")).append("</i>");
|
||||
appended = true;
|
||||
}
|
||||
int cfs = peer.getConsecutiveFailedSends();
|
||||
@ -2550,15 +2550,15 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
if (!appended) buf.append("<br>");
|
||||
buf.append(" <i>");
|
||||
if (cfs == 1)
|
||||
buf.append(_("1 fail"));
|
||||
buf.append(_t("1 fail"));
|
||||
else
|
||||
buf.append(_("{0} fails", cfs));
|
||||
buf.append(_t("{0} fails", cfs));
|
||||
buf.append("</i>");
|
||||
appended = true;
|
||||
}
|
||||
if (_context.banlist().isBanlisted(peer.getRemotePeer(), STYLE)) {
|
||||
if (!appended) buf.append("<br>");
|
||||
buf.append(" <i>").append(_("Banned")).append("</i>");
|
||||
buf.append(" <i>").append(_t("Banned")).append("</i>");
|
||||
appended = true;
|
||||
}
|
||||
//byte[] ip = getIP(peer.getRemotePeer());
|
||||
@ -2617,7 +2617,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
buf.append(THINSP).append(peer.getConcurrentSendWindow());
|
||||
buf.append(THINSP).append(peer.getConsecutiveSendRejections());
|
||||
if (peer.isBacklogged())
|
||||
buf.append(' ').append(_("backlogged"));
|
||||
buf.append(' ').append(_t("backlogged"));
|
||||
buf.append("</td>");
|
||||
|
||||
buf.append("<td class=\"cells\" align=\"right\">");
|
||||
@ -2949,7 +2949,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
" from: ", new Exception("traceback"));
|
||||
if (old != Status.UNKNOWN)
|
||||
_context.router().eventLog().addEvent(EventLog.REACHABILITY,
|
||||
"from " + _(old.toStatusString()) + " to " + _(status.toStatusString()));
|
||||
"from " + _t(old.toStatusString()) + " to " + _t(status.toStatusString()));
|
||||
// Always rebuild when the status changes, even if our address hasn't changed,
|
||||
// as rebuildExternalAddress() calls replaceAddress() which calls CSFI.notifyReplaceAddress()
|
||||
// which will start up NTCP inbound when we transition to OK.
|
||||
|
Reference in New Issue
Block a user