RE: [xliff] Phase name attribute use

From
John Reid <>
Date
2002-12-09T05:51:53+00:00
ID
Thread
RE: [xliff] Phase name attribute use
Hello Mirek, Mark, and All,

This discussion brings out some problems with the phase information as it is currently defined. Phase is a bit overloaded. First, phase is used for versioning the file and the parts of the file. This is the case in <trans-unit> and <bin-unit> where the phase can mark which have gone through a proofreading and which have not. Second, phase is used for specifying the origin of translations. This is the case for the phase-name in the <target> and <bin-target>. Thus, the phase of <trans-unit> may be different than phase of <target>. In addition, each <trans-unit> may have multiple <alt-trans> (>=0). An <alt-trans> may have a <source>, which is useful in providing fuzzy matches. 

For example, in the following, the <trans-unit> has had a final review, the <target> of the <trans-unit> was entered during the translation phase, and the <alt-trans> came into the file during pretranslation.

<trans-unit id="1" phase-name="5final">
  <source>Cancel Report</source>
  <target phase-name="3trans">Annuler le rapport</target>
  <alt-trans match-quality="50%">
    <source>Cancel All</target>
    <target phase-name="2pretrans">Annuler tout</target>
  </alt-trans>
</trans-unit>

In the above example, though, the phase associated with the fuzzy match is stored all the way down in the target rather than the more sensible position of in the <alt-trans>. One could easily imagine the scenario where another <alt-trans> is used to store translator entered translation that is acceptable but changed upon review, possibly because of context information; this information may be required for historical reasons or so the difference can be arbitrated by a final review. (I'll use case as the differentiator since my language skills aren't sufficient to create a better example. Please bear with me.)

<trans-unit id="1" phase-name="5final">
  <source>Cancel Report</source>
  <target phase-name="4review">Annuler le Rapport</target>
  <alt-trans>
    <target phase-name="3trans">Annuler le rapport</target>
  </alt-trans>
  <alt-trans match-quality="50%">
    <source>Cancel All</target>
    <target phase-name="2pretrans">Annuler tout</target>
  </alt-trans>
</trans-unit>

Here, as in the first example, there is no information in the <alt-trans> as to when it was entered in the file. The assumption is made that it entered at the time of the review since that is the phase of the <trans-unit>'s target. 

Now, if we remove the occurence of phase-name as proposed, we no longer know if the <trans-unit> has been reviewed or not. It can only be assumed, erroneously, to be at the phase of the last phase entered in the <trans-unit>, phase-name="4review". Since this information may be useful but is not required, I disagree with removing the phase-name from the <trans-unit> and <bin-unit>. This information becomes even more important as we split and recombine XLIFF files during their processing.

<trans-unit id="1">
  <source>Cancel Report</source>
  <target phase-name="4review">Annuler le Rapport</target>
  <alt-trans>
    <target phase-name="3trans">Annuler le rapport</target>
  </alt-trans>
  <alt-trans match-quality="50%">
    <source>Cancel All</target>
    <target phase-name="2pretrans">Annuler tout</target>
  </alt-trans>
</trans-unit>

Adding in the reason attribute, if I understand it correctly, we have the following.

<trans-unit id="1" phase-name="5final">
  <source>Cancel Report</source>
  <target phase-name="4review">Annuler le Rapport</target>
  <alt-trans reason="Rejected-Inaccurate">
    <target phase-name="3trans">Annuler le rapport</target>
  </alt-trans>
  <alt-trans match-quality="50%" reason="TM-Suggestion">
    <source>Cancel All</target>
    <target phase-name="2pretrans">Annuler tout</target>
  </alt-trans>
</trans-unit>

Although this does answer the question of the reason for the <alt-trans>, it still does not fix the problem of the deeply embedded phase-name. Also, if the reasons aren't strongly typed somehow (read 'enumerated') that information won't easily be interpretted. Thus we will have added more unusable data.

I don't have a strong opinion one way or the other about the reason attribute. It solves some problems but may introduce others, especially if it is required. It still needs some more work.

I do think we should add the phase-name attribute to the alt-trans as an optional attribute. Following along with Yves's original thoughts on this, the phase-name could be placed at the <alt-trans> level for any <alt-trans> that has a <source>. It would be placed in the target of any <alt-trans> that does not have a <source>. 

<trans-unit id="1" phase-name="5final">
  <source>Cancel Report</source>
  <target phase-name="4review">Annuler le Rapport</target>
  <alt-trans reason="Rejected-Inaccurate">
    <target phase-name="3trans">Annuler le rapport</target>
  </alt-trans>
  <alt-trans match-quality="50%" reason="TM-Suggestion" phase-name="2pretrans">
    <source>Cancel All</target>
    <target>Annuler tout</target>
  </alt-trans>
</trans-unit>

cheers,
john