oasis-tcs / xliff-omos-jliff

OASIS XLIFF OMOS TC: JSON serialization of the XLIFF Abstract Object Model
https://github.com/oasis-tcs/xliff-omos-jliff
Other
17 stars 4 forks source link

Fragid #25

Open DavidFatDavidF opened 3 years ago

DavidFatDavidF commented 3 years ago

Made progress, but Dependency on #29 Also need to transpose XLIFF example to JLIFF

DavidFatDavidF commented 2 years ago

Assigned to Phil to transpose the example

philinthecloud commented 2 years ago

The JLIFF equivalent of the XLIFF Fragment Identification example 3.4 is:

{ "subgroups": [],
  "jliff": "2.1",
  "srcLang": "en-US",
  "trgLang": "fr-FR",
  "files": [
    { "id": "f1",
      "kind": "file",
      "notes": [
        { "id": "n1",
          "text": "note for file." }
      ],
      "subfiles": [
        { "canResegment": "no",
          "id": "u1",
          "kind": "unit",
          "notes": [
            { "id": "n1",
              "text": "note for unit" }
          ],
          "subunits": [
            { "id": "s1",
              "kind": "segment",
              "source": [
                { "id": "1",
                  "kind": "sc" },
                { "text": "Hello " },
                { "id": "m1",
                  "kind": "sm",
                  "type": "term" },
                { "text": "World" },
                { "kind": "em",
                   "startRef": "m1" },
                { "text": "!" },
                { "kind": "ec",
                  "startRef": "1" }
              ],
              "target": [
                { "id": "1",
                  "kind": "sc" },
                { "text": "Bonjour le " },
                { "id": "m1",
                  "kind": "sm",
                  "type": "term" },
                { "text": "Monde" },
                { "kind": "em",
                  "startRef": "m1" },
                { "text": "!" },
                { "kind": "ec",
                  "startRef": "1" }
              ] }
          ] }
      ] }
  ]
}
DavidFatDavidF commented 2 years ago

The reference should be to the current XLIFF 2.1 version of the OS https://docs.oasis-open.org/xliff/xliff-core/v2.1/os/xliff-core-v2.1-os.html#fragid

DavidFatDavidF commented 2 years ago

This property on the top level doesn't seem right "subgroups": []

DavidFatDavidF commented 2 years ago

Fragid done except for Extensions The Extensions section hasn't been adapted and the extension from the XLIFF example hasn't been converted. Dependency on #52

philr-vistatec commented 2 years ago

#f=f1/u=u1/1 refers to the {"id":"1","kind":"sc"} object of the source content of the {"id":"s1","kind":"segment","source":[...],"target":[...]} object.

#f=f1/u=u1/t=1 refers to the {"id":"1","kind":"sc"} object of the target content of the {"id":"s1","kind":"segment","source":[...],"target":[...]} object.

#f=f1/n=n1 refers to the {"id":"n1","text":"note for unit"} object of the {"id":"u1","kind":"unit","notes":[{"id":"n1","text":"note for unit"}],"subunits":["id":"s1","kind":"segment","source":[...],"target":[...]}]} object.

#f=f1/u=u1/s1 refers to the {"id":"s1","kind":"segment","source":[...],"target":[...]} of the {"id":"u1","kind":"unit","notes":[{"id":"n1","text":"note for unit"}],"subunits":["id":"s1","kind":"segment","source":[...],"target":[...]}]} object.