forked from I2P_Developers/i2p.i2p
remove concatentation within appends
This commit is contained in:
@ -90,8 +90,11 @@ public class ConfigClientsHelper extends HelperBase {
|
||||
/** clients */
|
||||
public String getForm1() {
|
||||
StringBuilder buf = new StringBuilder(1024);
|
||||
buf.append("<table>\n");
|
||||
buf.append("<tr><th align=\"right\">" + _("Client") + "</th><th>" + _("Run at Startup?") + "</th><th>" + _("Control") + "</th><th align=\"left\">" + _("Class and arguments") + "</th></tr>\n");
|
||||
buf.append("<table>\n" +
|
||||
"<tr><th align=\"right\">").append(_("Client")).append("</th><th>")
|
||||
.append(_("Run at Startup?")).append("</th><th>")
|
||||
.append(_("Control")).append("</th><th align=\"left\">")
|
||||
.append(_("Class and arguments")).append("</th></tr>\n");
|
||||
|
||||
List<ClientAppConfig> clients = ClientAppConfig.getClientApps(_context);
|
||||
for (int cur = 0; cur < clients.size(); cur++) {
|
||||
@ -134,8 +137,11 @@ public class ConfigClientsHelper extends HelperBase {
|
||||
/** webapps */
|
||||
public String getForm2() {
|
||||
StringBuilder buf = new StringBuilder(1024);
|
||||
buf.append("<table>\n");
|
||||
buf.append("<tr><th align=\"right\">" + _("WebApp") + "</th><th>" + _("Run at Startup?") + "</th><th>" + _("Control") + "</th><th align=\"left\">" + _("Description") + "</th></tr>\n");
|
||||
buf.append("<table>\n" +
|
||||
"<tr><th align=\"right\">").append(_("WebApp")).append("</th><th>")
|
||||
.append(_("Run at Startup?")).append("</th><th>")
|
||||
.append(_("Control")).append("</th><th align=\"left\">")
|
||||
.append(_("Description")).append("</th></tr>\n");
|
||||
Properties props = RouterConsoleRunner.webAppProperties(_context);
|
||||
Set<String> keys = new TreeSet(props.keySet());
|
||||
for (String name : keys) {
|
||||
@ -159,8 +165,11 @@ public class ConfigClientsHelper extends HelperBase {
|
||||
/** plugins */
|
||||
public String getForm3() {
|
||||
StringBuilder buf = new StringBuilder(1024);
|
||||
buf.append("<table>\n");
|
||||
buf.append("<tr><th align=\"right\">" + _("Plugin") + "</th><th>" + _("Run at Startup?") + "</th><th>" + _("Control") + "</th><th align=\"left\">" + _("Description") + "</th></tr>\n");
|
||||
buf.append("<table>\n" +
|
||||
"<tr><th align=\"right\">").append(_("Plugin")).append("</th><th>")
|
||||
.append(_("Run at Startup?")).append("</th><th>")
|
||||
.append(_("Control")).append("</th><th align=\"left\">")
|
||||
.append(_("Description")).append("</th></tr>\n");
|
||||
Properties props = PluginStarter.pluginProperties();
|
||||
Set<String> keys = new TreeSet(props.keySet());
|
||||
for (String name : keys) {
|
||||
@ -273,15 +282,20 @@ public class ConfigClientsHelper extends HelperBase {
|
||||
// The icons were way too much, so there's an X in each button class,
|
||||
// remove if you wnat to put them back
|
||||
if (showStartButton && (!ro) && !edit) {
|
||||
buf.append("<button type=\"submit\" class=\"Xaccept\" name=\"action\" value=\"Start ").append(index).append("\" >" + _("Start") + "<span class=hide> ").append(index).append("</span></button>");
|
||||
buf.append("<button type=\"submit\" class=\"Xaccept\" name=\"action\" value=\"Start ").append(index).append("\" >")
|
||||
.append(_("Start")).append("<span class=hide> ").append(index).append("</span></button>");
|
||||
}
|
||||
if (showStopButton && (!edit))
|
||||
buf.append("<button type=\"submit\" class=\"Xstop\" name=\"action\" value=\"Stop ").append(index).append("\" >" + _("Stop") + "<span class=hide> ").append(index).append("</span></button>");
|
||||
buf.append("<button type=\"submit\" class=\"Xstop\" name=\"action\" value=\"Stop ").append(index).append("\" >")
|
||||
.append(_("Stop")).append("<span class=hide> ").append(index).append("</span></button>");
|
||||
if (showEditButton && (!edit) && !ro)
|
||||
buf.append("<button type=\"submit\" class=\"Xadd\" name=\"edit\" value=\"Edit ").append(index).append("\" >" + _("Edit") + "<span class=hide> ").append(index).append("</span></button>");
|
||||
buf.append("<button type=\"submit\" class=\"Xadd\" name=\"edit\" value=\"Edit ").append(index).append("\" >")
|
||||
.append(_("Edit")).append("<span class=hide> ").append(index).append("</span></button>");
|
||||
if (showUpdateButton && (!edit) && !ro) {
|
||||
buf.append("<button type=\"submit\" class=\"Xcheck\" name=\"action\" value=\"Check ").append(index).append("\" >" + _("Check for updates") + "<span class=hide> ").append(index).append("</span></button>");
|
||||
buf.append("<button type=\"submit\" class=\"Xdownload\" name=\"action\" value=\"Update ").append(index).append("\" >" + _("Update") + "<span class=hide> ").append(index).append("</span></button>");
|
||||
buf.append("<button type=\"submit\" class=\"Xcheck\" name=\"action\" value=\"Check ").append(index).append("\" >")
|
||||
.append(_("Check for updates")).append("<span class=hide> ").append(index).append("</span></button>");
|
||||
buf.append("<button type=\"submit\" class=\"Xdownload\" name=\"action\" value=\"Update ").append(index).append("\" >")
|
||||
.append(_("Update")).append("<span class=hide> ").append(index).append("</span></button>");
|
||||
}
|
||||
if (showDeleteButton && (!edit) && !ro) {
|
||||
buf.append("<button type=\"submit\" class=\"Xdelete\" name=\"action\" value=\"Delete ").append(index)
|
||||
|
@ -45,9 +45,9 @@ public class ConfigLoggingHelper extends HelperBase {
|
||||
buf.append(prefix).append('=').append(level).append('\n');
|
||||
}
|
||||
buf.append("</textarea><br>\n");
|
||||
buf.append("<i>" + _("Add additional logging statements above. Example: net.i2p.router.tunnel=WARN") + "</i><br>");
|
||||
buf.append("<i>" + _("Or put entries in the logger.config file. Example: logger.record.net.i2p.router.tunnel=WARN") + "</i><br>");
|
||||
buf.append("<i>" + _("Valid levels are DEBUG, INFO, WARN, ERROR, CRIT") + "</i>\n");
|
||||
buf.append("<i>").append(_("Add additional logging statements above. Example: net.i2p.router.tunnel=WARN")).append("</i><br>");
|
||||
buf.append("<i>").append(_("Or put entries in the logger.config file. Example: logger.record.net.i2p.router.tunnel=WARN")).append("</i><br>");
|
||||
buf.append("<i>").append(_("Valid levels are DEBUG, INFO, WARN, ERROR, CRIT")).append("</i>\n");
|
||||
|
||||
/****
|
||||
// this is too big and ugly
|
||||
|
@ -115,9 +115,9 @@ public class ConfigUpdateHelper extends HelperBase {
|
||||
buf.append("\" selected=\"selected");
|
||||
|
||||
if (PERIODS[i] == -1)
|
||||
buf.append("\">" + _("Never") + "</option>\n");
|
||||
buf.append("\">").append(_("Never")).append("</option>\n");
|
||||
else
|
||||
buf.append("\">" + _("Every") + " ").append(DataHelper.formatDuration2(PERIODS[i])).append("</option>\n");
|
||||
buf.append("\">").append(_("Every")).append(' ').append(DataHelper.formatDuration2(PERIODS[i])).append("</option>\n");
|
||||
}
|
||||
buf.append("</select>\n");
|
||||
return buf.toString();
|
||||
|
@ -422,11 +422,11 @@ public class SummaryHelper extends HelperBase {
|
||||
|
||||
buf.append("<tr><td align=\"right\"><img src=\"/themes/console/images/");
|
||||
if (_context.clientManager().shouldPublishLeaseSet(h))
|
||||
buf.append("server.png\" alt=\"Server\" title=\"" + _("Server") + "\">");
|
||||
buf.append("server.png\" alt=\"Server\" title=\"").append(_("Server")).append("\">");
|
||||
else
|
||||
buf.append("client.png\" alt=\"Client\" title=\"" + _("Client") + "\">");
|
||||
buf.append("client.png\" alt=\"Client\" title=\"").append(_("Client")).append("\">");
|
||||
buf.append("</td><td align=\"left\"><b><a href=\"tunnels#").append(h.toBase64().substring(0,4));
|
||||
buf.append("\" target=\"_top\" title=\"" + _("Show tunnels") + "\">");
|
||||
buf.append("\" target=\"_top\" title=\"").append(_("Show tunnels")).append("\">");
|
||||
if (name.length() < 18)
|
||||
buf.append(name);
|
||||
else
|
||||
@ -861,7 +861,7 @@ public class SummaryHelper extends HelperBase {
|
||||
.append("\"></td><td align=\"left\">")
|
||||
.append(_(sectionNames.get(section)))
|
||||
.append("</td><td align=\"right\"><input type=\"hidden\" name=\"order_")
|
||||
.append(i + "_" + section)
|
||||
.append(i).append('_').append(section)
|
||||
.append("\" value=\"")
|
||||
.append(i)
|
||||
.append("\">");
|
||||
|
Reference in New Issue
Block a user