forked from I2P_Developers/i2p.i2p
Give the summary bar sections string names (some already translated)
This commit is contained in:
@ -45,6 +45,27 @@ public class SummaryBarRenderer {
|
||||
{"HelpAndFAQ", "I2PServices", "I2PInternals", "General", "ShortGeneral", "NetworkReachability",
|
||||
"UpdateStatus", "RestartStatus", "Peers", "FirewallAndReseedStatus", "Bandwidth", "Tunnels",
|
||||
"Congestion", "TunnelStatus", "Destinations", "NewsHeadings" };
|
||||
static final Map<String, String> SECTION_NAMES;
|
||||
static {
|
||||
Map<String, String> aMap = new HashMap<String, String>();;
|
||||
aMap.put("HelpAndFAQ", "Help & FAQ");
|
||||
aMap.put("I2PServices", "I2P Services");
|
||||
aMap.put("I2PInternals", "I2P Internals");
|
||||
aMap.put("General", "General");
|
||||
aMap.put("ShortGeneral", "Short General");
|
||||
aMap.put("NetworkReachability", "Network Reachability");
|
||||
aMap.put("UpdateStatus", "Update Status");
|
||||
aMap.put("RestartStatus", "Restart Status");
|
||||
aMap.put("Peers", "Peers");
|
||||
aMap.put("FirewallAndReseedStatus", "Firewall & Reseed Status");
|
||||
aMap.put("Bandwidth", "Bandwidth");
|
||||
aMap.put("Tunnels", "Tunnels");
|
||||
aMap.put("Congestion", "Congestion");
|
||||
aMap.put("TunnelStatus", "Tunnel Status");
|
||||
aMap.put("Destinations", "Local Destinations");
|
||||
aMap.put("NewsHeadings", "News & Updates");
|
||||
SECTION_NAMES = Collections.unmodifiableMap(aMap);
|
||||
}
|
||||
|
||||
private final RouterContext _context;
|
||||
private final SummaryHelper _helper;
|
||||
@ -589,7 +610,7 @@ public class SummaryBarRenderer {
|
||||
if (consoleNonce != null) {
|
||||
// Set up title and pre-headings stuff.
|
||||
buf.append("<h3><a href=\"/configupdate\">")
|
||||
.append(_("News & Updates"))
|
||||
.append(_("News & Updates"))
|
||||
.append("</a></h3><hr class=\"b\"><div class=\"newsheadings\">\n");
|
||||
// Get news content.
|
||||
String newsContent = newshelper.getContent();
|
||||
|
@ -790,6 +790,7 @@ public class SummaryHelper extends HelperBase {
|
||||
|
||||
public String getConfigTable() {
|
||||
String[] allSections = SummaryBarRenderer.ALL_SECTIONS;
|
||||
Map<String, String> sectionNames = SummaryBarRenderer.SECTION_NAMES;
|
||||
List<String> sections = getSummaryBarSections("default");
|
||||
TreeSet<String> sortedSections = new TreeSet();
|
||||
|
||||
@ -815,7 +816,7 @@ public class SummaryHelper extends HelperBase {
|
||||
buf.append("<tr><td align=\"center\"><input type=\"checkbox\" class=\"optbox\" name=\"delete_")
|
||||
.append(i)
|
||||
.append("\"></td><td align=\"left\">")
|
||||
.append(section)
|
||||
.append(_(sectionNames.get(section)))
|
||||
.append("</td><td align=\"right\"><input type=\"hidden\" name=\"order_")
|
||||
.append(i + "_" + section)
|
||||
.append("\" value=\"")
|
||||
@ -860,7 +861,7 @@ public class SummaryHelper extends HelperBase {
|
||||
|
||||
for (String s : sortedSections) {
|
||||
buf.append("<option value=\"").append(s).append("\">")
|
||||
.append(s).append("</option>\n");
|
||||
.append(sectionNames.get(s)).append("</option>\n");
|
||||
}
|
||||
|
||||
buf.append("</select>\n" +
|
||||
|
Reference in New Issue
Block a user