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

Skip to content
Snippets Groups Projects
Commit ee1ed1bb authored by zzz's avatar zzz
Browse files

Nice message during graceful shutdown

May need to tweak the wording
parent 2b39d28e
No related branches found
No related tags found
No related merge requests found
...@@ -69,11 +69,23 @@ public class ConfigRestartBean { ...@@ -69,11 +69,23 @@ public class ConfigRestartBean {
} else if (shuttingDown) { } else if (shuttingDown) {
buf.append("<h4>"); buf.append("<h4>");
buf.append(_("Shutdown in {0}", DataHelper.formatDuration2(timeRemaining), ctx)); buf.append(_("Shutdown in {0}", DataHelper.formatDuration2(timeRemaining), ctx));
int tuns = ctx.tunnelManager().getParticipatingCount();
if (tuns > 0) {
buf.append("<br>").append(ngettext("Please wait for routing commitment on {0} tunnel to expire",
"Please wait for routing commitments on {0} tunnels to expire",
tuns, ctx));
}
buf.append("</h4><hr>"); buf.append("</h4><hr>");
buttons(ctx, buf, urlBase, systemNonce, SET1); buttons(ctx, buf, urlBase, systemNonce, SET1);
} else if (restarting) { } else if (restarting) {
buf.append("<h4>"); buf.append("<h4>");
buf.append(_("Restart in {0}", DataHelper.formatDuration2(timeRemaining), ctx)); buf.append(_("Restart in {0}", DataHelper.formatDuration2(timeRemaining), ctx));
int tuns = ctx.tunnelManager().getParticipatingCount();
if (tuns > 0) {
buf.append("<br>").append(ngettext("Please wait for routing commitment on {0} tunnel to expire",
"Please wait for routing commitments on {0} tunnels to expire",
tuns, ctx));
}
buf.append("</h4><hr>"); buf.append("</h4><hr>");
buttons(ctx, buf, urlBase, systemNonce, SET2); buttons(ctx, buf, urlBase, systemNonce, SET2);
} else { } else {
...@@ -121,5 +133,10 @@ public class ConfigRestartBean { ...@@ -121,5 +133,10 @@ public class ConfigRestartBean {
private static String _(String s, Object o, RouterContext ctx) { private static String _(String s, Object o, RouterContext ctx) {
return Messages.getString(s, o, ctx); return Messages.getString(s, o, ctx);
} }
/** translate (ngettext) @since 0.9.10 */
private static String ngettext(String s, String p, int n, RouterContext ctx) {
return Messages.getString(n, s, p, ctx);
}
} }
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