Skip to main content

Propagate changes to one segment

This method propagates translations of a segment to other branches. The way propagation works depends on the custom script configured for your platform by the Wordbee Solutions team. Propagation is usually initiated on demand from the Editor, allowing you to push selected translations to other branches when required.

URL

CODE
(POST) /api/apps/wbflex/documents/{id}/branches/propagate/key

PARAMETERS

The URL parameters are:

id

Specify the Flex container ID

string, Mandatory

The BODY must be a JSON object with these properties:

key

The key of the segment.

string, Mandatory

branch

The branch of the segment.

string, Mandatory

locales

Optional list of target locales. If not specified, the system will propagate all translations, otherwise just the locales specified.

string[], Optional

event

Optional. Specifies the type of propagation:

  • TranslationUpdated : The default. Will run the script to propagate translation changes.

  • SourceUpdated : Will run the script to propagate source text changes.

string?, Optional

RESULTS

A typical result is:

CODE
{
    "filteredSegments": 1,
    "changedSegments": 3,
    "changedTexts": 6,
    "changedTextsByLocale": { "fr": 3, "es": 3 },
    "savedSegments": 3
}

The result provides an indication of how many segments were updated by the script.

  • filteredSegments: Always 1, since only one segment is processed. If you specify a non-existent key or branch, the value will be 0.

  • changedSegments: The number of segments that were modified, typically in other branches if a change occurred.

  • changedTexts: The number of texts (values or metadata) that were affected by changes to the segments.

  • savedSegments: The number of segments actually saved. This should be identical to changedSegments.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.