Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-1931 visualReview / core feature
  3. TRANSLATE-1940

provide the segment index in the segment grid for a single segmentID

      To enable synchronization between clicking on a segment text in the visual review panel and opening the clicked segment in the segment grid the segment index is needed if the segment is not loaded in the segment grids store.
      The segment index is currently not available in this case, and must be loaded from the server. The calculation of the index has to be done like in the prev next calculation.

          [TRANSLATE-1940] provide the segment index in the segment grid for a single segmentID

          aleksandar
          You can receive the segment position / index now by the following url:
          editor/segment/SEGMENT_ID/index
          appended with the filter and sort parameters of the ordinary segment grid indexAction call. How to append the filters and sort, see Editor.controller.editor.PrevNextSegment->fetchFromServer

          This request returns a JSON:
          {
          segmentId: the requested segmentId
          index: the numeric index of the segment or null
          }
          If it is a number, you can use this number to jump to the segment as we dicussed it last week.
          If it is null, that means the segment is not visible in the grid, mainly because it is filtered out. I don't know if we already discussed a way how to deal with that situation.

          Thomas Lauria added a comment - aleksandar You can receive the segment position / index now by the following url: editor/segment/SEGMENT_ID/index appended with the filter and sort parameters of the ordinary segment grid indexAction call. How to append the filters and sort, see Editor.controller.editor.PrevNextSegment->fetchFromServer This request returns a JSON: { segmentId: the requested segmentId index: the numeric index of the segment or null } If it is a number, you can use this number to jump to the segment as we dicussed it last week. If it is null, that means the segment is not visible in the grid, mainly because it is filtered out. I don't know if we already discussed a way how to deal with that situation.

          This issue can not be moved vertically in the board. So I put it here!

          Thomas Lauria added a comment - This issue can not be moved vertically in the board. So I put it here!

            tlauria Thomas Lauria
            tlauria Thomas Lauria
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: