This issue is to discuss the segmentation semantics. I think we can't use IDs, because they need to be unique, and since we have the source and translation editors, they will get duplicated.

I would suggest using data-id or something similar. What are your suggestions?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sasanikolic created an issue. See original summary.

sasanikolic’s picture

Issue tags: +gsoc16
sasanikolic’s picture

Issue summary: View changes
sasanikolic’s picture

edurenye’s picture

We originally discussed about using a combination of job Item id, data key, and segment id. As this let us show the exact place where this is used in Drupal. But for the import this gives us a problem as we do not have the Job Item id, one option could be to just left this id empty in case a segment is imported.

edurenye’s picture

Assigned: Unassigned » edurenye

I think the solution here is to use the UUID of the segment.

edurenye’s picture

But this ID of the segment maybe should identify the translation, so the same for a source and target, well this leads to a problem in the export, as we have a segment that translates to each language so all the translations from on segment should have the same ID, then probably the best solution is to use the UUID of the source segment as ID.

sasanikolic’s picture

There was some discussion to replace the ids with the hash of the segments content. More info should be provided by Miro.

The uniqueness of the ids is not a problem, since they are in iframes. Each page/text inside of an iframe is totally self-contained and unique. Check this discussion.

edurenye’s picture

As I told to Miro we have a problem with the hash if the content of a segment appears twice in a data item.

edurenye’s picture

Status: Active » Needs work
FileSize
32.26 KB

In this patch there are all the changes needed after #2737131: Add methods in JobItem to get segmented data, also started playing with the ID's right now there is a strange failing test.

edurenye’s picture

I committed this and some more changes, but I'll continue here with the discussion about the ID's.