@Test public void testWide() { System.setProperty("mct.pseudotranslation", "wide"); ResourceBundle origBundle = ResourceBundle.getBundle("properties.PseudoBundle"); ResourceBundle testBundle = BundleFactory.getBundle("properties.PseudoBundle"); String ascii = origBundle.getString("ascii"); String translated = testBundle.getString("ascii"); assertTrue(PseudoBundle.isEnabled(), "Pseudotranslation enabled"); assertEquals(ascii.length()+2, translated.length()); for (int i=0; i<ascii.length(); ++i) { char c = ascii.charAt(i); assertTrue(c != translated.charAt(i+1), "Wide translation changes character " + c); } }
public static boolean isEnabled() { return (getMode() != BundleMode.NO_TRANSLATION); }
PseudoBundle extends ResourceBundle { public static boolean isEnabled() { return (getMode() != BundleMode.NO_TRANSLATION); } }
PseudoBundle extends ResourceBundle { public static boolean isEnabled() { return (getMode() != BundleMode.NO_TRANSLATION); } PseudoBundle(ResourceBundle baseBundle); }
PseudoBundle extends ResourceBundle { public static boolean isEnabled() { return (getMode() != BundleMode.NO_TRANSLATION); } PseudoBundle(ResourceBundle baseBundle); static boolean isEnabled(); @Override Enumeration<String> getKeys(); }
PseudoBundle extends ResourceBundle { public static boolean isEnabled() { return (getMode() != BundleMode.NO_TRANSLATION); } PseudoBundle(ResourceBundle baseBundle); static boolean isEnabled(); @Override Enumeration<String> getKeys(); static final String PSEUDO_BUNDLE_PROPERTY; static final String PSEUDO_BUNDLE_NORMAL; static final String PSEUDO_BUNDLE_WIDE; }