Skip to content

Commit

Permalink
Improved Excel segmentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rmraya committed Mar 29, 2023
1 parent 7ef6ea5 commit df37f93
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 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 = "3.5.0";
public static final String BUILD = "20230328_1510";
public static final String BUILD = "20230329_0558";

public static final String SUCCESS = "0";
public static final String ERROR = "1";
Expand Down
13 changes: 3 additions & 10 deletions src/com/maxprograms/converters/msoffice/MSOffice2Xliff.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,8 @@ public static List<String> run(Map<String, String> params) {

segnum = 0;

if (elementSegmentation == null) {
segByElement = false;
} else {
if (elementSegmentation.equals("yes")) {
segByElement = true;
} else {
segByElement = false;
}
}
segByElement = (elementSegmentation == null) ? false : elementSegmentation.equals("yes");

try {
if (!segByElement) {
segmenter = new Segmenter(initSegmenter, sourceLanguage, new Catalog(catalog));
Expand Down Expand Up @@ -294,7 +287,7 @@ private static void recurse(Element e) throws IOException, SAXException, ParserC
}
continue;
}
if (child.getName().matches("[a-z]:p") || child.getName().equals("t")) {
if (child.getName().matches("[a-z]:p") || "si".equals(child.getName()) || "t".equals(child.getName())) {
recursePara(child);
} else {
recurse(child);
Expand Down

0 comments on commit df37f93

Please sign in to comment.