diff --git a/apps/routerconsole/java/build.xml b/apps/routerconsole/java/build.xml index 61d1ddc85..747874ef4 100644 --- a/apps/routerconsole/java/build.xml +++ b/apps/routerconsole/java/build.xml @@ -101,6 +101,13 @@ + + + diff --git a/apps/routerconsole/java/bundle-messages.sh b/apps/routerconsole/java/bundle-messages.sh index 607b4b00a..e035efabd 100755 --- a/apps/routerconsole/java/bundle-messages.sh +++ b/apps/routerconsole/java/bundle-messages.sh @@ -15,7 +15,7 @@ do LG=${LG%.po} # make list of java files newer than the .po file - find src ../jsp/WEB-INF -name *.java -newer $i > $TMPFILE + find src ../jsp/WEB-INF strings -name *.java -newer $i > $TMPFILE if [ -s build/obj/net/i2p/router/web/messages_$LG.class -a ! -s $TMPFILE ] then continue @@ -31,13 +31,15 @@ do # intl.title("foo") # handler._("foo") # formhandler._("foo") + # net.i2p.router.web.Messages.getString("foo") # In a jsp, you must use a helper or handler that has the context set. # To start a new translation, copy the header from an old translation to the new .po file, # then ant distclean updater. - find src ../jsp/WEB-INF -name *.java > $TMPFILE + find src ../jsp/WEB-INF strings -name *.java > $TMPFILE xgettext -f $TMPFILE -F -L java \ --keyword=_ --keyword=_x --keyword=intl._ --keyword=intl.title \ --keyword=handler._ --keyword=formhandler._ \ + --keyword=net.i2p.router.web.Messages.getString \ -o ${i}t if [ $? -ne 0 ] then @@ -60,7 +62,7 @@ do msgfmt --java -r $CLASS -l $LG -d build/obj $i if [ $? -ne 0 ] then - echo 'Warning - xgettext failed, not updating translations' + echo 'Warning - msgfmt failed, not updating translations' break fi done diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigAdvancedHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigAdvancedHandler.java index 230e9ec0e..aed909dc7 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigAdvancedHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigAdvancedHandler.java @@ -13,7 +13,7 @@ import java.util.Iterator; * */ public class ConfigAdvancedHandler extends FormHandler { - private boolean _forceRestart; + //private boolean _forceRestart; private boolean _shouldSave; private String _config; @@ -27,7 +27,7 @@ public class ConfigAdvancedHandler extends FormHandler { } public void setShouldsave(String moo) { _shouldSave = true; } - public void setRestart(String moo) { _forceRestart = true; } + //public void setRestart(String moo) { _forceRestart = true; } public void setConfig(String val) { _config = val; @@ -54,7 +54,7 @@ public class ConfigAdvancedHandler extends FormHandler { unsetKeys.remove(key); } } catch (IOException ioe) { - addFormError("Error updating the configuration (IOERROR) - please see the error logs"); + addFormError(_("Error updating the configuration - please see the error logs")); return; } @@ -66,15 +66,15 @@ public class ConfigAdvancedHandler extends FormHandler { boolean saved = _context.router().saveConfig(); if (saved) - addFormNotice("Configuration saved successfully"); + addFormNotice(_("Configuration saved successfully")); else - addFormNotice("Error saving the configuration (applied but not saved) - please see the error logs"); + addFormNotice(_("Error saving the configuration (applied but not saved) - please see the error logs")); - if (_forceRestart) { - addFormNotice("Performing a soft restart"); - _context.router().restart(); - addFormNotice("Soft restart complete"); - } + //if (_forceRestart) { + // addFormNotice("Performing a soft restart"); + // _context.router().restart(); + // addFormNotice("Soft restart complete"); + //} } } } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHelper.java index 145e9c849..3ef14e13a 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHelper.java @@ -51,9 +51,9 @@ public class ConfigClientsHelper extends HelperBase { String link = "/"; if (! RouterConsoleRunner.ROUTERCONSOLE.equals(name)) link += name + "/"; - buf.append("").append(name).append(""); + buf.append("").append(_(name)).append(""); } else { - buf.append(name); + buf.append(_(name)); } buf.append("Shutdown imminent"; - } else { - return "
Shutdown in " + DataHelper.formatDuration(timeRemaining) + "

