Text Length Constraint Action

This action permits set or clear the minimum and maximum text length constraints of a segment. You can clear constraints, set them to absolute character lengths, calculate them as a percentage of the source text length and more.

Note that length constraints are expressed in terms of "number of characters".

The action is configured as follows:

 

type

"LengthConstraints"

string, Mandatory
locale

The language to which to apply status/bookmark changes when a constraint was updated.

This parameter is thus optional but recommended if flag changes shall be implemented across all action types.

string, Optional
   
maxMode

The mechanism to calculate the new maximum length. Available values are:

  • "None": Do not change / No action
  • "Clear": Clear constraint.
  • "Absolute": Set maximum characters to the value specified in maxValue (see below)
  • "Percentage": Calculate maximum characters as a percentage of the text length in language localeRef
  • "Add": Add the value specified in maxValue to the current max length. This value can be negative to substract.
string, Mandatory
maxValueAn integer value that is used with maxMode options "Absolute", "Percentage" and "Add".int,Optional
   
minMode

The mechanism to calculate the new minimum length. Available values are:

  • "None": Do not change / No action
  • "Clear": Clear constraint.
  • "Absolute": Set minimum characters to the value specified in minValue (see below)
  • "Percentage": Calculate minimum characters as a percentage of the text length in language localeRef
  • "Add": Add the value specified in minValue to the current min length. This value can be negative to substract.
string, Mandatory
minValueAn integer value that is used with minMode options "Absolute", "Percentage" and "Add".int,Optional
   
localeRef

The "Percentage" modes require that you specify the locale containing the source text here.

string, Optional

 

If the calculated minimum length happens to be larger than the maximum length: The system will reset the minimum to the maximum to avoid inconsistent values.

 

 

 

Copyright Wordbee - Buzzin' Outside the Box since 2008