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

Skip to content
Snippets Groups Projects
Commit 5766b36b authored by str4d's avatar str4d
Browse files

Give the summary bar sections string names (some already translated)

parent 4cea0b60
No related branches found
No related tags found
No related merge requests found
......@@ -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 &amp; 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 &amp; 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 &amp; 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 &amp; 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" +
......
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