From 277a1619e493671c6878b38b9e9c044b6e3e5148 Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Mon, 28 May 2018 17:49:47 +0000 Subject: [PATCH] Console: Tagged string fixes (ticket #2017) CSS tweaks --- .../org/klomp/snark/web/I2PSnarkServlet.java | 17 +++++++---------- apps/i2ptunnel/jsp/editClient.jsi | 4 ++-- apps/i2ptunnel/jsp/editServer.jsi | 4 ++-- .../i2p/router/web/helpers/ConfigUIHelper.java | 6 +++--- apps/routerconsole/jsp/help-reachability.jsi | 2 +- .../src/src/i2p/susi/webmail/WebMail.java | 10 ++++++---- .../themes/console/classic/console.css | 4 ---- .../resources/themes/console/dark/console.css | 4 ---- .../resources/themes/console/light/console.css | 4 ---- .../themes/console/midnight/console.css | 4 ---- .../themes/susimail/classic/susimail.css | 4 ++++ .../resources/themes/susimail/dark/susimail.css | 4 ++++ .../themes/susimail/light/susimail.css | 4 ++++ .../themes/susimail/midnight/susimail.css | 4 ++++ 14 files changed, 37 insertions(+), 38 deletions(-) diff --git a/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java b/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java index c379ebbba7..f36482379c 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java +++ b/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java @@ -1645,15 +1645,12 @@ public class I2PSnarkServlet extends BasicServlet { if (remaining == 0) { img = "seeding"; txt = _t("Seeding"); - tooltip = _t("Seeding to {0} of {1} peers in swarm", curPeers, knownPeers); + tooltip = ngettext("Seeding to {0} peer", "Seeding to {0} peers", knownPeers); } else { // partial img = "complete"; txt = _t("Complete"); tooltip = txt; - if (curPeers > 0) { - tooltip = txt + " (" + _t("Seeding to {0} of {1} peers in swarm", curPeers, knownPeers) + ")"; - } } if (curPeers > 0 && !showPeers) { statusString = toThemeImg(img, "", tooltip) + "</td>" + @@ -1679,12 +1676,12 @@ public class I2PSnarkServlet extends BasicServlet { curPeers + thinsp(noThinsp) + ngettext("1 peer", "{0} peers", knownPeers) + "</a>"; } else if (isRunning && curPeers > 0 && downBps > 0) { - statusString = toThemeImg("downloading", "", _t("OK") + " (" + _t("Downloading from {0} of {1} peers in swarm", curPeers, knownPeers) + ")") + "</td>" + + statusString = toThemeImg("downloading", "", _t("OK") + ", " + ngettext("Downloading from {0} peer", "Downloading from {0} peers", curPeers)) + "</td>" + "<td class=\"snarkTorrentStatus\"><b>" + _t("OK") + ":</b> " + curPeers + thinsp(noThinsp) + ngettext("1 peer", "{0} peers", knownPeers); } else if (isRunning && curPeers > 0 && !showPeers) { - statusString = toThemeImg("stalled", "", _t("Stalled") + " (" + _t("Connected to {0} of {1} peers in swarm", curPeers, knownPeers) + ")") + "</td>" + + statusString = toThemeImg("stalled", "", _t("Stalled") + " (" + ngettext("Connected to {0} peer", "Connected to {0} peers", curPeers)) + "</td>" + "<td class=\"snarkTorrentStatus\"><b>" + _t("Stalled") + ":</b> <a href=\"" + uri + getQueryString(req, b64, null, null) + '#' + b64Short + "\">" + curPeers + thinsp(noThinsp) + @@ -1892,7 +1889,7 @@ public class I2PSnarkServlet extends BasicServlet { getQueryString(req, "", null, null).replace("?", "&") + "\"><img title=\""); else out.write("<input type=\"image\" name=\"action_Delete_" + b64 + "\" value=\"foo\" title=\""); - out.write(_t("Delete the .torrent file and the associated data file(s)")); + out.write(_t("Delete the .torrent file and the associated data files")); out.write("\" onclick=\"if (!confirm('"); // Can't figure out how to escape double quotes inside the onclick string. // Single quotes in translate strings with parameters must be doubled. @@ -2502,7 +2499,7 @@ public class I2PSnarkServlet extends BasicServlet { out.write(":<td colspan=\"2\"><input type=\"text\" name=\"upLimit\" class=\"r\" value=\"" + _manager.util().getMaxUploaders() + "\" size=\"4\" maxlength=\"3\"" + " title=\""); - out.write(_t("Maximum number of peers to upload to")); + out.write(_t("Maximum number of peers for uploading")); out.write("\"> "); out.write(_t("peers")); out.write("\n" + @@ -2527,7 +2524,7 @@ public class I2PSnarkServlet extends BasicServlet { out.write(":</label><td colspan=\"2\"><input type=\"checkbox\" class=\"optbox\" name=\"useOpenTrackers\" id=\"useOpenTrackers\" value=\"true\" " + (useOpenTrackers ? "checked " : "") + "title=\""); - out.write(_t("Announce torrents to open trackers as well as tracker(s) listed in the torrent file")); + out.write(_t("Announce torrents to open trackers as well as trackers listed in the torrent file")); out.write("\" ></td></tr>\n" + "<tr><td><label for=\"useDHT\">"); @@ -3271,7 +3268,7 @@ public class I2PSnarkServlet extends BasicServlet { .append("\">\n"); else buf.append("\" class=\"reload\" title=\"") - .append(_t("Check integrity of the downloaded file(s)")) + .append(_t("Check integrity of the downloaded files")) .append("\">\n"); } buf.append("</td></tr>\n"); diff --git a/apps/i2ptunnel/jsp/editClient.jsi b/apps/i2ptunnel/jsp/editClient.jsi index 88a9a89704..1122b062cd 100644 --- a/apps/i2ptunnel/jsp/editClient.jsi +++ b/apps/i2ptunnel/jsp/editClient.jsi @@ -655,7 +655,7 @@ </tr> <tr> <td colspan="2"> - <textarea rows="2" style="height: 8em;" cols="60" id="hostField" name="jumpList" title="<%=intl._t("List of helper URLs to offer jumplinks from the web proxy error page when a host is not found in your addressbook")%>" wrap="off" spellcheck="false"><%=editBean.getJumpList(curTunnel)%></textarea> + <textarea rows="2" style="height: 8em;" cols="60" id="hostField" name="jumpList" title="<%=intl._t("List of helper URLs providing jump links when a host is not found in your addressbook")%>" wrap="off" spellcheck="false"><%=editBean.getJumpList(curTunnel)%></textarea> </td> </tr> @@ -669,7 +669,7 @@ <tr> <td colspan="2"> - <input type="text" id="customOptions" name="nofilter_customOptions" size="60" title="<%=intl._t("Advanced options to control tunnel priority etc")%>" value="<%=editBean.getCustomOptions(curTunnel)%>" class="freetext" spellcheck="false"/> + <input type="text" id="customOptions" name="nofilter_customOptions" size="60" title="<%=intl._t("Advanced tunnel, streaming, and I2CP options")%>" value="<%=editBean.getCustomOptions(curTunnel)%>" class="freetext" spellcheck="false"/> </td> </tr> diff --git a/apps/i2ptunnel/jsp/editServer.jsi b/apps/i2ptunnel/jsp/editServer.jsi index 877d971329..903db0b723 100644 --- a/apps/i2ptunnel/jsp/editServer.jsi +++ b/apps/i2ptunnel/jsp/editServer.jsi @@ -564,7 +564,7 @@ </td> <td> - <label title="<%=intl._t("Deny accesseses with referers (probably from inproxies)")%>"><input value="1" type="checkbox" name="rejectReferer"<%=(editBean.isRejectReferer(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> + <label><input value="1" type="checkbox" name="rejectReferer"<%=(editBean.isRejectReferer(curTunnel) ? " checked=\"checked\"" : "")%> class="tickbox" /> <%=intl._t("Block Accesses containing Referers")%></label> </td> </tr> @@ -942,7 +942,7 @@ </tr> <tr> <td colspan="2"> - <input type="text" class="freetext" id="customOptions" name="nofilter_customOptions" size="60" title="<%=intl._t("Advanced options to control tunnel priority etc")%>" value="<%=editBean.getCustomOptions(curTunnel)%>" /> + <input type="text" class="freetext" id="customOptions" name="nofilter_customOptions" size="60" title="<%=intl._t("Advanced tunnel, streaming, and I2CP options")%>" value="<%=editBean.getCustomOptions(curTunnel)%>" /> </td> </tr> diff --git a/apps/routerconsole/java/src/net/i2p/router/web/helpers/ConfigUIHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/helpers/ConfigUIHelper.java index da73d70d53..5aa89abccd 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/helpers/ConfigUIHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/helpers/ConfigUIHelper.java @@ -49,15 +49,15 @@ public class ConfigUIHelper extends HelperBase { buf.append(CHECKED); buf.append("value=\"1\">") .append(_t("Force the mobile console to be used")) - .append("</label></br>\n"); + .append("</label><br>\n"); boolean embedApps = _context.getBooleanProperty(CSSHelper.PROP_EMBED_APPS); buf.append("<label title=\"") - .append(_t("Enabling the Universal Themeing option is recommended when embedding these applications")) + .append(_t("Enabling the Universal Theming option is recommended when embedding these applications")) .append("\"><input type=\"checkbox\" name=\"embedApps\" "); if (embedApps) buf.append(CHECKED); buf.append("value=\"1\">") - .append(_t("Embed I2PSnark and I2PMail in the console")) + .append(_t("Embed Email and Torrent applications in the console")) .append("</label></div>\n"); return buf.toString(); } diff --git a/apps/routerconsole/jsp/help-reachability.jsi b/apps/routerconsole/jsp/help-reachability.jsi index 54c8d7827d..cbd236caa3 100644 --- a/apps/routerconsole/jsp/help-reachability.jsi +++ b/apps/routerconsole/jsp/help-reachability.jsi @@ -13,7 +13,7 @@ <%=intl._t("As the firewall detection methods are not 100% reliable, this may occasionally be displayed in error.")%> <%=intl._t("However, if it appears consistently, you should check whether both your external and internal firewalls are open for your port.")%> <%=intl._t("I2P will work fine when firewalled, there is no reason for concern. When firewalled, the router uses \"introducers\" to relay inbound connections.")%> - <%=intl._t("However, you will get more participating traffic and help the network more if you can open your firewall(s).")%> + <%=intl._t("However, you will get more participating traffic and help the network if you open your firewall.")%> <%=intl._t("If you think you have already done so, remember that you may have both a hardware and a software firewall, or be behind an additional, institutional firewall you cannot control.")%> <%=intl._t("Also, some routers cannot correctly forward both TCP and UDP on a single port, or may have other limitations or bugs that prevent them from passing traffic through to I2P.")%> </li> diff --git a/apps/susimail/src/src/i2p/susi/webmail/WebMail.java b/apps/susimail/src/src/i2p/susi/webmail/WebMail.java index 51afffe4e5..f84b79c10a 100644 --- a/apps/susimail/src/src/i2p/susi/webmail/WebMail.java +++ b/apps/susimail/src/src/i2p/susi/webmail/WebMail.java @@ -2284,7 +2284,7 @@ public class WebMail extends HttpServlet out.println( "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html>\n" + "<head>\n" + "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n" + - "<title>" + _t("SusiMail") + " - " + subtitle + "</title>\n" + + "<title>" + _t("Email") + " - " + subtitle + "</title>\n" + "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + sessionObject.themePath + "susimail.css?" + CoreVersion.VERSION + "\">" ); if (sessionObject.isMobile ) { out.println( "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes\" />\n" + @@ -2307,7 +2307,9 @@ public class WebMail extends HttpServlet Long.toString(ctx.random().nextLong()); sessionObject.addNonce(nonce); out.println( - "<div class=\"page\"><div class=\"header\"><img class=\"header\" src=\"" + sessionObject.imgPath + "susimail.png\" alt=\"Susimail\"></div>\n" + + "<div class=\"page\">" + + // hidden by CSS + //"<div class=\"header\"><img class=\"header\" src=\"" + sessionObject.imgPath + "susimail.png\" alt=\"Susimail\"></div>\n" + "<form method=\"POST\" enctype=\"multipart/form-data\" action=\"" + myself + "\" accept-charset=\"UTF-8\">\n" + "<input type=\"hidden\" name=\"" + SUSI_NONCE + "\" value=\"" + nonce + "\">\n" + // we use this to know if the user thought he was logged in at the time @@ -3045,7 +3047,7 @@ public class WebMail extends HttpServlet String pop3 = Config.getProperty( CONFIG_PORTS_POP3, "" + DEFAULT_POP3PORT ); String smtp = Config.getProperty( CONFIG_PORTS_SMTP, "" + DEFAULT_SMTPPORT ); - out.println( "<div id=\"dologin\"><h1>" + _t("I2PMail Login") + "</h1><table cellspacing=\"3\" cellpadding=\"5\">\n" + + out.println( "<div id=\"dologin\"><h1>" + _t("Email Login") + "</h1><table cellspacing=\"3\" cellpadding=\"5\">\n" + // current postman hq length limits 16/12, new postman version 32/32 "<tr><td align=\"right\" width=\"30%\">" + _t("User") + "</td><td width=\"40%\" align=\"left\"><input type=\"text\" size=\"32\" name=\"" + USER + "\" value=\"" + "\"> @mail.i2p</td></tr>\n" + "<tr><td align=\"right\" width=\"30%\">" + _t("Password") + "</td><td width=\"40%\" align=\"left\"><input type=\"password\" size=\"32\" name=\"pass\" value=\"" + "\"></td></tr>\n"); @@ -3244,8 +3246,8 @@ public class WebMail extends HttpServlet out.println(_t("Folder") + ": " + _t(name) + " "); // TODO css to center it out.println(button(SWITCH_TO, _t("Change to Folder") + ':')); showFolderSelect(out, folderName, false); - out.println("</td><td>"); if (pages > 1) { + out.println("</td><td>"); if (outputHidden) out.println("<input type=\"hidden\" name=\"" + CUR_PAGE + "\" value=\"" + page + "\">"); String t1 = _t("First"); diff --git a/installer/resources/themes/console/classic/console.css b/installer/resources/themes/console/classic/console.css index 3d4be34d8d..2465b9fcba 100644 --- a/installer/resources/themes/console/classic/console.css +++ b/installer/resources/themes/console/classic/console.css @@ -4663,10 +4663,6 @@ body.iframed { padding: 5px 10px 5px 5px; } -#themeoptions br { - display: none; -} - #themeoptions label { white-space: nowrap; margin: 4px 10px 4px 0 !important; diff --git a/installer/resources/themes/console/dark/console.css b/installer/resources/themes/console/dark/console.css index 2cf3520c2b..715bf5254e 100644 --- a/installer/resources/themes/console/dark/console.css +++ b/installer/resources/themes/console/dark/console.css @@ -2979,10 +2979,6 @@ tr#addnew, tr#addnew:hover { padding: 5px 10px 8px 5px; } -#themeoptions br { - display: none; -} - #themeoptions label { white-space: nowrap; margin: 4px 10px 4px 0 !important; diff --git a/installer/resources/themes/console/light/console.css b/installer/resources/themes/console/light/console.css index 6e9a2b9d05..95c4169cac 100644 --- a/installer/resources/themes/console/light/console.css +++ b/installer/resources/themes/console/light/console.css @@ -4707,10 +4707,6 @@ body.iframed { padding: 5px 10px 5px 5px; } -#themeoptions br { - display: none; -} - #themeoptions label { white-space: nowrap; margin: 2px 10px 2px 0 !important; diff --git a/installer/resources/themes/console/midnight/console.css b/installer/resources/themes/console/midnight/console.css index c64e3bd538..4bd70d246e 100644 --- a/installer/resources/themes/console/midnight/console.css +++ b/installer/resources/themes/console/midnight/console.css @@ -3439,10 +3439,6 @@ div.themechoice { padding: 5px 10px 8px 5px; } -#themeoptions br { - display: none; -} - #themeoptions label { white-space: nowrap; margin: 1px 10px 1px 0 !important; diff --git a/installer/resources/themes/susimail/classic/susimail.css b/installer/resources/themes/susimail/classic/susimail.css index 6cf3c78eb7..43f7b45d7e 100644 --- a/installer/resources/themes/susimail/classic/susimail.css +++ b/installer/resources/themes/susimail/classic/susimail.css @@ -1157,6 +1157,10 @@ table#pagenav td:first-child { width: 49%; } +table#pagenav td:nth-child(2) { + padding-left: 35px; +} + table#pagenav td:last-child { text-align: left; width: 49%; diff --git a/installer/resources/themes/susimail/dark/susimail.css b/installer/resources/themes/susimail/dark/susimail.css index 0e5d955103..78b7bcffa7 100644 --- a/installer/resources/themes/susimail/dark/susimail.css +++ b/installer/resources/themes/susimail/dark/susimail.css @@ -968,6 +968,10 @@ table#pagenav td:first-child { } table#pagenav td:nth-child(2) { + padding-left: 35px; +} + +table#pagenav td:nth-child(3) { text-align: center !important; width: 4%; white-space: nowrap; diff --git a/installer/resources/themes/susimail/light/susimail.css b/installer/resources/themes/susimail/light/susimail.css index 1d7795ad3a..156b7433a5 100644 --- a/installer/resources/themes/susimail/light/susimail.css +++ b/installer/resources/themes/susimail/light/susimail.css @@ -1277,6 +1277,10 @@ table#pagenav td:last-child { } table#pagenav td:nth-child(2) { + padding-left: 35px; +} + +table#pagenav td:nth-child(3) { width: 2%; white-space: nowrap; } diff --git a/installer/resources/themes/susimail/midnight/susimail.css b/installer/resources/themes/susimail/midnight/susimail.css index 6f305df884..02bacc0013 100644 --- a/installer/resources/themes/susimail/midnight/susimail.css +++ b/installer/resources/themes/susimail/midnight/susimail.css @@ -888,6 +888,10 @@ table#pagenav td:first-child { } table#pagenav td:nth-child(2) { + padding-left: 35px; +} + +table#pagenav td:nth-child(3) { text-align: center !important; min-width: 100px; } -- GitLab