XLIFFFilter - Setting custom props and modifying isTranslatable based on a given configuration?

7 views
Skip to first unread message

Kaan Demirel

unread,
Sep 30, 2021, 9:42:17 AM9/30/21
to okapi-users
Hi everyone,

I have this requirement on XLIFFFilter where I need to add an extra parameter to XLIFF Filter's IParameters impl like "filledTargetTranslationMode" which accepts three values:
  1. "Translate" -> TU is translatable if there is a target and the content of target is different than source
  2. "Post-edit" -> TU is translatable but only for post-editing purposes if there is a target and the content of target is different than source. This also adds a custom property to target like post-edit="yes"
  3. "Skip" -> TU is not translatable if there is a target and the content of target is different than source (This is basically like using translate="no" or approved="yes", but most of our clients are not familiar with the specification and we'd like to handle this situation without modifying their source file.)
I added this option to net.sf.okapi.filters.xliff.Parameters class, and now ready to implement the case on the filter level. (I assume my requirements above can be done on filter level, right?)

I'm a stranger to the codebase and wanted to ask what would be the best approach to implement this one? I tried a few things on XLIFFFilter's postProcessTextUnit and processTarget methods, but they don't seem to have an effect on Raw Document to Filter Events step? Am I missing something here?

Best,
Reply all
Reply to author
Forward
0 new messages