forked from I2P_Developers/i2p.i2p
cleanup fail output on peers.jsp
This commit is contained in:
@ -1952,9 +1952,15 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
|||||||
buf.append("<br><i>").append(_("Choked")).append("</i>");
|
buf.append("<br><i>").append(_("Choked")).append("</i>");
|
||||||
appended = true;
|
appended = true;
|
||||||
}
|
}
|
||||||
if (peer.getConsecutiveFailedSends() > 0) {
|
int cfs = peer.getConsecutiveFailedSends();
|
||||||
|
if (cfs > 0) {
|
||||||
if (!appended) buf.append("<br>");
|
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;
|
appended = true;
|
||||||
}
|
}
|
||||||
if (_context.shitlist().isShitlisted(peer.getRemotePeer(), STYLE)) {
|
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);
|
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
|
* Cache the bid to reduce object churn
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user