oasis-tcs / xliff-xliff-22

OASIS XLIFF TC: A repository designed for use in development of TC chartered work products and test suites
https://github.com/oasis-tcs/xliff-xliff-22
Other
10 stars 1 forks source link

[Extended Proposal] Provide a standard way to add description to <resourceItem> #25

Open yumaoka opened 1 year ago

yumaoka commented 1 year ago

Authors

Yoshito Umaoka

Area of Changes

Detailed Description

The Resource Data module provides a mechanism for referencing external resource data. To specify a reference item,<resourceItem> element is used. In the current specification, there is no way way to specify description of each resource item without attributes/elements from other namespaces. When a resource item is used as context reference, it is important to provide a description about the content, not just mimeType. XLIFF should provide a standard way to add description of each resource item.

There are two options to support this requirement.

  1. Add new attribute description to <resourceItem> element.
  2. Allow note element in <resourceItem> element.

1 is probably easier for XLIFF implementators. 2 is more consistent with other XLIFF elements.

Example of Option 1 above

<file id="f3">
  <res:resourceData>
    <res:resourceItem id="r1" mimeType="image/jpeg" context="yes" description="Config Screen 1">
      <res:source href="resources\en\registryconfig1.resources.jpg" />
      <res:target href="resources\lb\registryconfig1.resources.jpg" />
    </res:resourceItem>
  </res:resourceData>
  <unit id="1">
    <res:resourceData>
      <res:resourceItemRef ref="r1" />
    </res:resourceData>
    <segment id="1" state="translated">
      <source>Remove Registry Config</source>
      <target>Registrierungskonfiguration entfernen</target>
    </segment>
  </unit>
</file>

Example of Option 2 above

<file id="f3">
  <res:resourceData>
    <res:resourceItem id="r1" mimeType="image/jpeg" context="yes">
      <res:source href="resources\en\registryconfig1.resources.jpg" />
      <res:target href="resources\lb\registryconfig1.resources.jpg" />
      <notes>
        <note>Config Screen 1</note>
      </notes>
    </res:resourceItem>
  </res:resourceData>
  <unit id="1">
    <res:resourceData>
      <res:resourceItemRef ref="r1" />
    </res:resourceData>
    <segment id="1" state="translated">
      <source>Remove Registry Config</source>
      <target>Registrierungskonfiguration entfernen</target>
    </segment>
  </unit>
</file>

Example Use Case

No response

Compatibility Impacts

No response

rmraya commented 7 months ago

It was unanimously agreed to use <notes> to provide a holder for descriptions.

rmraya commented 7 months ago

Updated spec published, ready for review.