Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Provides access to the data of a single segment

URL:

/editor/segment/[ID]

Available Methods:

GET / PUT

Specialities:

Only possible with a task in edit mode. Resource Layout is dynamic.


Resource Layout

Name

Type

Info

id

int

GET only

fileId

int

GET only, set by import

isFirstofFilebooleanGET only, calculated depending on filters set

segmentNrInTask

int

GET only, set by import

userName

string

GET only, set by server

timestamp

date

GET only, set by server

editable

boolean

GET only, set by import

autoStateId

int

GET only, set by server

workflowStep

string

GET only, set by server

workflowStepNrintGET only, set by server

matchRate

int

initially set by import, should be changed only when new text content comes from a system which provides a new matchRate

matchRateTypestringinitially set by import to "import", should be changed when changing the above matchRate

durations

object


comments

string

GET only, set by server

qmId

string


stateId

int


[FIELD]

string

GET only

[FIELD]Edit

string

Optional, only if field is editable.

isWatchedboolean

GET only, set by server (user dependent)

segmentUserAssocIdint

GET only, set by server (user dependent)



Segments contain dynamic fields, defined on import. This dynamic fields contain the segment payload.

Additonal Meta Informations

In the JSON response you will find an additional object "metaData" beneath the normally used "rows" array. Currently metaData contains only the integer field "firstEditable" which contains the rowIndex of the first segment which is editable in the current sort and filtered segment list. This field is only returned in the first request.

Special URLs

URLMethodParametersDescription
/editor/segment/nextsegmentsPOST
next: boolean; 1 to find and return the next editable segment
nextFiltered: boolean; 1 to find and return the next editable segment filtered by workflow
prev: boolean; 1 to find and return the previous editable segment
prevFiltered: boolean; 1 to find and return the previous editable segment filtered by workflow
filter: the same filter parameters as for the segment listing
sort: the same sort parameters as for the segment listing
segmentId: integer; The ID of the segment which should be used as start point

In big tasks where only a few segments are editable,
it is possible that the requested segments (200 per page) does not contain the next or previous editable segment.

This information must then be calculated separately.
Since the calculation is expensive on DB side, this are separated requests, and not included in the normal GET segment calls.

The response contains a plain JSON Object, containing the segment IDs for the requested steps (next / nextFiltered / prev / prevFiltered).

For example (only next and nextFiltered were delivered with 1 (true) on the request):

{
	next: 123
	nextFiltered: 321
}
/editor/segment/termsPOSTid: integer; the segment id to get the terminology entries forreturns a HTML Fragment with the terminology entries of the requested segment.

Overview Segment Processing States (formerly known as AutoStates)

IDSpeakable Name
(PHP Constant)
DescriptionUsage
0TRANSLATED"translated" / 'Übersetzt' ehemals 'Nicht lektoriert'Is used when the content of the segment is already translated on import time, or if a translator saves a segment with content.
1REVIEWED"reviewed" / 'Geprüft' ehemals 'Lektoriert'Is used when a reviewer saves a segment and has modified the content
2REVIEWED_AUTO"autoreviewed" / 'Autogeprüft' ehemals 'Auto-Lektoriert'Is used like REVIEWED but segment was saved via repetition editor instead of direct editing.
3BLOCKED

"locked" / 'Gesperrt' => locking of 100% matches

Is used when segment is imported readonly (segment flag editable = false).
This can be triggered via the import format, or on pre-translation if task has edit100%match false, and the pre-translated match-rate is >=100%
4NOT_TRANSLATED"untranslated" / "Nicht übersetzt" → kommt wie 0 initial aus dem ImportIs set on import time when source is set and target not. Is NOT set when translator deletes a previously
5REVIEWED_UNTOUCHED"reviewed untouched, auto-set" / "Geprüft"→ Beim Abschließen eines Tasks werden alle "unberührten" Segmente auf diesen Status gesetzt.
6REVIEWED_UNCHANGED"reviewed, untouched" / "Geprüft, unverändert"→ Wenn das Segment geöffnet und dann gespeichert wurde ohne was zu verändern
7REVIEWED_UNCHANGED_AUTO"autoreviewed, untouched" / "Autogeprüft, unverändert"→ analog zu 6 bei den Wiederholungen
8REVIEWED_TRANSLATOR"translator reviewed" / "Übersetzer geprüft"→ wenn ein Übersetzer das Segment verändert hat
9REVIEWED_TRANSLATOR_AUTO"translator autoreviewed" / "Übersetzer autogeprüft" → wenn ein Übersetzer das Segment via Wiederholungseditor verändert hat
10REVIEWED_PMreviewed by a pm not associated in the workflow of a task
11REVIEWED_PM_AUTOreviewed through the repetition editor by a pm not associated in the workflow of a task
12REVIEWED_PM_UNCHANGEDreviewed but unchanged by a pm not associated in the workflow of a task
13REVIEWED_PM_UNCHANGED_AUTOreviewed but unchanged through the repetition editor by a pm not associated in the workflow of a task
14TRANSLATED_AUTOif a translator uses the repetition editor, the segments are getting that state:
  • No labels