RFE: Okapi XLIFF filter for OmegaT -- handling alternative translations more efficiently

Issue #1106 new
Manuel Souto Pico created an issue

Preconditions

A translated XLIFF with some repetitions, where the first translation is not the most frequent one, such as:

  1. foo -> bar
  2. foo -> qux
  3. foo -> qux
  4. foo -> qux
  5. foo -> qux

Steps

  1. Add the translated XLIFF file to an OmegaT project.
  2. Enable the Okapi XLIFF filter.

Current behaviour

  • The first translation (i.e. "1. foo -> bar") becomes the default translation.
  • All the other entries become alternative translations.

The "default translation" is the one that auto-propagates to all repetitions that do not have an alternative translation. Alternative translations do not auto-propagate.

Desired behaviour

  • The most frequent translation (i.e. "foo -> qux") becomes the default translation even if it's not the first one in the file.
  • Any other translations become alternative translations.

Comments

The function get_first_and_uniq_in_tms(tu_nodes) in script remove_redundant_ids_in_tm.groovy exemplifies the logic and might serve as a proof of concept.

Comments (2)

  1. ysavourel

    I’m not sure this an issue for the filter itself.

    The filter simply takes a file and put its translatable strings into the OmegaT project. It doesn’t perform any additional tasks (pre-translation, etc. It doesn’t know anything about repetitions, etc.)
    This said, maybe OmegaT API does provide some function to “process” a document content after or during it’s loaded: but I don’t know them.

  2. Log in to comment