translate country names on flag popups
This commit is contained in:
@ -1,5 +1,7 @@
|
|||||||
2010-03-05 zzz
|
2010-03-05 zzz
|
||||||
* Console: Tag reseed messages
|
* Console:
|
||||||
|
- Tag reseed messages
|
||||||
|
- Translate country names on flag popups
|
||||||
* I2PSOCKSIRCTunnel:
|
* I2PSOCKSIRCTunnel:
|
||||||
- New, for filtering IRC client traffic when using SOCKS
|
- New, for filtering IRC client traffic when using SOCKS
|
||||||
* I2PTunnelIRCClient:
|
* I2PTunnelIRCClient:
|
||||||
|
@ -33,6 +33,7 @@ import net.i2p.router.transport.udp.UDPTransport;
|
|||||||
import net.i2p.util.Log;
|
import net.i2p.util.Log;
|
||||||
import net.i2p.util.SimpleScheduler;
|
import net.i2p.util.SimpleScheduler;
|
||||||
import net.i2p.util.SimpleTimer;
|
import net.i2p.util.SimpleTimer;
|
||||||
|
import net.i2p.util.Translate;
|
||||||
|
|
||||||
public class CommSystemFacadeImpl extends CommSystemFacade {
|
public class CommSystemFacadeImpl extends CommSystemFacade {
|
||||||
private Log _log;
|
private Log _log;
|
||||||
@ -475,6 +476,8 @@ public class CommSystemFacadeImpl extends CommSystemFacade {
|
|||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final String BUNDLE_NAME = "net.i2p.router.web.messages";
|
||||||
|
|
||||||
/** Provide a consistent "look" for displaying router IDs in the console */
|
/** Provide a consistent "look" for displaying router IDs in the console */
|
||||||
@Override
|
@Override
|
||||||
public String renderPeerHTML(Hash peer) {
|
public String renderPeerHTML(Hash peer) {
|
||||||
@ -482,8 +485,11 @@ public class CommSystemFacadeImpl extends CommSystemFacade {
|
|||||||
StringBuilder buf = new StringBuilder(128);
|
StringBuilder buf = new StringBuilder(128);
|
||||||
String c = getCountry(peer);
|
String c = getCountry(peer);
|
||||||
if (c != null) {
|
if (c != null) {
|
||||||
|
String countryName = getCountryName(c);
|
||||||
|
if (countryName.length() > 2)
|
||||||
|
countryName = Translate.getString(countryName, _context, BUNDLE_NAME);
|
||||||
buf.append("<img height=\"11\" width=\"16\" alt=\"").append(c.toUpperCase()).append("\" title=\"");
|
buf.append("<img height=\"11\" width=\"16\" alt=\"").append(c.toUpperCase()).append("\" title=\"");
|
||||||
buf.append(getCountryName(c));
|
buf.append(countryName);
|
||||||
buf.append("\" src=\"/flags.jsp?c=").append(c).append("\"> ");
|
buf.append("\" src=\"/flags.jsp?c=").append(c).append("\"> ");
|
||||||
}
|
}
|
||||||
buf.append("<tt>");
|
buf.append("<tt>");
|
||||||
|
Reference in New Issue
Block a user