Segmentation rule - divide segments by a specific word.
Thread poster: Raul Becerra
Raul Becerra
Raul Becerra
Germany
German to Spanish
+ ...
Nov 18, 2022

I am testing the lates version of Memoq 2022 (memoQ-9.13.7). I need to translate text embedded in code. The text I need to translate appears after the tag "body":

What I would like memoq to do is to start a new segment after this word (I am also testing Trados and there it is pretty simple to do). This would hugely facilitate the translation work, as otherwise segments are very big and filled with code.

So far I have entered the "segmentation rules" section and have tr
... See more
I am testing the lates version of Memoq 2022 (memoQ-9.13.7). I need to translate text embedded in code. The text I need to translate appears after the tag "body":

What I would like memoq to do is to start a new segment after this word (I am also testing Trados and there it is pretty simple to do). This would hugely facilitate the translation work, as otherwise segments are very big and filled with code.

So far I have entered the "segmentation rules" section and have tried to add the word "body": as the end of the segment but without success as the regex only seems to accept single characters.

Does anybody know how to do this?

Text sample:

"type":"choice","actions":[{"$type":"TreeLibrary.Dto.Actions.ChoiceButtonsAction, TreeLibrary","body":"¿En qué puedo ayudarte?","outputVariable":"","hideOptions":true,"type":"ChoiceButtons","options":[{"id":"properties-box-1582018158003-9941-choice-2","caption":"¿Es la primera vez que compras con nosotros?, te explicamos como hacerlo.","icon":"","body":"¿Es la primera vez que compras con nosotros?, te explicamos como hacerlo.","variableValue":null,"goToNode":{"nodeId":"box-1594369625553-5571"}},{"id":"properties-box-1582018158003-9941-choice-3","caption":"Estoy buscando un artículo","icon":"","body":"Estoy buscando un artículo","variableValue":null,"goToNode":{"nodeId":"box-1594369811741-4925"}},{"id":"properties-box-1582018158003-9941-choice-4","caption":"Envios : Internacional, Seguimiento, Precio","icon":"","body":"Envios : Internacional, Seguimiento, Precio","variableValue":null,"goToNode":{"nodeId":"box-1594369689673-5816"}},{"id":"properties-
Collapse


 
Stepan Konev
Stepan Konev  Identity Verified
Russian Federation
Local time: 08:46
English to Russian
memoQ > Segmentation rules > Advanced view Nov 18, 2022

You need to add two expressions:
(?<="body":")#!#
and
#!#","


*Also, if you want memoQ not to segment by ":", you can remove that character from the 'Segment end' field in the simple view. Then you will be able to filter segments by a qu
... See more
You need to add two expressions:
(?<="body":")#!#
and
#!#","


*Also, if you want memoQ not to segment by ":", you can remove that character from the 'Segment end' field in the simple view. Then you will be able to filter segments by a quotation mark (in the source filter field, type " or ^" with 'Use regex' box checked to make sure you only filter segments starting with ") and lock them all:



[Edited at 2022-11-18 12:59 GMT]
Collapse


Grigori Gazarian
Raul Becerra
 
Raul Becerra
Raul Becerra
Germany
German to Spanish
+ ...
TOPIC STARTER
It works like a charm. Nov 21, 2022

Thank you so much. It works like a charm. You have saved me many hours of research.

 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Segmentation rule - divide segments by a specific word.






Trados Business Manager Lite
Create customer quotes and invoices from within Trados Studio

Trados Business Manager Lite helps to simplify and speed up some of the daily tasks, such as invoicing and reporting, associated with running your freelance translation business.

More info »
Trados Studio 2022 Freelance
The leading translation software used by over 270,000 translators.

Designed with your feedback in mind, Trados Studio 2022 delivers an unrivalled, powerful desktop and cloud solution, empowering you to work in the most efficient and cost-effective way.

More info »