/** * Get the BaseL10n used to localize the node. * @return BaseL10n. * @see BaseL10n */ public static BaseL10n getBase() { if(b==null){ new NodeL10n(); } return b; } }
TranslationToadlet(HighLevelSimpleClient client, NodeClientCore core) { super(client); this.core = core; this.base = NodeL10n.getBase(); this.translatingFor = "Node"; }
/** 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; }
@Override public void setUp() throws InvalidThresholdException { new NodeL10n(); //if (TestProperty.VERBOSE) { // Logger.setupStdoutLogging(LogLevel.MINOR, "freenet.client.filter:DEBUG"); //} ContentFilter.init(); cssMIMEType = ContentFilter.getMIMEType("text/css"); }
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; }
/** * Returns the translation of the given key, prefixed by the short name of * the current class. * * @param key * The key to fetch * @return The translation */ static String l10n(String key) { return NodeL10n.getBase().getString("PluginManager." + key); }
/** * Create a new PluginL10n object using the node's selected * language. * @param plugin Plugin to use. */ public PluginL10n(FredPluginBaseL10n plugin) { this(plugin, NodeL10n.getBase().getSelectedLanguage()); }
@Override protected String getPageTitle(String titleCountString) { return NodeL10n.getBase().getString("DarknetConnectionsToadlet.fullTitle", new String[] {"counts"}, new String[] {titleCountString} ); }
private static String getText(boolean disabledNotBlown, String msg) { if(disabledNotBlown) { return NodeL10n.getBase().getString("RevocationKeyFoundUserAlert.textDisabled") + " " + NodeL10n.getBase().getString("RevocationKeyFoundUserAlert.textDisabledDetail", "message", msg); } else { return NodeL10n.getBase().getString("RevocationKeyFoundUserAlert.text") + " " + NodeL10n.getBase().getString("RevocationKeyFoundUserAlert.textDetail", "message", msg); } }
public String getDescription() { if(desc == null) return ""; if(desc.toLowerCase().startsWith("l10n:")) return NodeL10n.getBase().getString("Bookmarks.Defaults.Description."+desc.substring("l10n:".length())); return desc; }
public MyUserAlert(String title, String text, boolean suggestPortForward, short code) { super(false, title, text, title, null, code, true, NodeL10n.getBase().getString("UserAlert.hide"), false, null); this.suggestPortForward = suggestPortForward; portsNotForwarded = new int[] { }; }
public GetCompletedEvent(String identifier, FreenetURI uri, long size) { super(Type.GetCompleted, true, null, null, null, null, UserAlert.MINOR, true, NodeL10n.getBase().getString("UserAlert.hide"), true, null, completedGets); this.identifier = identifier; this.uri = uri; this.size = size; }