@Test public void testConvertStringToPseudoLocWithNoIntegrityChecker() { PseudoLocalization ps = new PseudoLocalization(); Set<TextUnitIntegrityChecker> checkers = new HashSet<>(); String pseudoLocalized = ps.convertStringToPseudoLoc("vf", checkers); assertEquals("The strings should be equal", "⟦ νƒ ⟧", pseudoLocalized); }
public String convertStringToPseudoLoc(String string, Set<TextUnitIntegrityChecker> checkers) { TextUnitIntegrityChecker checker = getIntegrityCheckerForPlaceholderProcessing(checkers); if (checker == null) { logger.debug("There is no checker for pseudolocalization placeholder processing."); return convertStringToPseudoLoc(string); } else { logger.debug("Found checker for pseudolocalization placeholder processing."); LocalizableString localizableString = checker.extractNonLocalizableParts(string); String pseudolocalized = convertStringToPseudoLoc(localizableString.getLocalizableString()); localizableString.setLocalizableString(pseudolocalized); return checker.restoreNonLocalizableParts(localizableString); } }
PseudoLocalization { public String convertStringToPseudoLoc(String string, Set<TextUnitIntegrityChecker> checkers) { TextUnitIntegrityChecker checker = getIntegrityCheckerForPlaceholderProcessing(checkers); if (checker == null) { logger.debug("There is no checker for pseudolocalization placeholder processing."); return convertStringToPseudoLoc(string); } else { logger.debug("Found checker for pseudolocalization placeholder processing."); LocalizableString localizableString = checker.extractNonLocalizableParts(string); String pseudolocalized = convertStringToPseudoLoc(localizableString.getLocalizableString()); localizableString.setLocalizableString(pseudolocalized); return checker.restoreNonLocalizableParts(localizableString); } } }
PseudoLocalization { public String convertStringToPseudoLoc(String string, Set<TextUnitIntegrityChecker> checkers) { TextUnitIntegrityChecker checker = getIntegrityCheckerForPlaceholderProcessing(checkers); if (checker == null) { logger.debug("There is no checker for pseudolocalization placeholder processing."); return convertStringToPseudoLoc(string); } else { logger.debug("Found checker for pseudolocalization placeholder processing."); LocalizableString localizableString = checker.extractNonLocalizableParts(string); String pseudolocalized = convertStringToPseudoLoc(localizableString.getLocalizableString()); localizableString.setLocalizableString(pseudolocalized); return checker.restoreNonLocalizableParts(localizableString); } }  }
PseudoLocalization { public String convertStringToPseudoLoc(String string, Set<TextUnitIntegrityChecker> checkers) { TextUnitIntegrityChecker checker = getIntegrityCheckerForPlaceholderProcessing(checkers); if (checker == null) { logger.debug("There is no checker for pseudolocalization placeholder processing."); return convertStringToPseudoLoc(string); } else { logger.debug("Found checker for pseudolocalization placeholder processing."); LocalizableString localizableString = checker.extractNonLocalizableParts(string); String pseudolocalized = convertStringToPseudoLoc(localizableString.getLocalizableString()); localizableString.setLocalizableString(pseudolocalized); return checker.restoreNonLocalizableParts(localizableString); } }  String convertStringToPseudoLoc(String string, Set<TextUnitIntegrityChecker> checkers); String convertStringToPseudoLoc(String string); String expand(String string); String convertAsciiToDiacritics(String string); }
PseudoLocalization { public String convertStringToPseudoLoc(String string, Set<TextUnitIntegrityChecker> checkers) { TextUnitIntegrityChecker checker = getIntegrityCheckerForPlaceholderProcessing(checkers); if (checker == null) { logger.debug("There is no checker for pseudolocalization placeholder processing."); return convertStringToPseudoLoc(string); } else { logger.debug("Found checker for pseudolocalization placeholder processing."); LocalizableString localizableString = checker.extractNonLocalizableParts(string); String pseudolocalized = convertStringToPseudoLoc(localizableString.getLocalizableString()); localizableString.setLocalizableString(pseudolocalized); return checker.restoreNonLocalizableParts(localizableString); } }  String convertStringToPseudoLoc(String string, Set<TextUnitIntegrityChecker> checkers); String convertStringToPseudoLoc(String string); String expand(String string); String convertAsciiToDiacritics(String string);  }