\n");
+ // Store all items in map so they are sorted by translated name, add the plugins, then output
+ Map svcs = new TreeMap(Collator.getInstance());
+ StringBuilder rbuf = new StringBuilder(128);
PortMapper pm = _context.portMapper();
if (pm.isRegistered(PortMapper.SVC_SUSIDNS)) {
- buf.append("")
- .append(nbsp(_t("Addressbook")))
- .append("\n");
+ String tx = _t("Addressbook");
+ rbuf.append("")
+ .append(nbsp(tx))
+ .append("\n");
+ svcs.put(tx, rbuf.toString());
}
if (!StatSummarizer.isDisabled(_context)) {
- buf.append("")
- .append(nbsp(_t("Graphs")))
- .append("\n");
+ String tx = _t("Graphs");
+ rbuf.setLength(0);
+ rbuf.append("")
+ .append(nbsp(tx))
+ .append("\n");
+ svcs.put(tx, rbuf.toString());
}
- buf.append("")
- .append(nbsp(_t("Help")))
+ .append(nbsp(tx))
.append("\n");
+ svcs.put(tx, rbuf.toString());
if (pm.isRegistered(PortMapper.SVC_I2PTUNNEL)) {
- buf.append("")
- .append(nbsp(_t("Hidden Services Manager")))
- .append("\n");
+ tx = _t("Hidden Services Manager");
+ rbuf.setLength(0);
+ rbuf.append("")
+ .append(nbsp(tx))
+ .append("\n");
+ svcs.put(tx, rbuf.toString());
}
- buf.append("")
- .append(nbsp(_t("Logs")))
- .append("\n" +
+ tx = _t("Logs");
+ rbuf.setLength(0);
+ rbuf.append("")
+ .append(nbsp(tx))
+ .append("\n");
+ svcs.put(tx, rbuf.toString());
- "")
- .append(nbsp(_t("NetDB")))
- .append("\n" +
+ tx = _t("NetDB");
+ rbuf.setLength(0);
+ rbuf.append("")
+ .append(nbsp(tx))
+ .append("\n");
+ svcs.put(tx, rbuf.toString());
- "")
- .append(nbsp(_t("Peers")))
- .append("\n" +
+ tx = _t("Peers");
+ rbuf.setLength(0);
+ rbuf.append("")
+ .append(nbsp(tx))
+ .append("\n");
+ svcs.put(tx, rbuf.toString());
- "")
- .append(nbsp(_t("Profiles")))
- .append("\n" +
+ tx = _t("Profiles");
+ rbuf.setLength(0);
+ rbuf.append("")
+ .append(nbsp(tx))
+ .append("\n");
+ svcs.put(tx, rbuf.toString());
- "")
- .append(nbsp(_t("Tunnels")))
- .append("\n");
+ tx = _t("Tunnels");
+ rbuf.setLength(0);
+ rbuf.append("")
+ .append(nbsp(tx))
+ .append("\n");
+ svcs.put(tx, rbuf.toString());
+ for (String row : svcs.values()) {
+ buf.append(row);
+ }
buf.append(" |