Skip to content

Commit

Permalink
Fixed join fo XLIFF 2.0 files
Browse files Browse the repository at this point in the history
  • Loading branch information
rmraya committed Oct 22, 2022
1 parent d6a66f6 commit 6caa56e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
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.9.0";
public static final String BUILD = "20221021_0853";
public static final String BUILD = "20221022_0824";

public static final String SUCCESS = "0";
public static final String ERROR = "1";
Expand Down
4 changes: 4 additions & 0 deletions src/com/maxprograms/converters/Join.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ public static void join(List<String> xliffs, String out)
writeString(output, ">\n");

Iterator<String> it = xliffs.iterator();
int count = 0;
while (it.hasNext()) {
String xliff = it.next();
Document doc = builder.build(xliff);
Expand All @@ -178,6 +179,9 @@ public static void join(List<String> xliffs, String out)
Element file = files1.get(i);
String original = file.getAttributeValue("original");
file.setAttribute("original", Utils.makeRelativePath(treeRoot, original));
if (version.startsWith("2")) {
file.setAttribute("id", "" + count++);
}
Indenter.indent(file, 2, 2);
writeString(output, " ");
file.writeBytes(output, StandardCharsets.UTF_8);
Expand Down

0 comments on commit 6caa56e

Please sign in to comment.