Translation displayed as source text if state="final" with Okapi XLIFF filter

Preconditions

An OmegaT project containing a translated XLIFF file.
In one translation unit, the translation has state "final"

      <trans-unit id="59122858" translate="yes" approved="yes">
        <source xml:lang="en-ZZ">foo</source>
        <target xml:lang="ja-JP" state="final">bar</target>
      </trans-unit>

The option “Protect entries with state='final' (if not set: they can be edited)“ is checked in the filter options:

Steps to reproduce

Open the project.

Expected results

  1. The source text is the source text, e.g. "foo"
  2. The translation "looks" protected (as a tag)
  3. The translation is not editable (like a tag)
  4. The target file has the final translation (same as the source file).

Actual results

  1. The translation is displayed as the source text, e.g. "bar"
  2. As expected.
  3. The translation is editable.
  4. As expected.

Issue 1 is more major. Issue 3 is minor.

Comments

Project package1 attached: okapi-plugin_issue-51_xliff1-state-final_OMT.omt


  1. You can unpack that project package from OmegaT if you install the OMT plugin or you can simply unzip the OMT package. ↩️

Edited by Manuel Souto Pico