Console: Split up /help page, prep for translation (ticket #2298) (WIP)

Summary bar -> sidebar
Remove static translated help pages
Add jsp for LICENSE.txt
This commit is contained in:
zzz
2019-07-19 20:30:22 +00:00
parent d73058fd65
commit 365820172a
30 changed files with 189 additions and 1118 deletions

View File

@ -27,7 +27,7 @@ public class ConfigNavHelper extends HelperBase {
"reseed", "advanced", "family" };
private static final String titles[] =
{_x("Bandwidth"), _x("Network"), _x("UI"), _x("Summary Bar"), _x("Home Page"),
{_x("Bandwidth"), _x("Network"), _x("UI"), _x("Sidebar"), _x("Home Page"),
_x("Service"), _x("Update"), _x("Tunnels"),
_x("Clients"), _x("Peers"), _x("Keyring"), _x("Logging"), _x("Stats"),
_x("I2CP"), _x("Plugins"), _x("Web Apps"),

View File

@ -65,9 +65,9 @@ public class ConfigReseedHandler extends FormHandler {
}
if (!addCheckerStatus(checker)) {
if (checker.inProgress()) {
addFormNotice(_t("Reseed in progress, check summary bar for status"));
addFormNotice(_t("Reseed in progress, check sidebar for status"));
} else {
addFormNotice(_t("Reseed complete, check summary bar for status"));
addFormNotice(_t("Reseed complete, check sidebar for status"));
}
}
}

View File

@ -12,7 +12,7 @@ import net.i2p.router.web.FormHandler;
/**
* Simple summary bar configuration.
* Simple sidebar configuration.
*
* @since 0.9.1
*/
@ -39,12 +39,12 @@ public class ConfigSummaryHandler extends FormHandler {
}
} else if (_action.equals(_t("Restore full default"))) {
_context.router().saveConfig(SummaryHelper.PROP_SUMMARYBAR + "default", isAdvanced() ? SummaryHelper.DEFAULT_FULL_ADVANCED : SummaryHelper.DEFAULT_FULL);
addFormNotice(_t("Full summary bar default restored.") + " " +
_t("Summary bar will refresh shortly."));
addFormNotice(_t("Full sidebar default restored.") + " " +
_t("Sidebar will refresh shortly."));
} else if (_action.equals(_t("Restore minimal default"))) {
_context.router().saveConfig(SummaryHelper.PROP_SUMMARYBAR + "default", isAdvanced() ? SummaryHelper.DEFAULT_MINIMAL_ADVANCED : SummaryHelper.DEFAULT_MINIMAL);
addFormNotice(_t("Minimal summary bar default restored.") + " " +
_t("Summary bar will refresh shortly."));
addFormNotice(_t("Minimal sidebar default restored.") + " " +
_t("Sidebar will refresh shortly."));
} else if (adding || deleting || saving || moving) {
Map<Integer, String> sections = new TreeMap<Integer, String>();
for (Object o : _settings.keySet()) {
@ -137,7 +137,7 @@ public class ConfigSummaryHandler extends FormHandler {
}
SummaryHelper.saveSummaryBarSections(_context, "default", sections);
addFormNotice(_t("Saved order of sections.") + " " +
_t("Summary bar will refresh shortly."));
_t("Sidebar will refresh shortly."));
} else {
//addFormError(_t("Unsupported"));
}

View File

@ -150,6 +150,22 @@ public class PeerHelper extends HelperBase {
out.write(buf.toString());
} else if ("upnp".equals(_transport)) {
// UPnP Status
StringBuilder buf = new StringBuilder(512);
buf.append("<h3>").append(_t("UPnP Overview"))
.append("</h3><div id=\"upnpoverview\"><p>")
.append(_t("UPnP is used to communicate with Internet Gateway Devices (IGDs) to detect the external IP address and forward ports."))
.append(' ')
.append(_t("If UPnP is not working, it may be for one of the following reasons:"))
.append("</p><ul id=\"upnphelp\"><li>").append(_t("No UPnP-compatible device present"))
.append("</li>\n<li>").append(_t("UPnP disabled on the device"))
.append("</li>\n<li>").append(_t("Software firewall interference with UPnP"))
.append("</li>\n<li>").append(_t("Bugs in the device's UPnP implementation"))
.append("</li>\n<li>").append(_t("Multiple firewall/routers in the internet connection path"))
.append("</li>\n<li>").append(_t("UPnP device change, reset, or address change"))
.append("</li>\n</ul><p>")
.append(_t("UPnP may be enabled or disabled on the Network Configuration page, but a change requires a router restart to take effect."))
.append("</p></div>");
out.write(buf.toString());
_context.commSystem().renderStatusHTML(_out, _urlBase, _sortFlags);
}
out.flush();

View File

@ -152,22 +152,10 @@ class SummaryBarRenderer {
"<table id=\"sb_help\"><tr><td>" +
"<a href=\"/help#advancedsettings\" target=\"_top\" title=\"")
.append(_t("A guide to some of the less-used configuration settings"))
.append("\">")
.append(nbsp(_t("Advanced Settings")))
.append("</a>\n" +
"<a href=\"/help#changelog\" target=\"_top\" title=\"")
"<a href=\"/viewhistory\" target=\"_top\" title=\"")
.append(_t("Recent development changes to the router"))
.append("\">")
.append(nbsp(_t("Changelog")))
.append("</a>\n" +
"<a href=\"/help#configurationhelp\" target=\"_top\" title=\"")
.append(_t("An introduction to configuring your router"))
.append("\">")
.append(nbsp(_t("Configuration")))
.append("</a>\n" +
"<a href=\"/help#faq\" target=\"_top\" title=\"")
@ -176,7 +164,7 @@ class SummaryBarRenderer {
.append(nbsp(_t("FAQ")))
.append("</a>\n" +
"<a href=\"/help#legal\" target=\"_top\" title=\"")
"<a href=\"/viewlicense\" target=\"_top\" title=\"")
.append(_t("Information regarding software and licenses used by I2P"))
.append("\">")
.append(nbsp(_t("Legal")))