translate.storage.workflow

Package translate :: Package storage :: Module workflow |
[hide private]
[frames] | no frames]

# Module workflow

source code

A workflow is defined by a set of states that a translation unit can be in and the (allowed) transitions between these states. A state is defined by a range between -128 and 127, indicating its level of "completeness". The range is closed at the beginning and open at the end. That is, if a workflow contains states A, B and C where A < B < C, a unit with state number n is in state A if A <= n < B, state B if B <= n < C or state C if C <= n < MAX.

A value of 0 is typically the "empty" or "new" state with negative values reserved for states like "obsolete" or "do not use".

Format specific workflows should be defined in such a way that the numeric state values correspond to similar states. For example state 0 should be "untranslated" in PO and "new" or "empty" in XLIFF, state 100 should be "translated" in PO and "final" in XLIFF. This allows formats to implicitly define similar states.

Classes | [hide private]
| StateEnum Only contains the constants for default states.
| State
| UnitState
| WorkflowError
| NoInitialStateError
| TransitionError
| InvalidStateObjectError
| StateNotInWorkflowError
| Workflow

Functions | [hide private]
create_unit_workflow(unit, state_names) | source code