diff --git a/lib/openxliff.jar b/lib/openxliff.jar index 674272e..864ca1d 100644 Binary files a/lib/openxliff.jar and b/lib/openxliff.jar differ diff --git a/src/com/maxprograms/converters/Constants.java b/src/com/maxprograms/converters/Constants.java index 1958d5e..3fbd924 100644 --- a/src/com/maxprograms/converters/Constants.java +++ b/src/com/maxprograms/converters/Constants.java @@ -20,7 +20,7 @@ private Constants() { public static final String TOOLID = "OpenXLIFF"; public static final String TOOLNAME = "OpenXLIFF Filters"; public static final String VERSION = "2.10.0"; - public static final String BUILD = "20221123_0856"; + public static final String BUILD = "20221124_1034"; public static final String SUCCESS = "0"; public static final String ERROR = "1"; diff --git a/src/com/maxprograms/converters/xml/Xml2Xliff.java b/src/com/maxprograms/converters/xml/Xml2Xliff.java index 0b951cd..f9c4dbf 100644 --- a/src/com/maxprograms/converters/xml/Xml2Xliff.java +++ b/src/com/maxprograms/converters/xml/Xml2Xliff.java @@ -127,7 +127,7 @@ public static List run(Map params) { resx = isResx != null; String dita = params.get("dita_based"); if (dita != null) { - ditaBased = dita.equalsIgnoreCase("yes"); + ditaBased = dita.equals("yes"); } boolean generic = false; String isGeneric = params.get("generic"); @@ -556,10 +556,10 @@ private static String removeTags(String tagged) throws IOException, SAXException } private static String extractText(Element element) throws SAXException { - if (element.getName().equals("ph")) { + if ("ph".equals(element.getName())) { return Xliff2Xml.fixEntities(element); } - if (ditaBased && element.getName().equals("g")) { + if (ditaBased && "mrk".equals(element.getName())) { return cleanMrk(element); } @@ -571,9 +571,9 @@ private static String extractText(Element element) throws SAXException { switch (n.getNodeType()) { case XMLNode.ELEMENT_NODE: Element e = (Element) n; - if (e.getName().equals("ph")) { + if ("ph".equals(e.getName())) { result.append(extractText(e)); - } else if (e.getName().equals("mrk")) { + } else if ("mrk".equals(e.getName())) { result.append(cleanMrk(e)); } else { throw new SAXException("broken tagged text");