/** * 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()); }
public void testGetStringFallback() { BaseL10n l10n = createTestL10n(LANGUAGE.GERMAN); String value = l10n.getString("test.sanity"); assertEquals("Sane", value); }
public void testGetStringFallbackOverridden() { BaseL10n l10n = createTestL10n(LANGUAGE.GERMAN); String value = l10n.getString("test.override"); assertEquals("Not overridden", value); }
/** 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 void testGetStringNonexistent() { BaseL10n l10n = createTestL10n(LANGUAGE.GERMAN); String value = l10n.getString("test.nonexistent"); assertEquals("test.nonexistent", value); }
/** 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; }
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 PutDirCompletedEvent(String identifier, FreenetURI uri, long size, int files) { super(Type.PutDirCompleted, true, null, null, null, null, UserAlert.MINOR, true, NodeL10n.getBase().getString("UserAlert.hide"), true, null, completedPutDirs); this.identifier = identifier; this.uri = uri; this.size = size; this.files = files; }