/** Get the (localised) long explanation for this failure mode. */ public static String getShortMessage(InsertExceptionMode mode) { // FIXME change the l10n to use the keyword not the code String ret = NodeL10n.getBase().getString("InsertException.shortError."+mode.code); if(ret == null) return "Unknown error "+mode; else return ret; }
public PutCompletedEvent(String identifier, FreenetURI uri, long size) { super(Type.PutCompleted, true, null, null, null, null, UserAlert.MINOR, true, NodeL10n.getBase().getString("UserAlert.hide"), true, null, completedPuts); this.identifier = identifier; this.uri = uri; this.size = size; }
/** Get the (localised) short name of this failure mode. */ public static String getShortMessage(FetchExceptionMode mode) { // FIXME change the l10n to use the names rather than codes int code = mode.code; String ret = NodeL10n.getBase().getString("FetchException.shortError."+code); if(ret == null || ret.equals("")) return "Unknown code "+mode; else return ret; }
/** * */ public TimeSkewDetectedUserAlert() { super(false, null, null, null, null, UserAlert.CRITICAL_ERROR, false, NodeL10n.getBase().getString("UserAlert.hide"), false, null); }
@Override protected String getPageTitle(String titleCountString) { return NodeL10n.getBase().getString("OpennetConnectionsToadlet.fullTitle", new String[] {"counts"}, new String[] {titleCountString} ); }
public String getShortDescription() { if(shortDescription == null) return ""; if(shortDescription.toLowerCase().startsWith("l10n:")) return NodeL10n.getBase().getString("Bookmarks.Defaults.ShortDescription."+shortDescription.substring("l10n:".length())); return shortDescription; }
/** Get the (localised) short name of this failure mode. */ public static String getMessage(InsertExceptionMode mode) { // FIXME change the l10n to use the keyword not the code String ret = NodeL10n.getBase().getString("InsertException.longError."+mode.code); if(ret == null) return "Unknown error "+mode; else return ret; }
/** Get the (localised) long explanation for this failure mode. */ public static String getMessage(FetchExceptionMode mode) { if(mode == null) throw new NullPointerException(); int code = mode.code; // FIXME change the l10n to use the names rather than codes String ret = NodeL10n.getBase().getString("FetchException.longError."+code); if(ret == null) return "Unknown fetch error code: "+mode; else return ret; }
@Override public String dismissButtonText() { return NodeL10n.getBase().getString("UserAlert.hide"); } @Override
public PeerManagerUserAlert(NodeStats n, NodeUpdateManager nodeUpdater) { super(false, null, null, null, null, (short) 0, true, NodeL10n.getBase().getString("UserAlert.hide"), false, null); this.n = n; this.nodeUpdater = nodeUpdater; }
@Override protected String getPageTitle(String titleCountString) { return NodeL10n.getBase().getString("DarknetConnectionsToadlet.fullTitle", new String[] {"counts"}, new String[] {titleCountString} ); }
public String toLocalisedString() { if(pluginProgress == PROGRESS_STATE.DOWNLOADING && total > 0) return NodeL10n.getBase().getString("PproxyToadlet.startingPluginStatus.downloading") + " : "+((current*100.0) / total)+"%"; else if(pluginProgress == PROGRESS_STATE.DOWNLOADING) return NodeL10n.getBase().getString("PproxyToadlet.startingPluginStatus.downloading"); else if(pluginProgress == PROGRESS_STATE.STARTING) return NodeL10n.getBase().getString("PproxyToadlet.startingPluginStatus.starting"); else return toString(); }
/** * @throws IOException See {@link #sendErrorPage(ToadletContext, int, String, String)} * @throws ToadletContextClosedException See {@link #sendErrorPage(ToadletContext, int, String, String)} */ void sendUnauthorizedPage(ToadletContext ctx) throws ToadletContextClosedException, IOException { sendErrorPage(ctx, 403, NodeL10n.getBase().getString("Toadlet.unauthorizedTitle"), NodeL10n.getBase().getString("Toadlet.unauthorized")); }
@Override public String getText() { return NodeL10n.getBase().getString("JavaEOLAlert.body", new String[] {"current", "new"}, new String[] {JVMVersion.getCurrent(), JVMVersion.EOL_THRESHOLD}); }
private static HTMLNode getHTML(boolean disabledNotBlown, String msg) { HTMLNode div = new HTMLNode("div"); if(disabledNotBlown) { div.addChild("p", NodeL10n.getBase().getString("RevocationKeyFoundUserAlert.textDisabled")); div.addChild("p", NodeL10n.getBase().getString("RevocationKeyFoundUserAlert.textDisabledDetail", "message", msg)); } else { div.addChild("p", NodeL10n.getBase().getString("RevocationKeyFoundUserAlert.text")); div.addChild("p", NodeL10n.getBase().getString("RevocationKeyFoundUserAlert.textDetail", "message", msg)); } return div; }
@Override public void set(String val) throws InvalidConfigValueException { if(val == null || get().equalsIgnoreCase(val)) return; try { NodeL10n.getBase().setLanguage(BaseL10n.LANGUAGE.mapToLanguage(val)); } catch (MissingResourceException e) { throw new InvalidConfigValueException(e.getLocalizedMessage()); } PluginManager.setLanguage(NodeL10n.getBase().getSelectedLanguage()); }
@Override protected void createSelectDirectoryButton (HTMLNode formNode, String path, HTMLNode persist) { formNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "submit", selectDir, NodeL10n.getBase().getString("QueueToadlet.download")}); formNode.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", filenameField(), path}); formNode.addChild(persist); }
@Override public HTMLNode getHTMLText() { HTMLNode n = new HTMLNode("div"); NodeL10n.getBase().addL10nSubstitution(n, "BookmarkItem.bookmarkUpdatedWithLink", new String[]{"link", "name", "edition"}, new HTMLNode[] { HTMLNode.link("/"+key), HTMLNode.text(name), HTMLNode.text(key.getSuggestedEdition()) }); return n; }
@Override public HTMLNode getEventHTMLText() { String name = uri.getPreferredFilename(); HTMLNode text = new HTMLNode("div"); NodeL10n.getBase().addL10nSubstitution(text, "QueueToadlet.siteUploadSucceeded", new String[] { "link", "filename", "size", "files" }, new HTMLNode[] { HTMLNode.link("/"+uri.toASCIIString()), HTMLNode.text(name), HTMLNode.text(SizeUtil.formatSize(size)), HTMLNode.text(files) }); return text; }
public void handleMethodGET(URI uri, HTTPRequest req, ToadletContext ctx) throws ToadletContextClosedException, IOException { if(!ctx.checkFullAccess(this)) return; PageNode page = ctx.getPageMaker().getPageNode(NodeL10n.getBase().getString("SecurityLevelsToadlet.fullTitle"), ctx); HTMLNode pageNode = page.outer; HTMLNode contentNode = page.content; contentNode.addChild(ctx.getAlertManager().createSummary()); drawSecurityLevelsPage(contentNode, ctx); this.writeHTMLReply(ctx, 200, "OK", pageNode.generate()); }