forked from I2P_Developers/i2p.i2p
Router: Add a router strings bundle
This commit is contained in:
@ -35,10 +35,9 @@ fi
|
||||
|
||||
# list specific files in router/ here, so we don't scan the whole tree
|
||||
# core/ now has its own bundle
|
||||
# router/ now has its own bundle for some files
|
||||
ROUTERFILES="\
|
||||
../../../router/java/src/net/i2p/router/Blocklist.java \
|
||||
../../../router/java/src/net/i2p/router/CommSystemFacade.java \
|
||||
../../../router/java/src/net/i2p/router/RouterThrottleImpl.java \
|
||||
../../../router/java/src/net/i2p/router/networkdb/reseed/Reseeder.java \
|
||||
../../../router/java/src/net/i2p/router/tasks/CoalesceStatsEvent.java \
|
||||
../../../router/java/src/net/i2p/router/transport/CommSystemFacadeImpl.java \
|
||||
@ -49,7 +48,6 @@ ROUTERFILES="\
|
||||
../../../router/java/src/net/i2p/router/transport/ntcp/EstablishState.java \
|
||||
../../../router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java \
|
||||
../../../router/java/src/net/i2p/router/transport/udp/UDPTransport.java \
|
||||
../../../router/java/src/net/i2p/router/tunnel/pool/BuildHandler.java \
|
||||
../../../core/java/src/net/i2p/util/LogWriter.java \
|
||||
"
|
||||
|
||||
|
@ -105,7 +105,7 @@ public class PeerHelper extends HelperBase {
|
||||
out.write("<p id=\"upnpstatus\"><b>");
|
||||
out.write(_t("Status"));
|
||||
out.write(": ");
|
||||
out.write(_t(_context.commSystem().getStatus().toStatusString()));
|
||||
out.write(_context.commSystem().getLocalizedStatusString());
|
||||
out.write("</b></p>");
|
||||
}
|
||||
|
||||
@ -293,7 +293,7 @@ public class PeerHelper extends HelperBase {
|
||||
buf.append(". ").append(_t("Limit")).append(": ").append(nt.getMaxConnections());
|
||||
//buf.append(". ").append(_t("Timeout")).append(": ").append(DataHelper.formatDuration2(_pumper.getIdleTimeout()));
|
||||
if (isAdvanced()) {
|
||||
buf.append(". ").append(_t("Status")).append(": ").append(_t(nt.getReachabilityStatus().toStatusString()));
|
||||
buf.append(". ").append(_t("Status")).append(": ").append(nt.getReachabilityStatus().toLocalizedStatusString(_context));
|
||||
}
|
||||
buf.append(".</h3>\n" +
|
||||
"<div class=\"widescroll\"><table id=\"ntcpconnections\">\n" +
|
||||
@ -457,7 +457,7 @@ public class PeerHelper extends HelperBase {
|
||||
//buf.append(". ").append(_t("Timeout")).append(": ").append(DataHelper.formatDuration2(_expireTimeout));
|
||||
final boolean isAdvanced = isAdvanced();
|
||||
if (isAdvanced) {
|
||||
buf.append(". ").append(_t("Status")).append(": ").append(_t(ut.getReachabilityStatus().toStatusString()));
|
||||
buf.append(". ").append(_t("Status")).append(": ").append(ut.getReachabilityStatus().toLocalizedStatusString(_context));
|
||||
}
|
||||
buf.append(".</h3>\n");
|
||||
buf.append("<div class=\"widescroll\"><table id=\"udpconnections\">\n");
|
||||
|
@ -1079,7 +1079,7 @@ class SummaryBarRenderer {
|
||||
if (_helper == null) return "";
|
||||
StringBuilder buf = new StringBuilder(50);
|
||||
buf.append("<h4><span class=\"tunnelBuildStatus\">")
|
||||
.append(_t(_helper.getTunnelStatus()))
|
||||
.append(_helper.getTunnelStatus())
|
||||
.append("</span></h4>\n");
|
||||
return buf.toString();
|
||||
}
|
||||
|
@ -239,6 +239,7 @@ public class SummaryHelper extends HelperBase {
|
||||
return new NetworkStateMessage(NetworkState.TESTING, _t("Testing"));
|
||||
|
||||
Status status = _context.commSystem().getStatus();
|
||||
String txstatus = _context.commSystem().getLocalizedStatusString();
|
||||
NetworkState state = NetworkState.RUNNING;
|
||||
switch (status) {
|
||||
case OK:
|
||||
@ -249,7 +250,7 @@ public class SummaryHelper extends HelperBase {
|
||||
case IPV4_SNAT_IPV6_OK:
|
||||
List<RouterAddress> ras = routerInfo.getTargetAddresses("NTCP", "NTCP2");
|
||||
if (ras.isEmpty())
|
||||
return new NetworkStateMessage(NetworkState.RUNNING, _t(status.toStatusString()));
|
||||
return new NetworkStateMessage(NetworkState.RUNNING, txstatus);
|
||||
byte[] ip = null;
|
||||
for (RouterAddress ra : ras) {
|
||||
ip = ra.getIP();
|
||||
@ -260,7 +261,7 @@ public class SummaryHelper extends HelperBase {
|
||||
return new NetworkStateMessage(NetworkState.ERROR, _t("ERR-Unresolved TCP Address"));
|
||||
// TODO set IPv6 arg based on configuration?
|
||||
if (TransportUtil.isPubliclyRoutable(ip, true))
|
||||
return new NetworkStateMessage(NetworkState.RUNNING, _t(status.toStatusString()));
|
||||
return new NetworkStateMessage(NetworkState.RUNNING, txstatus);
|
||||
return new NetworkStateMessage(NetworkState.ERROR, _t("ERR-Private TCP Address"));
|
||||
|
||||
case IPV4_SNAT_IPV6_UNKNOWN:
|
||||
@ -279,7 +280,7 @@ public class SummaryHelper extends HelperBase {
|
||||
return new NetworkStateMessage(NetworkState.WARN, _t("WARN-Firewalled and Floodfill"));
|
||||
//if (_context.router().getRouterInfo().getCapabilities().indexOf('O') >= 0)
|
||||
// return new NetworkStateMessage(NetworkState.WARN, _t("WARN-Firewalled and Fast"));
|
||||
return new NetworkStateMessage(state, _t(status.toStatusString()));
|
||||
return new NetworkStateMessage(state, txstatus);
|
||||
|
||||
case DISCONNECTED:
|
||||
return new NetworkStateMessage(NetworkState.TESTING, _t("Disconnected - check network connection"));
|
||||
@ -302,7 +303,7 @@ public class SummaryHelper extends HelperBase {
|
||||
else
|
||||
return new NetworkStateMessage(NetworkState.WARN, _t("WARN-Firewalled with UDP Disabled"));
|
||||
}
|
||||
return new NetworkStateMessage(state, _t(status.toStatusString()));
|
||||
return new NetworkStateMessage(state, txstatus);
|
||||
}
|
||||
}
|
||||
|
||||
@ -765,7 +766,7 @@ public class SummaryHelper extends HelperBase {
|
||||
public String getTunnelStatus() {
|
||||
if (_context == null)
|
||||
return "";
|
||||
return _context.throttle().getTunnelStatus();
|
||||
return _context.throttle().getLocalizedTunnelStatus();
|
||||
}
|
||||
|
||||
public String getInboundBacklog() {
|
||||
|
Reference in New Issue
Block a user