Add custom property support to trans-unit and source attributes in XLIFF 1.2 and XLIFF 2.0

Issue #600 new
Former user created an issue

Adding custom property to trans-unit/source element. The following code seems to support that but the actual implementation seems to be missing.

TextUnit tUnit = new TextUnit(id, text);
tUnit.setName(name);
tUnit.setProperty(new Property("abc", "def"));
xliffWriter.writeTextUnit(tUnit);

Comments (2)

  1. YvesS

    XLIFF 1.2 and 2.0 are separate cases as there is no support at all for XLIFF 2.0 with the current XLIFFWriter class in the main Okapi project.

    Instead, there is a whole separate library that supports both the Metadata module and custom extensions (elements and attributes in a private namespace). The library offers writer and reader classes with which one can easily create, read and modify XLIFF 2.0 files.

    The main Okapi project has a simple XLIFF 2 filter that currently provides basic support for extraction/merge with ITextUnit. We should probably have in a separate helper class the functions to convert back and forth a ITextUnit to/from a Unit, to facilitate the use of the XLIFF 2 package with the main Okapi resources.

  2. Log in to comment