I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit a1e3ef9c authored by zzz's avatar zzz
Browse files

cleanup fail output on peers.jsp

parent 7aece713
No related branches found
No related tags found
No related merge requests found
......@@ -1952,9 +1952,15 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
buf.append("<br><i>").append(_("Choked")).append("</i>");
appended = true;
}
if (peer.getConsecutiveFailedSends() > 0) {
int cfs = peer.getConsecutiveFailedSends();
if (cfs > 0) {
if (!appended) buf.append("<br>");
buf.append(" <i>").append(peer.getConsecutiveFailedSends()).append(' ').append(_("fail(s)")).append("</i>");
buf.append(" <i>");
if (cfs == 1)
buf.append(_("1 fail"));
else
buf.append(_("{0} fails", cfs));
buf.append("</i>");
appended = true;
}
if (_context.shitlist().isShitlisted(peer.getRemotePeer(), STYLE)) {
......@@ -2182,6 +2188,13 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
return Translate.getString(s, _context, BUNDLE_NAME);
}
/**
* Translate
*/
private final String _(String s, Object o) {
return Translate.getString(s, o, _context, BUNDLE_NAME);
}
/*
* Cache the bid to reduce object churn
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment