Changeset ee1ed1bb


Ignore:
Timestamp:
Dec 19, 2013 12:20:32 PM (6 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
04a5968
Parents:
2b39d28
Message:

Nice message during graceful shutdown
May need to tweak the wording

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/ConfigRestartBean.java

    r2b39d28 ree1ed1bb  
    7070            buf.append("<h4>");
    7171            buf.append(_("Shutdown in {0}", DataHelper.formatDuration2(timeRemaining), ctx));
     72            int tuns = ctx.tunnelManager().getParticipatingCount();
     73            if (tuns > 0) {
     74                buf.append("<br>").append(ngettext("Please wait for routing commitment on {0} tunnel to expire",
     75                                                "Please wait for routing commitments on {0} tunnels to expire",
     76                                                tuns, ctx));
     77            }
    7278            buf.append("</h4><hr>");
    7379            buttons(ctx, buf, urlBase, systemNonce, SET1);
     
    7581            buf.append("<h4>");
    7682            buf.append(_("Restart in {0}", DataHelper.formatDuration2(timeRemaining), ctx));
     83            int tuns = ctx.tunnelManager().getParticipatingCount();
     84            if (tuns > 0) {
     85                buf.append("<br>").append(ngettext("Please wait for routing commitment on {0} tunnel to expire",
     86                                                "Please wait for routing commitments on {0} tunnels to expire",
     87                                                tuns, ctx));
     88            }
    7789            buf.append("</h4><hr>");
    7890            buttons(ctx, buf, urlBase, systemNonce, SET2);
     
    122134        return Messages.getString(s, o, ctx);
    123135    }
     136
     137    /** translate (ngettext) @since 0.9.10 */
     138    private static String ngettext(String s, String p, int n, RouterContext ctx) {
     139        return Messages.getString(n, s, p, ctx);
     140    }
    124141}
    125142
Note: See TracChangeset for help on using the changeset viewer.