Skip to content

Commit

Permalink
Fixed <mrk> cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
rmraya committed Nov 24, 2022
1 parent c01501f commit 3824c0a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Binary file modified lib/openxliff.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/com/maxprograms/converters/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
10 changes: 5 additions & 5 deletions src/com/maxprograms/converters/xml/Xml2Xliff.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public static List<String> run(Map<String, String> 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");
Expand Down Expand Up @@ -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);
}

Expand All @@ -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");
Expand Down

0 comments on commit 3824c0a

Please sign in to comment.