0

I noticed that upon generating an xliff file, it created nodes named context-group. I'm not sure what they are used for.

     <trans-unit id="edc96753971323c438706da1820e74730a79d1af" datatype="html">
        <source>Your response to this survey has already been recorded. Thank You.</source>
        <context-group purpose="location">
          <context context-type="sourcefile">app\core\forbidden.component.ts</context>
          <context context-type="linenumber">5</context>
        </context-group>
        <note priority="1" from="description">Message for survey already taken</note>
        <note priority="1" from="meaning">Survey Already Taken Page</note>
      </trans-unit>
jengfad
  • 704
  • 2
  • 8
  • 20

1 Answers1

1

The <context-group> element holds context elements relating to the level in the tree in which it occurs. Thus context can be set at a <group> level, a <trans-unit> level, or a <alt-trans> level. Each <context-group> element may be named, allowing different uses for each group. When the <context-group> is named, these uses can be controlled through the use of XML processing instructions. Because the <context-group> element may occur at a very high level, a default context can be established for all <trans-unit> elements within a file. This default can be overridden at many subsequent levels. The optional name attribute may uniquely identify the <context-group> within the <file> element. The optional crc attribute allows a verification of the data. The optional purpose attribute indicates to what use this context information is used; e.g. "match" indicates the context information is for memory lookups.

For more info, see: http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#context-group

d.moncada
  • 16,900
  • 5
  • 53
  • 82
  • 1
    What can be the practical use of this node? Btw, thanks for the answer. – jengfad Oct 19 '17 at 04:15
  • you can kind of think of it has meta-data that provides additional information about mapping and references. you can see more usages here: http://docs.oasis-open.org/xliff/v1.2/xliff-profile-po/xliff-profile-po-1.2-cd02.html – d.moncada Oct 19 '17 at 05:01