Skip to content

Commit

Permalink
Fixed extraction from Word text boxes
Browse files Browse the repository at this point in the history
  • Loading branch information
rmraya committed Jan 6, 2024
1 parent 8c232d4 commit 6077855
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ An open source set of Java filters for creating, merging and validating XLIFF 1.

With OpenXLIFF Filters you can create XLIFF files that don't use proprietary markup and are compatible with most CAT (Computer Asisted Translation) tools.

**XLIFFChecker**, an open source XLIFF validation tool, is now part of OpenXLIFF Filters. Its code has been ported to Java 11 and enhanced with support for XLIFF 2.0.

- **[Releases](https://github.com/rmraya/OpenXLIFF#releases)**
- **[Binary Downloads](https://www.maxprograms.com/products/openxliff.html)**
- **[Filters Configuration](https://github.com/rmraya/OpenXLIFF#filters-configuration)**
Expand Down Expand Up @@ -49,6 +47,7 @@ XML and JSON filters are configurable

Version | Comment | Release Date
:------:|---------|:-----------:
3.17.0 | Improved extraction from Word text boxes; switched to Java 21 | January 6th, 2024
3.16.0 | Added catalog for XLIFF 2.2; adjusted ChatGPT models | October 29th, 2023
3.15.0 | Added new options to JSON filter configuration | September 13th, 2023
3.14.0 | Added option to generate XLIFF 2.1 | September 1st, 2023
Expand Down Expand Up @@ -170,13 +169,13 @@ OpenXLIFF Filters can generate XLIFF 1.2 and XLIFF 2.0 from these formats:

## Requirements

- JDK 17 or newer is required for compiling and building. Pre-built binaries already include everything you need to run all options.
- Apache Ant 1.10.12 or newer
- JDK 21 or newer is required for compiling and building. Pre-built binaries already include everything you need to run all options.
- Apache Ant 1.10.13 or newer

## Building

- Checkout this repository.
- Point your JAVA_HOME variable to JDK 17
- Point your JAVA_HOME variable to JDK 21
- Run `ant` to generate a binary distribution in `./dist`

### Steps for building
Expand Down
Binary file modified lib/openxliff.jar
Binary file not shown.
Binary file modified lib/xmljava.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions src/com/maxprograms/converters/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ private Constants() {

public static final String TOOLID = "OpenXLIFF";
public static final String TOOLNAME = "OpenXLIFF Filters";
public static final String VERSION = "3.16.0";
public static final String BUILD = "20231113_1109";
public static final String VERSION = "3.17.0";
public static final String BUILD = "20240106_0938";

public static final String SUCCESS = "0";
public static final String ERROR = "1";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ private static boolean isBreak(Element e) {
}

private static void recursePhrase(Element e) throws IOException, SAXException, ParserConfigurationException {
if ("mc:AlternateContent".equals(e.getName())) { //
if ("mc:AlternateContent".equals(e.getName()) && !hasTextElement(e)) {
text = text + "<ph>" + getImageText(e) + "</ph>";
return;
}
Expand Down

0 comments on commit 6077855

Please sign in to comment.