" - + buttons(urlBase, systemNonce, "shutdownImmediate,Shutdown immediately,cancelShutdown,Cancel shutdown"); - } + StringBuilder buf = new StringBuilder(128); + if ((shuttingDown || restarting) && timeRemaining <= 0) { + buf.append("
").append(_("Shutdown imminent", ctx)).append("
"); + } else if (shuttingDown) { + buf.append("
"); + buf.append(_("Shutdown in {0}", DataHelper.formatDuration(timeRemaining), ctx)); + buf.append("

"); + buttons(ctx, buf, urlBase, systemNonce, SET1); } else if (restarting) { - if (timeRemaining <= 0) { - return "
Restart imminent
"; - } else { - return "
Restart in " + DataHelper.formatDuration(timeRemaining) + "

" - + buttons(urlBase, systemNonce, "restartImmediate,Restart immediately,cancelShutdown,Cancel restart"); - } + buf.append("
"); + buf.append(_("Restart in {0}", DataHelper.formatDuration(timeRemaining), ctx)); + buf.append("

"); + buttons(ctx, buf, urlBase, systemNonce, SET2); } else { if (System.getProperty("wrapper.version") != null) - return buttons(urlBase, systemNonce, "restart,Restart,shutdown,Shutdown"); + buttons(ctx, buf, urlBase, systemNonce, SET3); else - return buttons(urlBase, systemNonce, "shutdown,Shutdown"); + buttons(ctx, buf, urlBase, systemNonce, SET4); } + return buf.toString(); } /** @param s value,label,... pairs */ - private static String buttons(String url, String nonce, String s) { - StringBuilder buf = new StringBuilder(128); - StringTokenizer tok = new StringTokenizer(s, ","); + private static void buttons(RouterContext ctx, StringBuilder buf, String url, String nonce, String[] s) { buf.append("
\n"); buf.append("\n"); - while (tok.hasMoreTokens()) - buf.append("\n"); + for (int i = 0; i < s.length; i+= 2) + buf.append("\n"); buf.append("
\n"); - return buf.toString(); } private static boolean isShuttingDown(RouterContext ctx) { @@ -96,4 +97,13 @@ public class ConfigRestartBean { return ctx.router().getShutdownTimeRemaining(); return Long.MAX_VALUE/2; // summaryframe.jsp adds a safety factor so we don't want to overflow... } + + public static String _(String s, RouterContext ctx) { + return Messages.getString(s, ctx); + } + + public static String _(String s, Object o, RouterContext ctx) { + return Messages.getString(s, o, ctx); + } } + diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigServiceHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigServiceHandler.java index 95aa9fcb4..ce4dc8863 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigServiceHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigServiceHandler.java @@ -81,7 +81,7 @@ public class ConfigServiceHandler extends FormHandler { installService(); } else if (_("Don't run I2P on startup").equals(_action)) { uninstallService(); - } else if ("Dump threads".equals(_action)) { + } else if (_("Dump threads").equals(_action)) { try { WrapperManager.requestThreadDump(); } catch (Throwable t) { diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigTunnelsHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigTunnelsHelper.java index ffc463d60..362160406 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigTunnelsHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigTunnelsHelper.java @@ -8,9 +8,14 @@ import net.i2p.data.Destination; import net.i2p.router.TunnelPoolSettings; public class ConfigTunnelsHelper extends HelperBase { + static final String HOP = _x("hop"); + static final String TUNNEL = _x("tunnel"); + /** dummies for translation */ + static final String HOPS = _x("hops"); + static final String TUNNELS = _x("tunnels"); + public ConfigTunnelsHelper() {} - public String getForm() { StringBuilder buf = new StringBuilder(1024); buf.append("\n"); @@ -74,7 +79,7 @@ public class ConfigTunnelsHelper extends HelperBase { out.getQuantity() + out.getBackupQuantity() >= WARN_QUANTITY) buf.append(""); -buf.append("\n"); + buf.append("\n"); // buf.append("\n"); @@ -82,16 +87,16 @@ buf.append("\n"); buf.append("\n"); buf.append("\n"); buf.append("\n"); @@ -99,40 +104,40 @@ buf.append("\n"); buf.append("\n"); buf.append("\n"); // tunnel quantity buf.append("\n"); buf.append("\n"); buf.append("\n"); buf.append("\n"); @@ -140,16 +145,16 @@ buf.append("\n"); buf.append("\n"); buf.append("\n"); buf.append("\n"); @@ -191,9 +196,13 @@ buf.append("
" + _("PERFORMANCE WARNING - Settings include high tunnel quantities.") + "
\"Inbound\"  " + _("Inbound") + "\"Outbound  " + _("Outbound") + "
\"Inbound\"  " + _("Inbound") + "\"Outbound  " + _("Outbound") + "
InboundOutbound
" + _("Depth") + ":
" + _("Randomization") + ":
" + _("Quantity") + ":
" + _("Backup quantity") + ":
").append(prefix).append(i).append(' ').append(name); + String pname; + // pluralize and then translate if (i != 1 && i != -1) - buf.append('s'); + pname = name + 's'; + else + pname = name; + buf.append(">").append(prefix).append(i).append(' ').append(_(pname)); buf.append("\n"); } } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigUIHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigUIHandler.java index 81b0e5012..8f359e25c 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigUIHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigUIHandler.java @@ -17,16 +17,23 @@ public class ConfigUIHandler extends FormHandler { _config = val; } + /** note - lang change is handled in CSSHelper but we still need to save it here */ private void saveChanges() { if (_config == null) return; + String oldTheme = _context.getProperty(CSSHelper.PROP_THEME_NAME, CSSHelper.DEFAULT_THEME); if (_config.equals("default")) // obsolete _context.router().removeConfigSetting(CSSHelper.PROP_THEME_NAME); else _context.router().setConfigSetting(CSSHelper.PROP_THEME_NAME, _config); - if (_context.router().saveConfig()) - addFormNotice("Theme change saved. Refresh the page to view."); - else - addFormNotice("Error saving the configuration (applied but not saved) - please see the error logs."); + if (_context.router().saveConfig()) { + if (!oldTheme.equals(_config)) + addFormNotice(_("Theme change saved.") + + " " + + _("Refresh the page to view.") + + ""); + } else { + addFormNotice(_("Error saving the configuration (applied but not saved) - please see the error logs.")); + } } } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHandler.java index 22f4fa2df..6cb3e79e0 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigUpdateHandler.java @@ -51,7 +51,9 @@ public class ConfigUpdateHandler extends FormHandler { @Override protected void processForm() { - if (_action != null && _action.equals(_("Check for updates"))) { + if (_action == null) + return; + if (_action.equals(_("Check for updates"))) { NewsFetcher fetcher = NewsFetcher.getInstance(I2PAppContext.getGlobalContext()); fetcher.fetchNews(); if (fetcher.shouldFetchUnsigned()) @@ -63,6 +65,7 @@ public class ConfigUpdateHandler extends FormHandler { addFormNotice(_("Update available, click button on left to download")); } else addFormNotice(_("No update available")); + return; } if ( (_newsURL != null) && (_newsURL.length() > 0) ) { diff --git a/apps/routerconsole/java/src/net/i2p/router/web/Messages.java b/apps/routerconsole/java/src/net/i2p/router/web/Messages.java index 8d1d78174..e00a4d8e0 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/Messages.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/Messages.java @@ -25,8 +25,12 @@ public class Messages { private static final String _localeLang = Locale.getDefault().getLanguage(); private static final Map _bundles = new ConcurrentHashMap(2); private static final Set _missing = new ConcurrentHashSet(2); + /** use to look for untagged strings */ + private static final String TEST_LANG = "xx"; + private static final String TEST_STRING = "XXXX"; /** current locale **/ +/* unused public static String getString(String key) { if (_localeLang.equals("en")) return key; @@ -39,12 +43,15 @@ public class Messages { return key; } } +*/ /** lang in routerconsole.lang property, else current locale */ public static String getString(String key, I2PAppContext ctx) { String lang = getLanguage(ctx); if (lang.equals("en")) return key; + else if (lang.equals(TEST_LANG)) + return TEST_STRING; ResourceBundle bundle = findBundle(lang); if (bundle == null) return key; @@ -68,17 +75,20 @@ public class Messages { * Use autoboxing to call with ints, longs, floats, etc. */ public static String getString(String s, Object o, I2PAppContext ctx) { + String lang = getLanguage(ctx); + if (lang.equals(TEST_LANG)) + return TEST_STRING + '(' + o + ')' + TEST_STRING; String x = getString(s, ctx); Object[] oArray = new Object[1]; oArray[0] = o; try { - MessageFormat fmt = new MessageFormat(x, new Locale(getLanguage(ctx))); + MessageFormat fmt = new MessageFormat(x, new Locale(lang)); return fmt.format(oArray, new StringBuffer(), null).toString(); } catch (IllegalArgumentException iae) { System.err.println("Bad format: orig: \"" + s + "\" trans: \"" + x + "\" param: \"" + o + - "\" lang: " + getLanguage(ctx)); + "\" lang: " + lang); return "FIXME: " + x + ' ' + o; } } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/NewsFetcher.java b/apps/routerconsole/java/src/net/i2p/router/web/NewsFetcher.java index 0a4035f78..973357baa 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/NewsFetcher.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/NewsFetcher.java @@ -74,10 +74,20 @@ public class NewsFetcher implements Runnable, EepGet.StatusListener { public String unsignedUpdateVersion() { return _unsignedUpdateVersion; } public String status() { + StringBuilder buf = new StringBuilder(128); long now = _context.clock().now(); - return - (_lastUpdated > 0 ? "News last updated " + DataHelper.formatDuration(now - _lastUpdated) + " ago" : "") + - (_lastFetch > _lastUpdated ? "; last checked " + DataHelper.formatDuration(now - _lastFetch) + " ago." : ""); + if (_lastUpdated > 0) { + buf.append(Messages.getString("News last updated {0} ago.", + DataHelper.formatDuration(now - _lastUpdated), + _context)) + .append('\n'); + } + if (_lastFetch > _lastUpdated) { + buf.append(Messages.getString("News last checked {0} ago.", + DataHelper.formatDuration(now - _lastFetch), + _context)); + } + return buf.toString(); } public void run() { diff --git a/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java index 7a9d91d5b..b05e4e338 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java @@ -289,7 +289,7 @@ public class SummaryBarRenderer { String uri = _helper.getRequestURI(); buf.append("
\n"); buf.append("\n"); - buf.append("
\n"); + buf.append("\n"); } anotherLine = true; } diff --git a/apps/routerconsole/java/strings/Strings.java b/apps/routerconsole/java/strings/Strings.java new file mode 100644 index 000000000..49ee19bf6 --- /dev/null +++ b/apps/routerconsole/java/strings/Strings.java @@ -0,0 +1,29 @@ +package dummy; + +/** + * Just more strings for xgettext, that don't appear in the source anywhere. + * I'm sure there's easier ways to do this, but this will do for now. + * + * Obviously, do not compile this. + */ +class Dummy { + void dummy { + // wars + _("addressbook"); + _("i2psnark"); + _("i2ptunnel"); + _("susimail"); + _("susidns"); + _("routerconsole"); + + // clients, taken from clients.config + // note that if the wording changes in clients.config, we have to + // keep the old string here as well for existing installs + _("Web console"); + _("SAM application bridge"); + _("Application tunnels"); + _("My eepsite web server"); + _("Browser launch at startup"); + _("BOB application bridge"); + } +} diff --git a/apps/routerconsole/jsp/config.jsp b/apps/routerconsole/jsp/config.jsp index d17019884..92975a02e 100644 --- a/apps/routerconsole/jsp/config.jsp +++ b/apps/routerconsole/jsp/config.jsp @@ -54,12 +54,20 @@

<% int share = nethelper.getShareBandwidth(); if (share < 12) { - out.print("

"+intl._("NOTE")+": You have configured I2P to share only " + share + "KBps. "); + out.print("

"); + out.print(intl._("NOTE")); + out.print(": "); + out.print(intl._("You have configured I2P to share only {0} KBps.", share)); + out.print("\n"); + out.print(intl._("I2P requires at least 12KBps to enable sharing. ")); out.print(intl._("Please enable sharing (participating in tunnels) by configuring more bandwidth. ")); out.print(intl._("It improves your anonymity by creating cover traffic, and helps the network.")+"

"); } else { - out.print("

" + intl._("You have configured I2P to share") + " " + share + "KBps. "); + out.print("

"); + out.print(intl._("You have configured I2P to share {0} KBps.", share)); + out.print("\n"); + out.print(intl._("The higher the share bandwidth the more you improve your anonymity and help the network.")+"


"); } %> @@ -76,7 +84,8 @@
-->

<%=intl._("IP and Transport Configuration")%>

- <%=intl._("The default settings will work for most people.")%> There is help below. + <%=intl._("The default settings will work for most people.")%> + <%=intl._("There is help below.")%>

<%=intl._("UPnP Configuration")%>:
/> <%=intl._("Enable UPnP to open firewall ports")%> - <%=intl._("UPnP status")%> @@ -169,18 +178,18 @@

  • <%=intl._("Multiple firewall/routers in the internet connection path")%>
  • <%=intl._("UPnP device change, reset, or address change")%>

    - Reviewing the UPnP status may help. +<%=intl._("Review the UPnP status here.")%> <%=intl._("UPnP may be enabled or disabled above, but a change requires a router restart to take effect.")%>

    <%=intl._("Hostnames entered above will be published in the network database.")%> - They are not private. - Also, do not enter a private IP address like 127.0.0.1 or 192.168.1.1. + <%=intl._("They are not private.")%> + <%=intl._("Also, do not enter a private IP address like 127.0.0.1 or 192.168.1.1.")%> <%=intl._("If you specify the wrong IP address or hostname, or do not properly configure your NAT or firewall, your network performance will degrade substantially.")%> <%=intl._("When in doubt, leave the settings at the defaults.")%>

    <%=intl._("Reachability Help")%>:

    <%=intl._("While I2P will work fine behind most firewalls, your speeds and network integration will generally improve if the I2P port (generally 8887) is forwarded for both UDP and TCP.")%> <%=intl._("If you think you have opened up your firewall and I2P still thinks you are firewalled, remember that you may have multiple firewalls, for example both software packages and external hardware routers.")%> - If there is an error, the logs may also help diagnose the problem. + <%=intl._("If there is an error, the logs may also help diagnose the problem.")%>

    • <%=intl._("OK")%> - <%=intl._("Your UDP port does not appear to be firewalled.")%> diff --git a/apps/routerconsole/jsp/configservice.jsp b/apps/routerconsole/jsp/configservice.jsp index 117623ddf..96e6175f9 100644 --- a/apps/routerconsole/jsp/configservice.jsp +++ b/apps/routerconsole/jsp/configservice.jsp @@ -21,14 +21,14 @@ <% String prev = System.getProperty("net.i2p.router.web.ConfigServiceHandler.nonce"); if (prev != null) System.setProperty("net.i2p.router.web.ConfigServiceHandler.noncePrev", prev); System.setProperty("net.i2p.router.web.ConfigServiceHandler.nonce", new java.util.Random().nextLong()+""); %> - " /> + " >

      <%=intl._("Shutdown the router")%>

      <%=intl._("Graceful shutdown lets the router satisfy the agreements it has already made before shutting down, but may take a few minutes.")%> <%=intl._("If you need to kill the router immediately, that option is available as well.")%>


      - " /> - " /> - " /> + " > + " > + " >
      <% if (System.getProperty("wrapper.version") != null) { %>

      <%=intl._("If you want the router to restart itself after shutting down, you can choose one of the following.")%> @@ -37,8 +37,8 @@ <%=intl._("A graceful restart will take a few minutes (but your peers will appreciate your patience), while a hard restart does so immediately.")%> <%=intl._("After tearing down the router, it will wait 1 minute before starting back up again.")%>


      - " /> - " /> + " > + " > <% } %>
      <% if ( (System.getProperty("os.name") != null) && (System.getProperty("os.name").startsWith("Win")) ) { %> @@ -47,16 +47,16 @@ <%=intl._("(later on, I2P client applications will be able to integrate their own functionality into the system tray as well).")%> <%=intl._("If you are on windows, you can either enable or disable that icon here.")%>


      - " /> - " /> + " > + " >

      <%=intl._("Run on startup")%>

      <%=intl._("You can control whether I2P is run on startup or not by selecting one of the following options")%> - <%=intl._("I2P will install (or remove) a service accordingly.")%> <%=intl._("If you prefer the command line, you can also run the ")%> install_i2p_service_winnt.bat (<%=intl._("or")%> uninstall_i2p_service_winnt.bat).


      - " /> -" />
      + " > +" >

      <%=intl._("Note")%>: <%=intl._("If you are running I2P as service right now, removing it will shut down your router immediately.")%> <%=intl._("You may want to consider shutting down gracefully, as above, then running uninstall_i2p_service_winnt.bat.")%>

      <% } %> @@ -67,13 +67,13 @@ To do so, please select the following option and review the thread dumped to wrapper.log.


      - + " > <% } %>

      <%=intl._("Launch browser on router startup?")%>

      <%=intl._("I2P's main configuration interface is this web console, so for your convenience I2P can launch a web browser on startup pointing at")%> http://127.0.0.1:7657/index.jsp .


      - " /> - " /> + " > + " >
      diff --git a/apps/routerconsole/jsp/debug.jsp b/apps/routerconsole/jsp/debug.jsp index ed68d66fb..9ee937097 100644 --- a/apps/routerconsole/jsp/debug.jsp +++ b/apps/routerconsole/jsp/debug.jsp @@ -1,6 +1,11 @@ <%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%> +<% + /* + * Do not tag this file for translation. + */ +%> I2P Router Console - Debug <%@include file="css.jsp" %> diff --git a/apps/routerconsole/jsp/error.jsp b/apps/routerconsole/jsp/error.jsp index c29543164..cfb2fe99b 100644 --- a/apps/routerconsole/jsp/error.jsp +++ b/apps/routerconsole/jsp/error.jsp @@ -16,11 +16,6 @@ <%@include file="css.jsp" %> <%=intl.title("Page Not Found")%> -<% -if (System.getProperty("router.consoleNonce") == null) { - System.setProperty("router.consoleNonce", new java.util.Random().nextLong() + ""); -} -%> <%@include file="summary.jsp" %>

      <%=ERROR_CODE%> <%=ERROR_MESSAGE%>

      diff --git a/apps/routerconsole/jsp/flags.jsp b/apps/routerconsole/jsp/flags.jsp index 00ce370fb..c736e8b46 100644 --- a/apps/routerconsole/jsp/flags.jsp +++ b/apps/routerconsole/jsp/flags.jsp @@ -3,6 +3,8 @@ * USE CAUTION WHEN EDITING * Trailing whitespace OR NEWLINE on the last line will cause * IllegalStateExceptions !!! + * + * Do not tag this file for translation. */ /** diff --git a/apps/routerconsole/jsp/help.jsp b/apps/routerconsole/jsp/help.jsp index 734b38c3d..5e168bccc 100644 --- a/apps/routerconsole/jsp/help.jsp +++ b/apps/routerconsole/jsp/help.jsp @@ -1,7 +1,11 @@ <%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%> - +<% + /* + * Do not tag this file for translation - copy it to help_xx.jsp and translate inline. + */ +%> I2P Router Console - help <%@include file="css.jsp" %> diff --git a/apps/routerconsole/jsp/oldconsole.jsp b/apps/routerconsole/jsp/oldconsole.jsp index 803d4b637..10394fb50 100644 --- a/apps/routerconsole/jsp/oldconsole.jsp +++ b/apps/routerconsole/jsp/oldconsole.jsp @@ -1,7 +1,11 @@ <%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%> - +<% + /* + * Do not tag this file for translation. + */ +%> I2P Router Console - internals <%@include file="css.jsp" %> diff --git a/apps/routerconsole/jsp/summary.jsp b/apps/routerconsole/jsp/summary.jsp index 87bcaf0a0..33c5919eb 100644 --- a/apps/routerconsole/jsp/summary.jsp +++ b/apps/routerconsole/jsp/summary.jsp @@ -23,8 +23,16 @@ // since we don't have an iframe this will reload the base page, and // the new delay will be passed to the iframe above out.print("
      \n"); - out.print("Refresh (s): \n"); - out.print("\n"); + out.print(""); + // We have intl defined when this is included, but not when compiled standalone. + // Not that we really need it standalone, but I can't figure out how to keep + // this from being compiled by JspC in the build file. + out.print(net.i2p.router.web.Messages.getString("Refresh (s)", net.i2p.I2PAppContext.getGlobalContext())); + out.print(": \n"); + out.print("\n"); out.print("
      \n"); } %> diff --git a/apps/routerconsole/jsp/summaryframe.jsp b/apps/routerconsole/jsp/summaryframe.jsp index 26c6cb328..69139736a 100644 --- a/apps/routerconsole/jsp/summaryframe.jsp +++ b/apps/routerconsole/jsp/summaryframe.jsp @@ -55,12 +55,18 @@ if (!shutdownSoon) { out.print("
      \n"); if ("0".equals(d)) { - out.print("Refresh (s): \n"); - out.print("
      \n"); + out.print(""); + out.print(intl._("Refresh (s)")); + out.print(": \n"); + out.print("\n"); } else { // this will load in the iframe but subsequent pages will not have the iframe out.print("\n"); - out.print("\n"); + out.print("\n"); } out.print("
      \n"); } diff --git a/apps/routerconsole/jsp/viewstat.jsp b/apps/routerconsole/jsp/viewstat.jsp index 392a37b89..666e78fb4 100644 --- a/apps/routerconsole/jsp/viewstat.jsp +++ b/apps/routerconsole/jsp/viewstat.jsp @@ -3,6 +3,8 @@ * USE CAUTION WHEN EDITING * Trailing whitespace OR NEWLINE on the last line will cause * IllegalStateExceptions !!! + * + * Do not tag this file for translation. */ boolean rendered = false; diff --git a/apps/routerconsole/jsp/viewtheme.jsp b/apps/routerconsole/jsp/viewtheme.jsp index 1f7976d2b..07096cd03 100644 --- a/apps/routerconsole/jsp/viewtheme.jsp +++ b/apps/routerconsole/jsp/viewtheme.jsp @@ -3,6 +3,8 @@ * USE CAUTION WHEN EDITING * Trailing whitespace OR NEWLINE on the last line will cause * IllegalStateExceptions !!! + * + * Do not tag this file for translation. */ String uri = request.getRequestURI(); diff --git a/history.txt b/history.txt index 30fa01e8f..70ceccb31 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,14 @@ +2009-10-26 zzz + * Console: + - Add parameterized tag + - Don't save config when checking for updates on configupdate.jsp + - Refactor confignav.jsp to java and tag + - Start tagging profiles.jsp + - Rework ConfigRestartBean and tag + - More tag fixups + - Add lang=xx for testing + - Add file for additional tagged strings + 2009-10-23 zzz * Certificate: Fix the (apparently unused) readBytes(byte[], int) method for a null certificate - http://zzz.i2p/topics/388 - thanks HungryHobo diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 5a4225cae..aea509c4d 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -18,7 +18,7 @@ public class RouterVersion { /** deprecated */ public final static String ID = "Monotone"; public final static String VERSION = CoreVersion.VERSION; - public final static long BUILD = 6; + public final static long BUILD = 7; /** for example "-test" */ public final static String EXTRA = ""; public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;