Excluding Strings by Content / Flex
The Flex filter configuration permit to exclude strings if the source text matches one or more regular expressions. Use cases:
- Exclude monetary amounts
- Exclude any content that does not require translation in the first place
Strings are excluded when content is pushed into the Flex document. This means such strings will never be saved to the system, will never show up in the translation editor and not be included when pulling content. You must make sure that the system exchanging content with a Flex document is compatible with this.
The filters are set in the Flex configurations. Go to "Settings" > "Wordbee Flex". Example:
Edit your configuration and click the "Exclude strings" tab:
The first expression excludes strings containing just digits (\d). The ^ $ sequence means that there is no content before and after the digits (or otherwise it would also exclude a text like "Amount: 2200".)
The second expression excludes any strings containing the word "BLOCK".
The total excluded segments shows up in the results in property segmentsSkipped: In the example below, the push contains 1 segment which is skipped. Therefore no content is updated actually.
{ "ts": "2019-05-29T13:24:54.7985528Z", "success": true, "errors": [], "mode": "partial", "source": { "segmentsTotal": 1, "segmentsErrors": 0, "segmentsSkipped": 1, "header": { "mode": "partial", "sourceTextChange": null, "targetTextChange": null, "targetTextAdd": null, "format": "plain", "major": "alpha", "minor": "2000" } }, "updates": { "total": 0, "totalAdded": 0, "totalUpdated": 0, "totalRemoved": 0, "texts": {}, "textsMeta": {} } }
Copyright Wordbee - Buzzin' Outside the Box since 2008